Restore mid-turn interject feedback + add CodeGraph prompt guidance#2877
Open
Qxy0happy wants to merge 3 commits into
Open
Restore mid-turn interject feedback + add CodeGraph prompt guidance#2877Qxy0happy wants to merge 3 commits into
Qxy0happy wants to merge 3 commits into
Conversation
- Add Taskfile.yml with 9 tasks (default, build, install, vet, fmt, test, hooks, cross, clean, e2e-codegraph) mirroring Makefile targets - Fix Makefile build: add GOEXE variable so -o path correctly appends .exe on Windows (real bash, or PowerShell on a Windows host without bash) - Update README.md, README.zh-CN.md, docs/MIGRATING.md to reflect platform-dependent binary suffix bin/reasonix(.exe)
During a running turn, Enter now queues input instead of ignoring it. When the current turn finishes (TurnDone), any queued interject is automatically submitted as the next turn — restoring the iterative feedback loop from the TS version. The status line shows a '✎ feedback queued' indicator while input is pending.
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR improves the developer UX and runtime chat UX by enabling “interject while running” in the TUI, and by standardizing build workflows/docs (including Windows .exe outputs).
Changes:
- Add a queued “pending interject” mechanism to the chat TUI so Enter during an in-flight turn schedules the next turn.
- Introduce a
Taskfile.ymlwith common build/test/e2e tasks (including pinned CodeGraph e2e flow). - Update build outputs/docs to reflect platform-specific executable extensions.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/config/config.go | Extends the embedded prompt text with CodeGraph tool guidance. |
| internal/cli/chat_tui.go | Adds “pending interject” state and wiring to queue/schedule user input during running turns. |
| docs/MIGRATING.md | Documents .exe output possibility in source build instructions. |
| Taskfile.yml | Adds go-task based workflow including cross-build and CodeGraph e2e task. |
| README.zh-CN.md | Documents .exe output possibility for build artifacts. |
| README.md | Documents .exe output possibility for build artifacts. |
| Makefile | Makes build outputs include platform GOEXE extension. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+823
to
+832
| line := strings.TrimSpace(m.input.Value()) | ||
| if line == "" { | ||
| return m, nil | ||
| } | ||
| m.pendingInterject = line | ||
| m.input.Reset() | ||
| m.input.SetHeight(1) | ||
| m.pastedBlocks = nil | ||
| m.notice("feedback queued — will send when the current turn finishes") | ||
| return m, finalize(m, cmds) |
Comment on lines
+924
to
+928
| if m.pendingInterject != "" { | ||
| interject := m.pendingInterject | ||
| m.pendingInterject = "" | ||
| cmds = append(cmds, m.startTurn(interject, interject, interject)) | ||
| } |
Comment on lines
+92
to
+94
| gh release download {{.CODEGRAPH_VERSION}} -R colbymchenry/codegraph -p "$asset" -O /tmp/$asset | ||
| tar -xzf /tmp/$asset -C "$dest" --strip-components=1 | ||
| REASONIX_CODEGRAPH_E2E=1 REASONIX_CODEGRAPH_BIN=$PWD/$dest/bin/codegraph \ |
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.
变更内容
1. 恢复 turn 运行中的 interject 反馈(主要)
问题: Go 重写后,turn 运行期间按 Enter 直接被忽略(
eturn m, nil\),用户只能等当前 turn 跑完才能输入下一轮反馈。
修复: Enter 在 turn 运行中不再忽略,而是将输入排入 \pendingInterject\ 队列。当前 turn 完成后(TurnDone 事件),队列中的文本自动作为下一轮输入提交。
改动文件: \internal/cli/chat_tui.go\
2. 默认 System Prompt 添加 CodeGraph 引导
在 \DefaultSystemPrompt\ 末尾添加段落,提示模型优先使用 codegraph_* 工具进行 AST 级别的代码理解。