Skip to content

feat(desktop): mid-turn steer injection#3360

Open
JesonChou wants to merge 1 commit into
esengine:main-v2from
JesonChou:fix/mid-turn-steer
Open

feat(desktop): mid-turn steer injection#3360
JesonChou wants to merge 1 commit into
esengine:main-v2from
JesonChou:fix/mid-turn-steer

Conversation

@JesonChou

Copy link
Copy Markdown

Summary

  • Implement mid-turn steer injection with tab-scoped routing, addressing reviewer feedback from feat(desktop): mid-turn steer injection and tool-call details in history #3263 (wire mappings + SteerForTab).
  • Align historyMessagesToItems tool-result lookup with SanitizeToolPairing's turn-scoped pairing: position-aware scan instead of a session-global Map to avoid cross-turn ID collisions with synthesized call_%d IDs.

Changes

Steer (#3263)

  • internal/event/event.go: Steer event kind
  • internal/agent/agent.go: steerQueue + Run-loop injection + persistence
  • internal/control/controller.go: Steer/SteerConsumed
  • desktop/app.go: App.Steer/App.SteerForTab
  • Wire mappings in desktop/wire.go + internal/serve/wire.go with tests
  • Frontend: bindings, runningRef + steer dispatch in handleSend

Tool-result pairing alignment (#3286)

  • useController.ts: global resultByID Map → collectToolResultsAfter
  • internal/serve/index.html: same

Related

Closes #3263

@github-actions github-actions Bot added v2 Go rewrite (1.x) — main-v2 branch, active development desktop Wails desktop app (desktop/**) agent Core agent loop (internal/agent, internal/control) and removed v2 Go rewrite (1.x) — main-v2 branch, active development labels Jun 6, 2026
@JesonChou JesonChou changed the title feat(desktop): mid-turn steer injection and fix cross-turn tool-result pairing feat(desktop): mid-turn steer injection Jun 6, 2026
@github-actions github-actions Bot added the v2 Go rewrite (1.x) — main-v2 branch, active development label Jun 6, 2026
@JesonChou JesonChou changed the title feat(desktop): mid-turn steer injection fix(desktop): mid-turn steer injection Jun 6, 2026
@JesonChou JesonChou changed the title fix(desktop): mid-turn steer injection feat(desktop): mid-turn steer injection Jun 7, 2026
@JesonChou JesonChou force-pushed the fix/mid-turn-steer branch from d558c42 to a9db29a Compare June 9, 2026 15:04
- Add Agent steerQueue + Steer/SteerConsumed/consumeSteer methods
- Consume queued steer each loop iteration, persist to session, emit Steer event
- Defer final-answer return while steer queue has items
- Add event.Steer kind with wire mappings (desktop + serve) and tests
- Add Controller.Steer/SteerConsumed delegation to executor
- Add App.Steer/SteerForTab with per-tab routing
- Add Steer/SteerForTab to frontend AppBindings, mock, and useController
- Add runningRef + steer dispatch in App.tsx handleSend
- Add MCPSurfaceReady gap-fix in wire mappings
@JesonChou JesonChou force-pushed the fix/mid-turn-steer branch from a9db29a to 867debb Compare June 10, 2026 11:27
@JesonChou

JesonChou commented Jun 10, 2026

Copy link
Copy Markdown
Author

@SivanCola @esengine 大佬请审核下,已经根据1.5 rebase过

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent Core agent loop (internal/agent, internal/control) desktop Wails desktop app (desktop/**) v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant