mirror of
https://github.com/stablyai/orca.git
synced 2026-11-01 01:27:35 +00:00
Fix delayed agent launches such as sleep 30 && claude (#28205)
* fix(terminal): preserve preparation and discovery for delayed agent launches * refactor(agents): centralize launch intent recognition * refactor(agents): keep launch intent in one module apart from process recognition Move recognizeAgentLaunchCommand next to the sleep-prefix scanner so the strict process-table matcher is untouched, name the module away from the agent-launch funnel files, share one executable-name normalizer, and colocate the preparation tests with their modules.
This commit is contained in:
@@ -29,3 +29,14 @@ describe('OpenCode hook selection', () => {
|
||||
).toBe('opencode2')
|
||||
})
|
||||
})
|
||||
|
||||
describe('selectOpenCodeHookAgent after a sleep prefix', () => {
|
||||
it('selects OpenCode 2 hooks instead of the v1 fallback', () => {
|
||||
expect(selectOpenCodeHookAgent(undefined, 'sleep 30 && opencode2', () => true)).toBe(
|
||||
'opencode2'
|
||||
)
|
||||
expect(
|
||||
selectOpenCodeHookAgent(undefined, 'sleep 30 && opencode2', (agent) => agent === 'opencode')
|
||||
).toBeNull()
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user