mirror of
https://github.com/stablyai/orca.git
synced 2026-11-19 04:23:57 +00:00
16 lines
749 B
TypeScript
16 lines
749 B
TypeScript
import { isAgentStatusHooksEnabledForAgent } from '../../shared/agent-hook-listener/configuration/agent-status-hooks-setting'
|
|
import type { ManagedHookDetectionSettings } from '../agent-hooks/managed-hook-detection-commands'
|
|
import { openCode2HookService, openCodeHookService } from './hook-service'
|
|
|
|
// Refresh running OpenCode 2 services on upgrade without waiting for a pane to rewrite the plugin.
|
|
export function refreshInstalledOpenCodeStatusPlugins(
|
|
settings: ManagedHookDetectionSettings
|
|
): void {
|
|
if (isAgentStatusHooksEnabledForAgent(settings, 'opencode')) {
|
|
openCodeHookService.refreshInstalledPlugins()
|
|
}
|
|
if (isAgentStatusHooksEnabledForAgent(settings, 'opencode2')) {
|
|
openCode2HookService.refreshInstalledPlugins()
|
|
}
|
|
}
|