mirror of
https://github.com/stablyai/orca.git
synced 2026-10-13 08:02:52 +00:00
* Fix duplicate session option flags and preserve argument values * improve tests
15 lines
601 B
TypeScript
15 lines
601 B
TypeScript
import { removeAgentArgOption } from './agent-session-option-agent-args'
|
|
import type { AgentSessionOptionCatalog } from './agent-session-option-catalog-types'
|
|
|
|
const MODEL_FLAGS = ['-m', '--model'] as const
|
|
|
|
// Why: worker-start needs launch serialization without exposing a new Native Chat option surface.
|
|
export const OPENCODE_LAUNCH_OPTION_CATALOG: AgentSessionOptionCatalog = {
|
|
supportsWorkerLaunchPreferences: true,
|
|
models: [],
|
|
modelApply: {
|
|
launchArgs: (value) => ['--model', String(value)],
|
|
removeAgentArgs: (tokens) => removeAgentArgOption('opencode', tokens, MODEL_FLAGS)
|
|
}
|
|
}
|