Commit 4aa7d1e
feat(cli): adopt Goal v3 in interactive TUI (#8005)
* feat(cli): adopt Goal v3 in interactive TUI
* fix(cli): restore Goal CI contracts
* fix(cli): stop a queued message from stalling the Goal loop (#8005)
Reserve the next Goal turn only for a user batch the queue will actually
release: peekNextUserBatchKey now mirrors the two-lane drain gate, so an
active Goal turn no longer binds a permit to a held plain message and the
loop keeps running.
Also release the Goal turn binding on the background-capacity early
return, drop a redundant getSteerInput spread, recognise the legacy
/goal clear aliases in interactive mode, and restore the rollback
assertion for loadPausedBackgroundAgents.
* fix(cli): address review feedback on Goal queue and retry hint (#8005)
* fix(cli): restore Goal trust gate and address review feedback (#8005)
* fix(cli): address Goal review feedback on cancel release, icons, claim gate (#8005)
* fix(cli): address Goal review feedback on non-interactive guard, icons, and drain retry (#8005)
* fix(cli): address review feedback on Goal v3 TUI (#8005)
- Strip 'set' keyword before forwarding to legacy path in non-interactive
/goal set, preventing the keyword from leaking into the goal condition
- Add goalTerminalErrorRef to prevent post-stream cleanup from wiping
Goal turn terminal errors
- Add 50-turn continuation budget to Goal runtime, matching the legacy
MAX_GOAL_ITERATIONS cap
- Display verifier rejection status cards (verifier_reject cause)
- Clear stale lastReason when editing a goal objective
* fix(test): align client-goal turn count with continuation budget (#8005)
* fix(cli): address Goal set-clear and delivery-error review feedback (#8005)
Non-interactive `/goal set <clear-keyword>` now sets a literal objective
instead of clearing the active goal, by bypassing the clear-keyword check
for explicit set operations. Goal-turn stream errors now fire
onDeliveryFailed rather than onDelivered by including goalTerminalErrorRef
in the post-stream delivery dispatch.
* fix(cli): rename misleading missingActiveGoalContext variable (#8005)
* fix(cli): stop Goal queue from stranding input and orphaning prompts (#8005)
Only an active Goal turn holds ordinary input now; paused, blocked and
usage_limited states drain the queue normally so a user whose Goal is
merely paused (e.g. via Escape) is never stranded waiting for /goal clear.
A cancelled Goal continuation turn also strips its synthetic "no new real
user input" prompt from the chat history. Previously the auto-restore
branch bailed before its orphan strip ran (Goal turns add no UI user
item), so the preamble survived and appendCuratedContent merged the user's
next real message into it.
* fix(core): address Goal resume-budget and mid-turn clear review feedback (#8005)
Resuming a Goal that exhausted its 50-turn continuation budget was
accepted and reported as `active`, then immediately re-transitioned to
`usage_limited` without running a turn: the resume branch kept the
exhausted `turnCount`, which `queueContinuation` re-checks. Resume now
resets `turnCount` so an explicit resume grants a fresh continuation
budget and the reported outcome matches the settled one.
A mid-turn `/goal clear` with no active Goal was silently swallowed
because its causeless `goal_control` result rendered only when idle. The
handler now renders any causeless result (a `status` read or a no-Goal
`clear`), which never broadcasts and so cannot double-render.
* test(cli): cover Goal tool-batch fail-close guards (#8005)
* fix(core,cli): guard budget-exhaustion identity and pass goalContext to tool-result recording (#8005)
The budget-exhaustion callback in queueContinuation only checked
goal status, not identity. A replace dispatched during the journal
append could create a fresh goal that the stale callback then
incorrectly usage-limited. Capture goalId/revision at enqueue time
and return early on mismatch, matching the existing identity-guard
pattern used by handleStartFailure and recordVerificationOutcome.
The TUI recorded tool results without goalContext, so the evidence
catalog never admitted tool-result records and any Goal whose
objective depended on external state could not be verified. Pass
request.goalContext at both recordToolResult call sites in
useGeminiStream, tagging get_goal/update_goal results as
goal_runtime to match the CoreToolScheduler pattern.
---------
Co-authored-by: qwen-code-dev-bot <269191875+qwen-code-dev-bot@users.noreply.github.com>
Co-authored-by: Shaojin Wen <shaojin.wensj@alibaba-inc.com>
Co-authored-by: Qwen Code Bot <qwen-code-bot@users.noreply.github.com>
Co-authored-by: Qwen Code Autofix <qwen-code-autofix@users.noreply.github.com>
Co-authored-by: qwen-code-dev-bot <qwen-code-dev@service.alibaba.com>
Co-authored-by: qwen-code-dev-bot <qwen-code-dev-bot@users.noreply.github.com>
Co-authored-by: qwen-code-ci-bot <qwen-code-ci-bot@users.noreply.github.com>1 parent 933d78a commit 4aa7d1e
47 files changed
Lines changed: 5629 additions & 1174 deletions
File tree
- packages
- cli/src
- i18n/locales
- ui
- commands
- components
- messages
- hooks
- utils
- core/src
- core
- goals
- tools
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2473 | 2473 | | |
2474 | 2474 | | |
2475 | 2475 | | |
| 2476 | + | |
2476 | 2477 | | |
2477 | 2478 | | |
2478 | 2479 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2010 | 2010 | | |
2011 | 2011 | | |
2012 | 2012 | | |
| 2013 | + | |
2013 | 2014 | | |
2014 | 2015 | | |
2015 | 2016 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2216 | 2216 | | |
2217 | 2217 | | |
2218 | 2218 | | |
| 2219 | + | |
2219 | 2220 | | |
2220 | 2221 | | |
2221 | 2222 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
190 | 197 | | |
191 | 198 | | |
192 | 199 | | |
| |||
0 commit comments