Skip to content

Conversation

@NaccOll
Copy link
Contributor

@NaccOll NaccOll commented Aug 4, 2025

Related GitHub Issue

Closes: #6082

Roo Code Task Context (Optional)

Description

This tool provides a pure chat mode that a toolless variant of the ASK mode.

It has two advantages:

  1. It saves tokens
  2. It leaves the entire process under user control and still integrates with VS Code for easy contextual addition.

Test Procedure

Just switch to onlychat

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • Self-Review: I have performed a thorough self-review of my code.
  • Testing: New and/or updated tests have been added to cover my changes (if applicable).
  • Documentation Impact: I have considered if my changes require documentation updates (see "Documentation Updates" section below).
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Screenshots / Videos

image image image

Documentation Updates

Additional Notes

Get in Touch


Important

Introduces onlychat mode as a chat-only mode without tool execution, updating system prompts and task handling to accommodate this mode.

  • Behavior:
    • Adds onlychat mode to mode.ts as a chat-only mode without tool execution capabilities.
    • In Task.ts, modifies task loop to break if onlychat mode is active, preventing tool actions.
  • System Prompt:
    • Updates system.ts to handle onlychat mode by excluding tool sections in prompts.
    • In system-prompt.spec.ts, adds test to verify onlychat mode returns only roleDefinition and customInstructions.
  • Misc:
    • Filters out onlychat mode from mode listings in modes.ts and sections/modes.ts.

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

@NaccOll NaccOll requested review from cte, jr and mrubens as code owners August 4, 2025 01:20
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. enhancement New feature or request labels Aug 4, 2025
Copy link
Contributor

@roomote roomote bot left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution! I've reviewed the changes and found several issues that need attention before this can be merged.

@NaccOll NaccOll force-pushed the feature/only-chat branch from d3d3799 to 979b640 Compare August 4, 2025 03:50
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Aug 4, 2025
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Aug 4, 2025
@daniel-lxs daniel-lxs moved this from Triage to PR [Needs Prelim Review] in Roo Code Roadmap Aug 5, 2025
@hannesrudolph hannesrudolph added PR - Needs Preliminary Review and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Aug 5, 2025

const block = cloneDeep(cline.assistantMessageContent[cline.currentStreamingContentIndex]) // need to create copy bc while stream is updating the array, it could be updating the reference block properties too

// If block is partial, remove partial closing tag so its not
Copy link
Member

@daniel-lxs daniel-lxs Aug 11, 2025

Choose a reason for hiding this comment

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

Are these changes related to the fact that this chat mode doesn't have access to any tools?

Should we setup the infrastructure to allow modes to enable/disable tools, maybe initially in the custom modes settings file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removeClosingTag is required by attemptCompletionTool, so I had to relocate it.

If every AI response isn't treated as a task completion, the next message won't be sent, the model won't switch, and a host of other issues will arise. Because the event loop requires the AI to call tools, and all tools have already been removed, we need to simulate the tool call behavior.

@daniel-lxs daniel-lxs moved this from PR [Needs Prelim Review] to PR [Changes Requested] in Roo Code Roadmap Aug 11, 2025
@NaccOll
Copy link
Contributor Author

NaccOll commented Aug 11, 2025

@daniel-lxs

Allowing mode enable/disable tools, that’s even better. My implementation only supports a fixed slug mode, which isn’t ideal for users who want to customize role definitions and instructions for different scenarios.

But this involves more complex issues.

onlychat is designed purely for chat. Rather than disabling tools, it’s more about disabling the system prompt. It also removes itself from the switch mode and treats every AI response as a signal that the task is complete.

The function can be kept within the scope of the current PR if "allow modes to enable/disable tools" means allowing each mode to control whether the system prompt is generated—making it a more versatile enhancement.

If "enable/disable tools" only refers to controlling tools, the other parts remain intact—but users don’t actually need that. They just want to leverage RooCode’s integration with VSCode to easily reference file contents.

Furthermore, "enable/disable tools" raises another question: should all tools share a single toggle, or should each tool have its own independent switch? (#5964)

@daniel-lxs
Copy link
Member

Alright, I will take a look at this PR again with that in mind, also I don't think we should call this mode OnlyChat lol

@NaccOll
Copy link
Contributor Author

NaccOll commented Aug 11, 2025

@daniel-lxs There was a problem with my answer about removeClosingTag just now. I replied again.

removeClosingTag is required by attemptCompletionTool, so I had to relocate it.

If every AI response isn't treated as a task completion, the next message won't be sent, the model won't switch, and a host of other issues will arise. Because the event loop requires the AI to call tools, and all tools have already been removed, we need to simulate the tool call behavior.

@mechanicmuthu
Copy link

Actual this hits at the core of Always available tools. Custom modes shall have more control over available tools. The always available tools can be reduced even further to reduce the system messages. This granular tool enable / disable along with enable/disable modes (in my draft PR) will provide all possible flexibility that can be needed to anyone. #7110

@NaccOll
Copy link
Contributor Author

NaccOll commented Aug 16, 2025

There's more to it than just this. Supporting chat-only mode in any mode involves many aspects.

  1. Tool selectability
  2. Mode availability
  3. Mandatory tool calls in loops
  4. Disabling other system props

This PR only implements 3 and 4 in a specific mode.

@hannesrudolph
Copy link
Collaborator

Overall the idea is good, but the implementation is confusing. It makes this mode behave very differently from the others, and I don’t see how a user would even notice it. Since this is more of a supplementary feature and doesn’t directly help with coding, I’m closing this PR. I don’t have a better approach to suggest.

@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Aug 21, 2025
@github-project-automation github-project-automation bot moved this from PR [Changes Requested] to Done in Roo Code Roadmap Aug 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request PR - Changes Requested size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants