Skip to content

feat(tui): add /export-debug-zip slash command#112

Merged
liruifengv merged 3 commits into
mainfrom
add-export
May 27, 2026
Merged

feat(tui): add /export-debug-zip slash command#112
liruifengv merged 3 commits into
mainfrom
add-export

Conversation

@liruifengv
Copy link
Copy Markdown
Collaborator

Related Issue

N/A — this is a quality-of-life improvement for in-session debugging.

Problem

Users currently have to exit the TUI and run kimi export from the CLI to export a session as a debug ZIP archive. There is no way to do this from within an active TUI session.

What changed

  • New /export-debug-zip slash command — registered as a built-in command in the TUI that exports the current session (including the global log) as a debug ZIP archive, using the same KimiHarness.exportSession() API as the CLI kimi export command.
  • Extracted detectShellEnvironment into a shared utility (apps/kimi-code/src/utils/process/shell-env.ts) — eliminates duplication between the CLI export handler and the new TUI command.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

Add a new built-in slash command that exports the current session as a
debug ZIP archive directly from the TUI, mirroring the existing
`kimi export` CLI behavior.

Extract `detectShellEnvironment` into a shared utility to eliminate
duplication between the CLI export handler and the new TUI command.
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 27, 2026

🦋 Changeset detected

Latest commit: 0c01d71

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@moonshot-ai/kimi-code Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 27, 2026

pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@0c01d71
npx https://pkg.pr.new/@moonshot-ai/kimi-code@0c01d71

commit: 0c01d71

Make the exported ZIP path clickable in terminals that support OSC 8
hyperlinks (iTerm2, Terminal.app, VS Code, etc.). Also deduplicate
the helper that was copy-pasted in plan-box.ts.
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0c01d71bbf

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread apps/kimi-code/src/tui/kimi-tui.ts
@liruifengv liruifengv merged commit d03f6f4 into main May 27, 2026
6 checks passed
@liruifengv liruifengv deleted the add-export branch May 27, 2026 09:56
@github-actions github-actions Bot mentioned this pull request May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant