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/fork-return-command.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@moonshot-ai/kimi-code": patch
---

Show the original session resume command after forking a session.
5 changes: 4 additions & 1 deletion apps/kimi-code/src/tui/kimi-tui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5504,7 +5504,10 @@ export class KimiTUI {
}

try {
await this.switchToSession(forked, `Session forked (${forked.id}).`);
await this.switchToSession(
forked,
`Session forked (${forked.id}). To return to the original session: kimi -r ${session.id}`,
);
} catch (error) {
const msg = formatErrorMessage(error);
this.showError(`Failed to switch to forked session: ${msg}`);
Expand Down
2 changes: 1 addition & 1 deletion apps/kimi-code/test/tui/kimi-tui-message-flow.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1476,7 +1476,7 @@ describe('KimiTUI message flow', () => {
expect(forked.onEvent).toHaveBeenCalledOnce();
expect(harness.resumeSession).not.toHaveBeenCalled();
expect(driver.state.transcriptContainer.render(120).join('\n')).toContain(
'Session forked (ses-fork).',
'Session forked (ses-fork). To return to the original session: kimi -r ses-source',
);
} finally {
process.title = originalTitle;
Expand Down
Loading