Codex の際にブランチ名のサマリ処理に問題があったのを修正
This commit is contained in:
parent
8e509e13c6
commit
c4ebbdb6a6
@ -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: [],
|
||||
})
|
||||
);
|
||||
|
||||
@ -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 });
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user