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:
@@ -1,10 +1,8 @@
|
||||
import { getCommandTokenPathBasename, getFirstCommandToken } from './command-token-scanner'
|
||||
import type { TuiAgent } from './tui-agent'
|
||||
import { getAgentLaunchExecutableName } from './agent-command-line-intent'
|
||||
|
||||
function openCodeCommandAgent(launchCommand: string | undefined): 'opencode' | 'opencode2' | null {
|
||||
const binary = getCommandTokenPathBasename(getFirstCommandToken(launchCommand ?? ''))
|
||||
.toLowerCase()
|
||||
.replace(/\.(?:cmd|exe|sh)$/, '')
|
||||
const binary = getAgentLaunchExecutableName(launchCommand)
|
||||
return binary === 'opencode' || binary === 'opencode2' ? binary : null
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user