Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Jan 14, 2026

Closes COM-450

Summary

Replace all user content wrapper tags (<task>, <feedback>, <answer>) with a single unified <user_message> tag to standardize user content handling across the codebase.

Implementation Details

Changes Made

File Changes
processUserContentMentions.ts Simplified shouldProcessMentions() to only detect <user_message>
responses.ts Updated 3 functions: changed <feedback> to <user_message>, removed message field from native protocol JSON
Task.ts Changed initial task wrapper from <task> to <user_message>, simplified continuation wrapper
AttemptCompletionTool.ts Changed <feedback> to <user_message>, removed explanatory blurb
AskFollowupQuestionTool.ts Changed <answer> to <user_message>
ExecuteCommandTool.ts Changed <feedback> to <user_message>, removed explanatory blurb

Test Updates

Breaking Changes

  1. Old task history: Tasks saved before this change that contain <task>, <feedback>, or <answer> tags in their API history will no longer have mentions re-parsed if the task is resumed.

  2. LLM context: For XML protocol, context blurbs are preserved. For native protocol, models no longer receive explicit blurbs in the JSON message field - they must infer context from the status field.

Testing

All unit tests pass successfully. Linting and type checking completed without errors.


View task on Roo Code Cloud


Important

Refactor to unify user content handling by replacing various tags with <user_message> across the codebase, affecting multiple files and tests.

  • Behavior:
    • Replace <task>, <feedback>, <answer> tags with <user_message> in processUserContentMentions.ts, responses.ts, Task.ts, AttemptCompletionTool.ts, AskFollowupQuestionTool.ts, ExecuteCommandTool.ts.
    • Simplify shouldProcessMentions() in processUserContentMentions.ts to detect only <user_message>.
    • Remove message field from native protocol JSON in responses.ts.
  • Tests:
    • Update processUserContentMentions.spec.ts, Task.spec.ts, task-tool-history.spec.ts, readFileTool.spec.ts to use <user_message>.
  • Breaking Changes:
    • Old tasks with <task>, <feedback>, <answer> tags won't re-parse mentions if resumed.
    • Native protocol models must infer context from status field, not message field.

This description was created by Ellipsis for 08570c0. You can customize this summary. It will automatically update as commits are pushed.

@roomote
Copy link
Contributor Author

roomote bot commented Jan 14, 2026

Rooviewer Clock   See task on Roo Cloud

Review completed. No issues found.

This is a clean refactoring PR that unifies user content wrapper tags (<task>, <feedback>, <answer>) to a single <user_message> tag. The changes are consistent across the codebase, tests are appropriately updated, and breaking changes are well-documented.

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

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

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

2 participants