Use OSC 133 C and D to mark when prompt started and ended for terminal integration
- 主要语言
- Shell
- 星标
- 11.2k
- 派生
- 1.9k
- 平均合并
- 14 小时 16 分钟
- 30 天内合并 PR
- 6
描述
### Describe the feature or problem you'd like to solve
Some terminals like Ghostty support notifications when a command completes that took more the X seconds, which is perfect for long prompt execution.
### Proposed solution
Write `\e]133;C\a` when a prompt is sent to the orchestrating (or only) agent and `\e]133;D\a` when it completes to have supporting terminals - including VSCode's integrated terminal, IIRC - notify the user that the agent has finished executing the prompt.
### Example prompts or workflows
I currently use some integration via oh-my-posh and Ghostty so that CLI commands that take more than 10 seconds notify me (system bell and/or notification window). To help support putting agent tasks in the background, OSC 133;C and D would notify me when the prompt in Copilot CLI (actually a TUI, so prompts don't work the same currently) is complete.
### Additional context
_No response_
贡献指南
调研方向
Start by locating the CLI's prompt execution lifecycle and the terminal output path used when an agent prompt begins and completes. Run the CLI in a terminal that supports OSC 133; verify that the C sequence is emitted at prompt start and the D sequence at completion, including for longer-running prompts.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- shell
- 领域
- cli
- Issue 类型
- 功能
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 62/100