refactor(coding-agent): privatized the legacy nextToolChoice method to
- Privatized the legacy `nextToolChoice` method to `#nextHardToolChoice` to ensure all tool-choice directives flow through the unified `nextToolChoiceDirective` entry point. - Eliminated redundant dual entry points for fetching tool choices, which previously bypassed the soft pending-preview lifecycle. - Updated test suites to consume `nextToolChoiceDirective` where appropriate to maintain consistency with internal agent-loop logic.
This commit is contained in:
@@ -44,7 +44,7 @@ Runtime behavior:
|
||||
|
||||
- the pending invoker owns the `apply`/`reject` callbacks,
|
||||
- `resolve` dispatches via `peekQueueInvoker() ?? peekPendingInvoker() ?? peekStandingResolveHandler()`,
|
||||
- a genuine hard forced tool choice (queued via `nextToolChoice`) preempts the soft requirement,
|
||||
- a genuine hard forced tool choice (dequeued first by `nextToolChoiceDirective`) preempts the soft requirement,
|
||||
- if an apply callback throws, the helper re-registers the same pending invoker (same id) so the preview can still be discarded or retried.
|
||||
|
||||
`resolve` also checks a standing resolve handler after the invokers; this is used by long-lived approval flows that are not ordinary preview tool calls.
|
||||
|
||||
Reference in New Issue
Block a user