Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/error-report-export-debug-zip.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@moonshot-ai/kimi-code": patch
---

Point session error diagnostics to the `/export-debug-zip` command.
6 changes: 3 additions & 3 deletions apps/kimi-code/src/tui/constant/feedback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ export function feedbackSessionLine(sessionId: string): string {
}

// Hint shown beneath session-level error messages in the TUI to point users
// at the `kimi export` workflow so they can share diagnostics with us.
export function errorReportHintLine(sessionId: string): string {
return `If this persists, run \`kimi export ${sessionId}\` and share the file with us for diagnosis. Please don't share it publicly.`;
// at the `/export-debug-zip` workflow so they can share diagnostics with us.
export function errorReportHintLine(): string {
return "If this persists, run `/export-debug-zip` and share the file with us for diagnosis. Please don't share it publicly.";
}

export function withFeedbackVersionPrefix(version: string): string {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ export class SessionEventHandler {
this.host.showError(`[${event.code}] ${event.message}`);
const sessionId = this.host.state.appState.sessionId;
if (sessionId.length > 0) {
this.host.showStatus(errorReportHintLine(sessionId));
this.host.showStatus(errorReportHintLine());
}
}

Expand Down
11 changes: 6 additions & 5 deletions apps/kimi-code/test/tui/kimi-tui-message-flow.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2112,10 +2112,10 @@ command = "vim"
const transcript = stripSgr(renderTranscript(driver));
expect(transcript).toContain('OAuth login expired. Send /login to login.');
expect(transcript).not.toContain('[auth.login_required]');
expect(transcript).not.toContain('kimi export');
expect(transcript).not.toContain('/export-debug-zip');
});

it('appends the kimi export hint beneath session error messages', async () => {
it('appends the /export-debug-zip hint beneath session error messages', async () => {
const { driver } = await makeDriver();

driver.sessionEventHandler.handleEvent(
Expand All @@ -2132,11 +2132,12 @@ command = "vim"

const transcript = stripSgr(driver.state.transcriptContainer.render(200).join('\n'));
expect(transcript).toContain('Error: [compaction.failed]');
expect(transcript).toContain('If this persists, run `kimi export ses-1`');
expect(transcript).toContain('If this persists, run `/export-debug-zip`');
expect(transcript).toContain("Please don't share it publicly");
expect(transcript).not.toContain('kimi export');
});

it('skips the kimi export hint when no active session id is set', async () => {
it('skips the /export-debug-zip hint when no active session id is set', async () => {
const { driver } = await makeDriver();
driver.state.appState.sessionId = '';

Expand All @@ -2154,7 +2155,7 @@ command = "vim"

const transcript = stripSgr(renderTranscript(driver));
expect(transcript).toContain('Error: [compaction.failed]');
expect(transcript).not.toContain('kimi export');
expect(transcript).not.toContain('/export-debug-zip');
});

it('shows ExitPlanMode plan only in the current-plan card during approval', async () => {
Expand Down
Loading
Loading