mirror of
https://github.com/stablyai/orca
synced 2026-04-21 14:17:16 +00:00
Fix Codex hook waiting state
This commit is contained in:
parent
6dd2fa9b3c
commit
ec50b83fc8
2 changed files with 7 additions and 3 deletions
|
|
@ -10,7 +10,11 @@ import {
|
|||
type HookDefinition
|
||||
} from '../agent-hooks/installer-utils'
|
||||
|
||||
const CODEX_EVENTS = ['SessionStart', 'UserPromptSubmit', 'Stop'] as const
|
||||
// Why: Codex permission prompts arrive through PreToolUse hook callbacks. Orca
|
||||
// maps that event to the waiting state, so the managed hook registration must
|
||||
// subscribe to PreToolUse or the sidebar can never show Codex as blocked on
|
||||
// approval.
|
||||
const CODEX_EVENTS = ['SessionStart', 'UserPromptSubmit', 'PreToolUse', 'Stop'] as const
|
||||
|
||||
function getConfigPath(): string {
|
||||
return join(homedir(), '.codex', 'hooks.json')
|
||||
|
|
|
|||
|
|
@ -87,13 +87,13 @@ describe('parseAgentStatusPayload', () => {
|
|||
expect(result!.next).toBe('')
|
||||
})
|
||||
|
||||
it('ignores invalid agentType values', () => {
|
||||
it('accepts custom non-empty agentType values', () => {
|
||||
const result = parseAgentStatusPayload('{"state":"working","agentType":"cursor"}')
|
||||
expect(result).toEqual({
|
||||
state: 'working',
|
||||
summary: '',
|
||||
next: '',
|
||||
agentType: undefined
|
||||
agentType: 'cursor'
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue