mirror of
https://github.com/stablyai/orca.git
synced 2026-10-05 16:02:22 +00:00
feat(source-control-ai): support OMP generation (#20624)
* feat(source-control-ai): support OMP text generation Read prompts on stdin, retain OMP configured model by default, and reuse JSON model discovery. Co-authored-by: unknown <1784931579@qq.com> * test(source-control-ai): cover OMP large input and model overrides * fix(omp): keep configured model default out of discovered catalog * fix(omp): hide config default from model discovery catalog * fix(omp): separate terminal discovery from generation defaults * test(omp): keep model probe import compatible with CLI typecheck * test: align Source Control AI registry contracts with OMP --------- Co-authored-by: unknown <1784931579@qq.com>
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { OMP_MODEL_LIST_ARGS, parseOmpModelList } from './omp-model-list-probe'
|
||||
import type { TuiAgent } from './tui-agent'
|
||||
import { isTuiAgentEnabled } from './tui-agent-selection'
|
||||
import { labelFromModelId } from './model-id-label'
|
||||
@@ -88,6 +89,29 @@ export type CommitMessageAgentCapability = {
|
||||
}
|
||||
|
||||
export const COMMIT_MESSAGE_AGENT_SPECS: Partial<Record<TuiAgent, CommitMessageAgentSpec>> = {
|
||||
omp: {
|
||||
id: 'omp',
|
||||
label: 'OMP',
|
||||
binary: 'omp',
|
||||
promptDelivery: 'stdin',
|
||||
buildArgs: ({ model, thinkingLevel }) => [
|
||||
'--print',
|
||||
'--no-session',
|
||||
'--no-tools',
|
||||
'--no-extensions',
|
||||
'--no-skills',
|
||||
'--no-rules',
|
||||
'--mode',
|
||||
'text',
|
||||
...(model && model !== 'default' ? ['--model', model] : []),
|
||||
...(thinkingLevel ? ['--thinking', thinkingLevel] : [])
|
||||
],
|
||||
singletonOptions: [['--model'], ['--thinking']],
|
||||
modelSource: 'dynamic',
|
||||
modelDiscovery: { binary: 'omp', args: OMP_MODEL_LIST_ARGS, parse: parseOmpModelList },
|
||||
models: [{ id: 'default', label: 'Config default' }],
|
||||
defaultModelId: 'default'
|
||||
},
|
||||
...buildPrimaryCommitMessageAgentSpecs({
|
||||
CLAUDE_THINKING_LEVELS,
|
||||
OPENAI_THINKING_LEVELS,
|
||||
|
||||
Reference in New Issue
Block a user