Commit graph

1005 commits

Author SHA1 Message Date
MuriloFP
ef95562dfe fix: ensure MCP server list appears in settings when server starts first
When the MCP server was initialized before opening RooCode, the server list
would not appear in the settings. This was fixed by:

1. Adding proper server list initialization in ClineProvider.ts when the
   webview launches, checking if mcpHub exists and sending its current
   servers to the webview:

   ```typescript
   if (this.mcpHub) {
     this.postMessageToWebview({
       type: "mcpServers",
       mcpServers: this.mcpHub.getServers()
     })
   }
   ```

2. Using the public getServers() method from McpHub instead of relying on
   internal state updates, ensuring consistent server list state across
   the application.

The fix maintains clean separation of concerns and follows existing patterns
for state management between the extension and webview.
2025-02-07 16:57:21 -03:00
MuriloFP
b2b5e1ffa6 fix: Implement singleton pattern for MCP server management to prevent multiple instances
Problem:
- Multiple instances of the Roo Code application were launching separate MCP server instances
- This led to unnecessary resource consumption and potential conflicts between instances

Solution:
1. Created new McpServerManager singleton class to manage MCP server instances:
   - Static getInstance() method ensures only one McpHub instance exists
   - Tracks registered ClineProvider instances
   - Handles cleanup on extension deactivation

2. Modified ClineProvider class:
   - Changed mcpHub from private to protected
   - Added getMcpHub() public getter method
   - Updated initialization to use McpServerManager
   - Added unregister logic in dispose()

3. Updated extension.ts to handle cleanup:
   - Added McpServerManager cleanup in deactivate()

Technical Implementation:
- Uses WeakRef for provider tracking to allow proper garbage collection
- Maintains global state to track instance IDs
- Implements proper cleanup of resources on disposal
- Ensures backward compatibility with existing code

This change significantly improves resource usage and prevents potential conflicts
between multiple instances of the application while maintaining all existing
functionality.
2025-02-07 15:51:30 -03:00
Roo Code
4b3ea07033 Prevent provider client instantiations from throwing 2025-02-07 03:06:01 -08:00
Matt Rubens
8f410b7bbf
Merge pull request #812 from RooVetGit/cte/catch-openai-handler-exception
Don't throw when `openAiBaseUrl` is not a valid URL
2025-02-06 07:42:38 -05:00
cte
e0336b5ad8 Don't throw when openAiBaseUrl is not a valid URL 2025-02-06 01:25:08 -08:00
Sam
a87502e94d
Merge branch 'main' into deepseek_r1_ollama 2025-02-06 16:48:57 +11:00
Matt Rubens
517b5450f2
Merge pull request #807 from samhvw8/feat/terminal-menu-context
feat: add terminal context menu command
2025-02-05 23:41:32 -05:00
sam hoang
679866ca52 add user input 2025-02-06 10:48:34 +07:00
sam hoang
0ceb370008 feat: add terminal integration commands
- Add terminal context menu commands for:
  - Adding terminal content to context
  - Fixing failed commands
  - Explaining commands
- Implement terminal content selection and retrieval
- Add support prompts for terminal actions
- Register terminal action handlers
2025-02-06 10:27:12 +07:00
Sam
f2c96b89c0 fix(r1): ensure r1 works with ollama 2025-02-06 14:21:29 +11:00
Matt Rubens
4a42feca72
Merge pull request #675 from nissa-seru/truncation-updates
Enable separate config for truncation for models without context caching
2025-02-05 15:37:25 -05:00
Matt Rubens
49c21b6c69 Add new gemini models 2025-02-05 12:04:36 -05:00
Nissa Seru
98c8cc9624 Updated sliding window logic to be inverse of trigger criteria 2025-02-05 04:53:21 -05:00
Nissa Seru
5e49421bad Merge https://github.com/RooVetGit/Roo-Code into truncation-updates 2025-02-05 04:49:37 -05:00
Matt Rubens
5297cad5e2 Revert "Merge pull request #764 from RooVetGit/slash_switch_modes"
This reverts commit e3d7f25d26, reversing
changes made to 55e8170369.
2025-02-05 00:09:29 -05:00
Matt Rubens
d145039d72 Safer profile path check 2025-02-04 23:59:36 -05:00
Matt Rubens
97128bc144 Slash commands for switching modes 2025-02-04 01:08:53 -05:00
Matt Rubens
624c449fc1 Improve the prompts for Architect and Ask 2025-02-04 00:34:59 -05:00
Matt Rubens
f9299a98df Merge remote-tracking branch 'origin/main' into fix/api-config-error-when-switch-provider 2025-02-03 23:22:59 -05:00
Matt Rubens
8472ae093a
Merge pull request #728 from nissa-seru/add-command-fixes-from-cline
Add command fixes
2025-02-03 22:41:43 -05:00
Matt Rubens
7e5d78d398 Update snapshots 2025-02-03 22:36:11 -05:00
Matt Rubens
ec3df254a3 Merge remote-tracking branch 'origin/main' into add-command-fixes-from-cline 2025-02-03 22:35:35 -05:00
Chris Estreich
bf7ec3180d
Merge pull request #757 from RooVetGit/cte/hmr-dx
Fall back to js bundle when local webview app not running in development
2025-02-03 12:31:34 -08:00
Matt Rubens
f2d7cbebbe
Merge pull request #753 from RooVetGit/visual_fixes
Slight visual fixes
2025-02-03 15:09:45 -05:00
Matt Rubens
a67ba8326b Fix mock 2025-02-03 13:35:02 -05:00
cte
2ad57ba057 Fall back to js bundle when local webview app not running in development 2025-02-03 09:19:52 -08:00
Matt Rubens
d1971b79f8 Update snapshots 2025-02-03 12:14:07 -05:00
Matt Rubens
55966146b3 Cleaner approach to prompt checkboxes 2025-02-03 10:39:01 -05:00
sam hoang
081faf34a0 update test for test currently fail in upsertApiConfiguration 2025-02-03 12:57:59 +07:00
Nissa Seru
5bec6297f1 Add JSDocs 2025-02-02 03:04:47 -05:00
Nissa Seru
fb3f60703e Merge branch 'main' of https://github.com/RooVetGit/Roo-Code into fix-editorutils 2025-02-02 03:00:25 -05:00
Nissa Seru
3492f79f37 Remove unnecessary variable, add JSDocs 2025-02-02 02:56:30 -05:00
Matt Rubens
fef95e10b8 Fix type 2025-02-02 01:34:45 -05:00
Matt Rubens
6770f0410c Merge remote-tracking branch 'origin/main' into truncation-updates 2025-02-02 01:23:59 -05:00
Matt Rubens
9da39e42e1 Fix conflict 2025-02-02 01:23:45 -05:00
Nissa Seru
e8a5e280b3 Update EditorUtils 2025-02-02 01:03:27 -05:00
Matt Rubens
27976b791c Merge remote-tracking branch 'origin/main' into fix-o3-formatting 2025-02-02 00:53:15 -05:00
Matt Rubens
fb596ff5fa
Merge pull request #724 from nissa-seru/dedupe-levenshtein
use fastest-levenshtein
2025-02-02 00:15:26 -05:00
Nissa Seru
f8b29e718d Add command fixes 2025-02-01 23:25:44 -05:00
Nissa Seru
5a1299c57f use fastest-levenshtein 2025-02-01 22:54:31 -05:00
Nissa Seru
df932935cf Refactor openai-native, prepend string to developer instructions so that o1/o3 will use md 2025-02-01 22:53:54 -05:00
Murilo Pires
26cc335cd3
Merge branch 'RooVetGit:main' into fix-context-calculation 2025-02-01 18:00:41 -03:00
MFPires
70af1d2cb3 fix: update context token calculation to match upstream
The context token calculation has been updated to:
- Include cache tokens (cacheWrites + cacheReads) in the total context size
- Use a cleaner approach to find the last valid API request
- Fix issue where placeholder messages without token info were being counted
- Match upstream's implementation of getTotalTokensFromMessage

This fixes the issue where context size was incorrectly showing as 139 tokens
without any API requests being made.
2025-02-01 17:38:52 -03:00
Matt Rubens
94b831c6ab
Merge pull request #714 from RooVetGit/opened_tabs_and_selection_mentions
Mention shortcuts to open tabs
2025-02-01 12:23:39 -05:00
Matt Rubens
70ad037016 Fix tests 2025-02-01 12:21:13 -05:00
Matt Rubens
1e5a257e52 Removed active selection for now 2025-02-01 11:57:36 -05:00
Chris Estreich
a568577c78
Merge pull request #702 from RooVetGit/cte/activation-cleanup 2025-02-01 08:39:39 -08:00
loup
064dc4e52f feat: opened tabs and selection in the @ menu 2025-02-01 11:16:38 -05:00
Henri Sara
18e1bbf00d fix: Update pricing for OpenAI o1-mini
Together with o3-mini release, OpenAI reduced the price of o1-mini to match it.
2025-02-01 12:06:54 +02:00
Matt Rubens
d047c8beae Add o3-mini-high and o3-mini-low 2025-02-01 00:52:41 -05:00