feat(merger,dashboard): use title-summarization model for commit body AI + reword settings
Wires the AI commit-body generator (introduced in 52928ff5e) to the
existing dedicated title-summarization model lane, and updates the
settings UI so users understand the model is now used for two
short-summary jobs instead of just one. Also de-duplicates the
project-scope settings UI which was exposing the same model setting in
two places.
Engine (merger.ts):
- aiGenerateCommitBody now prefers settings.titleSummarizerProvider /
titleSummarizerModelId over the merger's default model. The
summarization lane is the right tier for this work — small, fast,
cheap. Falls back to the default merger model when the summarization
lane is unset.
Dashboard (SettingsModal.tsx):
- MODEL_LANES summarization lane label updated:
"Title Summarization Model" → "Title and Git Commit Message
Summarization Model". Helper text updated to mention the dual purpose
(auto-generated task titles + fallback merge commit message bodies).
This change flows through automatically to BOTH the global model
lanes view and any project-scope rendering of MODEL_LANES.
- Removed the duplicate summarization picker from the project-scope
Model Lanes section: previously it appeared once under Model Lanes
AND once under "AI Summarization". Now lives only in the dedicated
picker so users have a single source of truth in project scope.
- The dedicated picker section heading + description rewritten:
"AI Summarization" → "AI Title and Git Commit Message Summarization",
with a paragraph explaining both jobs the model performs.
- Inner dropdown label updated for consistency.
Tests + checks: engine 2887/2887 pass, dashboard typecheck clean,
workspace lint clean.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1950,17 +1950,30 @@ async function aiGenerateCommitBody(opts: {
|
||||
|
||||
let session: Awaited<ReturnType<typeof createResolvedAgentSession>>["session"] | undefined;
|
||||
try {
|
||||
// Prefer the dedicated title-summarization model from settings — it's a
|
||||
// small, fast model intended exactly for short summarization tasks like
|
||||
// this. Falls back to the merger's default model only when the
|
||||
// summarization model isn't configured.
|
||||
const useTitleSummarizer =
|
||||
!!opts.settings.titleSummarizerProvider && !!opts.settings.titleSummarizerModelId;
|
||||
const provider = useTitleSummarizer
|
||||
? opts.settings.titleSummarizerProvider!
|
||||
: (opts.settings.defaultProviderOverride && opts.settings.defaultModelIdOverride
|
||||
? opts.settings.defaultProviderOverride
|
||||
: opts.settings.defaultProvider);
|
||||
const modelId = useTitleSummarizer
|
||||
? opts.settings.titleSummarizerModelId!
|
||||
: (opts.settings.defaultProviderOverride && opts.settings.defaultModelIdOverride
|
||||
? opts.settings.defaultModelIdOverride
|
||||
: opts.settings.defaultModelId);
|
||||
|
||||
const created = await createResolvedAgentSession({
|
||||
sessionPurpose: "merger",
|
||||
cwd: opts.rootDir,
|
||||
systemPrompt,
|
||||
tools: "readonly",
|
||||
defaultProvider: opts.settings.defaultProviderOverride && opts.settings.defaultModelIdOverride
|
||||
? opts.settings.defaultProviderOverride
|
||||
: opts.settings.defaultProvider,
|
||||
defaultModelId: opts.settings.defaultProviderOverride && opts.settings.defaultModelIdOverride
|
||||
? opts.settings.defaultModelIdOverride
|
||||
: opts.settings.defaultModelId,
|
||||
defaultProvider: provider,
|
||||
defaultModelId: modelId,
|
||||
});
|
||||
session = created.session;
|
||||
await session.prompt(userPrompt);
|
||||
|
||||
Reference in New Issue
Block a user