feat: implement clear context option in Plan Mode and update related prompts - #334
Merged
Conversation
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
Plan Mode 输出完整方案后,新增
2. clear context and implement选项,让用户可以在干净的上下文中执行方案,避免规划阶段积累的大量对话占用后续实现所需的上下文窗口。实现方式
参考了 Codex 的相关功能实现,具体如下:
该选项不是压缩旧会话,而是创建一个全新线程,把“实施说明 + Plan方案”作为新会话的首条用户消息提交,并切换到 Default mode。
当前项目已有独立的
/new和新会话能力,因此不需要修改 core 的消息存储格式。本次改动主要落在 Plan 完成弹窗与 App 编排层:clear context and implement选项。<proposed_plan>内容创建新会话。/resume恢复。switch to Default mode等选项,因此菜单及数字快捷键扩展为1-4。Closes #325