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
+3 -3
View File
@@ -33,7 +33,7 @@ export type CommitMessagePlanResult =
| { ok: true; plan: CommitMessagePlan }
| { ok: false; error: string }
function planAgentBinary(
export function planAgentBinary(
defaultBinary: string,
commandOverride: string | undefined
): { ok: true; binary: string; prefixArgs: string[] } | { ok: false; error: string } {
@@ -91,13 +91,13 @@ export function planCommitMessageGeneration(
return { ok: false, error: `Model "${input.model}" is not available for ${spec.label}.` }
}
if (input.thinkingLevel) {
if (!model.thinkingLevels) {
if (!model.thinkingLevels && spec.modelSource !== 'dynamic') {
return {
ok: false,
error: `Model "${model.label}" does not support a thinking effort level.`
}
}
if (!model.thinkingLevels.some((l) => l.id === input.thinkingLevel)) {
if (model.thinkingLevels && !model.thinkingLevels.some((l) => l.id === input.thinkingLevel)) {
return {
ok: false,
error: `Thinking level "${input.thinkingLevel}" is not valid for ${model.label}.`