Skip to content

Conversation

@roomote
Copy link
Collaborator

@roomote roomote commented Jul 6, 2025

Problem

The new_task command was not streaming partial messages to the UI like other commands do. When the new_task command writes a lot of instructions to a subtask, the UI appears frozen with no content until all content shows up at once, rather than streaming incrementally.

Root Cause

The issue was in newTaskTool.ts where partial messages were using a message property that doesn't exist in the ClineSayTool interface. The webview expects messages to conform to this interface for proper streaming behavior.

Solution

  • Changed the message property to content in partial messages to match the ClineSayTool interface
  • This makes the partial message format consistent with the complete message format
  • Now the webview can properly handle and stream partial updates

Testing

  • ✅ All existing tests pass
  • ✅ Type checking passes
  • ✅ Linting passes
  • ✅ The fix aligns with how other working tools like writeToFileTool structure their messages

Files Changed

  • src/core/tools/newTaskTool.ts: Fixed partial message property name

This is a minimal, targeted fix that resolves the streaming issue without affecting any other functionality.


Important

Fixes streaming issue in newTaskTool.ts by aligning partial message format with ClineSayTool interface.

  • Behavior:
    • Fixes streaming issue in newTaskTool.ts by changing message to content in partial messages.
    • Aligns partial message format with ClineSayTool interface for proper UI streaming.
  • Testing:
    • All existing tests, type checking, and linting pass.
    • Consistency with other tools like writeToFileTool confirmed.

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

- Changed 'message' property to 'content' in partial messages to match ClineSayTool interface
- This fixes the UI freezing issue where partial messages weren't streaming properly
- The 'message' property doesn't exist in ClineSayTool, causing the webview to not handle partial updates correctly
- Now consistent with other tools like writeToFileTool that use the correct interface properties
@roomote roomote requested review from cte, jr and mrubens as code owners July 6, 2025 13:10
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. bug Something isn't working labels Jul 6, 2025
@delve-auditor
Copy link

delve-auditor bot commented Jul 6, 2025

No security or compliance issues detected. Reviewed everything up to 6982f84.

Security Overview
  • 🔎 Scanned files: 1 changed file(s)
Detected Code Changes
Change Type Relevant files
Bug Fix ► newTaskTool.ts
    Fixed streaming by updating partial message property from 'message' to 'content' to match ClineSayTool interface

Reply to this PR with @delve-auditor followed by a description of what change you want and we'll auto-submit a change to this PR to implement it.

Copy link
Collaborator

@mrubens mrubens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jul 6, 2025
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jul 6, 2025
@mrubens mrubens merged commit 8f216c3 into main Jul 6, 2025
25 checks passed
@mrubens mrubens deleted the fix/new-task-streaming branch July 6, 2025 13:17
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Jul 6, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jul 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants