Codex の際にブランチ名のサマリ処理に問題があったのを修正

This commit is contained in:
nrslib 2026-02-04 13:40:57 +09:00
parent 8e509e13c6
commit c4ebbdb6a6
2 changed files with 23 additions and 21 deletions

View File

@ -43,7 +43,7 @@ beforeEach(() => {
defaultPiece: 'default',
logLevel: 'info',
provider: 'claude',
model: 'haiku',
model: undefined,
});
});
@ -68,7 +68,6 @@ describe('summarizeTaskName', () => {
'long task name for testing',
expect.objectContaining({
cwd: '/project',
model: 'haiku',
allowedTools: [],
})
);

View File

@ -64,15 +64,18 @@ export class TaskSummarizer {
const globalConfig = loadGlobalConfig();
const providerType = (globalConfig.provider as ProviderType) ?? 'claude';
const model = options.model ?? globalConfig.model ?? 'haiku';
const model = options.model ?? globalConfig.model;
const provider = getProvider(providerType);
const response = await provider.call('summarizer', taskName, {
const callOptions: SummarizeOptions & { systemPrompt: string; allowedTools: [] } = {
cwd: options.cwd,
model,
systemPrompt: loadTemplate('score_slug_system_prompt', 'en'),
allowedTools: [],
});
};
if (model) {
callOptions.model = model;
}
const response = await provider.call('summarizer', taskName, callOptions);
const slug = sanitizeSlug(response.content);
log.info('Task name summarized', { original: taskName, slug });