feat: expand ai commit agent support (#1928)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: brennanb2025 <brennankbenson@gmail.com>
This commit is contained in:
Leynier Gutiérrez González
2026-05-19 02:32:53 -07:00
committed by GitHub
co-authored by Copilot brennanb2025
parent 363ddb5ef6
commit 03b889512b
31 changed files with 2512 additions and 175 deletions
+76 -3
View File
@@ -6,7 +6,7 @@ describe('planCommitMessageGeneration', () => {
const result = planCommitMessageGeneration(
{
agentId: 'claude',
model: 'claude-sonnet-4-6',
model: 'sonnet',
thinkingLevel: 'high'
},
'PROMPT'
@@ -16,13 +16,86 @@ describe('planCommitMessageGeneration', () => {
ok: true,
plan: {
binary: 'claude',
args: ['-p', '--output-format', 'text', '--model', 'claude-sonnet-4-6', '--effort', 'high'],
args: [
'-p',
'--output-format',
'text',
'--model',
'sonnet',
'--permission-mode',
'plan',
'--effort',
'high'
],
stdinPayload: 'PROMPT',
label: 'Claude'
}
})
})
it('plans OpenCode run with prompt in argv and model variant', () => {
const result = planCommitMessageGeneration(
{
agentId: 'opencode',
model: 'opencode/gpt-5.4-mini',
thinkingLevel: 'high'
},
'PROMPT'
)
expect(result).toEqual({
ok: true,
plan: {
binary: 'opencode',
args: [
'run',
'--model',
'opencode/gpt-5.4-mini',
'--agent',
'build',
'--format',
'default',
'--variant',
'high',
'PROMPT'
],
stdinPayload: null,
label: 'OpenCode'
}
})
})
it('allows discovered dynamic models that are not in the seed catalog', () => {
const result = planCommitMessageGeneration(
{
agentId: 'cursor',
model: 'gpt-5.2',
thinkingLevel: 'xhigh'
},
'PROMPT'
)
expect(result).toEqual({
ok: true,
plan: {
binary: 'cursor-agent',
args: [
'--print',
'--mode',
'ask',
'--trust',
'--output-format',
'text',
'--model',
'gpt-5.2',
'PROMPT'
],
stdinPayload: null,
label: 'Cursor'
}
})
})
it('plans Codex exec as non-interactive read-only generation with the prompt on stdin only', () => {
const result = planCommitMessageGeneration(
{
@@ -87,7 +160,7 @@ describe('planCommitMessageGeneration', () => {
const result = planCommitMessageGeneration(
{
agentId: 'claude',
model: 'claude-haiku-4-5',
model: 'haiku',
agentCommandOverride: 'claude "unterminated'
},
'PROMPT'