Skip to content

Restore mid-turn interject feedback + add CodeGraph prompt guidance#2877

Open
Qxy0happy wants to merge 3 commits into
esengine:main-v2from
Qxy0happy:feat/interject-feedback
Open

Restore mid-turn interject feedback + add CodeGraph prompt guidance#2877
Qxy0happy wants to merge 3 commits into
esengine:main-v2from
Qxy0happy:feat/interject-feedback

Conversation

@Qxy0happy
Copy link
Copy Markdown
Contributor

变更内容

1. 恢复 turn 运行中的 interject 反馈(主要)

问题: Go 重写后,turn 运行期间按 Enter 直接被忽略(
eturn m, nil\),用户只能等当前 turn 跑完才能输入下一轮反馈。

修复: Enter 在 turn 运行中不再忽略,而是将输入排入 \pendingInterject\ 队列。当前 turn 完成后(TurnDone 事件),队列中的文本自动作为下一轮输入提交。

改动文件: \internal/cli/chat_tui.go\

  • 新增 \pendingInterject string\ 字段
  • Enter 处理:turn 运行中将输入排队,显示 \ eedback queued\ 提示
  • 状态栏:显示 \✎ feedback queued\ 指示器
  • TurnDone:消费 \pendingInterject\ 并自动调用 \startTurn\

2. 默认 System Prompt 添加 CodeGraph 引导

在 \DefaultSystemPrompt\ 末尾添加段落,提示模型优先使用 codegraph_* 工具进行 AST 级别的代码理解。

Qxy0happy added 3 commits June 3, 2026 15:38
- 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.
Copilot AI review requested due to automatic review settings June 3, 2026 08:08
@github-actions github-actions Bot added the v2 Go rewrite (1.x) — main-v2 branch, active development label Jun 3, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.yml with 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 thread internal/cli/chat_tui.go
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 thread internal/cli/chat_tui.go
Comment on lines +924 to +928
if m.pendingInterject != "" {
interject := m.pendingInterject
m.pendingInterject = ""
cmds = append(cmds, m.startTurn(interject, interject, interject))
}
Comment thread Taskfile.yml
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 \
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants