feat(shell): include session id in kimi export hint on errors#2034
feat(shell): include session id in kimi export hint on errors#2034kermanx wants to merge 7 commits into
Conversation
Error hints now print the current session ID after `kimi export` so users can copy-paste the command directly, and surface the support email `code@moonshot.ai` inline.
Matches the other error branch so both paths surface code@moonshot.ai instead of the vague "send the exported data to support" wording.
Signed-off-by: _Kerman <kermanx@qq.com>
|
Codex Review: Didn't find any major issues. Another round soon, please! ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
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". |
Signed-off-by: _Kerman <kermanx@qq.com>
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com> Signed-off-by: _Kerman <kermanx@qq.com>
Added new features and fixes for various components, including core configuration options and improvements to the Shell and Kimi functionalities. Signed-off-by: _Kerman <kermanx@qq.com>
Signed-off-by: _Kerman <kermanx@qq.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1cd9416c6a
ℹ️ 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".
| session_id = ( | ||
| self.soul.runtime.session.id if isinstance(self.soul, KimiSoul) else None | ||
| ) | ||
| export_cmd = f"kimi export {session_id}" if session_id else "kimi export" |
There was a problem hiding this comment.
Insert
-- before session ID in export hint
The hint builds kimi export {session_id} directly, which breaks for valid custom session IDs that start with - (for example created via --session=-debug): when users copy-paste it, Typer parses the ID as an option and the export command fails instead of exporting that session. Since session_id is an unconstrained string in session creation/resume paths, render the hint as kimi export -- <id> (with quoting/escaping as needed) in both error branches.
Useful? React with 👍 / 👎.
|
|
||
| ## Unreleased | ||
|
|
||
| - Shell: Error hints now include the specific session ID in the `kimi export` command and surface the direct support email address `code@moonshot.ai` |
There was a problem hiding this comment.
🟡 Manual edit of auto-generated English changelog violates docs/AGENTS.md rule
The docs/AGENTS.md file explicitly states: "The English changelog (docs/en/release-notes/changelog.md) is auto-generated from the root CHANGELOG.md. Do not edit it manually." This PR manually edits docs/en/release-notes/changelog.md (adding the new Shell error-hint entry at line 7), which violates that rule. The root CHANGELOG.md already contains the same entry, so the sync script (npm run sync) would produce the correct output — the manual edit should be removed and the sync script relied upon instead.
Prompt for agents
The file docs/en/release-notes/changelog.md should not be manually edited according to docs/AGENTS.md. Instead, only the root CHANGELOG.md should be edited, and then the sync script (npm run sync from the docs/ directory) should be run to auto-generate this file. Revert the manual changes to docs/en/release-notes/changelog.md and rely on the sync script to propagate the entry from CHANGELOG.md.
Was this helpful? React with 👍 or 👎 to provide feedback.
Related Issue
N/A — small UX follow-up.
Description
When the interactive shell surfaces a recoverable chat-provider error or an unexpected exception, the
kimi exporthint previously printed without any session identifier, forcing the user to look up the ID before running the command. This PR:self.soul.runtime.session.idwhen the soul is aKimiSoul, and inlines it askimi export <session_id>inside the hint so the user can copy the whole command as-is.run_soul_command: the non-401/402/403ChatProviderErrorbranch and the catch-allExceptionbranch.kimi exportwhen noKimiSoulruntime is attached.terminal+and,[/link]+for).Verified locally by temporarily raising
APIConnectionErrorbeforerun_souland asserting via anexpectscript that the printed session ID matched the one shown in the welcome banner.Checklist
make gen-changelogto update the changelog.make gen-docsto update the user documentation.