* batch clear history
* catch Task not found error
* fix deleteMultipleTasksWithIds
* add i18n for batch clear history
* add i18n for history
* debug
* remove unused logs
* fix trans
* fix trans
* Cleanup
---------
Co-authored-by: aheizi <aheiz@outlook.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
* fix: clarify PowerShell command completion workaround
The command completion detection approach in PowerShell requires an output
string to allow duplicate commands to execute in some versions of code.
Update the string to explicitly indicate it is a Roo PowerShell workaround,
making it clear in terminal output that this is intentional behavior rather
than a side effect.
Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
* cleanup: improve terminal logging and error handling
No functional changes - purely improves error handling and logging clarity.
Terminal.ts:
- Handle undefined process state in setActiveStream without throwing
- Add terminal IDs to all log messages for better traceability
- Improve error message clarity in shell integration timeout
TerminalRegistry.ts:
- Reorganize shell execution event handlers for better flow
- Log shell execution events before processing for reliable debugging
- Add detailed context to terminal not found scenarios
- Include command and execution state in error messages
Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
* feat: make terminal shell integration timeout configurable
Users with long shell startup times were encountering "Shell Integration Unavailable" errors due to the hard-coded 4s timeout. The timeout is now configurable through Advanced Settings (1-60s).
Thanks @filthy for troubleshooting and @kiwina for suggesting making the timeout configurable.
Fixes#1654
Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
* critical fix: race condition that prevents command completion
Terminal running state is now managed in TerminalRegistry instead of Terminal to prevent race between stream close and shell completion.
While this race may not trigger on current VSCode versions, newer releases with additional terminal fixes may expose the issue. This proactively prevents "Shell execution end event received, but process is not running" errors.
Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
* fix: improve command execution path reporting
Enhance clarity of command execution context and error reporting:
- Check to see if the directory changed because of the command
- Clarify execution path message
- Add explicit message when command exits with non-zero code
Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
* system instructions: clarify terminal directory operations
Clear guidance for the AI system on:
- Working directory constraints
- Path handling requirements
- Tool vs terminal directory behavior
Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
* test: update snapshots for system prompt working directory instructions
Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
---------
Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
Co-authored-by: Eric Wheeler <roo-code@z.ewheeler.org>
Co-authored-by: Chris Estreich <cestreich@gmail.com>
* Add text-to-speech functionality
* Add speed config option to text-to-speech
* Fix test case for tts speed slider
* Fix test case for tts speed slider (really)
* Disabled error message logging in tts.ts
* ignore markdown and mermaid diagrams in TTS
* add ttsEnabled and ttsSpeed to GlobalStateKey
* fix failing webview test for save button
* Translations
* Fix tests
---------
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
This reverts commit 7eee3e0878.
Middle-out truncation is a really great feature and it should still be
implemented, however it unnecessarily interferes with #1365 because it
hooked into the low-level chunk management that comes directly from VSCE
shell integration.
The best place to hook OutputBuilder is as follows depending on the
state of terminal interaction:
1. Foreground terminals:
Cline.ts:
executeCommandTool(...) {
process.on("line", (line) => {
lines.push(line)
...
}
}
2. For background terminals: hook in at the point that getUnretrievedOutput is consumed for active or
inactive terminals in Cline.ts:getEnvironmentDetails()
Please note:
The Terminal classes are very sensitive to change, partially because of
the complicated way that shell integration works with VSCE, and
partially because of the way that Cline interacts with the Terminal*
class abstractions that make VSCE shell integration easier to work with.
At the point that PR#1365 is merged, it is unlikely that any Terminal*
classes will need to be modified substantially. Generally speaking, we
should think of this is a stable interface and minimize changes.
Reverts: #1390
This commit adds a new setting to allow users to disable custom mode creation,
which can help reduce token usage in Roo's prompts.
Key changes:
Add enableCustomModeCreation setting to global state
Conditionally include custom modes documentation in prompt only when enabled
Add UI toggle in PromptsView with explanatory text
Default the setting to enabled (true) for backward compatibility
Update necessary interfaces and message handlers for the new setting
The setting is placed in PromptsView rather than SettingsView since it directly
relates to the modes functionality managed in that component.
- Added delete button with trash icon to MCP server rows
- Implemented confirmation dialog using existing Dialog component
- Added "deleteMcpServer" message type to WebviewMessage interface
- Added handler in ClineProvider to process deletion:
- Removes server from MCP settings file
- Closes server connection
- Updates UI to reflect changes
- Added user feedback with success/error notifications
- Ensured consistent modal design with rest of application
- Add RequestyHandler implementation for API integration
- Add RequestyModelPicker component for model selection
- Update shared types and messages for Requesty support
- Update API options to include Requesty provider
- Add enableMcpServerCreation setting to control whether MCP server creation is allowed
- Add UI toggle in settings view for this feature
- Update system prompt to conditionally include MCP server creation documentation
- Add tests for new functionality
- Add experiments.ts to manage experimental features
- Refactor experimental diff strategy into experiments system
- Add UI components for managing experimental features
- Add tests for experimental tools
- Update system prompts to handle experiments
Implements automatic approval for mode switching operations when enabled, following
existing auto-approval patterns in the codebase.
Implementation:
- Added `alwaysAllowModeSwitch` to state management
- Updated `isAutoApproved` function in ChatView to handle mode switch requests
- Added mode switch option to AutoApproveMenu with appropriate handler
- Integrated with existing auto-approval flow
Tests:
- Added three test cases in ChatView.auto-approve.test.tsx:
1. Verifies mode switch auto-approval when enabled
2. Verifies no auto-approval when mode switch setting is disabled
3. Verifies no auto-approval when global auto-approval is disabled
The implementation follows existing patterns for other auto-approve features
(read, write, browser, etc.) to maintain consistency in the codebase.
- Move code action prompts from core/prompts to shared/support-prompt
- Migrate enhance prompt functionality from modes to support-prompt
- Add UI for managing code action prompts in PromptsView
- Update types and interfaces for better prompt management
- Rename openAiCusModelInfo to openAiCustomModelInfo across all files for better readability
- Update related variable names and references to maintain consistency
- Affects OpenAI provider, ClineProvider, WebviewMessage, API interfaces, and UI components