mirror of
https://github.com/stablyai/orca.git
synced 2026-09-22 00:02:31 +00:00
* 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>
24 lines
1.2 KiB
JavaScript
24 lines
1.2 KiB
JavaScript
import assert from 'node:assert/strict'
|
|
import { pathToFileURL } from 'node:url'
|
|
import { join, resolve } from 'node:path'
|
|
import { getCommitMessageAgentSpec } from '../../src/shared/commit-message-agent-spec.ts'
|
|
const reference = process.argv[2]
|
|
assert.ok(reference, 'Pass the read-only source checkout path')
|
|
const { parseArgs } = await import(pathToFileURL(join(resolve(reference), 'packages/coding-agent/src/cli/args.ts')).href)
|
|
const spec = getCommitMessageAgentSpec('omp')
|
|
assert.ok(spec)
|
|
for (const model of ['default', 'provider/model']) {
|
|
const args = spec.buildArgs({ prompt: 'Generated entirely from stdin', model })
|
|
const parsed = parseArgs(args)
|
|
assert.equal(parsed.print, true)
|
|
assert.equal(parsed.noSession, true)
|
|
assert.equal(parsed.noTools, true)
|
|
assert.equal(parsed.noExtensions, true)
|
|
assert.equal(parsed.noSkills, true)
|
|
assert.equal(parsed.noRules, true)
|
|
assert.equal(parsed.mode, 'text')
|
|
assert.equal(parsed.model, model === 'default' ? undefined : model)
|
|
assert.deepEqual(parsed.messages, [])
|
|
}
|
|
console.log(JSON.stringify({ actualArgumentParser: true, promptDelivery: spec.promptDelivery, configDefault: true, explicitModel: true, modelCalls: 0 }))
|