chore: add completion logs for branch and issue generation

This commit is contained in:
nrslib 2026-02-10 21:36:11 +09:00
parent 9546806649
commit 79ee353990
6 changed files with 7 additions and 0 deletions

View File

@ -199,6 +199,7 @@ describe('confirmAndCreateWorktree', () => {
// Then // Then
expect(mockInfo).toHaveBeenCalledWith('Generating branch name...'); expect(mockInfo).toHaveBeenCalledWith('Generating branch name...');
expect(mockInfo).toHaveBeenCalledWith('Branch name generated: test-task');
}); });
it('should skip prompt when override is false', async () => { it('should skip prompt when override is false', async () => {

View File

@ -193,6 +193,7 @@ describe('resolveTaskExecution', () => {
// Then // Then
expect(mockInfo).toHaveBeenCalledWith('Generating branch name...'); expect(mockInfo).toHaveBeenCalledWith('Generating branch name...');
expect(mockInfo).toHaveBeenCalledWith('Branch name generated: test-task');
}); });
it('should use task content (not name) for AI summarization', async () => { it('should use task content (not name) for AI summarization', async () => {

View File

@ -46,6 +46,7 @@ function resolveIssueInput(
throw new Error(ghStatus.error); throw new Error(ghStatus.error);
} }
const issue = fetchIssue(issueOption); const issue = fetchIssue(issueOption);
info(`GitHub Issue fetched: #${issue.number} ${issue.title}`);
return { issues: [issue], initialInput: formatIssueAsTask(issue) }; return { issues: [issue], initialInput: formatIssueAsTask(issue) };
} }
@ -61,6 +62,7 @@ function resolveIssueInput(
throw new Error(`Invalid issue reference: ${task}`); throw new Error(`Invalid issue reference: ${task}`);
} }
const issues = issueNumbers.map((n) => fetchIssue(n)); const issues = issueNumbers.map((n) => fetchIssue(n));
info(`GitHub Issues fetched: ${issues.map((issue) => `#${issue.number}`).join(', ')}`);
return { issues, initialInput: issues.map(formatIssueAsTask).join('\n\n---\n\n') }; return { issues, initialInput: issues.map(formatIssueAsTask).join('\n\n---\n\n') };
} }

View File

@ -183,6 +183,7 @@ export async function addTask(cwd: string, task?: string): Promise<void> {
const numbers = parseIssueNumbers([trimmedTask]); const numbers = parseIssueNumbers([trimmedTask]);
if (numbers.length > 0) { if (numbers.length > 0) {
issueNumber = numbers[0]; issueNumber = numbers[0];
info(`GitHub Issue fetched: #${issueNumber}`);
} }
} catch (e) { } catch (e) {
const msg = getErrorMessage(e); const msg = getErrorMessage(e);

View File

@ -62,6 +62,7 @@ export async function resolveTaskExecution(
baseBranch = getCurrentBranch(defaultCwd); baseBranch = getCurrentBranch(defaultCwd);
info('Generating branch name...'); info('Generating branch name...');
const taskSlug = await summarizeTaskName(task.content, { cwd: defaultCwd }); const taskSlug = await summarizeTaskName(task.content, { cwd: defaultCwd });
info(`Branch name generated: ${taskSlug}`);
throwIfAborted(abortSignal); throwIfAborted(abortSignal);
info('Creating clone...'); info('Creating clone...');

View File

@ -115,6 +115,7 @@ export async function confirmAndCreateWorktree(
info('Generating branch name...'); info('Generating branch name...');
const taskSlug = await summarizeTaskName(task, { cwd }); const taskSlug = await summarizeTaskName(task, { cwd });
info(`Branch name generated: ${taskSlug}`);
info('Creating clone...'); info('Creating clone...');
const result = createSharedClone(cwd, { const result = createSharedClone(cwd, {