feat: gate unified user message tag behind experimental setting#10724
Closed
roomote-v0[bot] wants to merge 1 commit intomainfrom
Closed
feat: gate unified user message tag behind experimental setting#10724roomote-v0[bot] wants to merge 1 commit intomainfrom
roomote-v0[bot] wants to merge 1 commit intomainfrom
Conversation
- Add UNIFIED_USER_MESSAGE_TAG experiment (disabled by default) - Create userContentTags utility for conditional tag formatting - Update Task.ts to conditionally wrap task/resume content - Update tool files (AskFollowupQuestion, AttemptCompletion, ExecuteCommand) to conditionally wrap feedback/answers - Update formatResponse functions to accept useUnifiedTag parameter - Update presentAssistantMessage.ts to pass experiment flag - Update ReadFileTool.ts to pass experiment flag - Update processUserContentMentions.ts to detect tags based on experiment When experiment is disabled (default): - Uses legacy tags: <task>, <feedback>, <answer> - Maintains backward compatibility When experiment is enabled: - Uses unified <user_message> tag for all contexts - Simplifies tag detection and handling Relates to COM-450
Contributor
Author
Review complete. Found 1 issue that needs attention:
Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
| import { DiffStrategy, type ToolUse, type ToolParamName, toolParamNames } from "../../shared/tools" | ||
| import { EXPERIMENT_IDS, experiments } from "../../shared/experiments" | ||
| import { getModelMaxOutputTokens } from "../../shared/api" | ||
| import { wrapUserContent } from "../../utils/userContentTags" |
Contributor
Author
There was a problem hiding this comment.
wrapUserContent is imported here but never used in this file. The initial task message in startTask() around line 1867 still uses hardcoded <task> tags (text: \\n${task}\n`) instead of calling this utility. If the experiment flag is enabled, task start messages will still emit rather than<user_message>`, which contradicts the PR description's claim that task start messages are conditionally wrapped.
Fix it with Roo Code or mention @roomote and request a fix.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 gates the unified
<user_message>tag changes (from commit 08570c0) behind an experimental VSCode setting, allowing users to opt-in while maintaining backward compatibility.Changes
New Experimental Setting:
UNIFIED_USER_MESSAGE_TAGexperiment (disabled by default)<task>,<feedback>,<answer><user_message>tag for all user content contextsImplementation:
userContentTags.tsutility module with helper functions for conditional tag formattingTask.tsto conditionally wrap task start and resume messagesAskFollowupQuestionTool.ts,AttemptCompletionTool.ts,ExecuteCommandTool.ts) to conditionally wrap feedback/answersformatResponsefunctions to acceptuseUnifiedTagparameterpresentAssistantMessage.tsto pass experiment flagReadFileTool.tsto pass experiment flagprocessUserContentMentions.tsto detect tags based on experiment settingTesting
View task on Roo Code Cloud
Important
Introduces
UNIFIED_USER_MESSAGE_TAGexperiment to toggle between unified and legacy user message tags, affecting multiple files and ensuring backward compatibility.UNIFIED_USER_MESSAGE_TAGexperiment to toggle between unified<user_message>and legacy tags (<task>,<feedback>,<answer>).userContentTags.tsfor tag handling functions likewrapUserContent()andhasUserContentTags().Task.ts,AskFollowupQuestionTool.ts,AttemptCompletionTool.ts,ExecuteCommandTool.ts, andReadFileTool.tsto conditionally use unified tags based on experiment setting.formatResponsefunctions inresponses.tsto acceptuseUnifiedTagparameter.UNIFIED_USER_MESSAGE_TAGtoexperiment.tsandexperiments.tswith default disabled state.This description was created by
for f8f631d. You can customize this summary. It will automatically update as commits are pushed.
Closes #10658
(from Linear COM-450)