MoonshotAI / MoonshotAI/kimi-cli
[Feature Request] Add /delete command to remove sessions
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 11.4k
- Forks
- 1.3k
- Avg merge
- 9h 47m
- Merged PRs (30d)
- 2
Description
功能請求:添加 /delete 或 /remove 命令來刪除 Session
問題描述
目前 Kimi Code CLI 沒有提供直接刪除 session 的命令,用戶需要手動到 ~/.kimi/sessions/ 目錄下刪除資料夾。
使用場景
- Session 列表過多時難以管理
- 需要清理不再使用的舊 session 釋放磁盤空間
- 某些 session 可能包含敏感信息需要徹底刪除
建議的解決方案
添加一個新的斜杠命令來刪除 session:
刪除指定 session
/delete <session_id>
或
/remove <session_id>
交互式選擇刪除
/delete
預期行為
- 執行 /delete 後顯示 session 列表(類似 /sessions)
- 用戶選擇要刪除的 session
- 確認後刪除該 session 資料夾
- 無法刪除當前正在使用的 session(或需要特別確認)
替代方案
目前只能手動刪除:
macOS/Linux
rm -rf ~/.kimi/sessions/<session_id>
Windows
Remove-Item -Path ~/.kimi/sessions/<session_id> -Recurse -Force
環境信息
• 版本: kimi, version 1.30.0
• 平台: Windows / macOS / Linux
額外說明
可以考慮同時添加:
• /delete --all 刪除所有非當前 session
• 在 /sessions 列表中添加刪除快捷鍵(如 D 鍵)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the existing /sessions command and how session folders are stored under ~/.kimi/sessions/. Define the supported deletion flow, including selection, confirmation, and protection for the current session. Done means the command can safely delete a chosen session across Windows, macOS, and Linux, with tests covering the expected behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100