feat(soul): add OSC 9 terminal notifications for task completion#1345
feat(soul): add OSC 9 terminal notifications for task completion#1345zgat wants to merge 4 commits intoMoonshotAI:mainfrom
Conversation
…d approval requests
|
I had to use pyproject.toml syntax error: error: Failed to parse: pyproject.toml Caused by: TOML parse error at line 57, column 15 | 5 The current Could you help check what's going on with these configuration files? It seems like there mig |
| from __future__ import annotations | ||
|
|
||
| import asyncio | ||
| import sys |
There was a problem hiding this comment.
🟡 Unused top-level import sys added alongside local re-import inside _notify_terminal
Line 4 adds import sys at module level, but sys is never referenced at module scope — it is only used inside _notify_terminal() which has its own local import sys on line 690. The top-level import is dead code. While not a runtime error, it violates the project's Ruff lint rules (specifically the F rules which include F401 unused imports) mentioned in AGENTS.md.
| import sys |
Was this helpful? React with 👍 or 👎 to provide feedback.
Summary
Closes #1342
Add OSC 9 terminal notification support to notify users when Kimi completes a task or requir
es approval. This enables terminal emulators and multiplexers (e.g., iTerm2, Windows Termina
l, WezTerm, cmux) to display native desktop notifications.
Changes
_notify_terminal()function that emits OSC 9 escape sequencesTurnEnd)/dev/ttyCONOUT$Supported Terminals
Example
When Kimi finishes a response, the terminal will show a desktop notification:
Kimi: task completed
When approval is needed:
Kimi: approval required -