diff --git a/.changeset/v3.25.3.md b/.changeset/v3.25.3.md deleted file mode 100644 index d0d891b694..0000000000 --- a/.changeset/v3.25.3.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -"roo-cline": patch ---- - -- Fix: Prevent input clearing when clicking chat buttons (thanks @hassoncs!) -- Increase Claude Code default max output tokens to 16k (#6125 by @bpeterson1991, PR by @app/roomote) -- Update PR reviewer rules and mode configuration (thanks @daniel-lxs!) -- Add translation check action to pull_request.opened event (thanks @app/roomote!) -- Add docs link for slash commands -- Allow queueing images -- Hide Gemini checkboxes on the welcome view -- Remove "(prev Roo Cline)" from extension title in all languages (thanks @app/roomote!) -- Remove event types mention from PR reviewer rules (thanks @daniel-lxs!) -- Clarify apply_diff tool descriptions to emphasize surgical edits diff --git a/.dockerignore b/.dockerignore index 514136ac91..6359978833 100644 --- a/.dockerignore +++ b/.dockerignore @@ -80,7 +80,6 @@ src/node_modules !webview-ui/ !packages/evals/.docker/entrypoints/runner.sh !packages/build/ -!packages/cloud/ !packages/config-eslint/ !packages/config-typescript/ !packages/evals/ diff --git a/.env.sample b/.env.sample index d89ef72792..aebe5cca44 100644 --- a/.env.sample +++ b/.env.sample @@ -3,3 +3,4 @@ POSTHOG_API_KEY=key-goes-here # Roo Code Cloud / Local Development CLERK_BASE_URL=https://epic-chamois-85.clerk.accounts.dev ROO_CODE_API_URL=http://localhost:3000 +ROO_CODE_PROVIDER_URL=http://localhost:8080/proxy/v1 diff --git a/.gitattributes b/.gitattributes index 284eab4f98..e9e36432cd 100644 --- a/.gitattributes +++ b/.gitattributes @@ -6,6 +6,11 @@ src/assets/docs/demo.gif filter=lfs diff=lfs merge=lfs -text *.snap linguist-generated=true # Non-English translation files - mark as linguist-generated to exclude from GitHub language statistics +# Package NLS files - mark non-English ones as generated +src/package.nls.*.json linguist-generated=true +# Exclude the base English file from being marked as generated +src/package.nls.json linguist-generated=false + # Root locales directory (contains only non-English translations) locales/** linguist-generated=true diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 44626273b5..c659eb80eb 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -25,6 +25,8 @@ body: - AWS Bedrock - Chutes AI - DeepSeek + - Featherless AI + - Fireworks AI - Glama - Google Gemini - Google Vertex AI @@ -38,6 +40,7 @@ body: - OpenAI Compatible - OpenRouter - Requesty + - SambaNova - Unbound - VS Code Language Model API - xAI (Grok) diff --git a/.github/workflows/update-contributors.yml b/.github/workflows/update-contributors.yml index d04f7b86d8..c3c9327607 100644 --- a/.github/workflows/update-contributors.yml +++ b/.github/workflows/update-contributors.yml @@ -24,7 +24,7 @@ jobs: - name: Update contributors and format run: | pnpm update-contributors - npx prettier --write README.md + npx prettier --write README.md locales/*/README.md if git diff --quiet; then echo "changes=false" >> $GITHUB_OUTPUT; else echo "changes=true" >> $GITHUB_OUTPUT; fi id: check-changes env: diff --git a/.roo/commands/release.md b/.roo/commands/release.md index ec54b804d1..702c5ba892 100644 --- a/.roo/commands/release.md +++ b/.roo/commands/release.md @@ -4,7 +4,7 @@ argument-hint: patch | minor | major --- 1. Identify the SHA corresponding to the most recent release using GitHub CLI: `gh release view --json tagName,targetCommitish,publishedAt` -2. Analyze changes since the last release using: `gh pr list --state merged --json number,title,author,url,mergedAt,closingIssuesReferences --limit 1000 -q '[.[] | select(.mergedAt > "TIMESTAMP") | {number, title, author: .author.login, url, mergedAt, issues: .closingIssuesReferences}] | sort_by(.number)'` +2. Analyze changes since the last release using: `gh pr list --state merged --base main --json number,title,author,url,mergedAt,closingIssuesReferences --limit 1000 -q '[.[] | select(.mergedAt > "TIMESTAMP") | {number, title, author: .author.login, url, mergedAt, issues: .closingIssuesReferences}] | sort_by(.number)'` 3. For each PR with linked issues, fetch the issue details to get the issue reporter: `gh issue view ISSUE_NUMBER --json number,author -q '{number, reporter: .author.login}'` 4. Summarize the changes. If the user did not specify, ask them whether this should be a major, minor, or patch release. 5. Create a changeset in .changeset/v[version].md instead of directly modifying package.json. The format is: diff --git a/.roo/roomotes.yml b/.roo/roomotes.yml index af0cd85b40..33f6b3bd57 100644 --- a/.roo/roomotes.yml +++ b/.roo/roomotes.yml @@ -20,14 +20,6 @@ github_events: - event: pull_request.opened action: name: github.pr.review - - event: pull_request.opened - action: - name: general.task - prompt: | - 1. Run the script `node scripts/find-missing-translations.js` and carefully review its output for any missing translations. - 2. If the script reports missing translations, switch into `translate` mode and add them in all supported languages. - 3. If you've added new translations, commit and push them to the existing PR. - 4. If you get a permission error trying to push to the PR just give up (i.e don't create a new PR instead). - event: pull_request_review_comment.created action: name: github.pr.comment.respond diff --git a/.roo/rules-issue-fixer/1_Workflow.xml b/.roo/rules-issue-fixer/1_Workflow.xml index 91682de658..8aa595cde7 100644 --- a/.roo/rules-issue-fixer/1_Workflow.xml +++ b/.roo/rules-issue-fixer/1_Workflow.xml @@ -273,6 +273,13 @@ - [Note any technical terms or constraints] Please ensure all translations maintain consistency with existing terminology and follow the project's localization guidelines. + +[ ] Identify all user-facing strings that need translation +[ ] Update i18n JSON files for all supported languages +[ ] Translate any markdown documentation files +[ ] Verify translations maintain consistency with existing terminology +[ ] Test translations in the application context + Wait for the translation task to complete before proceeding to testing. diff --git a/.roo/rules-issue-fixer/2_best_practices.xml b/.roo/rules-issue-fixer/2_best_practices.xml index dede40a92f..81a06fe94a 100644 --- a/.roo/rules-issue-fixer/2_best_practices.xml +++ b/.roo/rules-issue-fixer/2_best_practices.xml @@ -14,5 +14,6 @@ - Check for accessibility issues (for UI changes) - Delegate translation tasks to translate mode when implementing user-facing changes - Always check for hard-coded strings and internationalization needs + - When using new_task to delegate work, always include a comprehensive todos list - Wait for translation completion before proceeding to final testing \ No newline at end of file diff --git a/.roo/rules/rules.md b/.roo/rules/rules.md index 2323f03354..5726770a28 100644 --- a/.roo/rules/rules.md +++ b/.roo/rules/rules.md @@ -4,7 +4,7 @@ - Before attempting completion, always make sure that any code changes have test coverage - Ensure all tests pass before submitting changes - - The vitest framework is used for testing; the `describe`, `test`, `it`, etc functions are defined by default in `tsconfig.json` and therefore don't need to be imported + - The vitest framework is used for testing; the `vi`, `describe`, `test`, `it`, etc functions are defined by default in `tsconfig.json` and therefore don't need to be imported from `vitest` - Tests must be run from the same directory as the `package.json` file that specifies `vitest` in `devDependencies` - Run tests with: `npx vitest run ` - Do NOT run tests from project root - this causes "vitest: command not found" error @@ -18,6 +18,7 @@ - Never disable any lint rules without explicit user approval 3. Styling Guidelines: + - Use Tailwind CSS classes instead of inline style objects for new markup - VSCode CSS variables must be added to webview-ui/src/index.css before using them in Tailwind classes - Example: `
` instead of style objects diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b7d1e984c..c75bb9e327 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,206 @@ # Roo Code Changelog +## [3.25.23] - 2025-08-22 + +- feat: add custom base URL support for Requesty provider (thanks @requesty-JohnCosta27!) +- feat: add DeepSeek V3.1 model to Chutes AI provider (#7294 by @dmarkey, PR by @app/roomote) +- Revert "feat: enable loading Roo modes from multiple files in .roo/modes directory" temporarily to fix a bug with mode installation + +## [3.25.22] - 2025-08-22 + +- Add prompt caching support for Kimi K2 on Groq (thanks @daniel-lxs and @benank!) +- Add documentation links for global custom instructions in UI (thanks @app/roomote!) + +## [3.25.21] - 2025-08-21 + +- Ensure subtask results are provided to GPT-5 in OpenAI Responses API +- Promote the experimental AssistantMessageParser to the default parser +- Update DeepSeek models context window to 128k (thanks @JuanPerezReal) +- Enable grounding features for Vertex AI (thanks @anguslees) +- Allow orchestrator to pass TODO lists to subtasks +- Improved MDM handling +- Handle nullish token values in ContextCondenseRow to prevent UI crash (thanks @s97712) +- Improved context window error handling for OpenAI and other providers +- Add "installed" filter to Roo Marketplace (thanks @semidark) +- Improve filesystem access checks (thanks @elianiva) +- Support for loading Roo modes from multiple YAML files in the `.roo/modes/` directory (thanks @farazoman) +- Add Featherless provider (thanks @DarinVerheijke) + +## [3.25.20] - 2025-08-19 + +- Add announcement for Sonic model + +## [3.25.19] - 2025-08-19 + +- Fix issue where new users couldn't select the Roo Code Cloud provider (thanks @daniel-lxs!) + +## [3.25.18] - 2025-08-19 + +- Add new stealth Sonic model through the Roo Code Cloud provider +- Fix: respect enableReasoningEffort setting when determining reasoning usage (#7048 by @ikbencasdoei, PR by @app/roomote) +- Fix: prevent duplicate LM Studio models with case-insensitive deduplication (#6954 by @fbuechler, PR by @daniel-lxs) +- Feat: simplify ask_followup_question prompt documentation (thanks @daniel-lxs!) +- Feat: simple read_file tool for single-file-only models (thanks @daniel-lxs!) +- Fix: Add missing zaiApiKey and doubaoApiKey to SECRET_STATE_KEYS (#7082 by @app/roomote) +- Feat: Add new models and update configurations for vscode-lm (thanks @NaccOll!) + +## [3.25.17] - 2025-08-17 + +- Fix: Resolve terminal reuse logic issues + +## [3.25.16] - 2025-08-16 + +- Add support for OpenAI gpt-5-chat-latest model (#7057 by @PeterDaveHello, PR by @app/roomote) +- Fix: Use native Ollama API instead of OpenAI compatibility layer (#7070 by @LivioGama, PR by @daniel-lxs) +- Fix: Prevent XML entity decoding in diff tools (#7107 by @indiesewell, PR by @app/roomote) +- Fix: Add type check before calling .match() on diffItem.content (#6905 by @pwilkin, PR by @app/roomote) +- Refactor task execution system: improve call stack management (thanks @catrielmuller!) +- Fix: Enable save button for provider dropdown and checkbox changes (thanks @daniel-lxs!) +- Add an API for resuming tasks by ID (thanks @mrubens!) +- Emit event when a task ask requires interaction (thanks @cte!) +- Make enhance with task history default to true (thanks @liwilliam2021!) +- Fix: Use cline.cwd as primary source for workspace path in codebaseSearchTool (thanks @NaccOll!) +- Hotfix multiple folder workspace checkpoint (thanks @NaccOll!) + +## [3.25.15] - 2025-08-14 + +- Fix: Remove 500-message limit to prevent scrollbar jumping in long conversations (#7052, #7063 by @daniel-lxs, PR by @app/roomote) +- Fix: Reset condensing state when switching tasks (#6919 by @f14XuanLv, PR by @f14XuanLv) +- Fix: Implement sitemap generation in TypeScript and remove XML file (#5231 by @abumalick, PR by @abumalick) +- Fix: allowedMaxRequests and allowedMaxCost values not showing in the settings UI (thanks @chrarnoldus!) + +## [3.25.14] - 2025-08-13 + +- Fix: Only include verbosity parameter for models that support it (#7054 by @eastonmeth, PR by @app/roomote) +- Fix: AWS Bedrock 1M context - Move anthropic_beta to additionalModelRequestFields (thanks @daniel-lxs!) +- Fix: Make cancelling requests more responsive by reverting recent changes + +## [3.25.13] - 2025-08-12 + +- Add Sonnet 1M context checkbox to Bedrock +- Fix: add --no-messages flag to ripgrep to suppress file access errors (#6756 by @R-omk, PR by @app/roomote) +- Add support for AGENT.md alongside AGENTS.md (#6912 by @Brendan-Z, PR by @app/roomote) +- Remove deprecated GPT-4.5 Preview model (thanks @PeterDaveHello!) + +## [3.25.12] - 2025-08-12 + +- Update: Claude Sonnet 4 context window configurable to 1 million tokens in Anthropic provider (thanks @daniel-lxs!) +- Add: Minimal reasoning support to OpenRouter (thanks @daniel-lxs!) +- Fix: Add configurable API request timeout for local providers (#6521 by @dabockster, PR by @app/roomote) +- Fix: Add --no-sandbox flag to browser launch options (#6632 by @QuinsZouls, PR by @QuinsZouls) +- Fix: Ensure JSON files respect .rooignore during indexing (#6690 by @evermoving, PR by @app/roomote) +- Add: New Chutes provider models (#6698 by @fstandhartinger, PR by @app/roomote) +- Add: OpenAI gpt-oss models to Amazon Bedrock dropdown (#6752 by @josh-clanton-powerschool, PR by @app/roomote) +- Fix: Correct tool repetition detector to not block first tool call when limit is 1 (#6834 by @NaccOll, PR by @app/roomote) +- Fix: Improve checkpoint service initialization handling (thanks @NaccOll!) +- Update: Improve zh-TW Traditional Chinese locale (thanks @PeterDaveHello!) +- Add: Task expand and collapse translations (thanks @app/roomote!) +- Update: Exclude GPT-5 models from 20% context window output token cap (thanks @app/roomote!) +- Fix: Truncate long model names in model selector to prevent overflow (thanks @app/roomote!) +- Add: Requesty base url support (thanks @requesty-JohnCosta27!) + +## [3.25.11] - 2025-08-11 + +- Add: Native OpenAI provider support for Codex Mini model (#5386 by @KJ7LNW, PR by @daniel-lxs) +- Add: IO Intelligence Provider support (thanks @ertan2002!) +- Fix: MCP startup issues and remove refresh notifications (thanks @hannesrudolph!) +- Fix: Improvements to GPT-5 OpenAI provider configuration (thanks @hannesrudolph!) +- Fix: Clarify codebase_search path parameter as optional and improve tool descriptions (thanks @app/roomote!) +- Fix: Bedrock provider workaround for LiteLLM passthrough issues (thanks @jr!) +- Fix: Token usage and cost being underreported on cancelled requests (thanks @chrarnoldus!) + +## [3.25.10] - 2025-08-07 + +- Add support for GPT-5 (thanks Cline and @app/roomote!) +- Fix: Use CDATA sections in XML examples to prevent parser errors (#4852 by @hannesrudolph, PR by @hannesrudolph) +- Fix: Add missing MCP error translation keys (thanks @app/roomote!) + +## [3.25.9] - 2025-08-07 + +- Fix: Resolve rounding issue with max tokens (#6806 by @markp018, PR by @mrubens) +- Add support for GLM-4.5 and OpenAI gpt-oss models in Fireworks provider (#6753 by @alexfarlander, PR by @app/roomote) +- Improve UX by focusing chat input when clicking plus button in extension menu (thanks @app/roomote!) + +## [3.25.8] - 2025-08-06 + +- Fix: Prevent disabled MCP servers from starting processes and show correct status (#6036 by @hannesrudolph, PR by @app/roomote) +- Fix: Handle current directory path "." correctly in codebase_search tool (#6514 by @hannesrudolph, PR by @app/roomote) +- Fix: Trim whitespace from OpenAI base URL to fix model detection (#6559 by @vauhochzett, PR by @app/roomote) +- Feat: Reduce Gemini 2.5 Pro minimum thinking budget to 128 (thanks @app/roomote!) +- Fix: Improve handling of net::ERR_ABORTED errors in URL fetching (#6632 by @QuinsZouls, PR by @app/roomote) +- Fix: Recover from error state when Qdrant becomes available (#6660 by @hannesrudolph, PR by @app/roomote) +- Fix: Resolve memory leak in ChatView virtual scrolling implementation (thanks @xyOz-dev!) +- Add: Swift files to fallback list (#5857 by @niteshbalusu11, #6555 by @sealad886, PR by @niteshbalusu11) +- Feat: Clamp default model max tokens to 20% of context window (thanks @mrubens!) + +## [3.25.7] - 2025-08-05 + +- Add support for Claude Opus 4.1 +- Add Fireworks AI provider (#6653 by @ershang-fireworks, PR by @ershang-fireworks) +- Add Z AI provider (thanks @jues!) +- Add Groq support for GPT-OSS +- Add Cerebras support for GPT-OSS +- Add code indexing support for multiple folders similar to task history (#6197 by @NaccOll, PR by @NaccOll) +- Make mode selection dropdowns responsive (#6423 by @AyazKaan, PR by @AyazKaan) +- Redesigned task header and task history (thanks @brunobergher!) +- Fix checkpoints timing and ensure checkpoints work properly (#4827 by @mrubens, PR by @NaccOll) +- Fix empty mode names from being saved (#5766 by @kfxmvp, PR by @app/roomote) +- Fix MCP server creation when setting is disabled (#6607 by @characharm, PR by @app/roomote) +- Update highlight layer style and align to textarea (#6647 by @NaccOll, PR by @NaccOll) +- Fix UI for approving chained commands +- Use assistantMessageParser class instead of parseAssistantMessage (#5340 by @qdaxb, PR by @qdaxb) +- Conditionally include reminder section based on todo list config (thanks @NaccOll!) +- Task and TaskProvider event emitter cleanup with new events (thanks @cte!) + +## [3.25.6] - 2025-08-01 + +- Set horizon-beta model max tokens to 32k for OpenRouter (requested by @hannesrudolph, PR by @app/roomote) +- Add support for syncing provider profiles from the cloud + +## [3.25.5] - 2025-08-01 + +- Fix: Improve Claude Code ENOENT error handling with installation guidance (#5866 by @JamieJ1, PR by @app/roomote) +- Fix: LM Studio model context length (#5075 by @Angular-Angel, PR by @pwilkin) +- Fix: VB.NET indexing by implementing fallback chunking system (#6420 by @JensvanZutphen, PR by @daniel-lxs) +- Add auto-approved cost limits (thanks @hassoncs!) +- Add Cerebras as a provider (thanks @kevint-cerebras!) +- Add Qwen 3 Coder from Cerebras (thanks @kevint-cerebras!) +- Fix: Handle Qdrant deletion errors gracefully to prevent indexing interruption (thanks @daniel-lxs!) +- Fix: Restore message sending when clicking save button (thanks @daniel-lxs!) +- Fix: Linter not applied to locales/\*/README.md (thanks @liwilliam2021!) +- Handle more variations of chaining and subshell command validation +- More tolerant search/replace match +- Clean up the auto-approve UI (thanks @mrubens!) +- Skip interpolation for non-existent slash commands (thanks @app/roomote!) + +## [3.25.4] - 2025-07-30 + +- feat: add SambaNova provider integration (#6077 by @snova-jorgep, PR by @snova-jorgep) +- feat: add Doubao provider integration (thanks @AntiMoron!) +- feat: set horizon-alpha model max tokens to 32k for OpenRouter (thanks @app/roomote!) +- feat: add zai-org/GLM-4.5-FP8 model to Chutes AI provider (#6440 by @leakless21, PR by @app/roomote) +- feat: add symlink support for AGENTS.md file loading (thanks @app/roomote!) +- feat: optionally add task history context to prompt enhancement (thanks @liwilliam2021!) +- fix: remove misleading task resumption message (#5850 by @KJ7LNW, PR by @KJ7LNW) +- feat: add pattern to support Databricks /invocations endpoints (thanks @adambrand!) +- fix: resolve navigator global error by updating mammoth and bluebird dependencies (#6356 by @hishtadlut, PR by @app/roomote) +- feat: enhance token counting by extracting text from messages using VSCode LM API (#6112 by @sebinseban, PR by @NaccOll) +- feat: auto-refresh marketplace data when organization settings change (thanks @app/roomote!) +- fix: kill button for execute_command tool (thanks @daniel-lxs!) + +## [3.25.3] - 2025-07-30 + +- Allow queueing messages with images +- Increase Claude Code default max output tokens to 16k (#6125 by @bpeterson1991, PR by @app/roomote) +- Add docs link for slash commands +- Hide Gemini checkboxes on the welcome view +- Clarify apply_diff tool descriptions to emphasize surgical edits +- Fix: Prevent input clearing when clicking chat buttons (thanks @hassoncs!) +- Update PR reviewer rules and mode configuration (thanks @daniel-lxs!) +- Add translation check action to pull_request.opened event (thanks @app/roomote!) +- Remove "(prev Roo Cline)" from extension title in all languages (thanks @app/roomote!) +- Remove event types mention from PR reviewer rules (thanks @daniel-lxs!) + ## [3.25.2] - 2025-07-29 - Fix: Show diff view before approval when background edits are disabled (thanks @daniel-lxs!) diff --git a/PRIVACY.md b/PRIVACY.md index 306d52f059..2385fc27b9 100644 --- a/PRIVACY.md +++ b/PRIVACY.md @@ -1,14 +1,14 @@ # Roo Code Privacy Policy -**Last Updated: June 10th, 2025** +**Last Updated: August 20th, 2025** Roo Code respects your privacy and is committed to transparency about how we handle your data. Below is a simple breakdown of where key pieces of data go—and, importantly, where they don’t. ### **Where Your Data Goes (And Where It Doesn’t)** -- **Code & Files**: Roo Code accesses files on your local machine when needed for AI-assisted features. When you send commands to Roo Code, relevant files may be transmitted to your chosen AI model provider (e.g., OpenAI, Anthropic, OpenRouter) to generate responses. We do not have access to this data, but AI providers may store it per their privacy policies. +- **Code & Files**: Roo Code accesses files on your local machine when needed for AI-assisted features. When you send commands to Roo Code, relevant files may be transmitted to your chosen AI model provider (e.g., OpenAI, Anthropic, OpenRouter) to generate responses. If you select Roo Code Cloud as the model provider (proxy mode), your code may transit Roo Code servers only to forward it to the upstream provider. We do not store your code; it is deleted immediately after forwarding. Otherwise, your code is sent directly to the provider. AI providers may store data per their privacy policies. - **Commands**: Any commands executed through Roo Code happen on your local environment. However, when you use AI-powered features, the relevant code and context from your commands may be transmitted to your chosen AI model provider (e.g., OpenAI, Anthropic, OpenRouter) to generate responses. We do not have access to or store this data, but AI providers may process it per their privacy policies. -- **Prompts & AI Requests**: When you use AI-powered features, your prompts and relevant project context are sent to your chosen AI model provider (e.g., OpenAI, Anthropic, OpenRouter) to generate responses. We do not store or process this data. These AI providers have their own privacy policies and may store data per their terms of service. +- **Prompts & AI Requests**: When you use AI-powered features, your prompts and relevant project context are sent to your chosen AI model provider (e.g., OpenAI, Anthropic, OpenRouter) to generate responses. We do not store or process this data. These AI providers have their own privacy policies and may store data per their terms of service. If you choose Roo Code Cloud as the provider (proxy mode), prompts may transit Roo Code servers only to forward them to the upstream model and are not stored. - **API Keys & Credentials**: If you enter an API key (e.g., to connect an AI model), it is stored locally on your device and never sent to us or any third party, except the provider you have chosen. - **Telemetry (Usage Data)**: We only collect feature usage and error data if you explicitly opt-in. This telemetry is powered by PostHog and helps us understand feature usage to improve Roo Code. This includes your VS Code machine ID and feature usage patterns and exception reports. We do **not** collect personally identifiable information, your code, or AI prompts. - **Marketplace Requests**: When you browse or search the Marketplace for Model Configuration Profiles (MCPs) or Custom Modes, Roo Code makes a secure API call to Roo Code’s backend servers to retrieve listing information. These requests send only the query parameters (e.g., extension version, search term) necessary to fulfill the request and do not include your code, prompts, or personally identifiable information. diff --git a/README.md b/README.md index f4441dc8a6..2f3a6069d9 100644 --- a/README.md +++ b/README.md @@ -208,45 +208,47 @@ Thanks to all our contributors who have helped make Roo Code better! -| mrubens
mrubens
| saoudrizwan
saoudrizwan
| cte
cte
| daniel-lxs
daniel-lxs
| samhvw8
samhvw8
| hannesrudolph
hannesrudolph
| -| :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | -| KJ7LNW
KJ7LNW
| a8trejo
a8trejo
| MuriloFP
MuriloFP
| ColemanRoo
ColemanRoo
| canrobins13
canrobins13
| stea9499
stea9499
| -| joemanley201
joemanley201
| System233
System233
| jr
jr
| nissa-seru
nissa-seru
| jquanton
jquanton
| roomote-agent
roomote-agent
| -| NyxJae
NyxJae
| d-oit
d-oit
| elianiva
elianiva
| qdaxb
qdaxb
| punkpeye
punkpeye
| wkordalski
wkordalski
| -| SannidhyaSah
SannidhyaSah
| xyOz-dev
xyOz-dev
| chrarnoldus
chrarnoldus
| sachasayan
sachasayan
| Smartsheet-JB-Brown
Smartsheet-JB-Brown
| monotykamary
monotykamary
| -| cannuri
cannuri
| feifei325
feifei325
| zhangtony239
zhangtony239
| shariqriazz
shariqriazz
| vigneshsubbiah16
vigneshsubbiah16
| pugazhendhi-m
pugazhendhi-m
| -| lloydchang
lloydchang
| dtrugman
dtrugman
| Szpadel
Szpadel
| lupuletic
lupuletic
| kiwina
kiwina
| liwilliam2021
liwilliam2021
| -| Premshay
Premshay
| psv2522
psv2522
| olweraltuve
olweraltuve
| diarmidmackenzie
diarmidmackenzie
| hassoncs
hassoncs
| ChuKhaLi
ChuKhaLi
| -| PeterDaveHello
PeterDaveHello
| aheizi
aheizi
| nbihan-mediware
nbihan-mediware
| noritaka1166
noritaka1166
| RaySinner
RaySinner
| afshawnlotfi
afshawnlotfi
| -| dleffel
dleffel
| StevenTCramer
StevenTCramer
| Ruakij
Ruakij
| pdecat
pdecat
| kyle-apex
kyle-apex
| emshvac
emshvac
| -| Lunchb0ne
Lunchb0ne
| SmartManoj
SmartManoj
| vagadiya
vagadiya
| slytechnical
slytechnical
| dlab-anton
dlab-anton
| arthurauffray
arthurauffray
| -| upamune
upamune
| NamesMT
NamesMT
| taylorwilsdon
taylorwilsdon
| sammcj
sammcj
| p12tic
p12tic
| gtaylor
gtaylor
| -| brunobergher
brunobergher
| aitoroses
aitoroses
| ross
ross
| mr-ryan-james
mr-ryan-james
| heyseth
heyseth
| taisukeoe
taisukeoe
| -| avtc
avtc
| eonghk
eonghk
| GOODBOY008
GOODBOY008
| kcwhite
kcwhite
| ronyblum
ronyblum
| teddyOOXX
teddyOOXX
| -| vincentsong
vincentsong
| yongjer
yongjer
| zeozeozeo
zeozeozeo
| ashktn
ashktn
| franekp
franekp
| yt3trees
yt3trees
| -| seedlord
seedlord
| bramburn
bramburn
| anton-otee
anton-otee
| benzntech
benzntech
| axkirillov
axkirillov
| olearycrew
olearycrew
| -| catrielmuller
catrielmuller
| devxpain
devxpain
| snoyiatk
snoyiatk
| GitlyHallows
GitlyHallows
| jcbdev
jcbdev
| Chenjiayuan195
Chenjiayuan195
| -| julionav
julionav
| KanTakahiro
KanTakahiro
| SplittyDev
SplittyDev
| mdp
mdp
| napter
napter
| philfung
philfung
| -| bbenshalom
bbenshalom
| chris-garrett
chris-garrett
| dairui1
dairui1
| dqroid
dqroid
| janaki-sasidhar
janaki-sasidhar
| forestyoo
forestyoo
| -| hatsu38
hatsu38
| hongzio
hongzio
| im47cn
im47cn
| shoopapa
shoopapa
| jwcraig
jwcraig
| kinandan
kinandan
| -| bannzai
bannzai
| axmo
axmo
| asychin
asychin
| amittell
amittell
| Yoshino-Yukitaro
Yoshino-Yukitaro
| Yikai-Liao
Yikai-Liao
| -| zxdvd
zxdvd
| s97712
s97712
| vladstudio
vladstudio
| vivekfyi
vivekfyi
| HahaBill
HahaBill
| tmsjngx0
tmsjngx0
| -| TGlide
TGlide
| Githubguy132010
Githubguy132010
| nevermorec
nevermorec
| PretzelVector
PretzelVector
| zetaloop
zetaloop
| cdlliuy
cdlliuy
| -| user202729
user202729
| thill2323
thill2323
| takakoutso
takakoutso
| student20880
student20880
| shubhamgupta731
shubhamgupta731
| shohei-ihaya
shohei-ihaya
| -| shivamd1810
shivamd1810
| shaybc
shaybc
| sensei-woo
sensei-woo
| samir-nimbly
samir-nimbly
| robertheadley
robertheadley
| refactorthis
refactorthis
| -| qingyuan1109
qingyuan1109
| pokutuna
pokutuna
| philipnext
philipnext
| village-way
village-way
| oprstchn
oprstchn
| nobu007
nobu007
| -| mosleyit
mosleyit
| moqimoqidea
moqimoqidea
| mlopezr
mlopezr
| mecab
mecab
| olup
olup
| lightrabbit
lightrabbit
| -| lhish
lhish
| kohii
kohii
| tgfjt
tgfjt
| DeXtroTip
DeXtroTip
| pfitz
pfitz
| ExactDoug
ExactDoug
| -| celestial-vault
celestial-vault
| linegel
linegel
| edwin-truthsearch-io
edwin-truthsearch-io
| EamonNerbonne
EamonNerbonne
| dbasclpy
dbasclpy
| dflatline
dflatline
| -| Deon588
Deon588
| dleen
dleen
| CW-B-W
CW-B-W
| chadgauth
chadgauth
| thecolorblue
thecolorblue
| bogdan0083
bogdan0083
| -| benashby
benashby
| Atlogit
Atlogit
| atlasgong
atlasgong
| andrewshu2000
andrewshu2000
| andreastempsch
andreastempsch
| alasano
alasano
| -| QuinsZouls
QuinsZouls
| HadesArchitect
HadesArchitect
| alarno
alarno
| nexon33
nexon33
| adilhafeez
adilhafeez
| adamwlarson
adamwlarson
| -| adamhill
adamhill
| AMHesch
AMHesch
| maekawataiki
maekawataiki
| AlexandruSmirnov
AlexandruSmirnov
| samsilveira
samsilveira
| 01Rian
01Rian
| -| RSO
RSO
| RandalSchwartz
RandalSchwartz
| SECKainersdorfer
SECKainersdorfer
| R-omk
R-omk
| Sarke
Sarke
| PaperBoardOfficial
PaperBoardOfficial
| -| OlegOAndreev
OlegOAndreev
| Naam
Naam
| kvokka
kvokka
| ecmasx
ecmasx
| mollux
mollux
| marvijo-code
marvijo-code
| -| markijbema
markijbema
| mamertofabian
mamertofabian
| monkeyDluffy6017
monkeyDluffy6017
| libertyteeth
libertyteeth
| shtse8
shtse8
| Rexarrior
Rexarrior
| -| kevinvandijk
kevinvandijk
| KevinZhao
KevinZhao
| ksze
ksze
| Juice10
Juice10
| Fovty
Fovty
| Jdo300
Jdo300
| -| hesara
hesara
| | | | | | +| mrubens
mrubens
| saoudrizwan
saoudrizwan
| cte
cte
| daniel-lxs
daniel-lxs
| samhvw8
samhvw8
| hannesrudolph
hannesrudolph
| +| :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | +| KJ7LNW
KJ7LNW
| a8trejo
a8trejo
| MuriloFP
MuriloFP
| ColemanRoo
ColemanRoo
| canrobins13
canrobins13
| stea9499
stea9499
| +| jr
jr
| joemanley201
joemanley201
| System233
System233
| nissa-seru
nissa-seru
| jquanton
jquanton
| roomote-agent
roomote-agent
| +| NyxJae
NyxJae
| d-oit
d-oit
| elianiva
elianiva
| chrarnoldus
chrarnoldus
| qdaxb
qdaxb
| xyOz-dev
xyOz-dev
| +| punkpeye
punkpeye
| wkordalski
wkordalski
| SannidhyaSah
SannidhyaSah
| sachasayan
sachasayan
| Smartsheet-JB-Brown
Smartsheet-JB-Brown
| monotykamary
monotykamary
| +| cannuri
cannuri
| feifei325
feifei325
| zhangtony239
zhangtony239
| shariqriazz
shariqriazz
| vigneshsubbiah16
vigneshsubbiah16
| pugazhendhi-m
pugazhendhi-m
| +| lloydchang
lloydchang
| liwilliam2021
liwilliam2021
| dtrugman
dtrugman
| hassoncs
hassoncs
| PeterDaveHello
PeterDaveHello
| Szpadel
Szpadel
| +| lupuletic
lupuletic
| kiwina
kiwina
| Premshay
Premshay
| psv2522
psv2522
| olweraltuve
olweraltuve
| diarmidmackenzie
diarmidmackenzie
| +| ChuKhaLi
ChuKhaLi
| NaccOll
NaccOll
| aheizi
aheizi
| nbihan-mediware
nbihan-mediware
| noritaka1166
noritaka1166
| RaySinner
RaySinner
| +| afshawnlotfi
afshawnlotfi
| dleffel
dleffel
| StevenTCramer
StevenTCramer
| Ruakij
Ruakij
| pdecat
pdecat
| kyle-apex
kyle-apex
| +| emshvac
emshvac
| brunobergher
brunobergher
| Lunchb0ne
Lunchb0ne
| SmartManoj
SmartManoj
| vagadiya
vagadiya
| slytechnical
slytechnical
| +| dlab-anton
dlab-anton
| arthurauffray
arthurauffray
| upamune
upamune
| NamesMT
NamesMT
| taylorwilsdon
taylorwilsdon
| sammcj
sammcj
| +| p12tic
p12tic
| gtaylor
gtaylor
| aitoroses
aitoroses
| benzntech
benzntech
| ross
ross
| mr-ryan-james
mr-ryan-james
| +| heyseth
heyseth
| taisukeoe
taisukeoe
| avtc
avtc
| eonghk
eonghk
| GOODBOY008
GOODBOY008
| kcwhite
kcwhite
| +| ronyblum
ronyblum
| teddyOOXX
teddyOOXX
| thill2323
thill2323
| vincentsong
vincentsong
| yongjer
yongjer
| zeozeozeo
zeozeozeo
| +| ashktn
ashktn
| franekp
franekp
| yt3trees
yt3trees
| seedlord
seedlord
| QuinsZouls
QuinsZouls
| anton-otee
anton-otee
| +| axkirillov
axkirillov
| bramburn
bramburn
| olearycrew
olearycrew
| catrielmuller
catrielmuller
| devxpain
devxpain
| snoyiatk
snoyiatk
| +| GitlyHallows
GitlyHallows
| jcbdev
jcbdev
| Chenjiayuan195
Chenjiayuan195
| julionav
julionav
| KanTakahiro
KanTakahiro
| kevint-cerebras
kevint-cerebras
| +| SplittyDev
SplittyDev
| mdp
mdp
| napter
napter
| philfung
philfung
| dqroid
dqroid
| dairui1
dairui1
| +| chris-garrett
chris-garrett
| bbenshalom
bbenshalom
| bannzai
bannzai
| ershang-fireworks
ershang-fireworks
| f14XuanLv
f14XuanLv
| janaki-sasidhar
janaki-sasidhar
| +| forestyoo
forestyoo
| hatsu38
hatsu38
| hongzio
hongzio
| im47cn
im47cn
| shoopapa
shoopapa
| axmo
axmo
| +| asychin
asychin
| amittell
amittell
| Yoshino-Yukitaro
Yoshino-Yukitaro
| Yikai-Liao
Yikai-Liao
| zxdvd
zxdvd
| s97712
s97712
| +| vladstudio
vladstudio
| vivekfyi
vivekfyi
| HahaBill
HahaBill
| tmsjngx0
tmsjngx0
| TGlide
TGlide
| Githubguy132010
Githubguy132010
| +| tgfjt
tgfjt
| maekawataiki
maekawataiki
| DeXtroTip
DeXtroTip
| qingyuan1109
qingyuan1109
| refactorthis
refactorthis
| robertheadley
robertheadley
| +| samir-nimbly
samir-nimbly
| sensei-woo
sensei-woo
| shaybc
shaybc
| shivamd1810
shivamd1810
| shohei-ihaya
shohei-ihaya
| shubhamgupta731
shubhamgupta731
| +| student20880
student20880
| takakoutso
takakoutso
| user202729
user202729
| cdlliuy
cdlliuy
| zetaloop
zetaloop
| PretzelVector
PretzelVector
| +| nevermorec
nevermorec
| jues
jues
| jwcraig
jwcraig
| kinandan
kinandan
| kohii
kohii
| lhish
lhish
| +| lightrabbit
lightrabbit
| olup
olup
| mecab
mecab
| mlopezr
mlopezr
| moqimoqidea
moqimoqidea
| mosleyit
mosleyit
| +| nobu007
nobu007
| oprstchn
oprstchn
| village-way
village-way
| philipnext
philipnext
| pokutuna
pokutuna
| pfitz
pfitz
| +| ExactDoug
ExactDoug
| celestial-vault
celestial-vault
| linegel
linegel
| ertan2002
ertan2002
| edwin-truthsearch-io
edwin-truthsearch-io
| EamonNerbonne
EamonNerbonne
| +| dbasclpy
dbasclpy
| dflatline
dflatline
| Deon588
Deon588
| dleen
dleen
| CW-B-W
CW-B-W
| chadgauth
chadgauth
| +| thecolorblue
thecolorblue
| bogdan0083
bogdan0083
| benashby
benashby
| Atlogit
Atlogit
| atlasgong
atlasgong
| AntiMoron
AntiMoron
| +| andrewshu2000
andrewshu2000
| andreastempsch
andreastempsch
| alasano
alasano
| HadesArchitect
HadesArchitect
| alarno
alarno
| nexon33
nexon33
| +| adilhafeez
adilhafeez
| adamwlarson
adamwlarson
| adamhill
adamhill
| AMHesch
AMHesch
| adambrand
adambrand
| abumalick
abumalick
| +| AlexandruSmirnov
AlexandruSmirnov
| samsilveira
samsilveira
| 01Rian
01Rian
| RSO
RSO
| RandalSchwartz
RandalSchwartz
| SECKainersdorfer
SECKainersdorfer
| +| R-omk
R-omk
| pwilkin
pwilkin
| Sarke
Sarke
| PaperBoardOfficial
PaperBoardOfficial
| OlegOAndreev
OlegOAndreev
| niteshbalusu11
niteshbalusu11
| +| Naam
Naam
| kvokka
kvokka
| ecmasx
ecmasx
| mollux
mollux
| marvijo-code
marvijo-code
| markijbema
markijbema
| +| mamertofabian
mamertofabian
| monkeyDluffy6017
monkeyDluffy6017
| libertyteeth
libertyteeth
| shtse8
shtse8
| Rexarrior
Rexarrior
| kevinvandijk
kevinvandijk
| +| KevinZhao
KevinZhao
| ksze
ksze
| AyazKaan
AyazKaan
| Juice10
Juice10
| snova-jorgep
snova-jorgep
| Fovty
Fovty
| +| Jdo300
Jdo300
| hesara
hesara
| | | | | diff --git a/README.vscode.md b/README.vscode.md deleted file mode 100644 index 2afed2a9c6..0000000000 --- a/README.vscode.md +++ /dev/null @@ -1 +0,0 @@ -readme test diff --git a/apps/vscode-e2e/src/suite/markdown-lists.test.ts b/apps/vscode-e2e/src/suite/markdown-lists.test.ts index a229d9c270..9b5c1bd845 100644 --- a/apps/vscode-e2e/src/suite/markdown-lists.test.ts +++ b/apps/vscode-e2e/src/suite/markdown-lists.test.ts @@ -1,6 +1,6 @@ import * as assert from "assert" -import type { ClineMessage } from "@roo-code/types" +import { RooCodeEventName, type ClineMessage } from "@roo-code/types" import { waitUntilCompleted } from "./utils" import { setDefaultSuiteTimeout } from "./test-utils" @@ -13,7 +13,7 @@ suite("Markdown List Rendering", function () { const messages: ClineMessage[] = [] - api.on("message", ({ message }: { message: ClineMessage }) => { + api.on(RooCodeEventName.Message, ({ message }: { message: ClineMessage }) => { if (message.type === "say" && message.partial === false) { messages.push(message) } @@ -50,7 +50,7 @@ suite("Markdown List Rendering", function () { const messages: ClineMessage[] = [] - api.on("message", ({ message }: { message: ClineMessage }) => { + api.on(RooCodeEventName.Message, ({ message }: { message: ClineMessage }) => { if (message.type === "say" && message.partial === false) { messages.push(message) } @@ -87,7 +87,7 @@ suite("Markdown List Rendering", function () { const messages: ClineMessage[] = [] - api.on("message", ({ message }: { message: ClineMessage }) => { + api.on(RooCodeEventName.Message, ({ message }: { message: ClineMessage }) => { if (message.type === "say" && message.partial === false) { messages.push(message) } @@ -139,7 +139,7 @@ suite("Markdown List Rendering", function () { const messages: ClineMessage[] = [] - api.on("message", ({ message }: { message: ClineMessage }) => { + api.on(RooCodeEventName.Message, ({ message }: { message: ClineMessage }) => { if (message.type === "say" && message.partial === false) { messages.push(message) } diff --git a/apps/vscode-e2e/src/suite/modes.test.ts b/apps/vscode-e2e/src/suite/modes.test.ts index 81d8a2b7fb..7982f3cf22 100644 --- a/apps/vscode-e2e/src/suite/modes.test.ts +++ b/apps/vscode-e2e/src/suite/modes.test.ts @@ -1,5 +1,7 @@ import * as assert from "assert" +import { RooCodeEventName } from "@roo-code/types" + import { waitUntilCompleted } from "./utils" import { setDefaultSuiteTimeout } from "./test-utils" @@ -9,7 +11,7 @@ suite("Roo Code Modes", function () { test("Should handle switching modes correctly", async () => { const modes: string[] = [] - globalThis.api.on("taskModeSwitched", (_taskId, mode) => modes.push(mode)) + globalThis.api.on(RooCodeEventName.TaskModeSwitched, (_taskId, mode) => modes.push(mode)) const switchModesTaskId = await globalThis.api.startNewTask({ configuration: { mode: "code", alwaysAllowModeSwitch: true, autoApprovalEnabled: true }, diff --git a/apps/vscode-e2e/src/suite/subtasks.test.ts b/apps/vscode-e2e/src/suite/subtasks.test.ts index adf1b2be89..e3e3457520 100644 --- a/apps/vscode-e2e/src/suite/subtasks.test.ts +++ b/apps/vscode-e2e/src/suite/subtasks.test.ts @@ -1,6 +1,6 @@ import * as assert from "assert" -import type { ClineMessage } from "@roo-code/types" +import { RooCodeEventName, type ClineMessage } from "@roo-code/types" import { sleep, waitFor, waitUntilCompleted } from "./utils" @@ -10,7 +10,7 @@ suite.skip("Roo Code Subtasks", () => { const messages: Record = {} - api.on("message", ({ taskId, message }) => { + api.on(RooCodeEventName.Message, ({ taskId, message }) => { if (message.type === "say" && message.partial === false) { messages[taskId] = messages[taskId] || [] messages[taskId].push(message) @@ -37,7 +37,7 @@ suite.skip("Roo Code Subtasks", () => { let spawnedTaskId: string | undefined = undefined // Wait for the subtask to be spawned and then cancel it. - api.on("taskSpawned", (_, childTaskId) => (spawnedTaskId = childTaskId)) + api.on(RooCodeEventName.TaskSpawned, (_, childTaskId) => (spawnedTaskId = childTaskId)) await waitFor(() => !!spawnedTaskId) await sleep(1_000) // Give the task a chance to start and populate the history. await api.cancelCurrentTask() diff --git a/apps/vscode-e2e/src/suite/task.test.ts b/apps/vscode-e2e/src/suite/task.test.ts index 31e03271b5..10e4e4f9a6 100644 --- a/apps/vscode-e2e/src/suite/task.test.ts +++ b/apps/vscode-e2e/src/suite/task.test.ts @@ -1,6 +1,6 @@ import * as assert from "assert" -import type { ClineMessage } from "@roo-code/types" +import { RooCodeEventName, type ClineMessage } from "@roo-code/types" import { waitUntilCompleted } from "./utils" import { setDefaultSuiteTimeout } from "./test-utils" @@ -13,7 +13,7 @@ suite("Roo Code Task", function () { const messages: ClineMessage[] = [] - api.on("message", ({ message }) => { + api.on(RooCodeEventName.Message, ({ message }) => { if (message.type === "say" && message.partial === false) { messages.push(message) } diff --git a/apps/vscode-e2e/src/suite/tools/apply-diff.test.ts b/apps/vscode-e2e/src/suite/tools/apply-diff.test.ts index 6e6dbc5995..729d6839b1 100644 --- a/apps/vscode-e2e/src/suite/tools/apply-diff.test.ts +++ b/apps/vscode-e2e/src/suite/tools/apply-diff.test.ts @@ -3,7 +3,7 @@ import * as fs from "fs/promises" import * as path from "path" import * as vscode from "vscode" -import type { ClineMessage } from "@roo-code/types" +import { RooCodeEventName, type ClineMessage } from "@roo-code/types" import { waitFor, sleep } from "../utils" import { setDefaultSuiteTimeout } from "../test-utils" @@ -192,7 +192,7 @@ function validateInput(input) { } } } - api.on("message", messageHandler) + api.on(RooCodeEventName.Message, messageHandler) // Listen for task events const taskStartedHandler = (id: string) => { @@ -201,7 +201,7 @@ function validateInput(input) { console.log("Task started:", id) } } - api.on("taskStarted", taskStartedHandler) + api.on(RooCodeEventName.TaskStarted, taskStartedHandler) const taskCompletedHandler = (id: string) => { if (id === taskId) { @@ -209,7 +209,7 @@ function validateInput(input) { console.log("Task completed:", id) } } - api.on("taskCompleted", taskCompletedHandler) + api.on(RooCodeEventName.TaskCompleted, taskCompletedHandler) let taskId: string try { @@ -260,9 +260,9 @@ ${testFile.content}\nAssume the file exists and you can modify it directly.`, console.log("Test passed! apply_diff tool executed and file modified successfully") } finally { // Clean up - api.off("message", messageHandler) - api.off("taskStarted", taskStartedHandler) - api.off("taskCompleted", taskCompletedHandler) + api.off(RooCodeEventName.Message, messageHandler) + api.off(RooCodeEventName.TaskStarted, taskStartedHandler) + api.off(RooCodeEventName.TaskCompleted, taskCompletedHandler) } }) @@ -305,7 +305,7 @@ ${testFile.content}\nAssume the file exists and you can modify it directly.`, } } } - api.on("message", messageHandler) + api.on(RooCodeEventName.Message, messageHandler) // Listen for task events const taskStartedHandler = (id: string) => { @@ -314,7 +314,7 @@ ${testFile.content}\nAssume the file exists and you can modify it directly.`, console.log("Task started:", id) } } - api.on("taskStarted", taskStartedHandler) + api.on(RooCodeEventName.TaskStarted, taskStartedHandler) const taskCompletedHandler = (id: string) => { if (id === taskId) { @@ -322,7 +322,7 @@ ${testFile.content}\nAssume the file exists and you can modify it directly.`, console.log("Task completed:", id) } } - api.on("taskCompleted", taskCompletedHandler) + api.on(RooCodeEventName.TaskCompleted, taskCompletedHandler) let taskId: string try { @@ -375,9 +375,9 @@ ${testFile.content}\nAssume the file exists and you can modify it directly.`, console.log("Test passed! apply_diff tool executed and multiple replacements applied successfully") } finally { // Clean up - api.off("message", messageHandler) - api.off("taskStarted", taskStartedHandler) - api.off("taskCompleted", taskCompletedHandler) + api.off(RooCodeEventName.Message, messageHandler) + api.off(RooCodeEventName.TaskStarted, taskStartedHandler) + api.off(RooCodeEventName.TaskCompleted, taskCompletedHandler) } }) @@ -424,7 +424,7 @@ function keepThis() { } } } - api.on("message", messageHandler) + api.on(RooCodeEventName.Message, messageHandler) // Listen for task events const taskStartedHandler = (id: string) => { @@ -432,14 +432,14 @@ function keepThis() { taskStarted = true } } - api.on("taskStarted", taskStartedHandler) + api.on(RooCodeEventName.TaskStarted, taskStartedHandler) const taskCompletedHandler = (id: string) => { if (id === taskId) { taskCompleted = true } } - api.on("taskCompleted", taskCompletedHandler) + api.on(RooCodeEventName.TaskCompleted, taskCompletedHandler) let taskId: string try { @@ -487,9 +487,9 @@ ${testFile.content}\nAssume the file exists and you can modify it directly.`, console.log("Test passed! apply_diff tool executed and targeted modification successful") } finally { // Clean up - api.off("message", messageHandler) - api.off("taskStarted", taskStartedHandler) - api.off("taskCompleted", taskCompletedHandler) + api.off(RooCodeEventName.Message, messageHandler) + api.off(RooCodeEventName.TaskStarted, taskStartedHandler) + api.off(RooCodeEventName.TaskCompleted, taskCompletedHandler) } }) @@ -532,7 +532,7 @@ ${testFile.content}\nAssume the file exists and you can modify it directly.`, } } } - api.on("message", messageHandler) + api.on(RooCodeEventName.Message, messageHandler) // Listen for task events const taskStartedHandler = (id: string) => { @@ -540,14 +540,14 @@ ${testFile.content}\nAssume the file exists and you can modify it directly.`, taskStarted = true } } - api.on("taskStarted", taskStartedHandler) + api.on(RooCodeEventName.TaskStarted, taskStartedHandler) const taskCompletedHandler = (id: string) => { if (id === taskId) { taskCompleted = true } } - api.on("taskCompleted", taskCompletedHandler) + api.on(RooCodeEventName.TaskCompleted, taskCompletedHandler) let taskId: string try { @@ -598,9 +598,9 @@ Assume the file exists and you can modify it directly.`, console.log("Test passed! apply_diff attempted and error handled gracefully") } finally { // Clean up - api.off("message", messageHandler) - api.off("taskStarted", taskStartedHandler) - api.off("taskCompleted", taskCompletedHandler) + api.off(RooCodeEventName.Message, messageHandler) + api.off(RooCodeEventName.TaskStarted, taskStartedHandler) + api.off(RooCodeEventName.TaskCompleted, taskCompletedHandler) } }) @@ -663,7 +663,7 @@ function checkInput(input) { } } } - api.on("message", messageHandler) + api.on(RooCodeEventName.Message, messageHandler) // Listen for task events const taskStartedHandler = (id: string) => { @@ -672,7 +672,7 @@ function checkInput(input) { console.log("Task started:", id) } } - api.on("taskStarted", taskStartedHandler) + api.on(RooCodeEventName.TaskStarted, taskStartedHandler) const taskCompletedHandler = (id: string) => { if (id === taskId) { @@ -680,7 +680,7 @@ function checkInput(input) { console.log("Task completed:", id) } } - api.on("taskCompleted", taskCompletedHandler) + api.on(RooCodeEventName.TaskCompleted, taskCompletedHandler) let taskId: string try { @@ -742,9 +742,9 @@ Assume the file exists and you can modify it directly.`, console.log("Test passed! apply_diff tool executed and multiple search/replace blocks applied successfully") } finally { // Clean up - api.off("message", messageHandler) - api.off("taskStarted", taskStartedHandler) - api.off("taskCompleted", taskCompletedHandler) + api.off(RooCodeEventName.Message, messageHandler) + api.off(RooCodeEventName.TaskStarted, taskStartedHandler) + api.off(RooCodeEventName.TaskCompleted, taskCompletedHandler) } }) }) diff --git a/apps/vscode-e2e/src/suite/tools/execute-command.test.ts b/apps/vscode-e2e/src/suite/tools/execute-command.test.ts index 21933d0879..f207dae685 100644 --- a/apps/vscode-e2e/src/suite/tools/execute-command.test.ts +++ b/apps/vscode-e2e/src/suite/tools/execute-command.test.ts @@ -3,7 +3,7 @@ import * as fs from "fs/promises" import * as path from "path" import * as vscode from "vscode" -import type { ClineMessage } from "@roo-code/types" +import { RooCodeEventName, type ClineMessage } from "@roo-code/types" import { waitFor, sleep, waitUntilCompleted } from "../utils" import { setDefaultSuiteTimeout } from "../test-utils" @@ -145,7 +145,7 @@ suite("Roo Code execute_command Tool", function () { } } } - api.on("message", messageHandler) + api.on(RooCodeEventName.Message, messageHandler) // Listen for task events const taskStartedHandler = (id: string) => { @@ -154,7 +154,7 @@ suite("Roo Code execute_command Tool", function () { console.log("Task started:", id) } } - api.on("taskStarted", taskStartedHandler) + api.on(RooCodeEventName.TaskStarted, taskStartedHandler) const taskCompletedHandler = (id: string) => { if (id === taskId) { @@ -162,7 +162,7 @@ suite("Roo Code execute_command Tool", function () { console.log("Task completed:", id) } } - api.on("taskCompleted", taskCompletedHandler) + api.on(RooCodeEventName.TaskCompleted, taskCompletedHandler) let taskId: string try { @@ -208,9 +208,9 @@ Then use the attempt_completion tool to complete the task. Do not suggest any co console.log("Test passed! Command executed successfully") } finally { // Clean up event listeners - api.off("message", messageHandler) - api.off("taskStarted", taskStartedHandler) - api.off("taskCompleted", taskCompletedHandler) + api.off(RooCodeEventName.Message, messageHandler) + api.off(RooCodeEventName.TaskStarted, taskStartedHandler) + api.off(RooCodeEventName.TaskCompleted, taskCompletedHandler) } }) @@ -251,7 +251,7 @@ Then use the attempt_completion tool to complete the task. Do not suggest any co } } } - api.on("message", messageHandler) + api.on(RooCodeEventName.Message, messageHandler) // Listen for task events const taskStartedHandler = (id: string) => { @@ -260,7 +260,7 @@ Then use the attempt_completion tool to complete the task. Do not suggest any co console.log("Task started:", id) } } - api.on("taskStarted", taskStartedHandler) + api.on(RooCodeEventName.TaskStarted, taskStartedHandler) const taskCompletedHandler = (id: string) => { if (id === taskId) { @@ -268,7 +268,7 @@ Then use the attempt_completion tool to complete the task. Do not suggest any co console.log("Task completed:", id) } } - api.on("taskCompleted", taskCompletedHandler) + api.on(RooCodeEventName.TaskCompleted, taskCompletedHandler) let taskId: string try { @@ -320,9 +320,9 @@ Avoid at all costs suggesting a command when using the attempt_completion tool`, console.log("Test passed! Command executed in custom directory") } finally { // Clean up event listeners - api.off("message", messageHandler) - api.off("taskStarted", taskStartedHandler) - api.off("taskCompleted", taskCompletedHandler) + api.off(RooCodeEventName.Message, messageHandler) + api.off(RooCodeEventName.TaskStarted, taskStartedHandler) + api.off(RooCodeEventName.TaskCompleted, taskCompletedHandler) // Clean up subdirectory try { @@ -365,7 +365,7 @@ Avoid at all costs suggesting a command when using the attempt_completion tool`, } } } - api.on("message", messageHandler) + api.on(RooCodeEventName.Message, messageHandler) // Listen for task events const taskStartedHandler = (id: string) => { @@ -374,7 +374,7 @@ Avoid at all costs suggesting a command when using the attempt_completion tool`, console.log("Task started:", id) } } - api.on("taskStarted", taskStartedHandler) + api.on(RooCodeEventName.TaskStarted, taskStartedHandler) const taskCompletedHandler = (id: string) => { if (id === taskId) { @@ -382,7 +382,7 @@ Avoid at all costs suggesting a command when using the attempt_completion tool`, console.log("Task completed:", id) } } - api.on("taskCompleted", taskCompletedHandler) + api.on(RooCodeEventName.TaskCompleted, taskCompletedHandler) let taskId: string try { @@ -440,9 +440,9 @@ After both commands are executed, use the attempt_completion tool to complete th console.log("Test passed! Multiple commands executed successfully") } finally { // Clean up event listeners - api.off("message", messageHandler) - api.off("taskStarted", taskStartedHandler) - api.off("taskCompleted", taskCompletedHandler) + api.off(RooCodeEventName.Message, messageHandler) + api.off(RooCodeEventName.TaskStarted, taskStartedHandler) + api.off(RooCodeEventName.TaskCompleted, taskCompletedHandler) } }) @@ -484,7 +484,7 @@ After both commands are executed, use the attempt_completion tool to complete th } } } - api.on("message", messageHandler) + api.on(RooCodeEventName.Message, messageHandler) // Listen for task events const taskStartedHandler = (id: string) => { @@ -493,7 +493,7 @@ After both commands are executed, use the attempt_completion tool to complete th console.log("Task started:", id) } } - api.on("taskStarted", taskStartedHandler) + api.on(RooCodeEventName.TaskStarted, taskStartedHandler) const taskCompletedHandler = (id: string) => { if (id === taskId) { @@ -501,7 +501,7 @@ After both commands are executed, use the attempt_completion tool to complete th console.log("Task completed:", id) } } - api.on("taskCompleted", taskCompletedHandler) + api.on(RooCodeEventName.TaskCompleted, taskCompletedHandler) let taskId: string try { @@ -550,9 +550,9 @@ Avoid at all costs suggesting a command when using the attempt_completion tool`, console.log("Test passed! Long-running command handled successfully") } finally { // Clean up event listeners - api.off("message", messageHandler) - api.off("taskStarted", taskStartedHandler) - api.off("taskCompleted", taskCompletedHandler) + api.off(RooCodeEventName.Message, messageHandler) + api.off(RooCodeEventName.TaskStarted, taskStartedHandler) + api.off(RooCodeEventName.TaskCompleted, taskCompletedHandler) } }) }) diff --git a/apps/vscode-e2e/src/suite/tools/insert-content.test.ts b/apps/vscode-e2e/src/suite/tools/insert-content.test.ts index c9d65d0d0b..4dd0c20928 100644 --- a/apps/vscode-e2e/src/suite/tools/insert-content.test.ts +++ b/apps/vscode-e2e/src/suite/tools/insert-content.test.ts @@ -3,7 +3,7 @@ import * as fs from "fs/promises" import * as path from "path" import * as vscode from "vscode" -import type { ClineMessage } from "@roo-code/types" +import { RooCodeEventName, type ClineMessage } from "@roo-code/types" import { waitFor, sleep } from "../utils" import { setDefaultSuiteTimeout } from "../test-utils" @@ -145,7 +145,7 @@ ${testFile.content}` } } } - api.on("message", messageHandler) + api.on(RooCodeEventName.Message, messageHandler) // Listen for task events const taskStartedHandler = (id: string) => { @@ -154,7 +154,7 @@ ${testFile.content}` console.log("Task started:", id) } } - api.on("taskStarted", taskStartedHandler) + api.on(RooCodeEventName.TaskStarted, taskStartedHandler) const taskCompletedHandler = (id: string) => { if (id === taskId) { @@ -162,7 +162,7 @@ ${testFile.content}` console.log("Task completed:", id) } } - api.on("taskCompleted", taskCompletedHandler) + api.on(RooCodeEventName.TaskCompleted, taskCompletedHandler) let taskId: string try { @@ -221,9 +221,9 @@ Assume the file exists and you can modify it directly.`, console.log("Test passed! insert_content tool executed and content inserted at beginning successfully") } finally { - api.off("message", messageHandler) - api.off("taskStarted", taskStartedHandler) - api.off("taskCompleted", taskCompletedHandler) + api.off(RooCodeEventName.Message, messageHandler) + api.off(RooCodeEventName.TaskStarted, taskStartedHandler) + api.off(RooCodeEventName.TaskCompleted, taskCompletedHandler) } }) try { @@ -286,7 +286,7 @@ ${insertContent}` } } } - api.on("message", messageHandler) + api.on(RooCodeEventName.Message, messageHandler) // Listen for task events const taskStartedHandler = (id: string) => { @@ -295,7 +295,7 @@ ${insertContent}` console.log("Task started:", id) } } - api.on("taskStarted", taskStartedHandler) + api.on(RooCodeEventName.TaskStarted, taskStartedHandler) const taskCompletedHandler = (id: string) => { if (id === taskId) { @@ -303,7 +303,7 @@ ${insertContent}` console.log("Task completed:", id) } } - api.on("taskCompleted", taskCompletedHandler) + api.on(RooCodeEventName.TaskCompleted, taskCompletedHandler) let taskId: string try { @@ -388,7 +388,7 @@ ${testFile.content}` } } } - api.on("message", messageHandler) + api.on(RooCodeEventName.Message, messageHandler) // Listen for task events const taskStartedHandler = (id: string) => { @@ -397,7 +397,7 @@ ${testFile.content}` console.log("Task started:", id) } } - api.on("taskStarted", taskStartedHandler) + api.on(RooCodeEventName.TaskStarted, taskStartedHandler) const taskCompletedHandler = (id: string) => { if (id === taskId) { @@ -405,7 +405,7 @@ ${testFile.content}` console.log("Task completed:", id) } } - api.on("taskCompleted", taskCompletedHandler) + api.on(RooCodeEventName.TaskCompleted, taskCompletedHandler) let taskId: string try { @@ -490,7 +490,7 @@ And this is the second line` } } } - api.on("message", messageHandler) + api.on(RooCodeEventName.Message, messageHandler) // Listen for task events const taskStartedHandler = (id: string) => { @@ -499,7 +499,7 @@ And this is the second line` console.log("Task started:", id) } } - api.on("taskStarted", taskStartedHandler) + api.on(RooCodeEventName.TaskStarted, taskStartedHandler) const taskCompletedHandler = (id: string) => { if (id === taskId) { @@ -507,7 +507,7 @@ And this is the second line` console.log("Task completed:", id) } } - api.on("taskCompleted", taskCompletedHandler) + api.on(RooCodeEventName.TaskCompleted, taskCompletedHandler) let taskId: string try { @@ -572,9 +572,9 @@ The file is currently empty. Assume the file exists and you can modify it direct "Test passed! insert_content tool executed and content inserted into empty file successfully", ) } finally { - api.off("message", messageHandler) - api.off("taskStarted", taskStartedHandler) - api.off("taskCompleted", taskCompletedHandler) + api.off(RooCodeEventName.Message, messageHandler) + api.off(RooCodeEventName.TaskStarted, taskStartedHandler) + api.off(RooCodeEventName.TaskCompleted, taskCompletedHandler) } }) // Check if the file was modified correctly @@ -600,9 +600,9 @@ The file is currently empty. Assume the file exists and you can modify it direct console.log("Test passed! insert_content tool executed and multiline content inserted successfully") } finally { - api.off("message", messageHandler) - api.off("taskStarted", taskStartedHandler) - api.off("taskCompleted", taskCompletedHandler) + api.off(RooCodeEventName.Message, messageHandler) + api.off(RooCodeEventName.TaskStarted, taskStartedHandler) + api.off(RooCodeEventName.TaskCompleted, taskCompletedHandler) } }) assert.strictEqual(insertContentExecuted, true, "insert_content tool should have been executed") @@ -619,9 +619,9 @@ The file is currently empty. Assume the file exists and you can modify it direct console.log("Test passed! insert_content tool executed and content inserted at end successfully") } finally { - api.off("message", messageHandler) - api.off("taskStarted", taskStartedHandler) - api.off("taskCompleted", taskCompletedHandler) + api.off(RooCodeEventName.Message, messageHandler) + api.off(RooCodeEventName.TaskStarted, taskStartedHandler) + api.off(RooCodeEventName.TaskCompleted, taskCompletedHandler) } }) // Tests will be added here one by one diff --git a/apps/vscode-e2e/src/suite/tools/list-files.test.ts b/apps/vscode-e2e/src/suite/tools/list-files.test.ts index c374e79515..5a1fd6cc3b 100644 --- a/apps/vscode-e2e/src/suite/tools/list-files.test.ts +++ b/apps/vscode-e2e/src/suite/tools/list-files.test.ts @@ -3,7 +3,7 @@ import * as fs from "fs/promises" import * as path from "path" import * as vscode from "vscode" -import type { ClineMessage } from "@roo-code/types" +import { RooCodeEventName, type ClineMessage } from "@roo-code/types" import { waitFor, sleep } from "../utils" import { setDefaultSuiteTimeout } from "../test-utils" @@ -207,7 +207,7 @@ This directory contains various files and subdirectories for testing the list_fi } } } - api.on("message", messageHandler) + api.on(RooCodeEventName.Message, messageHandler) // Listen for task completion const taskCompletedHandler = (id: string) => { @@ -215,7 +215,7 @@ This directory contains various files and subdirectories for testing the list_fi taskCompleted = true } } - api.on("taskCompleted", taskCompletedHandler) + api.on(RooCodeEventName.TaskCompleted, taskCompletedHandler) let taskId: string try { @@ -271,8 +271,8 @@ This directory contains various files and subdirectories for testing the list_fi console.log("Test passed! Directory listing (non-recursive) executed successfully") } finally { // Clean up - api.off("message", messageHandler) - api.off("taskCompleted", taskCompletedHandler) + api.off(RooCodeEventName.Message, messageHandler) + api.off(RooCodeEventName.TaskCompleted, taskCompletedHandler) } }) @@ -310,7 +310,7 @@ This directory contains various files and subdirectories for testing the list_fi } } } - api.on("message", messageHandler) + api.on(RooCodeEventName.Message, messageHandler) // Listen for task completion const taskCompletedHandler = (id: string) => { @@ -318,7 +318,7 @@ This directory contains various files and subdirectories for testing the list_fi taskCompleted = true } } - api.on("taskCompleted", taskCompletedHandler) + api.on(RooCodeEventName.TaskCompleted, taskCompletedHandler) let taskId: string try { @@ -381,8 +381,8 @@ This directory contains various files and subdirectories for testing the list_fi console.log("Test passed! Directory listing (recursive) executed successfully") } finally { // Clean up - api.off("message", messageHandler) - api.off("taskCompleted", taskCompletedHandler) + api.off(RooCodeEventName.Message, messageHandler) + api.off(RooCodeEventName.TaskCompleted, taskCompletedHandler) } }) @@ -420,7 +420,7 @@ This directory contains various files and subdirectories for testing the list_fi } } } - api.on("message", messageHandler) + api.on(RooCodeEventName.Message, messageHandler) // Listen for task completion const taskCompletedHandler = (id: string) => { @@ -428,7 +428,7 @@ This directory contains various files and subdirectories for testing the list_fi taskCompleted = true } } - api.on("taskCompleted", taskCompletedHandler) + api.on(RooCodeEventName.TaskCompleted, taskCompletedHandler) let taskId: string try { @@ -499,8 +499,8 @@ This directory contains various files and subdirectories for testing the list_fi await fs.rm(testDir, { recursive: true, force: true }) } finally { // Clean up - api.off("message", messageHandler) - api.off("taskCompleted", taskCompletedHandler) + api.off(RooCodeEventName.Message, messageHandler) + api.off(RooCodeEventName.TaskCompleted, taskCompletedHandler) } }) @@ -523,7 +523,7 @@ This directory contains various files and subdirectories for testing the list_fi } } } - api.on("message", messageHandler) + api.on(RooCodeEventName.Message, messageHandler) // Listen for task completion const taskCompletedHandler = (id: string) => { @@ -531,7 +531,7 @@ This directory contains various files and subdirectories for testing the list_fi taskCompleted = true } } - api.on("taskCompleted", taskCompletedHandler) + api.on(RooCodeEventName.TaskCompleted, taskCompletedHandler) let taskId: string try { @@ -569,8 +569,8 @@ This directory contains various files and subdirectories for testing the list_fi console.log("Test passed! Workspace root directory listing executed successfully") } finally { // Clean up - api.off("message", messageHandler) - api.off("taskCompleted", taskCompletedHandler) + api.off(RooCodeEventName.Message, messageHandler) + api.off(RooCodeEventName.TaskCompleted, taskCompletedHandler) } }) }) diff --git a/apps/vscode-e2e/src/suite/tools/read-file.test.ts b/apps/vscode-e2e/src/suite/tools/read-file.test.ts index 007e88b21c..99e3f18457 100644 --- a/apps/vscode-e2e/src/suite/tools/read-file.test.ts +++ b/apps/vscode-e2e/src/suite/tools/read-file.test.ts @@ -4,7 +4,7 @@ import * as path from "path" import * as os from "os" import * as vscode from "vscode" -import type { ClineMessage } from "@roo-code/types" +import { RooCodeEventName, type ClineMessage } from "@roo-code/types" import { waitFor, sleep } from "../utils" import { setDefaultSuiteTimeout } from "../test-utils" @@ -180,7 +180,7 @@ suite("Roo Code read_file Tool", function () { console.log("AI response:", message.text?.substring(0, 200)) } } - api.on("message", messageHandler) + api.on(RooCodeEventName.Message, messageHandler) // Listen for task events const taskStartedHandler = (id: string) => { @@ -189,7 +189,7 @@ suite("Roo Code read_file Tool", function () { console.log("Task started:", id) } } - api.on("taskStarted", taskStartedHandler) + api.on(RooCodeEventName.TaskStarted, taskStartedHandler) const taskCompletedHandler = (id: string) => { if (id === taskId) { @@ -197,7 +197,7 @@ suite("Roo Code read_file Tool", function () { console.log("Task completed:", id) } } - api.on("taskCompleted", taskCompletedHandler) + api.on(RooCodeEventName.TaskCompleted, taskCompletedHandler) let taskId: string try { @@ -259,9 +259,9 @@ suite("Roo Code read_file Tool", function () { console.log("Test passed! File read successfully with correct content") } finally { // Clean up - api.off("message", messageHandler) - api.off("taskStarted", taskStartedHandler) - api.off("taskCompleted", taskCompletedHandler) + api.off(RooCodeEventName.Message, messageHandler) + api.off(RooCodeEventName.TaskStarted, taskStartedHandler) + api.off(RooCodeEventName.TaskCompleted, taskCompletedHandler) } }) @@ -314,7 +314,7 @@ suite("Roo Code read_file Tool", function () { console.log("AI response:", message.text?.substring(0, 200)) } } - api.on("message", messageHandler) + api.on(RooCodeEventName.Message, messageHandler) // Listen for task completion const taskCompletedHandler = (id: string) => { @@ -322,7 +322,7 @@ suite("Roo Code read_file Tool", function () { taskCompleted = true } } - api.on("taskCompleted", taskCompletedHandler) + api.on(RooCodeEventName.TaskCompleted, taskCompletedHandler) let taskId: string try { @@ -371,8 +371,8 @@ suite("Roo Code read_file Tool", function () { console.log("Test passed! Multiline file read successfully with correct content") } finally { // Clean up - api.off("message", messageHandler) - api.off("taskCompleted", taskCompletedHandler) + api.off(RooCodeEventName.Message, messageHandler) + api.off(RooCodeEventName.TaskCompleted, taskCompletedHandler) } }) @@ -425,7 +425,7 @@ suite("Roo Code read_file Tool", function () { console.log("AI response:", message.text?.substring(0, 200)) } } - api.on("message", messageHandler) + api.on(RooCodeEventName.Message, messageHandler) // Listen for task completion const taskCompletedHandler = (id: string) => { @@ -433,7 +433,7 @@ suite("Roo Code read_file Tool", function () { taskCompleted = true } } - api.on("taskCompleted", taskCompletedHandler) + api.on(RooCodeEventName.TaskCompleted, taskCompletedHandler) let taskId: string try { @@ -484,8 +484,8 @@ suite("Roo Code read_file Tool", function () { console.log("Test passed! File read with line range successfully") } finally { // Clean up - api.off("message", messageHandler) - api.off("taskCompleted", taskCompletedHandler) + api.off(RooCodeEventName.Message, messageHandler) + api.off(RooCodeEventName.TaskCompleted, taskCompletedHandler) } }) @@ -512,7 +512,7 @@ suite("Roo Code read_file Tool", function () { } } } - api.on("message", messageHandler) + api.on(RooCodeEventName.Message, messageHandler) // Listen for task completion const taskCompletedHandler = (id: string) => { @@ -520,7 +520,7 @@ suite("Roo Code read_file Tool", function () { taskCompleted = true } } - api.on("taskCompleted", taskCompletedHandler) + api.on(RooCodeEventName.TaskCompleted, taskCompletedHandler) let taskId: string try { @@ -556,8 +556,8 @@ suite("Roo Code read_file Tool", function () { console.log("Test passed! Non-existent file handled correctly") } finally { // Clean up - api.off("message", messageHandler) - api.off("taskCompleted", taskCompletedHandler) + api.off(RooCodeEventName.Message, messageHandler) + api.off(RooCodeEventName.TaskCompleted, taskCompletedHandler) } }) @@ -585,7 +585,7 @@ suite("Roo Code read_file Tool", function () { console.log("AI response:", message.text?.substring(0, 200)) } } - api.on("message", messageHandler) + api.on(RooCodeEventName.Message, messageHandler) // Listen for task completion const taskCompletedHandler = (id: string) => { @@ -593,7 +593,7 @@ suite("Roo Code read_file Tool", function () { taskCompleted = true } } - api.on("taskCompleted", taskCompletedHandler) + api.on(RooCodeEventName.TaskCompleted, taskCompletedHandler) let taskId: string try { @@ -627,8 +627,8 @@ suite("Roo Code read_file Tool", function () { console.log("Test passed! XML file read successfully") } finally { // Clean up - api.off("message", messageHandler) - api.off("taskCompleted", taskCompletedHandler) + api.off(RooCodeEventName.Message, messageHandler) + api.off(RooCodeEventName.TaskCompleted, taskCompletedHandler) } }) @@ -651,7 +651,7 @@ suite("Roo Code read_file Tool", function () { } } } - api.on("message", messageHandler) + api.on(RooCodeEventName.Message, messageHandler) // Listen for task completion const taskCompletedHandler = (id: string) => { @@ -659,7 +659,7 @@ suite("Roo Code read_file Tool", function () { taskCompleted = true } } - api.on("taskCompleted", taskCompletedHandler) + api.on(RooCodeEventName.TaskCompleted, taskCompletedHandler) let taskId: string try { @@ -700,8 +700,8 @@ Assume both files exist and you can read them directly. Read each file and tell console.log("Test passed! Multiple files read successfully") } finally { // Clean up - api.off("message", messageHandler) - api.off("taskCompleted", taskCompletedHandler) + api.off(RooCodeEventName.Message, messageHandler) + api.off(RooCodeEventName.TaskCompleted, taskCompletedHandler) } }) @@ -729,7 +729,7 @@ Assume both files exist and you can read them directly. Read each file and tell console.log("AI response:", message.text?.substring(0, 200)) } } - api.on("message", messageHandler) + api.on(RooCodeEventName.Message, messageHandler) // Listen for task completion const taskCompletedHandler = (id: string) => { @@ -737,7 +737,7 @@ Assume both files exist and you can read them directly. Read each file and tell taskCompleted = true } } - api.on("taskCompleted", taskCompletedHandler) + api.on(RooCodeEventName.TaskCompleted, taskCompletedHandler) let taskId: string try { @@ -771,8 +771,8 @@ Assume both files exist and you can read them directly. Read each file and tell console.log("Test passed! Large file read efficiently") } finally { // Clean up - api.off("message", messageHandler) - api.off("taskCompleted", taskCompletedHandler) + api.off(RooCodeEventName.Message, messageHandler) + api.off(RooCodeEventName.TaskCompleted, taskCompletedHandler) } }) }) diff --git a/apps/vscode-e2e/src/suite/tools/search-and-replace.test.ts b/apps/vscode-e2e/src/suite/tools/search-and-replace.test.ts index 459b109350..801a829a74 100644 --- a/apps/vscode-e2e/src/suite/tools/search-and-replace.test.ts +++ b/apps/vscode-e2e/src/suite/tools/search-and-replace.test.ts @@ -3,7 +3,7 @@ import * as fs from "fs/promises" import * as path from "path" import * as vscode from "vscode" -import type { ClineMessage } from "@roo-code/types" +import { RooCodeEventName, type ClineMessage } from "@roo-code/types" import { waitFor, sleep } from "../utils" import { setDefaultSuiteTimeout } from "../test-utils" @@ -175,7 +175,7 @@ Final content`, } } } - api.on("message", messageHandler) + api.on(RooCodeEventName.Message, messageHandler) // Listen for task events const taskStartedHandler = (id: string) => { @@ -184,7 +184,7 @@ Final content`, console.log("Task started:", id) } } - api.on("taskStarted", taskStartedHandler) + api.on(RooCodeEventName.TaskStarted, taskStartedHandler) const taskCompletedHandler = (id: string) => { if (id === taskId) { @@ -192,7 +192,7 @@ Final content`, console.log("Task completed:", id) } } - api.on("taskCompleted", taskCompletedHandler) + api.on(RooCodeEventName.TaskCompleted, taskCompletedHandler) let taskId: string try { @@ -249,9 +249,9 @@ Assume the file exists and you can modify it directly.`, console.log("Test passed! search_and_replace tool executed and file modified successfully") } finally { // Clean up - api.off("message", messageHandler) - api.off("taskStarted", taskStartedHandler) - api.off("taskCompleted", taskCompletedHandler) + api.off(RooCodeEventName.Message, messageHandler) + api.off(RooCodeEventName.TaskStarted, taskStartedHandler) + api.off(RooCodeEventName.TaskCompleted, taskCompletedHandler) } }) @@ -303,7 +303,7 @@ function anotherNewFunction() { } } } - api.on("message", messageHandler) + api.on(RooCodeEventName.Message, messageHandler) // Listen for task events const taskStartedHandler = (id: string) => { @@ -312,7 +312,7 @@ function anotherNewFunction() { console.log("Task started:", id) } } - api.on("taskStarted", taskStartedHandler) + api.on(RooCodeEventName.TaskStarted, taskStartedHandler) const taskCompletedHandler = (id: string) => { if (id === taskId) { @@ -320,7 +320,7 @@ function anotherNewFunction() { console.log("Task completed:", id) } } - api.on("taskCompleted", taskCompletedHandler) + api.on(RooCodeEventName.TaskCompleted, taskCompletedHandler) let taskId: string try { @@ -378,9 +378,9 @@ Use the search_and_replace tool twice - once for each replacement.`, console.log("Test passed! search_and_replace tool executed with regex successfully") } finally { // Clean up - api.off("message", messageHandler) - api.off("taskStarted", taskStartedHandler) - api.off("taskCompleted", taskCompletedHandler) + api.off(RooCodeEventName.Message, messageHandler) + api.off(RooCodeEventName.TaskStarted, taskStartedHandler) + api.off(RooCodeEventName.TaskCompleted, taskCompletedHandler) } }) @@ -429,7 +429,7 @@ Final content` } } } - api.on("message", messageHandler) + api.on(RooCodeEventName.Message, messageHandler) // Listen for task events const taskStartedHandler = (id: string) => { @@ -438,7 +438,7 @@ Final content` console.log("Task started:", id) } } - api.on("taskStarted", taskStartedHandler) + api.on(RooCodeEventName.TaskStarted, taskStartedHandler) const taskCompletedHandler = (id: string) => { if (id === taskId) { @@ -446,7 +446,7 @@ Final content` console.log("Task completed:", id) } } - api.on("taskCompleted", taskCompletedHandler) + api.on(RooCodeEventName.TaskCompleted, taskCompletedHandler) let taskId: string try { @@ -503,9 +503,9 @@ Assume the file exists and you can modify it directly.`, console.log("Test passed! search_and_replace tool executed and replaced multiple matches successfully") } finally { // Clean up - api.off("message", messageHandler) - api.off("taskStarted", taskStartedHandler) - api.off("taskCompleted", taskCompletedHandler) + api.off(RooCodeEventName.Message, messageHandler) + api.off(RooCodeEventName.TaskStarted, taskStartedHandler) + api.off(RooCodeEventName.TaskCompleted, taskCompletedHandler) } }) @@ -549,7 +549,7 @@ Assume the file exists and you can modify it directly.`, } } } - api.on("message", messageHandler) + api.on(RooCodeEventName.Message, messageHandler) // Listen for task events const taskStartedHandler = (id: string) => { @@ -558,7 +558,7 @@ Assume the file exists and you can modify it directly.`, console.log("Task started:", id) } } - api.on("taskStarted", taskStartedHandler) + api.on(RooCodeEventName.TaskStarted, taskStartedHandler) const taskCompletedHandler = (id: string) => { if (id === taskId) { @@ -566,7 +566,7 @@ Assume the file exists and you can modify it directly.`, console.log("Task completed:", id) } } - api.on("taskCompleted", taskCompletedHandler) + api.on(RooCodeEventName.TaskCompleted, taskCompletedHandler) let taskId: string try { @@ -623,9 +623,9 @@ Assume the file exists and you can modify it directly.`, console.log("Test passed! search_and_replace tool executed and handled no matches correctly") } finally { // Clean up - api.off("message", messageHandler) - api.off("taskStarted", taskStartedHandler) - api.off("taskCompleted", taskCompletedHandler) + api.off(RooCodeEventName.Message, messageHandler) + api.off(RooCodeEventName.TaskStarted, taskStartedHandler) + api.off(RooCodeEventName.TaskCompleted, taskCompletedHandler) } }) }) diff --git a/apps/vscode-e2e/src/suite/tools/search-files.test.ts b/apps/vscode-e2e/src/suite/tools/search-files.test.ts index cc28739943..98cfd1b3ee 100644 --- a/apps/vscode-e2e/src/suite/tools/search-files.test.ts +++ b/apps/vscode-e2e/src/suite/tools/search-files.test.ts @@ -3,7 +3,7 @@ import * as fs from "fs/promises" import * as path from "path" import * as vscode from "vscode" -import type { ClineMessage } from "@roo-code/types" +import { RooCodeEventName, type ClineMessage } from "@roo-code/types" import { waitFor, sleep } from "../utils" import { setDefaultSuiteTimeout } from "../test-utils" @@ -323,7 +323,7 @@ The search should find matches across different file types and provide context f } } } - api.on("message", messageHandler) + api.on(RooCodeEventName.Message, messageHandler) // Listen for task completion const taskCompletedHandler = (id: string) => { @@ -331,7 +331,7 @@ The search should find matches across different file types and provide context f taskCompleted = true } } - api.on("taskCompleted", taskCompletedHandler) + api.on(RooCodeEventName.TaskCompleted, taskCompletedHandler) let taskId: string try { @@ -397,8 +397,8 @@ The search should find matches across different file types and provide context f console.log("Test passed! Function definitions found successfully with validated results") } finally { // Clean up - api.off("message", messageHandler) - api.off("taskCompleted", taskCompletedHandler) + api.off(RooCodeEventName.Message, messageHandler) + api.off(RooCodeEventName.TaskCompleted, taskCompletedHandler) } }) @@ -421,7 +421,7 @@ The search should find matches across different file types and provide context f } } } - api.on("message", messageHandler) + api.on(RooCodeEventName.Message, messageHandler) // Listen for task completion const taskCompletedHandler = (id: string) => { @@ -429,7 +429,7 @@ The search should find matches across different file types and provide context f taskCompleted = true } } - api.on("taskCompleted", taskCompletedHandler) + api.on(RooCodeEventName.TaskCompleted, taskCompletedHandler) let taskId: string try { @@ -464,8 +464,8 @@ The search should find matches across different file types and provide context f console.log("Test passed! TODO comments found successfully") } finally { // Clean up - api.off("message", messageHandler) - api.off("taskCompleted", taskCompletedHandler) + api.off(RooCodeEventName.Message, messageHandler) + api.off(RooCodeEventName.TaskCompleted, taskCompletedHandler) } }) @@ -488,7 +488,7 @@ The search should find matches across different file types and provide context f } } } - api.on("message", messageHandler) + api.on(RooCodeEventName.Message, messageHandler) // Listen for task completion const taskCompletedHandler = (id: string) => { @@ -496,7 +496,7 @@ The search should find matches across different file types and provide context f taskCompleted = true } } - api.on("taskCompleted", taskCompletedHandler) + api.on(RooCodeEventName.TaskCompleted, taskCompletedHandler) let taskId: string try { @@ -530,8 +530,8 @@ The search should find matches across different file types and provide context f console.log("Test passed! TypeScript interfaces found with file pattern filter") } finally { // Clean up - api.off("message", messageHandler) - api.off("taskCompleted", taskCompletedHandler) + api.off(RooCodeEventName.Message, messageHandler) + api.off(RooCodeEventName.TaskCompleted, taskCompletedHandler) } }) @@ -554,7 +554,7 @@ The search should find matches across different file types and provide context f } } } - api.on("message", messageHandler) + api.on(RooCodeEventName.Message, messageHandler) // Listen for task completion const taskCompletedHandler = (id: string) => { @@ -562,7 +562,7 @@ The search should find matches across different file types and provide context f taskCompleted = true } } - api.on("taskCompleted", taskCompletedHandler) + api.on(RooCodeEventName.TaskCompleted, taskCompletedHandler) let taskId: string try { @@ -598,8 +598,8 @@ The search should find matches across different file types and provide context f console.log("Test passed! JSON configuration keys found successfully") } finally { // Clean up - api.off("message", messageHandler) - api.off("taskCompleted", taskCompletedHandler) + api.off(RooCodeEventName.Message, messageHandler) + api.off(RooCodeEventName.TaskCompleted, taskCompletedHandler) } }) @@ -622,7 +622,7 @@ The search should find matches across different file types and provide context f } } } - api.on("message", messageHandler) + api.on(RooCodeEventName.Message, messageHandler) // Listen for task completion const taskCompletedHandler = (id: string) => { @@ -630,7 +630,7 @@ The search should find matches across different file types and provide context f taskCompleted = true } } - api.on("taskCompleted", taskCompletedHandler) + api.on(RooCodeEventName.TaskCompleted, taskCompletedHandler) let taskId: string try { @@ -663,8 +663,8 @@ The search should find matches across different file types and provide context f console.log("Test passed! Nested directory search completed successfully") } finally { // Clean up - api.off("message", messageHandler) - api.off("taskCompleted", taskCompletedHandler) + api.off(RooCodeEventName.Message, messageHandler) + api.off(RooCodeEventName.TaskCompleted, taskCompletedHandler) } }) @@ -690,7 +690,7 @@ The search should find matches across different file types and provide context f } } } - api.on("message", messageHandler) + api.on(RooCodeEventName.Message, messageHandler) // Listen for task completion const taskCompletedHandler = (id: string) => { @@ -698,7 +698,7 @@ The search should find matches across different file types and provide context f taskCompleted = true } } - api.on("taskCompleted", taskCompletedHandler) + api.on(RooCodeEventName.TaskCompleted, taskCompletedHandler) let taskId: string try { @@ -731,8 +731,8 @@ The search should find matches across different file types and provide context f console.log("Test passed! Complex regex pattern search completed successfully") } finally { // Clean up - api.off("message", messageHandler) - api.off("taskCompleted", taskCompletedHandler) + api.off(RooCodeEventName.Message, messageHandler) + api.off(RooCodeEventName.TaskCompleted, taskCompletedHandler) } }) @@ -775,7 +775,7 @@ The search should find matches across different file types and provide context f console.log("AI completion message:", message.text?.substring(0, 300)) } } - api.on("message", messageHandler) + api.on(RooCodeEventName.Message, messageHandler) // Listen for task completion const taskCompletedHandler = (id: string) => { @@ -783,7 +783,7 @@ The search should find matches across different file types and provide context f taskCompleted = true } } - api.on("taskCompleted", taskCompletedHandler) + api.on(RooCodeEventName.TaskCompleted, taskCompletedHandler) let taskId: string try { @@ -859,8 +859,8 @@ The search should find matches across different file types and provide context f console.log("Test passed! No-match scenario handled correctly") } finally { // Clean up - api.off("message", messageHandler) - api.off("taskCompleted", taskCompletedHandler) + api.off(RooCodeEventName.Message, messageHandler) + api.off(RooCodeEventName.TaskCompleted, taskCompletedHandler) } }) @@ -883,7 +883,7 @@ The search should find matches across different file types and provide context f } } } - api.on("message", messageHandler) + api.on(RooCodeEventName.Message, messageHandler) // Listen for task completion const taskCompletedHandler = (id: string) => { @@ -891,7 +891,7 @@ The search should find matches across different file types and provide context f taskCompleted = true } } - api.on("taskCompleted", taskCompletedHandler) + api.on(RooCodeEventName.TaskCompleted, taskCompletedHandler) let taskId: string try { @@ -927,8 +927,8 @@ The search should find matches across different file types and provide context f console.log("Test passed! Class definitions and async methods found successfully") } finally { // Clean up - api.off("message", messageHandler) - api.off("taskCompleted", taskCompletedHandler) + api.off(RooCodeEventName.Message, messageHandler) + api.off(RooCodeEventName.TaskCompleted, taskCompletedHandler) } }) }) diff --git a/apps/vscode-e2e/src/suite/tools/use-mcp-tool.test.ts b/apps/vscode-e2e/src/suite/tools/use-mcp-tool.test.ts index 8e83dd7e4b..380a77d179 100644 --- a/apps/vscode-e2e/src/suite/tools/use-mcp-tool.test.ts +++ b/apps/vscode-e2e/src/suite/tools/use-mcp-tool.test.ts @@ -4,7 +4,7 @@ import * as path from "path" import * as os from "os" import * as vscode from "vscode" -import type { ClineMessage } from "@roo-code/types" +import { RooCodeEventName, type ClineMessage } from "@roo-code/types" import { waitFor, sleep } from "../utils" import { setDefaultSuiteTimeout } from "../test-utils" @@ -167,7 +167,7 @@ suite.skip("Roo Code use_mcp_tool Tool", function () { console.error("Error:", message.text) } } - api.on("message", messageHandler) + api.on(RooCodeEventName.Message, messageHandler) // Listen for task events const taskStartedHandler = (id: string) => { @@ -176,7 +176,7 @@ suite.skip("Roo Code use_mcp_tool Tool", function () { console.log("Task started:", id) } } - api.on("taskStarted", taskStartedHandler) + api.on(RooCodeEventName.TaskStarted, taskStartedHandler) const taskCompletedHandler = (id: string) => { if (id === taskId) { @@ -184,7 +184,7 @@ suite.skip("Roo Code use_mcp_tool Tool", function () { console.log("Task completed:", id) } } - api.on("taskCompleted", taskCompletedHandler) + api.on(RooCodeEventName.TaskCompleted, taskCompletedHandler) await sleep(2000) // Wait for Roo Code to fully initialize // Trigger MCP server detection by opening and modifying the file @@ -284,9 +284,9 @@ suite.skip("Roo Code use_mcp_tool Tool", function () { console.log("Test passed! MCP read_file tool used successfully and task completed") } finally { // Clean up - api.off("message", messageHandler) - api.off("taskStarted", taskStartedHandler) - api.off("taskCompleted", taskCompletedHandler) + api.off(RooCodeEventName.Message, messageHandler) + api.off(RooCodeEventName.TaskStarted, taskStartedHandler) + api.off(RooCodeEventName.TaskCompleted, taskCompletedHandler) } }) @@ -344,7 +344,7 @@ suite.skip("Roo Code use_mcp_tool Tool", function () { console.error("Error:", message.text) } } - api.on("message", messageHandler) + api.on(RooCodeEventName.Message, messageHandler) // Listen for task completion const taskCompletedHandler = (id: string) => { @@ -352,7 +352,7 @@ suite.skip("Roo Code use_mcp_tool Tool", function () { _taskCompleted = true } } - api.on("taskCompleted", taskCompletedHandler) + api.on(RooCodeEventName.TaskCompleted, taskCompletedHandler) let taskId: string try { @@ -413,8 +413,8 @@ suite.skip("Roo Code use_mcp_tool Tool", function () { console.log("Test passed! MCP write_file tool used successfully and task completed") } finally { // Clean up - api.off("message", messageHandler) - api.off("taskCompleted", taskCompletedHandler) + api.off(RooCodeEventName.Message, messageHandler) + api.off(RooCodeEventName.TaskCompleted, taskCompletedHandler) } }) @@ -472,7 +472,7 @@ suite.skip("Roo Code use_mcp_tool Tool", function () { console.error("Error:", message.text) } } - api.on("message", messageHandler) + api.on(RooCodeEventName.Message, messageHandler) // Listen for task completion const taskCompletedHandler = (id: string) => { @@ -480,7 +480,7 @@ suite.skip("Roo Code use_mcp_tool Tool", function () { _taskCompleted = true } } - api.on("taskCompleted", taskCompletedHandler) + api.on(RooCodeEventName.TaskCompleted, taskCompletedHandler) let taskId: string try { @@ -552,8 +552,8 @@ suite.skip("Roo Code use_mcp_tool Tool", function () { console.log("Test passed! MCP list_directory tool used successfully and task completed") } finally { // Clean up - api.off("message", messageHandler) - api.off("taskCompleted", taskCompletedHandler) + api.off(RooCodeEventName.Message, messageHandler) + api.off(RooCodeEventName.TaskCompleted, taskCompletedHandler) } }) @@ -611,7 +611,7 @@ suite.skip("Roo Code use_mcp_tool Tool", function () { console.error("Error:", message.text) } } - api.on("message", messageHandler) + api.on(RooCodeEventName.Message, messageHandler) // Listen for task completion const taskCompletedHandler = (id: string) => { @@ -619,7 +619,7 @@ suite.skip("Roo Code use_mcp_tool Tool", function () { _taskCompleted = true } } - api.on("taskCompleted", taskCompletedHandler) + api.on(RooCodeEventName.TaskCompleted, taskCompletedHandler) let taskId: string try { @@ -691,8 +691,8 @@ suite.skip("Roo Code use_mcp_tool Tool", function () { console.log("Test passed! MCP directory_tree tool used successfully and task completed") } finally { // Clean up - api.off("message", messageHandler) - api.off("taskCompleted", taskCompletedHandler) + api.off(RooCodeEventName.Message, messageHandler) + api.off(RooCodeEventName.TaskCompleted, taskCompletedHandler) } }) @@ -730,7 +730,7 @@ suite.skip("Roo Code use_mcp_tool Tool", function () { console.log("Attempt completion called:", message.text?.substring(0, 200)) } } - api.on("message", messageHandler) + api.on(RooCodeEventName.Message, messageHandler) // Listen for task completion const taskCompletedHandler = (id: string) => { @@ -738,7 +738,7 @@ suite.skip("Roo Code use_mcp_tool Tool", function () { _taskCompleted = true } } - api.on("taskCompleted", taskCompletedHandler) + api.on(RooCodeEventName.TaskCompleted, taskCompletedHandler) let taskId: string try { @@ -762,8 +762,8 @@ suite.skip("Roo Code use_mcp_tool Tool", function () { console.log("Test passed! MCP error handling verified and task completed") } finally { // Clean up - api.off("message", messageHandler) - api.off("taskCompleted", taskCompletedHandler) + api.off(RooCodeEventName.Message, messageHandler) + api.off(RooCodeEventName.TaskCompleted, taskCompletedHandler) } }) @@ -832,7 +832,7 @@ suite.skip("Roo Code use_mcp_tool Tool", function () { console.error("Error:", message.text) } } - api.on("message", messageHandler) + api.on(RooCodeEventName.Message, messageHandler) // Listen for task completion const taskCompletedHandler = (id: string) => { @@ -840,7 +840,7 @@ suite.skip("Roo Code use_mcp_tool Tool", function () { _taskCompleted = true } } - api.on("taskCompleted", taskCompletedHandler) + api.on(RooCodeEventName.TaskCompleted, taskCompletedHandler) let taskId: string try { @@ -921,8 +921,8 @@ suite.skip("Roo Code use_mcp_tool Tool", function () { console.log("Test passed! MCP message format validation successful and task completed") } finally { // Clean up - api.off("message", messageHandler) - api.off("taskCompleted", taskCompletedHandler) + api.off(RooCodeEventName.Message, messageHandler) + api.off(RooCodeEventName.TaskCompleted, taskCompletedHandler) } }) }) diff --git a/apps/vscode-e2e/src/suite/tools/write-to-file.test.ts b/apps/vscode-e2e/src/suite/tools/write-to-file.test.ts index 814213b2bc..dea51386cf 100644 --- a/apps/vscode-e2e/src/suite/tools/write-to-file.test.ts +++ b/apps/vscode-e2e/src/suite/tools/write-to-file.test.ts @@ -3,7 +3,7 @@ import * as fs from "fs/promises" import * as path from "path" import * as os from "os" -import type { ClineMessage } from "@roo-code/types" +import { RooCodeEventName, type ClineMessage } from "@roo-code/types" import { waitFor, sleep } from "../utils" import { setDefaultSuiteTimeout } from "../test-utils" @@ -110,7 +110,7 @@ suite("Roo Code write_to_file Tool", function () { console.log("AI response:", message.text?.substring(0, 200)) } } - api.on("message", messageHandler) + api.on(RooCodeEventName.Message, messageHandler) // Listen for task events const taskStartedHandler = (id: string) => { @@ -119,7 +119,7 @@ suite("Roo Code write_to_file Tool", function () { console.log("Task started:", id) } } - api.on("taskStarted", taskStartedHandler) + api.on(RooCodeEventName.TaskStarted, taskStartedHandler) const taskCompletedHandler = (id: string) => { if (id === taskId) { @@ -127,7 +127,7 @@ suite("Roo Code write_to_file Tool", function () { console.log("Task completed:", id) } } - api.on("taskCompleted", taskCompletedHandler) + api.on(RooCodeEventName.TaskCompleted, taskCompletedHandler) let taskId: string try { @@ -259,9 +259,9 @@ suite("Roo Code write_to_file Tool", function () { console.log("write_to_file tool was properly executed") } finally { // Clean up - api.off("message", messageHandler) - api.off("taskStarted", taskStartedHandler) - api.off("taskCompleted", taskCompletedHandler) + api.off(RooCodeEventName.Message, messageHandler) + api.off(RooCodeEventName.TaskStarted, taskStartedHandler) + api.off(RooCodeEventName.TaskCompleted, taskCompletedHandler) } }) @@ -302,7 +302,7 @@ suite("Roo Code write_to_file Tool", function () { console.log("Tool request:", message.text?.substring(0, 200)) } } - api.on("message", messageHandler) + api.on(RooCodeEventName.Message, messageHandler) // Listen for task events const taskStartedHandler = (id: string) => { @@ -311,7 +311,7 @@ suite("Roo Code write_to_file Tool", function () { console.log("Task started:", id) } } - api.on("taskStarted", taskStartedHandler) + api.on(RooCodeEventName.TaskStarted, taskStartedHandler) const taskCompletedHandler = (id: string) => { if (id === taskId) { @@ -319,7 +319,7 @@ suite("Roo Code write_to_file Tool", function () { console.log("Task completed:", id) } } - api.on("taskCompleted", taskCompletedHandler) + api.on(RooCodeEventName.TaskCompleted, taskCompletedHandler) let taskId: string try { @@ -440,9 +440,9 @@ suite("Roo Code write_to_file Tool", function () { console.log("write_to_file tool was properly executed") } finally { // Clean up - api.off("message", messageHandler) - api.off("taskStarted", taskStartedHandler) - api.off("taskCompleted", taskCompletedHandler) + api.off(RooCodeEventName.Message, messageHandler) + api.off(RooCodeEventName.TaskStarted, taskStartedHandler) + api.off(RooCodeEventName.TaskCompleted, taskCompletedHandler) } }) }) diff --git a/apps/vscode-e2e/src/suite/utils.ts b/apps/vscode-e2e/src/suite/utils.ts index d41fa9e8ed..874ded9acc 100644 --- a/apps/vscode-e2e/src/suite/utils.ts +++ b/apps/vscode-e2e/src/suite/utils.ts @@ -1,4 +1,4 @@ -import type { RooCodeAPI } from "@roo-code/types" +import { RooCodeEventName, type RooCodeAPI } from "@roo-code/types" type WaitForOptions = { timeout?: number @@ -46,7 +46,7 @@ type WaitUntilAbortedOptions = WaitForOptions & { export const waitUntilAborted = async ({ api, taskId, ...options }: WaitUntilAbortedOptions) => { const set = new Set() - api.on("taskAborted", (taskId) => set.add(taskId)) + api.on(RooCodeEventName.TaskAborted, (taskId) => set.add(taskId)) await waitFor(() => set.has(taskId), options) } @@ -57,7 +57,7 @@ type WaitUntilCompletedOptions = WaitForOptions & { export const waitUntilCompleted = async ({ api, taskId, ...options }: WaitUntilCompletedOptions) => { const set = new Set() - api.on("taskCompleted", (taskId) => set.add(taskId)) + api.on(RooCodeEventName.TaskCompleted, (taskId) => set.add(taskId)) await waitFor(() => set.has(taskId), options) } diff --git a/apps/vscode-nightly/esbuild.mjs b/apps/vscode-nightly/esbuild.mjs index 09fa948cd8..e45dbd3c3e 100644 --- a/apps/vscode-nightly/esbuild.mjs +++ b/apps/vscode-nightly/esbuild.mjs @@ -63,7 +63,7 @@ async function main() { build.onEnd(() => { copyPaths( [ - ["../README.vscode.md", "README.md"], + ["../README.md", "README.md"], ["../CHANGELOG.md", "CHANGELOG.md"], ["../LICENSE", "LICENSE"], ["../.env", ".env", { optional: true }], diff --git a/apps/web-evals/.env b/apps/web-evals/.env index 7970806bec..1bb6dd6dac 100644 --- a/apps/web-evals/.env +++ b/apps/web-evals/.env @@ -1 +1 @@ -DATABASE_URL=postgres://postgres:password@localhost:5432/evals_development +DATABASE_URL=postgres://postgres:password@localhost:5433/evals_development diff --git a/apps/web-evals/package.json b/apps/web-evals/package.json index b210fa085e..df8efec115 100644 --- a/apps/web-evals/package.json +++ b/apps/web-evals/package.json @@ -9,7 +9,7 @@ "format": "prettier --write src", "build": "next build", "start": "next start", - "clean": "rimraf .next .turbo" + "clean": "rimraf tsconfig.tsbuildinfo .next .turbo" }, "dependencies": { "@hookform/resolvers": "^5.1.1", diff --git a/apps/web-evals/scripts/check-services.sh b/apps/web-evals/scripts/check-services.sh index 104a472208..d72ffd54e8 100755 --- a/apps/web-evals/scripts/check-services.sh +++ b/apps/web-evals/scripts/check-services.sh @@ -5,13 +5,13 @@ if ! docker info &> /dev/null; then exit 1 fi -if ! nc -z localhost 5432 2>/dev/null; then +if ! nc -z postgres 5433 2>/dev/null; then echo "❌ PostgreSQL is not running on port 5432" echo "💡 Start it with: pnpm --filter @roo-code/evals db:up" exit 1 fi -if ! nc -z localhost 6379 2>/dev/null; then +if ! nc -z redis 6380 2>/dev/null; then echo "❌ Redis is not running on port 6379" echo "💡 Start it with: pnpm --filter @roo-code/evals redis:up" exit 1 diff --git a/apps/web-evals/src/app/runs/new/new-run.tsx b/apps/web-evals/src/app/runs/new/new-run.tsx index f8633611b6..41d35f3c4c 100644 --- a/apps/web-evals/src/app/runs/new/new-run.tsx +++ b/apps/web-evals/src/app/runs/new/new-run.tsx @@ -8,7 +8,7 @@ import { useForm, FormProvider } from "react-hook-form" import { zodResolver } from "@hookform/resolvers/zod" import fuzzysort from "fuzzysort" import { toast } from "sonner" -import { X, Rocket, Check, ChevronsUpDown, SlidersHorizontal, Book, CircleCheck } from "lucide-react" +import { X, Rocket, Check, ChevronsUpDown, SlidersHorizontal, CircleCheck } from "lucide-react" import { globalSettingsSchema, providerSettingsSchema, EVALS_SETTINGS, getModelId } from "@roo-code/types" @@ -49,11 +49,8 @@ import { PopoverContent, PopoverTrigger, ScrollArea, + ScrollBar, Slider, - Dialog, - DialogContent, - DialogTitle, - DialogFooter, } from "@/components/ui" import { SettingsDiff } from "./settings-diff" @@ -93,10 +90,6 @@ export function NewRun() { const [model, suite, settings] = watch(["model", "suite", "settings", "concurrency"]) - const [systemPromptDialogOpen, setSystemPromptDialogOpen] = useState(false) - const [systemPrompt, setSystemPrompt] = useState("") - const systemPromptRef = useRef(null) - const onSubmit = useCallback( async (values: CreateRun) => { try { @@ -104,13 +97,13 @@ export function NewRun() { values.settings = { ...(values.settings || {}), openRouterModelId: model } } - const { id } = await createRun({ ...values, systemPrompt }) + const { id } = await createRun(values) router.push(`/runs/${id}`) } catch (e) { toast.error(e instanceof Error ? e.message : "An unknown error occurred.") } }, - [mode, model, router, systemPrompt], + [mode, model, router], ) const onFilterModels = useCallback( @@ -269,29 +262,11 @@ export function NewRun() {
+ )} - - - - - - Override System Prompt -