refactor(task): switch to <feedback> wrapper to prevent focus drift after context-management event (condense/truncate) #9237
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.
This PR updates Task.startTask() to send the initial user content wrapped in instead of .
This PR switches the initial wrapper to a with the aim of preventing focus drift after context-management event (condense/truncate). The aim of this the most minimal adjustment to address this drift that is likely caused by the user messages which are structured as follows
This hints to the model to change focus to the "" which only the very first message is wrapped in. Condensing used to condense and remove the first message so this mention of task was seen as more of a general reference to the "task" and not the specific wrapped user input. Since we changed this the original block is much more likely to steal focus and this prevents the session from properly continuing from after the condensing summary as intended.
Why:
Impact:
Important
Refactor
Task.startTask()to use<feedback>instead of<task>to prevent focus drift, updating related tests and maintaining existing functionality.Task.startTask()inTask.tsnow wraps initial user content in<feedback>instead of<task>to prevent focus drift.processUserContentMentions.tsupdated to process<feedback>tags instead of<task>.processUserContentMentions.spec.tsto reflect changes from<task>to<feedback>.Task.spec.tsto ensure task processing aligns with new<feedback>tag usage.<task>and<feedback>are supported.This description was created by
for 7089e11. You can customize this summary. It will automatically update as commits are pushed.