diff --git a/.husky/pre-commit b/.husky/pre-commit index 111a1c0f915..8a87777657a 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -5,4 +5,11 @@ if [ "$branch" = "main" ]; then exit 1 fi -npx lint-staged +# Detect if running on Windows and use npx.cmd, otherwise use npx +if [ "$OS" = "Windows_NT" ]; then + npx_cmd="npx.cmd" +else + npx_cmd="npx" +fi + +"$npx_cmd" lint-staged \ No newline at end of file diff --git a/.husky/pre-push b/.husky/pre-push index a4fea4a34ae..79fe13835d1 100644 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -5,7 +5,14 @@ if [ "$branch" = "main" ]; then exit 1 fi -npm run compile +# Detect if running on Windows and use npm.cmd, otherwise use npm +if [ "$OS" = "Windows_NT" ]; then + npm_cmd="npm.cmd" +else + npm_cmd="npm" +fi + +"$npm_cmd" run compile # Check for new changesets. NEW_CHANGESETS=$(find .changeset -name "*.md" ! -name "README.md" | wc -l | tr -d ' ') diff --git a/.roomodes b/.roomodes index eb876abe22a..9d1719fa31c 100644 --- a/.roomodes +++ b/.roomodes @@ -22,7 +22,7 @@ "slug": "translate", "name": "Translate", "roleDefinition": "You are Roo, a linguistic specialist focused on translating and managing localization files. Your responsibility is to help maintain and update translation files for the application, ensuring consistency and accuracy across all language resources.", - "customInstructions": "# 1. SUPPORTED LANGUAGES AND LOCATION\n- Localize all strings into the following locale files: ca, de, en, es, fr, hi, it, ja, ko, pl, pt-BR, tr, vi, zh-CN, zh-TW\n- The VSCode extension has two main areas that require localization:\n * Core Extension: src/i18n/locales/ (extension backend)\n * WebView UI: webview-ui/src/i18n/locales/ (user interface)\n\n# 2. VOICE, STYLE AND TONE\n- Always use informal speech (e.g., \"du\" instead of \"Sie\" in German) for all translations\n- Maintain a direct and concise style that mirrors the tone of the original text\n- Carefully account for colloquialisms and idiomatic expressions in both source and target languages\n- Aim for culturally relevant and meaningful translations rather than literal translations\n- Preserve the personality and voice of the original content\n- Use natural-sounding language that feels native to speakers of the target language\n- Don't translate the word \"token\" as it means something specific in English that all languages will understand\n- Don't translate domain-specific words (especially technical terms like \"Prompt\") that are commonly used in English in the target language\n\n# 3. CORE EXTENSION LOCALIZATION (src/)\n- Located in src/i18n/locales/\n- NOT ALL strings in core source need internationalization - only user-facing messages\n- Internal error messages, debugging logs, and developer-facing messages should remain in English\n- The t() function is used with namespaces like 'core:errors.missingToolParameter'\n- Be careful when modifying interpolation variables; they must remain consistent across all translations\n- Some strings in formatResponse.ts are intentionally not internationalized since they're internal\n- When updating strings in core.json, maintain all existing interpolation variables\n- Check string usages in the codebase before making changes to ensure you're not breaking functionality\n\n# 4. WEBVIEW UI LOCALIZATION (webview-ui/src/)\n- Located in webview-ui/src/i18n/locales/\n- Uses standard React i18next patterns with the useTranslation hook\n- All user interface strings should be internationalized\n- Always use the Trans component for text with embedded components\n\n# 5. TECHNICAL IMPLEMENTATION\n- Use namespaces to organize translations logically\n- Handle pluralization using i18next's built-in capabilities\n- Implement proper interpolation for variables using {{variable}} syntax\n- Don't include defaultValue. The `en` translations are the fallback\n- Always use apply_diff instead of write_to_file when editing existing translation files (much faster and more reliable)\n- When using apply_diff, carefully identify the exact JSON structure to edit to avoid syntax errors\n- Placeholders (like {{variable}}) must remain exactly identical to the English source to maintain code integration and prevent syntax errors\n\n# 6. WORKFLOW AND APPROACH\n- First add or modify English strings, then ask for confirmation before translating to all other languages\n- Use this process for each localization task:\n 1. Identify where the string appears in the UI/codebase\n 2. Understand the context and purpose of the string\n 3. Update English translation first\n 4. Create appropriate translations for all other supported languages\n 5. Validate your changes with the missing translations script\n- Flag or comment if an English source string is incomplete (\"please see this...\") to avoid truncated or unclear translations\n- For UI elements, distinguish between:\n * Button labels: Use short imperative commands (\"Save\", \"Cancel\")\n * Tooltip text: Can be slightly more descriptive\n- Preserve the original perspective: If text is a user command directed at the software, ensure the translation maintains this direction, avoiding language that makes it sound like an instruction from the system to the user\n\n# 7. COMMON PITFALLS TO AVOID\n- Switching between formal and informal addressing styles - always stay informal (\"du\" not \"Sie\")\n- Translating or altering technical terms and brand names that should remain in English\n- Modifying or removing placeholders like {{variable}} - these must remain identical\n- Translating domain-specific terms that are commonly used in English in the target language\n- Changing the meaning or nuance of instructions or error messages\n- Forgetting to maintain consistent terminology throughout the translation\n\n# 8. QUALITY ASSURANCE\n- Maintain consistent terminology across all translations\n- Respect the JSON structure of translation files\n- Watch for placeholders and preserve them in translations\n- Be mindful of text length in UI elements when translating to languages that might require more characters\n- Use context-aware translations when the same string has different meanings\n- Always validate your translation work by running the missing translations script:\n ```\n node scripts/find-missing-translations.js\n ```\n- Address any missing translations identified by the script to ensure complete coverage across all locales\n\n# 9. TRANSLATOR'S CHECKLIST\n- ✓ Used informal tone consistently (\"du\" not \"Sie\")\n- ✓ Preserved all placeholders exactly as in the English source\n- ✓ Maintained consistent terminology with existing translations\n- ✓ Kept technical terms and brand names unchanged where appropriate\n- ✓ Preserved the original perspective (user→system vs system→user)\n- ✓ Adapted the text appropriately for UI context (buttons vs tooltips)", + "customInstructions": "# 1. SUPPORTED LANGUAGES AND LOCATION\n- Localize all strings into the following locale files: ca, de, en, es, fr, hi, it, ja, ko, pl, pt-BR, tr, vi, zh-CN, zh-TW\n- The VSCode extension has two main areas that require localization:\n * Core Extension: src/i18n/locales/ (extension backend)\n * WebView UI: webview-ui/src/i18n/locales/ (user interface)\n\n# 2. VOICE, STYLE AND TONE\n- Always use informal speech (e.g., \"du\" instead of \"Sie\" in German) for all translations\n- Maintain a direct and concise style that mirrors the tone of the original text\n- Carefully account for colloquialisms and idiomatic expressions in both source and target languages\n- Aim for culturally relevant and meaningful translations rather than literal translations\n- Preserve the personality and voice of the original content\n- Use natural-sounding language that feels native to speakers of the target language\n- Don't translate the word \"token\" as it means something specific in English that all languages will understand\n- Don't translate domain-specific words (especially technical terms like \"Prompt\") that are commonly used in English in the target language\n\n# 3. CORE EXTENSION LOCALIZATION (src/)\n- Located in src/i18n/locales/\n- NOT ALL strings in core source need internationalization - only user-facing messages\n- Internal error messages, debugging logs, and developer-facing messages should remain in English\n- The t() function is used with namespaces like 'core:errors.missingToolParameter'\n- Be careful when modifying interpolation variables; they must remain consistent across all translations\n- Some strings in formatResponse.ts are intentionally not internationalized since they're internal\n- When updating strings in core.json, maintain all existing interpolation variables\n- Check string usages in the codebase before making changes to ensure you're not breaking functionality\n\n# 4. WEBVIEW UI LOCALIZATION (webview-ui/src/)\n- Located in webview-ui/src/i18n/locales/\n- Uses standard React i18next patterns with the useTranslation hook\n- All user interface strings should be internationalized\n- Always use the Trans component with named components for text with embedded components\n\n example:\n\n`\"changeSettings\": \"You can always change this at the bottom of the settings\",`\n\n```\n \n }}\n />\n```\n\n# 5. TECHNICAL IMPLEMENTATION\n- Use namespaces to organize translations logically\n- Handle pluralization using i18next's built-in capabilities\n- Implement proper interpolation for variables using {{variable}} syntax\n- Don't include defaultValue. The `en` translations are the fallback\n- Always use apply_diff instead of write_to_file when editing existing translation files (much faster and more reliable)\n- When using apply_diff, carefully identify the exact JSON structure to edit to avoid syntax errors\n- Placeholders (like {{variable}}) must remain exactly identical to the English source to maintain code integration and prevent syntax errors\n\n# 6. WORKFLOW AND APPROACH\n- First add or modify English strings, then ask for confirmation before translating to all other languages\n- Use this process for each localization task:\n 1. Identify where the string appears in the UI/codebase\n 2. Understand the context and purpose of the string\n 3. Update English translation first\n 4. Create appropriate translations for all other supported languages\n 5. Validate your changes with the missing translations script\n- Flag or comment if an English source string is incomplete (\"please see this...\") to avoid truncated or unclear translations\n- For UI elements, distinguish between:\n * Button labels: Use short imperative commands (\"Save\", \"Cancel\")\n * Tooltip text: Can be slightly more descriptive\n- Preserve the original perspective: If text is a user command directed at the software, ensure the translation maintains this direction, avoiding language that makes it sound like an instruction from the system to the user\n\n# 7. COMMON PITFALLS TO AVOID\n- Switching between formal and informal addressing styles - always stay informal (\"du\" not \"Sie\")\n- Translating or altering technical terms and brand names that should remain in English\n- Modifying or removing placeholders like {{variable}} - these must remain identical\n- Translating domain-specific terms that are commonly used in English in the target language\n- Changing the meaning or nuance of instructions or error messages\n- Forgetting to maintain consistent terminology throughout the translation\n\n# 8. QUALITY ASSURANCE\n- Maintain consistent terminology across all translations\n- Respect the JSON structure of translation files\n- Watch for placeholders and preserve them in translations\n- Be mindful of text length in UI elements when translating to languages that might require more characters\n- Use context-aware translations when the same string has different meanings\n- Always validate your translation work by running the missing translations script:\n ```\n node scripts/find-missing-translations.js\n ```\n- Address any missing translations identified by the script to ensure complete coverage across all locales\n\n# 9. TRANSLATOR'S CHECKLIST\n- ✓ Used informal tone consistently (\"du\" not \"Sie\")\n- ✓ Preserved all placeholders exactly as in the English source\n- ✓ Maintained consistent terminology with existing translations\n- ✓ Kept technical terms and brand names unchanged where appropriate\n- ✓ Preserved the original perspective (user→system vs system→user)\n- ✓ Adapted the text appropriately for UI context (buttons vs tooltips)", "groups": [ "read", "command", diff --git a/.vscodeignore b/.vscodeignore index a8cac01b118..560897b9677 100644 --- a/.vscodeignore +++ b/.vscodeignore @@ -48,8 +48,9 @@ webview-ui/node_modules/** # Include default themes JSON files used in getTheme !src/integrations/theme/default-themes/** -# Include icons +# Include icons and images !assets/icons/** +!assets/images/** # Include .env file for telemetry !.env diff --git a/CHANGELOG.md b/CHANGELOG.md index 149369e3452..e2b00c38bc9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,49 @@ # Roo Code Changelog +## [3.10.4] - 2025-03-25 + +- Dynamically fetch instructions for creating/editing custom modes and MCP servers (thanks @diarmidmackenzie!) +- Added Gemini 2.5 Pro model to Google Gemini provider (thanks @samsilveira!) +- Add settings to control whether to auto-approve reads and writes outside of the workspace +- Update UX for chat text area (thanks @chadgauth!) +- Support a custom storage path for tasks (thanks @Chenjiayuan195!) +- Add a New Task command in the Command Palette (thanks @qdaxb!) +- Add R1 support checkbox to Open AI compatible provider to support QWQ (thanks @teddyOOXX!) +- Support test declarations in TypeScript tree-sitter queries (thanks @KJ7LNW!) +- Add Bedrock support for application-inference-profile (thanks @maekawataiki!) +- Rename and migrate global MCP and modes files (thanks @StevenTCramer!) +- Add watchPaths option to McpHub for file change detection (thanks @01Rian!) +- Read image responses from MCP calls (thanks @nevermorec!) +- Add taskCreated event to API and subscribe to Cline events earlier (thanks @wkordalski!) +- Fixes to numeric formatting suffix internationalization (thanks @feifei325!) +- Fix open tab support in the context mention suggestions (thanks @aheizi!) +- Better display of OpenRouter “overloaded” error messages +- Fix browser tool visibility in system prompt preview (thanks @cannuri!) +- Fix the supportsPromptCache value for OpenAI models (thanks @PeterDaveHello!) +- Fix readme links to docs (thanks @kvokka!) +- Run ‘npm audit fix’ on all of our libraries + +## [3.10.3] - 2025-03-23 + +- Update the welcome page to provide 1-click OAuth flows with LLM routers (thanks @dtrugman!) +- Switch to a more direct method of tracking OpenRouter tokens/spend +- Make partial file reads backwards-compatible with custom system prompts and give users more control over the chunk size +- Fix issues where questions and suggestions weren’t showing up for non-streaming models and were hard to read in some themes +- A variety of fixes and improvements to experimental multi-block diff (thanks @KJ7LNW!) +- Fix opacity of drop-down menus in settings (thanks @KJ7LNW!) +- Fix bugs with reading and mentioning binary files like PDFs +- Fix the pricing information for OpenRouter free models (thanks @Jdo300!) +- Fix an issue with our unit tests on Windows (thanks @diarmidmackenzie!) +- Fix a maxTokens issue for the Outbound provider (thanks @pugazhendhi-m!) +- Fix a line number issue with partial file reads (thanks @samhvw8!) + +## [3.10.2] - 2025-03-21 + +- Fixes to context mentions on Windows +- Fixes to German translations (thanks @cannuri!) +- Fixes to telemetry banner internationalization +- Sonnet 3.7 non-thinking now correctly uses 8192 max output tokens + ## [3.10.1] - 2025-03-20 - Make the suggested responses optional to not break overriden system prompts diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ff31a9176ac..4d9bf3789c2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -26,7 +26,68 @@ Looking for a good first contribution? Check out issues in the "Issue [Unassigne We also welcome contributions to our [documentation](https://docs.roocode.com/)! Whether it's fixing typos, improving existing guides, or creating new educational content - we'd love to build a community-driven repository of resources that helps everyone get the most out of Roo Code. You can click "Edit this page" on any page to quickly get to the right spot in Github to edit the file, or you can dive directly into https://github.com/RooVetGit/Roo-Code-Docs. -If you're planning to work on a bigger feature, please create a [feature request](https://github.com/RooVetGit/Roo-Code/discussions/categories/feature-requests?discussions_q=is%3Aopen+category%3A%22Feature+Requests%22+sort%3Atop) first so we can discuss whether it aligns with Roo Code's vision. +If you're planning to work on a bigger feature, please create a [feature request](https://github.com/RooVetGit/Roo-Code/discussions/categories/feature-requests?discussions_q=is%3Aopen+category%3A%22Feature+Requests%22+sort%3Atop) first so we can discuss whether it aligns with Roo Code's vision. You may also want to check our [Project Roadmap](#project-roadmap) below to see if your idea fits with our strategic direction. + +## Project Roadmap + +Roo Code has a clear development roadmap that guides our priorities and future direction. Understanding our roadmap can help you: + +- Align your contributions with project goals +- Identify areas where your expertise would be most valuable +- Understand the context behind certain design decisions +- Find inspiration for new features that support our vision + +Our current roadmap focuses on six key pillars: + +### Provider Support + +We aim to support as many providers well as we can: + +- More versatile "OpenAI Compatible" support +- xAI, Microsoft Azure AI, Alibaba Cloud Qwen, IBM Watsonx, Together AI, DeepInfra, Fireworks AI, Cohere, Perplexity AI, FriendliAI, Replicate +- Enhanced support for Ollama and LM Studio + +### Model Support + +We want Roo to work as well on as many models as possible, including local models: + +- Local model support through custom system prompting and workflows +- Benchmarking evals and test cases + +### System Support + +We want Roo to run well on everyone's computer: + +- Cross platform terminal integration +- Strong and consistent support for Mac, Windows, and Linux + +### Documentation + +We want comprehensive, accessible documentation for all users and contributors: + +- Expanded user guides and tutorials +- Clear API documentation +- Better contributor guidance +- Multilingual documentation resources +- Interactive examples and code samples + +### Stability + +We want to significantly decrease the number of bugs and increase automated testing: + +- Debug logging switch +- "Machine/Task Information" copy button for sending in with bug/support requests + +### Internationalization + +We want Roo to speak everyone's language: + +- 我们希望 Roo Code 说每个人的语言 +- Queremos que Roo Code hable el idioma de todos +- हम चाहते हैं कि Roo Code हर किसी की भाषा बोले +- نريد أن يتحدث Roo Code لغة الجميع + +We especially welcome contributions that advance our roadmap goals. If you're working on something that aligns with these pillars, please mention it in your PR description. ## Development Setup diff --git a/README.md b/README.md index 38c7894c4d1..a435a09e297 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ Roo Code 3.10 brings powerful productivity enhancements! ### Multiple Modes -Roo Code adapts to your needs with specialized [modes](https://docs.roocode.com/basic-usage/modes): +Roo Code adapts to your needs with specialized [modes](https://docs.roocode.com/basic-usage/using-modes): - **Code Mode:** For general-purpose coding tasks - **Architect Mode:** For planning and technical leadership @@ -87,7 +87,7 @@ Roo Code adapts to your needs with specialized [modes](https://docs.roocode.com/ ### Smart Tools -Roo Code comes with powerful [tools](https://docs.roocode.com/basic-usage/using-tools) that can: +Roo Code comes with powerful [tools](https://docs.roocode.com/basic-usage/how-tools-work) that can: - Read and write files in your project - Execute commands in your VS Code terminal @@ -180,23 +180,24 @@ Thanks to all our contributors who have helped make Roo Code better! -| mrubens
mrubens
| saoudrizwan
saoudrizwan
| cte
cte
| samhvw8
samhvw8
| daniel-lxs
daniel-lxs
| a8trejo
a8trejo
| -| :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | -| ColemanRoo
ColemanRoo
| stea9499
stea9499
| joemanley201
joemanley201
| System233
System233
| nissa-seru
nissa-seru
| jquanton
jquanton
| -| NyxJae
NyxJae
| hannesrudolph
hannesrudolph
| MuriloFP
MuriloFP
| punkpeye
punkpeye
| d-oit
d-oit
| monotykamary
monotykamary
| -| vigneshsubbiah16
vigneshsubbiah16
| lloydchang
lloydchang
| Szpadel
Szpadel
| psv2522
psv2522
| Premshay
Premshay
| Smartsheet-JB-Brown
Smartsheet-JB-Brown
| -| cannuri
cannuri
| lupuletic
lupuletic
| olweraltuve
olweraltuve
| wkordalski
wkordalski
| qdaxb
qdaxb
| feifei325
feifei325
| -| RaySinner
RaySinner
| pdecat
pdecat
| emshvac
emshvac
| afshawnlotfi
afshawnlotfi
| aitoroses
aitoroses
| dtrugman
dtrugman
| -| KJ7LNW
KJ7LNW
| sammcj
sammcj
| pugazhendhi-m
pugazhendhi-m
| Lunchb0ne
Lunchb0ne
| yt3trees
yt3trees
| yongjer
yongjer
| -| vincentsong
vincentsong
| eonghk
eonghk
| arthurauffray
arthurauffray
| aheizi
aheizi
| heyseth
heyseth
| philfung
philfung
| -| napter
napter
| mdp
mdp
| jcbdev
jcbdev
| GitlyHallows
GitlyHallows
| benzntech
benzntech
| anton-otee
anton-otee
| -| bannzai
bannzai
| dairui1
dairui1
| dqroid
dqroid
| im47cn
im47cn
| kinandan
kinandan
| kohii
kohii
| -| lightrabbit
lightrabbit
| olup
olup
| moqimoqidea
moqimoqidea
| mosleyit
mosleyit
| oprstchn
oprstchn
| philipnext
philipnext
| -| refactorthis
refactorthis
| samir-nimbly
samir-nimbly
| shaybc
shaybc
| shohei-ihaya
shohei-ihaya
| student20880
student20880
| teddyOOXX
teddyOOXX
| -| PretzelVector
PretzelVector
| AMHesch
AMHesch
| adamwlarson
adamwlarson
| alarno
alarno
| andreastempsch
andreastempsch
| Atlogit
Atlogit
| -| dleen
dleen
| dbasclpy
dbasclpy
| celestial-vault
celestial-vault
| franekp
franekp
| DeXtroTip
DeXtroTip
| hesara
hesara
| -| eltociear
eltociear
| libertyteeth
libertyteeth
| mamertofabian
mamertofabian
| marvijo-code
marvijo-code
| Sarke
Sarke
| tgfjt
tgfjt
| -| vladstudio
vladstudio
| ashktn
ashktn
| | | | | +| mrubens
mrubens
| saoudrizwan
saoudrizwan
| cte
cte
| samhvw8
samhvw8
| daniel-lxs
daniel-lxs
| a8trejo
a8trejo
| +| :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | +| ColemanRoo
ColemanRoo
| stea9499
stea9499
| joemanley201
joemanley201
| System233
System233
| nissa-seru
nissa-seru
| jquanton
jquanton
| +| NyxJae
NyxJae
| hannesrudolph
hannesrudolph
| MuriloFP
MuriloFP
| punkpeye
punkpeye
| d-oit
d-oit
| monotykamary
monotykamary
| +| cannuri
cannuri
| lloydchang
lloydchang
| vigneshsubbiah16
vigneshsubbiah16
| Szpadel
Szpadel
| lupuletic
lupuletic
| feifei325
feifei325
| +| qdaxb
qdaxb
| wkordalski
wkordalski
| Smartsheet-JB-Brown
Smartsheet-JB-Brown
| Premshay
Premshay
| psv2522
psv2522
| KJ7LNW
KJ7LNW
| +| olweraltuve
olweraltuve
| RaySinner
RaySinner
| afshawnlotfi
afshawnlotfi
| emshvac
emshvac
| pdecat
pdecat
| pugazhendhi-m
pugazhendhi-m
| +| Lunchb0ne
Lunchb0ne
| aheizi
aheizi
| sammcj
sammcj
| dtrugman
dtrugman
| aitoroses
aitoroses
| yt3trees
yt3trees
| +| yongjer
yongjer
| vincentsong
vincentsong
| teddyOOXX
teddyOOXX
| eonghk
eonghk
| arthurauffray
arthurauffray
| heyseth
heyseth
| +| philfung
philfung
| anton-otee
anton-otee
| benzntech
benzntech
| diarmidmackenzie
diarmidmackenzie
| GitlyHallows
GitlyHallows
| jcbdev
jcbdev
| +| Chenjiayuan195
Chenjiayuan195
| mdp
mdp
| napter
napter
| AMHesch
AMHesch
| vladstudio
vladstudio
| Yoshino-Yukitaro
Yoshino-Yukitaro
| +| ashktn
ashktn
| bannzai
bannzai
| dairui1
dairui1
| dqroid
dqroid
| im47cn
im47cn
| kinandan
kinandan
| +| kohii
kohii
| lightrabbit
lightrabbit
| olup
olup
| moqimoqidea
moqimoqidea
| mosleyit
mosleyit
| oprstchn
oprstchn
| +| philipnext
philipnext
| refactorthis
refactorthis
| samir-nimbly
samir-nimbly
| shaybc
shaybc
| shohei-ihaya
shohei-ihaya
| student20880
student20880
| +| cdlliuy
cdlliuy
| PretzelVector
PretzelVector
| nevermorec
nevermorec
| adamwlarson
adamwlarson
| alarno
alarno
| andreastempsch
andreastempsch
| +| Atlogit
Atlogit
| chadgauth
chadgauth
| dleen
dleen
| dbasclpy
dbasclpy
| celestial-vault
celestial-vault
| franekp
franekp
| +| DeXtroTip
DeXtroTip
| hesara
hesara
| eltociear
eltociear
| Jdo300
Jdo300
| libertyteeth
libertyteeth
| mamertofabian
mamertofabian
| +| marvijo-code
marvijo-code
| kvokka
kvokka
| | | | | diff --git a/assets/images/openrouter.png b/assets/images/openrouter.png new file mode 100644 index 00000000000..7f2c18d1209 Binary files /dev/null and b/assets/images/openrouter.png differ diff --git a/assets/images/requesty.png b/assets/images/requesty.png new file mode 100644 index 00000000000..1a250ccd95d Binary files /dev/null and b/assets/images/requesty.png differ diff --git a/locales/ca/CONTRIBUTING.md b/locales/ca/CONTRIBUTING.md index c65ce5bad14..5f2beefc79e 100644 --- a/locales/ca/CONTRIBUTING.md +++ b/locales/ca/CONTRIBUTING.md @@ -26,7 +26,68 @@ Buscant una bona primera contribució? Consulteu les incidències a la secció " També donem la benvinguda a contribucions a la nostra [documentació](https://docs.roocode.com/)! Ja sigui corregint errors tipogràfics, millorant guies existents o creant nou contingut educatiu - ens encantaria construir un repositori de recursos impulsat per la comunitat que ajudi a tothom a aprofitar al màxim Roo Code. Podeu fer clic a "Editar aquesta pàgina" a qualsevol pàgina per arribar ràpidament al lloc correcte a Github per editar el fitxer, o podeu anar directament a https://github.com/RooVetGit/Roo-Code-Docs. -Si esteu planejant treballar en una funcionalitat més gran, si us plau creeu primer una [sol·licitud de funcionalitat](https://github.com/RooVetGit/Roo-Code/discussions/categories/feature-requests?discussions_q=is%3Aopen+category%3A%22Feature+Requests%22+sort%3Atop) perquè puguem discutir si s'alinea amb la visió de Roo Code. +Si esteu planejant treballar en una funcionalitat més gran, si us plau creeu primer una [sol·licitud de funcionalitat](https://github.com/RooVetGit/Roo-Code/discussions/categories/feature-requests?discussions_q=is%3Aopen+category%3A%22Feature+Requests%22+sort%3Atop) perquè puguem discutir si s'alinea amb la visió de Roo Code. També podeu consultar el nostre [Full de Ruta del Projecte](#full-de-ruta-del-projecte) a continuació per veure si la vostra idea s'ajusta a la nostra direcció estratègica. + +## Full de Ruta del Projecte + +Roo Code té un full de ruta de desenvolupament clar que guia les nostres prioritats i direcció futura. Entendre el nostre full de ruta us pot ajudar a: + +- Alinear les vostres contribucions amb els objectius del projecte +- Identificar àrees on la vostra experiència seria més valuosa +- Entendre el context darrere de certes decisions de disseny +- Trobar inspiració per a noves funcionalitats que donin suport a la nostra visió + +El nostre full de ruta actual se centra en sis pilars clau: + +### Suport de Proveïdors + +Aspirem a donar suport a tants proveïdors com sigui possible: + +- Suport més versàtil per a "OpenAI Compatible" +- xAI, Microsoft Azure AI, Alibaba Cloud Qwen, IBM Watsonx, Together AI, DeepInfra, Fireworks AI, Cohere, Perplexity AI, FriendliAI, Replicate +- Suport millorat per a Ollama i LM Studio + +### Suport de Models + +Volem que Roo funcioni tan bé com sigui possible amb tants models com sigui possible, inclosos els models locals: + +- Suport de models locals a través de prompts de sistema personalitzats i fluxos de treball +- Avaluacions de rendiment i casos de prova + +### Suport de Sistemes + +Volem que Roo funcioni bé a l'ordinador de tothom: + +- Integració de terminal multiplataforma +- Suport sòlid i consistent per a Mac, Windows i Linux + +### Documentació + +Volem documentació completa i accessible per a tots els usuaris i col·laboradors: + +- Guies d'usuari i tutorials ampliats +- Documentació clara de l'API +- Millor orientació per als col·laboradors +- Recursos de documentació multilingües +- Exemples interactius i mostres de codi + +### Estabilitat + +Volem reduir significativament el nombre d'errors i augmentar les proves automatitzades: + +- Interruptor de registre de depuració +- Botó de còpia "Informació de Màquina/Tasca" per enviar amb sol·licituds d'error/suport + +### Internacionalització + +Volem que Roo parli l'idioma de tothom: + +- 我们希望 Roo Code 说每个人的语言 +- Queremos que Roo Code hable el idioma de todos +- हम चाहते हैं कि Roo Code हर किसी की भाषा बोले +- نريد أن يتحدث Roo Code لغة الجميع + +Donem especialment la benvinguda a contribucions que avancin els nostres objectius del full de ruta. Si esteu treballant en alguna cosa que s'alinea amb aquests pilars, si us plau mencioneu-ho a la descripció del vostre PR. ## Configuració de desenvolupament diff --git a/locales/ca/README.md b/locales/ca/README.md index 7c009d9fa85..fd37824077c 100644 --- a/locales/ca/README.md +++ b/locales/ca/README.md @@ -76,7 +76,7 @@ Roo Code 3.10 aporta potents millores de productivitat! ### Múltiples modes -Roo Code s'adapta a les vostres necessitats amb [modes](https://docs.roocode.com/basic-usage/modes) especialitzats: +Roo Code s'adapta a les vostres necessitats amb [modes](https://docs.roocode.com/basic-usage/using-modes) especialitzats: - **Mode Codi:** Per a tasques de programació de propòsit general - **Mode Arquitecte:** Per a planificació i lideratge tècnic @@ -86,7 +86,7 @@ Roo Code s'adapta a les vostres necessitats amb [modes](https://docs.roocode.com ### Eines intel·ligents -Roo Code ve amb potents [eines](https://docs.roocode.com/basic-usage/using-tools) que poden: +Roo Code ve amb potents [eines](https://docs.roocode.com/basic-usage/how-tools-work) que poden: - Llegir i escriure fitxers en el vostre projecte - Executar comandes en el vostre terminal de VS Code @@ -182,19 +182,20 @@ Gràcies a tots els nostres col·laboradors que han ajudat a millorar Roo Code! |:---:|:---:|:---:|:---:|:---:|:---:| |ColemanRoo
ColemanRoo
|stea9499
stea9499
|joemanley201
joemanley201
|System233
System233
|nissa-seru
nissa-seru
|jquanton
jquanton
| |NyxJae
NyxJae
|hannesrudolph
hannesrudolph
|MuriloFP
MuriloFP
|punkpeye
punkpeye
|d-oit
d-oit
|monotykamary
monotykamary
| -|vigneshsubbiah16
vigneshsubbiah16
|lloydchang
lloydchang
|Szpadel
Szpadel
|psv2522
psv2522
|Premshay
Premshay
|Smartsheet-JB-Brown
Smartsheet-JB-Brown
| -|cannuri
cannuri
|lupuletic
lupuletic
|olweraltuve
olweraltuve
|wkordalski
wkordalski
|qdaxb
qdaxb
|feifei325
feifei325
| -|RaySinner
RaySinner
|pdecat
pdecat
|emshvac
emshvac
|afshawnlotfi
afshawnlotfi
|aitoroses
aitoroses
|dtrugman
dtrugman
| -|KJ7LNW
KJ7LNW
|sammcj
sammcj
|pugazhendhi-m
pugazhendhi-m
|Lunchb0ne
Lunchb0ne
|yt3trees
yt3trees
|yongjer
yongjer
| -|vincentsong
vincentsong
|eonghk
eonghk
|arthurauffray
arthurauffray
|aheizi
aheizi
|heyseth
heyseth
|philfung
philfung
| -|napter
napter
|mdp
mdp
|jcbdev
jcbdev
|GitlyHallows
GitlyHallows
|benzntech
benzntech
|anton-otee
anton-otee
| -|bannzai
bannzai
|dairui1
dairui1
|dqroid
dqroid
|im47cn
im47cn
|kinandan
kinandan
|kohii
kohii
| -|lightrabbit
lightrabbit
|olup
olup
|moqimoqidea
moqimoqidea
|mosleyit
mosleyit
|oprstchn
oprstchn
|philipnext
philipnext
| -|refactorthis
refactorthis
|samir-nimbly
samir-nimbly
|shaybc
shaybc
|shohei-ihaya
shohei-ihaya
|student20880
student20880
|teddyOOXX
teddyOOXX
| -|PretzelVector
PretzelVector
|AMHesch
AMHesch
|adamwlarson
adamwlarson
|alarno
alarno
|andreastempsch
andreastempsch
|Atlogit
Atlogit
| -|dleen
dleen
|dbasclpy
dbasclpy
|celestial-vault
celestial-vault
|franekp
franekp
|DeXtroTip
DeXtroTip
|hesara
hesara
| -|eltociear
eltociear
|libertyteeth
libertyteeth
|mamertofabian
mamertofabian
|marvijo-code
marvijo-code
|Sarke
Sarke
|tgfjt
tgfjt
| -|vladstudio
vladstudio
|ashktn
ashktn
| | | | | +|cannuri
cannuri
|lloydchang
lloydchang
|vigneshsubbiah16
vigneshsubbiah16
|Szpadel
Szpadel
|lupuletic
lupuletic
|feifei325
feifei325
| +|qdaxb
qdaxb
|wkordalski
wkordalski
|Smartsheet-JB-Brown
Smartsheet-JB-Brown
|Premshay
Premshay
|psv2522
psv2522
|KJ7LNW
KJ7LNW
| +|olweraltuve
olweraltuve
|RaySinner
RaySinner
|afshawnlotfi
afshawnlotfi
|emshvac
emshvac
|pdecat
pdecat
|pugazhendhi-m
pugazhendhi-m
| +|Lunchb0ne
Lunchb0ne
|aheizi
aheizi
|sammcj
sammcj
|dtrugman
dtrugman
|aitoroses
aitoroses
|yt3trees
yt3trees
| +|yongjer
yongjer
|vincentsong
vincentsong
|teddyOOXX
teddyOOXX
|eonghk
eonghk
|arthurauffray
arthurauffray
|heyseth
heyseth
| +|philfung
philfung
|anton-otee
anton-otee
|benzntech
benzntech
|diarmidmackenzie
diarmidmackenzie
|GitlyHallows
GitlyHallows
|jcbdev
jcbdev
| +|Chenjiayuan195
Chenjiayuan195
|mdp
mdp
|napter
napter
|AMHesch
AMHesch
|vladstudio
vladstudio
|Yoshino-Yukitaro
Yoshino-Yukitaro
| +|ashktn
ashktn
|bannzai
bannzai
|dairui1
dairui1
|dqroid
dqroid
|im47cn
im47cn
|kinandan
kinandan
| +|kohii
kohii
|lightrabbit
lightrabbit
|olup
olup
|moqimoqidea
moqimoqidea
|mosleyit
mosleyit
|oprstchn
oprstchn
| +|philipnext
philipnext
|refactorthis
refactorthis
|samir-nimbly
samir-nimbly
|shaybc
shaybc
|shohei-ihaya
shohei-ihaya
|student20880
student20880
| +|cdlliuy
cdlliuy
|PretzelVector
PretzelVector
|nevermorec
nevermorec
|adamwlarson
adamwlarson
|alarno
alarno
|andreastempsch
andreastempsch
| +|Atlogit
Atlogit
|chadgauth
chadgauth
|dleen
dleen
|dbasclpy
dbasclpy
|celestial-vault
celestial-vault
|franekp
franekp
| +|DeXtroTip
DeXtroTip
|hesara
hesara
|eltociear
eltociear
|Jdo300
Jdo300
|libertyteeth
libertyteeth
|mamertofabian
mamertofabian
| +|marvijo-code
marvijo-code
|kvokka
kvokka
| | | | | ## Llicència diff --git a/locales/de/CONTRIBUTING.md b/locales/de/CONTRIBUTING.md index 7851e6103be..1aa7a5b6c2a 100644 --- a/locales/de/CONTRIBUTING.md +++ b/locales/de/CONTRIBUTING.md @@ -1,12 +1,12 @@ # Beitrag zu Roo Code -Wir freuen uns, dass Sie Interesse haben, zu Roo Code beizutragen. Ob Sie einen Fehler beheben, eine Funktion hinzufügen oder unsere Dokumentation verbessern, jeder Beitrag macht Roo Code intelligenter! Um unsere Community lebendig und einladend zu halten, müssen sich alle Mitglieder an unseren [Verhaltenskodex](CODE_OF_CONDUCT.md) halten. +Wir freuen uns, dass du Interesse hast, zu Roo Code beizutragen. Ob du einen Fehler behebst, eine Funktion hinzufügst oder unsere Dokumentation verbesserst, jeder Beitrag macht Roo Code intelligenter! Um unsere Community lebendig und einladend zu halten, müssen sich alle Mitglieder an unseren [Verhaltenskodex](CODE_OF_CONDUCT.md) halten. ## Treten Sie unserer Community bei -Wir ermutigen alle Mitwirkenden nachdrücklich, unserer [Discord-Community](https://discord.gg/roocode) beizutreten! Teil unseres Discord-Servers zu sein, hilft Ihnen: +Wir ermutigen alle Mitwirkenden nachdrücklich, unserer [Discord-Community](https://discord.gg/roocode) beizutreten! Teil unseres Discord-Servers zu sein, hilft dir: -- Echtzeit-Hilfe und Anleitung für Ihre Beiträge zu erhalten +- Echtzeit-Hilfe und Anleitung für deine Beiträge zu erhalten - Mit anderen Mitwirkenden und Kernteammitgliedern in Kontakt zu treten - Über Projektentwicklungen und Prioritäten auf dem Laufenden zu bleiben - An Diskussionen teilzunehmen, die die Zukunft von Roo Code gestalten @@ -14,46 +14,107 @@ Wir ermutigen alle Mitwirkenden nachdrücklich, unserer [Discord-Community](http ## Fehler oder Probleme melden -Fehlerberichte helfen, Roo Code für alle besser zu machen! Bevor Sie ein neues Issue erstellen, bitte [suchen Sie in bestehenden Issues](https://github.com/RooVetGit/Roo-Code/issues), um Duplikate zu vermeiden. Wenn Sie bereit sind, einen Fehler zu melden, gehen Sie zu unserer [Issues-Seite](https://github.com/RooVetGit/Roo-Code/issues/new/choose), wo Sie eine Vorlage finden, die Ihnen beim Ausfüllen der relevanten Informationen hilft. +Fehlerberichte helfen, Roo Code für alle besser zu machen! Bevor du ein neues Issue erstellst, bitte [suche in bestehenden Issues](https://github.com/RooVetGit/Roo-Code/issues), um Duplikate zu vermeiden. Wenn du bereit bist, einen Fehler zu melden, gehe zu unserer [Issues-Seite](https://github.com/RooVetGit/Roo-Code/issues/new/choose), wo du eine Vorlage findest, die dir beim Ausfüllen der relevanten Informationen hilft.
- 🔐 Wichtig: Wenn Sie eine Sicherheitslücke entdecken, nutzen Sie bitte das Github-Sicherheitstool, um sie privat zu melden. + 🔐 Wichtig: Wenn du eine Sicherheitslücke entdeckst, nutze bitte das Github-Sicherheitstool, um sie privat zu melden.
## Entscheiden, woran Sie arbeiten möchten -Suchen Sie nach einem guten ersten Beitrag? Schauen Sie sich Issues im Abschnitt "Issue [Unassigned]" unseres [Roo Code Issues](https://github.com/orgs/RooVetGit/projects/1) Github-Projekts an. Diese sind speziell für neue Mitwirkende und Bereiche ausgewählt, in denen wir Hilfe gebrauchen könnten! +Suchst du nach einem guten ersten Beitrag? Schau dir Issues im Abschnitt "Issue [Unassigned]" unseres [Roo Code Issues](https://github.com/orgs/RooVetGit/projects/1) Github-Projekts an. Diese sind speziell für neue Mitwirkende und Bereiche ausgewählt, in denen wir Hilfe gebrauchen könnten! -Wir begrüßen auch Beiträge zu unserer [Dokumentation](https://docs.roocode.com/)! Ob Sie Tippfehler korrigieren, bestehende Anleitungen verbessern oder neue Bildungsinhalte erstellen - wir würden gerne ein Community-geführtes Repository von Ressourcen aufbauen, das jedem hilft, das Beste aus Roo Code herauszuholen. Sie können auf jeder Seite auf "Edit this page" klicken, um schnell zur richtigen Stelle in Github zu gelangen, um die Datei zu bearbeiten, oder Sie können direkt zu https://github.com/RooVetGit/Roo-Code-Docs gehen. +Wir begrüßen auch Beiträge zu unserer [Dokumentation](https://docs.roocode.com/)! Ob du Tippfehler korrigierst, bestehende Anleitungen verbesserst oder neue Bildungsinhalte erstellst - wir würden gerne ein Community-geführtes Repository von Ressourcen aufbauen, das jedem hilft, das Beste aus Roo Code herauszuholen. Du kannst auf jeder Seite auf "Edit this page" klicken, um schnell zur richtigen Stelle in Github zu gelangen, um die Datei zu bearbeiten, oder du kannst direkt zu https://github.com/RooVetGit/Roo-Code-Docs gehen. -Wenn Sie an einer größeren Funktion arbeiten möchten, erstellen Sie bitte zuerst eine [Funktionsanfrage](https://github.com/RooVetGit/Roo-Code/discussions/categories/feature-requests?discussions_q=is%3Aopen+category%3A%22Feature+Requests%22+sort%3Atop), damit wir diskutieren können, ob sie mit der Vision von Roo Code übereinstimmt. +Wenn du an einer größeren Funktion arbeiten möchtest, erstelle bitte zuerst eine [Funktionsanfrage](https://github.com/RooVetGit/Roo-Code/discussions/categories/feature-requests?discussions_q=is%3Aopen+category%3A%22Feature+Requests%22+sort%3Atop), damit wir diskutieren können, ob sie mit der Vision von Roo Code übereinstimmt. Du kannst auch unseren [Projekt-Fahrplan](#projekt-fahrplan) unten überprüfen, um zu sehen, ob deine Idee mit unserer strategischen Ausrichtung übereinstimmt. + +## Projekt-Fahrplan + +Roo Code hat einen klaren Entwicklungsfahrplan, der unsere Prioritäten und zukünftige Richtung leitet. Das Verständnis unseres Fahrplans kann dir helfen: + +- Deine Beiträge mit den Projektzielen abzustimmen +- Bereiche zu identifizieren, in denen deine Expertise am wertvollsten wäre +- Den Kontext hinter bestimmten Designentscheidungen zu verstehen +- Inspiration für neue Funktionen zu finden, die unsere Vision unterstützen + +Unser aktueller Fahrplan konzentriert sich auf sechs Schlüsselsäulen: + +### Provider-Unterstützung + +Wir möchten so viele Provider wie möglich gut unterstützen: + +- Vielseitigere "OpenAI Compatible" Unterstützung +- xAI, Microsoft Azure AI, Alibaba Cloud Qwen, IBM Watsonx, Together AI, DeepInfra, Fireworks AI, Cohere, Perplexity AI, FriendliAI, Replicate +- Verbesserte Unterstützung für Ollama und LM Studio + +### Modell-Unterstützung + +Wir wollen, dass Roo mit so vielen Modellen wie möglich gut funktioniert, einschließlich lokaler Modelle: + +- Lokale Modellunterstützung durch benutzerdefiniertes System-Prompting und Workflows +- Benchmark-Evaluierungen und Testfälle + +### System-Unterstützung + +Wir wollen, dass Roo auf jedem Computer gut läuft: + +- Plattformübergreifende Terminal-Integration +- Starke und konsistente Unterstützung für Mac, Windows und Linux + +### Dokumentation + +Wir wollen umfassende, zugängliche Dokumentation für alle Benutzer und Mitwirkenden: + +- Erweiterte Benutzerhandbücher und Tutorials +- Klare API-Dokumentation +- Bessere Anleitung für Mitwirkende +- Mehrsprachige Dokumentationsressourcen +- Interaktive Beispiele und Codebeispiele + +### Stabilität + +Wir wollen die Anzahl der Fehler deutlich reduzieren und die automatisierte Testabdeckung erhöhen: + +- Debug-Logging-Schalter +- "Maschinen-/Aufgabeninformationen" Kopier-Button zum Einsenden mit Fehler-/Support-Anfragen + +### Internationalisierung + +Wir wollen, dass Roo die Sprache aller spricht: + +- 我们希望 Roo Code 说每个人的语言 +- Queremos que Roo Code hable el idioma de todos +- हम चाहते हैं कि Roo Code हर किसी की भाषा बोले +- نريد أن يتحدث Roo Code لغة الجميع + +Wir begrüßen besonders Beiträge, die unsere Fahrplanziele voranbringen. Wenn du an etwas arbeitest, das mit diesen Säulen übereinstimmt, erwähne es bitte in deiner PR-Beschreibung. ## Entwicklungs-Setup -1. **Klonen** Sie das Repository: +1. **Klone** das Repository: ```sh git clone https://github.com/RooVetGit/Roo-Code.git ``` -2. **Installieren Sie Abhängigkeiten**: +2. **Installiere Abhängigkeiten**: ```sh npm run install:all ``` -3. **Starten Sie die Webansicht (Vite/React-App mit HMR)**: +3. **Starte die Webansicht (Vite/React-App mit HMR)**: ```sh npm run dev ``` 4. **Debugging**: - Drücken Sie `F5` (oder **Ausführen** → **Debugging starten**) in VSCode, um eine neue Sitzung mit geladenem Roo Code zu öffnen. + Drücke `F5` (oder **Ausführen** → **Debugging starten**) in VSCode, um eine neue Sitzung mit geladenem Roo Code zu öffnen. Änderungen an der Webansicht erscheinen sofort. Änderungen an der Kern-Erweiterung erfordern einen Neustart des Erweiterungs-Hosts. -Alternativ können Sie eine .vsix-Datei erstellen und direkt in VSCode installieren: +Alternativ kannst du eine .vsix-Datei erstellen und direkt in VSCode installieren: ```sh npm run build @@ -67,46 +128,46 @@ code --install-extension bin/roo-cline-.vsix ## Code schreiben und einreichen -Jeder kann Code zu Roo Code beitragen, aber wir bitten Sie, diese Richtlinien zu befolgen, um sicherzustellen, dass Ihre Beiträge reibungslos integriert werden können: +Jeder kann Code zu Roo Code beitragen, aber wir bitten dich, diese Richtlinien zu befolgen, um sicherzustellen, dass deine Beiträge reibungslos integriert werden können: 1. **Halten Sie Pull Requests fokussiert** - - Beschränken Sie PRs auf eine einzelne Funktion oder Fehlerbehebung - - Teilen Sie größere Änderungen in kleinere, zusammenhängende PRs auf - - Unterteilen Sie Änderungen in logische Commits, die unabhängig überprüft werden können + - Beschränke PRs auf eine einzelne Funktion oder Fehlerbehebung + - Teile größere Änderungen in kleinere, zusammenhängende PRs auf + - Unterteile Änderungen in logische Commits, die unabhängig überprüft werden können 2. **Codequalität** - Alle PRs müssen CI-Prüfungen bestehen, die sowohl Linting als auch Formatierung umfassen - - Beheben Sie alle ESLint-Warnungen oder -Fehler vor dem Einreichen - - Reagieren Sie auf alle Rückmeldungen von Ellipsis, unserem automatisierten Code-Review-Tool - - Folgen Sie TypeScript-Best-Practices und halten Sie die Typsicherheit aufrecht + - Behebe alle ESLint-Warnungen oder -Fehler vor dem Einreichen + - Reagiere auf alle Rückmeldungen von Ellipsis, unserem automatisierten Code-Review-Tool + - Folge TypeScript-Best-Practices und halte die Typsicherheit aufrecht 3. **Testen** - - Fügen Sie Tests für neue Funktionen hinzu - - Führen Sie `npm test` aus, um sicherzustellen, dass alle Tests bestanden werden - - Aktualisieren Sie bestehende Tests, wenn Ihre Änderungen diese beeinflussen - - Schließen Sie sowohl Unit-Tests als auch Integrationstests ein, wo angemessen + - Füge Tests für neue Funktionen hinzu + - Führe `npm test` aus, um sicherzustellen, dass alle Tests bestanden werden + - Aktualisiere bestehende Tests, wenn deine Änderungen diese beeinflussen + - Schließe sowohl Unit-Tests als auch Integrationstests ein, wo angemessen 4. **Commit-Richtlinien** - - Schreiben Sie klare, beschreibende Commit-Nachrichten - - Verweisen Sie auf relevante Issues in Commits mit #issue-nummer + - Schreibe klare, beschreibende Commit-Nachrichten + - Verweise auf relevante Issues in Commits mit #issue-nummer 5. **Vor dem Einreichen** - - Rebasen Sie Ihren Branch auf den neuesten main-Branch - - Stellen Sie sicher, dass Ihr Branch erfolgreich baut - - Überprüfen Sie erneut, dass alle Tests bestanden werden - - Prüfen Sie Ihre Änderungen auf Debug-Code oder Konsolenausgaben + - Rebase deinen Branch auf den neuesten main-Branch + - Stelle sicher, dass dein Branch erfolgreich baut + - Überprüfe erneut, dass alle Tests bestanden werden + - Prüfe deine Änderungen auf Debug-Code oder Konsolenausgaben 6. **Pull Request Beschreibung** - - Beschreiben Sie klar, was Ihre Änderungen bewirken - - Fügen Sie Schritte zum Testen der Änderungen hinzu - - Listen Sie alle Breaking Changes auf - - Fügen Sie Screenshots für UI-Änderungen hinzu + - Beschreibe klar, was deine Änderungen bewirken + - Füge Schritte zum Testen der Änderungen hinzu + - Liste alle Breaking Changes auf + - Füge Screenshots für UI-Änderungen hinzu ## Beitragsvereinbarung -Durch das Einreichen eines Pull Requests stimmen Sie zu, dass Ihre Beiträge unter derselben Lizenz wie das Projekt ([Apache 2.0](../LICENSE)) lizenziert werden. +Durch das Einreichen eines Pull Requests stimmst du zu, dass deine Beiträge unter derselben Lizenz wie das Projekt ([Apache 2.0](../LICENSE)) lizenziert werden. diff --git a/locales/de/README.md b/locales/de/README.md index 50d587d541d..a8b19d48bc6 100644 --- a/locales/de/README.md +++ b/locales/de/README.md @@ -76,7 +76,7 @@ Roo Code 3.10 bringt leistungsstarke Produktivitätsverbesserungen! ### Mehrere Modi -Roo Code passt sich Ihren Bedürfnissen mit spezialisierten [Modi](https://docs.roocode.com/basic-usage/modes) an: +Roo Code passt sich Ihren Bedürfnissen mit spezialisierten [Modi](https://docs.roocode.com/basic-usage/using-modes) an: - **Code-Modus:** Für allgemeine Coding-Aufgaben - **Architekten-Modus:** Für Planung und technische Führung @@ -86,7 +86,7 @@ Roo Code passt sich Ihren Bedürfnissen mit spezialisierten [Modi](https://docs. ### Intelligente Tools -Roo Code kommt mit leistungsstarken [Tools](https://docs.roocode.com/basic-usage/using-tools), die können: +Roo Code kommt mit leistungsstarken [Tools](https://docs.roocode.com/basic-usage/how-tools-work), die können: - Dateien in Ihrem Projekt lesen und schreiben - Befehle in Ihrem VS Code-Terminal ausführen @@ -182,19 +182,20 @@ Danke an alle unsere Mitwirkenden, die geholfen haben, Roo Code zu verbessern! |:---:|:---:|:---:|:---:|:---:|:---:| |ColemanRoo
ColemanRoo
|stea9499
stea9499
|joemanley201
joemanley201
|System233
System233
|nissa-seru
nissa-seru
|jquanton
jquanton
| |NyxJae
NyxJae
|hannesrudolph
hannesrudolph
|MuriloFP
MuriloFP
|punkpeye
punkpeye
|d-oit
d-oit
|monotykamary
monotykamary
| -|vigneshsubbiah16
vigneshsubbiah16
|lloydchang
lloydchang
|Szpadel
Szpadel
|psv2522
psv2522
|Premshay
Premshay
|Smartsheet-JB-Brown
Smartsheet-JB-Brown
| -|cannuri
cannuri
|lupuletic
lupuletic
|olweraltuve
olweraltuve
|wkordalski
wkordalski
|qdaxb
qdaxb
|feifei325
feifei325
| -|RaySinner
RaySinner
|pdecat
pdecat
|emshvac
emshvac
|afshawnlotfi
afshawnlotfi
|aitoroses
aitoroses
|dtrugman
dtrugman
| -|KJ7LNW
KJ7LNW
|sammcj
sammcj
|pugazhendhi-m
pugazhendhi-m
|Lunchb0ne
Lunchb0ne
|yt3trees
yt3trees
|yongjer
yongjer
| -|vincentsong
vincentsong
|eonghk
eonghk
|arthurauffray
arthurauffray
|aheizi
aheizi
|heyseth
heyseth
|philfung
philfung
| -|napter
napter
|mdp
mdp
|jcbdev
jcbdev
|GitlyHallows
GitlyHallows
|benzntech
benzntech
|anton-otee
anton-otee
| -|bannzai
bannzai
|dairui1
dairui1
|dqroid
dqroid
|im47cn
im47cn
|kinandan
kinandan
|kohii
kohii
| -|lightrabbit
lightrabbit
|olup
olup
|moqimoqidea
moqimoqidea
|mosleyit
mosleyit
|oprstchn
oprstchn
|philipnext
philipnext
| -|refactorthis
refactorthis
|samir-nimbly
samir-nimbly
|shaybc
shaybc
|shohei-ihaya
shohei-ihaya
|student20880
student20880
|teddyOOXX
teddyOOXX
| -|PretzelVector
PretzelVector
|AMHesch
AMHesch
|adamwlarson
adamwlarson
|alarno
alarno
|andreastempsch
andreastempsch
|Atlogit
Atlogit
| -|dleen
dleen
|dbasclpy
dbasclpy
|celestial-vault
celestial-vault
|franekp
franekp
|DeXtroTip
DeXtroTip
|hesara
hesara
| -|eltociear
eltociear
|libertyteeth
libertyteeth
|mamertofabian
mamertofabian
|marvijo-code
marvijo-code
|Sarke
Sarke
|tgfjt
tgfjt
| -|vladstudio
vladstudio
|ashktn
ashktn
| | | | | +|cannuri
cannuri
|lloydchang
lloydchang
|vigneshsubbiah16
vigneshsubbiah16
|Szpadel
Szpadel
|lupuletic
lupuletic
|feifei325
feifei325
| +|qdaxb
qdaxb
|wkordalski
wkordalski
|Smartsheet-JB-Brown
Smartsheet-JB-Brown
|Premshay
Premshay
|psv2522
psv2522
|KJ7LNW
KJ7LNW
| +|olweraltuve
olweraltuve
|RaySinner
RaySinner
|afshawnlotfi
afshawnlotfi
|emshvac
emshvac
|pdecat
pdecat
|pugazhendhi-m
pugazhendhi-m
| +|Lunchb0ne
Lunchb0ne
|aheizi
aheizi
|sammcj
sammcj
|dtrugman
dtrugman
|aitoroses
aitoroses
|yt3trees
yt3trees
| +|yongjer
yongjer
|vincentsong
vincentsong
|teddyOOXX
teddyOOXX
|eonghk
eonghk
|arthurauffray
arthurauffray
|heyseth
heyseth
| +|philfung
philfung
|anton-otee
anton-otee
|benzntech
benzntech
|diarmidmackenzie
diarmidmackenzie
|GitlyHallows
GitlyHallows
|jcbdev
jcbdev
| +|Chenjiayuan195
Chenjiayuan195
|mdp
mdp
|napter
napter
|AMHesch
AMHesch
|vladstudio
vladstudio
|Yoshino-Yukitaro
Yoshino-Yukitaro
| +|ashktn
ashktn
|bannzai
bannzai
|dairui1
dairui1
|dqroid
dqroid
|im47cn
im47cn
|kinandan
kinandan
| +|kohii
kohii
|lightrabbit
lightrabbit
|olup
olup
|moqimoqidea
moqimoqidea
|mosleyit
mosleyit
|oprstchn
oprstchn
| +|philipnext
philipnext
|refactorthis
refactorthis
|samir-nimbly
samir-nimbly
|shaybc
shaybc
|shohei-ihaya
shohei-ihaya
|student20880
student20880
| +|cdlliuy
cdlliuy
|PretzelVector
PretzelVector
|nevermorec
nevermorec
|adamwlarson
adamwlarson
|alarno
alarno
|andreastempsch
andreastempsch
| +|Atlogit
Atlogit
|chadgauth
chadgauth
|dleen
dleen
|dbasclpy
dbasclpy
|celestial-vault
celestial-vault
|franekp
franekp
| +|DeXtroTip
DeXtroTip
|hesara
hesara
|eltociear
eltociear
|Jdo300
Jdo300
|libertyteeth
libertyteeth
|mamertofabian
mamertofabian
| +|marvijo-code
marvijo-code
|kvokka
kvokka
| | | | | ## Lizenz diff --git a/locales/es/CONTRIBUTING.md b/locales/es/CONTRIBUTING.md index bdab5f64a5a..14cf3a96f36 100644 --- a/locales/es/CONTRIBUTING.md +++ b/locales/es/CONTRIBUTING.md @@ -26,7 +26,68 @@ Estamos encantados de que estés interesado en contribuir a Roo Code. Ya sea que ¡También damos la bienvenida a contribuciones a nuestra [documentación](https://docs.roocode.com/)! Ya sea arreglando errores tipográficos, mejorando guías existentes o creando nuevo contenido educativo - nos encantaría construir un repositorio de recursos impulsado por la comunidad que ayude a todos a sacar el máximo provecho de Roo Code. Puedes hacer clic en "Edit this page" en cualquier página para llegar rápidamente al lugar correcto en Github para editar el archivo, o puedes ir directamente a https://github.com/RooVetGit/Roo-Code-Docs. -Si estás planeando trabajar en una función más grande, por favor crea una [solicitud de función](https://github.com/RooVetGit/Roo-Code/discussions/categories/feature-requests?discussions_q=is%3Aopen+category%3A%22Feature+Requests%22+sort%3Atop) primero para que podamos discutir si se alinea con la visión de Roo Code. +Si estás planeando trabajar en una función más grande, por favor crea una [solicitud de función](https://github.com/RooVetGit/Roo-Code/discussions/categories/feature-requests?discussions_q=is%3Aopen+category%3A%22Feature+Requests%22+sort%3Atop) primero para que podamos discutir si se alinea con la visión de Roo Code. También puedes consultar nuestra [Hoja de Ruta del Proyecto](#hoja-de-ruta-del-proyecto) a continuación para ver si tu idea encaja con nuestra dirección estratégica. + +## Hoja de Ruta del Proyecto + +Roo Code tiene una hoja de ruta de desarrollo clara que guía nuestras prioridades y dirección futura. Entender nuestra hoja de ruta puede ayudarte a: + +- Alinear tus contribuciones con los objetivos del proyecto +- Identificar áreas donde tu experiencia sería más valiosa +- Entender el contexto detrás de ciertas decisiones de diseño +- Encontrar inspiración para nuevas funciones que apoyen nuestra visión + +Nuestra hoja de ruta actual se centra en seis pilares clave: + +### Soporte de Proveedores + +Nuestro objetivo es dar soporte a tantos proveedores como sea posible: + +- Soporte más versátil para "OpenAI Compatible" +- xAI, Microsoft Azure AI, Alibaba Cloud Qwen, IBM Watsonx, Together AI, DeepInfra, Fireworks AI, Cohere, Perplexity AI, FriendliAI, Replicate +- Soporte mejorado para Ollama y LM Studio + +### Soporte de Modelos + +Queremos que Roo funcione bien con tantos modelos como sea posible, incluidos los modelos locales: + +- Soporte para modelos locales a través de system prompting personalizado y flujos de trabajo +- Evaluaciones de benchmarking y casos de prueba + +### Soporte de Sistemas + +Queremos que Roo funcione bien en el ordenador de todos: + +- Integración de terminal multiplataforma +- Soporte sólido y consistente para Mac, Windows y Linux + +### Documentación + +Queremos una documentación completa y accesible para todos los usuarios y colaboradores: + +- Guías de usuario y tutoriales ampliados +- Documentación clara de la API +- Mejor orientación para colaboradores +- Recursos de documentación multilingües +- Ejemplos interactivos y muestras de código + +### Estabilidad + +Queremos disminuir significativamente el número de errores y aumentar las pruebas automatizadas: + +- Interruptor de registro de depuración +- Botón de copia de "Información de Máquina/Tarea" para enviar con solicitudes de soporte/errores + +### Internacionalización + +Queremos que Roo hable el idioma de todos: + +- 我们希望 Roo Code 说每个人的语言 +- Queremos que Roo Code hable el idioma de todos +- हम चाहते हैं कि Roo Code हर किसी की भाषा बोले +- نريد أن يتحدث Roo Code لغة الجميع + +Damos especialmente la bienvenida a contribuciones que avancen nuestros objetivos de la hoja de ruta. Si estás trabajando en algo que se alinea con estos pilares, por favor menciónalo en la descripción de tu PR. ## Configuración de desarrollo diff --git a/locales/es/README.md b/locales/es/README.md index 977175fae2d..f00b3fc9aba 100644 --- a/locales/es/README.md +++ b/locales/es/README.md @@ -76,7 +76,7 @@ Consulta el [CHANGELOG](../CHANGELOG.md) para ver actualizaciones detalladas y c ### Múltiples modos -Roo Code se adapta a tus necesidades con [modos](https://docs.roocode.com/basic-usage/modes) especializados: +Roo Code se adapta a tus necesidades con [modos](https://docs.roocode.com/basic-usage/using-modes) especializados: - **Modo Código:** Para tareas generales de programación - **Modo Arquitecto:** Para planificación y liderazgo técnico @@ -86,7 +86,7 @@ Roo Code se adapta a tus necesidades con [modos](https://docs.roocode.com/basic- ### Herramientas inteligentes -Roo Code viene con potentes [herramientas](https://docs.roocode.com/basic-usage/using-tools) que pueden: +Roo Code viene con potentes [herramientas](https://docs.roocode.com/basic-usage/how-tools-work) que pueden: - Leer y escribir archivos en tu proyecto - Ejecutar comandos en tu terminal de VS Code @@ -182,19 +182,20 @@ Usamos [changesets](https://github.com/changesets/changesets) para versionar y p |:---:|:---:|:---:|:---:|:---:|:---:| |ColemanRoo
ColemanRoo
|stea9499
stea9499
|joemanley201
joemanley201
|System233
System233
|nissa-seru
nissa-seru
|jquanton
jquanton
| |NyxJae
NyxJae
|hannesrudolph
hannesrudolph
|MuriloFP
MuriloFP
|punkpeye
punkpeye
|d-oit
d-oit
|monotykamary
monotykamary
| -|vigneshsubbiah16
vigneshsubbiah16
|lloydchang
lloydchang
|Szpadel
Szpadel
|psv2522
psv2522
|Premshay
Premshay
|Smartsheet-JB-Brown
Smartsheet-JB-Brown
| -|cannuri
cannuri
|lupuletic
lupuletic
|olweraltuve
olweraltuve
|wkordalski
wkordalski
|qdaxb
qdaxb
|feifei325
feifei325
| -|RaySinner
RaySinner
|pdecat
pdecat
|emshvac
emshvac
|afshawnlotfi
afshawnlotfi
|aitoroses
aitoroses
|dtrugman
dtrugman
| -|KJ7LNW
KJ7LNW
|sammcj
sammcj
|pugazhendhi-m
pugazhendhi-m
|Lunchb0ne
Lunchb0ne
|yt3trees
yt3trees
|yongjer
yongjer
| -|vincentsong
vincentsong
|eonghk
eonghk
|arthurauffray
arthurauffray
|aheizi
aheizi
|heyseth
heyseth
|philfung
philfung
| -|napter
napter
|mdp
mdp
|jcbdev
jcbdev
|GitlyHallows
GitlyHallows
|benzntech
benzntech
|anton-otee
anton-otee
| -|bannzai
bannzai
|dairui1
dairui1
|dqroid
dqroid
|im47cn
im47cn
|kinandan
kinandan
|kohii
kohii
| -|lightrabbit
lightrabbit
|olup
olup
|moqimoqidea
moqimoqidea
|mosleyit
mosleyit
|oprstchn
oprstchn
|philipnext
philipnext
| -|refactorthis
refactorthis
|samir-nimbly
samir-nimbly
|shaybc
shaybc
|shohei-ihaya
shohei-ihaya
|student20880
student20880
|teddyOOXX
teddyOOXX
| -|PretzelVector
PretzelVector
|AMHesch
AMHesch
|adamwlarson
adamwlarson
|alarno
alarno
|andreastempsch
andreastempsch
|Atlogit
Atlogit
| -|dleen
dleen
|dbasclpy
dbasclpy
|celestial-vault
celestial-vault
|franekp
franekp
|DeXtroTip
DeXtroTip
|hesara
hesara
| -|eltociear
eltociear
|libertyteeth
libertyteeth
|mamertofabian
mamertofabian
|marvijo-code
marvijo-code
|Sarke
Sarke
|tgfjt
tgfjt
| -|vladstudio
vladstudio
|ashktn
ashktn
| | | | | +|cannuri
cannuri
|lloydchang
lloydchang
|vigneshsubbiah16
vigneshsubbiah16
|Szpadel
Szpadel
|lupuletic
lupuletic
|feifei325
feifei325
| +|qdaxb
qdaxb
|wkordalski
wkordalski
|Smartsheet-JB-Brown
Smartsheet-JB-Brown
|Premshay
Premshay
|psv2522
psv2522
|KJ7LNW
KJ7LNW
| +|olweraltuve
olweraltuve
|RaySinner
RaySinner
|afshawnlotfi
afshawnlotfi
|emshvac
emshvac
|pdecat
pdecat
|pugazhendhi-m
pugazhendhi-m
| +|Lunchb0ne
Lunchb0ne
|aheizi
aheizi
|sammcj
sammcj
|dtrugman
dtrugman
|aitoroses
aitoroses
|yt3trees
yt3trees
| +|yongjer
yongjer
|vincentsong
vincentsong
|teddyOOXX
teddyOOXX
|eonghk
eonghk
|arthurauffray
arthurauffray
|heyseth
heyseth
| +|philfung
philfung
|anton-otee
anton-otee
|benzntech
benzntech
|diarmidmackenzie
diarmidmackenzie
|GitlyHallows
GitlyHallows
|jcbdev
jcbdev
| +|Chenjiayuan195
Chenjiayuan195
|mdp
mdp
|napter
napter
|AMHesch
AMHesch
|vladstudio
vladstudio
|Yoshino-Yukitaro
Yoshino-Yukitaro
| +|ashktn
ashktn
|bannzai
bannzai
|dairui1
dairui1
|dqroid
dqroid
|im47cn
im47cn
|kinandan
kinandan
| +|kohii
kohii
|lightrabbit
lightrabbit
|olup
olup
|moqimoqidea
moqimoqidea
|mosleyit
mosleyit
|oprstchn
oprstchn
| +|philipnext
philipnext
|refactorthis
refactorthis
|samir-nimbly
samir-nimbly
|shaybc
shaybc
|shohei-ihaya
shohei-ihaya
|student20880
student20880
| +|cdlliuy
cdlliuy
|PretzelVector
PretzelVector
|nevermorec
nevermorec
|adamwlarson
adamwlarson
|alarno
alarno
|andreastempsch
andreastempsch
| +|Atlogit
Atlogit
|chadgauth
chadgauth
|dleen
dleen
|dbasclpy
dbasclpy
|celestial-vault
celestial-vault
|franekp
franekp
| +|DeXtroTip
DeXtroTip
|hesara
hesara
|eltociear
eltociear
|Jdo300
Jdo300
|libertyteeth
libertyteeth
|mamertofabian
mamertofabian
| +|marvijo-code
marvijo-code
|kvokka
kvokka
| | | | | ## Licencia diff --git a/locales/fr/CONTRIBUTING.md b/locales/fr/CONTRIBUTING.md index eb9059f8fb9..fdb4796a272 100644 --- a/locales/fr/CONTRIBUTING.md +++ b/locales/fr/CONTRIBUTING.md @@ -26,7 +26,68 @@ Vous cherchez une bonne première contribution ? Consultez les issues dans la se Nous accueillons également les contributions à notre [documentation](https://docs.roocode.com/) ! Qu'il s'agisse de corriger des fautes de frappe, d'améliorer les guides existants ou de créer du nouveau contenu éducatif - nous aimerions construire un référentiel de ressources guidé par la communauté qui aide chacun à tirer le meilleur parti de Roo Code. Vous pouvez cliquer sur "Edit this page" sur n'importe quelle page pour accéder rapidement au bon endroit dans Github pour éditer le fichier, ou vous pouvez plonger directement dans https://github.com/RooVetGit/Roo-Code-Docs. -Si vous prévoyez de travailler sur une fonctionnalité plus importante, veuillez d'abord créer une [demande de fonctionnalité](https://github.com/RooVetGit/Roo-Code/discussions/categories/feature-requests?discussions_q=is%3Aopen+category%3A%22Feature+Requests%22+sort%3Atop) afin que nous puissions discuter si elle s'aligne avec la vision de Roo Code. +Si vous prévoyez de travailler sur une fonctionnalité plus importante, veuillez d'abord créer une [demande de fonctionnalité](https://github.com/RooVetGit/Roo-Code/discussions/categories/feature-requests?discussions_q=is%3Aopen+category%3A%22Feature+Requests%22+sort%3Atop) afin que nous puissions discuter si elle s'aligne avec la vision de Roo Code. Vous pouvez également consulter notre [Feuille de route du projet](#feuille-de-route-du-projet) ci-dessous pour voir si votre idée s'inscrit dans notre orientation stratégique. + +## Feuille de route du projet + +Roo Code dispose d'une feuille de route de développement claire qui guide nos priorités et notre orientation future. Comprendre notre feuille de route peut vous aider à : + +- Aligner vos contributions avec les objectifs du projet +- Identifier les domaines où votre expertise serait la plus précieuse +- Comprendre le contexte derrière certaines décisions de conception +- Trouver de l'inspiration pour de nouvelles fonctionnalités qui soutiennent notre vision + +Notre feuille de route actuelle se concentre sur six piliers clés : + +### Support des fournisseurs + +Nous visons à prendre en charge autant de fournisseurs que possible : + +- Support plus polyvalent pour "OpenAI Compatible" +- xAI, Microsoft Azure AI, Alibaba Cloud Qwen, IBM Watsonx, Together AI, DeepInfra, Fireworks AI, Cohere, Perplexity AI, FriendliAI, Replicate +- Support amélioré pour Ollama et LM Studio + +### Support des modèles + +Nous voulons que Roo fonctionne aussi bien que possible avec autant de modèles que possible, y compris les modèles locaux : + +- Support des modèles locaux via des prompts système personnalisés et des flux de travail +- Évaluations de benchmarking et cas de test + +### Support des systèmes + +Nous voulons que Roo fonctionne bien sur l'ordinateur de chacun : + +- Intégration de terminal multiplateforme +- Support solide et cohérent pour Mac, Windows et Linux + +### Documentation + +Nous voulons une documentation complète et accessible pour tous les utilisateurs et contributeurs : + +- Guides utilisateur et tutoriels étendus +- Documentation API claire +- Meilleure orientation pour les contributeurs +- Ressources de documentation multilingues +- Exemples interactifs et échantillons de code + +### Stabilité + +Nous voulons réduire considérablement le nombre de bugs et augmenter les tests automatisés : + +- Interrupteur de journalisation de débogage +- Bouton de copie "Informations machine/tâche" pour l'envoi avec les demandes de support/bug + +### Internationalisation + +Nous voulons que Roo parle la langue de tous : + +- 我们希望 Roo Code 说每个人的语言 +- Queremos que Roo Code hable el idioma de todos +- हम चाहते हैं कि Roo Code हर किसी की भाषा बोले +- نريد أن يتحدث Roo Code لغة الجميع + +Nous accueillons particulièrement les contributions qui font progresser nos objectifs de feuille de route. Si vous travaillez sur quelque chose qui s'aligne avec ces piliers, veuillez le mentionner dans la description de votre PR. ## Configuration de Développement diff --git a/locales/fr/README.md b/locales/fr/README.md index 2a7d97407dc..bdd0cd58299 100644 --- a/locales/fr/README.md +++ b/locales/fr/README.md @@ -76,7 +76,7 @@ Roo Code 3.10 apporte de puissantes améliorations de productivité ! ### Modes multiples -Roo Code s'adapte à vos besoins avec des [modes](https://docs.roocode.com/basic-usage/modes) spécialisés : +Roo Code s'adapte à vos besoins avec des [modes](https://docs.roocode.com/basic-usage/using-modes) spécialisés : - **Mode Code :** Pour les tâches de programmation générales - **Mode Architecte :** Pour la planification et le leadership technique @@ -86,7 +86,7 @@ Roo Code s'adapte à vos besoins avec des [modes](https://docs.roocode.com/basic ### Outils intelligents -Roo Code est livré avec des [outils](https://docs.roocode.com/basic-usage/using-tools) puissants qui peuvent : +Roo Code est livré avec des [outils](https://docs.roocode.com/basic-usage/how-tools-work) puissants qui peuvent : - Lire et écrire des fichiers dans votre projet - Exécuter des commandes dans votre terminal VS Code @@ -182,19 +182,20 @@ Merci à tous nos contributeurs qui ont aidé à améliorer Roo Code ! |:---:|:---:|:---:|:---:|:---:|:---:| |ColemanRoo
ColemanRoo
|stea9499
stea9499
|joemanley201
joemanley201
|System233
System233
|nissa-seru
nissa-seru
|jquanton
jquanton
| |NyxJae
NyxJae
|hannesrudolph
hannesrudolph
|MuriloFP
MuriloFP
|punkpeye
punkpeye
|d-oit
d-oit
|monotykamary
monotykamary
| -|vigneshsubbiah16
vigneshsubbiah16
|lloydchang
lloydchang
|Szpadel
Szpadel
|psv2522
psv2522
|Premshay
Premshay
|Smartsheet-JB-Brown
Smartsheet-JB-Brown
| -|cannuri
cannuri
|lupuletic
lupuletic
|olweraltuve
olweraltuve
|wkordalski
wkordalski
|qdaxb
qdaxb
|feifei325
feifei325
| -|RaySinner
RaySinner
|pdecat
pdecat
|emshvac
emshvac
|afshawnlotfi
afshawnlotfi
|aitoroses
aitoroses
|dtrugman
dtrugman
| -|KJ7LNW
KJ7LNW
|sammcj
sammcj
|pugazhendhi-m
pugazhendhi-m
|Lunchb0ne
Lunchb0ne
|yt3trees
yt3trees
|yongjer
yongjer
| -|vincentsong
vincentsong
|eonghk
eonghk
|arthurauffray
arthurauffray
|aheizi
aheizi
|heyseth
heyseth
|philfung
philfung
| -|napter
napter
|mdp
mdp
|jcbdev
jcbdev
|GitlyHallows
GitlyHallows
|benzntech
benzntech
|anton-otee
anton-otee
| -|bannzai
bannzai
|dairui1
dairui1
|dqroid
dqroid
|im47cn
im47cn
|kinandan
kinandan
|kohii
kohii
| -|lightrabbit
lightrabbit
|olup
olup
|moqimoqidea
moqimoqidea
|mosleyit
mosleyit
|oprstchn
oprstchn
|philipnext
philipnext
| -|refactorthis
refactorthis
|samir-nimbly
samir-nimbly
|shaybc
shaybc
|shohei-ihaya
shohei-ihaya
|student20880
student20880
|teddyOOXX
teddyOOXX
| -|PretzelVector
PretzelVector
|AMHesch
AMHesch
|adamwlarson
adamwlarson
|alarno
alarno
|andreastempsch
andreastempsch
|Atlogit
Atlogit
| -|dleen
dleen
|dbasclpy
dbasclpy
|celestial-vault
celestial-vault
|franekp
franekp
|DeXtroTip
DeXtroTip
|hesara
hesara
| -|eltociear
eltociear
|libertyteeth
libertyteeth
|mamertofabian
mamertofabian
|marvijo-code
marvijo-code
|Sarke
Sarke
|tgfjt
tgfjt
| -|vladstudio
vladstudio
|ashktn
ashktn
| | | | | +|cannuri
cannuri
|lloydchang
lloydchang
|vigneshsubbiah16
vigneshsubbiah16
|Szpadel
Szpadel
|lupuletic
lupuletic
|feifei325
feifei325
| +|qdaxb
qdaxb
|wkordalski
wkordalski
|Smartsheet-JB-Brown
Smartsheet-JB-Brown
|Premshay
Premshay
|psv2522
psv2522
|KJ7LNW
KJ7LNW
| +|olweraltuve
olweraltuve
|RaySinner
RaySinner
|afshawnlotfi
afshawnlotfi
|emshvac
emshvac
|pdecat
pdecat
|pugazhendhi-m
pugazhendhi-m
| +|Lunchb0ne
Lunchb0ne
|aheizi
aheizi
|sammcj
sammcj
|dtrugman
dtrugman
|aitoroses
aitoroses
|yt3trees
yt3trees
| +|yongjer
yongjer
|vincentsong
vincentsong
|teddyOOXX
teddyOOXX
|eonghk
eonghk
|arthurauffray
arthurauffray
|heyseth
heyseth
| +|philfung
philfung
|anton-otee
anton-otee
|benzntech
benzntech
|diarmidmackenzie
diarmidmackenzie
|GitlyHallows
GitlyHallows
|jcbdev
jcbdev
| +|Chenjiayuan195
Chenjiayuan195
|mdp
mdp
|napter
napter
|AMHesch
AMHesch
|vladstudio
vladstudio
|Yoshino-Yukitaro
Yoshino-Yukitaro
| +|ashktn
ashktn
|bannzai
bannzai
|dairui1
dairui1
|dqroid
dqroid
|im47cn
im47cn
|kinandan
kinandan
| +|kohii
kohii
|lightrabbit
lightrabbit
|olup
olup
|moqimoqidea
moqimoqidea
|mosleyit
mosleyit
|oprstchn
oprstchn
| +|philipnext
philipnext
|refactorthis
refactorthis
|samir-nimbly
samir-nimbly
|shaybc
shaybc
|shohei-ihaya
shohei-ihaya
|student20880
student20880
| +|cdlliuy
cdlliuy
|PretzelVector
PretzelVector
|nevermorec
nevermorec
|adamwlarson
adamwlarson
|alarno
alarno
|andreastempsch
andreastempsch
| +|Atlogit
Atlogit
|chadgauth
chadgauth
|dleen
dleen
|dbasclpy
dbasclpy
|celestial-vault
celestial-vault
|franekp
franekp
| +|DeXtroTip
DeXtroTip
|hesara
hesara
|eltociear
eltociear
|Jdo300
Jdo300
|libertyteeth
libertyteeth
|mamertofabian
mamertofabian
| +|marvijo-code
marvijo-code
|kvokka
kvokka
| | | | | ## Licence diff --git a/locales/hi/CONTRIBUTING.md b/locales/hi/CONTRIBUTING.md index a1ffdafc1b6..9f388c295f8 100644 --- a/locales/hi/CONTRIBUTING.md +++ b/locales/hi/CONTRIBUTING.md @@ -26,7 +26,68 @@ हम अपने [दस्तावेज़ीकरण](https://docs.roocode.com/) में योगदान का भी स्वागत करते हैं! चाहे वह टाइपो ठीक करना हो, मौजूदा गाइड को सुधारना हो, या नई शैक्षिक सामग्री बनाना हो - हम संसाधनों का एक समुदाय-संचालित भंडार बनाना चाहते हैं जो हर किसी को Roo Code का अधिकतम उपयोग करने में मदद करे। आप फ़ाइल को संपादित करने के लिए किसी भी पृष्ठ पर "Edit this page" पर क्लिक कर सकते हैं या सीधे https://github.com/RooVetGit/Roo-Code-Docs में जा सकते हैं। -यदि आप एक बड़ी विशेषता पर काम करने की योजना बना रहे हैं, तो कृपया पहले एक [फीचर अनुरोध](https://github.com/RooVetGit/Roo-Code/discussions/categories/feature-requests?discussions_q=is%3Aopen+category%3A%22Feature+Requests%22+sort%3Atop) बनाएं ताकि हम चर्चा कर सकें कि क्या यह Roo Code के दृष्टिकोण के अनुरूप है। +यदि आप एक बड़ी विशेषता पर काम करने की योजना बना रहे हैं, तो कृपया पहले एक [फीचर अनुरोध](https://github.com/RooVetGit/Roo-Code/discussions/categories/feature-requests?discussions_q=is%3Aopen+category%3A%22Feature+Requests%22+sort%3Atop) बनाएं ताकि हम चर्चा कर सकें कि क्या यह Roo Code के दृष्टिकोण के अनुरूप है। आप नीचे दिए गए हमारे [प्रोजेक्ट रोडमैप](#प्रोजेक्ट-रोडमैप) को भी देख सकते हैं यह जानने के लिए कि क्या आपका विचार हमारी रणनीतिक दिशा के अनुरूप है। + +## प्रोजेक्ट रोडमैप + +Roo Code का एक स्पष्ट विकास रोडमैप है जो हमारी प्राथमिकताओं और भविष्य की दिशा का मार्गदर्शन करता है। हमारे रोडमैप को समझने से आपको मदद मिल सकती है: + +- अपने योगदान को प्रोजेक्ट के लक्ष्यों के साथ संरेखित करना +- ऐसे क्षेत्रों की पहचान करना जहां आपकी विशेषज्ञता सबसे मूल्यवान होगी +- कुछ डिज़ाइन निर्णयों के पीछे के संदर्भ को समझना +- नई विशेषताओं के लिए प्रेरणा पाना जो हमारे दृष्टिकोण का समर्थन करती हैं + +हमारा वर्तमान रोडमैप छह प्रमुख स्तंभों पर केंद्रित है: + +### प्रोवाइडर सपोर्ट + +हम जितने संभव हो सके उतने प्रोवाइडर्स को सपोर्ट करना चाहते हैं: + +- "OpenAI Compatible" के लिए अधिक बहुमुखी समर्थन +- xAI, Microsoft Azure AI, Alibaba Cloud Qwen, IBM Watsonx, Together AI, DeepInfra, Fireworks AI, Cohere, Perplexity AI, FriendliAI, Replicate +- Ollama और LM Studio के लिए बेहतर समर्थन + +### मॉडल सपोर्ट + +हम चाहते हैं कि Roo जितना संभव हो उतने मॉडल पर अच्छी तरह से काम करे, जिसमें लोकल मॉडल भी शामिल हैं: + +- कस्टम सिस्टम प्रॉम्प्टिंग और वर्कफ़्लोज़ के माध्यम से लोकल मॉडल सपोर्ट +- बेंचमार्किंग एवैल्युएशन और टेस्ट केस + +### सिस्टम सपोर्ट + +हम चाहते हैं कि Roo हर किसी के कंप्यूटर पर अच्छी तरह से चले: + +- क्रॉस प्लेटफॉर्म टर्मिनल इंटीग्रेशन +- Mac, Windows और Linux के लिए मजबूत और सुसंगत समर्थन + +### डॉक्युमेंटेशन + +हम सभी उपयोगकर्ताओं और योगदानकर्ताओं के लिए व्यापक, सुलभ दस्तावेज़ीकरण चाहते हैं: + +- विस्तारित उपयोगकर्ता गाइड और ट्यूटोरियल +- स्पष्ट API दस्तावेज़ीकरण +- योगदानकर्ताओं के लिए बेहतर मार्गदर्शन +- बहुभाषी दस्तावेज़ीकरण संसाधन +- इंटरैक्टिव उदाहरण और कोड सैंपल + +### स्थिरता + +हम बग की संख्या को काफी कम करना और स्वचालित परीक्षण को बढ़ाना चाहते हैं: + +- डीबग लॉगिंग स्विच +- बग/सपोर्ट अनुरोधों के साथ भेजने के लिए "मशीन/टास्क इन्फॉर्मेशन" कॉपी बटन + +### अंतर्राष्ट्रीयकरण + +हम चाहते हैं कि Roo हर किसी की भाषा बोले: + +- 我们希望 Roo Code 说每个人的语言 +- Queremos que Roo Code hable el idioma de todos +- हम चाहते हैं कि Roo Code हर किसी की भाषा बोले +- نريد أن يتحدث Roo Code لغة الجميع + +हम विशेष रूप से उन योगदानों का स्वागत करते हैं जो हमारे रोडमैप लक्ष्यों को आगे बढ़ाते हैं। यदि आप कुछ ऐसा कर रहे हैं जो इन स्तंभों के अनुरूप है, तो कृपया अपने PR विवरण में इसका उल्लेख करें। ## डेवलपमेंट सेटअप diff --git a/locales/hi/README.md b/locales/hi/README.md index f08262496cb..640c11d2343 100644 --- a/locales/hi/README.md +++ b/locales/hi/README.md @@ -76,7 +76,7 @@ Roo Code 3.10 शक्तिशाली उत्पादकता सुध ### मल्टीपल मोड्स -Roo Code विशेष [मोड्स](https://docs.roocode.com/basic-usage/modes) के साथ आपकी आवश्यकताओं के अनुसार अनुकूलित होता है: +Roo Code विशेष [मोड्स](https://docs.roocode.com/basic-usage/using-modes) के साथ आपकी आवश्यकताओं के अनुसार अनुकूलित होता है: - **कोड मोड:** सामान्य कोडिंग कार्यों के लिए - **आर्किटेक्ट मोड:** योजना और तकनीकी नेतृत्व के लिए @@ -86,7 +86,7 @@ Roo Code विशेष [मोड्स](https://docs.roocode.com/basic-usage/ ### स्मार्ट टूल्स -Roo Code शक्तिशाली [टूल्स](https://docs.roocode.com/basic-usage/using-tools) के साथ आता है जो कर सकते हैं: +Roo Code शक्तिशाली [टूल्स](https://docs.roocode.com/basic-usage/how-tools-work) के साथ आता है जो कर सकते हैं: - आपके प्रोजेक्ट में फ़ाइलें पढ़ना और लिखना - आपके VS Code टर्मिनल में कमांड्स चलाना @@ -182,19 +182,20 @@ Roo Code को बेहतर बनाने में मदद करने |:---:|:---:|:---:|:---:|:---:|:---:| |ColemanRoo
ColemanRoo
|stea9499
stea9499
|joemanley201
joemanley201
|System233
System233
|nissa-seru
nissa-seru
|jquanton
jquanton
| |NyxJae
NyxJae
|hannesrudolph
hannesrudolph
|MuriloFP
MuriloFP
|punkpeye
punkpeye
|d-oit
d-oit
|monotykamary
monotykamary
| -|vigneshsubbiah16
vigneshsubbiah16
|lloydchang
lloydchang
|Szpadel
Szpadel
|psv2522
psv2522
|Premshay
Premshay
|Smartsheet-JB-Brown
Smartsheet-JB-Brown
| -|cannuri
cannuri
|lupuletic
lupuletic
|olweraltuve
olweraltuve
|wkordalski
wkordalski
|qdaxb
qdaxb
|feifei325
feifei325
| -|RaySinner
RaySinner
|pdecat
pdecat
|emshvac
emshvac
|afshawnlotfi
afshawnlotfi
|aitoroses
aitoroses
|dtrugman
dtrugman
| -|KJ7LNW
KJ7LNW
|sammcj
sammcj
|pugazhendhi-m
pugazhendhi-m
|Lunchb0ne
Lunchb0ne
|yt3trees
yt3trees
|yongjer
yongjer
| -|vincentsong
vincentsong
|eonghk
eonghk
|arthurauffray
arthurauffray
|aheizi
aheizi
|heyseth
heyseth
|philfung
philfung
| -|napter
napter
|mdp
mdp
|jcbdev
jcbdev
|GitlyHallows
GitlyHallows
|benzntech
benzntech
|anton-otee
anton-otee
| -|bannzai
bannzai
|dairui1
dairui1
|dqroid
dqroid
|im47cn
im47cn
|kinandan
kinandan
|kohii
kohii
| -|lightrabbit
lightrabbit
|olup
olup
|moqimoqidea
moqimoqidea
|mosleyit
mosleyit
|oprstchn
oprstchn
|philipnext
philipnext
| -|refactorthis
refactorthis
|samir-nimbly
samir-nimbly
|shaybc
shaybc
|shohei-ihaya
shohei-ihaya
|student20880
student20880
|teddyOOXX
teddyOOXX
| -|PretzelVector
PretzelVector
|AMHesch
AMHesch
|adamwlarson
adamwlarson
|alarno
alarno
|andreastempsch
andreastempsch
|Atlogit
Atlogit
| -|dleen
dleen
|dbasclpy
dbasclpy
|celestial-vault
celestial-vault
|franekp
franekp
|DeXtroTip
DeXtroTip
|hesara
hesara
| -|eltociear
eltociear
|libertyteeth
libertyteeth
|mamertofabian
mamertofabian
|marvijo-code
marvijo-code
|Sarke
Sarke
|tgfjt
tgfjt
| -|vladstudio
vladstudio
|ashktn
ashktn
| | | | | +|cannuri
cannuri
|lloydchang
lloydchang
|vigneshsubbiah16
vigneshsubbiah16
|Szpadel
Szpadel
|lupuletic
lupuletic
|feifei325
feifei325
| +|qdaxb
qdaxb
|wkordalski
wkordalski
|Smartsheet-JB-Brown
Smartsheet-JB-Brown
|Premshay
Premshay
|psv2522
psv2522
|KJ7LNW
KJ7LNW
| +|olweraltuve
olweraltuve
|RaySinner
RaySinner
|afshawnlotfi
afshawnlotfi
|emshvac
emshvac
|pdecat
pdecat
|pugazhendhi-m
pugazhendhi-m
| +|Lunchb0ne
Lunchb0ne
|aheizi
aheizi
|sammcj
sammcj
|dtrugman
dtrugman
|aitoroses
aitoroses
|yt3trees
yt3trees
| +|yongjer
yongjer
|vincentsong
vincentsong
|teddyOOXX
teddyOOXX
|eonghk
eonghk
|arthurauffray
arthurauffray
|heyseth
heyseth
| +|philfung
philfung
|anton-otee
anton-otee
|benzntech
benzntech
|diarmidmackenzie
diarmidmackenzie
|GitlyHallows
GitlyHallows
|jcbdev
jcbdev
| +|Chenjiayuan195
Chenjiayuan195
|mdp
mdp
|napter
napter
|AMHesch
AMHesch
|vladstudio
vladstudio
|Yoshino-Yukitaro
Yoshino-Yukitaro
| +|ashktn
ashktn
|bannzai
bannzai
|dairui1
dairui1
|dqroid
dqroid
|im47cn
im47cn
|kinandan
kinandan
| +|kohii
kohii
|lightrabbit
lightrabbit
|olup
olup
|moqimoqidea
moqimoqidea
|mosleyit
mosleyit
|oprstchn
oprstchn
| +|philipnext
philipnext
|refactorthis
refactorthis
|samir-nimbly
samir-nimbly
|shaybc
shaybc
|shohei-ihaya
shohei-ihaya
|student20880
student20880
| +|cdlliuy
cdlliuy
|PretzelVector
PretzelVector
|nevermorec
nevermorec
|adamwlarson
adamwlarson
|alarno
alarno
|andreastempsch
andreastempsch
| +|Atlogit
Atlogit
|chadgauth
chadgauth
|dleen
dleen
|dbasclpy
dbasclpy
|celestial-vault
celestial-vault
|franekp
franekp
| +|DeXtroTip
DeXtroTip
|hesara
hesara
|eltociear
eltociear
|Jdo300
Jdo300
|libertyteeth
libertyteeth
|mamertofabian
mamertofabian
| +|marvijo-code
marvijo-code
|kvokka
kvokka
| | | | | ## लाइसेंस diff --git a/locales/it/CONTRIBUTING.md b/locales/it/CONTRIBUTING.md index 30cc4f69114..9e6ca151113 100644 --- a/locales/it/CONTRIBUTING.md +++ b/locales/it/CONTRIBUTING.md @@ -26,7 +26,68 @@ Cerchi un buon primo contributo? Controlla i problemi nella sezione "Issue [Unas Accogliamo anche contributi alla nostra [documentazione](https://docs.roocode.com/)! Che si tratti di correggere errori di battitura, migliorare guide esistenti o creare nuovi contenuti educativi - ci piacerebbe costruire un repository di risorse guidato dalla comunità che aiuti tutti a ottenere il massimo da Roo Code. Puoi cliccare su "Edit this page" su qualsiasi pagina per arrivare rapidamente al punto giusto in Github per modificare il file, oppure puoi andare direttamente a https://github.com/RooVetGit/Roo-Code-Docs. -Se stai pianificando di lavorare su una funzionalità più grande, per favore crea prima una [richiesta di funzionalità](https://github.com/RooVetGit/Roo-Code/discussions/categories/feature-requests?discussions_q=is%3Aopen+category%3A%22Feature+Requests%22+sort%3Atop) così possiamo discutere se si allinea con la visione di Roo Code. +Se stai pianificando di lavorare su una funzionalità più grande, per favore crea prima una [richiesta di funzionalità](https://github.com/RooVetGit/Roo-Code/discussions/categories/feature-requests?discussions_q=is%3Aopen+category%3A%22Feature+Requests%22+sort%3Atop) così possiamo discutere se si allinea con la visione di Roo Code. Puoi anche consultare la nostra [Roadmap del Progetto](#roadmap-del-progetto) qui sotto per vedere se la tua idea si adatta alla nostra direzione strategica. + +## Roadmap del Progetto + +Roo Code ha una chiara roadmap di sviluppo che guida le nostre priorità e la direzione futura. Comprendere la nostra roadmap può aiutarti a: + +- Allineare i tuoi contributi con gli obiettivi del progetto +- Identificare aree in cui la tua esperienza sarebbe più preziosa +- Comprendere il contesto dietro certe decisioni di design +- Trovare ispirazione per nuove funzionalità che supportino la nostra visione + +La nostra roadmap attuale si concentra su sei pilastri chiave: + +### Supporto Provider + +Miriamo a supportare quanti più provider possibile: + +- Supporto più versatile per "OpenAI Compatible" +- xAI, Microsoft Azure AI, Alibaba Cloud Qwen, IBM Watsonx, Together AI, DeepInfra, Fireworks AI, Cohere, Perplexity AI, FriendliAI, Replicate +- Supporto migliorato per Ollama e LM Studio + +### Supporto Modelli + +Vogliamo che Roo funzioni al meglio su quanti più modelli possibile, inclusi i modelli locali: + +- Supporto per modelli locali attraverso prompt di sistema personalizzati e flussi di lavoro +- Valutazioni di benchmark e casi di test + +### Supporto Sistemi + +Vogliamo che Roo funzioni bene sul computer di tutti: + +- Integrazione del terminale multipiattaforma +- Supporto forte e coerente per Mac, Windows e Linux + +### Documentazione + +Vogliamo una documentazione completa e accessibile per tutti gli utenti e contributori: + +- Guide utente e tutorial ampliati +- Documentazione API chiara +- Migliore orientamento per i contributori +- Risorse di documentazione multilingue +- Esempi interattivi e campioni di codice + +### Stabilità + +Vogliamo ridurre significativamente il numero di bug e aumentare i test automatizzati: + +- Interruttore di registrazione debug +- Pulsante di copia "Informazioni Macchina/Attività" per l'invio con richieste di supporto/bug + +### Internazionalizzazione + +Vogliamo che Roo parli la lingua di tutti: + +- 我们希望 Roo Code 说每个人的语言 +- Queremos que Roo Code hable el idioma de todos +- हम चाहते हैं कि Roo Code हर किसी की भाषा बोले +- نريد أن يتحدث Roo Code لغة الجميع + +Accogliamo particolarmente i contributi che fanno progredire gli obiettivi della nostra roadmap. Se stai lavorando su qualcosa che si allinea con questi pilastri, per favore menzionalo nella descrizione della tua PR. ## Configurazione per lo Sviluppo diff --git a/locales/it/README.md b/locales/it/README.md index b1e0c78a025..e71651b6cf7 100644 --- a/locales/it/README.md +++ b/locales/it/README.md @@ -76,7 +76,7 @@ Roo Code 3.10 porta potenti miglioramenti di produttività! ### Modalità Multiple -Roo Code si adatta alle tue esigenze con [modalità](https://docs.roocode.com/basic-usage/modes) specializzate: +Roo Code si adatta alle tue esigenze con [modalità](https://docs.roocode.com/basic-usage/using-modes) specializzate: - **Modalità Codice:** Per attività di codifica generale - **Modalità Architetto:** Per pianificazione e leadership tecnica @@ -86,7 +86,7 @@ Roo Code si adatta alle tue esigenze con [modalità](https://docs.roocode.com/ba ### Strumenti Intelligenti -Roo Code viene fornito con potenti [strumenti](https://docs.roocode.com/basic-usage/using-tools) che possono: +Roo Code viene fornito con potenti [strumenti](https://docs.roocode.com/basic-usage/how-tools-work) che possono: - Leggere e scrivere file nel tuo progetto - Eseguire comandi nel tuo terminale VS Code @@ -182,19 +182,20 @@ Grazie a tutti i nostri contributori che hanno aiutato a migliorare Roo Code! |:---:|:---:|:---:|:---:|:---:|:---:| |ColemanRoo
ColemanRoo
|stea9499
stea9499
|joemanley201
joemanley201
|System233
System233
|nissa-seru
nissa-seru
|jquanton
jquanton
| |NyxJae
NyxJae
|hannesrudolph
hannesrudolph
|MuriloFP
MuriloFP
|punkpeye
punkpeye
|d-oit
d-oit
|monotykamary
monotykamary
| -|vigneshsubbiah16
vigneshsubbiah16
|lloydchang
lloydchang
|Szpadel
Szpadel
|psv2522
psv2522
|Premshay
Premshay
|Smartsheet-JB-Brown
Smartsheet-JB-Brown
| -|cannuri
cannuri
|lupuletic
lupuletic
|olweraltuve
olweraltuve
|wkordalski
wkordalski
|qdaxb
qdaxb
|feifei325
feifei325
| -|RaySinner
RaySinner
|pdecat
pdecat
|emshvac
emshvac
|afshawnlotfi
afshawnlotfi
|aitoroses
aitoroses
|dtrugman
dtrugman
| -|KJ7LNW
KJ7LNW
|sammcj
sammcj
|pugazhendhi-m
pugazhendhi-m
|Lunchb0ne
Lunchb0ne
|yt3trees
yt3trees
|yongjer
yongjer
| -|vincentsong
vincentsong
|eonghk
eonghk
|arthurauffray
arthurauffray
|aheizi
aheizi
|heyseth
heyseth
|philfung
philfung
| -|napter
napter
|mdp
mdp
|jcbdev
jcbdev
|GitlyHallows
GitlyHallows
|benzntech
benzntech
|anton-otee
anton-otee
| -|bannzai
bannzai
|dairui1
dairui1
|dqroid
dqroid
|im47cn
im47cn
|kinandan
kinandan
|kohii
kohii
| -|lightrabbit
lightrabbit
|olup
olup
|moqimoqidea
moqimoqidea
|mosleyit
mosleyit
|oprstchn
oprstchn
|philipnext
philipnext
| -|refactorthis
refactorthis
|samir-nimbly
samir-nimbly
|shaybc
shaybc
|shohei-ihaya
shohei-ihaya
|student20880
student20880
|teddyOOXX
teddyOOXX
| -|PretzelVector
PretzelVector
|AMHesch
AMHesch
|adamwlarson
adamwlarson
|alarno
alarno
|andreastempsch
andreastempsch
|Atlogit
Atlogit
| -|dleen
dleen
|dbasclpy
dbasclpy
|celestial-vault
celestial-vault
|franekp
franekp
|DeXtroTip
DeXtroTip
|hesara
hesara
| -|eltociear
eltociear
|libertyteeth
libertyteeth
|mamertofabian
mamertofabian
|marvijo-code
marvijo-code
|Sarke
Sarke
|tgfjt
tgfjt
| -|vladstudio
vladstudio
|ashktn
ashktn
| | | | | +|cannuri
cannuri
|lloydchang
lloydchang
|vigneshsubbiah16
vigneshsubbiah16
|Szpadel
Szpadel
|lupuletic
lupuletic
|feifei325
feifei325
| +|qdaxb
qdaxb
|wkordalski
wkordalski
|Smartsheet-JB-Brown
Smartsheet-JB-Brown
|Premshay
Premshay
|psv2522
psv2522
|KJ7LNW
KJ7LNW
| +|olweraltuve
olweraltuve
|RaySinner
RaySinner
|afshawnlotfi
afshawnlotfi
|emshvac
emshvac
|pdecat
pdecat
|pugazhendhi-m
pugazhendhi-m
| +|Lunchb0ne
Lunchb0ne
|aheizi
aheizi
|sammcj
sammcj
|dtrugman
dtrugman
|aitoroses
aitoroses
|yt3trees
yt3trees
| +|yongjer
yongjer
|vincentsong
vincentsong
|teddyOOXX
teddyOOXX
|eonghk
eonghk
|arthurauffray
arthurauffray
|heyseth
heyseth
| +|philfung
philfung
|anton-otee
anton-otee
|benzntech
benzntech
|diarmidmackenzie
diarmidmackenzie
|GitlyHallows
GitlyHallows
|jcbdev
jcbdev
| +|Chenjiayuan195
Chenjiayuan195
|mdp
mdp
|napter
napter
|AMHesch
AMHesch
|vladstudio
vladstudio
|Yoshino-Yukitaro
Yoshino-Yukitaro
| +|ashktn
ashktn
|bannzai
bannzai
|dairui1
dairui1
|dqroid
dqroid
|im47cn
im47cn
|kinandan
kinandan
| +|kohii
kohii
|lightrabbit
lightrabbit
|olup
olup
|moqimoqidea
moqimoqidea
|mosleyit
mosleyit
|oprstchn
oprstchn
| +|philipnext
philipnext
|refactorthis
refactorthis
|samir-nimbly
samir-nimbly
|shaybc
shaybc
|shohei-ihaya
shohei-ihaya
|student20880
student20880
| +|cdlliuy
cdlliuy
|PretzelVector
PretzelVector
|nevermorec
nevermorec
|adamwlarson
adamwlarson
|alarno
alarno
|andreastempsch
andreastempsch
| +|Atlogit
Atlogit
|chadgauth
chadgauth
|dleen
dleen
|dbasclpy
dbasclpy
|celestial-vault
celestial-vault
|franekp
franekp
| +|DeXtroTip
DeXtroTip
|hesara
hesara
|eltociear
eltociear
|Jdo300
Jdo300
|libertyteeth
libertyteeth
|mamertofabian
mamertofabian
| +|marvijo-code
marvijo-code
|kvokka
kvokka
| | | | | ## Licenza diff --git a/locales/ja/CONTRIBUTING.md b/locales/ja/CONTRIBUTING.md index 54183588e56..42be40e33d2 100644 --- a/locales/ja/CONTRIBUTING.md +++ b/locales/ja/CONTRIBUTING.md @@ -26,7 +26,68 @@ Roo Codeへの貢献に興味を持っていただき、ありがとうござい また、[ドキュメント](https://docs.roocode.com/)への貢献も歓迎します!タイプミスの修正、既存ガイドの改善、または新しい教育コンテンツの作成など、Roo Codeを最大限に活用するためのコミュニティ主導のリソースリポジトリの構築を目指しています。任意のページで「Edit this page」をクリックすると、ファイルを編集するためのGithubの適切な場所にすぐに移動できます。または、https://github.com/RooVetGit/Roo-Code-Docs に直接アクセスすることもできます。 -より大きな機能に取り組む予定がある場合は、Roo Codeのビジョンに合致するかどうかを議論するために、まず[機能リクエスト](https://github.com/RooVetGit/Roo-Code/discussions/categories/feature-requests?discussions_q=is%3Aopen+category%3A%22Feature+Requests%22+sort%3Atop)を作成してください。 +より大きな機能に取り組む予定がある場合は、Roo Codeのビジョンに合致するかどうかを議論するために、まず[機能リクエスト](https://github.com/RooVetGit/Roo-Code/discussions/categories/feature-requests?discussions_q=is%3Aopen+category%3A%22Feature+Requests%22+sort%3Atop)を作成してください。また、アイデアが私たちの戦略的方向性に合っているかどうかを確認するために、下記の[プロジェクトロードマップ](#プロジェクトロードマップ)をチェックすることもできます。 + +## プロジェクトロードマップ + +Roo Codeには、私たちの優先事項と将来の方向性を導く明確な開発ロードマップがあります。私たちのロードマップを理解することで、以下のような助けになります: + +- あなたの貢献をプロジェクトの目標に合わせる +- あなたの専門知識が最も価値がある領域を特定する +- 特定のデザイン決定の背景を理解する +- 私たちのビジョンをサポートする新機能のインスピレーションを得る + +現在のロードマップは、6つの主要な柱に焦点を当てています: + +### プロバイダーサポート + +できるだけ多くのプロバイダーをサポートすることを目指しています: + +- より汎用的な「OpenAI互換」サポート +- xAI、Microsoft Azure AI、Alibaba Cloud Qwen、IBM Watsonx、Together AI、DeepInfra、Fireworks AI、Cohere、Perplexity AI、FriendliAI、Replicate +- OllamaとLM Studioの強化されたサポート + +### モデルサポート + +ローカルモデルを含め、できるだけ多くのモデルでRooが良好に動作することを望んでいます: + +- カスタムシステムプロンプティングとワークフローを通じたローカルモデルサポート +- ベンチマーク評価とテストケース + +### システムサポート + +Rooが誰のコンピュータでも良好に動作することを望んでいます: + +- クロスプラットフォームターミナル統合 +- Mac、Windows、Linuxの強力で一貫したサポート + +### ドキュメンテーション + +すべてのユーザーと貢献者のための包括的でアクセスしやすいドキュメントを望んでいます: + +- 拡張されたユーザーガイドとチュートリアル +- 明確なAPIドキュメント +- 貢献者のためのより良いガイダンス +- 多言語ドキュメントリソース +- インタラクティブな例とコードサンプル + +### 安定性 + +バグの数を大幅に減らし、自動テストを増やすことを望んでいます: + +- デバッグロギングスイッチ +- バグ/サポートリクエストと一緒に送信するための「マシン/タスク情報」コピーボタン + +### 国際化 + +Rooが誰の言語も話すことを望んでいます: + +- 我们希望 Roo Code 说每个人的语言 +- Queremos que Roo Code hable el idioma de todos +- हम चाहते हैं कि Roo Code हर किसी की भाषा बोले +- نريد أن يتحدث Roo Code لغة الجميع + +私たちは特に、ロードマップの目標を前進させる貢献を歓迎します。これらの柱に沿った何かに取り組んでいる場合は、PRの説明でそれについて言及してください。 ## 開発のセットアップ diff --git a/locales/ja/README.md b/locales/ja/README.md index fccfe1aa1f8..e2129c7aebe 100644 --- a/locales/ja/README.md +++ b/locales/ja/README.md @@ -76,7 +76,7 @@ Roo Code 3.10は強力な生産性向上機能をもたらします! ### 複数のモード -Roo Codeは専門化された[モード](https://docs.roocode.com/basic-usage/modes)であなたのニーズに適応します: +Roo Codeは専門化された[モード](https://docs.roocode.com/basic-usage/using-modes)であなたのニーズに適応します: - **コードモード:** 汎用的なコーディングタスク向け - **アーキテクトモード:** 計画と技術的リーダーシップ向け @@ -86,7 +86,7 @@ Roo Codeは専門化された[モード](https://docs.roocode.com/basic-usage/mo ### スマートツール -Roo Codeには強力な[ツール](https://docs.roocode.com/basic-usage/using-tools)が付属しています: +Roo Codeには強力な[ツール](https://docs.roocode.com/basic-usage/how-tools-work)が付属しています: - プロジェクト内のファイルの読み書き - VS Codeターミナルでコマンドを実行 @@ -182,19 +182,20 @@ Roo Codeの改善に貢献してくれたすべての貢献者に感謝します |:---:|:---:|:---:|:---:|:---:|:---:| |ColemanRoo
ColemanRoo
|stea9499
stea9499
|joemanley201
joemanley201
|System233
System233
|nissa-seru
nissa-seru
|jquanton
jquanton
| |NyxJae
NyxJae
|hannesrudolph
hannesrudolph
|MuriloFP
MuriloFP
|punkpeye
punkpeye
|d-oit
d-oit
|monotykamary
monotykamary
| -|vigneshsubbiah16
vigneshsubbiah16
|lloydchang
lloydchang
|Szpadel
Szpadel
|psv2522
psv2522
|Premshay
Premshay
|Smartsheet-JB-Brown
Smartsheet-JB-Brown
| -|cannuri
cannuri
|lupuletic
lupuletic
|olweraltuve
olweraltuve
|wkordalski
wkordalski
|qdaxb
qdaxb
|feifei325
feifei325
| -|RaySinner
RaySinner
|pdecat
pdecat
|emshvac
emshvac
|afshawnlotfi
afshawnlotfi
|aitoroses
aitoroses
|dtrugman
dtrugman
| -|KJ7LNW
KJ7LNW
|sammcj
sammcj
|pugazhendhi-m
pugazhendhi-m
|Lunchb0ne
Lunchb0ne
|yt3trees
yt3trees
|yongjer
yongjer
| -|vincentsong
vincentsong
|eonghk
eonghk
|arthurauffray
arthurauffray
|aheizi
aheizi
|heyseth
heyseth
|philfung
philfung
| -|napter
napter
|mdp
mdp
|jcbdev
jcbdev
|GitlyHallows
GitlyHallows
|benzntech
benzntech
|anton-otee
anton-otee
| -|bannzai
bannzai
|dairui1
dairui1
|dqroid
dqroid
|im47cn
im47cn
|kinandan
kinandan
|kohii
kohii
| -|lightrabbit
lightrabbit
|olup
olup
|moqimoqidea
moqimoqidea
|mosleyit
mosleyit
|oprstchn
oprstchn
|philipnext
philipnext
| -|refactorthis
refactorthis
|samir-nimbly
samir-nimbly
|shaybc
shaybc
|shohei-ihaya
shohei-ihaya
|student20880
student20880
|teddyOOXX
teddyOOXX
| -|PretzelVector
PretzelVector
|AMHesch
AMHesch
|adamwlarson
adamwlarson
|alarno
alarno
|andreastempsch
andreastempsch
|Atlogit
Atlogit
| -|dleen
dleen
|dbasclpy
dbasclpy
|celestial-vault
celestial-vault
|franekp
franekp
|DeXtroTip
DeXtroTip
|hesara
hesara
| -|eltociear
eltociear
|libertyteeth
libertyteeth
|mamertofabian
mamertofabian
|marvijo-code
marvijo-code
|Sarke
Sarke
|tgfjt
tgfjt
| -|vladstudio
vladstudio
|ashktn
ashktn
| | | | | +|cannuri
cannuri
|lloydchang
lloydchang
|vigneshsubbiah16
vigneshsubbiah16
|Szpadel
Szpadel
|lupuletic
lupuletic
|feifei325
feifei325
| +|qdaxb
qdaxb
|wkordalski
wkordalski
|Smartsheet-JB-Brown
Smartsheet-JB-Brown
|Premshay
Premshay
|psv2522
psv2522
|KJ7LNW
KJ7LNW
| +|olweraltuve
olweraltuve
|RaySinner
RaySinner
|afshawnlotfi
afshawnlotfi
|emshvac
emshvac
|pdecat
pdecat
|pugazhendhi-m
pugazhendhi-m
| +|Lunchb0ne
Lunchb0ne
|aheizi
aheizi
|sammcj
sammcj
|dtrugman
dtrugman
|aitoroses
aitoroses
|yt3trees
yt3trees
| +|yongjer
yongjer
|vincentsong
vincentsong
|teddyOOXX
teddyOOXX
|eonghk
eonghk
|arthurauffray
arthurauffray
|heyseth
heyseth
| +|philfung
philfung
|anton-otee
anton-otee
|benzntech
benzntech
|diarmidmackenzie
diarmidmackenzie
|GitlyHallows
GitlyHallows
|jcbdev
jcbdev
| +|Chenjiayuan195
Chenjiayuan195
|mdp
mdp
|napter
napter
|AMHesch
AMHesch
|vladstudio
vladstudio
|Yoshino-Yukitaro
Yoshino-Yukitaro
| +|ashktn
ashktn
|bannzai
bannzai
|dairui1
dairui1
|dqroid
dqroid
|im47cn
im47cn
|kinandan
kinandan
| +|kohii
kohii
|lightrabbit
lightrabbit
|olup
olup
|moqimoqidea
moqimoqidea
|mosleyit
mosleyit
|oprstchn
oprstchn
| +|philipnext
philipnext
|refactorthis
refactorthis
|samir-nimbly
samir-nimbly
|shaybc
shaybc
|shohei-ihaya
shohei-ihaya
|student20880
student20880
| +|cdlliuy
cdlliuy
|PretzelVector
PretzelVector
|nevermorec
nevermorec
|adamwlarson
adamwlarson
|alarno
alarno
|andreastempsch
andreastempsch
| +|Atlogit
Atlogit
|chadgauth
chadgauth
|dleen
dleen
|dbasclpy
dbasclpy
|celestial-vault
celestial-vault
|franekp
franekp
| +|DeXtroTip
DeXtroTip
|hesara
hesara
|eltociear
eltociear
|Jdo300
Jdo300
|libertyteeth
libertyteeth
|mamertofabian
mamertofabian
| +|marvijo-code
marvijo-code
|kvokka
kvokka
| | | | | ## ライセンス diff --git a/locales/ko/CONTRIBUTING.md b/locales/ko/CONTRIBUTING.md index 256399ca933..342fcbc4512 100644 --- a/locales/ko/CONTRIBUTING.md +++ b/locales/ko/CONTRIBUTING.md @@ -27,7 +27,68 @@ Roo Code에 기여하는 데 관심을 가져주셔서 기쁩니다. 버그를 우리는 [문서](https://docs.roocode.com/)에 대한 기여도 환영합니다! 오타 수정, 기존 가이드 개선 또는 새로운 교육 콘텐츠 생성 등 - 모든 사람이 Roo Code를 최대한 활용할 수 있도록 도와주는 커뮤니티 기반 리소스 저장소를 구축하고 싶습니다. 모든 페이지에서 "Edit this page"를 클릭하여 파일을 편집할 수 있는 Github의 적절한 위치로 빠르게 이동하거나, https://github.com/RooVetGit/Roo-Code-Docs에 직접 접근할 수 있습니다. -더 큰 기능 작업을 계획하고 있다면, Roo Code의 비전과 일치하는지 논의할 수 있도록 먼저 [기능 요청](https://github.com/RooVetGit/Roo-Code/discussions/categories/feature-requests?discussions_q=is%3Aopen+category%3A%22Feature+Requests%22+sort%3Atop)을 생성해주세요. +더 큰 기능 작업을 계획하고 있다면, Roo Code의 비전과 일치하는지 논의할 수 있도록 먼저 [기능 요청](https://github.com/RooVetGit/Roo-Code/discussions/categories/feature-requests?discussions_q=is%3Aopen+category%3A%22Feature+Requests%22+sort%3Atop)을 생성해주세요. 또한 아이디어가 우리의 전략적 방향과 일치하는지 확인하기 위해 아래의 [프로젝트 로드맵](#프로젝트-로드맵)을 확인할 수도 있습니다. + +## 프로젝트 로드맵 + +Roo Code는 우리의 우선순위와 미래 방향을 안내하는 명확한 개발 로드맵을 가지고 있습니다. 우리의 로드맵을 이해하면 다음과 같은 도움을 받을 수 있습니다: + +- 프로젝트 목표에 맞게 기여 조정 +- 당신의 전문 지식이 가장 가치 있는 영역 식별 +- 특정 디자인 결정 배경 이해 +- 우리의 비전을 지원하는 새로운 기능에 대한 영감 찾기 + +현재 로드맵은 여섯 가지 주요 기둥에 초점을 맞추고 있습니다: + +### 제공업체 지원 + +가능한 한 많은 제공업체를 지원하는 것을 목표로 합니다: + +- 더 다재다능한 "OpenAI 호환" 지원 +- xAI, Microsoft Azure AI, Alibaba Cloud Qwen, IBM Watsonx, Together AI, DeepInfra, Fireworks AI, Cohere, Perplexity AI, FriendliAI, Replicate +- Ollama와 LM Studio에 대한 향상된 지원 + +### 모델 지원 + +로컬 모델을 포함하여 가능한 한 많은 모델에서 Roo가 잘 작동하기를 원합니다: + +- 사용자 정의 시스템 프롬프팅 및 워크플로우를 통한 로컬 모델 지원 +- 벤치마킹 평가 및 테스트 케이스 + +### 시스템 지원 + +Roo가 모든 사람의 컴퓨터에서 잘 작동하기를 원합니다: + +- 크로스 플랫폼 터미널 통합 +- Mac, Windows 및 Linux에 대한 강력하고 일관된 지원 + +### 문서화 + +모든 사용자와 기여자를 위한 포괄적이고 접근 가능한 문서를 원합니다: + +- 확장된 사용자 가이드 및 튜토리얼 +- 명확한 API 문서 +- 기여자를 위한 더 나은 가이드 +- 다국어 문서 리소스 +- 대화형 예제 및 코드 샘플 + +### 안정성 + +버그 수를 크게 줄이고 자동화된 테스트를 증가시키고자 합니다: + +- 디버그 로깅 스위치 +- 버그/지원 요청과 함께 보낼 수 있는 "기기/작업 정보" 복사 버튼 + +### 국제화 + +Roo가 모든 사람의 언어를 말하기를 원합니다: + +- 我们希望 Roo Code 说每个人的语言 +- Queremos que Roo Code hable el idioma de todos +- हम चाहते हैं कि Roo Code हर किसी की भाषा बोले +- نريد أن يتحدث Roo Code لغة الجميع + +우리는 특히 로드맵 목표를 발전시키는 기여를 환영합니다. 이러한 기둥에 맞는 작업을 하고 있다면, PR 설명에서 이를 언급해 주세요. ## 개발 설정 diff --git a/locales/ko/README.md b/locales/ko/README.md index 92d7c38bfcb..18ccb812289 100644 --- a/locales/ko/README.md +++ b/locales/ko/README.md @@ -76,7 +76,7 @@ Roo Code 3.10이 강력한 생산성 향상 기능을 제공합니다! ### 다중 모드 -Roo Code는 전문화된 [모드](https://docs.roocode.com/basic-usage/modes)로 사용자의 필요에 맞게 적응합니다: +Roo Code는 전문화된 [모드](https://docs.roocode.com/basic-usage/using-modes)로 사용자의 필요에 맞게 적응합니다: - **코드 모드:** 일반적인 코딩 작업용 - **아키텍트 모드:** 계획 및 기술 리더십용 @@ -86,7 +86,7 @@ Roo Code는 전문화된 [모드](https://docs.roocode.com/basic-usage/modes)로 ### 스마트 도구 -Roo Code는 다음과 같은 강력한 [도구](https://docs.roocode.com/basic-usage/using-tools)를 제공합니다: +Roo Code는 다음과 같은 강력한 [도구](https://docs.roocode.com/basic-usage/how-tools-work)를 제공합니다: - 프로젝트에서 파일 읽기 및 쓰기 - VS Code 터미널에서 명령 실행 @@ -182,19 +182,20 @@ Roo Code를 더 좋게 만드는 데 도움을 준 모든 기여자에게 감사 |:---:|:---:|:---:|:---:|:---:|:---:| |ColemanRoo
ColemanRoo
|stea9499
stea9499
|joemanley201
joemanley201
|System233
System233
|nissa-seru
nissa-seru
|jquanton
jquanton
| |NyxJae
NyxJae
|hannesrudolph
hannesrudolph
|MuriloFP
MuriloFP
|punkpeye
punkpeye
|d-oit
d-oit
|monotykamary
monotykamary
| -|vigneshsubbiah16
vigneshsubbiah16
|lloydchang
lloydchang
|Szpadel
Szpadel
|psv2522
psv2522
|Premshay
Premshay
|Smartsheet-JB-Brown
Smartsheet-JB-Brown
| -|cannuri
cannuri
|lupuletic
lupuletic
|olweraltuve
olweraltuve
|wkordalski
wkordalski
|qdaxb
qdaxb
|feifei325
feifei325
| -|RaySinner
RaySinner
|pdecat
pdecat
|emshvac
emshvac
|afshawnlotfi
afshawnlotfi
|aitoroses
aitoroses
|dtrugman
dtrugman
| -|KJ7LNW
KJ7LNW
|sammcj
sammcj
|pugazhendhi-m
pugazhendhi-m
|Lunchb0ne
Lunchb0ne
|yt3trees
yt3trees
|yongjer
yongjer
| -|vincentsong
vincentsong
|eonghk
eonghk
|arthurauffray
arthurauffray
|aheizi
aheizi
|heyseth
heyseth
|philfung
philfung
| -|napter
napter
|mdp
mdp
|jcbdev
jcbdev
|GitlyHallows
GitlyHallows
|benzntech
benzntech
|anton-otee
anton-otee
| -|bannzai
bannzai
|dairui1
dairui1
|dqroid
dqroid
|im47cn
im47cn
|kinandan
kinandan
|kohii
kohii
| -|lightrabbit
lightrabbit
|olup
olup
|moqimoqidea
moqimoqidea
|mosleyit
mosleyit
|oprstchn
oprstchn
|philipnext
philipnext
| -|refactorthis
refactorthis
|samir-nimbly
samir-nimbly
|shaybc
shaybc
|shohei-ihaya
shohei-ihaya
|student20880
student20880
|teddyOOXX
teddyOOXX
| -|PretzelVector
PretzelVector
|AMHesch
AMHesch
|adamwlarson
adamwlarson
|alarno
alarno
|andreastempsch
andreastempsch
|Atlogit
Atlogit
| -|dleen
dleen
|dbasclpy
dbasclpy
|celestial-vault
celestial-vault
|franekp
franekp
|DeXtroTip
DeXtroTip
|hesara
hesara
| -|eltociear
eltociear
|libertyteeth
libertyteeth
|mamertofabian
mamertofabian
|marvijo-code
marvijo-code
|Sarke
Sarke
|tgfjt
tgfjt
| -|vladstudio
vladstudio
|ashktn
ashktn
| | | | | +|cannuri
cannuri
|lloydchang
lloydchang
|vigneshsubbiah16
vigneshsubbiah16
|Szpadel
Szpadel
|lupuletic
lupuletic
|feifei325
feifei325
| +|qdaxb
qdaxb
|wkordalski
wkordalski
|Smartsheet-JB-Brown
Smartsheet-JB-Brown
|Premshay
Premshay
|psv2522
psv2522
|KJ7LNW
KJ7LNW
| +|olweraltuve
olweraltuve
|RaySinner
RaySinner
|afshawnlotfi
afshawnlotfi
|emshvac
emshvac
|pdecat
pdecat
|pugazhendhi-m
pugazhendhi-m
| +|Lunchb0ne
Lunchb0ne
|aheizi
aheizi
|sammcj
sammcj
|dtrugman
dtrugman
|aitoroses
aitoroses
|yt3trees
yt3trees
| +|yongjer
yongjer
|vincentsong
vincentsong
|teddyOOXX
teddyOOXX
|eonghk
eonghk
|arthurauffray
arthurauffray
|heyseth
heyseth
| +|philfung
philfung
|anton-otee
anton-otee
|benzntech
benzntech
|diarmidmackenzie
diarmidmackenzie
|GitlyHallows
GitlyHallows
|jcbdev
jcbdev
| +|Chenjiayuan195
Chenjiayuan195
|mdp
mdp
|napter
napter
|AMHesch
AMHesch
|vladstudio
vladstudio
|Yoshino-Yukitaro
Yoshino-Yukitaro
| +|ashktn
ashktn
|bannzai
bannzai
|dairui1
dairui1
|dqroid
dqroid
|im47cn
im47cn
|kinandan
kinandan
| +|kohii
kohii
|lightrabbit
lightrabbit
|olup
olup
|moqimoqidea
moqimoqidea
|mosleyit
mosleyit
|oprstchn
oprstchn
| +|philipnext
philipnext
|refactorthis
refactorthis
|samir-nimbly
samir-nimbly
|shaybc
shaybc
|shohei-ihaya
shohei-ihaya
|student20880
student20880
| +|cdlliuy
cdlliuy
|PretzelVector
PretzelVector
|nevermorec
nevermorec
|adamwlarson
adamwlarson
|alarno
alarno
|andreastempsch
andreastempsch
| +|Atlogit
Atlogit
|chadgauth
chadgauth
|dleen
dleen
|dbasclpy
dbasclpy
|celestial-vault
celestial-vault
|franekp
franekp
| +|DeXtroTip
DeXtroTip
|hesara
hesara
|eltociear
eltociear
|Jdo300
Jdo300
|libertyteeth
libertyteeth
|mamertofabian
mamertofabian
| +|marvijo-code
marvijo-code
|kvokka
kvokka
| | | | | ## 라이선스 diff --git a/locales/pl/CONTRIBUTING.md b/locales/pl/CONTRIBUTING.md index 3d338d1ce0f..b669cb2f2ce 100644 --- a/locales/pl/CONTRIBUTING.md +++ b/locales/pl/CONTRIBUTING.md @@ -26,7 +26,68 @@ Szukasz dobrego pierwszego wkładu? Sprawdź problemy w sekcji "Issue [Unassigne Cieszymy się również z wkładu do naszej [dokumentacji](https://docs.roocode.com/)! Czy to poprawianie literówek, ulepszanie istniejących przewodników, czy tworzenie nowych treści edukacyjnych - chcielibyśmy zbudować repozytorium zasobów napędzane przez społeczność, które pomaga każdemu czerpać maksimum z Roo Code. Możesz kliknąć "Edit this page" na dowolnej stronie, aby szybko przejść do odpowiedniego miejsca w Github, aby edytować plik, lub możesz przejść bezpośrednio do https://github.com/RooVetGit/Roo-Code-Docs. -Jeśli planujesz pracować nad większą funkcją, proszę najpierw utwórz [prośbę o funkcję](https://github.com/RooVetGit/Roo-Code/discussions/categories/feature-requests?discussions_q=is%3Aopen+category%3A%22Feature+Requests%22+sort%3Atop), abyśmy mogli przedyskutować, czy jest ona zgodna z wizją Roo Code. +Jeśli planujesz pracować nad większą funkcją, proszę najpierw utwórz [prośbę o funkcję](https://github.com/RooVetGit/Roo-Code/discussions/categories/feature-requests?discussions_q=is%3Aopen+category%3A%22Feature+Requests%22+sort%3Atop), abyśmy mogli przedyskutować, czy jest ona zgodna z wizją Roo Code. Możesz również sprawdzić naszą [Mapę Drogową Projektu](#mapa-drogowa-projektu) poniżej, aby zobaczyć, czy Twój pomysł pasuje do naszego strategicznego kierunku. + +## Mapa Drogowa Projektu + +Roo Code posiada jasną mapę drogową rozwoju, która kieruje naszymi priorytetami i przyszłym kierunkiem. Zrozumienie naszej mapy drogowej może pomóc Ci: + +- Dostosować swoje wkłady do celów projektu +- Zidentyfikować obszary, w których Twoja wiedza byłaby najbardziej wartościowa +- Zrozumieć kontekst stojący za pewnymi decyzjami projektowymi +- Znaleźć inspirację dla nowych funkcji, które wspierają naszą wizję + +Nasza obecna mapa drogowa koncentruje się na sześciu kluczowych filarach: + +### Wsparcie dla Dostawców + +Dążymy do wspierania jak największej liczby dostawców: + +- Bardziej wszechstronne wsparcie dla "OpenAI Compatible" +- xAI, Microsoft Azure AI, Alibaba Cloud Qwen, IBM Watsonx, Together AI, DeepInfra, Fireworks AI, Cohere, Perplexity AI, FriendliAI, Replicate +- Ulepszone wsparcie dla Ollama i LM Studio + +### Wsparcie dla Modeli + +Chcemy, aby Roo działał jak najlepiej na jak największej liczbie modeli, w tym modeli lokalnych: + +- Wsparcie dla modeli lokalnych poprzez niestandardowe promptowanie systemowe i przepływy pracy +- Benchmarki ewaluacyjne i przypadki testowe + +### Wsparcie dla Systemów + +Chcemy, aby Roo działał dobrze na komputerze każdego: + +- Integracja terminala międzyplatformowego +- Silne i spójne wsparcie dla Mac, Windows i Linux + +### Dokumentacja + +Chcemy kompleksowej, dostępnej dokumentacji dla wszystkich użytkowników i współtwórców: + +- Rozszerzone przewodniki użytkownika i tutoriale +- Jasna dokumentacja API +- Lepsze wskazówki dla współtwórców +- Wielojęzyczne zasoby dokumentacji +- Interaktywne przykłady i próbki kodu + +### Stabilność + +Chcemy znacznie zmniejszyć liczbę błędów i zwiększyć zautomatyzowane testowanie: + +- Przełącznik rejestrowania debugowania +- Przycisk kopiowania "Informacji o Maszynie/Zadaniu" do wysyłania z prośbami o pomoc/zgłoszeniami błędów + +### Internacjonalizacja + +Chcemy, aby Roo mówił językiem każdego: + +- 我们希望 Roo Code 说每个人的语言 +- Queremos que Roo Code hable el idioma de todos +- हम चाहते हैं कि Roo Code हर किसी की भाषा बोले +- نريد أن يتحدث Roo Code لغة الجميع + +Szczególnie witamy wkłady, które przyspieszają realizację celów naszej mapy drogowej. Jeśli pracujesz nad czymś, co jest zgodne z tymi filarami, proszę wspomnij o tym w opisie swojego PR. ## Konfiguracja rozwojowa diff --git a/locales/pl/README.md b/locales/pl/README.md index 7b481402188..c8191283250 100644 --- a/locales/pl/README.md +++ b/locales/pl/README.md @@ -76,7 +76,7 @@ Roo Code 3.10 przynosi potężne usprawnienia produktywności! ### Wiele trybów -Roo Code dostosowuje się do Twoich potrzeb za pomocą wyspecjalizowanych [trybów](https://docs.roocode.com/basic-usage/modes): +Roo Code dostosowuje się do Twoich potrzeb za pomocą wyspecjalizowanych [trybów](https://docs.roocode.com/basic-usage/using-modes): - **Tryb Code:** Do ogólnych zadań kodowania - **Tryb Architect:** Do planowania i przywództwa technicznego @@ -86,7 +86,7 @@ Roo Code dostosowuje się do Twoich potrzeb za pomocą wyspecjalizowanych [tryb ### Inteligentne narzędzia -Roo Code jest wyposażony w potężne [narzędzia](https://docs.roocode.com/basic-usage/using-tools), które mogą: +Roo Code jest wyposażony w potężne [narzędzia](https://docs.roocode.com/basic-usage/how-tools-work), które mogą: - Czytać i zapisywać pliki w Twoim projekcie - Wykonywać polecenia w terminalu VS Code @@ -182,19 +182,20 @@ Dziękujemy wszystkim naszym współtwórcom, którzy pomogli ulepszyć Roo Code |:---:|:---:|:---:|:---:|:---:|:---:| |ColemanRoo
ColemanRoo
|stea9499
stea9499
|joemanley201
joemanley201
|System233
System233
|nissa-seru
nissa-seru
|jquanton
jquanton
| |NyxJae
NyxJae
|hannesrudolph
hannesrudolph
|MuriloFP
MuriloFP
|punkpeye
punkpeye
|d-oit
d-oit
|monotykamary
monotykamary
| -|vigneshsubbiah16
vigneshsubbiah16
|lloydchang
lloydchang
|Szpadel
Szpadel
|psv2522
psv2522
|Premshay
Premshay
|Smartsheet-JB-Brown
Smartsheet-JB-Brown
| -|cannuri
cannuri
|lupuletic
lupuletic
|olweraltuve
olweraltuve
|wkordalski
wkordalski
|qdaxb
qdaxb
|feifei325
feifei325
| -|RaySinner
RaySinner
|pdecat
pdecat
|emshvac
emshvac
|afshawnlotfi
afshawnlotfi
|aitoroses
aitoroses
|dtrugman
dtrugman
| -|KJ7LNW
KJ7LNW
|sammcj
sammcj
|pugazhendhi-m
pugazhendhi-m
|Lunchb0ne
Lunchb0ne
|yt3trees
yt3trees
|yongjer
yongjer
| -|vincentsong
vincentsong
|eonghk
eonghk
|arthurauffray
arthurauffray
|aheizi
aheizi
|heyseth
heyseth
|philfung
philfung
| -|napter
napter
|mdp
mdp
|jcbdev
jcbdev
|GitlyHallows
GitlyHallows
|benzntech
benzntech
|anton-otee
anton-otee
| -|bannzai
bannzai
|dairui1
dairui1
|dqroid
dqroid
|im47cn
im47cn
|kinandan
kinandan
|kohii
kohii
| -|lightrabbit
lightrabbit
|olup
olup
|moqimoqidea
moqimoqidea
|mosleyit
mosleyit
|oprstchn
oprstchn
|philipnext
philipnext
| -|refactorthis
refactorthis
|samir-nimbly
samir-nimbly
|shaybc
shaybc
|shohei-ihaya
shohei-ihaya
|student20880
student20880
|teddyOOXX
teddyOOXX
| -|PretzelVector
PretzelVector
|AMHesch
AMHesch
|adamwlarson
adamwlarson
|alarno
alarno
|andreastempsch
andreastempsch
|Atlogit
Atlogit
| -|dleen
dleen
|dbasclpy
dbasclpy
|celestial-vault
celestial-vault
|franekp
franekp
|DeXtroTip
DeXtroTip
|hesara
hesara
| -|eltociear
eltociear
|libertyteeth
libertyteeth
|mamertofabian
mamertofabian
|marvijo-code
marvijo-code
|Sarke
Sarke
|tgfjt
tgfjt
| -|vladstudio
vladstudio
|ashktn
ashktn
| | | | | +|cannuri
cannuri
|lloydchang
lloydchang
|vigneshsubbiah16
vigneshsubbiah16
|Szpadel
Szpadel
|lupuletic
lupuletic
|feifei325
feifei325
| +|qdaxb
qdaxb
|wkordalski
wkordalski
|Smartsheet-JB-Brown
Smartsheet-JB-Brown
|Premshay
Premshay
|psv2522
psv2522
|KJ7LNW
KJ7LNW
| +|olweraltuve
olweraltuve
|RaySinner
RaySinner
|afshawnlotfi
afshawnlotfi
|emshvac
emshvac
|pdecat
pdecat
|pugazhendhi-m
pugazhendhi-m
| +|Lunchb0ne
Lunchb0ne
|aheizi
aheizi
|sammcj
sammcj
|dtrugman
dtrugman
|aitoroses
aitoroses
|yt3trees
yt3trees
| +|yongjer
yongjer
|vincentsong
vincentsong
|teddyOOXX
teddyOOXX
|eonghk
eonghk
|arthurauffray
arthurauffray
|heyseth
heyseth
| +|philfung
philfung
|anton-otee
anton-otee
|benzntech
benzntech
|diarmidmackenzie
diarmidmackenzie
|GitlyHallows
GitlyHallows
|jcbdev
jcbdev
| +|Chenjiayuan195
Chenjiayuan195
|mdp
mdp
|napter
napter
|AMHesch
AMHesch
|vladstudio
vladstudio
|Yoshino-Yukitaro
Yoshino-Yukitaro
| +|ashktn
ashktn
|bannzai
bannzai
|dairui1
dairui1
|dqroid
dqroid
|im47cn
im47cn
|kinandan
kinandan
| +|kohii
kohii
|lightrabbit
lightrabbit
|olup
olup
|moqimoqidea
moqimoqidea
|mosleyit
mosleyit
|oprstchn
oprstchn
| +|philipnext
philipnext
|refactorthis
refactorthis
|samir-nimbly
samir-nimbly
|shaybc
shaybc
|shohei-ihaya
shohei-ihaya
|student20880
student20880
| +|cdlliuy
cdlliuy
|PretzelVector
PretzelVector
|nevermorec
nevermorec
|adamwlarson
adamwlarson
|alarno
alarno
|andreastempsch
andreastempsch
| +|Atlogit
Atlogit
|chadgauth
chadgauth
|dleen
dleen
|dbasclpy
dbasclpy
|celestial-vault
celestial-vault
|franekp
franekp
| +|DeXtroTip
DeXtroTip
|hesara
hesara
|eltociear
eltociear
|Jdo300
Jdo300
|libertyteeth
libertyteeth
|mamertofabian
mamertofabian
| +|marvijo-code
marvijo-code
|kvokka
kvokka
| | | | | ## Licencja diff --git a/locales/pt-BR/CONTRIBUTING.md b/locales/pt-BR/CONTRIBUTING.md index efd19ed9d18..a3e04811b3e 100644 --- a/locales/pt-BR/CONTRIBUTING.md +++ b/locales/pt-BR/CONTRIBUTING.md @@ -26,7 +26,68 @@ Procurando uma boa primeira contribuição? Verifique as issues na seção "Issu Também damos as boas-vindas a contribuições para nossa [documentação](https://docs.roocode.com/)! Seja corrigindo erros de digitação, melhorando guias existentes ou criando novo conteúdo educacional - adoraríamos construir um repositório de recursos impulsionado pela comunidade que ajude todos a obter o máximo do Roo Code. Você pode clicar em "Edit this page" em qualquer página para ir rapidamente ao local certo no Github para editar o arquivo, ou pode mergulhar diretamente em https://github.com/RooVetGit/Roo-Code-Docs. -Se você está planejando trabalhar em um recurso maior, por favor crie primeiro uma [solicitação de recurso](https://github.com/RooVetGit/Roo-Code/discussions/categories/feature-requests?discussions_q=is%3Aopen+category%3A%22Feature+Requests%22+sort%3Atop) para que possamos discutir se está alinhado com a visão do Roo Code. +Se você está planejando trabalhar em um recurso maior, por favor crie primeiro uma [solicitação de recurso](https://github.com/RooVetGit/Roo-Code/discussions/categories/feature-requests?discussions_q=is%3Aopen+category%3A%22Feature+Requests%22+sort%3Atop) para que possamos discutir se está alinhado com a visão do Roo Code. Você também pode verificar nosso [Roteiro do Projeto](#roteiro-do-projeto) abaixo para ver se sua ideia se encaixa em nossa direção estratégica. + +## Roteiro do Projeto + +O Roo Code possui um roteiro de desenvolvimento claro que orienta nossas prioridades e direção futura. Entender nosso roteiro pode ajudar você a: + +- Alinhar suas contribuições com os objetivos do projeto +- Identificar áreas onde sua expertise seria mais valiosa +- Entender o contexto por trás de certas decisões de design +- Encontrar inspiração para novos recursos que apoiem nossa visão + +Nosso roteiro atual se concentra em seis pilares principais: + +### Suporte a Provedores + +Nosso objetivo é oferecer suporte a tantos provedores quanto possível: + +- Suporte mais versátil para "OpenAI Compatible" +- xAI, Microsoft Azure AI, Alibaba Cloud Qwen, IBM Watsonx, Together AI, DeepInfra, Fireworks AI, Cohere, Perplexity AI, FriendliAI, Replicate +- Suporte aprimorado para Ollama e LM Studio + +### Suporte a Modelos + +Queremos que o Roo funcione bem em tantos modelos quanto possível, incluindo modelos locais: + +- Suporte a modelos locais através de prompts de sistema personalizados e fluxos de trabalho +- Avaliações de benchmark e casos de teste + +### Suporte a Sistemas + +Queremos que o Roo funcione bem no computador de todos: + +- Integração de terminal multiplataforma +- Suporte forte e consistente para Mac, Windows e Linux + +### Documentação + +Queremos documentação abrangente e acessível para todos os usuários e colaboradores: + +- Guias de usuário e tutoriais expandidos +- Documentação clara da API +- Melhor orientação para colaboradores +- Recursos de documentação multilíngues +- Exemplos interativos e amostras de código + +### Estabilidade + +Queremos diminuir significativamente o número de bugs e aumentar os testes automatizados: + +- Interruptor de registro de depuração +- Botão de cópia "Informações de Máquina/Tarefa" para enviar com solicitações de suporte/bug + +### Internacionalização + +Queremos que o Roo fale o idioma de todos: + +- 我们希望 Roo Code 说每个人的语言 +- Queremos que Roo Code hable el idioma de todos +- हम चाहते हैं कि Roo Code हर किसी की भाषा बोले +- نريد أن يتحدث Roo Code لغة الجميع + +Damos especialmente as boas-vindas a contribuições que avançam os objetivos do nosso roteiro. Se você estiver trabalhando em algo que se alinha com esses pilares, por favor mencione isso na descrição do seu PR. ## Configuração de Desenvolvimento diff --git a/locales/pt-BR/README.md b/locales/pt-BR/README.md index 13b4d56934a..298dbab7ebe 100644 --- a/locales/pt-BR/README.md +++ b/locales/pt-BR/README.md @@ -76,7 +76,7 @@ O Roo Code 3.10 traz poderosas melhorias de produtividade! ### Múltiplos Modos -O Roo Code se adapta às suas necessidades com [modos](https://docs.roocode.com/basic-usage/modes) especializados: +O Roo Code se adapta às suas necessidades com [modos](https://docs.roocode.com/basic-usage/using-modes) especializados: - **Modo Code:** Para tarefas gerais de codificação - **Modo Architect:** Para planejamento e liderança técnica @@ -86,7 +86,7 @@ O Roo Code se adapta às suas necessidades com [modos](https://docs.roocode.com/ ### Ferramentas Inteligentes -O Roo Code vem com poderosas [ferramentas](https://docs.roocode.com/basic-usage/using-tools) que podem: +O Roo Code vem com poderosas [ferramentas](https://docs.roocode.com/basic-usage/how-tools-work) que podem: - Ler e escrever arquivos em seu projeto - Executar comandos no seu terminal VS Code @@ -182,19 +182,20 @@ Obrigado a todos os nossos contribuidores que ajudaram a tornar o Roo Code melho |:---:|:---:|:---:|:---:|:---:|:---:| |ColemanRoo
ColemanRoo
|stea9499
stea9499
|joemanley201
joemanley201
|System233
System233
|nissa-seru
nissa-seru
|jquanton
jquanton
| |NyxJae
NyxJae
|hannesrudolph
hannesrudolph
|MuriloFP
MuriloFP
|punkpeye
punkpeye
|d-oit
d-oit
|monotykamary
monotykamary
| -|vigneshsubbiah16
vigneshsubbiah16
|lloydchang
lloydchang
|Szpadel
Szpadel
|psv2522
psv2522
|Premshay
Premshay
|Smartsheet-JB-Brown
Smartsheet-JB-Brown
| -|cannuri
cannuri
|lupuletic
lupuletic
|olweraltuve
olweraltuve
|wkordalski
wkordalski
|qdaxb
qdaxb
|feifei325
feifei325
| -|RaySinner
RaySinner
|pdecat
pdecat
|emshvac
emshvac
|afshawnlotfi
afshawnlotfi
|aitoroses
aitoroses
|dtrugman
dtrugman
| -|KJ7LNW
KJ7LNW
|sammcj
sammcj
|pugazhendhi-m
pugazhendhi-m
|Lunchb0ne
Lunchb0ne
|yt3trees
yt3trees
|yongjer
yongjer
| -|vincentsong
vincentsong
|eonghk
eonghk
|arthurauffray
arthurauffray
|aheizi
aheizi
|heyseth
heyseth
|philfung
philfung
| -|napter
napter
|mdp
mdp
|jcbdev
jcbdev
|GitlyHallows
GitlyHallows
|benzntech
benzntech
|anton-otee
anton-otee
| -|bannzai
bannzai
|dairui1
dairui1
|dqroid
dqroid
|im47cn
im47cn
|kinandan
kinandan
|kohii
kohii
| -|lightrabbit
lightrabbit
|olup
olup
|moqimoqidea
moqimoqidea
|mosleyit
mosleyit
|oprstchn
oprstchn
|philipnext
philipnext
| -|refactorthis
refactorthis
|samir-nimbly
samir-nimbly
|shaybc
shaybc
|shohei-ihaya
shohei-ihaya
|student20880
student20880
|teddyOOXX
teddyOOXX
| -|PretzelVector
PretzelVector
|AMHesch
AMHesch
|adamwlarson
adamwlarson
|alarno
alarno
|andreastempsch
andreastempsch
|Atlogit
Atlogit
| -|dleen
dleen
|dbasclpy
dbasclpy
|celestial-vault
celestial-vault
|franekp
franekp
|DeXtroTip
DeXtroTip
|hesara
hesara
| -|eltociear
eltociear
|libertyteeth
libertyteeth
|mamertofabian
mamertofabian
|marvijo-code
marvijo-code
|Sarke
Sarke
|tgfjt
tgfjt
| -|vladstudio
vladstudio
|ashktn
ashktn
| | | | | +|cannuri
cannuri
|lloydchang
lloydchang
|vigneshsubbiah16
vigneshsubbiah16
|Szpadel
Szpadel
|lupuletic
lupuletic
|feifei325
feifei325
| +|qdaxb
qdaxb
|wkordalski
wkordalski
|Smartsheet-JB-Brown
Smartsheet-JB-Brown
|Premshay
Premshay
|psv2522
psv2522
|KJ7LNW
KJ7LNW
| +|olweraltuve
olweraltuve
|RaySinner
RaySinner
|afshawnlotfi
afshawnlotfi
|emshvac
emshvac
|pdecat
pdecat
|pugazhendhi-m
pugazhendhi-m
| +|Lunchb0ne
Lunchb0ne
|aheizi
aheizi
|sammcj
sammcj
|dtrugman
dtrugman
|aitoroses
aitoroses
|yt3trees
yt3trees
| +|yongjer
yongjer
|vincentsong
vincentsong
|teddyOOXX
teddyOOXX
|eonghk
eonghk
|arthurauffray
arthurauffray
|heyseth
heyseth
| +|philfung
philfung
|anton-otee
anton-otee
|benzntech
benzntech
|diarmidmackenzie
diarmidmackenzie
|GitlyHallows
GitlyHallows
|jcbdev
jcbdev
| +|Chenjiayuan195
Chenjiayuan195
|mdp
mdp
|napter
napter
|AMHesch
AMHesch
|vladstudio
vladstudio
|Yoshino-Yukitaro
Yoshino-Yukitaro
| +|ashktn
ashktn
|bannzai
bannzai
|dairui1
dairui1
|dqroid
dqroid
|im47cn
im47cn
|kinandan
kinandan
| +|kohii
kohii
|lightrabbit
lightrabbit
|olup
olup
|moqimoqidea
moqimoqidea
|mosleyit
mosleyit
|oprstchn
oprstchn
| +|philipnext
philipnext
|refactorthis
refactorthis
|samir-nimbly
samir-nimbly
|shaybc
shaybc
|shohei-ihaya
shohei-ihaya
|student20880
student20880
| +|cdlliuy
cdlliuy
|PretzelVector
PretzelVector
|nevermorec
nevermorec
|adamwlarson
adamwlarson
|alarno
alarno
|andreastempsch
andreastempsch
| +|Atlogit
Atlogit
|chadgauth
chadgauth
|dleen
dleen
|dbasclpy
dbasclpy
|celestial-vault
celestial-vault
|franekp
franekp
| +|DeXtroTip
DeXtroTip
|hesara
hesara
|eltociear
eltociear
|Jdo300
Jdo300
|libertyteeth
libertyteeth
|mamertofabian
mamertofabian
| +|marvijo-code
marvijo-code
|kvokka
kvokka
| | | | | ## Licença diff --git a/locales/tr/CONTRIBUTING.md b/locales/tr/CONTRIBUTING.md index 2bad1c80888..39ddb8b1b76 100644 --- a/locales/tr/CONTRIBUTING.md +++ b/locales/tr/CONTRIBUTING.md @@ -26,7 +26,68 @@ Hata raporları Roo Code'u herkes için daha iyi hale getirmeye yardımcı olur! [Belgelerimize](https://docs.roocode.com/) katkıları da memnuniyetle karşılıyoruz! İster yazım hatalarını düzeltmek, mevcut kılavuzları geliştirmek veya yeni eğitim içeriği oluşturmak olsun - herkesin Roo Code'dan en iyi şekilde yararlanmasına yardımcı olan topluluk odaklı bir kaynak deposu oluşturmak istiyoruz. Dosyayı düzenlemek için Github'daki doğru yere hızlıca gitmek için herhangi bir sayfada "Edit this page" düğmesine tıklayabilir veya doğrudan https://github.com/RooVetGit/Roo-Code-Docs adresine dalabilirsiniz. -Daha büyük bir özellik üzerinde çalışmayı planlıyorsanız, lütfen önce bir [özellik isteği](https://github.com/RooVetGit/Roo-Code/discussions/categories/feature-requests?discussions_q=is%3Aopen+category%3A%22Feature+Requests%22+sort%3Atop) oluşturun, böylece Roo Code'un vizyonuyla uyumlu olup olmadığını tartışabiliriz. +Daha büyük bir özellik üzerinde çalışmayı planlıyorsanız, lütfen önce bir [özellik isteği](https://github.com/RooVetGit/Roo-Code/discussions/categories/feature-requests?discussions_q=is%3Aopen+category%3A%22Feature+Requests%22+sort%3Atop) oluşturun, böylece Roo Code'un vizyonuyla uyumlu olup olmadığını tartışabiliriz. Ayrıca, fikrinizin stratejik yönümüze uyup uymadığını görmek için aşağıdaki [Proje Yol Haritası](#proje-yol-haritası)'nı kontrol edebilirsiniz. + +## Proje Yol Haritası + +Roo Code, önceliklerimizi ve gelecekteki yönümüzü yönlendiren net bir geliştirme yol haritasına sahiptir. Yol haritamızı anlamak size şu konularda yardımcı olabilir: + +- Katkılarınızı proje hedefleriyle uyumlu hale getirmek +- Uzmanlığınızın en değerli olacağı alanları belirlemek +- Belirli tasarım kararlarının arkasındaki bağlamı anlamak +- Vizyonumuzu destekleyen yeni özellikler için ilham bulmak + +Mevcut yol haritamız altı temel sütun üzerine odaklanmaktadır: + +### Sağlayıcı Desteği + +Mümkün olduğunca çok sağlayıcıyı desteklemeyi hedefliyoruz: + +- Daha çok yönlü "OpenAI Uyumlu" destek +- xAI, Microsoft Azure AI, Alibaba Cloud Qwen, IBM Watsonx, Together AI, DeepInfra, Fireworks AI, Cohere, Perplexity AI, FriendliAI, Replicate +- Ollama ve LM Studio için geliştirilmiş destek + +### Model Desteği + +Roo'nun yerel modeller de dahil olmak üzere mümkün olduğunca çok modelde iyi çalışmasını istiyoruz: + +- Özel sistem yönlendirmesi ve iş akışları aracılığıyla yerel model desteği +- Kıyaslama değerlendirmeleri ve test vakaları + +### Sistem Desteği + +Roo'nun herkesin bilgisayarında iyi çalışmasını istiyoruz: + +- Çapraz platform terminal entegrasyonu +- Mac, Windows ve Linux için güçlü ve tutarlı destek + +### Dokümantasyon + +Tüm kullanıcılar ve katkıda bulunanlar için kapsamlı, erişilebilir dokümantasyon istiyoruz: + +- Genişletilmiş kullanıcı kılavuzları ve öğreticiler +- Net API dokümantasyonu +- Katkıda bulunanlar için daha iyi rehberlik +- Çok dilli dokümantasyon kaynakları +- Etkileşimli örnekler ve kod örnekleri + +### Kararlılık + +Hata sayısını önemli ölçüde azaltmak ve otomatik testleri artırmak istiyoruz: + +- Hata ayıklama günlüğü anahtarı +- Hata/destek istekleriyle birlikte göndermek için "Makine/Görev Bilgisi" kopyalama düğmesi + +### Uluslararasılaştırma + +Roo'nun herkesin dilini konuşmasını istiyoruz: + +- 我们希望 Roo Code 说每个人的语言 +- Queremos que Roo Code hable el idioma de todos +- हम चाहते हैं कि Roo Code हर किसी की भाषा बोले +- نريد أن يتحدث Roo Code لغة الجميع + +Özellikle yol haritamızın hedeflerini ileriye taşıyan katkıları memnuniyetle karşılıyoruz. Bu sütunlarla uyumlu bir şey üzerinde çalışıyorsanız, lütfen PR açıklamanızda bundan bahsedin. ## Geliştirme Kurulumu diff --git a/locales/tr/README.md b/locales/tr/README.md index 55faca7b50e..f219d390c9a 100644 --- a/locales/tr/README.md +++ b/locales/tr/README.md @@ -76,7 +76,7 @@ Roo Code 3.10 güçlü üretkenlik iyileştirmeleri getiriyor! ### Çoklu Modlar -Roo Code, özelleştirilmiş [modlar](https://docs.roocode.com/basic-usage/modes) ile ihtiyaçlarınıza uyum sağlar: +Roo Code, özelleştirilmiş [modlar](https://docs.roocode.com/basic-usage/using-modes) ile ihtiyaçlarınıza uyum sağlar: - **Kod Modu:** Genel kodlama görevleri için - **Mimar Modu:** Planlama ve teknik liderlik için @@ -86,7 +86,7 @@ Roo Code, özelleştirilmiş [modlar](https://docs.roocode.com/basic-usage/modes ### Akıllı Araçlar -Roo Code, şunları yapabilen güçlü [araçlar](https://docs.roocode.com/basic-usage/using-tools) ile gelir: +Roo Code, şunları yapabilen güçlü [araçlar](https://docs.roocode.com/basic-usage/how-tools-work) ile gelir: - Projenizde dosyaları okuma ve yazma - VS Code terminalinizde komutları çalıştırma @@ -182,19 +182,20 @@ Roo Code'u daha iyi hale getirmeye yardımcı olan tüm katkıda bulunanlara te |:---:|:---:|:---:|:---:|:---:|:---:| |ColemanRoo
ColemanRoo
|stea9499
stea9499
|joemanley201
joemanley201
|System233
System233
|nissa-seru
nissa-seru
|jquanton
jquanton
| |NyxJae
NyxJae
|hannesrudolph
hannesrudolph
|MuriloFP
MuriloFP
|punkpeye
punkpeye
|d-oit
d-oit
|monotykamary
monotykamary
| -|vigneshsubbiah16
vigneshsubbiah16
|lloydchang
lloydchang
|Szpadel
Szpadel
|psv2522
psv2522
|Premshay
Premshay
|Smartsheet-JB-Brown
Smartsheet-JB-Brown
| -|cannuri
cannuri
|lupuletic
lupuletic
|olweraltuve
olweraltuve
|wkordalski
wkordalski
|qdaxb
qdaxb
|feifei325
feifei325
| -|RaySinner
RaySinner
|pdecat
pdecat
|emshvac
emshvac
|afshawnlotfi
afshawnlotfi
|aitoroses
aitoroses
|dtrugman
dtrugman
| -|KJ7LNW
KJ7LNW
|sammcj
sammcj
|pugazhendhi-m
pugazhendhi-m
|Lunchb0ne
Lunchb0ne
|yt3trees
yt3trees
|yongjer
yongjer
| -|vincentsong
vincentsong
|eonghk
eonghk
|arthurauffray
arthurauffray
|aheizi
aheizi
|heyseth
heyseth
|philfung
philfung
| -|napter
napter
|mdp
mdp
|jcbdev
jcbdev
|GitlyHallows
GitlyHallows
|benzntech
benzntech
|anton-otee
anton-otee
| -|bannzai
bannzai
|dairui1
dairui1
|dqroid
dqroid
|im47cn
im47cn
|kinandan
kinandan
|kohii
kohii
| -|lightrabbit
lightrabbit
|olup
olup
|moqimoqidea
moqimoqidea
|mosleyit
mosleyit
|oprstchn
oprstchn
|philipnext
philipnext
| -|refactorthis
refactorthis
|samir-nimbly
samir-nimbly
|shaybc
shaybc
|shohei-ihaya
shohei-ihaya
|student20880
student20880
|teddyOOXX
teddyOOXX
| -|PretzelVector
PretzelVector
|AMHesch
AMHesch
|adamwlarson
adamwlarson
|alarno
alarno
|andreastempsch
andreastempsch
|Atlogit
Atlogit
| -|dleen
dleen
|dbasclpy
dbasclpy
|celestial-vault
celestial-vault
|franekp
franekp
|DeXtroTip
DeXtroTip
|hesara
hesara
| -|eltociear
eltociear
|libertyteeth
libertyteeth
|mamertofabian
mamertofabian
|marvijo-code
marvijo-code
|Sarke
Sarke
|tgfjt
tgfjt
| -|vladstudio
vladstudio
|ashktn
ashktn
| | | | | +|cannuri
cannuri
|lloydchang
lloydchang
|vigneshsubbiah16
vigneshsubbiah16
|Szpadel
Szpadel
|lupuletic
lupuletic
|feifei325
feifei325
| +|qdaxb
qdaxb
|wkordalski
wkordalski
|Smartsheet-JB-Brown
Smartsheet-JB-Brown
|Premshay
Premshay
|psv2522
psv2522
|KJ7LNW
KJ7LNW
| +|olweraltuve
olweraltuve
|RaySinner
RaySinner
|afshawnlotfi
afshawnlotfi
|emshvac
emshvac
|pdecat
pdecat
|pugazhendhi-m
pugazhendhi-m
| +|Lunchb0ne
Lunchb0ne
|aheizi
aheizi
|sammcj
sammcj
|dtrugman
dtrugman
|aitoroses
aitoroses
|yt3trees
yt3trees
| +|yongjer
yongjer
|vincentsong
vincentsong
|teddyOOXX
teddyOOXX
|eonghk
eonghk
|arthurauffray
arthurauffray
|heyseth
heyseth
| +|philfung
philfung
|anton-otee
anton-otee
|benzntech
benzntech
|diarmidmackenzie
diarmidmackenzie
|GitlyHallows
GitlyHallows
|jcbdev
jcbdev
| +|Chenjiayuan195
Chenjiayuan195
|mdp
mdp
|napter
napter
|AMHesch
AMHesch
|vladstudio
vladstudio
|Yoshino-Yukitaro
Yoshino-Yukitaro
| +|ashktn
ashktn
|bannzai
bannzai
|dairui1
dairui1
|dqroid
dqroid
|im47cn
im47cn
|kinandan
kinandan
| +|kohii
kohii
|lightrabbit
lightrabbit
|olup
olup
|moqimoqidea
moqimoqidea
|mosleyit
mosleyit
|oprstchn
oprstchn
| +|philipnext
philipnext
|refactorthis
refactorthis
|samir-nimbly
samir-nimbly
|shaybc
shaybc
|shohei-ihaya
shohei-ihaya
|student20880
student20880
| +|cdlliuy
cdlliuy
|PretzelVector
PretzelVector
|nevermorec
nevermorec
|adamwlarson
adamwlarson
|alarno
alarno
|andreastempsch
andreastempsch
| +|Atlogit
Atlogit
|chadgauth
chadgauth
|dleen
dleen
|dbasclpy
dbasclpy
|celestial-vault
celestial-vault
|franekp
franekp
| +|DeXtroTip
DeXtroTip
|hesara
hesara
|eltociear
eltociear
|Jdo300
Jdo300
|libertyteeth
libertyteeth
|mamertofabian
mamertofabian
| +|marvijo-code
marvijo-code
|kvokka
kvokka
| | | | | ## Lisans diff --git a/locales/vi/CONTRIBUTING.md b/locales/vi/CONTRIBUTING.md index cdad58eaac3..6f4c2c74709 100644 --- a/locales/vi/CONTRIBUTING.md +++ b/locales/vi/CONTRIBUTING.md @@ -26,7 +26,68 @@ Tìm kiếm đóng góp đầu tiên tốt? Kiểm tra các vấn đề trong ph Chúng tôi cũng hoan nghênh đóng góp cho [tài liệu](https://docs.roocode.com/) của chúng tôi! Dù là sửa lỗi chính tả, cải thiện hướng dẫn hiện có, hay tạo nội dung giáo dục mới - chúng tôi muốn xây dựng một kho tài nguyên do cộng đồng thúc đẩy giúp mọi người tận dụng tối đa Roo Code. Bạn có thể nhấp vào "Edit this page" trên bất kỳ trang nào để nhanh chóng đến đúng vị trí trong Github để chỉnh sửa tệp, hoặc bạn có thể đi trực tiếp vào https://github.com/RooVetGit/Roo-Code-Docs. -Nếu bạn đang lên kế hoạch làm việc trên một tính năng lớn hơn, vui lòng tạo [yêu cầu tính năng](https://github.com/RooVetGit/Roo-Code/discussions/categories/feature-requests?discussions_q=is%3Aopen+category%3A%22Feature+Requests%22+sort%3Atop) trước để chúng tôi có thể thảo luận xem nó có phù hợp với tầm nhìn của Roo Code không. +Nếu bạn đang lên kế hoạch làm việc trên một tính năng lớn hơn, vui lòng tạo [yêu cầu tính năng](https://github.com/RooVetGit/Roo-Code/discussions/categories/feature-requests?discussions_q=is%3Aopen+category%3A%22Feature+Requests%22+sort%3Atop) trước để chúng tôi có thể thảo luận xem nó có phù hợp với tầm nhìn của Roo Code không. Bạn cũng có thể kiểm tra [Lộ Trình Dự Án](#lộ-trình-dự-án) bên dưới để xem liệu ý tưởng của bạn có phù hợp với định hướng chiến lược của chúng tôi không. + +## Lộ Trình Dự Án + +Roo Code có một lộ trình phát triển rõ ràng hướng dẫn các ưu tiên và định hướng tương lai của chúng tôi. Hiểu lộ trình của chúng tôi có thể giúp bạn: + +- Điều chỉnh đóng góp của bạn với mục tiêu của dự án +- Xác định các lĩnh vực mà chuyên môn của bạn sẽ có giá trị nhất +- Hiểu bối cảnh đằng sau một số quyết định thiết kế +- Tìm cảm hứng cho các tính năng mới hỗ trợ tầm nhìn của chúng tôi + +Lộ trình hiện tại của chúng tôi tập trung vào sáu trụ cột chính: + +### Hỗ Trợ Nhà Cung Cấp + +Chúng tôi hướng đến việc hỗ trợ càng nhiều nhà cung cấp càng tốt: + +- Hỗ trợ "OpenAI Compatible" linh hoạt hơn +- xAI, Microsoft Azure AI, Alibaba Cloud Qwen, IBM Watsonx, Together AI, DeepInfra, Fireworks AI, Cohere, Perplexity AI, FriendliAI, Replicate +- Hỗ trợ nâng cao cho Ollama và LM Studio + +### Hỗ Trợ Mô Hình + +Chúng tôi muốn Roo hoạt động tốt trên càng nhiều mô hình càng tốt, bao gồm cả mô hình cục bộ: + +- Hỗ trợ mô hình cục bộ thông qua prompting hệ thống tùy chỉnh và quy trình làm việc +- Đánh giá hiệu suất và các trường hợp thử nghiệm + +### Hỗ Trợ Hệ Thống + +Chúng tôi muốn Roo chạy tốt trên máy tính của mọi người: + +- Tích hợp terminal đa nền tảng +- Hỗ trợ mạnh mẽ và nhất quán cho Mac, Windows và Linux + +### Tài Liệu + +Chúng tôi muốn tài liệu toàn diện, dễ tiếp cận cho tất cả người dùng và người đóng góp: + +- Hướng dẫn người dùng và hướng dẫn mở rộng +- Tài liệu API rõ ràng +- Hướng dẫn tốt hơn cho người đóng góp +- Tài nguyên tài liệu đa ngôn ngữ +- Ví dụ tương tác và mẫu mã + +### Ổn Định + +Chúng tôi muốn giảm đáng kể số lượng lỗi và tăng kiểm tra tự động: + +- Công tắc ghi nhật ký gỡ lỗi +- Nút sao chép "Thông Tin Máy/Nhiệm Vụ" để gửi kèm với yêu cầu hỗ trợ/lỗi + +### Quốc Tế Hóa + +Chúng tôi muốn Roo nói ngôn ngữ của mọi người: + +- 我们希望 Roo Code 说每个人的语言 +- Queremos que Roo Code hable el idioma de todos +- हम चाहते हैं कि Roo Code हर किसी की भाषा बोले +- نريد أن يتحدث Roo Code لغة الجميع + +Chúng tôi đặc biệt hoan nghênh những đóng góp thúc đẩy mục tiêu lộ trình của chúng tôi. Nếu bạn đang làm việc trên điều gì đó phù hợp với những trụ cột này, vui lòng đề cập đến điều đó trong mô tả PR của bạn. ## Thiết Lập Phát Triển diff --git a/locales/vi/README.md b/locales/vi/README.md index 510135f8065..e9410d6febf 100644 --- a/locales/vi/README.md +++ b/locales/vi/README.md @@ -76,7 +76,7 @@ Roo Code 3.10 mang đến những cải tiến năng suất mạnh mẽ! ### Nhiều Chế Độ -Roo Code thích ứng với nhu cầu của bạn với các [chế độ](https://docs.roocode.com/basic-usage/modes) chuyên biệt: +Roo Code thích ứng với nhu cầu của bạn với các [chế độ](https://docs.roocode.com/basic-usage/using-modes) chuyên biệt: - **Chế độ Code:** Cho các tác vụ lập trình đa dụng - **Chế độ Architect:** Cho việc lập kế hoạch và lãnh đạo kỹ thuật @@ -86,7 +86,7 @@ Roo Code thích ứng với nhu cầu của bạn với các [chế độ](https ### Công Cụ Thông Minh -Roo Code đi kèm với các [công cụ](https://docs.roocode.com/basic-usage/using-tools) mạnh mẽ có thể: +Roo Code đi kèm với các [công cụ](https://docs.roocode.com/basic-usage/how-tools-work) mạnh mẽ có thể: - Đọc và ghi tập tin trong dự án của bạn - Thực thi các lệnh trong terminal VS Code của bạn @@ -182,19 +182,20 @@ Cảm ơn tất cả những người đóng góp đã giúp cải thiện Roo C |:---:|:---:|:---:|:---:|:---:|:---:| |ColemanRoo
ColemanRoo
|stea9499
stea9499
|joemanley201
joemanley201
|System233
System233
|nissa-seru
nissa-seru
|jquanton
jquanton
| |NyxJae
NyxJae
|hannesrudolph
hannesrudolph
|MuriloFP
MuriloFP
|punkpeye
punkpeye
|d-oit
d-oit
|monotykamary
monotykamary
| -|vigneshsubbiah16
vigneshsubbiah16
|lloydchang
lloydchang
|Szpadel
Szpadel
|psv2522
psv2522
|Premshay
Premshay
|Smartsheet-JB-Brown
Smartsheet-JB-Brown
| -|cannuri
cannuri
|lupuletic
lupuletic
|olweraltuve
olweraltuve
|wkordalski
wkordalski
|qdaxb
qdaxb
|feifei325
feifei325
| -|RaySinner
RaySinner
|pdecat
pdecat
|emshvac
emshvac
|afshawnlotfi
afshawnlotfi
|aitoroses
aitoroses
|dtrugman
dtrugman
| -|KJ7LNW
KJ7LNW
|sammcj
sammcj
|pugazhendhi-m
pugazhendhi-m
|Lunchb0ne
Lunchb0ne
|yt3trees
yt3trees
|yongjer
yongjer
| -|vincentsong
vincentsong
|eonghk
eonghk
|arthurauffray
arthurauffray
|aheizi
aheizi
|heyseth
heyseth
|philfung
philfung
| -|napter
napter
|mdp
mdp
|jcbdev
jcbdev
|GitlyHallows
GitlyHallows
|benzntech
benzntech
|anton-otee
anton-otee
| -|bannzai
bannzai
|dairui1
dairui1
|dqroid
dqroid
|im47cn
im47cn
|kinandan
kinandan
|kohii
kohii
| -|lightrabbit
lightrabbit
|olup
olup
|moqimoqidea
moqimoqidea
|mosleyit
mosleyit
|oprstchn
oprstchn
|philipnext
philipnext
| -|refactorthis
refactorthis
|samir-nimbly
samir-nimbly
|shaybc
shaybc
|shohei-ihaya
shohei-ihaya
|student20880
student20880
|teddyOOXX
teddyOOXX
| -|PretzelVector
PretzelVector
|AMHesch
AMHesch
|adamwlarson
adamwlarson
|alarno
alarno
|andreastempsch
andreastempsch
|Atlogit
Atlogit
| -|dleen
dleen
|dbasclpy
dbasclpy
|celestial-vault
celestial-vault
|franekp
franekp
|DeXtroTip
DeXtroTip
|hesara
hesara
| -|eltociear
eltociear
|libertyteeth
libertyteeth
|mamertofabian
mamertofabian
|marvijo-code
marvijo-code
|Sarke
Sarke
|tgfjt
tgfjt
| -|vladstudio
vladstudio
|ashktn
ashktn
| | | | | +|cannuri
cannuri
|lloydchang
lloydchang
|vigneshsubbiah16
vigneshsubbiah16
|Szpadel
Szpadel
|lupuletic
lupuletic
|feifei325
feifei325
| +|qdaxb
qdaxb
|wkordalski
wkordalski
|Smartsheet-JB-Brown
Smartsheet-JB-Brown
|Premshay
Premshay
|psv2522
psv2522
|KJ7LNW
KJ7LNW
| +|olweraltuve
olweraltuve
|RaySinner
RaySinner
|afshawnlotfi
afshawnlotfi
|emshvac
emshvac
|pdecat
pdecat
|pugazhendhi-m
pugazhendhi-m
| +|Lunchb0ne
Lunchb0ne
|aheizi
aheizi
|sammcj
sammcj
|dtrugman
dtrugman
|aitoroses
aitoroses
|yt3trees
yt3trees
| +|yongjer
yongjer
|vincentsong
vincentsong
|teddyOOXX
teddyOOXX
|eonghk
eonghk
|arthurauffray
arthurauffray
|heyseth
heyseth
| +|philfung
philfung
|anton-otee
anton-otee
|benzntech
benzntech
|diarmidmackenzie
diarmidmackenzie
|GitlyHallows
GitlyHallows
|jcbdev
jcbdev
| +|Chenjiayuan195
Chenjiayuan195
|mdp
mdp
|napter
napter
|AMHesch
AMHesch
|vladstudio
vladstudio
|Yoshino-Yukitaro
Yoshino-Yukitaro
| +|ashktn
ashktn
|bannzai
bannzai
|dairui1
dairui1
|dqroid
dqroid
|im47cn
im47cn
|kinandan
kinandan
| +|kohii
kohii
|lightrabbit
lightrabbit
|olup
olup
|moqimoqidea
moqimoqidea
|mosleyit
mosleyit
|oprstchn
oprstchn
| +|philipnext
philipnext
|refactorthis
refactorthis
|samir-nimbly
samir-nimbly
|shaybc
shaybc
|shohei-ihaya
shohei-ihaya
|student20880
student20880
| +|cdlliuy
cdlliuy
|PretzelVector
PretzelVector
|nevermorec
nevermorec
|adamwlarson
adamwlarson
|alarno
alarno
|andreastempsch
andreastempsch
| +|Atlogit
Atlogit
|chadgauth
chadgauth
|dleen
dleen
|dbasclpy
dbasclpy
|celestial-vault
celestial-vault
|franekp
franekp
| +|DeXtroTip
DeXtroTip
|hesara
hesara
|eltociear
eltociear
|Jdo300
Jdo300
|libertyteeth
libertyteeth
|mamertofabian
mamertofabian
| +|marvijo-code
marvijo-code
|kvokka
kvokka
| | | | | ## Giấy Phép diff --git a/locales/zh-CN/CONTRIBUTING.md b/locales/zh-CN/CONTRIBUTING.md index 79673c57cc2..b5c0429bd31 100644 --- a/locales/zh-CN/CONTRIBUTING.md +++ b/locales/zh-CN/CONTRIBUTING.md @@ -26,7 +26,68 @@ 我们也欢迎对我们的[文档](https://docs.roocode.com/)做贡献!无论是修复错别字、改进现有指南,还是创建新的教育内容 - 我们希望建立一个由社区驱动的资源库,帮助每个人充分利用 Roo Code。您可以点击任何页面上的"Edit this page"快速进入 Github 中编辑文件的正确位置,或者直接访问 https://github.com/RooVetGit/Roo-Code-Docs。 -如果您计划处理更大的功能,请先创建一个[功能请求](https://github.com/RooVetGit/Roo-Code/discussions/categories/feature-requests?discussions_q=is%3Aopen+category%3A%22Feature+Requests%22+sort%3Atop),以便我们讨论它是否符合 Roo Code 的愿景。 +如果您计划处理更大的功能,请先创建一个[功能请求](https://github.com/RooVetGit/Roo-Code/discussions/categories/feature-requests?discussions_q=is%3Aopen+category%3A%22Feature+Requests%22+sort%3Atop),以便我们讨论它是否符合 Roo Code 的愿景。您还可以查看下面的[项目路线图](#项目路线图),看看您的想法是否符合我们的战略方向。 + +## 项目路线图 + +Roo Code 有一个明确的开发路线图,指导我们的优先事项和未来方向。了解我们的路线图可以帮助您: + +- 使您的贡献与项目目标保持一致 +- 确定您的专业知识最有价值的领域 +- 理解某些设计决策背后的背景 +- 为支持我们愿景的新功能找到灵感 + +我们当前的路线图专注于六个关键支柱: + +### 提供商支持 + +我们的目标是尽可能支持更多的提供商: + +- 更加多功能的 "OpenAI Compatible" 支持 +- xAI, Microsoft Azure AI, Alibaba Cloud Qwen, IBM Watsonx, Together AI, DeepInfra, Fireworks AI, Cohere, Perplexity AI, FriendliAI, Replicate +- 增强对 Ollama 和 LM Studio 的支持 + +### 模型支持 + +我们希望 Roo 在尽可能多的模型上运行良好,包括本地模型: + +- 通过自定义系统提示和工作流程支持本地模型 +- 基准评估和测试案例 + +### 系统支持 + +我们希望 Roo 在每个人的计算机上都能良好运行: + +- 跨平台终端集成 +- 对 Mac、Windows 和 Linux 的强大一致支持 + +### 文档 + +我们希望为所有用户和贡献者提供全面、易于访问的文档: + +- 扩展的用户指南和教程 +- 清晰的 API 文档 +- 更好的贡献者指导 +- 多语言文档资源 +- 交互式示例和代码示例 + +### 稳定性 + +我们希望显著减少错误数量并增加自动化测试: + +- 调试日志开关 +- 用于发送错误/支持请求的"机器/任务信息"复制按钮 + +### 国际化 + +我们希望 Roo 能说每个人的语言: + +- 我们希望 Roo Code 说每个人的语言 +- Queremos que Roo Code hable el idioma de todos +- हम चाहते हैं कि Roo Code हर किसी की भाषा बोले +- نريد أن يتحدث Roo Code لغة الجميع + +我们特别欢迎推进我们路线图目标的贡献。如果您正在处理符合这些支柱的内容,请在您的 PR 描述中提及。 ## 开发设置 diff --git a/locales/zh-CN/README.md b/locales/zh-CN/README.md index 308a5206457..df0356c74e1 100644 --- a/locales/zh-CN/README.md +++ b/locales/zh-CN/README.md @@ -76,7 +76,7 @@ Roo Code 3.10 带来强大的生产力提升! ### 多种模式 -Roo Code 通过专业化的[模式](https://docs.roocode.com/basic-usage/modes)适应您的需求: +Roo Code 通过专业化的[模式](https://docs.roocode.com/basic-usage/using-modes)适应您的需求: - **代码模式:** 用于通用编码任务 - **架构师模式:** 用于规划和技术领导 @@ -86,7 +86,7 @@ Roo Code 通过专业化的[模式](https://docs.roocode.com/basic-usage/modes) ### 智能工具 -Roo Code 配备了强大的[工具](https://docs.roocode.com/basic-usage/using-tools),可以: +Roo Code 配备了强大的[工具](https://docs.roocode.com/basic-usage/how-tools-work),可以: - 读写项目中的文件 - 在 VS Code 终端中执行命令 @@ -182,19 +182,20 @@ code --install-extension bin/roo-cline-.vsix |:---:|:---:|:---:|:---:|:---:|:---:| |ColemanRoo
ColemanRoo
|stea9499
stea9499
|joemanley201
joemanley201
|System233
System233
|nissa-seru
nissa-seru
|jquanton
jquanton
| |NyxJae
NyxJae
|hannesrudolph
hannesrudolph
|MuriloFP
MuriloFP
|punkpeye
punkpeye
|d-oit
d-oit
|monotykamary
monotykamary
| -|vigneshsubbiah16
vigneshsubbiah16
|lloydchang
lloydchang
|Szpadel
Szpadel
|psv2522
psv2522
|Premshay
Premshay
|Smartsheet-JB-Brown
Smartsheet-JB-Brown
| -|cannuri
cannuri
|lupuletic
lupuletic
|olweraltuve
olweraltuve
|wkordalski
wkordalski
|qdaxb
qdaxb
|feifei325
feifei325
| -|RaySinner
RaySinner
|pdecat
pdecat
|emshvac
emshvac
|afshawnlotfi
afshawnlotfi
|aitoroses
aitoroses
|dtrugman
dtrugman
| -|KJ7LNW
KJ7LNW
|sammcj
sammcj
|pugazhendhi-m
pugazhendhi-m
|Lunchb0ne
Lunchb0ne
|yt3trees
yt3trees
|yongjer
yongjer
| -|vincentsong
vincentsong
|eonghk
eonghk
|arthurauffray
arthurauffray
|aheizi
aheizi
|heyseth
heyseth
|philfung
philfung
| -|napter
napter
|mdp
mdp
|jcbdev
jcbdev
|GitlyHallows
GitlyHallows
|benzntech
benzntech
|anton-otee
anton-otee
| -|bannzai
bannzai
|dairui1
dairui1
|dqroid
dqroid
|im47cn
im47cn
|kinandan
kinandan
|kohii
kohii
| -|lightrabbit
lightrabbit
|olup
olup
|moqimoqidea
moqimoqidea
|mosleyit
mosleyit
|oprstchn
oprstchn
|philipnext
philipnext
| -|refactorthis
refactorthis
|samir-nimbly
samir-nimbly
|shaybc
shaybc
|shohei-ihaya
shohei-ihaya
|student20880
student20880
|teddyOOXX
teddyOOXX
| -|PretzelVector
PretzelVector
|AMHesch
AMHesch
|adamwlarson
adamwlarson
|alarno
alarno
|andreastempsch
andreastempsch
|Atlogit
Atlogit
| -|dleen
dleen
|dbasclpy
dbasclpy
|celestial-vault
celestial-vault
|franekp
franekp
|DeXtroTip
DeXtroTip
|hesara
hesara
| -|eltociear
eltociear
|libertyteeth
libertyteeth
|mamertofabian
mamertofabian
|marvijo-code
marvijo-code
|Sarke
Sarke
|tgfjt
tgfjt
| -|vladstudio
vladstudio
|ashktn
ashktn
| | | | | +|cannuri
cannuri
|lloydchang
lloydchang
|vigneshsubbiah16
vigneshsubbiah16
|Szpadel
Szpadel
|lupuletic
lupuletic
|feifei325
feifei325
| +|qdaxb
qdaxb
|wkordalski
wkordalski
|Smartsheet-JB-Brown
Smartsheet-JB-Brown
|Premshay
Premshay
|psv2522
psv2522
|KJ7LNW
KJ7LNW
| +|olweraltuve
olweraltuve
|RaySinner
RaySinner
|afshawnlotfi
afshawnlotfi
|emshvac
emshvac
|pdecat
pdecat
|pugazhendhi-m
pugazhendhi-m
| +|Lunchb0ne
Lunchb0ne
|aheizi
aheizi
|sammcj
sammcj
|dtrugman
dtrugman
|aitoroses
aitoroses
|yt3trees
yt3trees
| +|yongjer
yongjer
|vincentsong
vincentsong
|teddyOOXX
teddyOOXX
|eonghk
eonghk
|arthurauffray
arthurauffray
|heyseth
heyseth
| +|philfung
philfung
|anton-otee
anton-otee
|benzntech
benzntech
|diarmidmackenzie
diarmidmackenzie
|GitlyHallows
GitlyHallows
|jcbdev
jcbdev
| +|Chenjiayuan195
Chenjiayuan195
|mdp
mdp
|napter
napter
|AMHesch
AMHesch
|vladstudio
vladstudio
|Yoshino-Yukitaro
Yoshino-Yukitaro
| +|ashktn
ashktn
|bannzai
bannzai
|dairui1
dairui1
|dqroid
dqroid
|im47cn
im47cn
|kinandan
kinandan
| +|kohii
kohii
|lightrabbit
lightrabbit
|olup
olup
|moqimoqidea
moqimoqidea
|mosleyit
mosleyit
|oprstchn
oprstchn
| +|philipnext
philipnext
|refactorthis
refactorthis
|samir-nimbly
samir-nimbly
|shaybc
shaybc
|shohei-ihaya
shohei-ihaya
|student20880
student20880
| +|cdlliuy
cdlliuy
|PretzelVector
PretzelVector
|nevermorec
nevermorec
|adamwlarson
adamwlarson
|alarno
alarno
|andreastempsch
andreastempsch
| +|Atlogit
Atlogit
|chadgauth
chadgauth
|dleen
dleen
|dbasclpy
dbasclpy
|celestial-vault
celestial-vault
|franekp
franekp
| +|DeXtroTip
DeXtroTip
|hesara
hesara
|eltociear
eltociear
|Jdo300
Jdo300
|libertyteeth
libertyteeth
|mamertofabian
mamertofabian
| +|marvijo-code
marvijo-code
|kvokka
kvokka
| | | | | ## 许可证 diff --git a/locales/zh-TW/CONTRIBUTING.md b/locales/zh-TW/CONTRIBUTING.md index 81d583c297d..791df3f1780 100644 --- a/locales/zh-TW/CONTRIBUTING.md +++ b/locales/zh-TW/CONTRIBUTING.md @@ -26,7 +26,68 @@ 我們也歡迎對我們的[文檔](https://docs.roocode.com/)進行貢獻!無論是修正錯別字、改進現有指南,還是創建新的教育內容 - 我們希望建立一個社區驅動的資源庫,幫助每個人充分利用 Roo Code。您可以點擊任何頁面上的 "Edit this page" 快速進入 Github 中編輯文件的正確位置,或者您可以直接進入 https://github.com/RooVetGit/Roo-Code-Docs。 -如果您計劃從事更大的功能開發,請先創建一個[功能請求](https://github.com/RooVetGit/Roo-Code/discussions/categories/feature-requests?discussions_q=is%3Aopen+category%3A%22Feature+Requests%22+sort%3Atop),這樣我們可以討論它是否符合 Roo Code 的願景。 +如果您計劃從事更大的功能開發,請先創建一個[功能請求](https://github.com/RooVetGit/Roo-Code/discussions/categories/feature-requests?discussions_q=is%3Aopen+category%3A%22Feature+Requests%22+sort%3Atop),這樣我們可以討論它是否符合 Roo Code 的願景。您也可以查看下方的[專案路線圖](#專案路線圖),看看您的想法是否符合我們的策略方向。 + +## 專案路線圖 + +Roo Code 有一個明確的開發路線圖,指導我們的優先事項和未來方向。了解我們的路線圖可以幫助您: + +- 使您的貢獻與專案目標保持一致 +- 識別您的專業知識最有價值的領域 +- 理解某些設計決策背後的背景 +- 為支持我們願景的新功能找到靈感 + +我們當前的路線圖專注於六個關鍵支柱: + +### 提供商支援 + +我們的目標是支援儘可能多的提供商: + +- 更加多功能的 "OpenAI Compatible" 支援 +- xAI, Microsoft Azure AI, Alibaba Cloud Qwen, IBM Watsonx, Together AI, DeepInfra, Fireworks AI, Cohere, Perplexity AI, FriendliAI, Replicate +- 增強對 Ollama 和 LM Studio 的支援 + +### 模型支援 + +我們希望 Roo 在儘可能多的模型上運行良好,包括本地模型: + +- 透過自訂系統提示和工作流程支援本地模型 +- 基準評估和測試案例 + +### 系統支援 + +我們希望 Roo 在每個人的電腦上都能良好運行: + +- 跨平台終端整合 +- 對 Mac、Windows 和 Linux 的強大一致支援 + +### 文檔 + +我們希望為所有用戶和貢獻者提供全面、易於存取的文檔: + +- 擴展的用戶指南和教程 +- 清晰的 API 文檔 +- 更好的貢獻者指導 +- 多語言文檔資源 +- 互動式示例和代碼示例 + +### 穩定性 + +我們希望顯著減少錯誤數量並增加自動化測試: + +- 調試日誌開關 +- 用於發送錯誤/支援請求的「機器/任務資訊」複製按鈕 + +### 國際化 + +我們希望 Roo 能說每個人的語言: + +- 我們希望 Roo Code 說每個人的語言 +- Queremos que Roo Code hable el idioma de todos +- हम चाहते हैं कि Roo Code हर किसी की भाषा बोले +- نريد أن يتحدث Roo Code لغة الجميع + +我們特別歡迎推進我們路線圖目標的貢獻。如果您正在處理符合這些支柱的內容,請在您的 PR 描述中提及。 ## 開發設置 diff --git a/locales/zh-TW/README.md b/locales/zh-TW/README.md index 1139d27c339..1352b1d4cd1 100644 --- a/locales/zh-TW/README.md +++ b/locales/zh-TW/README.md @@ -76,7 +76,7 @@ Roo Code 3.10 帶來強大的生產力提升! ### 多種模式 -Roo Code 通過專業化的[模式](https://docs.roocode.com/basic-usage/modes)適應您的需求: +Roo Code 通過專業化的[模式](https://docs.roocode.com/basic-usage/using-modes)適應您的需求: - **代碼模式:** 用於通用編碼任務 - **架構師模式:** 用於規劃和技術領導 @@ -86,7 +86,7 @@ Roo Code 通過專業化的[模式](https://docs.roocode.com/basic-usage/modes) ### 智能工具 -Roo Code 配備強大的[工具](https://docs.roocode.com/basic-usage/using-tools),可以: +Roo Code 配備強大的[工具](https://docs.roocode.com/basic-usage/how-tools-work),可以: - 讀寫您項目中的文件 - 在您的 VS Code 終端中執行命令 @@ -182,19 +182,20 @@ code --install-extension bin/roo-cline-.vsix |:---:|:---:|:---:|:---:|:---:|:---:| |ColemanRoo
ColemanRoo
|stea9499
stea9499
|joemanley201
joemanley201
|System233
System233
|nissa-seru
nissa-seru
|jquanton
jquanton
| |NyxJae
NyxJae
|hannesrudolph
hannesrudolph
|MuriloFP
MuriloFP
|punkpeye
punkpeye
|d-oit
d-oit
|monotykamary
monotykamary
| -|vigneshsubbiah16
vigneshsubbiah16
|lloydchang
lloydchang
|Szpadel
Szpadel
|psv2522
psv2522
|Premshay
Premshay
|Smartsheet-JB-Brown
Smartsheet-JB-Brown
| -|cannuri
cannuri
|lupuletic
lupuletic
|olweraltuve
olweraltuve
|wkordalski
wkordalski
|qdaxb
qdaxb
|feifei325
feifei325
| -|RaySinner
RaySinner
|pdecat
pdecat
|emshvac
emshvac
|afshawnlotfi
afshawnlotfi
|aitoroses
aitoroses
|dtrugman
dtrugman
| -|KJ7LNW
KJ7LNW
|sammcj
sammcj
|pugazhendhi-m
pugazhendhi-m
|Lunchb0ne
Lunchb0ne
|yt3trees
yt3trees
|yongjer
yongjer
| -|vincentsong
vincentsong
|eonghk
eonghk
|arthurauffray
arthurauffray
|aheizi
aheizi
|heyseth
heyseth
|philfung
philfung
| -|napter
napter
|mdp
mdp
|jcbdev
jcbdev
|GitlyHallows
GitlyHallows
|benzntech
benzntech
|anton-otee
anton-otee
| -|bannzai
bannzai
|dairui1
dairui1
|dqroid
dqroid
|im47cn
im47cn
|kinandan
kinandan
|kohii
kohii
| -|lightrabbit
lightrabbit
|olup
olup
|moqimoqidea
moqimoqidea
|mosleyit
mosleyit
|oprstchn
oprstchn
|philipnext
philipnext
| -|refactorthis
refactorthis
|samir-nimbly
samir-nimbly
|shaybc
shaybc
|shohei-ihaya
shohei-ihaya
|student20880
student20880
|teddyOOXX
teddyOOXX
| -|PretzelVector
PretzelVector
|AMHesch
AMHesch
|adamwlarson
adamwlarson
|alarno
alarno
|andreastempsch
andreastempsch
|Atlogit
Atlogit
| -|dleen
dleen
|dbasclpy
dbasclpy
|celestial-vault
celestial-vault
|franekp
franekp
|DeXtroTip
DeXtroTip
|hesara
hesara
| -|eltociear
eltociear
|libertyteeth
libertyteeth
|mamertofabian
mamertofabian
|marvijo-code
marvijo-code
|Sarke
Sarke
|tgfjt
tgfjt
| -|vladstudio
vladstudio
|ashktn
ashktn
| | | | | +|cannuri
cannuri
|lloydchang
lloydchang
|vigneshsubbiah16
vigneshsubbiah16
|Szpadel
Szpadel
|lupuletic
lupuletic
|feifei325
feifei325
| +|qdaxb
qdaxb
|wkordalski
wkordalski
|Smartsheet-JB-Brown
Smartsheet-JB-Brown
|Premshay
Premshay
|psv2522
psv2522
|KJ7LNW
KJ7LNW
| +|olweraltuve
olweraltuve
|RaySinner
RaySinner
|afshawnlotfi
afshawnlotfi
|emshvac
emshvac
|pdecat
pdecat
|pugazhendhi-m
pugazhendhi-m
| +|Lunchb0ne
Lunchb0ne
|aheizi
aheizi
|sammcj
sammcj
|dtrugman
dtrugman
|aitoroses
aitoroses
|yt3trees
yt3trees
| +|yongjer
yongjer
|vincentsong
vincentsong
|teddyOOXX
teddyOOXX
|eonghk
eonghk
|arthurauffray
arthurauffray
|heyseth
heyseth
| +|philfung
philfung
|anton-otee
anton-otee
|benzntech
benzntech
|diarmidmackenzie
diarmidmackenzie
|GitlyHallows
GitlyHallows
|jcbdev
jcbdev
| +|Chenjiayuan195
Chenjiayuan195
|mdp
mdp
|napter
napter
|AMHesch
AMHesch
|vladstudio
vladstudio
|Yoshino-Yukitaro
Yoshino-Yukitaro
| +|ashktn
ashktn
|bannzai
bannzai
|dairui1
dairui1
|dqroid
dqroid
|im47cn
im47cn
|kinandan
kinandan
| +|kohii
kohii
|lightrabbit
lightrabbit
|olup
olup
|moqimoqidea
moqimoqidea
|mosleyit
mosleyit
|oprstchn
oprstchn
| +|philipnext
philipnext
|refactorthis
refactorthis
|samir-nimbly
samir-nimbly
|shaybc
shaybc
|shohei-ihaya
shohei-ihaya
|student20880
student20880
| +|cdlliuy
cdlliuy
|PretzelVector
PretzelVector
|nevermorec
nevermorec
|adamwlarson
adamwlarson
|alarno
alarno
|andreastempsch
andreastempsch
| +|Atlogit
Atlogit
|chadgauth
chadgauth
|dleen
dleen
|dbasclpy
dbasclpy
|celestial-vault
celestial-vault
|franekp
franekp
| +|DeXtroTip
DeXtroTip
|hesara
hesara
|eltociear
eltociear
|Jdo300
Jdo300
|libertyteeth
libertyteeth
|mamertofabian
mamertofabian
| +|marvijo-code
marvijo-code
|kvokka
kvokka
| | | | | ## 許可證 diff --git a/package-lock.json b/package-lock.json index 28d7402f753..6c74512283c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "roo-cline", - "version": "3.10.1", + "version": "3.10.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "roo-cline", - "version": "3.10.1", + "version": "3.10.4", "dependencies": { "@anthropic-ai/bedrock-sdk": "^0.10.2", "@anthropic-ai/sdk": "^0.37.0", @@ -2431,25 +2431,27 @@ } }, "node_modules/@babel/helpers": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.0.tgz", - "integrity": "sha512-tbhNuIxNcVb21pInl3ZSjksLCvgdZy9KwJ8brv993QtIVKJBBkYXz4q4ZbAv31GdnC+R90np23L5FbEBlthAEw==", + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.10.tgz", + "integrity": "sha512-UPYc3SauzZ3JGgj87GgZ89JVdC5dj0AoetR5Bw6wj4niittNyFh6+eOGonYvJ1ao6B8lEa3Q3klS7ADZ53bc5g==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/template": "^7.25.9", - "@babel/types": "^7.26.0" + "@babel/template": "^7.26.9", + "@babel/types": "^7.26.10" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.26.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.3.tgz", - "integrity": "sha512-WJ/CvmY8Mea8iDXo6a7RK2wbmJITT5fN3BEkRuFlxVyNx8jOKIIhmC4fSkTcPcf8JyavbBwIe6OpiCOBXt/IcA==", + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.10.tgz", + "integrity": "sha512-6aQR2zGE/QFi8JpDLjUZEPYOs7+mhKXm86VaKFiLP35JQwQb6bwUE+XbvkH0EptsYhbNBSUGaUBLKqxH1xSgsA==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/types": "^7.26.3" + "@babel/types": "^7.26.10" }, "bin": { "parser": "bin/babel-parser.js" @@ -2692,14 +2694,15 @@ } }, "node_modules/@babel/template": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.9.tgz", - "integrity": "sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg==", + "version": "7.26.9", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.26.9.tgz", + "integrity": "sha512-qyRplbeIpNZhmzOysF/wFMuP9sctmh2cFzRAZOn1YapxBsE1i9bJIY586R/WBLfLcmcBlM8ROBiQURnnNy+zfA==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.25.9", - "@babel/parser": "^7.25.9", - "@babel/types": "^7.25.9" + "@babel/code-frame": "^7.26.2", + "@babel/parser": "^7.26.9", + "@babel/types": "^7.26.9" }, "engines": { "node": ">=6.9.0" @@ -2733,10 +2736,11 @@ } }, "node_modules/@babel/types": { - "version": "7.26.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.3.tgz", - "integrity": "sha512-vN5p+1kl59GVKMvTHt55NzzmYVxprfJD+ql7U9NFIfKCBkYE55LYtS+WtPlaYOyzydrKI8Nezd+aZextrd+FMA==", + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.10.tgz", + "integrity": "sha512-emqcG3vHrpxUKTrxcblR36dcrcoRDvKmnL/dCL6ZsHaShW80qxCAcNhzQZrpeM765VzEos+xOi4s+r4IXzTwdQ==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-string-parser": "^7.25.9", "@babel/helper-validator-identifier": "^7.25.9" @@ -3172,14 +3176,100 @@ "@noble/ciphers": "^1.0.0" } }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.24.2.tgz", + "integrity": "sha512-thpVCb/rhxE/BnMLQ7GReQLLN8q9qbHmI55F4489/ByVg2aQaQ6kbcLb6FHkocZzQhxc4gx0sCk0tJkKBFzDhA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.24.2.tgz", + "integrity": "sha512-tmwl4hJkCfNHwFB3nBa8z1Uy3ypZpxqxfTQOcHX+xRByyYgunVbZ9MzUUfb0RxaHIMnbHagwAxuTL+tnNM+1/Q==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.24.2.tgz", + "integrity": "sha512-cNLgeqCqV8WxfcTIOeL4OAtSmL8JjcN6m09XIgro1Wi7cF4t/THaWEa7eL5CMoMBdjoHOTh/vwTO/o2TRXIyzg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.24.2.tgz", + "integrity": "sha512-B6Q0YQDqMx9D7rvIcsXfmJfvUYLoP722bgfBlO5cGvNVb5V/+Y7nhBE3mHV9OpxBf4eAS2S68KZztiPaWq4XYw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.24.0.tgz", - "integrity": "sha512-CKyDpRbK1hXwv79soeTJNHb5EiG6ct3efd/FTPdzOWdbZZfGhpbcqIpiD0+vwmpu0wTIL97ZRPZu8vUt46nBSw==", + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.24.2.tgz", + "integrity": "sha512-kj3AnYWc+CekmZnS5IPu9D+HWtUI49hbnyqk0FLEJDbzCIQt7hg7ucF1SQAilhtYpIujfaHr6O0UHlzzSPdOeA==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.24.2.tgz", + "integrity": "sha512-WeSrmwwHaPkNR5H3yYfowhZcbriGqooyu3zI/3GGpF8AyUdsrrP0X6KumITGA9WOyiJavnGZUwPGvxvwfWPHIA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", "optional": true, "os": [ "darwin" @@ -3188,6 +3278,329 @@ "node": ">=18" } }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.24.2.tgz", + "integrity": "sha512-UN8HXjtJ0k/Mj6a9+5u6+2eZ2ERD7Edt1Q9IZiB5UZAIdPnVKDoG7mdTVGhHJIeEml60JteamR3qhsr1r8gXvg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.24.2.tgz", + "integrity": "sha512-TvW7wE/89PYW+IevEJXZ5sF6gJRDY/14hyIGFXdIucxCsbRmLUcjseQu1SyTko+2idmCw94TgyaEZi9HUSOe3Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.24.2.tgz", + "integrity": "sha512-n0WRM/gWIdU29J57hJyUdIsk0WarGd6To0s+Y+LwvlC55wt+GT/OgkwoXCXvIue1i1sSNWblHEig00GBWiJgfA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.24.2.tgz", + "integrity": "sha512-7HnAD6074BW43YvvUmE/35Id9/NB7BeX5EoNkK9obndmZBUk8xmJJeU7DwmUeN7tkysslb2eSl6CTrYz6oEMQg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.24.2.tgz", + "integrity": "sha512-sfv0tGPQhcZOgTKO3oBE9xpHuUqguHvSo4jl+wjnKwFpapx+vUDcawbwPNuBIAYdRAvIDBfZVvXprIj3HA+Ugw==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.24.2.tgz", + "integrity": "sha512-CN9AZr8kEndGooS35ntToZLTQLHEjtVB5n7dl8ZcTZMonJ7CCfStrYhrzF97eAecqVbVJ7APOEe18RPI4KLhwQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.24.2.tgz", + "integrity": "sha512-iMkk7qr/wl3exJATwkISxI7kTcmHKE+BlymIAbHO8xanq/TjHaaVThFF6ipWzPHryoFsesNQJPE/3wFJw4+huw==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.24.2.tgz", + "integrity": "sha512-shsVrgCZ57Vr2L8mm39kO5PPIb+843FStGt7sGGoqiiWYconSxwTiuswC1VJZLCjNiMLAMh34jg4VSEQb+iEbw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.24.2.tgz", + "integrity": "sha512-4eSFWnU9Hhd68fW16GD0TINewo1L6dRrB+oLNNbYyMUAeOD2yCK5KXGK1GH4qD/kT+bTEXjsyTCiJGHPZ3eM9Q==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.24.2.tgz", + "integrity": "sha512-S0Bh0A53b0YHL2XEXC20bHLuGMOhFDO6GN4b3YjRLK//Ep3ql3erpNcPlEFed93hsQAjAQDNsvcK+hV90FubSw==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.24.2.tgz", + "integrity": "sha512-8Qi4nQcCTbLnK9WoMjdC9NiTG6/E38RNICU6sUNqK0QFxCYgoARqVqxdFmWkdonVsvGqWhmm7MO0jyTqLqwj0Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.24.2.tgz", + "integrity": "sha512-wuLK/VztRRpMt9zyHSazyCVdCXlpHkKm34WUyinD2lzK07FAHTq0KQvZZlXikNWkDGoT6x3TD51jKQ7gMVpopw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.24.2.tgz", + "integrity": "sha512-VefFaQUc4FMmJuAxmIHgUmfNiLXY438XrL4GDNV1Y1H/RW3qow68xTwjZKfj/+Plp9NANmzbH5R40Meudu8mmw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.24.2.tgz", + "integrity": "sha512-YQbi46SBct6iKnszhSvdluqDmxCJA+Pu280Av9WICNwQmMxV7nLRHZfjQzwbPs3jeWnuAhE9Jy0NrnJ12Oz+0A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.24.2.tgz", + "integrity": "sha512-+iDS6zpNM6EnJyWv0bMGLWSWeXGN/HTaF/LXHXHwejGsVi+ooqDfMCCTerNFxEkM3wYVcExkeGXNqshc9iMaOA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.24.2.tgz", + "integrity": "sha512-hTdsW27jcktEvpwNHJU4ZwWFGkz2zRJUz8pvddmXPtXDzVKTTINmlmga3ZzwcuMpUvLw7JkLy9QLKyGpD2Yxig==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.24.2.tgz", + "integrity": "sha512-LihEQ2BBKVFLOC9ZItT9iFprsE9tqjDjnbulhHoFxYQtQfai7qfluVODIYxt1PgdoyQkz23+01rzwNwYfutxUQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.24.2.tgz", + "integrity": "sha512-q+iGUwfs8tncmFC9pcnD5IvRHAzmbwQ3GPS5/ceCyHdjXubwQWI12MKWSNSMYLJMq23/IUCvJMS76PDqXe1fxA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.24.2.tgz", + "integrity": "sha512-7VTgWzgMGvup6aSqDPLiW5zHaxYJGTO4OokMjIlrCtf+VpEL+cXKtCvg723iguPYI5oaUNdS+/V7OU2gvXVWEg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz", @@ -6701,9 +7114,10 @@ } }, "node_modules/axios": { - "version": "1.7.9", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.9.tgz", - "integrity": "sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw==", + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.8.3.tgz", + "integrity": "sha512-iP4DebzoNlP/YN2dpwCgb8zoCmhtkajzS48JvwmkSkXvPI3DHc7m+XYL5tGnSlJtR6nImXZmdCuN5aP8dh1d8A==", + "license": "MIT", "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.0", @@ -8367,11 +8781,12 @@ } }, "node_modules/esbuild": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.0.tgz", - "integrity": "sha512-FuLPevChGDshgSicjisSooU0cemp/sGXR841D5LHMB7mTVOmsEHcAxaH3irL53+8YDIeVNQEySh4DaYU/iuPqQ==", + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.2.tgz", + "integrity": "sha512-+9egpBW8I3CD5XPe0n6BfT5fxLzxrlDzqydF3aviG+9ni1lDC/OvMHcxqEFV0+LANZG5R1bFMWfUrjVsdwxJvA==", "dev": true, "hasInstallScript": true, + "license": "MIT", "bin": { "esbuild": "bin/esbuild" }, @@ -8379,30 +8794,31 @@ "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.24.0", - "@esbuild/android-arm": "0.24.0", - "@esbuild/android-arm64": "0.24.0", - "@esbuild/android-x64": "0.24.0", - "@esbuild/darwin-arm64": "0.24.0", - "@esbuild/darwin-x64": "0.24.0", - "@esbuild/freebsd-arm64": "0.24.0", - "@esbuild/freebsd-x64": "0.24.0", - "@esbuild/linux-arm": "0.24.0", - "@esbuild/linux-arm64": "0.24.0", - "@esbuild/linux-ia32": "0.24.0", - "@esbuild/linux-loong64": "0.24.0", - "@esbuild/linux-mips64el": "0.24.0", - "@esbuild/linux-ppc64": "0.24.0", - "@esbuild/linux-riscv64": "0.24.0", - "@esbuild/linux-s390x": "0.24.0", - "@esbuild/linux-x64": "0.24.0", - "@esbuild/netbsd-x64": "0.24.0", - "@esbuild/openbsd-arm64": "0.24.0", - "@esbuild/openbsd-x64": "0.24.0", - "@esbuild/sunos-x64": "0.24.0", - "@esbuild/win32-arm64": "0.24.0", - "@esbuild/win32-ia32": "0.24.0", - "@esbuild/win32-x64": "0.24.0" + "@esbuild/aix-ppc64": "0.24.2", + "@esbuild/android-arm": "0.24.2", + "@esbuild/android-arm64": "0.24.2", + "@esbuild/android-x64": "0.24.2", + "@esbuild/darwin-arm64": "0.24.2", + "@esbuild/darwin-x64": "0.24.2", + "@esbuild/freebsd-arm64": "0.24.2", + "@esbuild/freebsd-x64": "0.24.2", + "@esbuild/linux-arm": "0.24.2", + "@esbuild/linux-arm64": "0.24.2", + "@esbuild/linux-ia32": "0.24.2", + "@esbuild/linux-loong64": "0.24.2", + "@esbuild/linux-mips64el": "0.24.2", + "@esbuild/linux-ppc64": "0.24.2", + "@esbuild/linux-riscv64": "0.24.2", + "@esbuild/linux-s390x": "0.24.2", + "@esbuild/linux-x64": "0.24.2", + "@esbuild/netbsd-arm64": "0.24.2", + "@esbuild/netbsd-x64": "0.24.2", + "@esbuild/openbsd-arm64": "0.24.2", + "@esbuild/openbsd-x64": "0.24.2", + "@esbuild/sunos-x64": "0.24.2", + "@esbuild/win32-arm64": "0.24.2", + "@esbuild/win32-ia32": "0.24.2", + "@esbuild/win32-x64": "0.24.2" } }, "node_modules/escalade": { @@ -12608,7 +13024,6 @@ "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.5.tgz", "integrity": "sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^3.2.1", "chalk": "^2.4.1", @@ -15423,9 +15838,10 @@ "integrity": "sha512-GMXzWtsc57XAtguZgaQViUOzs0KTkk8ojr3/xAxXLITqf/3EMwxC0inyETfDFjH/Krbhuep0HNbbjI9i/q3F3g==" }, "node_modules/undici": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-6.21.0.tgz", - "integrity": "sha512-BUgJXc752Kou3oOIuU1i+yZZypyZRqNPW0vqoMPl8VaoalSfeR0D8/t4iAS3yirs79SSMTxTag+ZC86uswv+Cw==", + "version": "6.21.2", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.21.2.tgz", + "integrity": "sha512-uROZWze0R0itiAKVPsYhFov9LxrPMHLMEQFszeI2gCN6bnIIZ8twzBCJcN2LJrBBLfrP0t1FW0g+JmKVl8Vk1g==", + "license": "MIT", "engines": { "node": ">=18.17" } diff --git a/package.json b/package.json index d84b745e1b3..0bd8f3de48b 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "displayName": "Roo Code (prev. Roo Cline)", "description": "A whole dev team of AI agents in your editor.", "publisher": "RooVeterinaryInc", - "version": "3.10.1", + "version": "3.10.4", "icon": "assets/icons/rocket.png", "galleryBanner": { "color": "#617A91", @@ -140,6 +140,11 @@ "title": "Add To Context", "category": "Roo Code" }, + { + "command": "roo-cline.newTask", + "title": "New Task", + "category": "Roo Code" + }, { "command": "roo-cline.terminalAddToContext", "title": "Add Terminal Content to Context", @@ -164,6 +169,11 @@ "command": "roo-cline.terminalExplainCommandInCurrentTask", "title": "Explain This Command (Current Task)", "category": "Terminal" + }, + { + "command": "roo-cline.setCustomStoragePath", + "title": "Set Custom Storage Path", + "category": "Roo Code" } ], "menus": { @@ -288,6 +298,11 @@ } }, "description": "Settings for VSCode Language Model API" + }, + "roo-cline.customStoragePath": { + "type": "string", + "default": "", + "description": "Custom storage path. Leave empty to use the default location. Supports absolute paths (e.g. 'D:\\RooCodeStorage')" } } } diff --git a/src/__mocks__/fs/promises.ts b/src/__mocks__/fs/promises.ts index e496a7fa510..b037cd24573 100644 --- a/src/__mocks__/fs/promises.ts +++ b/src/__mocks__/fs/promises.ts @@ -152,6 +152,22 @@ const mockFs = { throw error }), + rename: jest.fn().mockImplementation(async (oldPath: string, newPath: string) => { + // Check if the old file exists + if (mockFiles.has(oldPath)) { + // Copy content to new path + const content = mockFiles.get(oldPath) + mockFiles.set(newPath, content) + // Delete old file + mockFiles.delete(oldPath) + return Promise.resolve() + } + // If old file doesn't exist, throw an error + const error = new Error(`ENOENT: no such file or directory, rename '${oldPath}'`) + ;(error as any).code = "ENOENT" + throw error + }), + constants: jest.requireActual("fs").constants, // Expose mock data for test assertions @@ -162,7 +178,7 @@ const mockFs = { _setInitialMockData: () => { // Set up default MCP settings mockFiles.set( - "/mock/settings/path/cline_mcp_settings.json", + "/mock/settings/path/mcp_settings.json", JSON.stringify({ mcpServers: { "test-server": { diff --git a/src/__tests__/migrateSettings.test.ts b/src/__tests__/migrateSettings.test.ts new file mode 100644 index 00000000000..107f3106396 --- /dev/null +++ b/src/__tests__/migrateSettings.test.ts @@ -0,0 +1,119 @@ +import * as vscode from "vscode" +import * as path from "path" +import * as fs from "fs/promises" +import { fileExistsAtPath } from "../utils/fs" +import { GlobalFileNames } from "../shared/globalFileNames" +import { migrateSettings } from "../utils/migrateSettings" + +// Mock dependencies +jest.mock("vscode") +jest.mock("fs/promises") +jest.mock("fs") +jest.mock("../utils/fs") +// We're testing the real migrateSettings function + +describe("Settings Migration", () => { + let mockContext: vscode.ExtensionContext + let mockOutputChannel: vscode.OutputChannel + const mockStoragePath = "/mock/storage" + const mockSettingsDir = path.join(mockStoragePath, "settings") + + // Legacy file names + const legacyCustomModesPath = path.join(mockSettingsDir, "cline_custom_modes.json") + const legacyMcpSettingsPath = path.join(mockSettingsDir, "cline_mcp_settings.json") + + // New file names + const newCustomModesPath = path.join(mockSettingsDir, GlobalFileNames.customModes) + const newMcpSettingsPath = path.join(mockSettingsDir, GlobalFileNames.mcpSettings) + + beforeEach(() => { + jest.clearAllMocks() + + // Mock output channel + mockOutputChannel = { + appendLine: jest.fn(), + append: jest.fn(), + clear: jest.fn(), + show: jest.fn(), + hide: jest.fn(), + dispose: jest.fn(), + } as unknown as vscode.OutputChannel + + // Mock extension context + mockContext = { + globalStorageUri: { fsPath: mockStoragePath }, + } as unknown as vscode.ExtensionContext + + // The fs/promises mock is already set up in src/__mocks__/fs/promises.ts + // We don't need to manually mock these methods + + // Set global outputChannel for all tests + ;(global as any).outputChannel = mockOutputChannel + }) + + it("should migrate custom modes file if old file exists and new file doesn't", async () => { + const mockCustomModesContent = '{"customModes":[{"slug":"test-mode"}]}' as string + + // Mock file existence checks + ;(fileExistsAtPath as jest.Mock).mockImplementation(async (path: string) => { + if (path === mockSettingsDir) return true + if (path === legacyCustomModesPath) return true + if (path === newCustomModesPath) return false + return false + }) + + await migrateSettings(mockContext, mockOutputChannel) + + // Verify file was renamed + expect(fs.rename).toHaveBeenCalledWith(legacyCustomModesPath, newCustomModesPath) + }) + + it("should migrate MCP settings file if old file exists and new file doesn't", async () => { + const mockMcpSettingsContent = '{"mcpServers":{"test-server":{}}}' as string + + // Mock file existence checks + ;(fileExistsAtPath as jest.Mock).mockImplementation(async (path: string) => { + if (path === mockSettingsDir) return true + if (path === legacyMcpSettingsPath) return true + if (path === newMcpSettingsPath) return false + return false + }) + + await migrateSettings(mockContext, mockOutputChannel) + + // Verify file was renamed + expect(fs.rename).toHaveBeenCalledWith(legacyMcpSettingsPath, newMcpSettingsPath) + }) + + it("should not migrate if new file already exists", async () => { + // Mock file existence checks + ;(fileExistsAtPath as jest.Mock).mockImplementation(async (path: string) => { + if (path === mockSettingsDir) return true + if (path === legacyCustomModesPath) return true + if (path === newCustomModesPath) return true + if (path === legacyMcpSettingsPath) return true + if (path === newMcpSettingsPath) return true + return false + }) + + await migrateSettings(mockContext, mockOutputChannel) + + // Verify no files were renamed + expect(fs.rename).not.toHaveBeenCalled() + }) + + it("should handle errors gracefully", async () => { + // Mock file existence checks to throw an error + ;(fileExistsAtPath as jest.Mock).mockRejectedValue(new Error("Test error")) + + // Set the global outputChannel for the test + ;(global as any).outputChannel = mockOutputChannel + + await migrateSettings(mockContext, mockOutputChannel) + + // Verify error was logged + expect(mockOutputChannel.appendLine).toHaveBeenCalledWith( + expect.stringContaining("Error migrating settings files"), + ) + }) +}) diff --git a/src/activate/handleTask.ts b/src/activate/handleTask.ts new file mode 100644 index 00000000000..7bce8c75beb --- /dev/null +++ b/src/activate/handleTask.ts @@ -0,0 +1,22 @@ +import * as vscode from "vscode" +import { COMMAND_IDS } from "../core/CodeActionProvider" +import { ClineProvider } from "../core/webview/ClineProvider" +import { t } from "../i18n" + +export const handleNewTask = async (params: { prompt?: string } | null | undefined) => { + let prompt = params?.prompt + if (!prompt) { + prompt = await vscode.window.showInputBox({ + prompt: t("common:input.task_prompt"), + placeHolder: t("common:input.task_placeholder"), + }) + } + if (!prompt) { + await vscode.commands.executeCommand("roo-cline.SidebarProvider.focus") + return + } + + await ClineProvider.handleCodeAction(COMMAND_IDS.NEW_TASK, "NEW_TASK", { + userInput: prompt, + }) +} diff --git a/src/activate/handleUri.ts b/src/activate/handleUri.ts index 05440c7683e..96a24fe6fac 100644 --- a/src/activate/handleUri.ts +++ b/src/activate/handleUri.ts @@ -6,7 +6,6 @@ export const handleUri = async (uri: vscode.Uri) => { const path = uri.path const query = new URLSearchParams(uri.query.replace(/\+/g, "%2B")) const visibleProvider = ClineProvider.getVisibleInstance() - if (!visibleProvider) { return } @@ -26,6 +25,13 @@ export const handleUri = async (uri: vscode.Uri) => { } break } + case "/requesty": { + const code = query.get("code") + if (code) { + await visibleProvider.handleRequestyCallback(code) + } + break + } default: break } diff --git a/src/activate/registerCommands.ts b/src/activate/registerCommands.ts index d271a054349..2e1fac5e4b0 100644 --- a/src/activate/registerCommands.ts +++ b/src/activate/registerCommands.ts @@ -4,6 +4,7 @@ import delay from "delay" import { ClineProvider } from "../core/webview/ClineProvider" import { registerHumanRelayCallback, unregisterHumanRelayCallback, handleHumanRelayResponse } from "./humanRelay" +import { handleNewTask } from "./handleTask" // Store panel references in both modes let sidebarPanel: vscode.WebviewView | undefined = undefined @@ -85,6 +86,11 @@ const getCommandsMap = ({ context, outputChannel, provider }: RegisterCommandOpt "roo-cline.registerHumanRelayCallback": registerHumanRelayCallback, "roo-cline.unregisterHumanRelayCallback": unregisterHumanRelayCallback, "roo-cline.handleHumanRelayResponse": handleHumanRelayResponse, + "roo-cline.newTask": handleNewTask, + "roo-cline.setCustomStoragePath": async () => { + const { promptForCustomStoragePath } = await import("../shared/storagePathManager") + await promptForCustomStoragePath() + }, } } diff --git a/src/api/providers/__tests__/openrouter.test.ts b/src/api/providers/__tests__/openrouter.test.ts index 981c9ad096f..996644b07f7 100644 --- a/src/api/providers/__tests__/openrouter.test.ts +++ b/src/api/providers/__tests__/openrouter.test.ts @@ -112,6 +112,16 @@ describe("OpenRouterHandler", () => { }, ], } + // Add usage information in the stream response + yield { + id: "test-id", + choices: [{ delta: {} }], + usage: { + prompt_tokens: 10, + completion_tokens: 20, + cost: 0.001, + }, + } }, } @@ -121,17 +131,6 @@ describe("OpenRouterHandler", () => { completions: { create: mockCreate }, } as any - // Mock axios.get for generation details - ;(axios.get as jest.Mock).mockResolvedValue({ - data: { - data: { - native_tokens_prompt: 10, - native_tokens_completion: 20, - total_cost: 0.001, - }, - }, - }) - const systemPrompt = "test system prompt" const messages: Anthropic.Messages.MessageParam[] = [{ role: "user" as const, content: "test message" }] @@ -153,7 +152,6 @@ describe("OpenRouterHandler", () => { inputTokens: 10, outputTokens: 20, totalCost: 0.001, - fullResponseText: "test response", }) // Verify OpenAI client was called with correct parameters diff --git a/src/api/providers/__tests__/requesty.test.ts b/src/api/providers/__tests__/requesty.test.ts index 47921a1c532..e761b4d765d 100644 --- a/src/api/providers/__tests__/requesty.test.ts +++ b/src/api/providers/__tests__/requesty.test.ts @@ -1,6 +1,6 @@ import { Anthropic } from "@anthropic-ai/sdk" import OpenAI from "openai" -import { ApiHandlerOptions, ModelInfo, requestyModelInfoSaneDefaults } from "../../../shared/api" +import { ApiHandlerOptions, ModelInfo, requestyDefaultModelInfo } from "../../../shared/api" import { RequestyHandler } from "../requesty" import { convertToOpenAiMessages } from "../../transform/openai-format" import { convertToR1Format } from "../../transform/r1-format" @@ -18,14 +18,17 @@ describe("RequestyHandler", () => { requestyApiKey: "test-key", requestyModelId: "test-model", requestyModelInfo: { - maxTokens: 1000, - contextWindow: 4000, - supportsPromptCache: false, + maxTokens: 8192, + contextWindow: 200_000, supportsImages: true, - inputPrice: 1, - outputPrice: 10, - cacheReadsPrice: 0.1, - cacheWritesPrice: 1.5, + supportsComputerUse: true, + supportsPromptCache: true, + inputPrice: 3.0, + outputPrice: 15.0, + cacheWritesPrice: 3.75, + cacheReadsPrice: 0.3, + description: + "Claude 3.7 Sonnet is an advanced large language model with improved reasoning, coding, and problem-solving capabilities. It introduces a hybrid reasoning approach, allowing users to choose between rapid responses and extended, step-by-step processing for complex tasks. The model demonstrates notable improvements in coding, particularly in front-end development and full-stack updates, and excels in agentic workflows, where it can autonomously navigate multi-step processes. Claude 3.7 Sonnet maintains performance parity with its predecessor in standard mode while offering an extended reasoning mode for enhanced accuracy in math, coding, and instruction-following tasks. Read more at the [blog post here](https://www.anthropic.com/news/claude-3-7-sonnet)", }, openAiStreamingEnabled: true, includeMaxTokens: true, // Add this to match the implementation @@ -115,7 +118,7 @@ describe("RequestyHandler", () => { outputTokens: 10, cacheWriteTokens: 5, cacheReadTokens: 15, - totalCost: 0.000119, // (10 * 1 / 1,000,000) + (5 * 1.5 / 1,000,000) + (15 * 0.1 / 1,000,000) + (10 * 10 / 1,000,000) + totalCost: 0.00020325000000000003, // (10 * 3 / 1,000,000) + (5 * 3.75 / 1,000,000) + (15 * 0.3 / 1,000,000) + (10 * 15 / 1,000,000) (the ...0 is a fp skew) }, ]) @@ -123,8 +126,30 @@ describe("RequestyHandler", () => { model: defaultOptions.requestyModelId, temperature: 0, messages: [ - { role: "system", content: systemPrompt }, - { role: "user", content: "Hello" }, + { + role: "system", + content: [ + { + cache_control: { + type: "ephemeral", + }, + text: systemPrompt, + type: "text", + }, + ], + }, + { + role: "user", + content: [ + { + cache_control: { + type: "ephemeral", + }, + text: "Hello", + type: "text", + }, + ], + }, ], stream: true, stream_options: { include_usage: true }, @@ -191,7 +216,7 @@ describe("RequestyHandler", () => { outputTokens: 5, cacheWriteTokens: 0, cacheReadTokens: 0, - totalCost: 0.00006, // (10 * 1 / 1,000,000) + (5 * 10 / 1,000,000) + totalCost: 0.000105, // (10 * 3 / 1,000,000) + (5 * 15 / 1,000,000) }, ]) @@ -199,7 +224,18 @@ describe("RequestyHandler", () => { model: defaultOptions.requestyModelId, messages: [ { role: "user", content: systemPrompt }, - { role: "user", content: "Hello" }, + { + role: "user", + content: [ + { + cache_control: { + type: "ephemeral", + }, + text: "Hello", + type: "text", + }, + ], + }, ], }) }) @@ -224,7 +260,7 @@ describe("RequestyHandler", () => { const result = handler.getModel() expect(result).toEqual({ id: defaultOptions.requestyModelId, - info: requestyModelInfoSaneDefaults, + info: defaultOptions.requestyModelInfo, }) }) }) diff --git a/src/api/providers/bedrock.ts b/src/api/providers/bedrock.ts index 4696c1dc91e..2aafc16deec 100644 --- a/src/api/providers/bedrock.ts +++ b/src/api/providers/bedrock.ts @@ -30,7 +30,7 @@ import { logger } from "../../utils/logging" function validateBedrockArn(arn: string, region?: string) { // Validate ARN format const arnRegex = - /^arn:aws:bedrock:([^:]+):(\d+):(foundation-model|provisioned-model|default-prompt-router|prompt-router)\/(.+)$/ + /^arn:aws:bedrock:([^:]+):(\d+):(foundation-model|provisioned-model|default-prompt-router|prompt-router|application-inference-profile)\/(.+)$/ const match = arn.match(arnRegex) if (!match) { diff --git a/src/api/providers/openai.ts b/src/api/providers/openai.ts index 6b82f708c9d..bc57591c01a 100644 --- a/src/api/providers/openai.ts +++ b/src/api/providers/openai.ts @@ -63,10 +63,9 @@ export class OpenAiHandler extends BaseProvider implements SingleCompletionHandl const modelInfo = this.getModel().info const modelUrl = this.options.openAiBaseUrl ?? "" const modelId = this.options.openAiModelId ?? "" - - const deepseekReasoner = modelId.includes("deepseek-reasoner") + const enabledR1Format = this.options.openAiR1FormatEnabled ?? false + const deepseekReasoner = modelId.includes("deepseek-reasoner") || enabledR1Format const ark = modelUrl.includes(".volces.com") - if (modelId.startsWith("o3-mini")) { yield* this.handleO3FamilyMessage(modelId, systemPrompt, messages) return diff --git a/src/api/providers/openrouter.ts b/src/api/providers/openrouter.ts index 3f215bfc7c3..72e4fe576a9 100644 --- a/src/api/providers/openrouter.ts +++ b/src/api/providers/openrouter.ts @@ -24,11 +24,6 @@ type OpenRouterChatCompletionParams = OpenAI.Chat.ChatCompletionCreateParams & { thinking?: BetaThinkingConfigParam } -// Add custom interface for OpenRouter usage chunk. -interface OpenRouterApiStreamUsageChunk extends ApiStreamUsageChunk { - fullResponseText: string -} - export class OpenRouterHandler extends BaseProvider implements SingleCompletionHandler { protected options: ApiHandlerOptions private client: OpenAI @@ -110,7 +105,7 @@ export class OpenRouterHandler extends BaseProvider implements SingleCompletionH top_p: topP, messages: openAiMessages, stream: true, - include_reasoning: true, + stream_options: { include_usage: true }, // Only include provider if openRouterSpecificProvider is not "[default]". ...(this.options.openRouterSpecificProvider && this.options.openRouterSpecificProvider !== OPENROUTER_DEFAULT_PROVIDER_NAME && { @@ -122,7 +117,7 @@ export class OpenRouterHandler extends BaseProvider implements SingleCompletionH const stream = await this.client.chat.completions.create(completionParams) - let genId: string | undefined + let lastUsage for await (const chunk of stream as unknown as AsyncIterable) { // OpenRouter returns an error object instead of the OpenAI SDK throwing an error. @@ -132,10 +127,6 @@ export class OpenRouterHandler extends BaseProvider implements SingleCompletionH throw new Error(`OpenRouter API Error ${error?.code}: ${error?.message}`) } - if (!genId && chunk.id) { - genId = chunk.id - } - const delta = chunk.choices[0]?.delta if ("reasoning" in delta && delta.reasoning) { @@ -146,47 +137,23 @@ export class OpenRouterHandler extends BaseProvider implements SingleCompletionH fullResponseText += delta.content yield { type: "text", text: delta.content } as ApiStreamChunk } - } - const endpoint = `${this.client.baseURL}/generation?id=${genId}` - - const config: AxiosRequestConfig = { - headers: { Authorization: `Bearer ${this.options.openRouterApiKey}` }, - timeout: 3_000, + if (chunk.usage) { + lastUsage = chunk.usage + } } - let attempt = 0 - let lastError: Error | undefined - const startTime = Date.now() - - while (attempt++ < 10) { - await delay(attempt * 100) // Give OpenRouter some time to produce the generation metadata. - - try { - const response = await axios.get(endpoint, config) - const generation = response.data?.data - - yield { - type: "usage", - inputTokens: generation?.native_tokens_prompt || 0, - outputTokens: generation?.native_tokens_completion || 0, - totalCost: generation?.total_cost || 0, - fullResponseText, - } as OpenRouterApiStreamUsageChunk - - break - } catch (error: unknown) { - if (error instanceof Error) { - lastError = error - } - } + if (lastUsage) { + yield this.processUsageMetrics(lastUsage) } + } - if (lastError) { - console.error( - `Failed to fetch OpenRouter generation details after attempt #${attempt} (${Date.now() - startTime}ms) [${genId}]`, - lastError, - ) + processUsageMetrics(usage: any): ApiStreamUsageChunk { + return { + type: "usage", + inputTokens: usage?.prompt_tokens || 0, + outputTokens: usage?.completion_tokens || 0, + totalCost: usage?.cost || 0, } } @@ -289,12 +256,13 @@ export async function getOpenRouterModels(options?: ApiHandlerOptions) { modelInfo.maxTokens = 8192 break case rawModel.id.startsWith("anthropic/claude-3-haiku"): - default: modelInfo.supportsPromptCache = true modelInfo.cacheWritesPrice = 0.3 modelInfo.cacheReadsPrice = 0.03 modelInfo.maxTokens = 8192 break + default: + break } models[rawModel.id] = modelInfo diff --git a/src/api/providers/requesty.ts b/src/api/providers/requesty.ts index 434d6f43161..822db1a6b06 100644 --- a/src/api/providers/requesty.ts +++ b/src/api/providers/requesty.ts @@ -1,6 +1,6 @@ import axios from "axios" -import { ModelInfo, requestyModelInfoSaneDefaults, requestyDefaultModelId } from "../../shared/api" +import { ModelInfo, requestyDefaultModelInfo, requestyDefaultModelId } from "../../shared/api" import { calculateApiCostOpenAI, parseApiPrice } from "../../utils/cost" import { ApiStreamUsageChunk } from "../transform/stream" import { OpenAiHandler, OpenAiHandlerOptions } from "./openai" @@ -26,7 +26,7 @@ export class RequestyHandler extends OpenAiHandler { openAiApiKey: options.requestyApiKey, openAiModelId: options.requestyModelId ?? requestyDefaultModelId, openAiBaseUrl: "https://router.requesty.ai/v1", - openAiCustomModelInfo: options.requestyModelInfo ?? requestyModelInfoSaneDefaults, + openAiCustomModelInfo: options.requestyModelInfo ?? requestyDefaultModelInfo, }) } @@ -34,7 +34,7 @@ export class RequestyHandler extends OpenAiHandler { const modelId = this.options.requestyModelId ?? requestyDefaultModelId return { id: modelId, - info: this.options.requestyModelInfo ?? requestyModelInfoSaneDefaults, + info: this.options.requestyModelInfo ?? requestyDefaultModelInfo, } } diff --git a/src/api/providers/unbound.ts b/src/api/providers/unbound.ts index 38cd494cdd3..f83ecd457b9 100644 --- a/src/api/providers/unbound.ts +++ b/src/api/providers/unbound.ts @@ -212,7 +212,10 @@ export async function getUnboundModels() { switch (true) { case modelId.startsWith("anthropic/"): - modelInfo.maxTokens = 8192 + // Set max tokens to 8192 for supported Anthropic models + if (modelInfo.maxTokens !== 4096) { + modelInfo.maxTokens = 8192 + } break default: break diff --git a/src/core/Cline.ts b/src/core/Cline.ts index b7bfc021183..09a2357f219 100644 --- a/src/core/Cline.ts +++ b/src/core/Cline.ts @@ -11,6 +11,7 @@ import pWaitFor from "p-wait-for" import getFolderSize from "get-folder-size" import { serializeError } from "serialize-error" import * as vscode from "vscode" +import { isPathOutsideWorkspace } from "../utils/pathUtils" import { TokenUsage } from "../exports/roo-code" import { ApiHandler, buildApiHandler } from "../api" @@ -29,6 +30,7 @@ import { everyLineHasLineNumbers, } from "../integrations/misc/extract-text" import { countFileLines } from "../integrations/misc/line-counter" +import { fetchInstructions } from "./prompts/instructions/instructions" import { ExitCodeDetails } from "../integrations/terminal/TerminalProcess" import { Terminal } from "../integrations/terminal/Terminal" import { TerminalRegistry } from "../integrations/terminal/TerminalRegistry" @@ -82,6 +84,13 @@ import { validateToolUse, isToolAllowedForMode, ToolName } from "./mode-validato import { parseXml } from "../utils/xml" import { readLines } from "../integrations/misc/read-lines" import { getWorkspacePath } from "../utils/path" +import { isBinaryFile } from "isbinaryfile" +import { ApiService } from "../services/api/ApiService" +import { FileSystemService } from "../services/filesystem/FileSystemService" +import { MessageService } from "../services/message/MessageService" + +const cwd = + vscode.workspace.workspaceFolders?.map((folder) => folder.uri.fsPath).at(0) ?? path.join(os.homedir(), "Desktop") // may or may not exist but fs checking existence would immediately ask for permission which would be bad UX, need to come up with a better solution type ToolResponse = string | Array type UserContent = Array @@ -114,6 +123,7 @@ export type ClineOptions = { rootTask?: Cline parentTask?: Cline taskNumber?: number + onCreated?: (cline: Cline) => void } export class Cline extends EventEmitter { @@ -122,6 +132,15 @@ export class Cline extends EventEmitter { get cwd() { return getWorkspacePath(path.join(os.homedir(), "Desktop")) } + private apiService: ApiService + private fileSystemService: FileSystemService + protected messageService: MessageService + + // Add public getter for messageService + public getMessageService(): MessageService { + return this.messageService + } + // Subtasks readonly rootTask: Cline | undefined = undefined readonly parentTask: Cline | undefined = undefined @@ -191,6 +210,7 @@ export class Cline extends EventEmitter { rootTask, parentTask, taskNumber, + onCreated, }: ClineOptions) { super() @@ -207,7 +227,16 @@ export class Cline extends EventEmitter { this.instanceId = crypto.randomUUID().slice(0, 8) this.taskNumber = -1 this.apiConfiguration = apiConfiguration + + // Initialize services + this.apiService = new ApiService() + this.apiService.initialize(apiConfiguration) + this.fileSystemService = new FileSystemService(cwd) + this.messageService = new MessageService(this.fileSystemService, cwd) + + // Keep the old api handler for backward compatibility during migration this.api = buildApiHandler(apiConfiguration) + this.urlContentFetcher = new UrlContentFetcher(provider.context) this.browserSession = new BrowserSession(provider.context) this.customInstructions = customInstructions @@ -234,6 +263,8 @@ export class Cline extends EventEmitter { Experiments.isEnabled(experiments ?? {}, EXPERIMENT_IDS.MULTI_SEARCH_AND_REPLACE), ) + onCreated?.(this) + if (startTask) { if (task || images) { this.startTask(task, images) @@ -289,72 +320,60 @@ export class Cline extends EventEmitter { if (!globalStoragePath) { throw new Error("Global storage uri is invalid") } - const taskDir = path.join(globalStoragePath, "tasks", this.taskId) - await fs.mkdir(taskDir, { recursive: true }) - return taskDir + + // Use storagePathManager to retrieve the task storage directory + const { getTaskDirectoryPath } = await import("../shared/storagePathManager") + return getTaskDirectoryPath(globalStoragePath, this.taskId) } private async getSavedApiConversationHistory(): Promise { - const filePath = path.join(await this.ensureTaskDirectoryExists(), GlobalFileNames.apiConversationHistory) - const fileExists = await fileExistsAtPath(filePath) - if (fileExists) { - return JSON.parse(await fs.readFile(filePath, "utf8")) - } - return [] + return this.messageService.getApiMessages(this.taskId) } private async addToApiConversationHistory(message: Anthropic.MessageParam) { const messageWithTs = { ...message, ts: Date.now() } this.apiConversationHistory.push(messageWithTs) - await this.saveApiConversationHistory() + await this.messageService.addApiMessage(messageWithTs) + await this.apiService.updateConversationHistory(this.apiConversationHistory) } async overwriteApiConversationHistory(newHistory: Anthropic.MessageParam[]) { this.apiConversationHistory = newHistory - await this.saveApiConversationHistory() + await this.messageService.addApiMessages(newHistory) } private async saveApiConversationHistory() { try { - const filePath = path.join(await this.ensureTaskDirectoryExists(), GlobalFileNames.apiConversationHistory) - await fs.writeFile(filePath, JSON.stringify(this.apiConversationHistory)) + const taskDir = await this.ensureTaskDirectoryExists() + const historyPath = path.join(taskDir, "api-conversation-history.json") + await this.messageService.saveApiMessages(historyPath) } catch (error) { - // in the off chance this fails, we don't want to stop the task console.error("Failed to save API conversation history:", error) } } private async getSavedClineMessages(): Promise { - const filePath = path.join(await this.ensureTaskDirectoryExists(), GlobalFileNames.uiMessages) - if (await fileExistsAtPath(filePath)) { - return JSON.parse(await fs.readFile(filePath, "utf8")) - } else { - // check old location - const oldPath = path.join(await this.ensureTaskDirectoryExists(), "claude_messages.json") - if (await fileExistsAtPath(oldPath)) { - const data = JSON.parse(await fs.readFile(oldPath, "utf8")) - await fs.unlink(oldPath) // remove old file - return data - } - } - return [] + return this.messageService.getMessages(this.taskId) } private async addToClineMessages(message: ClineMessage) { this.clineMessages.push(message) - await this.providerRef.deref()?.postStateToWebview() + await this.messageService.addMessage(message) this.emit("message", { action: "created", message }) - await this.saveClineMessages() } public async overwriteClineMessages(newMessages: ClineMessage[]) { this.clineMessages = newMessages - await this.saveClineMessages() + await this.messageService.addMessages(newMessages) } private async updateClineMessage(partialMessage: ClineMessage) { - await this.providerRef.deref()?.postMessageToWebview({ type: "partialMessage", partialMessage }) - this.emit("message", { action: "updated", message: partialMessage }) + const index = this.clineMessages.findIndex((m) => m.ts === partialMessage.ts) + if (index !== -1) { + this.clineMessages[index] = { ...this.clineMessages[index], ...partialMessage } + await this.messageService.updateMessage(partialMessage) + this.emit("message", { action: "updated", message: this.clineMessages[index] }) + } } private getTokenUsage() { @@ -366,150 +385,55 @@ export class Cline extends EventEmitter { private async saveClineMessages() { try { const taskDir = await this.ensureTaskDirectoryExists() - const filePath = path.join(taskDir, GlobalFileNames.uiMessages) - await fs.writeFile(filePath, JSON.stringify(this.clineMessages)) - // combined as they are in ChatView - const apiMetrics = this.getTokenUsage() - const taskMessage = this.clineMessages[0] // first message is always the task say - const lastRelevantMessage = - this.clineMessages[ - findLastIndex( - this.clineMessages, - (m) => !(m.ask === "resume_task" || m.ask === "resume_completed_task"), - ) - ] - - let taskDirSize = 0 - - try { - taskDirSize = await getFolderSize.loose(taskDir) - } catch (err) { - console.error( - `[saveClineMessages] failed to get task directory size (${taskDir}): ${err instanceof Error ? err.message : String(err)}`, - ) - } - - await this.providerRef.deref()?.updateTaskHistory({ - id: this.taskId, - number: this.taskNumber, - ts: lastRelevantMessage.ts, - task: taskMessage.text ?? "", - tokensIn: apiMetrics.totalTokensIn, - tokensOut: apiMetrics.totalTokensOut, - cacheWrites: apiMetrics.totalCacheWrites, - cacheReads: apiMetrics.totalCacheReads, - totalCost: apiMetrics.totalCost, - size: taskDirSize, - }) + const messagesPath = path.join(taskDir, "cline-messages.json") + await this.messageService.saveMessages(messagesPath) } catch (error) { - console.error("Failed to save cline messages:", error) + console.error("Failed to save Cline messages:", error) } } // Communicate with webview - // partial has three valid states true (partial message), false (completion of partial message), undefined (individual complete message) async ask( type: ClineAsk, text?: string, partial?: boolean, progressStatus?: ToolProgressStatus, ): Promise<{ response: ClineAskResponse; text?: string; images?: string[] }> { - // If this Cline instance was aborted by the provider, then the only - // thing keeping us alive is a promise still running in the background, - // in which case we don't want to send its result to the webview as it - // is attached to a new instance of Cline now. So we can safely ignore - // the result of any active promises, and this class will be - // deallocated. (Although we set Cline = undefined in provider, that - // simply removes the reference to this instance, but the instance is - // still alive until this promise resolves or rejects.) if (this.abort) { throw new Error(`[Cline#ask] task ${this.taskId}.${this.instanceId} aborted`) } - let askTs: number - - if (partial !== undefined) { - const lastMessage = this.clineMessages.at(-1) - const isUpdatingPreviousPartial = - lastMessage && lastMessage.partial && lastMessage.type === "ask" && lastMessage.ask === type - if (partial) { - if (isUpdatingPreviousPartial) { - // Existing partial message, so update it. - lastMessage.text = text - lastMessage.partial = partial - lastMessage.progressStatus = progressStatus - // TODO: Be more efficient about saving and posting only new - // data or one whole message at a time so ignore partial for - // saves, and only post parts of partial message instead of - // whole array in new listener. - this.updateClineMessage(lastMessage) - throw new Error("Current ask promise was ignored (#1)") - } else { - // This is a new partial message, so add it with partial - // state. - askTs = Date.now() - this.lastMessageTs = askTs - await this.addToClineMessages({ ts: askTs, type: "ask", ask: type, text, partial }) - throw new Error("Current ask promise was ignored (#2)") - } - } else { - if (isUpdatingPreviousPartial) { - // This is the complete version of a previously partial - // message, so replace the partial with the complete version. - this.askResponse = undefined - this.askResponseText = undefined - this.askResponseImages = undefined - - /* - Bug for the history books: - In the webview we use the ts as the chatrow key for the virtuoso list. Since we would update this ts right at the end of streaming, it would cause the view to flicker. The key prop has to be stable otherwise react has trouble reconciling items between renders, causing unmounting and remounting of components (flickering). - The lesson here is if you see flickering when rendering lists, it's likely because the key prop is not stable. - So in this case we must make sure that the message ts is never altered after first setting it. - */ - askTs = lastMessage.ts - this.lastMessageTs = askTs - // lastMessage.ts = askTs - lastMessage.text = text - lastMessage.partial = false - lastMessage.progressStatus = progressStatus - await this.saveClineMessages() - this.updateClineMessage(lastMessage) - } else { - // This is a new and complete message, so add it like normal. - this.askResponse = undefined - this.askResponseText = undefined - this.askResponseImages = undefined - askTs = Date.now() - this.lastMessageTs = askTs - await this.addToClineMessages({ ts: askTs, type: "ask", ask: type, text }) - } - } - } else { - // This is a new non-partial message, so add it like normal. - this.askResponse = undefined - this.askResponseText = undefined - this.askResponseImages = undefined - askTs = Date.now() - this.lastMessageTs = askTs - await this.addToClineMessages({ ts: askTs, type: "ask", ask: type, text }) + let askTs = Date.now() + this.lastMessageTs = askTs + + const message: ClineMessage = { + ts: askTs, + type: "ask", + ask: type, + text, + progressStatus } - await pWaitFor(() => this.askResponse !== undefined || this.lastMessageTs !== askTs, { interval: 100 }) + await this.messageService.handlePartialMessage(this.taskId, message, !partial) + + if (!partial) { + await pWaitFor(() => this.askResponse !== undefined || this.lastMessageTs !== askTs, { interval: 100 }) + + if (this.lastMessageTs !== askTs) { + throw new Error("Current ask promise was ignored (#3)") + } - if (this.lastMessageTs !== askTs) { - // Could happen if we send multiple asks in a row i.e. with - // command_output. It's important that when we know an ask could - // fail, it is handled gracefully. - throw new Error("Current ask promise was ignored") + const response = this.askResponse! + this.askResponse = undefined + return { + response, + text: this.askResponseText, + images: this.askResponseImages + } } - const result = { response: this.askResponse!, text: this.askResponseText, images: this.askResponseImages } - this.askResponse = undefined - this.askResponseText = undefined - this.askResponseImages = undefined - this.emit("taskAskResponded") - return result + throw new Error("Current ask promise was ignored (#4)") } async handleWebviewAskResponse(askResponse: ClineAskResponse, text?: string, images?: string[]) { @@ -530,53 +454,18 @@ export class Cline extends EventEmitter { throw new Error(`[Cline#say] task ${this.taskId}.${this.instanceId} aborted`) } - if (partial !== undefined) { - const lastMessage = this.clineMessages.at(-1) - const isUpdatingPreviousPartial = - lastMessage && lastMessage.partial && lastMessage.type === "say" && lastMessage.say === type - if (partial) { - if (isUpdatingPreviousPartial) { - // existing partial message, so update it - lastMessage.text = text - lastMessage.images = images - lastMessage.partial = partial - lastMessage.progressStatus = progressStatus - this.updateClineMessage(lastMessage) - } else { - // this is a new partial message, so add it with partial state - const sayTs = Date.now() - this.lastMessageTs = sayTs - await this.addToClineMessages({ ts: sayTs, type: "say", say: type, text, images, partial }) - } - } else { - // New now have a complete version of a previously partial message. - if (isUpdatingPreviousPartial) { - // This is the complete version of a previously partial - // message, so replace the partial with the complete version. - this.lastMessageTs = lastMessage.ts - // lastMessage.ts = sayTs - lastMessage.text = text - lastMessage.images = images - lastMessage.partial = false - lastMessage.progressStatus = progressStatus - // Instead of streaming partialMessage events, we do a save - // and post like normal to persist to disk. - await this.saveClineMessages() - // More performant than an entire postStateToWebview. - this.updateClineMessage(lastMessage) - } else { - // This is a new and complete message, so add it like normal. - const sayTs = Date.now() - this.lastMessageTs = sayTs - await this.addToClineMessages({ ts: sayTs, type: "say", say: type, text, images }) - } - } - } else { - // this is a new non-partial message, so add it like normal - const sayTs = Date.now() - this.lastMessageTs = sayTs - await this.addToClineMessages({ ts: sayTs, type: "say", say: type, text, images, checkpoint }) + const message: ClineMessage = { + ts: Date.now(), + type: "say", + say: type, + text, + images, + checkpoint, + progressStatus } + + await this.messageService.handlePartialMessage(this.taskId, message, !partial) + return undefined } async sayAndCreateMissingParamError(toolName: ToolUseName, paramName: string, relPath?: string) { @@ -596,7 +485,13 @@ export class Cline extends EventEmitter { // if the extension process were killed, then on restart the clineMessages might not be empty, so we need to set it to [] when we create a new Cline client (otherwise webview would show stale messages from previous session) this.clineMessages = [] this.apiConversationHistory = [] - await this.providerRef.deref()?.postStateToWebview() + await this.messageService.updateConversationState(this.taskId, { + isStreaming: false, + isPaused: false, + isWaitingForResponse: false, + currentTaskId: this.taskId + }) + await this.messageService.postStateToWebview() await this.say("text", task, images) this.isInitialized = true @@ -617,6 +512,7 @@ export class Cline extends EventEmitter { async resumePausedTask(lastMessage?: string) { // release this Cline instance from paused state this.isPaused = false + await this.messageService.updateConversationState(this.taskId, { isPaused: false }) this.emit("taskUnpaused") // fake an answer from the subtask that it has completed running and this is the result of what it has done @@ -1080,6 +976,7 @@ export class Cline extends EventEmitter { } async *attemptApiRequest(previousApiReqIndex: number, retryAttempt: number = 0): ApiStream { +<<<<<<< Updated upstream let mcpHub: McpHub | undefined const { mcpEnabled, alwaysApproveResubmit, requestDelaySeconds, rateLimitSeconds } = @@ -1226,7 +1123,16 @@ export class Cline extends EventEmitter { } catch (error) { // note that this api_req_failed ask is unique in that we only present this option if the api hasn't streamed any content yet (ie it fails on the first chunk due), as it would allow them to hit a retry button. However if the api failed mid-stream, it could be in any arbitrary state where some tools may have executed, so that error is handled differently and requires cancelling the task entirely. if (alwaysApproveResubmit) { - const errorMsg = error.error?.metadata?.raw ?? error.message ?? "Unknown error" + let errorMsg + + if (error.error?.metadata?.raw) { + errorMsg = JSON.stringify(error.error.metadata.raw, null, 2) + } else if (error.message) { + errorMsg = error.message + } else { + errorMsg = "Unknown error" + } + const baseDelay = requestDelaySeconds || 5 const exponentialDelay = Math.ceil(baseDelay * Math.pow(2, retryAttempt)) // Wait for the greater of the exponential delay or the rate limit delay @@ -1242,37 +1148,11 @@ export class Cline extends EventEmitter { ) await delay(1000) } - - await this.say( - "api_req_retry_delayed", - `${errorMsg}\n\nRetry attempt ${retryAttempt + 1}\nRetrying now...`, - undefined, - false, - ) - - // delegate generator output from the recursive call with incremented retry count - yield* this.attemptApiRequest(previousApiReqIndex, retryAttempt + 1) - return - } else { - const { response } = await this.ask( - "api_req_failed", - error.message ?? JSON.stringify(serializeError(error), null, 2), - ) - if (response !== "yesButtonClicked") { - // this will never happen since if noButtonClicked, we will clear current task, aborting this instance - throw new Error("API request failed") - } - await this.say("api_req_retried") - // delegate generator output from the recursive call - yield* this.attemptApiRequest(previousApiReqIndex) - return } + } catch (error) { + // Maintain existing error handling + throw error } - - // no error, so we can continue to yield all remaining chunks - // (needs to be placed outside of try/catch since it we want caller to handle errors not with api_req_failed as that is reserved for first chunk failures only) - // this delegates to another generator or iterable object. In this case, it's saying "yield all remaining values from this iterator". This effectively passes along all subsequent chunks from the original stream. - yield* iterator } async presentAssistantMessage() { @@ -1355,6 +1235,8 @@ export class Cline extends EventEmitter { return `[${block.name} for '${block.params.command}']` case "read_file": return `[${block.name} for '${block.params.path}']` + case "fetch_instructions": + return `[${block.name} for '${block.params.task}']` case "write_to_file": return `[${block.name} for '${block.params.path}']` case "apply_diff": @@ -1591,9 +1473,14 @@ export class Cline extends EventEmitter { } } + // Determine if the path is outside the workspace + const fullPath = relPath ? path.resolve(this.cwd, removeClosingTag("path", relPath)) : "" + const isOutsideWorkspace = isPathOutsideWorkspace(fullPath) + const sharedMessageProps: ClineSayTool = { tool: fileExists ? "editedExistingFile" : "newFileCreated", path: getReadablePath(this.cwd, removeClosingTag("path", relPath)), + isOutsideWorkspace, } try { if (block.partial) { @@ -2230,9 +2117,15 @@ export class Cline extends EventEmitter { const relPath: string | undefined = block.params.path const startLineStr: string | undefined = block.params.start_line const endLineStr: string | undefined = block.params.end_line + + // Get the full path and determine if it's outside the workspace + const fullPath = relPath ? path.resolve(this.cwd, removeClosingTag("path", relPath)) : "" + const isOutsideWorkspace = isPathOutsideWorkspace(fullPath) + const sharedMessageProps: ClineSayTool = { tool: "readFile", path: getReadablePath(this.cwd, removeClosingTag("path", relPath)), + isOutsideWorkspace, } try { if (block.partial) { @@ -2324,25 +2217,28 @@ export class Cline extends EventEmitter { let isFileTruncated = false let sourceCodeDef = "" + const isBinary = await isBinaryFile(absolutePath).catch(() => false) + const autoTruncate = block.params.auto_truncate === "true" + if (isRangeRead) { if (startLine === undefined) { content = addLineNumbers(await readLines(absolutePath, endLine, startLine)) } else { content = addLineNumbers( await readLines(absolutePath, endLine, startLine), - startLine, + startLine + 1, ) } - } else if (totalLines > maxReadFileLine) { + } else if (autoTruncate && !isBinary && totalLines > maxReadFileLine) { // If file is too large, only read the first maxReadFileLine lines isFileTruncated = true const res = await Promise.all([ - readLines(absolutePath, maxReadFileLine - 1, 0), + maxReadFileLine > 0 ? readLines(absolutePath, maxReadFileLine - 1, 0) : "", parseSourceCodeDefinitionsForFile(absolutePath, this.rooIgnoreController), ]) - content = addLineNumbers(res[0]) + content = res[0].length > 0 ? addLineNumbers(res[0]) : "" const result = res[1] if (result) { sourceCodeDef = `\n\n${result}` @@ -2354,7 +2250,7 @@ export class Cline extends EventEmitter { // Add truncation notice if applicable if (isFileTruncated) { - content += `\n\n[File truncated: showing ${maxReadFileLine} of ${totalLines} total lines. Use start_line and end_line if you need to read more.].${sourceCodeDef}` + content += `\n\n[File truncated: showing ${maxReadFileLine} of ${totalLines} total lines. Use start_line and end_line or set auto_truncate to false if you need to read more.].${sourceCodeDef}` } pushToolResult(content) @@ -2366,6 +2262,62 @@ export class Cline extends EventEmitter { } } + case "fetch_instructions": { + const task: string | undefined = block.params.task + const sharedMessageProps: ClineSayTool = { + tool: "fetchInstructions", + content: task, + } + try { + if (block.partial) { + const partialMessage = JSON.stringify({ + ...sharedMessageProps, + content: undefined, + } satisfies ClineSayTool) + await this.ask("tool", partialMessage, block.partial).catch(() => {}) + break + } else { + if (!task) { + this.consecutiveMistakeCount++ + pushToolResult( + await this.sayAndCreateMissingParamError("fetch_instructions", "task"), + ) + break + } + + this.consecutiveMistakeCount = 0 + const completeMessage = JSON.stringify({ + ...sharedMessageProps, + content: task, + } satisfies ClineSayTool) + + const didApprove = await askApproval("tool", completeMessage) + if (!didApprove) { + break + } + + // now fetch the content and provide it to the agent. + const provider = this.providerRef.deref() + const mcpHub = provider?.getMcpHub() + if (!mcpHub) { + throw new Error("MCP hub not available") + } + const diffStrategy = this.diffStrategy + const context = provider?.context + const content = await fetchInstructions(task, { mcpHub, diffStrategy, context }) + if (!content) { + pushToolResult(formatResponse.toolError(`Invalid instructions request: ${task}`)) + break + } + pushToolResult(content) + break + } + } catch (error) { + await handleError("fetch instructions", error) + break + } + } + case "list_files": { const relDirPath: string | undefined = block.params.path const recursiveRaw: string | undefined = block.params.recursive @@ -2856,8 +2808,16 @@ export class Cline extends EventEmitter { }) .filter(Boolean) .join("\n\n") || "(Empty response)" - await this.say("mcp_server_response", resourceResultPretty) - pushToolResult(formatResponse.toolResult(resourceResultPretty)) + + // handle images (image must contain mimetype and blob) + let images: string[] = [] + resourceResult?.contents.forEach((item) => { + if (item.mimeType?.startsWith("image") && item.blob) { + images.push(item.blob) + } + }) + await this.say("mcp_server_response", resourceResultPretty, images) + pushToolResult(formatResponse.toolResult(resourceResultPretty, images)) break } } catch (error) { @@ -3058,15 +3018,23 @@ export class Cline extends EventEmitter { await delay(500) const newCline = await provider.initClineWithTask(message, undefined, this) + await this.messageService.updateConversationState(this.taskId, { + isWaitingForResponse: true, + currentTaskId: newCline.taskId + }) this.emit("taskSpawned", newCline.taskId) pushToolResult( - `Successfully created new task in ${targetMode.name} mode with message: ${message}`, + `Successfully created new task in ${targetMode.name} mode with message: ${message}` ) // Set the isPaused flag to true so the parent // task can wait for the sub-task to finish. this.isPaused = true + await this.messageService.updateConversationState(this.taskId, { + isPaused: true, + isWaitingForResponse: true + }) this.emit("taskPaused") break @@ -3163,6 +3131,11 @@ export class Cline extends EventEmitter { } telemetryService.captureTaskCompleted(this.taskId) + await this.messageService.updateConversationState(this.taskId, { + isStreaming: false, + isPaused: false, + isWaitingForResponse: false + }) this.emit("taskCompleted", this.taskId, this.getTokenUsage()) if (this.parentTask) { @@ -3359,7 +3332,7 @@ export class Cline extends EventEmitter { request: userContent.map((block) => formatContentBlockToMarkdown(block)).join("\n\n"), } satisfies ClineApiReqInfo) await this.saveClineMessages() - await this.providerRef.deref()?.postStateToWebview() + await this.messageService.postStateToWebview() try { let cacheWriteTokens = 0 @@ -3397,37 +3370,14 @@ export class Cline extends EventEmitter { await this.diffViewProvider.revertChanges() // closes diff view } - // if last message is a partial we need to update and save it - const lastMessage = this.clineMessages.at(-1) - if (lastMessage && lastMessage.partial) { - // lastMessage.ts = Date.now() DO NOT update ts since it is used as a key for virtuoso list - lastMessage.partial = false - // instead of streaming partialMessage events, we do a save and post like normal to persist to disk - console.log("updating partial message", lastMessage) - // await this.saveClineMessages() - } - - // Let assistant know their response was interrupted for when task is resumed - await this.addToApiConversationHistory({ - role: "assistant", - content: [ - { - type: "text", - text: - assistantMessage + - `\n\n[${ - cancelReason === "streaming_failed" - ? "Response interrupted by API Error" - : "Response interrupted by user" - }]`, - }, - ], - }) + await this.messageService.handleStreamInterruption( + this.taskId, + cancelReason === "streaming_failed" ? "API Error" : "User Interruption" + ) // update api_req_started to have cancelled and cost, so that we can display the cost of the partial stream updateApiReqMsg(cancelReason, streamingFailedMessage) - await this.saveClineMessages() - + // signals to provider that it can retrieve the saved messages from disk, as abortTask can not be awaited on in nature this.didFinishAbortingStream = true } @@ -3448,6 +3398,7 @@ export class Cline extends EventEmitter { let assistantMessage = "" let reasoningMessage = "" this.isStreaming = true + await this.messageService.updateConversationState(this.taskId, { isStreaming: true }) try { for await (const chunk of stream) { @@ -3522,6 +3473,7 @@ export class Cline extends EventEmitter { } } finally { this.isStreaming = false + await this.messageService.updateConversationState(this.taskId, { isStreaming: false }) } // need to call here in case the stream was aborted @@ -3544,7 +3496,8 @@ export class Cline extends EventEmitter { updateApiReqMsg() await this.saveClineMessages() - await this.providerRef.deref()?.postStateToWebview() + await this.messageService.updateConversationState(this.taskId, { isWaitingForResponse: true }) + await this.messageService.postStateToWebview() // now add to apiconversationhistory // need to save assistant responses to file before proceeding to tool use since user can exit at any moment and we wouldn't be able to save the assistant's response @@ -3565,6 +3518,7 @@ export class Cline extends EventEmitter { // } await pWaitFor(() => this.userMessageContentReady) + await this.messageService.updateConversationState(this.taskId, { isWaitingForResponse: false }) // if the model did not tool use, then we need to tell it to either use a tool or attempt_completion const didToolUse = this.assistantMessageContent.some((block) => block.type === "tool_use") diff --git a/src/core/CodeActionProvider.ts b/src/core/CodeActionProvider.ts index 285e6dac6cd..040021a51fa 100644 --- a/src/core/CodeActionProvider.ts +++ b/src/core/CodeActionProvider.ts @@ -7,6 +7,7 @@ export const ACTION_NAMES = { FIX_LOGIC: "Roo Code: Fix Logic", IMPROVE: "Roo Code: Improve Code", ADD_TO_CONTEXT: "Roo Code: Add to Context", + NEW_TASK: "Roo Code: New Task", } as const export const COMMAND_IDS = { @@ -14,6 +15,7 @@ export const COMMAND_IDS = { FIX: "roo-cline.fixCode", IMPROVE: "roo-cline.improveCode", ADD_TO_CONTEXT: "roo-cline.addToContext", + NEW_TASK: "roo-cline.newTask", } as const export class CodeActionProvider implements vscode.CodeActionProvider { diff --git a/src/core/__tests__/Cline.test.ts b/src/core/__tests__/Cline.test.ts index 5ae5f625fc3..a049d8efd2d 100644 --- a/src/core/__tests__/Cline.test.ts +++ b/src/core/__tests__/Cline.test.ts @@ -139,6 +139,10 @@ jest.mock("vscode", () => { } return { + CodeActionKind: { + QuickFix: { value: "quickfix" }, + RefactorRewrite: { value: "refactor.rewrite" }, + }, window: { createTextEditorDecorationType: jest.fn().mockReturnValue({ dispose: jest.fn(), diff --git a/src/core/assistant-message/index.ts b/src/core/assistant-message/index.ts index 81e6edb95b9..e59622169e3 100644 --- a/src/core/assistant-message/index.ts +++ b/src/core/assistant-message/index.ts @@ -25,6 +25,7 @@ export const toolUseNames = [ "attempt_completion", "switch_mode", "new_task", + "fetch_instructions", ] as const // Converts array of tool call names into a union type ("execute_command" | "read_file" | ...) @@ -51,6 +52,7 @@ export const toolParamNames = [ "diff", "start_line", "end_line", + "auto_truncate", "mode_slug", "reason", "operations", @@ -58,6 +60,7 @@ export const toolParamNames = [ "message", "cwd", "follow_up", + "task", ] as const export type ToolParamName = (typeof toolParamNames)[number] @@ -81,6 +84,11 @@ export interface ReadFileToolUse extends ToolUse { params: Partial, "path" | "start_line" | "end_line">> } +export interface FetchInstructionsToolUse extends ToolUse { + name: "fetch_instructions" + params: Partial, "task">> +} + export interface WriteToFileToolUse extends ToolUse { name: "write_to_file" params: Partial, "path" | "content" | "line_count">> diff --git a/src/core/config/CustomModesManager.ts b/src/core/config/CustomModesManager.ts index cb4759fca43..c701f38f910 100644 --- a/src/core/config/CustomModesManager.ts +++ b/src/core/config/CustomModesManager.ts @@ -6,6 +6,7 @@ import { ModeConfig } from "../../shared/modes" import { fileExistsAtPath } from "../../utils/fs" import { arePathsEqual, getWorkspacePath } from "../../utils/path" import { logger } from "../../utils/logging" +import { GlobalFileNames } from "../../shared/globalFileNames" const ROOMODES_FILENAME = ".roomodes" @@ -113,7 +114,7 @@ export class CustomModesManager { async getCustomModesFilePath(): Promise { const settingsDir = await this.ensureSettingsDirectoryExists() - const filePath = path.join(settingsDir, "cline_custom_modes.json") + const filePath = path.join(settingsDir, GlobalFileNames.customModes) const fileExists = await fileExistsAtPath(filePath) if (!fileExists) { await this.queueWrite(async () => { diff --git a/src/core/config/__tests__/CustomModesManager.test.ts b/src/core/config/__tests__/CustomModesManager.test.ts index 300f1b7c0ff..3af26c92b80 100644 --- a/src/core/config/__tests__/CustomModesManager.test.ts +++ b/src/core/config/__tests__/CustomModesManager.test.ts @@ -7,6 +7,7 @@ import { CustomModesManager } from "../CustomModesManager" import { ModeConfig } from "../../../shared/modes" import { fileExistsAtPath } from "../../../utils/fs" import { getWorkspacePath, arePathsEqual } from "../../../utils/path" +import { GlobalFileNames } from "../../../shared/globalFileNames" jest.mock("vscode") jest.mock("fs/promises") @@ -21,7 +22,7 @@ describe("CustomModesManager", () => { // Use path.sep to ensure correct path separators for the current platform const mockStoragePath = `${path.sep}mock${path.sep}settings` - const mockSettingsPath = path.join(mockStoragePath, "settings", "cline_custom_modes.json") + const mockSettingsPath = path.join(mockStoragePath, "settings", GlobalFileNames.customModes) const mockRoomodes = `${path.sep}mock${path.sep}workspace${path.sep}.roomodes` beforeEach(() => { @@ -333,17 +334,16 @@ describe("CustomModesManager", () => { expect(mockOnUpdate).toHaveBeenCalled() }) }) - describe("File Operations", () => { it("creates settings directory if it doesn't exist", async () => { - const configPath = path.join(mockStoragePath, "settings", "cline_custom_modes.json") + const settingsPath = path.join(mockStoragePath, "settings", GlobalFileNames.customModes) await manager.getCustomModesFilePath() - expect(fs.mkdir).toHaveBeenCalledWith(path.dirname(configPath), { recursive: true }) + expect(fs.mkdir).toHaveBeenCalledWith(path.dirname(settingsPath), { recursive: true }) }) it("creates default config if file doesn't exist", async () => { - const configPath = path.join(mockStoragePath, "settings", "cline_custom_modes.json") + const settingsPath = path.join(mockStoragePath, "settings", GlobalFileNames.customModes) // Mock fileExists to return false first time, then true let firstCall = true @@ -358,13 +358,13 @@ describe("CustomModesManager", () => { await manager.getCustomModesFilePath() expect(fs.writeFile).toHaveBeenCalledWith( - configPath, + settingsPath, expect.stringMatching(/^\{\s+"customModes":\s+\[\s*\]\s*\}$/), ) }) it("watches file for changes", async () => { - const configPath = path.join(mockStoragePath, "settings", "cline_custom_modes.json") + const configPath = path.join(mockStoragePath, "settings", GlobalFileNames.customModes) ;(fs.readFile as jest.Mock).mockResolvedValue(JSON.stringify({ customModes: [] })) ;(arePathsEqual as jest.Mock).mockImplementation((path1: string, path2: string) => { diff --git a/src/core/diff/strategies/__tests__/multi-search-replace.test.ts b/src/core/diff/strategies/__tests__/multi-search-replace.test.ts index 8fc16d2303e..e4a52af6d4b 100644 --- a/src/core/diff/strategies/__tests__/multi-search-replace.test.ts +++ b/src/core/diff/strategies/__tests__/multi-search-replace.test.ts @@ -1,16 +1,64 @@ import { MultiSearchReplaceDiffStrategy } from "../multi-search-replace" describe("MultiSearchReplaceDiffStrategy", () => { - describe("exact matching", () => { + describe("validateMarkerSequencing", () => { let strategy: MultiSearchReplaceDiffStrategy beforeEach(() => { - strategy = new MultiSearchReplaceDiffStrategy(1.0, 5) // Default 1.0 threshold for exact matching, 5 line buffer for tests + strategy = new MultiSearchReplaceDiffStrategy() }) - it("should replace matching content", async () => { - const originalContent = 'function hello() {\n console.log("hello")\n}\n' - const diffContent = `test.ts + it("validates correct marker sequence", () => { + const diff = "<<<<<<< SEARCH\n" + "some content\n" + "=======\n" + "new content\n" + ">>>>>>> REPLACE" + expect(strategy["validateMarkerSequencing"](diff).success).toBe(true) + }) + + it("validates multiple correct marker sequences", () => { + const diff = + "<<<<<<< SEARCH\n" + + "content1\n" + + "=======\n" + + "new1\n" + + ">>>>>>> REPLACE\n\n" + + "<<<<<<< SEARCH\n" + + "content2\n" + + "=======\n" + + "new2\n" + + ">>>>>>> REPLACE" + expect(strategy["validateMarkerSequencing"](diff).success).toBe(true) + }) + + it("detects separator before search", () => { + const diff = "=======\n" + "content\n" + ">>>>>>> REPLACE" + const result = strategy["validateMarkerSequencing"](diff) + expect(result.success).toBe(false) + expect(result.error).toContain("'=======' found in your diff content") + }) + + it("detects replace before separator", () => { + const diff = "<<<<<<< SEARCH\n" + "content\n" + ">>>>>>> REPLACE" + const result = strategy["validateMarkerSequencing"](diff) + expect(result.success).toBe(false) + expect(result.error).toContain("'>>>>>>> REPLACE' found in your diff content") + }) + + it("detects incomplete sequence", () => { + const diff = "<<<<<<< SEARCH\n" + "content\n" + "=======\n" + "new content" + const result = strategy["validateMarkerSequencing"](diff) + expect(result.success).toBe(false) + expect(result.error).toContain("Expected '>>>>>>> REPLACE' was not found") + }) + + describe("exact matching", () => { + let strategy: MultiSearchReplaceDiffStrategy + + beforeEach(() => { + strategy = new MultiSearchReplaceDiffStrategy(1.0, 5) // Default 1.0 threshold for exact matching, 5 line buffer for tests + }) + + it("should replace matching content", async () => { + const originalContent = 'function hello() {\n console.log("hello")\n}\n' + const diffContent = `test.ts <<<<<<< SEARCH function hello() { console.log("hello") @@ -21,16 +69,16 @@ function hello() { } >>>>>>> REPLACE` - const result = await strategy.applyDiff(originalContent, diffContent) - expect(result.success).toBe(true) - if (result.success) { - expect(result.content).toBe('function hello() {\n console.log("hello world")\n}\n') - } - }) + const result = await strategy.applyDiff(originalContent, diffContent) + expect(result.success).toBe(true) + if (result.success) { + expect(result.content).toBe('function hello() {\n console.log("hello world")\n}\n') + } + }) - it("should match content with different surrounding whitespace", async () => { - const originalContent = "\nfunction example() {\n return 42;\n}\n\n" - const diffContent = `test.ts + it("should match content with different surrounding whitespace", async () => { + const originalContent = "\nfunction example() {\n return 42;\n}\n\n" + const diffContent = `test.ts <<<<<<< SEARCH function example() { return 42; @@ -41,16 +89,16 @@ function example() { } >>>>>>> REPLACE` - const result = await strategy.applyDiff(originalContent, diffContent) - expect(result.success).toBe(true) - if (result.success) { - expect(result.content).toBe("\nfunction example() {\n return 43;\n}\n\n") - } - }) + const result = await strategy.applyDiff(originalContent, diffContent) + expect(result.success).toBe(true) + if (result.success) { + expect(result.content).toBe("\nfunction example() {\n return 43;\n}\n\n") + } + }) - it("should match content with different indentation in search block", async () => { - const originalContent = " function test() {\n return true;\n }\n" - const diffContent = `test.ts + it("should match content with different indentation in search block", async () => { + const originalContent = " function test() {\n return true;\n }\n" + const diffContent = `test.ts <<<<<<< SEARCH function test() { return true; @@ -61,16 +109,16 @@ function test() { } >>>>>>> REPLACE` - const result = await strategy.applyDiff(originalContent, diffContent) - expect(result.success).toBe(true) - if (result.success) { - expect(result.content).toBe(" function test() {\n return false;\n }\n") - } - }) + const result = await strategy.applyDiff(originalContent, diffContent) + expect(result.success).toBe(true) + if (result.success) { + expect(result.content).toBe(" function test() {\n return false;\n }\n") + } + }) - it("should handle tab-based indentation", async () => { - const originalContent = "function test() {\n\treturn true;\n}\n" - const diffContent = `test.ts + it("should handle tab-based indentation", async () => { + const originalContent = "function test() {\n\treturn true;\n}\n" + const diffContent = `test.ts <<<<<<< SEARCH function test() { \treturn true; @@ -81,16 +129,16 @@ function test() { } >>>>>>> REPLACE` - const result = await strategy.applyDiff(originalContent, diffContent) - expect(result.success).toBe(true) - if (result.success) { - expect(result.content).toBe("function test() {\n\treturn false;\n}\n") - } - }) + const result = await strategy.applyDiff(originalContent, diffContent) + expect(result.success).toBe(true) + if (result.success) { + expect(result.content).toBe("function test() {\n\treturn false;\n}\n") + } + }) - it("should preserve mixed tabs and spaces", async () => { - const originalContent = "\tclass Example {\n\t constructor() {\n\t\tthis.value = 0;\n\t }\n\t}" - const diffContent = `test.ts + it("should preserve mixed tabs and spaces", async () => { + const originalContent = "\tclass Example {\n\t constructor() {\n\t\tthis.value = 0;\n\t }\n\t}" + const diffContent = `test.ts <<<<<<< SEARCH \tclass Example { \t constructor() { @@ -105,18 +153,18 @@ function test() { \t} >>>>>>> REPLACE` - const result = await strategy.applyDiff(originalContent, diffContent) - expect(result.success).toBe(true) - if (result.success) { - expect(result.content).toBe( - "\tclass Example {\n\t constructor() {\n\t\tthis.value = 1;\n\t }\n\t}", - ) - } - }) + const result = await strategy.applyDiff(originalContent, diffContent) + expect(result.success).toBe(true) + if (result.success) { + expect(result.content).toBe( + "\tclass Example {\n\t constructor() {\n\t\tthis.value = 1;\n\t }\n\t}", + ) + } + }) - it("should handle additional indentation with tabs", async () => { - const originalContent = "\tfunction test() {\n\t\treturn true;\n\t}" - const diffContent = `test.ts + it("should handle additional indentation with tabs", async () => { + const originalContent = "\tfunction test() {\n\t\treturn true;\n\t}" + const diffContent = `test.ts <<<<<<< SEARCH function test() { \treturn true; @@ -128,16 +176,16 @@ function test() { } >>>>>>> REPLACE` - const result = await strategy.applyDiff(originalContent, diffContent) - expect(result.success).toBe(true) - if (result.success) { - expect(result.content).toBe("\tfunction test() {\n\t\t// Add comment\n\t\treturn false;\n\t}") - } - }) + const result = await strategy.applyDiff(originalContent, diffContent) + expect(result.success).toBe(true) + if (result.success) { + expect(result.content).toBe("\tfunction test() {\n\t\t// Add comment\n\t\treturn false;\n\t}") + } + }) - it("should preserve exact indentation characters when adding lines", async () => { - const originalContent = "\tfunction test() {\n\t\treturn true;\n\t}" - const diffContent = `test.ts + it("should preserve exact indentation characters when adding lines", async () => { + const originalContent = "\tfunction test() {\n\t\treturn true;\n\t}" + const diffContent = `test.ts <<<<<<< SEARCH \tfunction test() { \t\treturn true; @@ -150,18 +198,18 @@ function test() { \t} >>>>>>> REPLACE` - const result = await strategy.applyDiff(originalContent, diffContent) - expect(result.success).toBe(true) - if (result.success) { - expect(result.content).toBe( - "\tfunction test() {\n\t\t// First comment\n\t\t// Second comment\n\t\treturn true;\n\t}", - ) - } - }) + const result = await strategy.applyDiff(originalContent, diffContent) + expect(result.success).toBe(true) + if (result.success) { + expect(result.content).toBe( + "\tfunction test() {\n\t\t// First comment\n\t\t// Second comment\n\t\treturn true;\n\t}", + ) + } + }) - it("should handle Windows-style CRLF line endings", async () => { - const originalContent = "function test() {\r\n return true;\r\n}\r\n" - const diffContent = `test.ts + it("should handle Windows-style CRLF line endings", async () => { + const originalContent = "function test() {\r\n return true;\r\n}\r\n" + const diffContent = `test.ts <<<<<<< SEARCH function test() { return true; @@ -172,16 +220,16 @@ function test() { } >>>>>>> REPLACE` - const result = await strategy.applyDiff(originalContent, diffContent) - expect(result.success).toBe(true) - if (result.success) { - expect(result.content).toBe("function test() {\r\n return false;\r\n}\r\n") - } - }) + const result = await strategy.applyDiff(originalContent, diffContent) + expect(result.success).toBe(true) + if (result.success) { + expect(result.content).toBe("function test() {\r\n return false;\r\n}\r\n") + } + }) - it("should return false if search content does not match", async () => { - const originalContent = 'function hello() {\n console.log("hello")\n}\n' - const diffContent = `test.ts + it("should return false if search content does not match", async () => { + const originalContent = 'function hello() {\n console.log("hello")\n}\n' + const diffContent = `test.ts <<<<<<< SEARCH function hello() { console.log("wrong") @@ -192,22 +240,22 @@ function hello() { } >>>>>>> REPLACE` - const result = await strategy.applyDiff(originalContent, diffContent) - expect(result.success).toBe(false) - }) + const result = await strategy.applyDiff(originalContent, diffContent) + expect(result.success).toBe(false) + }) - it("should return false if diff format is invalid", async () => { - const originalContent = 'function hello() {\n console.log("hello")\n}\n' - const diffContent = `test.ts\nInvalid diff format` + it("should return false if diff format is invalid", async () => { + const originalContent = 'function hello() {\n console.log("hello")\n}\n' + const diffContent = `test.ts\nInvalid diff format` - const result = await strategy.applyDiff(originalContent, diffContent) - expect(result.success).toBe(false) - }) + const result = await strategy.applyDiff(originalContent, diffContent) + expect(result.success).toBe(false) + }) - it("should handle multiple lines with proper indentation", async () => { - const originalContent = - "class Example {\n constructor() {\n this.value = 0\n }\n\n getValue() {\n return this.value\n }\n}\n" - const diffContent = `test.ts + it("should handle multiple lines with proper indentation", async () => { + const originalContent = + "class Example {\n constructor() {\n this.value = 0\n }\n\n getValue() {\n return this.value\n }\n}\n" + const diffContent = `test.ts <<<<<<< SEARCH getValue() { return this.value @@ -220,18 +268,18 @@ function hello() { } >>>>>>> REPLACE` - const result = await strategy.applyDiff(originalContent, diffContent) - expect(result.success).toBe(true) - if (result.success) { - expect(result.content).toBe( - 'class Example {\n constructor() {\n this.value = 0\n }\n\n getValue() {\n // Add logging\n console.log("Getting value")\n return this.value\n }\n}\n', - ) - } - }) + const result = await strategy.applyDiff(originalContent, diffContent) + expect(result.success).toBe(true) + if (result.success) { + expect(result.content).toBe( + 'class Example {\n constructor() {\n this.value = 0\n }\n\n getValue() {\n // Add logging\n console.log("Getting value")\n return this.value\n }\n}\n', + ) + } + }) - it("should preserve whitespace exactly in the output", async () => { - const originalContent = " indented\n more indented\n back\n" - const diffContent = `test.ts + it("should preserve whitespace exactly in the output", async () => { + const originalContent = " indented\n more indented\n back\n" + const diffContent = `test.ts <<<<<<< SEARCH indented more indented @@ -242,16 +290,16 @@ function hello() { end >>>>>>> REPLACE` - const result = await strategy.applyDiff(originalContent, diffContent) - expect(result.success).toBe(true) - if (result.success) { - expect(result.content).toBe(" modified\n still indented\n end\n") - } - }) + const result = await strategy.applyDiff(originalContent, diffContent) + expect(result.success).toBe(true) + if (result.success) { + expect(result.content).toBe(" modified\n still indented\n end\n") + } + }) - it("should preserve indentation when adding new lines after existing content", async () => { - const originalContent = " onScroll={() => updateHighlights()}" - const diffContent = `test.ts + it("should preserve indentation when adding new lines after existing content", async () => { + const originalContent = " onScroll={() => updateHighlights()}" + const diffContent = `test.ts <<<<<<< SEARCH onScroll={() => updateHighlights()} ======= @@ -262,17 +310,17 @@ function hello() { }} >>>>>>> REPLACE` - const result = await strategy.applyDiff(originalContent, diffContent) - expect(result.success).toBe(true) - if (result.success) { - expect(result.content).toBe( - " onScroll={() => updateHighlights()}\n onDragOver={(e) => {\n e.preventDefault()\n e.stopPropagation()\n }}", - ) - } - }) + const result = await strategy.applyDiff(originalContent, diffContent) + expect(result.success).toBe(true) + if (result.success) { + expect(result.content).toBe( + " onScroll={() => updateHighlights()}\n onDragOver={(e) => {\n e.preventDefault()\n e.stopPropagation()\n }}", + ) + } + }) - it("should handle varying indentation levels correctly", async () => { - const originalContent = ` + it("should handle varying indentation levels correctly", async () => { + const originalContent = ` class Example { constructor() { this.value = 0; @@ -282,7 +330,7 @@ class Example { } }`.trim() - const diffContent = `test.ts + const diffContent = `test.ts <<<<<<< SEARCH class Example { constructor() { @@ -305,11 +353,11 @@ class Example { } >>>>>>> REPLACE`.trim() - const result = await strategy.applyDiff(originalContent, diffContent) - expect(result.success).toBe(true) - if (result.success) { - expect(result.content).toBe( - ` + const result = await strategy.applyDiff(originalContent, diffContent) + expect(result.success).toBe(true) + if (result.success) { + expect(result.content).toBe( + ` class Example { constructor() { this.value = 1; @@ -320,12 +368,12 @@ class Example { } } }`.trim(), - ) - } - }) + ) + } + }) - it("should handle mixed indentation styles in the same file", async () => { - const originalContent = `class Example { + it("should handle mixed indentation styles in the same file", async () => { + const originalContent = `class Example { constructor() { this.value = 0; if (true) { @@ -333,7 +381,7 @@ class Example { } } }`.trim() - const diffContent = `test.ts + const diffContent = `test.ts <<<<<<< SEARCH constructor() { this.value = 0; @@ -351,10 +399,10 @@ class Example { } >>>>>>> REPLACE` - const result = await strategy.applyDiff(originalContent, diffContent) - expect(result.success).toBe(true) - if (result.success) { - expect(result.content).toBe(`class Example { + const result = await strategy.applyDiff(originalContent, diffContent) + expect(result.success).toBe(true) + if (result.success) { + expect(result.content).toBe(`class Example { constructor() { this.value = 1; if (true) { @@ -363,17 +411,17 @@ class Example { } } }`) - } - }) + } + }) - it("should handle Python-style significant whitespace", async () => { - const originalContent = `def example(): + it("should handle Python-style significant whitespace", async () => { + const originalContent = `def example(): if condition: do_something() for item in items: process(item) return True`.trim() - const diffContent = `test.ts + const diffContent = `test.ts <<<<<<< SEARCH if condition: do_something() @@ -387,28 +435,28 @@ class Example { process(item) >>>>>>> REPLACE` - const result = await strategy.applyDiff(originalContent, diffContent) - expect(result.success).toBe(true) - if (result.success) { - expect(result.content).toBe(`def example(): + const result = await strategy.applyDiff(originalContent, diffContent) + expect(result.success).toBe(true) + if (result.success) { + expect(result.content).toBe(`def example(): if condition: do_something() while items: item = items.pop() process(item) return True`) - } - }) + } + }) - it("should preserve empty lines with indentation", async () => { - const originalContent = `function test() { + it("should preserve empty lines with indentation", async () => { + const originalContent = `function test() { const x = 1; if (x) { return true; } }`.trim() - const diffContent = `test.ts + const diffContent = `test.ts <<<<<<< SEARCH const x = 1; @@ -420,10 +468,10 @@ class Example { if (x) { >>>>>>> REPLACE` - const result = await strategy.applyDiff(originalContent, diffContent) - expect(result.success).toBe(true) - if (result.success) { - expect(result.content).toBe(`function test() { + const result = await strategy.applyDiff(originalContent, diffContent) + expect(result.success).toBe(true) + if (result.success) { + expect(result.content).toBe(`function test() { const x = 1; // Check x @@ -431,18 +479,18 @@ class Example { return true; } }`) - } - }) + } + }) - it("should handle indentation when replacing entire blocks", async () => { - const originalContent = `class Test { + it("should handle indentation when replacing entire blocks", async () => { + const originalContent = `class Test { method() { if (true) { console.log("test"); } } }`.trim() - const diffContent = `test.ts + const diffContent = `test.ts <<<<<<< SEARCH method() { if (true) { @@ -461,10 +509,10 @@ class Example { } >>>>>>> REPLACE` - const result = await strategy.applyDiff(originalContent, diffContent) - expect(result.success).toBe(true) - if (result.success) { - expect(result.content).toBe(`class Test { + const result = await strategy.applyDiff(originalContent, diffContent) + expect(result.success).toBe(true) + if (result.success) { + expect(result.content).toBe(`class Test { method() { try { if (true) { @@ -475,11 +523,11 @@ class Example { } } }`) - } - }) + } + }) - it("should handle negative indentation relative to search content", async () => { - const originalContent = `class Example { + it("should handle negative indentation relative to search content", async () => { + const originalContent = `class Example { constructor() { if (true) { this.init(); @@ -487,7 +535,7 @@ class Example { } } }`.trim() - const diffContent = `test.ts + const diffContent = `test.ts <<<<<<< SEARCH this.init(); this.setup(); @@ -496,10 +544,10 @@ class Example { this.setup(); >>>>>>> REPLACE` - const result = await strategy.applyDiff(originalContent, diffContent) - expect(result.success).toBe(true) - if (result.success) { - expect(result.content).toBe(`class Example { + const result = await strategy.applyDiff(originalContent, diffContent) + expect(result.success).toBe(true) + if (result.success) { + expect(result.content).toBe(`class Example { constructor() { if (true) { this.init(); @@ -507,39 +555,39 @@ class Example { } } }`) - } - }) + } + }) - it("should handle extreme negative indentation (no indent)", async () => { - const originalContent = `class Example { + it("should handle extreme negative indentation (no indent)", async () => { + const originalContent = `class Example { constructor() { if (true) { this.init(); } } }`.trim() - const diffContent = `test.ts + const diffContent = `test.ts <<<<<<< SEARCH this.init(); ======= this.init(); >>>>>>> REPLACE` - const result = await strategy.applyDiff(originalContent, diffContent) - expect(result.success).toBe(true) - if (result.success) { - expect(result.content).toBe(`class Example { + const result = await strategy.applyDiff(originalContent, diffContent) + expect(result.success).toBe(true) + if (result.success) { + expect(result.content).toBe(`class Example { constructor() { if (true) { this.init(); } } }`) - } - }) + } + }) - it("should handle mixed indentation changes in replace block", async () => { - const originalContent = `class Example { + it("should handle mixed indentation changes in replace block", async () => { + const originalContent = `class Example { constructor() { if (true) { this.init(); @@ -548,7 +596,7 @@ this.init(); } } }`.trim() - const diffContent = `test.ts + const diffContent = `test.ts <<<<<<< SEARCH this.init(); this.setup(); @@ -559,10 +607,10 @@ this.init(); this.validate(); >>>>>>> REPLACE` - const result = await strategy.applyDiff(originalContent, diffContent) - expect(result.success).toBe(true) - if (result.success) { - expect(result.content).toBe(`class Example { + const result = await strategy.applyDiff(originalContent, diffContent) + expect(result.success).toBe(true) + if (result.success) { + expect(result.content).toBe(`class Example { constructor() { if (true) { this.init(); @@ -571,11 +619,11 @@ this.init(); } } }`) - } - }) + } + }) - it("should find matches from middle out", async () => { - const originalContent = ` + it("should find matches from middle out", async () => { + const originalContent = ` function one() { return "target"; } @@ -596,20 +644,20 @@ function five() { return "target"; }`.trim() - const diffContent = `test.ts + const diffContent = `test.ts <<<<<<< SEARCH return "target"; ======= return "updated"; >>>>>>> REPLACE` - // Search around the middle (function three) - // Even though all functions contain the target text, - // it should match the one closest to line 9 first - const result = await strategy.applyDiff(originalContent, diffContent, 9, 9) - expect(result.success).toBe(true) - if (result.success) { - expect(result.content).toBe(`function one() { + // Search around the middle (function three) + // Even though all functions contain the target text, + // it should match the one closest to line 9 first + const result = await strategy.applyDiff(originalContent, diffContent, 9, 9) + expect(result.success).toBe(true) + if (result.success) { + expect(result.content).toBe(`function one() { return "target"; } @@ -628,21 +676,21 @@ function four() { function five() { return "target"; }`) - } + } + }) }) - }) - describe("line number stripping", () => { describe("line number stripping", () => { - let strategy: MultiSearchReplaceDiffStrategy + describe("line number stripping", () => { + let strategy: MultiSearchReplaceDiffStrategy - beforeEach(() => { - strategy = new MultiSearchReplaceDiffStrategy() - }) + beforeEach(() => { + strategy = new MultiSearchReplaceDiffStrategy() + }) - it("should strip line numbers from both search and replace sections", async () => { - const originalContent = "function test() {\n return true;\n}\n" - const diffContent = `test.ts + it("should strip line numbers from both search and replace sections", async () => { + const originalContent = "function test() {\n return true;\n}\n" + const diffContent = `test.ts <<<<<<< SEARCH 1 | function test() { 2 | return true; @@ -653,16 +701,16 @@ function five() { 3 | } >>>>>>> REPLACE` - const result = await strategy.applyDiff(originalContent, diffContent) - expect(result.success).toBe(true) - if (result.success) { - expect(result.content).toBe("function test() {\n return false;\n}\n") - } - }) + const result = await strategy.applyDiff(originalContent, diffContent) + expect(result.success).toBe(true) + if (result.success) { + expect(result.content).toBe("function test() {\n return false;\n}\n") + } + }) - it("should strip line numbers with leading spaces", async () => { - const originalContent = "function test() {\n return true;\n}\n" - const diffContent = `test.ts + it("should strip line numbers with leading spaces", async () => { + const originalContent = "function test() {\n return true;\n}\n" + const diffContent = `test.ts <<<<<<< SEARCH 1 | function test() { 2 | return true; @@ -673,16 +721,16 @@ function five() { 3 | } >>>>>>> REPLACE` - const result = await strategy.applyDiff(originalContent, diffContent) - expect(result.success).toBe(true) - if (result.success) { - expect(result.content).toBe("function test() {\n return false;\n}\n") - } - }) + const result = await strategy.applyDiff(originalContent, diffContent) + expect(result.success).toBe(true) + if (result.success) { + expect(result.content).toBe("function test() {\n return false;\n}\n") + } + }) - it("should not strip when not all lines have numbers in either section", async () => { - const originalContent = "function test() {\n return true;\n}\n" - const diffContent = `test.ts + it("should not strip when not all lines have numbers in either section", async () => { + const originalContent = "function test() {\n return true;\n}\n" + const diffContent = `test.ts <<<<<<< SEARCH 1 | function test() { 2 | return true; @@ -693,13 +741,13 @@ function five() { 3 | } >>>>>>> REPLACE` - const result = await strategy.applyDiff(originalContent, diffContent) - expect(result.success).toBe(false) - }) + const result = await strategy.applyDiff(originalContent, diffContent) + expect(result.success).toBe(false) + }) - it("should preserve content that naturally starts with pipe", async () => { - const originalContent = "|header|another|\n|---|---|\n|data|more|\n" - const diffContent = `test.ts + it("should preserve content that naturally starts with pipe", async () => { + const originalContent = "|header|another|\n|---|---|\n|data|more|\n" + const diffContent = `test.ts <<<<<<< SEARCH 1 | |header|another| 2 | |---|---| @@ -710,16 +758,16 @@ function five() { 3 | |data|updated| >>>>>>> REPLACE` - const result = await strategy.applyDiff(originalContent, diffContent) - expect(result.success).toBe(true) - if (result.success) { - expect(result.content).toBe("|header|another|\n|---|---|\n|data|updated|\n") - } - }) + const result = await strategy.applyDiff(originalContent, diffContent) + expect(result.success).toBe(true) + if (result.success) { + expect(result.content).toBe("|header|another|\n|---|---|\n|data|updated|\n") + } + }) - it("should preserve indentation when stripping line numbers", async () => { - const originalContent = " function test() {\n return true;\n }\n" - const diffContent = `test.ts + it("should preserve indentation when stripping line numbers", async () => { + const originalContent = " function test() {\n return true;\n }\n" + const diffContent = `test.ts <<<<<<< SEARCH 1 | function test() { 2 | return true; @@ -730,16 +778,16 @@ function five() { 3 | } >>>>>>> REPLACE` - const result = await strategy.applyDiff(originalContent, diffContent) - expect(result.success).toBe(true) - if (result.success) { - expect(result.content).toBe(" function test() {\n return false;\n }\n") - } - }) + const result = await strategy.applyDiff(originalContent, diffContent) + expect(result.success).toBe(true) + if (result.success) { + expect(result.content).toBe(" function test() {\n return false;\n }\n") + } + }) - it("should handle different line numbers between sections", async () => { - const originalContent = "function test() {\n return true;\n}\n" - const diffContent = `test.ts + it("should handle different line numbers between sections", async () => { + const originalContent = "function test() {\n return true;\n}\n" + const diffContent = `test.ts <<<<<<< SEARCH 10 | function test() { 11 | return true; @@ -750,11 +798,563 @@ function five() { 22 | } >>>>>>> REPLACE` - const result = await strategy.applyDiff(originalContent, diffContent) - expect(result.success).toBe(true) - if (result.success) { - expect(result.content).toBe("function test() {\n return false;\n}\n") - } + const result = await strategy.applyDiff(originalContent, diffContent) + expect(result.success).toBe(true) + if (result.success) { + expect(result.content).toBe("function test() {\n return false;\n}\n") + } + }) + + it("detects search marker when expecting replace", () => { + const diff = "<<<<<<< SEARCH\n" + "content\n" + "=======\n" + "new content\n" + "<<<<<<< SEARCH" + const result = strategy["validateMarkerSequencing"](diff) + expect(result.success).toBe(false) + expect(result.error).toContain("'<<<<<<< SEARCH' found in your diff content") + }) + + it("allows escaped search marker in content", () => { + const diff = + "<<<<<<< SEARCH\n" + + "before\n" + + "\\<<<<<<< SEARCH\n" + + "after\n" + + "=======\n" + + "new content\n" + + ">>>>>>> REPLACE" + const result = strategy["validateMarkerSequencing"](diff) + expect(result.success).toBe(true) + }) + + it("allows escaped separator in content", () => { + const diff = + "<<<<<<< SEARCH\n" + + "before\n" + + "\\=======\n" + + "after\n" + + "=======\n" + + "new content\n" + + ">>>>>>> REPLACE" + const result = strategy["validateMarkerSequencing"](diff) + expect(result.success).toBe(true) + }) + + it("processes escaped search marker in content", async () => { + const originalContent = "before\n<<<<<<< SEARCH\nafter\n" + const diffContent = + "<<<<<<< SEARCH\n" + + "before\n" + + "\\<<<<<<< SEARCH\n" + + "after\n" + + "=======\n" + + "unchanged\n" + + ">>>>>>> REPLACE" + const result = await strategy.applyDiff(originalContent, diffContent) + expect(result.success).toBe(true) + if (result.success) { + expect(result.content).toBe("unchanged\n") + } + }) + + it("processes escaped separator in content", async () => { + const originalContent = "before\n=======\nafter\n" + const diffContent = + "<<<<<<< SEARCH\n" + + "before\n" + + "\\=======\n" + + "after\n" + + "=======\n" + + "unchanged\n" + + ">>>>>>> REPLACE" + const result = await strategy.applyDiff(originalContent, diffContent) + expect(result.success).toBe(true) + if (result.success) { + expect(result.content).toBe("unchanged\n") + } + }) + + it("processes escaped search marker in content", async () => { + const originalContent = "before\n<<<<<<< SEARCH\nafter\n" + const diffContent = + "<<<<<<< SEARCH\n" + + "before\n" + + "\\<<<<<<< SEARCH\n" + + "after\n" + + "=======\n" + + "unchanged\n" + + ">>>>>>> REPLACE" + const result = await strategy.applyDiff(originalContent, diffContent) + expect(result.success).toBe(true) + if (result.success) { + expect(result.content).toBe("unchanged\n") + } + }) + + it("processes escaped separator in content", async () => { + const originalContent = "before\n=======\nafter\n" + const diffContent = + "<<<<<<< SEARCH\n" + + "before\n" + + "\\=======\n" + + "after\n" + + "=======\n" + + "unchanged\n" + + ">>>>>>> REPLACE" + const result = await strategy.applyDiff(originalContent, diffContent) + expect(result.success).toBe(true) + if (result.success) { + expect(result.content).toBe("unchanged\n") + } + }) + + it("processes escaped search marker in content", async () => { + const originalContent = "before\n<<<<<<< SEARCH\nafter\n" + const diffContent = + "test.ts\n" + + "<<<<<<< SEARCH\n" + + "before\n" + + "\\<<<<<<< SEARCH\n" + + "after\n" + + "=======\n" + + "unchanged\n" + + ">>>>>>> REPLACE" + const result = await strategy.applyDiff(originalContent, diffContent) + expect(result.success).toBe(true) + if (result.success) { + expect(result.content).toBe("unchanged\n") + } + }) + + it("processes escaped search marker in content", async () => { + const originalContent = "before\n<<<<<<< SEARCH\nafter\n" + const diffContent = + "test.ts\n" + + "<<<<<<< SEARCH\n" + + "before\n" + + "\\<<<<<<< SEARCH\n" + + "after\n" + + "=======\n" + + "unchanged\n" + + ">>>>>>> REPLACE" + const result = await strategy.applyDiff(originalContent, diffContent) + expect(result.success).toBe(true) + if (result.success) { + expect(result.content).toBe("unchanged\n") + } + }) + + it("processes escaped separator in content", async () => { + const originalContent = "before\n=======\nafter\n" + const diffContent = + "<<<<<<< SEARCH\n" + + "before\n" + + "\\=======\n" + + "after\n" + + "=======\n" + + "unchanged\n" + + ">>>>>>> REPLACE" + const result = await strategy.applyDiff(originalContent, diffContent) + expect(result.success).toBe(true) + if (result.success) { + expect(result.content).toBe("unchanged\n") + } + }) + + it("processes escaped search marker in content", async () => { + const originalContent = "before\n<<<<<<< SEARCH\nafter\n" + const diffContent = + "<<<<<<< SEARCH\n" + + "before\n" + + "\\<<<<<<< SEARCH\n" + + "after\n" + + "=======\n" + + "unchanged\n" + + ">>>>>>> REPLACE" + const result = await strategy.applyDiff(originalContent, diffContent) + expect(result.success).toBe(true) + if (result.success) { + expect(result.content).toBe("unchanged\n") + } + }) + + it("processes escaped search marker in content", async () => { + const originalContent = "before\n<<<<<<< SEARCH\nafter\n" + const diffContent = + "<<<<<<< SEARCH\n" + + "before\n" + + "\\<<<<<<< SEARCH\n" + + "after\n" + + "=======\n" + + "unchanged\n" + + ">>>>>>> REPLACE" + const result = await strategy.applyDiff(originalContent, diffContent) + expect(result.success).toBe(true) + if (result.success) { + expect(result.content).toBe("unchanged\n") + } + }) + + it("processes escaped search marker in content", async () => { + const originalContent = "before\n<<<<<<< SEARCH\nafter\n" + const diffContent = + "<<<<<<< SEARCH\n" + + "before\n" + + "\\<<<<<<< SEARCH\n" + + "after\n" + + "=======\n" + + "unchanged\n" + + ">>>>>>> REPLACE" + const result = await strategy.applyDiff(originalContent, diffContent) + expect(result.success).toBe(true) + if (result.success) { + expect(result.content).toBe("unchanged\n") + } + }) + + it("processes escaped separator in content", async () => { + const originalContent = "before\n=======\nafter\n" + const diffContent = + "<<<<<<< SEARCH\n" + + "before\n" + + "\\=======\n" + + "after\n" + + "=======\n" + + "unchanged\n" + + ">>>>>>> REPLACE" + const result = await strategy.applyDiff(originalContent, diffContent) + expect(result.success).toBe(true) + if (result.success) { + expect(result.content).toBe("unchanged\n") + } + }) + + it("allows escaped search marker in content", () => { + const diff = + "<<<<<<< SEARCH\n" + + "before\n" + + "\\<<<<<<< SEARCH\n" + + "after\n" + + "=======\n" + + "new content\n" + + ">>>>>>> REPLACE" + expect(strategy["validateMarkerSequencing"](diff).success).toBe(true) + }) + + it("allows escaped separator in content", () => { + const diff = + "<<<<<<< SEARCH\n" + + "before\n" + + "\\=======\n" + + "after\n" + + "=======\n" + + "new content\n" + + ">>>>>>> REPLACE" + expect(strategy["validateMarkerSequencing"](diff).success).toBe(true) + }) + + it("allows escaped search marker in content", () => { + const diff = + "<<<<<<< SEARCH\n" + + "before\n" + + "\\<<<<<<< SEARCH\n" + + "after\n" + + "=======\n" + + "new content\n" + + ">>>>>>> REPLACE" + expect(strategy["validateMarkerSequencing"](diff).success).toBe(true) + }) + + it("allows escaped search marker in content", () => { + const diff = + "<<<<<<< SEARCH\n" + + "before\n" + + "\\<<<<<<< SEARCH\n" + + "after\n" + + "=======\n" + + "new content\n" + + ">>>>>>> REPLACE" + expect(strategy["validateMarkerSequencing"](diff).success).toBe(true) + }) + + it("allows escaped separator in content", () => { + const diff = + "<<<<<<< SEARCH\n" + + "before\n" + + "\\=======\n" + + "after\n" + + "=======\n" + + "new content\n" + + ">>>>>>> REPLACE" + expect(strategy["validateMarkerSequencing"](diff).success).toBe(true) + }) + + it("allows escaped replace marker in content", () => { + const diff = + "<<<<<<< SEARCH\n" + + "before\n" + + "\\>>>>>>> REPLACE\n" + + "after\n" + + "=======\n" + + "new content\n" + + ">>>>>>> REPLACE" + expect(strategy["validateMarkerSequencing"](diff).success).toBe(true) + }) + + it("allows escaped separator in content", () => { + const diff = + "<<<<<<< SEARCH\n" + + "before\n" + + "\\=======\n" + + "after\n" + + "=======\n" + + "new content\n" + + ">>>>>>> REPLACE" + expect(strategy["validateMarkerSequencing"](diff).success).toBe(true) + }) + + it("allows escaped replace marker in content", () => { + const diff = + "<<<<<<< SEARCH\n" + + "before\n" + + "\\>>>>>>> REPLACE\n" + + "after\n" + + "=======\n" + + "new content\n" + + ">>>>>>> REPLACE" + expect(strategy["validateMarkerSequencing"](diff).success).toBe(true) + }) + + it("allows escaped replace marker in content", () => { + const diff = + "<<<<<<< SEARCH\n" + + "before\n" + + "\\>>>>>>> REPLACE\n" + + "after\n" + + "=======\n" + + "new content\n" + + ">>>>>>> REPLACE" + expect(strategy["validateMarkerSequencing"](diff).success).toBe(true) + }) + + it("processes escaped search marker in content", async () => { + const originalContent = "before\n<<<<<<< SEARCH\nafter\n" + const diffContent = + "<<<<<<< SEARCH\n" + + "before\n" + + "\\<<<<<<< SEARCH\n" + + "after\n" + + "=======\n" + + "replaced content\n" + + ">>>>>>> REPLACE" + const result = await strategy.applyDiff(originalContent, diffContent) + expect(result.success).toBe(true) + if (result.success) { + expect(result.content).toBe("replaced content\n") + } + }) + + it("processes escaped replace marker in content", async () => { + const originalContent = "before\n>>>>>>> REPLACE\nafter\n" + const diffContent = + "<<<<<<< SEARCH\n" + + "before\n" + + "\\>>>>>>> REPLACE\n" + + "after\n" + + "=======\n" + + "unchanged\n" + + ">>>>>>> REPLACE" + const result = await strategy.applyDiff(originalContent, diffContent) + expect(result.success).toBe(true) + if (result.success) { + expect(result.content).toBe("unchanged\n") + } + }) + + it("processes multiple escaped markers in content", async () => { + const originalContent = "<<<<<<< SEARCH\n=======\n>>>>>>> REPLACE\n" + const diffContent = + "<<<<<<< SEARCH\n" + + "\\<<<<<<< SEARCH\n" + + "\\=======\n" + + "\\>>>>>>> REPLACE\n" + + "=======\n" + + "unchanged\n" + + ">>>>>>> REPLACE" + const result = await strategy.applyDiff(originalContent, diffContent) + expect(result.success).toBe(true) + if (result.success) { + expect(result.content).toBe("unchanged\n") + } + }) + + it("processes escaped separator in content", async () => { + const originalContent = "before\n=======\nafter\n" + const diffContent = + "<<<<<<< SEARCH\n" + + "before\n" + + "\\=======\n" + + "after\n" + + "=======\n" + + "unchanged\n" + + ">>>>>>> REPLACE" + const result = await strategy.applyDiff(originalContent, diffContent) + expect(result.success).toBe(true) + if (result.success) { + expect(result.content).toBe("unchanged\n") + } + }) + + it("processes escaped search marker in content", async () => { + const originalContent = "before\n<<<<<<< SEARCH\nafter\n" + const diffContent = + "<<<<<<< SEARCH\n" + + "before\n" + + "\\<<<<<<< SEARCH\n" + + "after\n" + + "=======\n" + + "unchanged\n" + + ">>>>>>> REPLACE" + const result = await strategy.applyDiff(originalContent, diffContent) + expect(result.success).toBe(true) + if (result.success) { + expect(result.content).toBe("unchanged\n") + } + }) + + it("processes escaped replace marker in content", async () => { + const originalContent = "before\n>>>>>>> REPLACE\nafter\n" + const diffContent = + "<<<<<<< SEARCH\n" + + "before\n" + + "\\>>>>>>> REPLACE\n" + + "after\n" + + "=======\n" + + "unchanged\n" + + ">>>>>>> REPLACE" + const result = await strategy.applyDiff(originalContent, diffContent) + expect(result.success).toBe(true) + if (result.success) { + expect(result.content).toBe("unchanged\n") + } + }) + + it("processes escaped separator in content", async () => { + const originalContent = "before\n=======\nafter\n" + const diffContent = + "test.ts\n" + + "<<<<<<< SEARCH\n" + + "before\n" + + "\\=======\n" + + "after\n" + + "=======\n" + + "unchanged\n" + + ">>>>>>> REPLACE" + const result = await strategy.applyDiff(originalContent, diffContent) + expect(result.success).toBe(true) + if (result.success) { + expect(result.content).toBe("unchanged\n") + } + }) + + it("processes escaped replace marker in content", async () => { + const originalContent = "before\n>>>>>>> REPLACE\nafter\n" + const diffContent = + "<<<<<<< SEARCH\n" + + "before\n" + + "\\>>>>>>> REPLACE\n" + + "after\n" + + "=======\n" + + "unchanged\n" + + ">>>>>>> REPLACE" + const result = await strategy.applyDiff(originalContent, diffContent) + expect(result.success).toBe(true) + if (result.success) { + expect(result.content).toBe("unchanged\n") + } + }) + + it("processes multiple escaped markers in content", async () => { + const originalContent = "<<<<<<< SEARCH\n=======\n>>>>>>> REPLACE\n" + const diffContent = + "<<<<<<< SEARCH\n" + + "\\<<<<<<< SEARCH\n" + + "\\=======\n" + + "\\>>>>>>> REPLACE\n" + + "=======\n" + + "unchanged\n" + + ">>>>>>> REPLACE" + const result = await strategy.applyDiff(originalContent, diffContent) + expect(result.success).toBe(true) + if (result.success) { + expect(result.content).toBe("unchanged\n") + } + }) + + it("processes escaped replace marker in content", async () => { + const originalContent = "before\n>>>>>>> REPLACE\nafter\n" + const diffContent = + "<<<<<<< SEARCH\n" + + "before\n" + + "\\>>>>>>> REPLACE\n" + + "after\n" + + "=======\n" + + "unchanged\n" + + ">>>>>>> REPLACE" + const result = await strategy.applyDiff(originalContent, diffContent) + expect(result.success).toBe(true) + if (result.success) { + expect(result.content).toBe("unchanged\n") + } + }) + + it("processes multiple escaped markers in content", async () => { + const originalContent = "<<<<<<< SEARCH\n=======\n>>>>>>> REPLACE\n" + const diffContent = + "<<<<<<< SEARCH\n" + + "\\<<<<<<< SEARCH\n" + + "\\=======\n" + + "\\>>>>>>> REPLACE\n" + + "=======\n" + + "unchanged\n" + + ">>>>>>> REPLACE" + const result = await strategy.applyDiff(originalContent, diffContent) + expect(result.success).toBe(true) + if (result.success) { + expect(result.content).toBe("unchanged\n") + } + }) + + it("allows escaped replace marker in content", () => { + const diff = + "<<<<<<< SEARCH\n" + + "before\n" + + "\\>>>>>>> REPLACE\n" + + "after\n" + + "=======\n" + + "new content\n" + + ">>>>>>> REPLACE" + const result = strategy["validateMarkerSequencing"](diff) + expect(result.success).toBe(true) + }) + + it("allows multiple escaped markers in content", () => { + const diff = + "<<<<<<< SEARCH\n" + + "\\<<<<<<< SEARCH\n" + + "\\=======\n" + + "\\>>>>>>> REPLACE\n" + + "=======\n" + + "new content\n" + + ">>>>>>> REPLACE" + const result = strategy["validateMarkerSequencing"](diff) + expect(result.success).toBe(true) + }) + + it("detects separator when expecting replace", () => { + const diff = "<<<<<<< SEARCH\n" + "content\n" + "=======\n" + "new content\n" + "=======" + const result = strategy["validateMarkerSequencing"](diff) + expect(result.success).toBe(false) + expect(result.error).toContain("'=======' found in your diff content") + }) }) it("should not strip content that starts with pipe but no line number", async () => { @@ -980,7 +1580,6 @@ function test() { :end_line:4 ------- ======= - // End of file >>>>>>> REPLACE` @@ -990,7 +1589,6 @@ function test() { expect(result.content).toBe(`function test() { return true; } - // End of file`) } }) diff --git a/src/core/diff/strategies/multi-search-replace.ts b/src/core/diff/strategies/multi-search-replace.ts index ad12448d046..bf80f090528 100644 --- a/src/core/diff/strategies/multi-search-replace.ts +++ b/src/core/diff/strategies/multi-search-replace.ts @@ -73,6 +73,7 @@ Diff format: \`\`\` + Example: Original file: @@ -128,6 +129,7 @@ def calculate_sum(items): >>>>>>> REPLACE \`\`\` + Usage: File path here @@ -139,22 +141,140 @@ Only use a single line of '=======' between search and replacement content, beca ` } + private unescapeMarkers(content: string): string { + return content + .replace(/^\\<<<<<<< SEARCH/gm, "<<<<<<< SEARCH") + .replace(/^\\=======/gm, "=======") + .replace(/^\\>>>>>>> REPLACE/gm, ">>>>>>> REPLACE") + .replace(/^\\-------/gm, "-------") + .replace(/^\\:end_line:/gm, ":end_line:") + .replace(/^\\:start_line:/gm, ":start_line:") + } + + private validateMarkerSequencing(diffContent: string): { success: boolean; error?: string } { + enum State { + START, + AFTER_SEARCH, + AFTER_SEPARATOR, + } + const state = { current: State.START, line: 0 } + + const SEARCH = "<<<<<<< SEARCH" + const SEP = "=======" + const REPLACE = ">>>>>>> REPLACE" + + const reportError = (found: string, expected: string) => ({ + success: false, + error: + `ERROR: Special marker '${found}' found in your diff content at line ${state.line}:\n` + + "\n" + + `When removing merge conflict markers like '${found}' from files, you MUST escape them\n` + + "in your SEARCH section by prepending a backslash (\\) at the beginning of the line:\n" + + "\n" + + "CORRECT FORMAT:\n\n" + + "<<<<<<< SEARCH\n" + + "content before\n" + + `\\${found} <-- Note the backslash here in this example\n` + + "content after\n" + + "=======\n" + + "replacement content\n" + + ">>>>>>> REPLACE\n" + + "\n" + + "Without escaping, the system confuses your content with diff syntax markers.\n" + + "You may use multiple diff blocks in a single diff request, but ANY of ONLY the following separators that occur within SEARCH or REPLACE content must be escaped, as follows:\n" + + `\\${SEARCH}\n` + + `\\${SEP}\n` + + `\\${REPLACE}\n`, + }) + + for (const line of diffContent.split("\n")) { + state.line++ + const marker = line.trim() + + switch (state.current) { + case State.START: + if (marker === SEP) return reportError(SEP, SEARCH) + if (marker === REPLACE) return reportError(REPLACE, SEARCH) + if (marker === SEARCH) state.current = State.AFTER_SEARCH + break + + case State.AFTER_SEARCH: + if (marker === SEARCH) return reportError(SEARCH, SEP) + if (marker === REPLACE) return reportError(REPLACE, SEP) + if (marker === SEP) state.current = State.AFTER_SEPARATOR + break + + case State.AFTER_SEPARATOR: + if (marker === SEARCH) return reportError(SEARCH, REPLACE) + if (marker === SEP) return reportError(SEP, REPLACE) + if (marker === REPLACE) state.current = State.START + break + } + } + + return state.current === State.START + ? { success: true } + : { + success: false, + error: `ERROR: Unexpected end of sequence: Expected '${state.current === State.AFTER_SEARCH ? SEP : REPLACE}' was not found.`, + } + } + async applyDiff( originalContent: string, diffContent: string, _paramStartLine?: number, _paramEndLine?: number, ): Promise { + const validseq = this.validateMarkerSequencing(diffContent) + if (!validseq.success) { + return { + success: false, + error: validseq.error!, + } + } + + /* + Regex parts: + + 1. (?:^|\n) +   Ensures the first marker starts at the beginning of the file or right after a newline. + + 2. (?>>>>>> REPLACE)(?=\n|$) +   Matches the final “>>>>>>> REPLACE” marker on its own line (and requires a following newline or the end of file). + */ + let matches = [ ...diffContent.matchAll( - /<<<<<<< SEARCH\n(:start_line:\s*(\d+)\n){0,1}(:end_line:\s*(\d+)\n){0,1}(-------\n){0,1}([\s\S]*?)\n?=======\n([\s\S]*?)\n?>>>>>>> REPLACE/g, + /(?:^|\n)(?>>>>>> REPLACE)(?=\n|$)/g, ), ] if (matches.length === 0) { return { success: false, - error: `Invalid diff format - missing required sections\n\nDebug Info:\n- Expected Format: <<<<<<< SEARCH\\n:start_line: start line\\n:end_line: end line\\n-------\\n[search content]\\n=======\\n[replace content]\\n>>>>>>> REPLACE\n- Tip: Make sure to include start_line/end_line/SEARCH/REPLACE sections with correct markers`, + error: `Invalid diff format - missing required sections\n\nDebug Info:\n- Expected Format: <<<<<<< SEARCH\\n:start_line: start line\\n:end_line: end line\\n-------\\n[search content]\\n=======\\n[replace content]\\n>>>>>>> REPLACE\n- Tip: Make sure to include start_line/end_line/SEARCH/=======/REPLACE sections with correct markers on new lines`, } } // Detect line ending from original content @@ -176,12 +296,29 @@ Only use a single line of '=======' between search and replacement content, beca startLine += startLine === 0 ? 0 : delta endLine += delta + // First unescape any escaped markers in the content + searchContent = this.unescapeMarkers(searchContent) + replaceContent = this.unescapeMarkers(replaceContent) + // Strip line numbers from search and replace content if every line starts with a line number if (everyLineHasLineNumbers(searchContent) && everyLineHasLineNumbers(replaceContent)) { searchContent = stripLineNumbers(searchContent) replaceContent = stripLineNumbers(replaceContent) } + // Validate that search and replace content are not identical + if (searchContent === replaceContent) { + diffResults.push({ + success: false, + error: + `Search and replace content are identical - no changes would be made\n\n` + + `Debug Info:\n` + + `- Search and replace must be different to make changes\n` + + `- Use read_file to verify the content you want to change`, + }) + continue + } + // Split content into lines, handling both \n and \r\n const searchLines = searchContent === "" ? [] : searchContent.split(/\r?\n/) const replaceLines = replaceContent === "" ? [] : replaceContent.split(/\r?\n/) diff --git a/src/core/mentions/index.ts b/src/core/mentions/index.ts index 57bb40811ec..d32b1ec08d5 100644 --- a/src/core/mentions/index.ts +++ b/src/core/mentions/index.ts @@ -152,12 +152,12 @@ async function getFileOrFolderContent(mentionPath: string, cwd: string): Promise const stats = await fs.stat(absPath) if (stats.isFile()) { - const isBinary = await isBinaryFile(absPath).catch(() => false) - if (isBinary) { - return "(Binary file, unable to display content)" + try { + const content = await extractTextFromFile(absPath) + return content + } catch (error) { + return `(Failed to read contents of ${mentionPath}): ${error.message}` } - const content = await extractTextFromFile(absPath) - return content } else if (stats.isDirectory()) { const entries = await fs.readdir(absPath, { withFileTypes: true }) let folderContent = "" diff --git a/src/core/prompts/__tests__/__snapshots__/system.test.ts.snap b/src/core/prompts/__tests__/__snapshots__/system.test.ts.snap index 1bfc98ac0b4..2b869ee26e0 100644 --- a/src/core/prompts/__tests__/__snapshots__/system.test.ts.snap +++ b/src/core/prompts/__tests__/__snapshots__/system.test.ts.snap @@ -35,11 +35,13 @@ Parameters: - path: (required) The path of the file to read (relative to the current working directory /test/path) - start_line: (optional) The starting line number to read from (1-based). If not provided, it starts from the beginning of the file. - end_line: (optional) The ending line number to read to (1-based, inclusive). If not provided, it reads to the end of the file. +- auto_truncate: (optional) Whether to automatically truncate large files when start_line and end_line are not specified. If true and the file exceeds a certain line threshold, it will: a) return only a subset of lines to save tokens, b) include information about the total line count, and c) provide a summary of method definitions with their line ranges. You should set this to true unless you've been explicitly asked to read an entire large file at once, as this prevents context bloat that can lead to truncated responses. For backwards compatibility, it defaults to false when omitted. Usage: File path here Starting line number (optional) Ending line number (optional) +true or false (optional) Examples: @@ -68,9 +70,29 @@ Examples: 46 68 - Note: When both start_line and end_line are provided, this tool efficiently streams only the requested lines, making it suitable for processing large files like logs, CSV files, and other large datasets without memory issues. +5. Reading a large file with automatic truncation: + +src/large-module.ts +true + + +This will return a truncated version of the file with information about total line count and method definitions, helping to prevent context size issues with very large files. + +## fetch_instructions +Description: Request to fetch instructions to perform a task +Parameters: +- task: (required) The task to get instructions for. This can take the following values: + create_mcp_server + create_mode + +Example: Requesting instructions to create an MCP Server + + +create_mcp_server + + ## search_files Description: Request to perform a regex search across files in a specified directory, providing context-rich results. This tool searches for patterns or specific content across multiple files, displaying each match with encapsulating context. Parameters: @@ -412,11 +434,13 @@ Parameters: - path: (required) The path of the file to read (relative to the current working directory /test/path) - start_line: (optional) The starting line number to read from (1-based). If not provided, it starts from the beginning of the file. - end_line: (optional) The ending line number to read to (1-based, inclusive). If not provided, it reads to the end of the file. +- auto_truncate: (optional) Whether to automatically truncate large files when start_line and end_line are not specified. If true and the file exceeds a certain line threshold, it will: a) return only a subset of lines to save tokens, b) include information about the total line count, and c) provide a summary of method definitions with their line ranges. You should set this to true unless you've been explicitly asked to read an entire large file at once, as this prevents context bloat that can lead to truncated responses. For backwards compatibility, it defaults to false when omitted. Usage: File path here Starting line number (optional) Ending line number (optional) +true or false (optional) Examples: @@ -445,9 +469,29 @@ Examples: 46 68 - Note: When both start_line and end_line are provided, this tool efficiently streams only the requested lines, making it suitable for processing large files like logs, CSV files, and other large datasets without memory issues. +5. Reading a large file with automatic truncation: + +src/large-module.ts +true + + +This will return a truncated version of the file with information about total line count and method definitions, helping to prevent context size issues with very large files. + +## fetch_instructions +Description: Request to fetch instructions to perform a task +Parameters: +- task: (required) The task to get instructions for. This can take the following values: + create_mcp_server + create_mode + +Example: Requesting instructions to create an MCP Server + + +create_mcp_server + + ## search_files Description: Request to perform a regex search across files in a specified directory, providing context-rich results. This tool searches for patterns or specific content across multiple files, displaying each match with encapsulating context. Parameters: @@ -878,11 +922,13 @@ Parameters: - path: (required) The path of the file to read (relative to the current working directory /test/path) - start_line: (optional) The starting line number to read from (1-based). If not provided, it starts from the beginning of the file. - end_line: (optional) The ending line number to read to (1-based, inclusive). If not provided, it reads to the end of the file. +- auto_truncate: (optional) Whether to automatically truncate large files when start_line and end_line are not specified. If true and the file exceeds a certain line threshold, it will: a) return only a subset of lines to save tokens, b) include information about the total line count, and c) provide a summary of method definitions with their line ranges. You should set this to true unless you've been explicitly asked to read an entire large file at once, as this prevents context bloat that can lead to truncated responses. For backwards compatibility, it defaults to false when omitted. Usage: File path here Starting line number (optional) Ending line number (optional) +true or false (optional) Examples: @@ -911,9 +957,29 @@ Examples: 46 68 - Note: When both start_line and end_line are provided, this tool efficiently streams only the requested lines, making it suitable for processing large files like logs, CSV files, and other large datasets without memory issues. +5. Reading a large file with automatic truncation: + +src/large-module.ts +true + + +This will return a truncated version of the file with information about total line count and method definitions, helping to prevent context size issues with very large files. + +## fetch_instructions +Description: Request to fetch instructions to perform a task +Parameters: +- task: (required) The task to get instructions for. This can take the following values: + create_mcp_server + create_mode + +Example: Requesting instructions to create an MCP Server + + +create_mcp_server + + ## search_files Description: Request to perform a regex search across files in a specified directory, providing context-rich results. This tool searches for patterns or specific content across multiple files, displaying each match with encapsulating context. Parameters: @@ -1308,11 +1374,13 @@ Parameters: - path: (required) The path of the file to read (relative to the current working directory /test/path) - start_line: (optional) The starting line number to read from (1-based). If not provided, it starts from the beginning of the file. - end_line: (optional) The ending line number to read to (1-based, inclusive). If not provided, it reads to the end of the file. +- auto_truncate: (optional) Whether to automatically truncate large files when start_line and end_line are not specified. If true and the file exceeds a certain line threshold, it will: a) return only a subset of lines to save tokens, b) include information about the total line count, and c) provide a summary of method definitions with their line ranges. You should set this to true unless you've been explicitly asked to read an entire large file at once, as this prevents context bloat that can lead to truncated responses. For backwards compatibility, it defaults to false when omitted. Usage: File path here Starting line number (optional) Ending line number (optional) +true or false (optional) Examples: @@ -1341,9 +1409,29 @@ Examples: 46 68 - Note: When both start_line and end_line are provided, this tool efficiently streams only the requested lines, making it suitable for processing large files like logs, CSV files, and other large datasets without memory issues. +5. Reading a large file with automatic truncation: + +src/large-module.ts +true + + +This will return a truncated version of the file with information about total line count and method definitions, helping to prevent context size issues with very large files. + +## fetch_instructions +Description: Request to fetch instructions to perform a task +Parameters: +- task: (required) The task to get instructions for. This can take the following values: + create_mcp_server + create_mode + +Example: Requesting instructions to create an MCP Server + + +create_mcp_server + + ## search_files Description: Request to perform a regex search across files in a specified directory, providing context-rich results. This tool searches for patterns or specific content across multiple files, displaying each match with encapsulating context. Parameters: @@ -1685,11 +1773,13 @@ Parameters: - path: (required) The path of the file to read (relative to the current working directory /test/path) - start_line: (optional) The starting line number to read from (1-based). If not provided, it starts from the beginning of the file. - end_line: (optional) The ending line number to read to (1-based, inclusive). If not provided, it reads to the end of the file. +- auto_truncate: (optional) Whether to automatically truncate large files when start_line and end_line are not specified. If true and the file exceeds a certain line threshold, it will: a) return only a subset of lines to save tokens, b) include information about the total line count, and c) provide a summary of method definitions with their line ranges. You should set this to true unless you've been explicitly asked to read an entire large file at once, as this prevents context bloat that can lead to truncated responses. For backwards compatibility, it defaults to false when omitted. Usage: File path here Starting line number (optional) Ending line number (optional) +true or false (optional) Examples: @@ -1718,9 +1808,29 @@ Examples: 46 68 - Note: When both start_line and end_line are provided, this tool efficiently streams only the requested lines, making it suitable for processing large files like logs, CSV files, and other large datasets without memory issues. +5. Reading a large file with automatic truncation: + +src/large-module.ts +true + + +This will return a truncated version of the file with information about total line count and method definitions, helping to prevent context size issues with very large files. + +## fetch_instructions +Description: Request to fetch instructions to perform a task +Parameters: +- task: (required) The task to get instructions for. This can take the following values: + create_mcp_server + create_mode + +Example: Requesting instructions to create an MCP Server + + +create_mcp_server + + ## search_files Description: Request to perform a regex search across files in a specified directory, providing context-rich results. This tool searches for patterns or specific content across multiple files, displaying each match with encapsulating context. Parameters: @@ -2062,11 +2172,13 @@ Parameters: - path: (required) The path of the file to read (relative to the current working directory /test/path) - start_line: (optional) The starting line number to read from (1-based). If not provided, it starts from the beginning of the file. - end_line: (optional) The ending line number to read to (1-based, inclusive). If not provided, it reads to the end of the file. +- auto_truncate: (optional) Whether to automatically truncate large files when start_line and end_line are not specified. If true and the file exceeds a certain line threshold, it will: a) return only a subset of lines to save tokens, b) include information about the total line count, and c) provide a summary of method definitions with their line ranges. You should set this to true unless you've been explicitly asked to read an entire large file at once, as this prevents context bloat that can lead to truncated responses. For backwards compatibility, it defaults to false when omitted. Usage: File path here Starting line number (optional) Ending line number (optional) +true or false (optional) Examples: @@ -2095,9 +2207,29 @@ Examples: 46 68 - Note: When both start_line and end_line are provided, this tool efficiently streams only the requested lines, making it suitable for processing large files like logs, CSV files, and other large datasets without memory issues. +5. Reading a large file with automatic truncation: + +src/large-module.ts +true + + +This will return a truncated version of the file with information about total line count and method definitions, helping to prevent context size issues with very large files. + +## fetch_instructions +Description: Request to fetch instructions to perform a task +Parameters: +- task: (required) The task to get instructions for. This can take the following values: + create_mcp_server + create_mode + +Example: Requesting instructions to create an MCP Server + + +create_mcp_server + + ## search_files Description: Request to perform a regex search across files in a specified directory, providing context-rich results. This tool searches for patterns or specific content across multiple files, displaying each match with encapsulating context. Parameters: @@ -2439,11 +2571,13 @@ Parameters: - path: (required) The path of the file to read (relative to the current working directory /test/path) - start_line: (optional) The starting line number to read from (1-based). If not provided, it starts from the beginning of the file. - end_line: (optional) The ending line number to read to (1-based, inclusive). If not provided, it reads to the end of the file. +- auto_truncate: (optional) Whether to automatically truncate large files when start_line and end_line are not specified. If true and the file exceeds a certain line threshold, it will: a) return only a subset of lines to save tokens, b) include information about the total line count, and c) provide a summary of method definitions with their line ranges. You should set this to true unless you've been explicitly asked to read an entire large file at once, as this prevents context bloat that can lead to truncated responses. For backwards compatibility, it defaults to false when omitted. Usage: File path here Starting line number (optional) Ending line number (optional) +true or false (optional) Examples: @@ -2472,9 +2606,29 @@ Examples: 46 68 - Note: When both start_line and end_line are provided, this tool efficiently streams only the requested lines, making it suitable for processing large files like logs, CSV files, and other large datasets without memory issues. +5. Reading a large file with automatic truncation: + +src/large-module.ts +true + + +This will return a truncated version of the file with information about total line count and method definitions, helping to prevent context size issues with very large files. + +## fetch_instructions +Description: Request to fetch instructions to perform a task +Parameters: +- task: (required) The task to get instructions for. This can take the following values: + create_mcp_server + create_mode + +Example: Requesting instructions to create an MCP Server + + +create_mcp_server + + ## search_files Description: Request to perform a regex search across files in a specified directory, providing context-rich results. This tool searches for patterns or specific content across multiple files, displaying each match with encapsulating context. Parameters: @@ -2865,11 +3019,13 @@ Parameters: - path: (required) The path of the file to read (relative to the current working directory /test/path) - start_line: (optional) The starting line number to read from (1-based). If not provided, it starts from the beginning of the file. - end_line: (optional) The ending line number to read to (1-based, inclusive). If not provided, it reads to the end of the file. +- auto_truncate: (optional) Whether to automatically truncate large files when start_line and end_line are not specified. If true and the file exceeds a certain line threshold, it will: a) return only a subset of lines to save tokens, b) include information about the total line count, and c) provide a summary of method definitions with their line ranges. You should set this to true unless you've been explicitly asked to read an entire large file at once, as this prevents context bloat that can lead to truncated responses. For backwards compatibility, it defaults to false when omitted. Usage: File path here Starting line number (optional) Ending line number (optional) +true or false (optional) Examples: @@ -2898,9 +3054,29 @@ Examples: 46 68 - Note: When both start_line and end_line are provided, this tool efficiently streams only the requested lines, making it suitable for processing large files like logs, CSV files, and other large datasets without memory issues. +5. Reading a large file with automatic truncation: + +src/large-module.ts +true + + +This will return a truncated version of the file with information about total line count and method definitions, helping to prevent context size issues with very large files. + +## fetch_instructions +Description: Request to fetch instructions to perform a task +Parameters: +- task: (required) The task to get instructions for. This can take the following values: + create_mcp_server + create_mode + +Example: Requesting instructions to create an MCP Server + + +create_mcp_server + + ## search_files Description: Request to perform a regex search across files in a specified directory, providing context-rich results. This tool searches for patterns or specific content across multiple files, displaying each match with encapsulating context. Parameters: @@ -3180,398 +3356,12 @@ The Model Context Protocol (MCP) enables communication between the system and MC When a server is connected, you can use the server's tools via the \`use_mcp_tool\` tool, and access the server's resources via the \`access_mcp_resource\` tool. (No MCP servers currently connected) - ## Creating an MCP Server -The user may ask you something along the lines of "add a tool" that does some function, in other words to create an MCP server that provides tools and resources that may connect to external APIs for example. You have the ability to create an MCP server and add it to a configuration file that will then expose the tools and resources for you to use with \`use_mcp_tool\` and \`access_mcp_resource\`. - -When creating MCP servers, it's important to understand that they operate in a non-interactive environment. The server cannot initiate OAuth flows, open browser windows, or prompt for user input during runtime. All credentials and authentication tokens must be provided upfront through environment variables in the MCP settings configuration. For example, Spotify's API uses OAuth to get a refresh token for the user, but the MCP server cannot initiate this flow. While you can walk the user through obtaining an application client ID and secret, you may have to create a separate one-time setup script (like get-refresh-token.js) that captures and logs the final piece of the puzzle: the user's refresh token (i.e. you might run the script using execute_command which would open a browser for authentication, and then log the refresh token so that you can see it in the command output for you to use in the MCP settings configuration). - -Unless the user specifies otherwise, new local MCP servers should be created in: /mock/mcp/path - -### MCP Server Types and Configuration - -MCP servers can be configured in two ways in the MCP settings file: - -1. Local (Stdio) Server Configuration: -\`\`\`json -{ - "mcpServers": { - "local-weather": { - "command": "node", - "args": ["/path/to/weather-server/build/index.js"], - "env": { - "OPENWEATHER_API_KEY": "your-api-key" - } - } - } -} -\`\`\` - -2. Remote (SSE) Server Configuration: -\`\`\`json -{ - "mcpServers": { - "remote-weather": { - "url": "https://api.example.com/mcp", - "headers": { - "Authorization": "Bearer your-api-key" - } - } - } -} -\`\`\` - -Common configuration options for both types: -- \`disabled\`: (optional) Set to true to temporarily disable the server -- \`timeout\`: (optional) Maximum time in seconds to wait for server responses (default: 60) -- \`alwaysAllow\`: (optional) Array of tool names that don't require user confirmation - -### Example Local MCP Server - -For example, if the user wanted to give you the ability to retrieve weather information, you could create an MCP server that uses the OpenWeather API to get weather information, add it to the MCP settings configuration file, and then notice that you now have access to new tools and resources in the system prompt that you might use to show the user your new capabilities. - -The following example demonstrates how to build a local MCP server that provides weather data functionality using the Stdio transport. While this example shows how to implement resources, resource templates, and tools, in practice you should prefer using tools since they are more flexible and can handle dynamic parameters. The resource and resource template implementations are included here mainly for demonstration purposes of the different MCP capabilities, but a real weather server would likely just expose tools for fetching weather data. (The following steps are for macOS) - -1. Use the \`create-typescript-server\` tool to bootstrap a new project in the default MCP servers directory: - -\`\`\`bash -cd /mock/mcp/path -npx @modelcontextprotocol/create-server weather-server -cd weather-server -# Install dependencies -npm install axios -\`\`\` - -This will create a new project with the following structure: - -\`\`\` -weather-server/ - ├── package.json - { - ... - "type": "module", // added by default, uses ES module syntax (import/export) rather than CommonJS (require/module.exports) (Important to know if you create additional scripts in this server repository like a get-refresh-token.js script) - "scripts": { - "build": "tsc && node -e "require('fs').chmodSync('build/index.js', '755')"", - ... - } - ... - } - ├── tsconfig.json - └── src/ - └── weather-server/ - └── index.ts # Main server implementation -\`\`\` - -2. Replace \`src/index.ts\` with the following: - -\`\`\`typescript -#!/usr/bin/env node -import { Server } from '@modelcontextprotocol/sdk/server/index.js'; -import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'; -import { - CallToolRequestSchema, - ErrorCode, - ListResourcesRequestSchema, - ListResourceTemplatesRequestSchema, - ListToolsRequestSchema, - McpError, - ReadResourceRequestSchema, -} from '@modelcontextprotocol/sdk/types.js'; -import axios from 'axios'; - -const API_KEY = process.env.OPENWEATHER_API_KEY; // provided by MCP config -if (!API_KEY) { - throw new Error('OPENWEATHER_API_KEY environment variable is required'); -} - -interface OpenWeatherResponse { - main: { - temp: number; - humidity: number; - }; - weather: [{ description: string }]; - wind: { speed: number }; - dt_txt?: string; -} - -const isValidForecastArgs = ( - args: any -): args is { city: string; days?: number } => - typeof args === 'object' && - args !== null && - typeof args.city === 'string' && - (args.days === undefined || typeof args.days === 'number'); - -class WeatherServer { - private server: Server; - private axiosInstance; - - constructor() { - this.server = new Server( - { - name: 'example-weather-server', - version: '0.1.0', - }, - { - capabilities: { - resources: {}, - tools: {}, - }, - } - ); - - this.axiosInstance = axios.create({ - baseURL: 'http://api.openweathermap.org/data/2.5', - params: { - appid: API_KEY, - units: 'metric', - }, - }); - - this.setupResourceHandlers(); - this.setupToolHandlers(); - - // Error handling - this.server.onerror = (error) => console.error('[MCP Error]', error); - process.on('SIGINT', async () => { - await this.server.close(); - process.exit(0); - }); - } - - // MCP Resources represent any kind of UTF-8 encoded data that an MCP server wants to make available to clients, such as database records, API responses, log files, and more. Servers define direct resources with a static URI or dynamic resources with a URI template that follows the format \`[protocol]://[host]/[path]\`. - private setupResourceHandlers() { - // For static resources, servers can expose a list of resources: - this.server.setRequestHandler(ListResourcesRequestSchema, async () => ({ - resources: [ - // This is a poor example since you could use the resource template to get the same information but this demonstrates how to define a static resource - { - uri: \`weather://San Francisco/current\`, // Unique identifier for San Francisco weather resource - name: \`Current weather in San Francisco\`, // Human-readable name - mimeType: 'application/json', // Optional MIME type - // Optional description - description: - 'Real-time weather data for San Francisco including temperature, conditions, humidity, and wind speed', - }, - ], - })); - - // For dynamic resources, servers can expose resource templates: - this.server.setRequestHandler( - ListResourceTemplatesRequestSchema, - async () => ({ - resourceTemplates: [ - { - uriTemplate: 'weather://{city}/current', // URI template (RFC 6570) - name: 'Current weather for a given city', // Human-readable name - mimeType: 'application/json', // Optional MIME type - description: 'Real-time weather data for a specified city', // Optional description - }, - ], - }) - ); - - // ReadResourceRequestSchema is used for both static resources and dynamic resource templates - this.server.setRequestHandler( - ReadResourceRequestSchema, - async (request) => { - const match = request.params.uri.match( - /^weather://([^/]+)/current$/ - ); - if (!match) { - throw new McpError( - ErrorCode.InvalidRequest, - \`Invalid URI format: \${request.params.uri}\` - ); - } - const city = decodeURIComponent(match[1]); - - try { - const response = await this.axiosInstance.get( - 'weather', // current weather - { - params: { q: city }, - } - ); - - return { - contents: [ - { - uri: request.params.uri, - mimeType: 'application/json', - text: JSON.stringify( - { - temperature: response.data.main.temp, - conditions: response.data.weather[0].description, - humidity: response.data.main.humidity, - wind_speed: response.data.wind.speed, - timestamp: new Date().toISOString(), - }, - null, - 2 - ), - }, - ], - }; - } catch (error) { - if (axios.isAxiosError(error)) { - throw new McpError( - ErrorCode.InternalError, - \`Weather API error: \${ - error.response?.data.message ?? error.message - }\` - ); - } - throw error; - } - } - ); - } - - /* MCP Tools enable servers to expose executable functionality to the system. Through these tools, you can interact with external systems, perform computations, and take actions in the real world. - * - Like resources, tools are identified by unique names and can include descriptions to guide their usage. However, unlike resources, tools represent dynamic operations that can modify state or interact with external systems. - * - While resources and tools are similar, you should prefer to create tools over resources when possible as they provide more flexibility. - */ - private setupToolHandlers() { - this.server.setRequestHandler(ListToolsRequestSchema, async () => ({ - tools: [ - { - name: 'get_forecast', // Unique identifier - description: 'Get weather forecast for a city', // Human-readable description - inputSchema: { - // JSON Schema for parameters - type: 'object', - properties: { - city: { - type: 'string', - description: 'City name', - }, - days: { - type: 'number', - description: 'Number of days (1-5)', - minimum: 1, - maximum: 5, - }, - }, - required: ['city'], // Array of required property names - }, - }, - ], - })); - - this.server.setRequestHandler(CallToolRequestSchema, async (request) => { - if (request.params.name !== 'get_forecast') { - throw new McpError( - ErrorCode.MethodNotFound, - \`Unknown tool: \${request.params.name}\` - ); - } - - if (!isValidForecastArgs(request.params.arguments)) { - throw new McpError( - ErrorCode.InvalidParams, - 'Invalid forecast arguments' - ); - } - - const city = request.params.arguments.city; - const days = Math.min(request.params.arguments.days || 3, 5); - - try { - const response = await this.axiosInstance.get<{ - list: OpenWeatherResponse[]; - }>('forecast', { - params: { - q: city, - cnt: days * 8, - }, - }); - - return { - content: [ - { - type: 'text', - text: JSON.stringify(response.data.list, null, 2), - }, - ], - }; - } catch (error) { - if (axios.isAxiosError(error)) { - return { - content: [ - { - type: 'text', - text: \`Weather API error: \${ - error.response?.data.message ?? error.message - }\`, - }, - ], - isError: true, - }; - } - throw error; - } - }); - } - - async run() { - const transport = new StdioServerTransport(); - await this.server.connect(transport); - console.error('Weather MCP server running on stdio'); - } -} - -const server = new WeatherServer(); -server.run().catch(console.error); -\`\`\` - -(Remember: This is just an example–you may use different dependencies, break the implementation up into multiple files, etc.) - -3. Build and compile the executable JavaScript file - -\`\`\`bash -npm run build -\`\`\` - -4. Whenever you need an environment variable such as an API key to configure the MCP server, walk the user through the process of getting the key. For example, they may need to create an account and go to a developer dashboard to generate the key. Provide step-by-step instructions and URLs to make it easy for the user to retrieve the necessary information. Then use the ask_followup_question tool to ask the user for the key, in this case the OpenWeather API key. - -5. Install the MCP Server by adding the MCP server configuration to the settings file located at '/mock/settings/path'. The settings file may have other MCP servers already configured, so you would read it first and then add your new server to the existing \`mcpServers\` object. - -IMPORTANT: Regardless of what else you see in the MCP settings file, you must default any new MCP servers you create to disabled=false and alwaysAllow=[]. - -\`\`\`json -{ - "mcpServers": { - ..., - "weather": { - "command": "node", - "args": ["/path/to/weather-server/build/index.js"], - "env": { - "OPENWEATHER_API_KEY": "user-provided-api-key" - } - }, - } -} -\`\`\` - -(Note: the user may also ask you to install the MCP server to the Claude desktop app, in which case you would read then modify \`~/Library/Application Support/Claude/claude_desktop_config.json\` on macOS for example. It follows the same format of a top level \`mcpServers\` object.) - -6. After you have edited the MCP settings configuration file, the system will automatically run all the servers and expose the available tools and resources in the 'Connected MCP Servers' section. - -7. Now that you have access to these new tools and resources, you may suggest ways the user can command you to invoke them - for example, with this new weather tool now available, you can invite the user to ask "what's the weather in San Francisco?" - -## Editing MCP Servers - -The user may ask to add tools or resources that may make sense to add to an existing MCP server (listed under 'Connected MCP Servers' above: (None running currently), e.g. if it would use the same API. This would be possible if you can locate the MCP server repository on the user's system by looking at the server arguments for a filepath. You might then use list_files and read_file to explore the files in the repository, and use write_to_file to make changes to the files. - -However some MCP servers may be running from installed packages rather than a local repository, in which case it may make more sense to create a new MCP server. - -# MCP Servers Are Not Always Necessary - -The user may not always request the use or creation of MCP servers. Instead, they might provide tasks that can be completed with existing tools. While using the MCP SDK to extend your capabilities can be useful, it's important to understand that this is just one specialized type of task you can accomplish. You should only implement MCP servers when the user explicitly requests it (e.g., "add a tool that..."). - -Remember: The MCP documentation and example provided above are to help you understand and work with existing MCP servers or create new ones when requested by the user. You already have access to tools and capabilities that can be used to accomplish a wide range of tasks. +The user may ask you something along the lines of "add a tool" that does some function, in other words to create an MCP server that provides tools and resources that may connect to external APIs for example. If they do, you should obtain detailed instructions on this topic using the fetch_instructions tool, like this: + +create_mcp_server + ==== @@ -3696,11 +3486,13 @@ Parameters: - path: (required) The path of the file to read (relative to the current working directory /test/path) - start_line: (optional) The starting line number to read from (1-based). If not provided, it starts from the beginning of the file. - end_line: (optional) The ending line number to read to (1-based, inclusive). If not provided, it reads to the end of the file. +- auto_truncate: (optional) Whether to automatically truncate large files when start_line and end_line are not specified. If true and the file exceeds a certain line threshold, it will: a) return only a subset of lines to save tokens, b) include information about the total line count, and c) provide a summary of method definitions with their line ranges. You should set this to true unless you've been explicitly asked to read an entire large file at once, as this prevents context bloat that can lead to truncated responses. For backwards compatibility, it defaults to false when omitted. Usage: File path here Starting line number (optional) Ending line number (optional) +true or false (optional) Examples: @@ -3729,9 +3521,29 @@ Examples: 46 68 - Note: When both start_line and end_line are provided, this tool efficiently streams only the requested lines, making it suitable for processing large files like logs, CSV files, and other large datasets without memory issues. +5. Reading a large file with automatic truncation: + +src/large-module.ts +true + + +This will return a truncated version of the file with information about total line count and method definitions, helping to prevent context size issues with very large files. + +## fetch_instructions +Description: Request to fetch instructions to perform a task +Parameters: +- task: (required) The task to get instructions for. This can take the following values: + create_mcp_server + create_mode + +Example: Requesting instructions to create an MCP Server + + +create_mcp_server + + ## search_files Description: Request to perform a regex search across files in a specified directory, providing context-rich results. This tool searches for patterns or specific content across multiple files, displaying each match with encapsulating context. Parameters: @@ -4122,11 +3934,13 @@ Parameters: - path: (required) The path of the file to read (relative to the current working directory /test/path) - start_line: (optional) The starting line number to read from (1-based). If not provided, it starts from the beginning of the file. - end_line: (optional) The ending line number to read to (1-based, inclusive). If not provided, it reads to the end of the file. +- auto_truncate: (optional) Whether to automatically truncate large files when start_line and end_line are not specified. If true and the file exceeds a certain line threshold, it will: a) return only a subset of lines to save tokens, b) include information about the total line count, and c) provide a summary of method definitions with their line ranges. You should set this to true unless you've been explicitly asked to read an entire large file at once, as this prevents context bloat that can lead to truncated responses. For backwards compatibility, it defaults to false when omitted. Usage: File path here Starting line number (optional) Ending line number (optional) +true or false (optional) Examples: @@ -4155,9 +3969,29 @@ Examples: 46 68 - Note: When both start_line and end_line are provided, this tool efficiently streams only the requested lines, making it suitable for processing large files like logs, CSV files, and other large datasets without memory issues. +5. Reading a large file with automatic truncation: + +src/large-module.ts +true + + +This will return a truncated version of the file with information about total line count and method definitions, helping to prevent context size issues with very large files. + +## fetch_instructions +Description: Request to fetch instructions to perform a task +Parameters: +- task: (required) The task to get instructions for. This can take the following values: + create_mcp_server + create_mode + +Example: Requesting instructions to create an MCP Server + + +create_mcp_server + + ## search_files Description: Request to perform a regex search across files in a specified directory, providing context-rich results. This tool searches for patterns or specific content across multiple files, displaying each match with encapsulating context. Parameters: @@ -4561,11 +4395,13 @@ Parameters: - path: (required) The path of the file to read (relative to the current working directory /test/path) - start_line: (optional) The starting line number to read from (1-based). If not provided, it starts from the beginning of the file. - end_line: (optional) The ending line number to read to (1-based, inclusive). If not provided, it reads to the end of the file. +- auto_truncate: (optional) Whether to automatically truncate large files when start_line and end_line are not specified. If true and the file exceeds a certain line threshold, it will: a) return only a subset of lines to save tokens, b) include information about the total line count, and c) provide a summary of method definitions with their line ranges. You should set this to true unless you've been explicitly asked to read an entire large file at once, as this prevents context bloat that can lead to truncated responses. For backwards compatibility, it defaults to false when omitted. Usage: File path here Starting line number (optional) Ending line number (optional) +true or false (optional) Examples: @@ -4594,9 +4430,29 @@ Examples: 46 68 - Note: When both start_line and end_line are provided, this tool efficiently streams only the requested lines, making it suitable for processing large files like logs, CSV files, and other large datasets without memory issues. +5. Reading a large file with automatic truncation: + +src/large-module.ts +true + + +This will return a truncated version of the file with information about total line count and method definitions, helping to prevent context size issues with very large files. + +## fetch_instructions +Description: Request to fetch instructions to perform a task +Parameters: +- task: (required) The task to get instructions for. This can take the following values: + create_mcp_server + create_mode + +Example: Requesting instructions to create an MCP Server + + +create_mcp_server + + ## search_files Description: Request to perform a regex search across files in a specified directory, providing context-rich results. This tool searches for patterns or specific content across multiple files, displaying each match with encapsulating context. Parameters: @@ -4980,11 +4836,13 @@ Parameters: - path: (required) The path of the file to read (relative to the current working directory /test/path) - start_line: (optional) The starting line number to read from (1-based). If not provided, it starts from the beginning of the file. - end_line: (optional) The ending line number to read to (1-based, inclusive). If not provided, it reads to the end of the file. +- auto_truncate: (optional) Whether to automatically truncate large files when start_line and end_line are not specified. If true and the file exceeds a certain line threshold, it will: a) return only a subset of lines to save tokens, b) include information about the total line count, and c) provide a summary of method definitions with their line ranges. You should set this to true unless you've been explicitly asked to read an entire large file at once, as this prevents context bloat that can lead to truncated responses. For backwards compatibility, it defaults to false when omitted. Usage: File path here Starting line number (optional) Ending line number (optional) +true or false (optional) Examples: @@ -5013,9 +4871,29 @@ Examples: 46 68 - Note: When both start_line and end_line are provided, this tool efficiently streams only the requested lines, making it suitable for processing large files like logs, CSV files, and other large datasets without memory issues. +5. Reading a large file with automatic truncation: + +src/large-module.ts +true + + +This will return a truncated version of the file with information about total line count and method definitions, helping to prevent context size issues with very large files. + +## fetch_instructions +Description: Request to fetch instructions to perform a task +Parameters: +- task: (required) The task to get instructions for. This can take the following values: + create_mcp_server + create_mode + +Example: Requesting instructions to create an MCP Server + + +create_mcp_server + + ## search_files Description: Request to perform a regex search across files in a specified directory, providing context-rich results. This tool searches for patterns or specific content across multiple files, displaying each match with encapsulating context. Parameters: @@ -5519,11 +5397,13 @@ Parameters: - path: (required) The path of the file to read (relative to the current working directory /test/path) - start_line: (optional) The starting line number to read from (1-based). If not provided, it starts from the beginning of the file. - end_line: (optional) The ending line number to read to (1-based, inclusive). If not provided, it reads to the end of the file. +- auto_truncate: (optional) Whether to automatically truncate large files when start_line and end_line are not specified. If true and the file exceeds a certain line threshold, it will: a) return only a subset of lines to save tokens, b) include information about the total line count, and c) provide a summary of method definitions with their line ranges. You should set this to true unless you've been explicitly asked to read an entire large file at once, as this prevents context bloat that can lead to truncated responses. For backwards compatibility, it defaults to false when omitted. Usage: File path here Starting line number (optional) Ending line number (optional) +true or false (optional) Examples: @@ -5552,9 +5432,29 @@ Examples: 46 68 - Note: When both start_line and end_line are provided, this tool efficiently streams only the requested lines, making it suitable for processing large files like logs, CSV files, and other large datasets without memory issues. +5. Reading a large file with automatic truncation: + +src/large-module.ts +true + + +This will return a truncated version of the file with information about total line count and method definitions, helping to prevent context size issues with very large files. + +## fetch_instructions +Description: Request to fetch instructions to perform a task +Parameters: +- task: (required) The task to get instructions for. This can take the following values: + create_mcp_server + create_mode + +Example: Requesting instructions to create an MCP Server + + +create_mcp_server + + ## search_files Description: Request to perform a regex search across files in a specified directory, providing context-rich results. This tool searches for patterns or specific content across multiple files, displaying each match with encapsulating context. Parameters: @@ -5972,11 +5872,13 @@ Parameters: - path: (required) The path of the file to read (relative to the current working directory /test/path) - start_line: (optional) The starting line number to read from (1-based). If not provided, it starts from the beginning of the file. - end_line: (optional) The ending line number to read to (1-based, inclusive). If not provided, it reads to the end of the file. +- auto_truncate: (optional) Whether to automatically truncate large files when start_line and end_line are not specified. If true and the file exceeds a certain line threshold, it will: a) return only a subset of lines to save tokens, b) include information about the total line count, and c) provide a summary of method definitions with their line ranges. You should set this to true unless you've been explicitly asked to read an entire large file at once, as this prevents context bloat that can lead to truncated responses. For backwards compatibility, it defaults to false when omitted. Usage: File path here Starting line number (optional) Ending line number (optional) +true or false (optional) Examples: @@ -6005,9 +5907,29 @@ Examples: 46 68 - Note: When both start_line and end_line are provided, this tool efficiently streams only the requested lines, making it suitable for processing large files like logs, CSV files, and other large datasets without memory issues. +5. Reading a large file with automatic truncation: + +src/large-module.ts +true + + +This will return a truncated version of the file with information about total line count and method definitions, helping to prevent context size issues with very large files. + +## fetch_instructions +Description: Request to fetch instructions to perform a task +Parameters: +- task: (required) The task to get instructions for. This can take the following values: + create_mcp_server + create_mode + +Example: Requesting instructions to create an MCP Server + + +create_mcp_server + + ## search_files Description: Request to perform a regex search across files in a specified directory, providing context-rich results. This tool searches for patterns or specific content across multiple files, displaying each match with encapsulating context. Parameters: @@ -6323,11 +6245,13 @@ Parameters: - path: (required) The path of the file to read (relative to the current working directory /test/path) - start_line: (optional) The starting line number to read from (1-based). If not provided, it starts from the beginning of the file. - end_line: (optional) The ending line number to read to (1-based, inclusive). If not provided, it reads to the end of the file. +- auto_truncate: (optional) Whether to automatically truncate large files when start_line and end_line are not specified. If true and the file exceeds a certain line threshold, it will: a) return only a subset of lines to save tokens, b) include information about the total line count, and c) provide a summary of method definitions with their line ranges. You should set this to true unless you've been explicitly asked to read an entire large file at once, as this prevents context bloat that can lead to truncated responses. For backwards compatibility, it defaults to false when omitted. Usage: File path here Starting line number (optional) Ending line number (optional) +true or false (optional) Examples: @@ -6356,9 +6280,29 @@ Examples: 46 68 - Note: When both start_line and end_line are provided, this tool efficiently streams only the requested lines, making it suitable for processing large files like logs, CSV files, and other large datasets without memory issues. +5. Reading a large file with automatic truncation: + +src/large-module.ts +true + + +This will return a truncated version of the file with information about total line count and method definitions, helping to prevent context size issues with very large files. + +## fetch_instructions +Description: Request to fetch instructions to perform a task +Parameters: +- task: (required) The task to get instructions for. This can take the following values: + create_mcp_server + create_mode + +Example: Requesting instructions to create an MCP Server + + +create_mcp_server + + ## search_files Description: Request to perform a regex search across files in a specified directory, providing context-rich results. This tool searches for patterns or specific content across multiple files, displaying each match with encapsulating context. Parameters: @@ -6723,398 +6667,12 @@ The Model Context Protocol (MCP) enables communication between the system and MC When a server is connected, you can use the server's tools via the \`use_mcp_tool\` tool, and access the server's resources via the \`access_mcp_resource\` tool. (No MCP servers currently connected) - ## Creating an MCP Server -The user may ask you something along the lines of "add a tool" that does some function, in other words to create an MCP server that provides tools and resources that may connect to external APIs for example. You have the ability to create an MCP server and add it to a configuration file that will then expose the tools and resources for you to use with \`use_mcp_tool\` and \`access_mcp_resource\`. - -When creating MCP servers, it's important to understand that they operate in a non-interactive environment. The server cannot initiate OAuth flows, open browser windows, or prompt for user input during runtime. All credentials and authentication tokens must be provided upfront through environment variables in the MCP settings configuration. For example, Spotify's API uses OAuth to get a refresh token for the user, but the MCP server cannot initiate this flow. While you can walk the user through obtaining an application client ID and secret, you may have to create a separate one-time setup script (like get-refresh-token.js) that captures and logs the final piece of the puzzle: the user's refresh token (i.e. you might run the script using execute_command which would open a browser for authentication, and then log the refresh token so that you can see it in the command output for you to use in the MCP settings configuration). - -Unless the user specifies otherwise, new local MCP servers should be created in: /mock/mcp/path - -### MCP Server Types and Configuration - -MCP servers can be configured in two ways in the MCP settings file: - -1. Local (Stdio) Server Configuration: -\`\`\`json -{ - "mcpServers": { - "local-weather": { - "command": "node", - "args": ["/path/to/weather-server/build/index.js"], - "env": { - "OPENWEATHER_API_KEY": "your-api-key" - } - } - } -} -\`\`\` - -2. Remote (SSE) Server Configuration: -\`\`\`json -{ - "mcpServers": { - "remote-weather": { - "url": "https://api.example.com/mcp", - "headers": { - "Authorization": "Bearer your-api-key" - } - } - } -} -\`\`\` - -Common configuration options for both types: -- \`disabled\`: (optional) Set to true to temporarily disable the server -- \`timeout\`: (optional) Maximum time in seconds to wait for server responses (default: 60) -- \`alwaysAllow\`: (optional) Array of tool names that don't require user confirmation - -### Example Local MCP Server - -For example, if the user wanted to give you the ability to retrieve weather information, you could create an MCP server that uses the OpenWeather API to get weather information, add it to the MCP settings configuration file, and then notice that you now have access to new tools and resources in the system prompt that you might use to show the user your new capabilities. - -The following example demonstrates how to build a local MCP server that provides weather data functionality using the Stdio transport. While this example shows how to implement resources, resource templates, and tools, in practice you should prefer using tools since they are more flexible and can handle dynamic parameters. The resource and resource template implementations are included here mainly for demonstration purposes of the different MCP capabilities, but a real weather server would likely just expose tools for fetching weather data. (The following steps are for macOS) - -1. Use the \`create-typescript-server\` tool to bootstrap a new project in the default MCP servers directory: - -\`\`\`bash -cd /mock/mcp/path -npx @modelcontextprotocol/create-server weather-server -cd weather-server -# Install dependencies -npm install axios -\`\`\` - -This will create a new project with the following structure: - -\`\`\` -weather-server/ - ├── package.json - { - ... - "type": "module", // added by default, uses ES module syntax (import/export) rather than CommonJS (require/module.exports) (Important to know if you create additional scripts in this server repository like a get-refresh-token.js script) - "scripts": { - "build": "tsc && node -e "require('fs').chmodSync('build/index.js', '755')"", - ... - } - ... - } - ├── tsconfig.json - └── src/ - └── weather-server/ - └── index.ts # Main server implementation -\`\`\` - -2. Replace \`src/index.ts\` with the following: - -\`\`\`typescript -#!/usr/bin/env node -import { Server } from '@modelcontextprotocol/sdk/server/index.js'; -import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'; -import { - CallToolRequestSchema, - ErrorCode, - ListResourcesRequestSchema, - ListResourceTemplatesRequestSchema, - ListToolsRequestSchema, - McpError, - ReadResourceRequestSchema, -} from '@modelcontextprotocol/sdk/types.js'; -import axios from 'axios'; - -const API_KEY = process.env.OPENWEATHER_API_KEY; // provided by MCP config -if (!API_KEY) { - throw new Error('OPENWEATHER_API_KEY environment variable is required'); -} - -interface OpenWeatherResponse { - main: { - temp: number; - humidity: number; - }; - weather: [{ description: string }]; - wind: { speed: number }; - dt_txt?: string; -} - -const isValidForecastArgs = ( - args: any -): args is { city: string; days?: number } => - typeof args === 'object' && - args !== null && - typeof args.city === 'string' && - (args.days === undefined || typeof args.days === 'number'); - -class WeatherServer { - private server: Server; - private axiosInstance; - - constructor() { - this.server = new Server( - { - name: 'example-weather-server', - version: '0.1.0', - }, - { - capabilities: { - resources: {}, - tools: {}, - }, - } - ); - - this.axiosInstance = axios.create({ - baseURL: 'http://api.openweathermap.org/data/2.5', - params: { - appid: API_KEY, - units: 'metric', - }, - }); - - this.setupResourceHandlers(); - this.setupToolHandlers(); - - // Error handling - this.server.onerror = (error) => console.error('[MCP Error]', error); - process.on('SIGINT', async () => { - await this.server.close(); - process.exit(0); - }); - } - - // MCP Resources represent any kind of UTF-8 encoded data that an MCP server wants to make available to clients, such as database records, API responses, log files, and more. Servers define direct resources with a static URI or dynamic resources with a URI template that follows the format \`[protocol]://[host]/[path]\`. - private setupResourceHandlers() { - // For static resources, servers can expose a list of resources: - this.server.setRequestHandler(ListResourcesRequestSchema, async () => ({ - resources: [ - // This is a poor example since you could use the resource template to get the same information but this demonstrates how to define a static resource - { - uri: \`weather://San Francisco/current\`, // Unique identifier for San Francisco weather resource - name: \`Current weather in San Francisco\`, // Human-readable name - mimeType: 'application/json', // Optional MIME type - // Optional description - description: - 'Real-time weather data for San Francisco including temperature, conditions, humidity, and wind speed', - }, - ], - })); - - // For dynamic resources, servers can expose resource templates: - this.server.setRequestHandler( - ListResourceTemplatesRequestSchema, - async () => ({ - resourceTemplates: [ - { - uriTemplate: 'weather://{city}/current', // URI template (RFC 6570) - name: 'Current weather for a given city', // Human-readable name - mimeType: 'application/json', // Optional MIME type - description: 'Real-time weather data for a specified city', // Optional description - }, - ], - }) - ); - - // ReadResourceRequestSchema is used for both static resources and dynamic resource templates - this.server.setRequestHandler( - ReadResourceRequestSchema, - async (request) => { - const match = request.params.uri.match( - /^weather://([^/]+)/current$/ - ); - if (!match) { - throw new McpError( - ErrorCode.InvalidRequest, - \`Invalid URI format: \${request.params.uri}\` - ); - } - const city = decodeURIComponent(match[1]); - - try { - const response = await this.axiosInstance.get( - 'weather', // current weather - { - params: { q: city }, - } - ); - - return { - contents: [ - { - uri: request.params.uri, - mimeType: 'application/json', - text: JSON.stringify( - { - temperature: response.data.main.temp, - conditions: response.data.weather[0].description, - humidity: response.data.main.humidity, - wind_speed: response.data.wind.speed, - timestamp: new Date().toISOString(), - }, - null, - 2 - ), - }, - ], - }; - } catch (error) { - if (axios.isAxiosError(error)) { - throw new McpError( - ErrorCode.InternalError, - \`Weather API error: \${ - error.response?.data.message ?? error.message - }\` - ); - } - throw error; - } - } - ); - } - - /* MCP Tools enable servers to expose executable functionality to the system. Through these tools, you can interact with external systems, perform computations, and take actions in the real world. - * - Like resources, tools are identified by unique names and can include descriptions to guide their usage. However, unlike resources, tools represent dynamic operations that can modify state or interact with external systems. - * - While resources and tools are similar, you should prefer to create tools over resources when possible as they provide more flexibility. - */ - private setupToolHandlers() { - this.server.setRequestHandler(ListToolsRequestSchema, async () => ({ - tools: [ - { - name: 'get_forecast', // Unique identifier - description: 'Get weather forecast for a city', // Human-readable description - inputSchema: { - // JSON Schema for parameters - type: 'object', - properties: { - city: { - type: 'string', - description: 'City name', - }, - days: { - type: 'number', - description: 'Number of days (1-5)', - minimum: 1, - maximum: 5, - }, - }, - required: ['city'], // Array of required property names - }, - }, - ], - })); - - this.server.setRequestHandler(CallToolRequestSchema, async (request) => { - if (request.params.name !== 'get_forecast') { - throw new McpError( - ErrorCode.MethodNotFound, - \`Unknown tool: \${request.params.name}\` - ); - } - - if (!isValidForecastArgs(request.params.arguments)) { - throw new McpError( - ErrorCode.InvalidParams, - 'Invalid forecast arguments' - ); - } - - const city = request.params.arguments.city; - const days = Math.min(request.params.arguments.days || 3, 5); - - try { - const response = await this.axiosInstance.get<{ - list: OpenWeatherResponse[]; - }>('forecast', { - params: { - q: city, - cnt: days * 8, - }, - }); - - return { - content: [ - { - type: 'text', - text: JSON.stringify(response.data.list, null, 2), - }, - ], - }; - } catch (error) { - if (axios.isAxiosError(error)) { - return { - content: [ - { - type: 'text', - text: \`Weather API error: \${ - error.response?.data.message ?? error.message - }\`, - }, - ], - isError: true, - }; - } - throw error; - } - }); - } - - async run() { - const transport = new StdioServerTransport(); - await this.server.connect(transport); - console.error('Weather MCP server running on stdio'); - } -} - -const server = new WeatherServer(); -server.run().catch(console.error); -\`\`\` - -(Remember: This is just an example–you may use different dependencies, break the implementation up into multiple files, etc.) - -3. Build and compile the executable JavaScript file - -\`\`\`bash -npm run build -\`\`\` - -4. Whenever you need an environment variable such as an API key to configure the MCP server, walk the user through the process of getting the key. For example, they may need to create an account and go to a developer dashboard to generate the key. Provide step-by-step instructions and URLs to make it easy for the user to retrieve the necessary information. Then use the ask_followup_question tool to ask the user for the key, in this case the OpenWeather API key. - -5. Install the MCP Server by adding the MCP server configuration to the settings file located at '/mock/settings/path'. The settings file may have other MCP servers already configured, so you would read it first and then add your new server to the existing \`mcpServers\` object. - -IMPORTANT: Regardless of what else you see in the MCP settings file, you must default any new MCP servers you create to disabled=false and alwaysAllow=[]. - -\`\`\`json -{ - "mcpServers": { - ..., - "weather": { - "command": "node", - "args": ["/path/to/weather-server/build/index.js"], - "env": { - "OPENWEATHER_API_KEY": "user-provided-api-key" - } - }, - } -} -\`\`\` - -(Note: the user may also ask you to install the MCP server to the Claude desktop app, in which case you would read then modify \`~/Library/Application Support/Claude/claude_desktop_config.json\` on macOS for example. It follows the same format of a top level \`mcpServers\` object.) - -6. After you have edited the MCP settings configuration file, the system will automatically run all the servers and expose the available tools and resources in the 'Connected MCP Servers' section. - -7. Now that you have access to these new tools and resources, you may suggest ways the user can command you to invoke them - for example, with this new weather tool now available, you can invite the user to ask "what's the weather in San Francisco?" - -## Editing MCP Servers - -The user may ask to add tools or resources that may make sense to add to an existing MCP server (listed under 'Connected MCP Servers' above: (None running currently), e.g. if it would use the same API. This would be possible if you can locate the MCP server repository on the user's system by looking at the server arguments for a filepath. You might then use list_files and read_file to explore the files in the repository, and use write_to_file to make changes to the files. - -However some MCP servers may be running from installed packages rather than a local repository, in which case it may make more sense to create a new MCP server. - -# MCP Servers Are Not Always Necessary - -The user may not always request the use or creation of MCP servers. Instead, they might provide tasks that can be completed with existing tools. While using the MCP SDK to extend your capabilities can be useful, it's important to understand that this is just one specialized type of task you can accomplish. You should only implement MCP servers when the user explicitly requests it (e.g., "add a tool that..."). - -Remember: The MCP documentation and example provided above are to help you understand and work with existing MCP servers or create new ones when requested by the user. You already have access to tools and capabilities that can be used to accomplish a wide range of tasks. +The user may ask you something along the lines of "add a tool" that does some function, in other words to create an MCP server that provides tools and resources that may connect to external APIs for example. If they do, you should obtain detailed instructions on this topic using the fetch_instructions tool, like this: + +create_mcp_server + ==== diff --git a/src/core/prompts/__tests__/custom-system-prompt.test.ts b/src/core/prompts/__tests__/custom-system-prompt.test.ts index 812caffbafd..977ab051a00 100644 --- a/src/core/prompts/__tests__/custom-system-prompt.test.ts +++ b/src/core/prompts/__tests__/custom-system-prompt.test.ts @@ -2,6 +2,7 @@ import { SYSTEM_PROMPT } from "../system" import { defaultModeSlug, modes } from "../../../shared/modes" import * as vscode from "vscode" import * as fs from "fs/promises" +import { toPosix } from "./utils" // Mock the fs/promises module jest.mock("fs/promises", () => ({ @@ -89,7 +90,7 @@ describe("File-Based Custom System Prompt", () => { const fileCustomSystemPrompt = "Custom system prompt from file" // When called with utf-8 encoding, return a string mockedFs.readFile.mockImplementation((filePath, options) => { - if (filePath.toString().includes(`.roo/system-prompt-${defaultModeSlug}`) && options === "utf-8") { + if (toPosix(filePath).includes(`.roo/system-prompt-${defaultModeSlug}`) && options === "utf-8") { return Promise.resolve(fileCustomSystemPrompt) } return Promise.reject({ code: "ENOENT" }) @@ -124,7 +125,7 @@ describe("File-Based Custom System Prompt", () => { // Mock the readFile to return content from a file const fileCustomSystemPrompt = "Custom system prompt from file" mockedFs.readFile.mockImplementation((filePath, options) => { - if (filePath.toString().includes(`.roo/system-prompt-${defaultModeSlug}`) && options === "utf-8") { + if (toPosix(filePath).includes(`.roo/system-prompt-${defaultModeSlug}`) && options === "utf-8") { return Promise.resolve(fileCustomSystemPrompt) } return Promise.reject({ code: "ENOENT" }) diff --git a/src/core/prompts/__tests__/responses-rooignore.test.ts b/src/core/prompts/__tests__/responses-rooignore.test.ts index 37b3050dd05..46f1bec438a 100644 --- a/src/core/prompts/__tests__/responses-rooignore.test.ts +++ b/src/core/prompts/__tests__/responses-rooignore.test.ts @@ -2,9 +2,9 @@ import { formatResponse } from "../responses" import { RooIgnoreController, LOCK_TEXT_SYMBOL } from "../../ignore/RooIgnoreController" -import * as path from "path" import { fileExistsAtPath } from "../../../utils/fs" import * as fs from "fs/promises" +import { toPosix } from "./utils" // Mock dependencies jest.mock("../../../utils/fs") @@ -82,7 +82,9 @@ describe("RooIgnore Response Formatting", () => { controller.validateAccess = jest.fn().mockImplementation((filePath: string) => { // Only allow files not matching these patterns return ( - !filePath.includes("node_modules") && !filePath.includes(".git") && !filePath.includes("secrets/") + !filePath.includes("node_modules") && + !filePath.includes(".git") && + !toPosix(filePath).includes("secrets/") ) }) @@ -124,7 +126,9 @@ describe("RooIgnore Response Formatting", () => { controller.validateAccess = jest.fn().mockImplementation((filePath: string) => { // Only allow files not matching these patterns return ( - !filePath.includes("node_modules") && !filePath.includes(".git") && !filePath.includes("secrets/") + !filePath.includes("node_modules") && + !filePath.includes(".git") && + !toPosix(filePath).includes("secrets/") ) }) diff --git a/src/core/prompts/__tests__/utils.ts b/src/core/prompts/__tests__/utils.ts new file mode 100644 index 00000000000..f2ac4fec1e7 --- /dev/null +++ b/src/core/prompts/__tests__/utils.ts @@ -0,0 +1,7 @@ +import * as fs from "fs/promises" +import { PathLike } from "fs" + +// Make a path take a unix-like form. Useful for making path comparisons. +export function toPosix(filePath: PathLike | fs.FileHandle) { + return filePath.toString().toPosix() +} diff --git a/src/core/prompts/instructions/create-mcp-server.ts b/src/core/prompts/instructions/create-mcp-server.ts new file mode 100644 index 00000000000..917a94f47ad --- /dev/null +++ b/src/core/prompts/instructions/create-mcp-server.ts @@ -0,0 +1,404 @@ +import { McpHub } from "../../../services/mcp/McpHub" +import { DiffStrategy } from "../../diff/DiffStrategy" + +export async function createMCPServerInstructions( + mcpHub: McpHub | undefined, + diffStrategy: DiffStrategy | undefined, +): Promise { + if (!diffStrategy || !mcpHub) throw new Error("Missing MCP Hub or Diff Strategy") + + return `You have the ability to create an MCP server and add it to a configuration file that will then expose the tools and resources for you to use with \`use_mcp_tool\` and \`access_mcp_resource\`. + +When creating MCP servers, it's important to understand that they operate in a non-interactive environment. The server cannot initiate OAuth flows, open browser windows, or prompt for user input during runtime. All credentials and authentication tokens must be provided upfront through environment variables in the MCP settings configuration. For example, Spotify's API uses OAuth to get a refresh token for the user, but the MCP server cannot initiate this flow. While you can walk the user through obtaining an application client ID and secret, you may have to create a separate one-time setup script (like get-refresh-token.js) that captures and logs the final piece of the puzzle: the user's refresh token (i.e. you might run the script using execute_command which would open a browser for authentication, and then log the refresh token so that you can see it in the command output for you to use in the MCP settings configuration). + +Unless the user specifies otherwise, new local MCP servers should be created in: ${await mcpHub.getMcpServersPath()} + +### MCP Server Types and Configuration + +MCP servers can be configured in two ways in the MCP settings file: + +1. Local (Stdio) Server Configuration: +\`\`\`json +{ + "mcpServers": { + "local-weather": { + "command": "node", + "args": ["/path/to/weather-server/build/index.js"], + "env": { + "OPENWEATHER_API_KEY": "your-api-key" + } + } + } +} +\`\`\` + +2. Remote (SSE) Server Configuration: +\`\`\`json +{ + "mcpServers": { + "remote-weather": { + "url": "https://api.example.com/mcp", + "headers": { + "Authorization": "Bearer your-api-key" + } + } + } +} +\`\`\` + +Common configuration options for both types: +- \`disabled\`: (optional) Set to true to temporarily disable the server +- \`timeout\`: (optional) Maximum time in seconds to wait for server responses (default: 60) +- \`alwaysAllow\`: (optional) Array of tool names that don't require user confirmation + +### Example Local MCP Server + +For example, if the user wanted to give you the ability to retrieve weather information, you could create an MCP server that uses the OpenWeather API to get weather information, add it to the MCP settings configuration file, and then notice that you now have access to new tools and resources in the system prompt that you might use to show the user your new capabilities. + +The following example demonstrates how to build a local MCP server that provides weather data functionality using the Stdio transport. While this example shows how to implement resources, resource templates, and tools, in practice you should prefer using tools since they are more flexible and can handle dynamic parameters. The resource and resource template implementations are included here mainly for demonstration purposes of the different MCP capabilities, but a real weather server would likely just expose tools for fetching weather data. (The following steps are for macOS) + +1. Use the \`create-typescript-server\` tool to bootstrap a new project in the default MCP servers directory: + +\`\`\`bash +cd ${await mcpHub.getMcpServersPath()} +npx @modelcontextprotocol/create-server weather-server +cd weather-server +# Install dependencies +npm install axios +\`\`\` + +This will create a new project with the following structure: + +\`\`\` +weather-server/ + ├── package.json + { + ... + "type": "module", // added by default, uses ES module syntax (import/export) rather than CommonJS (require/module.exports) (Important to know if you create additional scripts in this server repository like a get-refresh-token.js script) + "scripts": { + "build": "tsc && node -e \"require('fs').chmodSync('build/index.js', '755')\"", + ... + } + ... + } + ├── tsconfig.json + └── src/ + └── weather-server/ + └── index.ts # Main server implementation +\`\`\` + +2. Replace \`src/index.ts\` with the following: + +\`\`\`typescript +#!/usr/bin/env node +import { Server } from '@modelcontextprotocol/sdk/server/index.js'; +import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'; +import { + CallToolRequestSchema, + ErrorCode, + ListResourcesRequestSchema, + ListResourceTemplatesRequestSchema, + ListToolsRequestSchema, + McpError, + ReadResourceRequestSchema, +} from '@modelcontextprotocol/sdk/types.js'; +import axios from 'axios'; + +const API_KEY = process.env.OPENWEATHER_API_KEY; // provided by MCP config +if (!API_KEY) { + throw new Error('OPENWEATHER_API_KEY environment variable is required'); +} + +interface OpenWeatherResponse { + main: { + temp: number; + humidity: number; + }; + weather: [{ description: string }]; + wind: { speed: number }; + dt_txt?: string; +} + +const isValidForecastArgs = ( + args: any +): args is { city: string; days?: number } => + typeof args === 'object' && + args !== null && + typeof args.city === 'string' && + (args.days === undefined || typeof args.days === 'number'); + +class WeatherServer { + private server: Server; + private axiosInstance; + + constructor() { + this.server = new Server( + { + name: 'example-weather-server', + version: '0.1.0', + }, + { + capabilities: { + resources: {}, + tools: {}, + }, + } + ); + + this.axiosInstance = axios.create({ + baseURL: 'http://api.openweathermap.org/data/2.5', + params: { + appid: API_KEY, + units: 'metric', + }, + }); + + this.setupResourceHandlers(); + this.setupToolHandlers(); + + // Error handling + this.server.onerror = (error) => console.error('[MCP Error]', error); + process.on('SIGINT', async () => { + await this.server.close(); + process.exit(0); + }); + } + + // MCP Resources represent any kind of UTF-8 encoded data that an MCP server wants to make available to clients, such as database records, API responses, log files, and more. Servers define direct resources with a static URI or dynamic resources with a URI template that follows the format \`[protocol]://[host]/[path]\`. + private setupResourceHandlers() { + // For static resources, servers can expose a list of resources: + this.server.setRequestHandler(ListResourcesRequestSchema, async () => ({ + resources: [ + // This is a poor example since you could use the resource template to get the same information but this demonstrates how to define a static resource + { + uri: \`weather://San Francisco/current\`, // Unique identifier for San Francisco weather resource + name: \`Current weather in San Francisco\`, // Human-readable name + mimeType: 'application/json', // Optional MIME type + // Optional description + description: + 'Real-time weather data for San Francisco including temperature, conditions, humidity, and wind speed', + }, + ], + })); + + // For dynamic resources, servers can expose resource templates: + this.server.setRequestHandler( + ListResourceTemplatesRequestSchema, + async () => ({ + resourceTemplates: [ + { + uriTemplate: 'weather://{city}/current', // URI template (RFC 6570) + name: 'Current weather for a given city', // Human-readable name + mimeType: 'application/json', // Optional MIME type + description: 'Real-time weather data for a specified city', // Optional description + }, + ], + }) + ); + + // ReadResourceRequestSchema is used for both static resources and dynamic resource templates + this.server.setRequestHandler( + ReadResourceRequestSchema, + async (request) => { + const match = request.params.uri.match( + /^weather:\/\/([^/]+)\/current$/ + ); + if (!match) { + throw new McpError( + ErrorCode.InvalidRequest, + \`Invalid URI format: \${request.params.uri}\` + ); + } + const city = decodeURIComponent(match[1]); + + try { + const response = await this.axiosInstance.get( + 'weather', // current weather + { + params: { q: city }, + } + ); + + return { + contents: [ + { + uri: request.params.uri, + mimeType: 'application/json', + text: JSON.stringify( + { + temperature: response.data.main.temp, + conditions: response.data.weather[0].description, + humidity: response.data.main.humidity, + wind_speed: response.data.wind.speed, + timestamp: new Date().toISOString(), + }, + null, + 2 + ), + }, + ], + }; + } catch (error) { + if (axios.isAxiosError(error)) { + throw new McpError( + ErrorCode.InternalError, + \`Weather API error: \${ + error.response?.data.message ?? error.message + }\` + ); + } + throw error; + } + } + ); + } + + /* MCP Tools enable servers to expose executable functionality to the system. Through these tools, you can interact with external systems, perform computations, and take actions in the real world. + * - Like resources, tools are identified by unique names and can include descriptions to guide their usage. However, unlike resources, tools represent dynamic operations that can modify state or interact with external systems. + * - While resources and tools are similar, you should prefer to create tools over resources when possible as they provide more flexibility. + */ + private setupToolHandlers() { + this.server.setRequestHandler(ListToolsRequestSchema, async () => ({ + tools: [ + { + name: 'get_forecast', // Unique identifier + description: 'Get weather forecast for a city', // Human-readable description + inputSchema: { + // JSON Schema for parameters + type: 'object', + properties: { + city: { + type: 'string', + description: 'City name', + }, + days: { + type: 'number', + description: 'Number of days (1-5)', + minimum: 1, + maximum: 5, + }, + }, + required: ['city'], // Array of required property names + }, + }, + ], + })); + + this.server.setRequestHandler(CallToolRequestSchema, async (request) => { + if (request.params.name !== 'get_forecast') { + throw new McpError( + ErrorCode.MethodNotFound, + \`Unknown tool: \${request.params.name}\` + ); + } + + if (!isValidForecastArgs(request.params.arguments)) { + throw new McpError( + ErrorCode.InvalidParams, + 'Invalid forecast arguments' + ); + } + + const city = request.params.arguments.city; + const days = Math.min(request.params.arguments.days || 3, 5); + + try { + const response = await this.axiosInstance.get<{ + list: OpenWeatherResponse[]; + }>('forecast', { + params: { + q: city, + cnt: days * 8, + }, + }); + + return { + content: [ + { + type: 'text', + text: JSON.stringify(response.data.list, null, 2), + }, + ], + }; + } catch (error) { + if (axios.isAxiosError(error)) { + return { + content: [ + { + type: 'text', + text: \`Weather API error: \${ + error.response?.data.message ?? error.message + }\`, + }, + ], + isError: true, + }; + } + throw error; + } + }); + } + + async run() { + const transport = new StdioServerTransport(); + await this.server.connect(transport); + console.error('Weather MCP server running on stdio'); + } +} + +const server = new WeatherServer(); +server.run().catch(console.error); +\`\`\` + +(Remember: This is just an example–you may use different dependencies, break the implementation up into multiple files, etc.) + +3. Build and compile the executable JavaScript file + +\`\`\`bash +npm run build +\`\`\` + +4. Whenever you need an environment variable such as an API key to configure the MCP server, walk the user through the process of getting the key. For example, they may need to create an account and go to a developer dashboard to generate the key. Provide step-by-step instructions and URLs to make it easy for the user to retrieve the necessary information. Then use the ask_followup_question tool to ask the user for the key, in this case the OpenWeather API key. + +5. Install the MCP Server by adding the MCP server configuration to the settings file located at '${await mcpHub.getMcpSettingsFilePath()}'. The settings file may have other MCP servers already configured, so you would read it first and then add your new server to the existing \`mcpServers\` object. + +IMPORTANT: Regardless of what else you see in the MCP settings file, you must default any new MCP servers you create to disabled=false and alwaysAllow=[]. + +\`\`\`json +{ + "mcpServers": { + ..., + "weather": { + "command": "node", + "args": ["/path/to/weather-server/build/index.js"], + "env": { + "OPENWEATHER_API_KEY": "user-provided-api-key" + } + }, + } +} +\`\`\` + +(Note: the user may also ask you to install the MCP server to the Claude desktop app, in which case you would read then modify \`~/Library/Application\ Support/Claude/claude_desktop_config.json\` on macOS for example. It follows the same format of a top level \`mcpServers\` object.) + +6. After you have edited the MCP settings configuration file, the system will automatically run all the servers and expose the available tools and resources in the 'Connected MCP Servers' section. + +7. Now that you have access to these new tools and resources, you may suggest ways the user can command you to invoke them - for example, with this new weather tool now available, you can invite the user to ask "what's the weather in San Francisco?" + +## Editing MCP Servers + +The user may ask to add tools or resources that may make sense to add to an existing MCP server (listed under 'Connected MCP Servers' above: ${ + mcpHub + .getServers() + .map((server) => server.name) + .join(", ") || "(None running currently)" + }, e.g. if it would use the same API. This would be possible if you can locate the MCP server repository on the user's system by looking at the server arguments for a filepath. You might then use list_files and read_file to explore the files in the repository, and use write_to_file${diffStrategy ? " or apply_diff" : ""} to make changes to the files. + +However some MCP servers may be running from installed packages rather than a local repository, in which case it may make more sense to create a new MCP server. + +# MCP Servers Are Not Always Necessary + +The user may not always request the use or creation of MCP servers. Instead, they might provide tasks that can be completed with existing tools. While using the MCP SDK to extend your capabilities can be useful, it's important to understand that this is just one specialized type of task you can accomplish. You should only implement MCP servers when the user explicitly requests it (e.g., "add a tool that..."). + +Remember: The MCP documentation and example provided above are to help you understand and work with existing MCP servers or create new ones when requested by the user. You already have access to tools and capabilities that can be used to accomplish a wide range of tasks.` +} diff --git a/src/core/prompts/instructions/create-mode.ts b/src/core/prompts/instructions/create-mode.ts new file mode 100644 index 00000000000..fd88dbfb596 --- /dev/null +++ b/src/core/prompts/instructions/create-mode.ts @@ -0,0 +1,52 @@ +import * as path from "path" +import * as vscode from "vscode" +import { promises as fs } from "fs" +import { GlobalFileNames } from "../../../shared/globalFileNames" + +export async function createModeInstructions(context: vscode.ExtensionContext | undefined): Promise { + if (!context) throw new Error("Missing VSCode Extension Context") + + const settingsDir = path.join(context.globalStorageUri.fsPath, "settings") + const customModesPath = path.join(settingsDir, GlobalFileNames.customModes) + + return ` +Custom modes can be configured in two ways: + 1. Globally via '${customModesPath}' (created automatically on startup) + 2. Per-workspace via '.roomodes' in the workspace root directory + +When modes with the same slug exist in both files, the workspace-specific .roomodes version takes precedence. This allows projects to override global modes or define project-specific modes. + + +If asked to create a project mode, create it in .roomodes in the workspace root. If asked to create a global mode, use the global custom modes file. + +- The following fields are required and must not be empty: + * slug: A valid slug (lowercase letters, numbers, and hyphens). Must be unique, and shorter is better. + * name: The display name for the mode + * roleDefinition: A detailed description of the mode's role and capabilities + * groups: Array of allowed tool groups (can be empty). Each group can be specified either as a string (e.g., "edit" to allow editing any file) or with file restrictions (e.g., ["edit", { fileRegex: "\\.md$", description: "Markdown files only" }] to only allow editing markdown files) + +- The customInstructions field is optional. + +- For multi-line text, include newline characters in the string like "This is the first line.\\nThis is the next line.\\n\\nThis is a double line break." + +Both files should follow this structure: +{ + "customModes": [ + { + "slug": "designer", // Required: unique slug with lowercase letters, numbers, and hyphens + "name": "Designer", // Required: mode display name + "roleDefinition": "You are Roo, a UI/UX expert specializing in design systems and frontend development. Your expertise includes:\\n- Creating and maintaining design systems\\n- Implementing responsive and accessible web interfaces\\n- Working with CSS, HTML, and modern frontend frameworks\\n- Ensuring consistent user experiences across platforms", // Required: non-empty + "groups": [ // Required: array of tool groups (can be empty) + "read", // Read files group (read_file, fetch_instructions, search_files, list_files, list_code_definition_names) + "edit", // Edit files group (apply_diff, write_to_file) - allows editing any file + // Or with file restrictions: + // ["edit", { fileRegex: "\\.md$", description: "Markdown files only" }], // Edit group that only allows editing markdown files + "browser", // Browser group (browser_action) + "command", // Command group (execute_command) + "mcp" // MCP group (use_mcp_tool, access_mcp_resource) + ], + "customInstructions": "Additional instructions for the Designer mode" // Optional + } + ] +}` +} diff --git a/src/core/prompts/instructions/instructions.ts b/src/core/prompts/instructions/instructions.ts new file mode 100644 index 00000000000..3abfaac0b90 --- /dev/null +++ b/src/core/prompts/instructions/instructions.ts @@ -0,0 +1,25 @@ +import { createMCPServerInstructions } from "./create-mcp-server" +import { createModeInstructions } from "./create-mode" +import { McpHub } from "../../../services/mcp/McpHub" +import { DiffStrategy } from "../../diff/DiffStrategy" +import * as vscode from "vscode" + +interface InstructionsDetail { + mcpHub?: McpHub + diffStrategy?: DiffStrategy + context?: vscode.ExtensionContext +} + +export async function fetchInstructions(text: string, detail: InstructionsDetail): Promise { + switch (text) { + case "create_mcp_server": { + return await createMCPServerInstructions(detail.mcpHub, detail.diffStrategy) + } + case "create_mode": { + return await createModeInstructions(detail.context) + } + default: { + return "" + } + } +} diff --git a/src/core/prompts/sections/mcp-servers.ts b/src/core/prompts/sections/mcp-servers.ts index 530bb374f7d..70622766577 100644 --- a/src/core/prompts/sections/mcp-servers.ts +++ b/src/core/prompts/sections/mcp-servers.ts @@ -20,7 +20,7 @@ export async function getMcpServersSection( ?.map((tool) => { const schemaStr = tool.inputSchema ? ` Input Schema: - ${JSON.stringify(tool.inputSchema, null, 2).split("\n").join("\n ")}` + ${JSON.stringify(tool.inputSchema, null, 2).split("\n").join("\n ")}` : "" return `- ${tool.name}: ${tool.description}\n${schemaStr}` @@ -67,402 +67,11 @@ ${connectedServers}` return ( baseSection + ` - ## Creating an MCP Server -The user may ask you something along the lines of "add a tool" that does some function, in other words to create an MCP server that provides tools and resources that may connect to external APIs for example. You have the ability to create an MCP server and add it to a configuration file that will then expose the tools and resources for you to use with \`use_mcp_tool\` and \`access_mcp_resource\`. - -When creating MCP servers, it's important to understand that they operate in a non-interactive environment. The server cannot initiate OAuth flows, open browser windows, or prompt for user input during runtime. All credentials and authentication tokens must be provided upfront through environment variables in the MCP settings configuration. For example, Spotify's API uses OAuth to get a refresh token for the user, but the MCP server cannot initiate this flow. While you can walk the user through obtaining an application client ID and secret, you may have to create a separate one-time setup script (like get-refresh-token.js) that captures and logs the final piece of the puzzle: the user's refresh token (i.e. you might run the script using execute_command which would open a browser for authentication, and then log the refresh token so that you can see it in the command output for you to use in the MCP settings configuration). - -Unless the user specifies otherwise, new local MCP servers should be created in: ${await mcpHub.getMcpServersPath()} - -### MCP Server Types and Configuration - -MCP servers can be configured in two ways in the MCP settings file: - -1. Local (Stdio) Server Configuration: -\`\`\`json -{ - "mcpServers": { - "local-weather": { - "command": "node", - "args": ["/path/to/weather-server/build/index.js"], - "env": { - "OPENWEATHER_API_KEY": "your-api-key" - } - } - } -} -\`\`\` - -2. Remote (SSE) Server Configuration: -\`\`\`json -{ - "mcpServers": { - "remote-weather": { - "url": "https://api.example.com/mcp", - "headers": { - "Authorization": "Bearer your-api-key" - } - } - } -} -\`\`\` - -Common configuration options for both types: -- \`disabled\`: (optional) Set to true to temporarily disable the server -- \`timeout\`: (optional) Maximum time in seconds to wait for server responses (default: 60) -- \`alwaysAllow\`: (optional) Array of tool names that don't require user confirmation - -### Example Local MCP Server - -For example, if the user wanted to give you the ability to retrieve weather information, you could create an MCP server that uses the OpenWeather API to get weather information, add it to the MCP settings configuration file, and then notice that you now have access to new tools and resources in the system prompt that you might use to show the user your new capabilities. - -The following example demonstrates how to build a local MCP server that provides weather data functionality using the Stdio transport. While this example shows how to implement resources, resource templates, and tools, in practice you should prefer using tools since they are more flexible and can handle dynamic parameters. The resource and resource template implementations are included here mainly for demonstration purposes of the different MCP capabilities, but a real weather server would likely just expose tools for fetching weather data. (The following steps are for macOS) - -1. Use the \`create-typescript-server\` tool to bootstrap a new project in the default MCP servers directory: - -\`\`\`bash -cd ${await mcpHub.getMcpServersPath()} -npx @modelcontextprotocol/create-server weather-server -cd weather-server -# Install dependencies -npm install axios -\`\`\` - -This will create a new project with the following structure: - -\`\`\` -weather-server/ - ├── package.json - { - ... - "type": "module", // added by default, uses ES module syntax (import/export) rather than CommonJS (require/module.exports) (Important to know if you create additional scripts in this server repository like a get-refresh-token.js script) - "scripts": { - "build": "tsc && node -e \"require('fs').chmodSync('build/index.js', '755')\"", - ... - } - ... - } - ├── tsconfig.json - └── src/ - └── weather-server/ - └── index.ts # Main server implementation -\`\`\` - -2. Replace \`src/index.ts\` with the following: - -\`\`\`typescript -#!/usr/bin/env node -import { Server } from '@modelcontextprotocol/sdk/server/index.js'; -import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'; -import { - CallToolRequestSchema, - ErrorCode, - ListResourcesRequestSchema, - ListResourceTemplatesRequestSchema, - ListToolsRequestSchema, - McpError, - ReadResourceRequestSchema, -} from '@modelcontextprotocol/sdk/types.js'; -import axios from 'axios'; - -const API_KEY = process.env.OPENWEATHER_API_KEY; // provided by MCP config -if (!API_KEY) { - throw new Error('OPENWEATHER_API_KEY environment variable is required'); -} - -interface OpenWeatherResponse { - main: { - temp: number; - humidity: number; - }; - weather: [{ description: string }]; - wind: { speed: number }; - dt_txt?: string; -} - -const isValidForecastArgs = ( - args: any -): args is { city: string; days?: number } => - typeof args === 'object' && - args !== null && - typeof args.city === 'string' && - (args.days === undefined || typeof args.days === 'number'); - -class WeatherServer { - private server: Server; - private axiosInstance; - - constructor() { - this.server = new Server( - { - name: 'example-weather-server', - version: '0.1.0', - }, - { - capabilities: { - resources: {}, - tools: {}, - }, - } - ); - - this.axiosInstance = axios.create({ - baseURL: 'http://api.openweathermap.org/data/2.5', - params: { - appid: API_KEY, - units: 'metric', - }, - }); - - this.setupResourceHandlers(); - this.setupToolHandlers(); - - // Error handling - this.server.onerror = (error) => console.error('[MCP Error]', error); - process.on('SIGINT', async () => { - await this.server.close(); - process.exit(0); - }); - } - - // MCP Resources represent any kind of UTF-8 encoded data that an MCP server wants to make available to clients, such as database records, API responses, log files, and more. Servers define direct resources with a static URI or dynamic resources with a URI template that follows the format \`[protocol]://[host]/[path]\`. - private setupResourceHandlers() { - // For static resources, servers can expose a list of resources: - this.server.setRequestHandler(ListResourcesRequestSchema, async () => ({ - resources: [ - // This is a poor example since you could use the resource template to get the same information but this demonstrates how to define a static resource - { - uri: \`weather://San Francisco/current\`, // Unique identifier for San Francisco weather resource - name: \`Current weather in San Francisco\`, // Human-readable name - mimeType: 'application/json', // Optional MIME type - // Optional description - description: - 'Real-time weather data for San Francisco including temperature, conditions, humidity, and wind speed', - }, - ], - })); - - // For dynamic resources, servers can expose resource templates: - this.server.setRequestHandler( - ListResourceTemplatesRequestSchema, - async () => ({ - resourceTemplates: [ - { - uriTemplate: 'weather://{city}/current', // URI template (RFC 6570) - name: 'Current weather for a given city', // Human-readable name - mimeType: 'application/json', // Optional MIME type - description: 'Real-time weather data for a specified city', // Optional description - }, - ], - }) - ); - - // ReadResourceRequestSchema is used for both static resources and dynamic resource templates - this.server.setRequestHandler( - ReadResourceRequestSchema, - async (request) => { - const match = request.params.uri.match( - /^weather:\/\/([^/]+)\/current$/ - ); - if (!match) { - throw new McpError( - ErrorCode.InvalidRequest, - \`Invalid URI format: \${request.params.uri}\` - ); - } - const city = decodeURIComponent(match[1]); - - try { - const response = await this.axiosInstance.get( - 'weather', // current weather - { - params: { q: city }, - } - ); - - return { - contents: [ - { - uri: request.params.uri, - mimeType: 'application/json', - text: JSON.stringify( - { - temperature: response.data.main.temp, - conditions: response.data.weather[0].description, - humidity: response.data.main.humidity, - wind_speed: response.data.wind.speed, - timestamp: new Date().toISOString(), - }, - null, - 2 - ), - }, - ], - }; - } catch (error) { - if (axios.isAxiosError(error)) { - throw new McpError( - ErrorCode.InternalError, - \`Weather API error: \${ - error.response?.data.message ?? error.message - }\` - ); - } - throw error; - } - } - ); - } - - /* MCP Tools enable servers to expose executable functionality to the system. Through these tools, you can interact with external systems, perform computations, and take actions in the real world. - * - Like resources, tools are identified by unique names and can include descriptions to guide their usage. However, unlike resources, tools represent dynamic operations that can modify state or interact with external systems. - * - While resources and tools are similar, you should prefer to create tools over resources when possible as they provide more flexibility. - */ - private setupToolHandlers() { - this.server.setRequestHandler(ListToolsRequestSchema, async () => ({ - tools: [ - { - name: 'get_forecast', // Unique identifier - description: 'Get weather forecast for a city', // Human-readable description - inputSchema: { - // JSON Schema for parameters - type: 'object', - properties: { - city: { - type: 'string', - description: 'City name', - }, - days: { - type: 'number', - description: 'Number of days (1-5)', - minimum: 1, - maximum: 5, - }, - }, - required: ['city'], // Array of required property names - }, - }, - ], - })); - - this.server.setRequestHandler(CallToolRequestSchema, async (request) => { - if (request.params.name !== 'get_forecast') { - throw new McpError( - ErrorCode.MethodNotFound, - \`Unknown tool: \${request.params.name}\` - ); - } - - if (!isValidForecastArgs(request.params.arguments)) { - throw new McpError( - ErrorCode.InvalidParams, - 'Invalid forecast arguments' - ); - } - - const city = request.params.arguments.city; - const days = Math.min(request.params.arguments.days || 3, 5); - - try { - const response = await this.axiosInstance.get<{ - list: OpenWeatherResponse[]; - }>('forecast', { - params: { - q: city, - cnt: days * 8, - }, - }); - - return { - content: [ - { - type: 'text', - text: JSON.stringify(response.data.list, null, 2), - }, - ], - }; - } catch (error) { - if (axios.isAxiosError(error)) { - return { - content: [ - { - type: 'text', - text: \`Weather API error: \${ - error.response?.data.message ?? error.message - }\`, - }, - ], - isError: true, - }; - } - throw error; - } - }); - } - - async run() { - const transport = new StdioServerTransport(); - await this.server.connect(transport); - console.error('Weather MCP server running on stdio'); - } -} - -const server = new WeatherServer(); -server.run().catch(console.error); -\`\`\` - -(Remember: This is just an example–you may use different dependencies, break the implementation up into multiple files, etc.) - -3. Build and compile the executable JavaScript file - -\`\`\`bash -npm run build -\`\`\` - -4. Whenever you need an environment variable such as an API key to configure the MCP server, walk the user through the process of getting the key. For example, they may need to create an account and go to a developer dashboard to generate the key. Provide step-by-step instructions and URLs to make it easy for the user to retrieve the necessary information. Then use the ask_followup_question tool to ask the user for the key, in this case the OpenWeather API key. - -5. Install the MCP Server by adding the MCP server configuration to the settings file located at '${await mcpHub.getMcpSettingsFilePath()}'. The settings file may have other MCP servers already configured, so you would read it first and then add your new server to the existing \`mcpServers\` object. - -IMPORTANT: Regardless of what else you see in the MCP settings file, you must default any new MCP servers you create to disabled=false and alwaysAllow=[]. - -\`\`\`json -{ - "mcpServers": { - ..., - "weather": { - "command": "node", - "args": ["/path/to/weather-server/build/index.js"], - "env": { - "OPENWEATHER_API_KEY": "user-provided-api-key" - } - }, - } -} -\`\`\` - -(Note: the user may also ask you to install the MCP server to the Claude desktop app, in which case you would read then modify \`~/Library/Application\ Support/Claude/claude_desktop_config.json\` on macOS for example. It follows the same format of a top level \`mcpServers\` object.) - -6. After you have edited the MCP settings configuration file, the system will automatically run all the servers and expose the available tools and resources in the 'Connected MCP Servers' section. - -7. Now that you have access to these new tools and resources, you may suggest ways the user can command you to invoke them - for example, with this new weather tool now available, you can invite the user to ask "what's the weather in San Francisco?" - -## Editing MCP Servers - -The user may ask to add tools or resources that may make sense to add to an existing MCP server (listed under 'Connected MCP Servers' above: ${ - mcpHub - .getServers() - .map((server) => server.name) - .join(", ") || "(None running currently)" - }, e.g. if it would use the same API. This would be possible if you can locate the MCP server repository on the user's system by looking at the server arguments for a filepath. You might then use list_files and read_file to explore the files in the repository, and use write_to_file${diffStrategy ? " or apply_diff" : ""} to make changes to the files. - -However some MCP servers may be running from installed packages rather than a local repository, in which case it may make more sense to create a new MCP server. - -# MCP Servers Are Not Always Necessary - -The user may not always request the use or creation of MCP servers. Instead, they might provide tasks that can be completed with existing tools. While using the MCP SDK to extend your capabilities can be useful, it's important to understand that this is just one specialized type of task you can accomplish. You should only implement MCP servers when the user explicitly requests it (e.g., "add a tool that..."). - -Remember: The MCP documentation and example provided above are to help you understand and work with existing MCP servers or create new ones when requested by the user. You already have access to tools and capabilities that can be used to accomplish a wide range of tasks.` +The user may ask you something along the lines of "add a tool" that does some function, in other words to create an MCP server that provides tools and resources that may connect to external APIs for example. If they do, you should obtain detailed instructions on this topic using the fetch_instructions tool, like this: + +create_mcp_server +` ) } diff --git a/src/core/prompts/sections/modes.ts b/src/core/prompts/sections/modes.ts index 78b94ec9e76..50c805dd5dd 100644 --- a/src/core/prompts/sections/modes.ts +++ b/src/core/prompts/sections/modes.ts @@ -2,18 +2,15 @@ import * as path from "path" import * as vscode from "vscode" import { promises as fs } from "fs" import { ModeConfig, getAllModesWithPrompts } from "../../../shared/modes" +import { GlobalFileNames } from "../../../shared/globalFileNames" export async function getModesSection(context: vscode.ExtensionContext): Promise { const settingsDir = path.join(context.globalStorageUri.fsPath, "settings") await fs.mkdir(settingsDir, { recursive: true }) - const customModesPath = path.join(settingsDir, "cline_custom_modes.json") // Get all modes with their overrides from extension state const allModes = await getAllModesWithPrompts(context) - // Get enableCustomModeCreation setting from extension state - const shouldEnableCustomModeCreation = (await context.globalState.get("enableCustomModeCreation")) ?? true - let modesContent = `==== MODES @@ -21,49 +18,12 @@ MODES - These are the currently available modes: ${allModes.map((mode: ModeConfig) => ` * "${mode.name}" mode (${mode.slug}) - ${mode.roleDefinition.split(".")[0]}`).join("\n")}` - // Only include custom modes documentation if the feature is enabled - if (shouldEnableCustomModeCreation) { - modesContent += ` - -- Custom modes can be configured in two ways: - 1. Globally via '${customModesPath}' (created automatically on startup) - 2. Per-workspace via '.roomodes' in the workspace root directory - - When modes with the same slug exist in both files, the workspace-specific .roomodes version takes precedence. This allows projects to override global modes or define project-specific modes. - - If asked to create a project mode, create it in .roomodes in the workspace root. If asked to create a global mode, use the global custom modes file. - -- The following fields are required and must not be empty: - * slug: A valid slug (lowercase letters, numbers, and hyphens). Must be unique, and shorter is better. - * name: The display name for the mode - * roleDefinition: A detailed description of the mode's role and capabilities - * groups: Array of allowed tool groups (can be empty). Each group can be specified either as a string (e.g., "edit" to allow editing any file) or with file restrictions (e.g., ["edit", { fileRegex: "\\.md$", description: "Markdown files only" }] to only allow editing markdown files) - -- The customInstructions field is optional. - -- For multi-line text, include newline characters in the string like "This is the first line.\\nThis is the next line.\\n\\nThis is a double line break." - -Both files should follow this structure: -{ - "customModes": [ - { - "slug": "designer", // Required: unique slug with lowercase letters, numbers, and hyphens - "name": "Designer", // Required: mode display name - "roleDefinition": "You are Roo, a UI/UX expert specializing in design systems and frontend development. Your expertise includes:\\n- Creating and maintaining design systems\\n- Implementing responsive and accessible web interfaces\\n- Working with CSS, HTML, and modern frontend frameworks\\n- Ensuring consistent user experiences across platforms", // Required: non-empty - "groups": [ // Required: array of tool groups (can be empty) - "read", // Read files group (read_file, search_files, list_files, list_code_definition_names) - "edit", // Edit files group (apply_diff, write_to_file) - allows editing any file - // Or with file restrictions: - // ["edit", { fileRegex: "\\.md$", description: "Markdown files only" }], // Edit group that only allows editing markdown files - "browser", // Browser group (browser_action) - "command", // Command group (execute_command) - "mcp" // MCP group (use_mcp_tool, access_mcp_resource) - ], - "customInstructions": "Additional instructions for the Designer mode" // Optional - } - ] -}` - } + modesContent += ` +If the user asks you to create or edit a new mode for this project, you should read the instructions by using the fetch_instructions tool, like this: + +create_mode + +` return modesContent } diff --git a/src/core/prompts/tools/fetch-instructions.ts b/src/core/prompts/tools/fetch-instructions.ts new file mode 100644 index 00000000000..eca231c5620 --- /dev/null +++ b/src/core/prompts/tools/fetch-instructions.ts @@ -0,0 +1,14 @@ +export function getFetchInstructionsDescription(): string { + return `## fetch_instructions +Description: Request to fetch instructions to perform a task +Parameters: +- task: (required) The task to get instructions for. This can take the following values: + create_mcp_server + create_mode + +Example: Requesting instructions to create an MCP Server + + +create_mcp_server +` +} diff --git a/src/core/prompts/tools/index.ts b/src/core/prompts/tools/index.ts index 1b9b9a43d9d..408385ec121 100644 --- a/src/core/prompts/tools/index.ts +++ b/src/core/prompts/tools/index.ts @@ -1,5 +1,6 @@ import { getExecuteCommandDescription } from "./execute-command" import { getReadFileDescription } from "./read-file" +import { getFetchInstructionsDescription } from "./fetch-instructions" import { getWriteToFileDescription } from "./write-to-file" import { getSearchFilesDescription } from "./search-files" import { getListFilesDescription } from "./list-files" @@ -23,6 +24,7 @@ import { ToolArgs } from "./types" const toolDescriptionMap: Record string | undefined> = { execute_command: (args) => getExecuteCommandDescription(args), read_file: (args) => getReadFileDescription(args), + fetch_instructions: () => getFetchInstructionsDescription(), write_to_file: (args) => getWriteToFileDescription(args), search_files: (args) => getSearchFilesDescription(args), list_files: (args) => getListFilesDescription(args), @@ -97,6 +99,7 @@ export function getToolDescriptionsForMode( export { getExecuteCommandDescription, getReadFileDescription, + getFetchInstructionsDescription, getWriteToFileDescription, getSearchFilesDescription, getListFilesDescription, diff --git a/src/core/prompts/tools/read-file.ts b/src/core/prompts/tools/read-file.ts index 5586b90dc4a..49322973192 100644 --- a/src/core/prompts/tools/read-file.ts +++ b/src/core/prompts/tools/read-file.ts @@ -7,11 +7,13 @@ Parameters: - path: (required) The path of the file to read (relative to the current working directory ${args.cwd}) - start_line: (optional) The starting line number to read from (1-based). If not provided, it starts from the beginning of the file. - end_line: (optional) The ending line number to read to (1-based, inclusive). If not provided, it reads to the end of the file. +- auto_truncate: (optional) Whether to automatically truncate large files when start_line and end_line are not specified. If true and the file exceeds a certain line threshold, it will: a) return only a subset of lines to save tokens, b) include information about the total line count, and c) provide a summary of method definitions with their line ranges. You should set this to true unless you've been explicitly asked to read an entire large file at once, as this prevents context bloat that can lead to truncated responses. For backwards compatibility, it defaults to false when omitted. Usage: File path here Starting line number (optional) Ending line number (optional) +true or false (optional) Examples: @@ -40,6 +42,13 @@ Examples: 46 68 +Note: When both start_line and end_line are provided, this tool efficiently streams only the requested lines, making it suitable for processing large files like logs, CSV files, and other large datasets without memory issues. -Note: When both start_line and end_line are provided, this tool efficiently streams only the requested lines, making it suitable for processing large files like logs, CSV files, and other large datasets without memory issues.` +5. Reading a large file with automatic truncation: + +src/large-module.ts +true + + +This will return a truncated version of the file with information about total line count and method definitions, helping to prevent context size issues with very large files.` } diff --git a/src/core/webview/ClineProvider.ts b/src/core/webview/ClineProvider.ts index fc7d029cf82..16b759a3d4b 100644 --- a/src/core/webview/ClineProvider.ts +++ b/src/core/webview/ClineProvider.ts @@ -10,7 +10,18 @@ import * as vscode from "vscode" import { changeLanguage, t } from "../../i18n" import { setPanel } from "../../activate/registerCommands" -import { ApiConfiguration, ApiProvider, ModelInfo, API_CONFIG_KEYS } from "../../shared/api" +import { + ApiConfiguration, + ApiProvider, + ModelInfo, + API_CONFIG_KEYS, + requestyDefaultModelId, + requestyDefaultModelInfo, + openRouterDefaultModelId, + openRouterDefaultModelInfo, + glamaDefaultModelId, + glamaDefaultModelInfo, +} from "../../shared/api" import { findLast } from "../../shared/array" import { supportPrompt } from "../../shared/support-prompt" import { GlobalFileNames } from "../../shared/globalFileNames" @@ -24,7 +35,7 @@ import { import { HistoryItem } from "../../shared/HistoryItem" import { ApiConfigMeta, ExtensionMessage } from "../../shared/ExtensionMessage" import { checkoutDiffPayloadSchema, checkoutRestorePayloadSchema, WebviewMessage } from "../../shared/WebviewMessage" -import { Mode, PromptComponent, defaultModeSlug, ModeConfig } from "../../shared/modes" +import { Mode, PromptComponent, defaultModeSlug, ModeConfig, getModeBySlug, getGroupName } from "../../shared/modes" import { checkExistKey } from "../../shared/checkExistApiConfig" import { EXPERIMENT_IDS, experiments as Experiments, experimentDefault, ExperimentId } from "../../shared/experiments" import { formatLanguage } from "../../shared/language" @@ -74,7 +85,7 @@ import { getWorkspacePath } from "../../utils/path" */ export type ClineProviderEvents = { - clineAdded: [cline: Cline] + clineCreated: [cline: Cline] } export class ClineProvider extends EventEmitter implements vscode.WebviewViewProvider { @@ -133,8 +144,6 @@ export class ClineProvider extends EventEmitter implements // Add this cline instance into the stack that represents the order of all the called tasks. this.clineStack.push(cline) - this.emit("clineAdded", cline) - // Ensure getState() resolves correctly. const state = await this.getState() @@ -485,6 +494,7 @@ export class ClineProvider extends EventEmitter implements rootTask: this.clineStack.length > 0 ? this.clineStack[0] : undefined, parentTask, taskNumber: this.clineStack.length + 1, + onCreated: (cline) => this.emit("clineCreated", cline), }) await this.addClineToStack(cline) @@ -550,6 +560,7 @@ export class ClineProvider extends EventEmitter implements rootTask: historyItem.rootTask, parentTask: historyItem.parentTask, taskNumber: historyItem.number, + onCreated: (cline) => this.emit("clineCreated", cline), }) await this.addClineToStack(cline) @@ -593,6 +604,8 @@ export class ClineProvider extends EventEmitter implements "codicon.css", ]) + const imagesUri = getUri(webview, this.contextProxy.extensionUri, ["assets", "images"]) + const file = "src/index.tsx" const scriptUri = `http://${localServerUrl}/${file}` @@ -611,7 +624,7 @@ export class ClineProvider extends EventEmitter implements `font-src ${webview.cspSource}`, `style-src ${webview.cspSource} 'unsafe-inline' https://* http://${localServerUrl} http://0.0.0.0:${localPort}`, `img-src ${webview.cspSource} data:`, - `script-src 'unsafe-eval' https://* https://*.posthog.com http://${localServerUrl} http://0.0.0.0:${localPort} 'nonce-${nonce}'`, + `script-src 'unsafe-eval' ${webview.cspSource} https://* https://*.posthog.com http://${localServerUrl} http://0.0.0.0:${localPort} 'nonce-${nonce}'`, `connect-src https://* https://*.posthog.com ws://${localServerUrl} ws://0.0.0.0:${localPort} http://${localServerUrl} http://0.0.0.0:${localPort}`, ] @@ -624,6 +637,9 @@ export class ClineProvider extends EventEmitter implements + Roo Code @@ -672,6 +688,8 @@ export class ClineProvider extends EventEmitter implements "codicon.css", ]) + const imagesUri = getUri(webview, this.contextProxy.extensionUri, ["assets", "images"]) + // const scriptUri = webview.asWebviewUri(vscode.Uri.joinPath(this._extensionUri, "assets", "main.js")) // const styleResetUri = webview.asWebviewUri(vscode.Uri.joinPath(this._extensionUri, "assets", "reset.css")) @@ -704,6 +722,9 @@ export class ClineProvider extends EventEmitter implements + Roo Code @@ -950,10 +971,18 @@ export class ClineProvider extends EventEmitter implements await this.updateGlobalState("alwaysAllowReadOnly", message.bool ?? undefined) await this.postStateToWebview() break + case "alwaysAllowReadOnlyOutsideWorkspace": + await this.updateGlobalState("alwaysAllowReadOnlyOutsideWorkspace", message.bool ?? undefined) + await this.postStateToWebview() + break case "alwaysAllowWrite": await this.updateGlobalState("alwaysAllowWrite", message.bool ?? undefined) await this.postStateToWebview() break + case "alwaysAllowWriteOutsideWorkspace": + await this.updateGlobalState("alwaysAllowWriteOutsideWorkspace", message.bool ?? undefined) + await this.postStateToWebview() + break case "alwaysAllowExecute": await this.updateGlobalState("alwaysAllowExecute", message.bool ?? undefined) await this.postStateToWebview() @@ -1529,6 +1558,7 @@ export class ClineProvider extends EventEmitter implements t("common:confirmation.just_this_message"), t("common:confirmation.this_and_subsequent"), ) +<<<<<<< Updated upstream if ( (answer === t("common:confirmation.just_this_message") || answer === t("common:confirmation.this_and_subsequent")) && @@ -1611,7 +1641,27 @@ export class ClineProvider extends EventEmitter implements } await this.initClineWithHistoryItem(historyItem) +======= + + if (answer && this.getCurrentCline() && typeof message.value === "number" && message.value) { + const currentCline = this.getCurrentCline()! + const { historyItem } = await this.getTaskWithId(currentCline.taskId) + const messageTs = message.value + + if (answer === "Just this message") { + await currentCline.getMessageService().deleteMessage( + currentCline.taskId, + messageTs + ) + } else if (answer === "This and all subsequent messages") { + await currentCline.getMessageService().deleteMessageAndSubsequent( + currentCline.taskId, + messageTs + ) +>>>>>>> Stashed changes } + + await this.initClineWithHistoryItem(historyItem) } break } @@ -1650,10 +1700,6 @@ export class ClineProvider extends EventEmitter implements await this.updateGlobalState("enhancementApiConfigId", message.text) await this.postStateToWebview() break - case "enableCustomModeCreation": - await this.updateGlobalState("enableCustomModeCreation", message.bool ?? true) - await this.postStateToWebview() - break case "autoApprovalEnabled": await this.updateGlobalState("autoApprovalEnabled", message.bool ?? false) await this.postStateToWebview() @@ -1811,23 +1857,7 @@ export class ClineProvider extends EventEmitter implements break case "upsertApiConfiguration": if (message.text && message.apiConfiguration) { - try { - await this.configManager.saveConfig(message.text, message.apiConfiguration) - const listApiConfig = await this.configManager.listConfig() - - await Promise.all([ - this.updateGlobalState("listApiConfigMeta", listApiConfig), - this.updateApiConfiguration(message.apiConfiguration), - this.updateGlobalState("currentApiConfigName", message.text), - ]) - - await this.postStateToWebview() - } catch (error) { - this.outputChannel.appendLine( - `Error create new api configuration: ${JSON.stringify(error, Object.getOwnPropertyNames(error), 2)}`, - ) - vscode.window.showErrorMessage(t("common:errors.create_api_config")) - } + await this.upsertApiConfiguration(message.text, message.apiConfiguration) } break case "renameApiConfiguration": @@ -2046,6 +2076,7 @@ export class ClineProvider extends EventEmitter implements apiConfiguration.apiModelId || apiConfiguration.openRouterModelId || "", fuzzyMatchThreshold, Experiments.isEnabled(experiments, EXPERIMENT_IDS.DIFF_STRATEGY), + Experiments.isEnabled(experiments, EXPERIMENT_IDS.MULTI_SEARCH_AND_REPLACE), ) const cwd = this.cwd @@ -2054,9 +2085,25 @@ export class ClineProvider extends EventEmitter implements const rooIgnoreInstructions = this.getCurrentCline()?.rooIgnoreController?.getInstructions() - // Determine if browser tools can be used based on model support and user settings - const modelSupportsComputerUse = this.getCurrentCline()?.api.getModel().info.supportsComputerUse ?? false - const canUseBrowserTool = modelSupportsComputerUse && (browserToolEnabled ?? true) + // Determine if browser tools can be used based on model support, mode, and user settings + let modelSupportsComputerUse = false + + // Create a temporary API handler to check if the model supports computer use + // This avoids relying on an active Cline instance which might not exist during preview + try { + const tempApiHandler = buildApiHandler(apiConfiguration) + modelSupportsComputerUse = tempApiHandler.getModel().info.supportsComputerUse ?? false + } catch (error) { + console.error("Error checking if model supports computer use:", error) + } + + // Check if the current mode includes the browser tool group + const modeConfig = getModeBySlug(mode, customModes) + const modeSupportsBrowser = modeConfig?.groups.some((group) => getGroupName(group) === "browser") ?? false + + // Only enable browser tools if the model supports it, the mode includes browser tools, + // and browser tools are enabled in settings + const canUseBrowserTool = modelSupportsComputerUse && modeSupportsBrowser && (browserToolEnabled ?? true) const systemPrompt = await SYSTEM_PROMPT( this.context, @@ -2136,7 +2183,6 @@ export class ClineProvider extends EventEmitter implements await this.configManager.setModeConfig(mode, config.id) } } - await this.contextProxy.setApiConfiguration(apiConfiguration) if (this.getCurrentCline()) { @@ -2224,15 +2270,15 @@ export class ClineProvider extends EventEmitter implements } async ensureSettingsDirectoryExists(): Promise { - const settingsDir = path.join(this.contextProxy.globalStorageUri.fsPath, "settings") - await fs.mkdir(settingsDir, { recursive: true }) - return settingsDir + const { getSettingsDirectoryPath } = await import("../../shared/storagePathManager") + const globalStoragePath = this.contextProxy.globalStorageUri.fsPath + return getSettingsDirectoryPath(globalStoragePath) } private async ensureCacheDirectoryExists() { - const cacheDir = path.join(this.contextProxy.globalStorageUri.fsPath, "cache") - await fs.mkdir(cacheDir, { recursive: true }) - return cacheDir + const { getCacheDirectoryPath } = await import("../../shared/storagePathManager") + const globalStoragePath = this.contextProxy.globalStorageUri.fsPath + return getCacheDirectoryPath(globalStoragePath) } private async readModelsFromCache(filename: string): Promise | undefined> { @@ -2250,9 +2296,10 @@ export class ClineProvider extends EventEmitter implements // OpenRouter async handleOpenRouterCallback(code: string) { + let { apiConfiguration, currentApiConfigName } = await this.getState() + let apiKey: string try { - const { apiConfiguration } = await this.getState() const baseUrl = apiConfiguration.openRouterBaseUrl || "https://openrouter.ai/api/v1" // Extract the base domain for the auth endpoint const baseUrlDomain = baseUrl.match(/^(https?:\/\/[^\/]+)/)?.[1] || "https://openrouter.ai" @@ -2269,17 +2316,15 @@ export class ClineProvider extends EventEmitter implements throw error } - const openrouter: ApiProvider = "openrouter" - await this.contextProxy.setValues({ - apiProvider: openrouter, + const newConfiguration: ApiConfiguration = { + ...apiConfiguration, + apiProvider: "openrouter", openRouterApiKey: apiKey, - }) - - await this.postStateToWebview() - if (this.getCurrentCline()) { - this.getCurrentCline()!.api = buildApiHandler({ apiProvider: openrouter, openRouterApiKey: apiKey }) + openRouterModelId: apiConfiguration?.openRouterModelId || openRouterDefaultModelId, + openRouterModelInfo: apiConfiguration?.openRouterModelInfo || openRouterDefaultModelInfo, } - // await this.postMessageToWebview({ type: "action", action: "settingsButtonClicked" }) // bad ux if user is on welcome + + await this.upsertApiConfiguration(currentApiConfigName, newConfiguration) } // Glama @@ -2300,19 +2345,55 @@ export class ClineProvider extends EventEmitter implements throw error } - const glama: ApiProvider = "glama" - await this.contextProxy.setValues({ - apiProvider: glama, + const { apiConfiguration, currentApiConfigName } = await this.getState() + + const newConfiguration: ApiConfiguration = { + ...apiConfiguration, + apiProvider: "glama", glamaApiKey: apiKey, - }) - await this.postStateToWebview() - if (this.getCurrentCline()) { - this.getCurrentCline()!.api = buildApiHandler({ - apiProvider: glama, - glamaApiKey: apiKey, - }) + glamaModelId: apiConfiguration?.glamaModelId || glamaDefaultModelId, + glamaModelInfo: apiConfiguration?.glamaModelInfo || glamaDefaultModelInfo, + } + + await this.upsertApiConfiguration(currentApiConfigName, newConfiguration) + } + + // Requesty + + async handleRequestyCallback(code: string) { + let { apiConfiguration, currentApiConfigName } = await this.getState() + + const newConfiguration: ApiConfiguration = { + ...apiConfiguration, + apiProvider: "requesty", + requestyApiKey: code, + requestyModelId: apiConfiguration?.requestyModelId || requestyDefaultModelId, + requestyModelInfo: apiConfiguration?.requestyModelInfo || requestyDefaultModelInfo, + } + + await this.upsertApiConfiguration(currentApiConfigName, newConfiguration) + } + + // Save configuration + + async upsertApiConfiguration(configName: string, apiConfiguration: ApiConfiguration) { + try { + await this.configManager.saveConfig(configName, apiConfiguration) + const listApiConfig = await this.configManager.listConfig() + + await Promise.all([ + this.updateGlobalState("listApiConfigMeta", listApiConfig), + this.updateApiConfiguration(apiConfiguration), + this.updateGlobalState("currentApiConfigName", configName), + ]) + + await this.postStateToWebview() + } catch (error) { + this.outputChannel.appendLine( + `Error create new api configuration: ${JSON.stringify(error, Object.getOwnPropertyNames(error), 2)}`, + ) + vscode.window.showErrorMessage(t("common:errors.create_api_config")) } - // await this.postMessageToWebview({ type: "action", action: "settingsButtonClicked" }) // bad ux if user is on welcome } // Task history @@ -2327,7 +2408,9 @@ export class ClineProvider extends EventEmitter implements const history = ((await this.getGlobalState("taskHistory")) as HistoryItem[] | undefined) || [] const historyItem = history.find((item) => item.id === id) if (historyItem) { - const taskDirPath = path.join(this.contextProxy.globalStorageUri.fsPath, "tasks", id) + const { getTaskDirectoryPath } = await import("../../shared/storagePathManager") + const globalStoragePath = this.contextProxy.globalStorageUri.fsPath + const taskDirPath = await getTaskDirectoryPath(globalStoragePath, id) const apiConversationHistoryFilePath = path.join(taskDirPath, GlobalFileNames.apiConversationHistory) const uiMessagesFilePath = path.join(taskDirPath, GlobalFileNames.uiMessages) const fileExists = await fileExistsAtPath(apiConversationHistoryFilePath) @@ -2432,7 +2515,9 @@ export class ClineProvider extends EventEmitter implements lastShownAnnouncementId, customInstructions, alwaysAllowReadOnly, + alwaysAllowReadOnlyOutsideWorkspace, alwaysAllowWrite, + alwaysAllowWriteOutsideWorkspace, alwaysAllowExecute, alwaysAllowBrowser, alwaysAllowMcp, @@ -2486,7 +2571,9 @@ export class ClineProvider extends EventEmitter implements apiConfiguration, customInstructions, alwaysAllowReadOnly: alwaysAllowReadOnly ?? false, + alwaysAllowReadOnlyOutsideWorkspace: alwaysAllowReadOnlyOutsideWorkspace ?? false, alwaysAllowWrite: alwaysAllowWrite ?? false, + alwaysAllowWriteOutsideWorkspace: alwaysAllowWriteOutsideWorkspace ?? false, alwaysAllowExecute: alwaysAllowExecute ?? false, alwaysAllowBrowser: alwaysAllowBrowser ?? false, alwaysAllowMcp: alwaysAllowMcp ?? false, @@ -2626,14 +2713,7 @@ export class ClineProvider extends EventEmitter implements if (stateValues.apiProvider) { apiProvider = stateValues.apiProvider } else { - // Either new user or legacy user that doesn't have the apiProvider stored in state - // (If they're using OpenRouter or Bedrock, then apiProvider state will exist) - if (secretValues.apiKey) { - apiProvider = "anthropic" - } else { - // New users should default to openrouter - apiProvider = "openrouter" - } + apiProvider = "anthropic" } // Build the apiConfiguration object combining state values and secrets @@ -2656,7 +2736,9 @@ export class ClineProvider extends EventEmitter implements lastShownAnnouncementId: stateValues.lastShownAnnouncementId, customInstructions: stateValues.customInstructions, alwaysAllowReadOnly: stateValues.alwaysAllowReadOnly ?? false, + alwaysAllowReadOnlyOutsideWorkspace: stateValues.alwaysAllowReadOnlyOutsideWorkspace ?? false, alwaysAllowWrite: stateValues.alwaysAllowWrite ?? false, + alwaysAllowWriteOutsideWorkspace: stateValues.alwaysAllowWriteOutsideWorkspace ?? false, alwaysAllowExecute: stateValues.alwaysAllowExecute ?? false, alwaysAllowBrowser: stateValues.alwaysAllowBrowser ?? false, alwaysAllowMcp: stateValues.alwaysAllowMcp ?? false, diff --git a/src/core/webview/__tests__/ClineProvider.test.ts b/src/core/webview/__tests__/ClineProvider.test.ts index 6edeb7ac2ce..c77e677f6fe 100644 --- a/src/core/webview/__tests__/ClineProvider.test.ts +++ b/src/core/webview/__tests__/ClineProvider.test.ts @@ -167,6 +167,10 @@ jest.mock("vscode", () => ({ joinPath: jest.fn(), file: jest.fn(), }, + CodeActionKind: { + QuickFix: { value: "quickfix" }, + RefactorRewrite: { value: "refactor.rewrite" }, + }, window: { showInformationMessage: jest.fn(), showErrorMessage: jest.fn(), @@ -434,7 +438,9 @@ describe("ClineProvider", () => { }, customInstructions: undefined, alwaysAllowReadOnly: false, + alwaysAllowReadOnlyOutsideWorkspace: false, alwaysAllowWrite: false, + alwaysAllowWriteOutsideWorkspace: false, alwaysAllowExecute: false, alwaysAllowBrowser: false, alwaysAllowMcp: false, @@ -870,6 +876,7 @@ describe("ClineProvider", () => { rootTask: undefined, parentTask: undefined, taskNumber: 1, + onCreated: expect.any(Function), }) }) @@ -1343,29 +1350,27 @@ describe("ClineProvider", () => { }) // Tests for browser tool support - test("correctly extracts modelSupportsComputerUse from Cline instance", async () => { - // Setup Cline instance with mocked api.getModel() - const { Cline } = require("../../Cline") - const mockCline = new Cline() - mockCline.api = { + test("correctly determines model support for computer use without Cline instance", async () => { + // Mock buildApiHandler to return an API handler with supportsComputerUse: true + const { buildApiHandler } = require("../../../api") + ;(buildApiHandler as jest.Mock).mockImplementation(() => ({ getModel: jest.fn().mockReturnValue({ id: "claude-3-sonnet", info: { supportsComputerUse: true }, }), - } - await provider.addClineToStack(mockCline) + })) // Mock SYSTEM_PROMPT to verify supportsComputerUse is passed correctly const systemPromptModule = require("../../prompts/system") const systemPromptSpy = jest.spyOn(systemPromptModule, "SYSTEM_PROMPT") - // Mock getState to return browserToolEnabled: true + // Mock getState to return browserToolEnabled: true and a mode that supports browser jest.spyOn(provider, "getState").mockResolvedValue({ apiConfiguration: { apiProvider: "openrouter", }, browserToolEnabled: true, - mode: "code", + mode: "code", // code mode includes browser tool group experiments: experimentDefault, } as any) @@ -1384,16 +1389,14 @@ describe("ClineProvider", () => { }) test("correctly handles when model doesn't support computer use", async () => { - // Setup Cline instance with mocked api.getModel() that doesn't support computer use - const { Cline } = require("../../Cline") - const mockCline = new Cline() - mockCline.api = { + // Mock buildApiHandler to return an API handler with supportsComputerUse: false + const { buildApiHandler } = require("../../../api") + ;(buildApiHandler as jest.Mock).mockImplementation(() => ({ getModel: jest.fn().mockReturnValue({ id: "non-computer-use-model", info: { supportsComputerUse: false }, }), - } - await provider.addClineToStack(mockCline) + })) // Mock SYSTEM_PROMPT to verify supportsComputerUse is passed correctly const systemPromptModule = require("../../prompts/system") @@ -1425,16 +1428,14 @@ describe("ClineProvider", () => { }) test("correctly handles when browserToolEnabled is false", async () => { - // Setup Cline instance with mocked api.getModel() that supports computer use - const { Cline } = require("../../Cline") - const mockCline = new Cline() - mockCline.api = { + // Mock buildApiHandler to return an API handler with supportsComputerUse: true + const { buildApiHandler } = require("../../../api") + ;(buildApiHandler as jest.Mock).mockImplementation(() => ({ getModel: jest.fn().mockReturnValue({ id: "claude-3-sonnet", info: { supportsComputerUse: true }, }), - } - await provider.addClineToStack(mockCline) + })) // Mock SYSTEM_PROMPT to verify supportsComputerUse is passed correctly const systemPromptModule = require("../../prompts/system") @@ -1465,38 +1466,92 @@ describe("ClineProvider", () => { expect(callArgs[2]).toBe(false) }) - test("correctly calculates canUseBrowserTool as combination of model support and setting", async () => { - // Setup Cline instance with mocked api.getModel() - const { Cline } = require("../../Cline") - const mockCline = new Cline() - mockCline.api = { + test("correctly handles when mode doesn't include browser tool group", async () => { + // Mock buildApiHandler to return an API handler with supportsComputerUse: true + const { buildApiHandler } = require("../../../api") + ;(buildApiHandler as jest.Mock).mockImplementation(() => ({ getModel: jest.fn().mockReturnValue({ id: "claude-3-sonnet", info: { supportsComputerUse: true }, }), - } - await provider.addClineToStack(mockCline) + })) + + // Mock SYSTEM_PROMPT to verify supportsComputerUse is passed correctly + const systemPromptModule = require("../../prompts/system") + const systemPromptSpy = jest.spyOn(systemPromptModule, "SYSTEM_PROMPT") + + // Mock getState to return a mode that doesn't include browser tool group + jest.spyOn(provider, "getState").mockResolvedValue({ + apiConfiguration: { + apiProvider: "openrouter", + }, + browserToolEnabled: true, + mode: "custom-mode-without-browser", // Custom mode without browser tool group + experiments: experimentDefault, + } as any) + + // Mock getModeBySlug to return a mode without browser tool group + const modesModule = require("../../../shared/modes") + jest.spyOn(modesModule, "getModeBySlug").mockReturnValue({ + slug: "custom-mode-without-browser", + name: "Custom Mode", + roleDefinition: "Custom role", + groups: ["read", "edit"], // No browser group + }) + + // Trigger getSystemPrompt + const handler = getMessageHandler() + await handler({ type: "getSystemPrompt", mode: "custom-mode-without-browser" }) + + // Verify SYSTEM_PROMPT was called + expect(systemPromptSpy).toHaveBeenCalled() + + // Get the actual arguments passed to SYSTEM_PROMPT + const callArgs = systemPromptSpy.mock.calls[0] + + // Verify the supportsComputerUse parameter (3rd parameter, index 2) + // Even though model supports it and browserToolEnabled is true, the mode doesn't include browser tool group + expect(callArgs[2]).toBe(false) + }) + + test("correctly calculates canUseBrowserTool based on all three conditions", async () => { + // Mock buildApiHandler + const { buildApiHandler } = require("../../../api") // Mock SYSTEM_PROMPT const systemPromptModule = require("../../prompts/system") const systemPromptSpy = jest.spyOn(systemPromptModule, "SYSTEM_PROMPT") - // Test all combinations of model support and browserToolEnabled + // Mock getModeBySlug + const modesModule = require("../../../shared/modes") + + // Test all combinations of model support, mode support, and browserToolEnabled const testCases = [ - { modelSupports: true, settingEnabled: true, expected: true }, - { modelSupports: true, settingEnabled: false, expected: false }, - { modelSupports: false, settingEnabled: true, expected: false }, - { modelSupports: false, settingEnabled: false, expected: false }, + { modelSupports: true, modeSupports: true, settingEnabled: true, expected: true }, + { modelSupports: true, modeSupports: true, settingEnabled: false, expected: false }, + { modelSupports: true, modeSupports: false, settingEnabled: true, expected: false }, + { modelSupports: false, modeSupports: true, settingEnabled: true, expected: false }, + { modelSupports: false, modeSupports: false, settingEnabled: false, expected: false }, ] for (const testCase of testCases) { // Reset mocks systemPromptSpy.mockClear() - // Update mock Cline instance - mockCline.api.getModel = jest.fn().mockReturnValue({ - id: "test-model", - info: { supportsComputerUse: testCase.modelSupports }, + // Mock buildApiHandler to return appropriate model support + ;(buildApiHandler as jest.Mock).mockImplementation(() => ({ + getModel: jest.fn().mockReturnValue({ + id: "test-model", + info: { supportsComputerUse: testCase.modelSupports }, + }), + })) + + // Mock getModeBySlug to return appropriate mode support + jest.spyOn(modesModule, "getModeBySlug").mockReturnValue({ + slug: "test-mode", + name: "Test Mode", + roleDefinition: "Test role", + groups: testCase.modeSupports ? ["read", "browser"] : ["read"], }) // Mock getState @@ -1505,13 +1560,13 @@ describe("ClineProvider", () => { apiProvider: "openrouter", }, browserToolEnabled: testCase.settingEnabled, - mode: "code", + mode: "test-mode", experiments: experimentDefault, } as any) // Trigger getSystemPrompt const handler = getMessageHandler() - await handler({ type: "getSystemPrompt", mode: "code" }) + await handler({ type: "getSystemPrompt", mode: "test-mode" }) // Verify SYSTEM_PROMPT was called expect(systemPromptSpy).toHaveBeenCalled() diff --git a/src/exports/api.ts b/src/exports/api.ts index 465b9221ac1..1cfc2dffcc8 100644 --- a/src/exports/api.ts +++ b/src/exports/api.ts @@ -20,7 +20,7 @@ export class API extends EventEmitter implements RooCodeAPI { this.history = new MessageHistory() this.tokenUsage = {} - this.provider.on("clineAdded", (cline) => { + this.provider.on("clineCreated", (cline) => { cline.on("message", (message) => this.emit("message", { taskId: cline.taskId, ...message })) cline.on("taskStarted", () => this.emit("taskStarted", cline.taskId)) cline.on("taskPaused", () => this.emit("taskPaused", cline.taskId)) @@ -28,6 +28,7 @@ export class API extends EventEmitter implements RooCodeAPI { cline.on("taskAskResponded", () => this.emit("taskAskResponded", cline.taskId)) cline.on("taskAborted", () => this.emit("taskAborted", cline.taskId)) cline.on("taskSpawned", (taskId) => this.emit("taskSpawned", cline.taskId, taskId)) + this.emit("taskCreated", cline.taskId) }) this.on("message", ({ taskId, action, message }) => { diff --git a/src/exports/roo-code.d.ts b/src/exports/roo-code.d.ts index 886290d3d12..ddbd8b2d401 100644 --- a/src/exports/roo-code.d.ts +++ b/src/exports/roo-code.d.ts @@ -11,6 +11,7 @@ export interface TokenUsage { export interface RooCodeEvents { message: [{ taskId: string; action: "created" | "updated"; message: ClineMessage }] + taskCreated: [taskId: string] taskStarted: [taskId: string] taskPaused: [taskId: string] taskUnpaused: [taskId: string] @@ -181,7 +182,9 @@ export type GlobalStateKey = | "lastShownAnnouncementId" | "customInstructions" | "alwaysAllowReadOnly" + | "alwaysAllowReadOnlyOutsideWorkspace" | "alwaysAllowWrite" + | "alwaysAllowWriteOutsideWorkspace" | "alwaysAllowExecute" | "alwaysAllowBrowser" | "alwaysAllowMcp" @@ -200,6 +203,7 @@ export type GlobalStateKey = | "modelMaxThinkingTokens" | "azureApiVersion" | "openAiStreamingEnabled" + | "openAiR1FormatEnabled" | "openRouterModelId" | "openRouterModelInfo" | "openRouterBaseUrl" @@ -236,7 +240,6 @@ export type GlobalStateKey = | "enhancementApiConfigId" | "experiments" // Map of experiment IDs to their enabled state | "autoApprovalEnabled" - | "enableCustomModeCreation" // Enable the ability for Roo to create custom modes | "customModes" // Array of custom modes | "unboundModelId" | "requestyModelId" diff --git a/src/extension.ts b/src/extension.ts index 05f8afe969b..a232cb51d08 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -1,10 +1,11 @@ import * as vscode from "vscode" import * as dotenvx from "@dotenvx/dotenvx" +import * as path from "path" // Load environment variables from .env file try { // Specify path to .env file in the project root directory - const envPath = __dirname + "/../.env" + const envPath = path.join(__dirname, "..", ".env") dotenvx.config({ path: envPath }) } catch (e) { // Silently handle environment loading errors @@ -21,6 +22,7 @@ import { McpServerManager } from "./services/mcp/McpServerManager" import { telemetryService } from "./services/telemetry/TelemetryService" import { TerminalRegistry } from "./integrations/terminal/TerminalRegistry" import { API } from "./exports/api" +import { migrateSettings } from "./utils/migrateSettings" import { handleUri, registerCommands, registerCodeActions, registerTerminalActions } from "./activate" import { formatLanguage } from "./shared/language" @@ -38,12 +40,15 @@ let extensionContext: vscode.ExtensionContext // This method is called when your extension is activated. // Your extension is activated the very first time the command is executed. -export function activate(context: vscode.ExtensionContext) { +export async function activate(context: vscode.ExtensionContext) { extensionContext = context outputChannel = vscode.window.createOutputChannel("Roo-Code") context.subscriptions.push(outputChannel) outputChannel.appendLine("Roo-Code extension activated") + // Migrate old settings to new + await migrateSettings(context, outputChannel) + // Initialize telemetry service after environment variables are loaded. telemetryService.initialize() diff --git a/src/i18n/locales/ca/common.json b/src/i18n/locales/ca/common.json index 42684a4677c..cbedf48a224 100644 --- a/src/i18n/locales/ca/common.json +++ b/src/i18n/locales/ca/common.json @@ -1,12 +1,16 @@ { + "input": { + "task_prompt": "Què vols que faci Roo?", + "task_placeholder": "Escriu la teva tasca aquí" + }, "extension": { "name": "Roo Code", "description": "Tot un equip de desenvolupadors d'IA al teu editor." }, "number_format": { "thousand_suffix": "k", - "million_suffix": "M", - "billion_suffix": "MM" + "million_suffix": "m", + "billion_suffix": "b" }, "welcome": "Benvingut/da, {{name}}! Tens {{count}} notificacions.", "items": { @@ -48,7 +52,9 @@ "hmr_not_running": "El servidor de desenvolupament local no està executant-se, l'HMR no funcionarà. Si us plau, executa 'npm run dev' abans de llançar l'extensió per habilitar l'HMR.", "retrieve_current_mode": "Error en recuperar el mode actual de l'estat.", "failed_delete_repo": "Ha fallat l'eliminació del repositori o branca associada: {{error}}", - "failed_remove_directory": "Ha fallat l'eliminació del directori de tasques: {{error}}" + "failed_remove_directory": "Ha fallat l'eliminació del directori de tasques: {{error}}", + "custom_storage_path_unusable": "La ruta d'emmagatzematge personalitzada \"{{path}}\" no és utilitzable, s'utilitzarà la ruta predeterminada", + "cannot_access_path": "No es pot accedir a la ruta {{path}}: {{error}}" }, "warnings": { "no_terminal_content": "No s'ha seleccionat contingut de terminal", @@ -61,7 +67,9 @@ "mcp_server_restarting": "Reiniciant el servidor MCP {{serverName}}...", "mcp_server_connected": "Servidor MCP {{serverName}} connectat", "mcp_server_deleted": "Servidor MCP eliminat: {{serverName}}", - "mcp_server_not_found": "Servidor \"{{serverName}}\" no trobat a la configuració" + "mcp_server_not_found": "Servidor \"{{serverName}}\" no trobat a la configuració", + "custom_storage_path_set": "Ruta d'emmagatzematge personalitzada establerta: {{path}}", + "default_storage_path": "S'ha reprès l'ús de la ruta d'emmagatzematge predeterminada" }, "answers": { "yes": "Sí", @@ -73,5 +81,11 @@ "tasks": { "canceled": "Error de tasca: Ha estat aturada i cancel·lada per l'usuari.", "deleted": "Fallada de tasca: Ha estat aturada i eliminada per l'usuari." + }, + "storage": { + "prompt_custom_path": "Introdueix una ruta d'emmagatzematge personalitzada per a l'historial de converses o deixa-ho buit per utilitzar la ubicació predeterminada", + "path_placeholder": "D:\\RooCodeStorage", + "enter_absolute_path": "Introdueix una ruta completa (p. ex. D:\\RooCodeStorage o /home/user/storage)", + "enter_valid_path": "Introdueix una ruta vàlida" } } diff --git a/src/i18n/locales/de/common.json b/src/i18n/locales/de/common.json index 7da6e0477d5..6e953dd9ab0 100644 --- a/src/i18n/locales/de/common.json +++ b/src/i18n/locales/de/common.json @@ -4,9 +4,9 @@ "description": "Ein komplettes Entwicklerteam mit KI in deinem Editor." }, "number_format": { - "thousand_suffix": "T", - "million_suffix": "Mio.", - "billion_suffix": "Mrd." + "thousand_suffix": "k", + "million_suffix": "m", + "billion_suffix": "b" }, "welcome": "Willkommen, {{name}}! Du hast {{count}} Benachrichtigungen.", "items": { @@ -48,7 +48,9 @@ "hmr_not_running": "Der lokale Entwicklungsserver läuft nicht, HMR wird nicht funktionieren. Bitte führen Sie 'npm run dev' vor dem Start der Erweiterung aus, um HMR zu aktivieren.", "retrieve_current_mode": "Fehler beim Abrufen des aktuellen Modus aus dem Zustand.", "failed_delete_repo": "Fehler beim Löschen des zugehörigen Shadow-Repositorys oder -Zweigs: {{error}}", - "failed_remove_directory": "Fehler beim Entfernen des Aufgabenverzeichnisses: {{error}}" + "failed_remove_directory": "Fehler beim Entfernen des Aufgabenverzeichnisses: {{error}}", + "custom_storage_path_unusable": "Benutzerdefinierter Speicherpfad \"{{path}}\" ist nicht verwendbar, Standardpfad wird verwendet", + "cannot_access_path": "Zugriff auf Pfad {{path}} nicht möglich: {{error}}" }, "warnings": { "no_terminal_content": "Kein Terminal-Inhalt ausgewählt", @@ -61,7 +63,9 @@ "mcp_server_restarting": "MCP-Server {{serverName}} wird neu gestartet...", "mcp_server_connected": "MCP-Server {{serverName}} verbunden", "mcp_server_deleted": "MCP-Server gelöscht: {{serverName}}", - "mcp_server_not_found": "Server \"{{serverName}}\" nicht in der Konfiguration gefunden" + "mcp_server_not_found": "Server \"{{serverName}}\" nicht in der Konfiguration gefunden", + "custom_storage_path_set": "Benutzerdefinierter Speicherpfad festgelegt: {{path}}", + "default_storage_path": "Auf Standardspeicherpfad zurückgesetzt" }, "answers": { "yes": "Ja", @@ -73,5 +77,15 @@ "tasks": { "canceled": "Aufgabenfehler: Die Aufgabe wurde vom Benutzer gestoppt und abgebrochen.", "deleted": "Aufgabenfehler: Die Aufgabe wurde vom Benutzer gestoppt und gelöscht." + }, + "storage": { + "prompt_custom_path": "Gib den benutzerdefinierten Speicherpfad für den Gesprächsverlauf ein, leer lassen für Standardspeicherort", + "path_placeholder": "D:\\RooCodeStorage", + "enter_absolute_path": "Bitte gib einen absoluten Pfad ein (z.B. D:\\RooCodeStorage oder /home/user/storage)", + "enter_valid_path": "Bitte gib einen gültigen Pfad ein" + }, + "input": { + "task_prompt": "Was soll Roo tun?", + "task_placeholder": "Gib deine Aufgabe hier ein" } } diff --git a/src/i18n/locales/en/common.json b/src/i18n/locales/en/common.json index f3a2e86a963..6f1e496f644 100644 --- a/src/i18n/locales/en/common.json +++ b/src/i18n/locales/en/common.json @@ -48,7 +48,9 @@ "hmr_not_running": "Local development server is not running, HMR will not work. Please run 'npm run dev' before launching the extension to enable HMR.", "retrieve_current_mode": "Error: failed to retrieve current mode from state.", "failed_delete_repo": "Failed to delete associated shadow repository or branch: {{error}}", - "failed_remove_directory": "Failed to remove task directory: {{error}}" + "failed_remove_directory": "Failed to remove task directory: {{error}}", + "custom_storage_path_unusable": "Custom storage path \"{{path}}\" is unusable, will use default path", + "cannot_access_path": "Cannot access path {{path}}: {{error}}" }, "warnings": { "no_terminal_content": "No terminal content selected", @@ -61,7 +63,9 @@ "mcp_server_restarting": "Restarting {{serverName}} MCP server...", "mcp_server_connected": "{{serverName}} MCP server connected", "mcp_server_deleted": "Deleted MCP server: {{serverName}}", - "mcp_server_not_found": "Server \"{{serverName}}\" not found in configuration" + "mcp_server_not_found": "Server \"{{serverName}}\" not found in configuration", + "custom_storage_path_set": "Custom storage path set: {{path}}", + "default_storage_path": "Reverted to using default storage path" }, "answers": { "yes": "Yes", @@ -73,5 +77,15 @@ "tasks": { "canceled": "Task error: It was stopped and canceled by the user.", "deleted": "Task failure: It was stopped and deleted by the user." + }, + "storage": { + "prompt_custom_path": "Enter custom conversation history storage path, leave empty to use default location", + "path_placeholder": "D:\\RooCodeStorage", + "enter_absolute_path": "Please enter an absolute path (e.g. D:\\RooCodeStorage or /home/user/storage)", + "enter_valid_path": "Please enter a valid path" + }, + "input": { + "task_prompt": "What should Roo do?", + "task_placeholder": "Type your task here" } } diff --git a/src/i18n/locales/es/common.json b/src/i18n/locales/es/common.json index 53d35f97d6d..52c87275c9f 100644 --- a/src/i18n/locales/es/common.json +++ b/src/i18n/locales/es/common.json @@ -48,7 +48,9 @@ "hmr_not_running": "El servidor de desarrollo local no está en ejecución, HMR no funcionará. Por favor, ejecuta 'npm run dev' antes de lanzar la extensión para habilitar HMR.", "retrieve_current_mode": "Error al recuperar el modo actual del estado.", "failed_delete_repo": "Error al eliminar el repositorio o rama asociada: {{error}}", - "failed_remove_directory": "Error al eliminar el directorio de tareas: {{error}}" + "failed_remove_directory": "Error al eliminar el directorio de tareas: {{error}}", + "custom_storage_path_unusable": "La ruta de almacenamiento personalizada \"{{path}}\" no es utilizable, se usará la ruta predeterminada", + "cannot_access_path": "No se puede acceder a la ruta {{path}}: {{error}}" }, "warnings": { "no_terminal_content": "No hay contenido de terminal seleccionado", @@ -61,7 +63,9 @@ "mcp_server_restarting": "Reiniciando el servidor MCP {{serverName}}...", "mcp_server_connected": "Servidor MCP {{serverName}} conectado", "mcp_server_deleted": "Servidor MCP eliminado: {{serverName}}", - "mcp_server_not_found": "Servidor \"{{serverName}}\" no encontrado en la configuración" + "mcp_server_not_found": "Servidor \"{{serverName}}\" no encontrado en la configuración", + "custom_storage_path_set": "Ruta de almacenamiento personalizada establecida: {{path}}", + "default_storage_path": "Se ha vuelto a usar la ruta de almacenamiento predeterminada" }, "answers": { "yes": "Sí", @@ -73,5 +77,15 @@ "tasks": { "canceled": "Error de tarea: Fue detenida y cancelada por el usuario.", "deleted": "Fallo de tarea: Fue detenida y eliminada por el usuario." + }, + "storage": { + "prompt_custom_path": "Ingresa la ruta de almacenamiento personalizada para el historial de conversaciones, déjala vacía para usar la ubicación predeterminada", + "path_placeholder": "D:\\RooCodeStorage", + "enter_absolute_path": "Por favor, ingresa una ruta absoluta (por ejemplo, D:\\RooCodeStorage o /home/user/storage)", + "enter_valid_path": "Por favor, ingresa una ruta válida" + }, + "input": { + "task_prompt": "¿Qué debe hacer Roo?", + "task_placeholder": "Escribe tu tarea aquí" } } diff --git a/src/i18n/locales/fr/common.json b/src/i18n/locales/fr/common.json index b2819a3900c..cbbf692e4aa 100644 --- a/src/i18n/locales/fr/common.json +++ b/src/i18n/locales/fr/common.json @@ -5,8 +5,8 @@ }, "number_format": { "thousand_suffix": "k", - "million_suffix": "M", - "billion_suffix": "Md" + "million_suffix": "m", + "billion_suffix": "b" }, "welcome": "Bienvenue, {{name}} ! Vous avez {{count}} notification(s).", "items": { @@ -48,7 +48,9 @@ "hmr_not_running": "Le serveur de développement local n'est pas en cours d'exécution, HMR ne fonctionnera pas. Veuillez exécuter 'npm run dev' avant de lancer l'extension pour activer l'HMR.", "retrieve_current_mode": "Erreur lors de la récupération du mode actuel à partir du state.", "failed_delete_repo": "Échec de la suppression du repo fantôme ou de la branche associée : {{error}}", - "failed_remove_directory": "Échec de la suppression du répertoire de tâches : {{error}}" + "failed_remove_directory": "Échec de la suppression du répertoire de tâches : {{error}}", + "custom_storage_path_unusable": "Le chemin de stockage personnalisé \"{{path}}\" est inutilisable, le chemin par défaut sera utilisé", + "cannot_access_path": "Impossible d'accéder au chemin {{path}} : {{error}}" }, "warnings": { "no_terminal_content": "Aucun contenu de terminal sélectionné", @@ -61,7 +63,9 @@ "mcp_server_restarting": "Redémarrage du serveur MCP {{serverName}}...", "mcp_server_connected": "Serveur MCP {{serverName}} connecté", "mcp_server_deleted": "Serveur MCP supprimé : {{serverName}}", - "mcp_server_not_found": "Serveur \"{{serverName}}\" introuvable dans la configuration" + "mcp_server_not_found": "Serveur \"{{serverName}}\" introuvable dans la configuration", + "custom_storage_path_set": "Chemin de stockage personnalisé défini : {{path}}", + "default_storage_path": "Retour au chemin de stockage par défaut" }, "answers": { "yes": "Oui", @@ -73,5 +77,15 @@ "tasks": { "canceled": "Erreur de tâche : Elle a été arrêtée et annulée par l'utilisateur.", "deleted": "Échec de la tâche : Elle a été arrêtée et supprimée par l'utilisateur." + }, + "storage": { + "prompt_custom_path": "Entrez le chemin de stockage personnalisé pour l'historique des conversations, laissez vide pour utiliser l'emplacement par défaut", + "path_placeholder": "D:\\RooCodeStorage", + "enter_absolute_path": "Veuillez entrer un chemin absolu (ex. D:\\RooCodeStorage ou /home/user/storage)", + "enter_valid_path": "Veuillez entrer un chemin valide" + }, + "input": { + "task_prompt": "Que doit faire Roo ?", + "task_placeholder": "Écris ta tâche ici" } } diff --git a/src/i18n/locales/hi/common.json b/src/i18n/locales/hi/common.json index 380fa8a331e..eef4c4b751b 100644 --- a/src/i18n/locales/hi/common.json +++ b/src/i18n/locales/hi/common.json @@ -4,9 +4,9 @@ "description": "आपके एडिटर में AI डेवलपर्स की पूरी टीम।" }, "number_format": { - "thousand_suffix": "हज़ार", - "million_suffix": "लाख", - "billion_suffix": "अरब" + "thousand_suffix": "k", + "million_suffix": "m", + "billion_suffix": "b" }, "welcome": "स्वागत है, {{name}}! आपके पास {{count}} सूचनाएँ हैं।", "items": { @@ -48,7 +48,9 @@ "hmr_not_running": "स्थानीय विकास सर्वर चल नहीं रहा है, HMR काम नहीं करेगा। कृपया HMR सक्षम करने के लिए एक्सटेंशन लॉन्च करने से पहले 'npm run dev' चलाएँ।", "retrieve_current_mode": "स्टेट से वर्तमान मोड प्राप्त करने में त्रुटि।", "failed_delete_repo": "संबंधित शैडो रिपॉजिटरी या ब्रांच हटाने में विफल: {{error}}", - "failed_remove_directory": "टास्क डायरेक्टरी हटाने में विफल: {{error}}" + "failed_remove_directory": "टास्क डायरेक्टरी हटाने में विफल: {{error}}", + "custom_storage_path_unusable": "कस्टम स्टोरेज पाथ \"{{path}}\" उपयोग योग्य नहीं है, डिफ़ॉल्ट पाथ का उपयोग किया जाएगा", + "cannot_access_path": "पाथ {{path}} तक पहुंच नहीं पा रहे हैं: {{error}}" }, "warnings": { "no_terminal_content": "कोई टर्मिनल सामग्री चयनित नहीं", @@ -61,7 +63,9 @@ "mcp_server_restarting": "{{serverName}} MCP सर्वर पुनः प्रारंभ हो रहा है...", "mcp_server_connected": "{{serverName}} MCP सर्वर कनेक्टेड", "mcp_server_deleted": "MCP सर्वर हटाया गया: {{serverName}}", - "mcp_server_not_found": "सर्वर \"{{serverName}}\" कॉन्फ़िगरेशन में नहीं मिला" + "mcp_server_not_found": "सर्वर \"{{serverName}}\" कॉन्फ़िगरेशन में नहीं मिला", + "custom_storage_path_set": "कस्टम स्टोरेज पाथ सेट किया गया: {{path}}", + "default_storage_path": "डिफ़ॉल्ट स्टोरेज पाथ का उपयोग पुनः शुरू किया गया" }, "answers": { "yes": "हां", @@ -73,5 +77,15 @@ "tasks": { "canceled": "टास्क त्रुटि: इसे उपयोगकर्ता द्वारा रोका और रद्द किया गया था।", "deleted": "टास्क विफलता: इसे उपयोगकर्ता द्वारा रोका और हटाया गया था।" + }, + "storage": { + "prompt_custom_path": "वार्तालाप इतिहास के लिए कस्टम स्टोरेज पाथ दर्ज करें, डिफ़ॉल्ट स्थान का उपयोग करने के लिए खाली छोड़ दें", + "path_placeholder": "D:\\RooCodeStorage", + "enter_absolute_path": "कृपया एक पूर्ण पाथ दर्ज करें (उदाहरण: D:\\RooCodeStorage या /home/user/storage)", + "enter_valid_path": "कृपया एक वैध पाथ दर्ज करें" + }, + "input": { + "task_prompt": "Roo को क्या करना है?", + "task_placeholder": "अपना कार्य यहाँ लिखें" } } diff --git a/src/i18n/locales/it/common.json b/src/i18n/locales/it/common.json index a73b575458d..2212ee2ff87 100644 --- a/src/i18n/locales/it/common.json +++ b/src/i18n/locales/it/common.json @@ -5,8 +5,8 @@ }, "number_format": { "thousand_suffix": "k", - "million_suffix": "mln", - "billion_suffix": "mld" + "million_suffix": "m", + "billion_suffix": "b" }, "welcome": "Benvenuto, {{name}}! Hai {{count}} notifiche.", "items": { @@ -48,7 +48,9 @@ "hmr_not_running": "Il server di sviluppo locale non è in esecuzione, l'HMR non funzionerà. Esegui 'npm run dev' prima di avviare l'estensione per abilitare l'HMR.", "retrieve_current_mode": "Errore durante il recupero della modalità corrente dallo stato.", "failed_delete_repo": "Impossibile eliminare il repository o il ramo associato: {{error}}", - "failed_remove_directory": "Impossibile rimuovere la directory delle attività: {{error}}" + "failed_remove_directory": "Impossibile rimuovere la directory delle attività: {{error}}", + "custom_storage_path_unusable": "Il percorso di archiviazione personalizzato \"{{path}}\" non è utilizzabile, verrà utilizzato il percorso predefinito", + "cannot_access_path": "Impossibile accedere al percorso {{path}}: {{error}}" }, "warnings": { "no_terminal_content": "Nessun contenuto del terminale selezionato", @@ -61,7 +63,9 @@ "mcp_server_restarting": "Riavvio del server MCP {{serverName}}...", "mcp_server_connected": "Server MCP {{serverName}} connesso", "mcp_server_deleted": "Server MCP eliminato: {{serverName}}", - "mcp_server_not_found": "Server \"{{serverName}}\" non trovato nella configurazione" + "mcp_server_not_found": "Server \"{{serverName}}\" non trovato nella configurazione", + "custom_storage_path_set": "Percorso di archiviazione personalizzato impostato: {{path}}", + "default_storage_path": "Tornato al percorso di archiviazione predefinito" }, "answers": { "yes": "Sì", @@ -73,5 +77,15 @@ "tasks": { "canceled": "Errore attività: È stata interrotta e annullata dall'utente.", "deleted": "Fallimento attività: È stata interrotta ed eliminata dall'utente." + }, + "storage": { + "prompt_custom_path": "Inserisci il percorso di archiviazione personalizzato per la cronologia delle conversazioni, lascia vuoto per utilizzare la posizione predefinita", + "path_placeholder": "D:\\RooCodeStorage", + "enter_absolute_path": "Inserisci un percorso assoluto (ad esempio D:\\RooCodeStorage o /home/user/storage)", + "enter_valid_path": "Inserisci un percorso valido" + }, + "input": { + "task_prompt": "Cosa deve fare Roo?", + "task_placeholder": "Scrivi il tuo compito qui" } } diff --git a/src/i18n/locales/ja/common.json b/src/i18n/locales/ja/common.json index 4a4f3215c50..be37e832a15 100644 --- a/src/i18n/locales/ja/common.json +++ b/src/i18n/locales/ja/common.json @@ -4,9 +4,9 @@ "description": "エディター内のAIデベロッパーチーム全体。" }, "number_format": { - "thousand_suffix": "千", - "million_suffix": "百万", - "billion_suffix": "十億" + "thousand_suffix": "k", + "million_suffix": "m", + "billion_suffix": "b" }, "welcome": "ようこそ、{{name}}さん!{{count}}件の通知があります。", "items": { @@ -48,7 +48,9 @@ "hmr_not_running": "ローカル開発サーバーが実行されていないため、HMRは機能しません。HMRを有効にするには、拡張機能を起動する前に'npm run dev'を実行してください。", "retrieve_current_mode": "現在のモードを状態から取得する際にエラーが発生しました。", "failed_delete_repo": "関連するシャドウリポジトリまたはブランチの削除に失敗しました:{{error}}", - "failed_remove_directory": "タスクディレクトリの削除に失敗しました:{{error}}" + "failed_remove_directory": "タスクディレクトリの削除に失敗しました:{{error}}", + "custom_storage_path_unusable": "カスタムストレージパス \"{{path}}\" が使用できないため、デフォルトパスを使用します", + "cannot_access_path": "パス {{path}} にアクセスできません:{{error}}" }, "warnings": { "no_terminal_content": "選択されたターミナルコンテンツがありません", @@ -61,7 +63,9 @@ "mcp_server_restarting": "MCPサーバー{{serverName}}を再起動中...", "mcp_server_connected": "MCPサーバー{{serverName}}が接続されました", "mcp_server_deleted": "MCPサーバーが削除されました:{{serverName}}", - "mcp_server_not_found": "サーバー\"{{serverName}}\"が設定内に見つかりません" + "mcp_server_not_found": "サーバー\"{{serverName}}\"が設定内に見つかりません", + "custom_storage_path_set": "カスタムストレージパスが設定されました:{{path}}", + "default_storage_path": "デフォルトのストレージパスに戻りました" }, "answers": { "yes": "はい", @@ -73,5 +77,15 @@ "tasks": { "canceled": "タスクエラー:ユーザーによって停止およびキャンセルされました。", "deleted": "タスク失敗:ユーザーによって停止および削除されました。" + }, + "storage": { + "prompt_custom_path": "会話履歴のカスタムストレージパスを入力してください。デフォルトの場所を使用する場合は空のままにしてください", + "path_placeholder": "D:\\RooCodeStorage", + "enter_absolute_path": "絶対パスを入力してください(例:D:\\RooCodeStorage または /home/user/storage)", + "enter_valid_path": "有効なパスを入力してください" + }, + "input": { + "task_prompt": "Rooにどんなことをさせますか?", + "task_placeholder": "タスクをここに入力してください" } } diff --git a/src/i18n/locales/ko/common.json b/src/i18n/locales/ko/common.json index e00cc6debae..794aa8d59aa 100644 --- a/src/i18n/locales/ko/common.json +++ b/src/i18n/locales/ko/common.json @@ -4,9 +4,9 @@ "description": "에디터 내에서 동작하는 AI 개발팀 전체입니다." }, "number_format": { - "thousand_suffix": "천", - "million_suffix": "백만", - "billion_suffix": "십억" + "thousand_suffix": "k", + "million_suffix": "m", + "billion_suffix": "b" }, "welcome": "안녕하세요, {{name}}님! {{count}}개의 알림이 있습니다.", "items": { @@ -48,7 +48,9 @@ "hmr_not_running": "로컬 개발 서버가 실행되고 있지 않아 HMR이 작동하지 않습니다. HMR을 활성화하려면 확장 프로그램을 실행하기 전에 'npm run dev'를 실행하세요.", "retrieve_current_mode": "상태에서 현재 모드를 검색하는 데 오류가 발생했습니다.", "failed_delete_repo": "관련 shadow 저장소 또는 브랜치 삭제 실패: {{error}}", - "failed_remove_directory": "작업 디렉토리 제거 실패: {{error}}" + "failed_remove_directory": "작업 디렉토리 제거 실패: {{error}}", + "custom_storage_path_unusable": "사용자 지정 저장 경로 \"{{path}}\"를 사용할 수 없어 기본 경로를 사용합니다", + "cannot_access_path": "경로 {{path}}에 접근할 수 없습니다: {{error}}" }, "warnings": { "no_terminal_content": "선택된 터미널 내용이 없습니다", @@ -61,7 +63,9 @@ "mcp_server_restarting": "{{serverName}} MCP 서버를 재시작하는 중...", "mcp_server_connected": "{{serverName}} MCP 서버 연결됨", "mcp_server_deleted": "MCP 서버 삭제됨: {{serverName}}", - "mcp_server_not_found": "구성에서 서버 \"{{serverName}}\"을(를) 찾을 수 없습니다" + "mcp_server_not_found": "구성에서 서버 \"{{serverName}}\"을(를) 찾을 수 없습니다", + "custom_storage_path_set": "사용자 지정 저장 경로 설정됨: {{path}}", + "default_storage_path": "기본 저장 경로로 되돌아갔습니다" }, "answers": { "yes": "예", @@ -73,5 +77,15 @@ "tasks": { "canceled": "작업 오류: 사용자에 의해 중지 및 취소되었습니다.", "deleted": "작업 실패: 사용자에 의해 중지 및 삭제되었습니다." + }, + "storage": { + "prompt_custom_path": "대화 내역을 위한 사용자 지정 저장 경로를 입력하세요. 기본 위치를 사용하려면 비워두세요", + "path_placeholder": "D:\\RooCodeStorage", + "enter_absolute_path": "절대 경로를 입력하세요 (예: D:\\RooCodeStorage 또는 /home/user/storage)", + "enter_valid_path": "유효한 경로를 입력하세요" + }, + "input": { + "task_prompt": "Roo에게 무엇을 시킬까요?", + "task_placeholder": "여기에 작업을 입력하세요" } } diff --git a/src/i18n/locales/pl/common.json b/src/i18n/locales/pl/common.json index 3572ec26cbc..4218218c67e 100644 --- a/src/i18n/locales/pl/common.json +++ b/src/i18n/locales/pl/common.json @@ -4,9 +4,9 @@ "description": "Cały zespół programistów AI w Twoim edytorze." }, "number_format": { - "thousand_suffix": "tys.", - "million_suffix": "mln", - "billion_suffix": "mld" + "thousand_suffix": "k", + "million_suffix": "m", + "billion_suffix": "b" }, "welcome": "Witaj, {{name}}! Masz {{count}} powiadomień.", "items": { @@ -48,7 +48,9 @@ "hmr_not_running": "Lokalny serwer deweloperski nie jest uruchomiony, HMR nie będzie działać. Uruchom 'npm run dev' przed uruchomieniem rozszerzenia, aby włączyć HMR.", "retrieve_current_mode": "Błąd podczas pobierania bieżącego trybu ze stanu.", "failed_delete_repo": "Nie udało się usunąć powiązanego repozytorium lub gałęzi pomocniczej: {{error}}", - "failed_remove_directory": "Nie udało się usunąć katalogu zadania: {{error}}" + "failed_remove_directory": "Nie udało się usunąć katalogu zadania: {{error}}", + "custom_storage_path_unusable": "Niestandardowa ścieżka przechowywania \"{{path}}\" nie jest użyteczna, zostanie użyta domyślna ścieżka", + "cannot_access_path": "Nie można uzyskać dostępu do ścieżki {{path}}: {{error}}" }, "warnings": { "no_terminal_content": "Nie wybrano zawartości terminala", @@ -61,7 +63,9 @@ "mcp_server_restarting": "Ponowne uruchamianie serwera MCP {{serverName}}...", "mcp_server_connected": "Serwer MCP {{serverName}} połączony", "mcp_server_deleted": "Usunięto serwer MCP: {{serverName}}", - "mcp_server_not_found": "Serwer \"{{serverName}}\" nie znaleziony w konfiguracji" + "mcp_server_not_found": "Serwer \"{{serverName}}\" nie znaleziony w konfiguracji", + "custom_storage_path_set": "Ustawiono niestandardową ścieżkę przechowywania: {{path}}", + "default_storage_path": "Wznowiono używanie domyślnej ścieżki przechowywania" }, "answers": { "yes": "Tak", @@ -73,5 +77,15 @@ "tasks": { "canceled": "Błąd zadania: Zostało zatrzymane i anulowane przez użytkownika.", "deleted": "Niepowodzenie zadania: Zostało zatrzymane i usunięte przez użytkownika." + }, + "storage": { + "prompt_custom_path": "Wprowadź niestandardową ścieżkę przechowywania dla historii konwersacji lub pozostaw puste, aby użyć lokalizacji domyślnej", + "path_placeholder": "D:\\RooCodeStorage", + "enter_absolute_path": "Wprowadź pełną ścieżkę (np. D:\\RooCodeStorage lub /home/user/storage)", + "enter_valid_path": "Wprowadź prawidłową ścieżkę" + }, + "input": { + "task_prompt": "Co ma zrobić Roo?", + "task_placeholder": "Wpisz swoje zadanie tutaj" } } diff --git a/src/i18n/locales/pt-BR/common.json b/src/i18n/locales/pt-BR/common.json index 5106a708a64..844970f2201 100644 --- a/src/i18n/locales/pt-BR/common.json +++ b/src/i18n/locales/pt-BR/common.json @@ -1,12 +1,16 @@ { + "input": { + "task_prompt": "O que você quer que o Roo faça?", + "task_placeholder": "Digite sua tarefa aqui" + }, "extension": { "name": "Roo Code", "description": "Uma equipe completa de desenvolvedores com IA em seu editor." }, "number_format": { "thousand_suffix": "k", - "million_suffix": "mi", - "billion_suffix": "bi" + "million_suffix": "m", + "billion_suffix": "b" }, "welcome": "Bem-vindo(a), {{name}}! Você tem {{count}} notificações.", "items": { @@ -48,7 +52,9 @@ "hmr_not_running": "O servidor de desenvolvimento local não está em execução, o HMR não funcionará. Por favor, execute 'npm run dev' antes de iniciar a extensão para habilitar o HMR.", "retrieve_current_mode": "Erro ao recuperar o modo atual do estado.", "failed_delete_repo": "Falha ao excluir o repositório ou ramificação associada: {{error}}", - "failed_remove_directory": "Falha ao remover o diretório de tarefas: {{error}}" + "failed_remove_directory": "Falha ao remover o diretório de tarefas: {{error}}", + "custom_storage_path_unusable": "O caminho de armazenamento personalizado \"{{path}}\" não pode ser usado, será usado o caminho padrão", + "cannot_access_path": "Não é possível acessar o caminho {{path}}: {{error}}" }, "warnings": { "no_terminal_content": "Nenhum conteúdo do terminal selecionado", @@ -61,7 +67,9 @@ "mcp_server_restarting": "Reiniciando o servidor MCP {{serverName}}...", "mcp_server_connected": "Servidor MCP {{serverName}} conectado", "mcp_server_deleted": "Servidor MCP excluído: {{serverName}}", - "mcp_server_not_found": "Servidor \"{{serverName}}\" não encontrado na configuração" + "mcp_server_not_found": "Servidor \"{{serverName}}\" não encontrado na configuração", + "custom_storage_path_set": "Caminho de armazenamento personalizado definido: {{path}}", + "default_storage_path": "Retornado ao caminho de armazenamento padrão" }, "answers": { "yes": "Sim", @@ -73,5 +81,11 @@ "tasks": { "canceled": "Erro na tarefa: Foi interrompida e cancelada pelo usuário.", "deleted": "Falha na tarefa: Foi interrompida e excluída pelo usuário." + }, + "storage": { + "prompt_custom_path": "Digite o caminho de armazenamento personalizado para o histórico de conversas, deixe em branco para usar o local padrão", + "path_placeholder": "D:\\RooCodeStorage", + "enter_absolute_path": "Por favor, digite um caminho absoluto (ex: D:\\RooCodeStorage ou /home/user/storage)", + "enter_valid_path": "Por favor, digite um caminho válido" } } diff --git a/src/i18n/locales/tr/common.json b/src/i18n/locales/tr/common.json index 961ad6c68a1..82464b73425 100644 --- a/src/i18n/locales/tr/common.json +++ b/src/i18n/locales/tr/common.json @@ -4,9 +4,9 @@ "description": "Düzenleyicinizde tam bir AI geliştirici ekibi." }, "number_format": { - "thousand_suffix": "B", - "million_suffix": "M", - "billion_suffix": "Mr" + "thousand_suffix": "k", + "million_suffix": "m", + "billion_suffix": "b" }, "welcome": "Hoş geldiniz, {{name}}! {{count}} bildiriminiz var.", "items": { @@ -48,7 +48,9 @@ "hmr_not_running": "Yerel geliştirme sunucusu çalışmıyor, HMR çalışmayacak. HMR'yi etkinleştirmek için uzantıyı başlatmadan önce lütfen 'npm run dev' komutunu çalıştırın.", "retrieve_current_mode": "Mevcut mod durumdan alınırken hata oluştu.", "failed_delete_repo": "İlişkili gölge depo veya dal silinemedi: {{error}}", - "failed_remove_directory": "Görev dizini kaldırılamadı: {{error}}" + "failed_remove_directory": "Görev dizini kaldırılamadı: {{error}}", + "custom_storage_path_unusable": "Özel depolama yolu \"{{path}}\" kullanılamıyor, varsayılan yol kullanılacak", + "cannot_access_path": "{{path}} yoluna erişilemiyor: {{error}}" }, "warnings": { "no_terminal_content": "Seçili terminal içeriği yok", @@ -61,7 +63,9 @@ "mcp_server_restarting": "{{serverName}} MCP sunucusu yeniden başlatılıyor...", "mcp_server_connected": "{{serverName}} MCP sunucusu bağlandı", "mcp_server_deleted": "MCP sunucusu silindi: {{serverName}}", - "mcp_server_not_found": "Yapılandırmada \"{{serverName}}\" sunucusu bulunamadı" + "mcp_server_not_found": "Yapılandırmada \"{{serverName}}\" sunucusu bulunamadı", + "custom_storage_path_set": "Özel depolama yolu ayarlandı: {{path}}", + "default_storage_path": "Varsayılan depolama yoluna geri dönüldü" }, "answers": { "yes": "Evet", @@ -73,5 +77,15 @@ "tasks": { "canceled": "Görev hatası: Kullanıcı tarafından durduruldu ve iptal edildi.", "deleted": "Görev başarısız: Kullanıcı tarafından durduruldu ve silindi." + }, + "storage": { + "prompt_custom_path": "Konuşma geçmişi için özel depolama yolunu girin, varsayılan konumu kullanmak için boş bırakın", + "path_placeholder": "D:\\RooCodeStorage", + "enter_absolute_path": "Lütfen mutlak bir yol girin (örn. D:\\RooCodeStorage veya /home/user/storage)", + "enter_valid_path": "Lütfen geçerli bir yol girin" + }, + "input": { + "task_prompt": "Roo ne yapsın?", + "task_placeholder": "Görevini buraya yaz" } } diff --git a/src/i18n/locales/vi/common.json b/src/i18n/locales/vi/common.json index bd9656ac9fe..a2824be1827 100644 --- a/src/i18n/locales/vi/common.json +++ b/src/i18n/locales/vi/common.json @@ -5,8 +5,8 @@ }, "number_format": { "thousand_suffix": "k", - "million_suffix": "tr", - "billion_suffix": "tỷ" + "million_suffix": "m", + "billion_suffix": "b" }, "welcome": "Chào mừng, {{name}}! Bạn có {{count}} thông báo.", "items": { @@ -48,7 +48,9 @@ "hmr_not_running": "Máy chủ phát triển cục bộ không chạy, HMR sẽ không hoạt động. Vui lòng chạy 'npm run dev' trước khi khởi chạy tiện ích mở rộng để bật HMR.", "retrieve_current_mode": "Lỗi không thể truy xuất chế độ hiện tại từ trạng thái.", "failed_delete_repo": "Không thể xóa kho lưu trữ hoặc nhánh liên quan: {{error}}", - "failed_remove_directory": "Không thể xóa thư mục nhiệm vụ: {{error}}" + "failed_remove_directory": "Không thể xóa thư mục nhiệm vụ: {{error}}", + "custom_storage_path_unusable": "Đường dẫn lưu trữ tùy chỉnh \"{{path}}\" không thể sử dụng được, sẽ sử dụng đường dẫn mặc định", + "cannot_access_path": "Không thể truy cập đường dẫn {{path}}: {{error}}" }, "warnings": { "no_terminal_content": "Không có nội dung terminal được chọn", @@ -61,7 +63,9 @@ "mcp_server_restarting": "Đang khởi động lại máy chủ MCP {{serverName}}...", "mcp_server_connected": "Máy chủ MCP {{serverName}} đã kết nối", "mcp_server_deleted": "Đã xóa máy chủ MCP: {{serverName}}", - "mcp_server_not_found": "Không tìm thấy máy chủ \"{{serverName}}\" trong cấu hình" + "mcp_server_not_found": "Không tìm thấy máy chủ \"{{serverName}}\" trong cấu hình", + "custom_storage_path_set": "Đã thiết lập đường dẫn lưu trữ tùy chỉnh: {{path}}", + "default_storage_path": "Đã quay lại sử dụng đường dẫn lưu trữ mặc định" }, "answers": { "yes": "Có", @@ -73,5 +77,15 @@ "tasks": { "canceled": "Lỗi nhiệm vụ: Nó đã bị dừng và hủy bởi người dùng.", "deleted": "Nhiệm vụ thất bại: Nó đã bị dừng và xóa bởi người dùng." + }, + "storage": { + "prompt_custom_path": "Nhập đường dẫn lưu trữ tùy chỉnh cho lịch sử hội thoại, để trống để sử dụng vị trí mặc định", + "path_placeholder": "D:\\RooCodeStorage", + "enter_absolute_path": "Vui lòng nhập đường dẫn tuyệt đối (ví dụ: D:\\RooCodeStorage hoặc /home/user/storage)", + "enter_valid_path": "Vui lòng nhập đường dẫn hợp lệ" + }, + "input": { + "task_prompt": "Bạn muốn Roo làm gì?", + "task_placeholder": "Nhập nhiệm vụ của bạn ở đây" } } diff --git a/src/i18n/locales/zh-CN/common.json b/src/i18n/locales/zh-CN/common.json index 0bd4e740c5c..b4c41db5e2d 100644 --- a/src/i18n/locales/zh-CN/common.json +++ b/src/i18n/locales/zh-CN/common.json @@ -4,9 +4,9 @@ "description": "您编辑器中的完整AI开发团队。" }, "number_format": { - "thousand_suffix": "千", - "million_suffix": "百万", - "billion_suffix": "十亿" + "thousand_suffix": "k", + "million_suffix": "m", + "billion_suffix": "b" }, "welcome": "欢迎,{{name}}!您有 {{count}} 条通知。", "items": { @@ -48,7 +48,9 @@ "hmr_not_running": "本地开发服务器未运行,HMR将不起作用。请在启动扩展前运行'npm run dev'以启用HMR。", "retrieve_current_mode": "从状态中检索当前模式失败。", "failed_delete_repo": "删除关联的影子仓库或分支失败:{{error}}", - "failed_remove_directory": "删除任务目录失败:{{error}}" + "failed_remove_directory": "删除任务目录失败:{{error}}", + "custom_storage_path_unusable": "自定义存储路径 \"{{path}}\" 不可用,将使用默认路径", + "cannot_access_path": "无法访问路径 {{path}}:{{error}}" }, "warnings": { "no_terminal_content": "没有选择终端内容", @@ -61,7 +63,9 @@ "mcp_server_restarting": "正在重启{{serverName}}MCP服务器...", "mcp_server_connected": "{{serverName}}MCP服务器已连接", "mcp_server_deleted": "已删除MCP服务器:{{serverName}}", - "mcp_server_not_found": "在配置中未找到服务器\"{{serverName}}\"" + "mcp_server_not_found": "在配置中未找到服务器\"{{serverName}}\"", + "custom_storage_path_set": "自定义存储路径已设置:{{path}}", + "default_storage_path": "已恢复使用默认存储路径" }, "answers": { "yes": "是", @@ -73,5 +77,15 @@ "tasks": { "canceled": "任务错误:它已被用户停止并取消。", "deleted": "任务失败:它已被用户停止并删除。" + }, + "storage": { + "prompt_custom_path": "输入自定义会话历史存储路径,留空以使用默认位置", + "path_placeholder": "D:\\RooCodeStorage", + "enter_absolute_path": "请输入绝对路径(例如 D:\\RooCodeStorage 或 /home/user/storage)", + "enter_valid_path": "请输入有效的路径" + }, + "input": { + "task_prompt": "让Roo做什么?", + "task_placeholder": "在这里输入任务" } } diff --git a/src/i18n/locales/zh-TW/common.json b/src/i18n/locales/zh-TW/common.json index 29895eaba44..7b36be8145b 100644 --- a/src/i18n/locales/zh-TW/common.json +++ b/src/i18n/locales/zh-TW/common.json @@ -4,9 +4,9 @@ "description": "您編輯器中的完整AI開發團隊。" }, "number_format": { - "thousand_suffix": "千", - "million_suffix": "百萬", - "billion_suffix": "十億" + "thousand_suffix": "k", + "million_suffix": "m", + "billion_suffix": "b" }, "welcome": "歡迎,{{name}}!您有 {{count}} 條通知。", "items": { @@ -48,7 +48,9 @@ "hmr_not_running": "本地開發服務器未運行,HMR將不起作用。請在啟動擴展前運行'npm run dev'以啟用HMR。", "retrieve_current_mode": "從狀態中檢索當前模式失敗。", "failed_delete_repo": "刪除關聯的影子倉庫或分支失敗:{{error}}", - "failed_remove_directory": "刪除任務目錄失敗:{{error}}" + "failed_remove_directory": "刪除任務目錄失敗:{{error}}", + "custom_storage_path_unusable": "自定義存儲路徑 \"{{path}}\" 不可用,將使用默認路徑", + "cannot_access_path": "無法訪問路徑 {{path}}:{{error}}" }, "warnings": { "no_terminal_content": "沒有選擇終端內容", @@ -61,7 +63,9 @@ "mcp_server_restarting": "正在重啟{{serverName}}MCP服務器...", "mcp_server_connected": "{{serverName}}MCP服務器已連接", "mcp_server_deleted": "已刪除MCP服務器:{{serverName}}", - "mcp_server_not_found": "在配置中未找到服務器\"{{serverName}}\"" + "mcp_server_not_found": "在配置中未找到服務器\"{{serverName}}\"", + "custom_storage_path_set": "自定義存儲路徑已設置:{{path}}", + "default_storage_path": "已恢復使用默認存儲路徑" }, "answers": { "yes": "是", @@ -73,5 +77,15 @@ "tasks": { "canceled": "任務錯誤:它已被用戶停止並取消。", "deleted": "任務失敗:它已被用戶停止並刪除。" + }, + "storage": { + "prompt_custom_path": "輸入自定義會話歷史存儲路徑,留空以使用默認位置", + "path_placeholder": "D:\\RooCodeStorage", + "enter_absolute_path": "請輸入絕對路徑(例如 D:\\RooCodeStorage 或 /home/user/storage)", + "enter_valid_path": "請輸入有效的路徑" + }, + "input": { + "task_prompt": "讓Roo做什麼?", + "task_placeholder": "在這裡輸入任務" } } diff --git a/src/integrations/workspace/WorkspaceTracker.ts b/src/integrations/workspace/WorkspaceTracker.ts index dbb6647e44f..4621fdc99ea 100644 --- a/src/integrations/workspace/WorkspaceTracker.ts +++ b/src/integrations/workspace/WorkspaceTracker.ts @@ -60,21 +60,35 @@ class WorkspaceTracker { this.disposables.push(watcher) - this.disposables.push(vscode.window.tabGroups.onDidChangeTabs(() => this.workspaceDidReset())) + // Listen for tab changes and call workspaceDidUpdate directly + this.disposables.push( + vscode.window.tabGroups.onDidChangeTabs(() => { + // Reset if workspace path has changed + if (this.prevWorkSpacePath !== this.cwd) { + this.workspaceDidReset() + } else { + // Otherwise just update + this.workspaceDidUpdate() + } + }), + ) } private getOpenedTabsInfo() { - return vscode.window.tabGroups.all.flatMap((group) => - group.tabs - .filter((tab) => tab.input instanceof vscode.TabInputText) - .map((tab) => { - const path = (tab.input as vscode.TabInputText).uri.fsPath - return { + return vscode.window.tabGroups.all.reduce( + (acc, group) => { + const groupTabs = group.tabs + .filter((tab) => tab.input instanceof vscode.TabInputText) + .map((tab) => ({ label: tab.label, isActive: tab.isActive, - path: toRelativePath(path, this.cwd || ""), - } - }), + path: toRelativePath((tab.input as vscode.TabInputText).uri.fsPath, this.cwd || ""), + })) + + groupTabs.forEach((tab) => (tab.isActive ? acc.unshift(tab) : acc.push(tab))) + return acc + }, + [] as Array<{ label: string; isActive: boolean; path: string }>, ) } diff --git a/src/services/api/ApiService.ts b/src/services/api/ApiService.ts new file mode 100644 index 00000000000..d3877d5fd48 --- /dev/null +++ b/src/services/api/ApiService.ts @@ -0,0 +1,69 @@ +import { Anthropic } from "@anthropic-ai/sdk" +import { ApiConfiguration } from "../../shared/api" +import { buildApiHandler } from "../../api" +import { ApiHandler } from "../../api" +import { ApiMessageParam, ApiResponse, ApiStreamOptions, IApiService } from "./ApiTypes" +import { calculateApiCostAnthropic } from "../../utils/cost" +import { TokenUsage } from "../../exports/roo-code" +import { ApiStreamChunk } from "../../api/transform/stream" + +export class ApiService implements IApiService { + private api!: ApiHandler + private apiConfiguration!: ApiConfiguration + private apiConversationHistory: ApiMessageParam[] = [] + + constructor() { + // Will be initialized later with proper configuration + } + + initialize(config: ApiConfiguration): void { + this.apiConfiguration = config + this.api = buildApiHandler(config) + } + + async *handleApiRequest(options: ApiStreamOptions): AsyncGenerator { + const { previousApiReqIndex, retryAttempt = 0 } = options + + try { + // Note: We'll need to implement the system prompt generation later + const systemPrompt = "You are a helpful AI assistant." + const stream = await this.api.createMessage( + systemPrompt, + this.apiConversationHistory.slice(0, previousApiReqIndex + 1) + ) + + for await (const chunk of stream) { + if (chunk.type === "text") { + const usage: TokenUsage = { + totalTokensIn: 0, + totalTokensOut: 0, + totalCost: 0, // We'll implement proper cost calculation later + contextTokens: 0 + } + yield { + content: chunk.text, + usage + } + } + } + } catch (error) { + if (retryAttempt < 3) { + // Implement retry logic + yield* this.handleApiRequest({ + previousApiReqIndex, + retryAttempt: retryAttempt + 1 + }) + } else { + throw error + } + } + } + + async updateConversationHistory(messages: ApiMessageParam[]): Promise { + this.apiConversationHistory = messages + } + + async getConversationHistory(): Promise { + return this.apiConversationHistory + } +} \ No newline at end of file diff --git a/src/services/api/ApiTypes.ts b/src/services/api/ApiTypes.ts new file mode 100644 index 00000000000..c8f507c7e45 --- /dev/null +++ b/src/services/api/ApiTypes.ts @@ -0,0 +1,22 @@ +import { Anthropic } from "@anthropic-ai/sdk" +import { ApiConfiguration } from "../../shared/api" +import { TokenUsage } from "../../exports/roo-code" + +export type ApiResponse = { + content: string + usage: TokenUsage +} + +export type ApiStreamOptions = { + previousApiReqIndex: number + retryAttempt?: number +} + +export type ApiMessageParam = Anthropic.MessageParam & { ts?: number } + +export interface IApiService { + initialize(config: ApiConfiguration): void + handleApiRequest(options: ApiStreamOptions): AsyncGenerator + updateConversationHistory(messages: ApiMessageParam[]): Promise + getConversationHistory(): Promise +} \ No newline at end of file diff --git a/src/services/filesystem/FileSystemService.ts b/src/services/filesystem/FileSystemService.ts new file mode 100644 index 00000000000..0f31f0c1f25 --- /dev/null +++ b/src/services/filesystem/FileSystemService.ts @@ -0,0 +1,60 @@ +import fs from "fs/promises" +import * as path from "path" +import { fileExistsAtPath } from "../../utils/fs" +import { getReadablePath } from "../../utils/path" + +export interface IFileSystemService { + readFile(filePath: string): Promise + writeFile(filePath: string, content: string): Promise + deleteFile(filePath: string): Promise + ensureDirectory(dirPath: string): Promise + exists(path: string): Promise + getReadablePath(filePath: string): string +} + +export class FileSystemService implements IFileSystemService { + constructor(private workspaceRoot: string) {} + + async readFile(filePath: string): Promise { + const absolutePath = this.resolveWorkspacePath(filePath) + return fs.readFile(absolutePath, 'utf-8') + } + + async writeFile(filePath: string, content: string): Promise { + const absolutePath = this.resolveWorkspacePath(filePath) + await this.ensureDirectory(path.dirname(absolutePath)) + await fs.writeFile(absolutePath, content, 'utf-8') + } + + async deleteFile(filePath: string): Promise { + const absolutePath = this.resolveWorkspacePath(filePath) + if (await this.exists(absolutePath)) { + await fs.unlink(absolutePath) + } + } + + async ensureDirectory(dirPath: string): Promise { + try { + await fs.mkdir(dirPath, { recursive: true }) + } catch (error) { + if ((error as NodeJS.ErrnoException).code !== 'EEXIST') { + throw error + } + } + } + + async exists(path: string): Promise { + return fileExistsAtPath(path) + } + + getReadablePath(filePath: string): string { + return getReadablePath(filePath) + } + + private resolveWorkspacePath(filePath: string): string { + if (path.isAbsolute(filePath)) { + return filePath + } + return path.resolve(this.workspaceRoot, filePath) + } +} \ No newline at end of file diff --git a/src/services/filesystem/MessageService.ts b/src/services/filesystem/MessageService.ts new file mode 100644 index 00000000000..04f7caeb723 --- /dev/null +++ b/src/services/filesystem/MessageService.ts @@ -0,0 +1,331 @@ +import { Anthropic } from "@anthropic-ai/sdk" +import { IFileSystemService } from "../filesystem/FileSystemService" +import { ConversationState, IMessageService, MessageHistory } from "./MessageTypes" +import * as path from "path" +import { ClineMessage } from "../../exports/roo-code" + +export interface ApiMessageWithMetadata extends Anthropic.MessageParam { + taskId?: string + ts?: number +} + +export class MessageService implements IMessageService { + private static readonly HISTORY_FILENAME = "message-history.json" + private static readonly DEFAULT_STATE: ConversationState = { + isStreaming: false, + isPaused: false, + isWaitingForResponse: false + } + + private messages: Map = new Map() + private apiMessages: Map = new Map() + private conversationStates: Map = new Map() + private activeTaskId?: string + + constructor( + private readonly fileSystemService: IFileSystemService, + private readonly workspaceRoot: string + ) {} + + // Task Management + private validateTaskId(taskId?: string): asserts taskId is string { + if (!taskId) { + throw new Error("No active task found") + } + } + + private getTaskMessages(taskId: string): ClineMessage[] { + return this.messages.get(taskId) || [] + } + + private getTaskApiMessages(taskId: string): ApiMessageWithMetadata[] { + return this.apiMessages.get(taskId) || [] + } + + // Message Management + async addMessage(message: ClineMessage): Promise { + this.validateTaskId(this.activeTaskId) + const messages = this.getTaskMessages(this.activeTaskId) + messages.push(message) + this.messages.set(this.activeTaskId, messages) + await this.saveHistory(this.activeTaskId) + } + + async updateMessage(message: Partial & { ts: number }): Promise { + this.validateTaskId(this.activeTaskId) + const messages = this.getTaskMessages(this.activeTaskId) + const index = messages.findIndex(m => m.ts === message.ts) + + if (index === -1) { + return + } + + messages[index] = { ...messages[index], ...message } + this.messages.set(this.activeTaskId, messages) + await this.saveHistory(this.activeTaskId) + } + + async getMessages(taskId: string): Promise { + if (!this.messages.has(taskId)) { + const history = await this.loadHistory(taskId) + this.messages.set(taskId, history.messages) + } + return this.getTaskMessages(taskId) + } + + async addMessages(messages: ClineMessage[]): Promise { + this.validateTaskId(this.activeTaskId) + const existingMessages = this.getTaskMessages(this.activeTaskId) + this.messages.set(this.activeTaskId, [...existingMessages, ...messages]) + await this.saveHistory(this.activeTaskId) + } + + // API Message Management + async addApiMessage(message: Anthropic.MessageParam): Promise { + this.validateTaskId(this.activeTaskId) + const messageWithMetadata: ApiMessageWithMetadata = { + ...message, + taskId: this.activeTaskId, + ts: Date.now() + } + + const messages = this.getTaskApiMessages(this.activeTaskId) + messages.push(messageWithMetadata) + this.apiMessages.set(this.activeTaskId, messages) + await this.saveHistory(this.activeTaskId) + } + + async addApiMessages(messages: Anthropic.MessageParam[]): Promise { + this.validateTaskId(this.activeTaskId) + const existingMessages = this.getTaskApiMessages(this.activeTaskId) + const newMessages = messages.map(message => ({ + ...message, + taskId: this.activeTaskId, + ts: Date.now() + })) + this.apiMessages.set(this.activeTaskId, [...existingMessages, ...newMessages]) + await this.saveHistory(this.activeTaskId) + } + + async getApiMessages(taskId: string): Promise { + if (!this.apiMessages.has(taskId)) { + const history = await this.loadHistory(taskId) + this.apiMessages.set(taskId, history.apiMessages) + } + return this.getTaskApiMessages(taskId) + } + + async saveApiMessages(historyPath: string): Promise { + this.validateTaskId(this.activeTaskId) + const messages = this.getTaskApiMessages(this.activeTaskId) + await this.fileSystemService.writeFile( + historyPath, + JSON.stringify(messages, null, 2) + ) + } + + // State Management + getConversationState(taskId: string): ConversationState { + if (!this.conversationStates.has(taskId)) { + this.conversationStates.set(taskId, { + ...MessageService.DEFAULT_STATE, + currentTaskId: taskId + }) + } + return this.conversationStates.get(taskId)! + } + + updateConversationState(taskId: string, state: Partial): void { + const currentState = this.getConversationState(taskId) + this.conversationStates.set(taskId, { ...currentState, ...state }) + } + + // History Management + async saveHistory(taskId: string): Promise { + const taskDir = await this.ensureTaskDirectory(taskId) + const history: MessageHistory = { + messages: this.getTaskMessages(taskId), + apiMessages: this.getTaskApiMessages(taskId) + } + await this.fileSystemService.writeFile( + path.join(taskDir, MessageService.HISTORY_FILENAME), + JSON.stringify(history, null, 2) + ) + } + + async loadHistory(taskId: string): Promise { + const taskDir = await this.ensureTaskDirectory(taskId) + const historyPath = path.join(taskDir, MessageService.HISTORY_FILENAME) + + if (await this.fileSystemService.exists(historyPath)) { + const content = await this.fileSystemService.readFile(historyPath) + return JSON.parse(content) + } + + return { + messages: [], + apiMessages: [] + } + } + + async saveMessages(messagesPath: string): Promise { + this.validateTaskId(this.activeTaskId) + const messages = this.getTaskMessages(this.activeTaskId) + await this.fileSystemService.writeFile( + messagesPath, + JSON.stringify(messages, null, 2) + ) + } + + // Webview Integration + async postStateToWebview(): Promise { + // This is a placeholder implementation + // The actual implementation would need to be provided by the webview integration layer + return Promise.resolve() + } + + // File System Operations + private async ensureTaskDirectory(taskId: string): Promise { + const taskDir = path.join(this.workspaceRoot, ".roo", "tasks", taskId) + await this.fileSystemService.ensureDirectory(taskDir) + return taskDir + } + + // Streaming Operations + async handlePartialMessage(taskId: string, message: ClineMessage, isComplete: boolean): Promise { + const messages = this.getTaskMessages(taskId) + const lastMessage = messages.at(-1) + const isUpdatingPreviousPartial = lastMessage && + lastMessage.partial && + lastMessage.type === message.type && + ((message.type === "ask" && lastMessage.ask === message.ask) || + (message.type === "say" && lastMessage.say === message.say)) + + if (!isComplete) { + if (isUpdatingPreviousPartial) { + // Update existing partial message + await this.updateMessage({ + ...lastMessage, + ...message, + partial: true + }) + } else { + // Add new partial message + await this.addMessage({ + ...message, + partial: true + }) + } + } else { + if (isUpdatingPreviousPartial) { + // Complete the partial message + await this.updateMessage({ + ...lastMessage, + ...message, + partial: false + }) + await this.saveHistory(taskId) + } else { + // Add new complete message + await this.addMessage({ + ...message, + partial: false + }) + } + } + } + + async updateStreamingState(taskId: string, isStreaming: boolean): Promise { + this.updateConversationState(taskId, { isStreaming }) + } + + // Complex Operations + async deleteMessage(taskId: string, messageTs: number): Promise { + const messages = this.getTaskMessages(taskId) + const apiMessages = this.getTaskApiMessages(taskId) + + const messageIndex = messages.findIndex(msg => msg.ts === messageTs) + if (messageIndex === -1) return + + // Find the next user message + const nextUserMessage = messages + .slice(messageIndex + 1) + .find(msg => msg.type === "say" && msg.say === "user_feedback") + + if (nextUserMessage) { + const nextUserMessageIndex = messages.findIndex(msg => msg === nextUserMessage) + // Keep messages before current message and after next user message + this.messages.set(taskId, [ + ...messages.slice(0, messageIndex), + ...messages.slice(nextUserMessageIndex) + ]) + + // Handle API messages + if (nextUserMessage.ts) { + this.apiMessages.set(taskId, [ + ...apiMessages.slice(0, messageIndex), + ...apiMessages.filter(msg => msg.ts && msg.ts >= nextUserMessage.ts) + ]) + } + } else { + // If no next user message, keep only messages before current message + this.messages.set(taskId, messages.slice(0, messageIndex)) + this.apiMessages.set(taskId, apiMessages.slice(0, messageIndex)) + } + + await this.saveHistory(taskId) + } + + async deleteMessageAndSubsequent(taskId: string, messageTs: number): Promise { + const messages = this.getTaskMessages(taskId) + const apiMessages = this.getTaskApiMessages(taskId) + + const messageIndex = messages.findIndex(msg => msg.ts === messageTs) + if (messageIndex === -1) return + + // Delete this message and all that follow + this.messages.set(taskId, messages.slice(0, messageIndex)) + this.apiMessages.set(taskId, apiMessages.slice(0, messageIndex)) + + await this.saveHistory(taskId) + } + + async handleStreamInterruption(taskId: string, reason: string): Promise { + const messages = this.getTaskMessages(taskId) + const lastMessage = messages.at(-1) + + if (lastMessage?.partial) { + await this.updateMessage({ + ...lastMessage, + partial: false + }) + } + + // Add interruption note to API conversation + await this.addApiMessage({ + role: "assistant", + content: [ + { + type: "text", + text: `[Response interrupted: ${reason}]` + } + ] + }) + + await this.saveHistory(taskId) + } + + async restoreToCheckpoint(taskId: string, checkpointTs: number): Promise { + const messages = this.getTaskMessages(taskId) + const apiMessages = this.getTaskApiMessages(taskId) + + const index = messages.findIndex(m => m.ts === checkpointTs) + if (index === -1) return + + // Restore messages up to checkpoint + this.messages.set(taskId, messages.slice(0, index + 1)) + this.apiMessages.set(taskId, apiMessages.filter(m => !m.ts || m.ts < checkpointTs)) + + await this.saveHistory(taskId) + } +} \ No newline at end of file diff --git a/src/services/filesystem/MessageTypes.ts b/src/services/filesystem/MessageTypes.ts new file mode 100644 index 00000000000..bff40040826 --- /dev/null +++ b/src/services/filesystem/MessageTypes.ts @@ -0,0 +1,51 @@ +import { Anthropic } from "@anthropic-ai/sdk" +import { ClineMessage } from "../../exports/roo-code" +import { ApiMessageWithMetadata } from "./MessageService" + +export interface ConversationState { + isStreaming: boolean + isPaused: boolean + isWaitingForResponse: boolean + currentTaskId?: string +} + +export interface MessageHistory { + messages: ClineMessage[] + apiMessages: ApiMessageWithMetadata[] +} + +export interface IMessageService { + // Core message handling + addMessage(message: ClineMessage): Promise + updateMessage(message: Partial & { ts: number }): Promise + getMessages(taskId: string): Promise + + // API message handling + addApiMessage(message: Anthropic.MessageParam): Promise + addApiMessages(messages: Anthropic.MessageParam[]): Promise + getApiMessages(taskId: string): Promise + saveApiMessages(historyPath: string): Promise + + // State management + getConversationState(taskId: string): ConversationState + updateConversationState(taskId: string, state: Partial): void + + // History management + saveHistory(taskId: string): Promise + loadHistory(taskId: string): Promise + saveMessages(messagesPath: string): Promise + addMessages(messages: ClineMessage[]): Promise + + // Webview integration + postStateToWebview(): Promise + + // New Streaming Operations + handlePartialMessage(taskId: string, message: ClineMessage, isComplete: boolean): Promise + updateStreamingState(taskId: string, isStreaming: boolean): Promise + + // New Complex Operations + deleteMessage(taskId: string, messageTs: number): Promise + deleteMessageAndSubsequent(taskId: string, messageTs: number): Promise + handleStreamInterruption(taskId: string, reason: string): Promise + restoreToCheckpoint(taskId: string, checkpointTs: number): Promise +} \ No newline at end of file diff --git a/src/services/mcp/McpHub.ts b/src/services/mcp/McpHub.ts index 8ca74291767..9c52787f4d8 100644 --- a/src/services/mcp/McpHub.ts +++ b/src/services/mcp/McpHub.ts @@ -42,6 +42,7 @@ const BaseConfigSchema = z.object({ disabled: z.boolean().optional(), timeout: z.number().min(1).max(3600).optional().default(60), alwaysAllow: z.array(z.string()).default([]), + watchPaths: z.array(z.string()).optional(), // paths to watch for changes and restart server }) // Custom error messages for better user feedback @@ -102,7 +103,7 @@ export class McpHub { private providerRef: WeakRef private disposables: vscode.Disposable[] = [] private settingsWatcher?: vscode.FileSystemWatcher - private fileWatchers: Map = new Map() + private fileWatchers: Map = new Map() private isDisposed: boolean = false connections: McpConnection[] = [] isConnecting: boolean = false @@ -562,29 +563,68 @@ export class McpHub { } private setupFileWatcher(name: string, config: z.infer) { + // Initialize an empty array for this server if it doesn't exist + if (!this.fileWatchers.has(name)) { + this.fileWatchers.set(name, []) + } + + const watchers = this.fileWatchers.get(name) || [] + // Only stdio type has args if (config.type === "stdio") { + // Setup watchers for custom watchPaths if defined + if (config.watchPaths && config.watchPaths.length > 0) { + console.log(`Setting up custom path watchers for ${name} MCP server...`) + const watchPathsWatcher = chokidar.watch(config.watchPaths, { + // persistent: true, + // ignoreInitial: true, + // awaitWriteFinish: true, + }) + + watchPathsWatcher.on("change", async (changedPath) => { + console.log(`Detected change in custom path ${changedPath}. Restarting server ${name}...`) + try { + await this.restartConnection(name) + } catch (error) { + console.error(`Failed to restart server ${name} after change in ${changedPath}:`, error) + } + }) + + watchers.push(watchPathsWatcher) + } + + // Also setup the fallback build/index.js watcher if applicable const filePath = config.args?.find((arg: string) => arg.includes("build/index.js")) if (filePath) { - // we use chokidar instead of onDidSaveTextDocument because it doesn't require the file to be open in the editor. The settings config is better suited for onDidSave since that will be manually updated by the user or Cline (and we want to detect save events, not every file change) - const watcher = chokidar.watch(filePath, { + console.log(`Setting up build/index.js watcher for ${name} MCP server...`) + // we use chokidar instead of onDidSaveTextDocument because it doesn't require the file to be open in the editor + const indexJsWatcher = chokidar.watch(filePath, { // persistent: true, // ignoreInitial: true, // awaitWriteFinish: true, // This helps with atomic writes }) - watcher.on("change", () => { + indexJsWatcher.on("change", async () => { console.log(`Detected change in ${filePath}. Restarting server ${name}...`) - this.restartConnection(name) + try { + await this.restartConnection(name) + } catch (error) { + console.error(`Failed to restart server ${name} after change in ${filePath}:`, error) + } }) - this.fileWatchers.set(name, watcher) + watchers.push(indexJsWatcher) + } + + // Update the fileWatchers map with all watchers for this server + if (watchers.length > 0) { + this.fileWatchers.set(name, watchers) } } } private removeAllFileWatchers() { - this.fileWatchers.forEach((watcher) => watcher.close()) + this.fileWatchers.forEach((watchers) => watchers.forEach((watcher) => watcher.close())) this.fileWatchers.clear() } diff --git a/src/services/mcp/__tests__/McpHub.test.ts b/src/services/mcp/__tests__/McpHub.test.ts index 737ed7f11e7..7fcce6662a0 100644 --- a/src/services/mcp/__tests__/McpHub.test.ts +++ b/src/services/mcp/__tests__/McpHub.test.ts @@ -14,7 +14,7 @@ jest.mock("../../../core/webview/ClineProvider") describe("McpHub", () => { let mcpHub: McpHubType let mockProvider: Partial - const mockSettingsPath = "/mock/settings/path/cline_mcp_settings.json" + const mockSettingsPath = "/mock/settings/path/mcp_settings.json" beforeEach(() => { jest.clearAllMocks() diff --git a/src/services/tree-sitter/__tests__/index.test.ts b/src/services/tree-sitter/__tests__/index.test.ts index bc506c031df..3f16deddebb 100644 --- a/src/services/tree-sitter/__tests__/index.test.ts +++ b/src/services/tree-sitter/__tests__/index.test.ts @@ -122,7 +122,6 @@ describe("Tree-sitter Service", () => { expect(result).toContain("class TestClass") expect(result).toContain("testMethod()") - expect(result).toContain("|----") }) it("should handle parsing errors gracefully", async () => { diff --git a/src/services/tree-sitter/index.ts b/src/services/tree-sitter/index.ts index 138e41c2a95..e080e9ec001 100644 --- a/src/services/tree-sitter/index.ts +++ b/src/services/tree-sitter/index.ts @@ -55,7 +55,7 @@ export async function parseSourceCodeDefinitionsForFile( // Parse the file if we have a parser for it const definitions = await parseFile(filePath, languageParsers, rooIgnoreController) if (definitions) { - return `${path.basename(filePath)}\n${definitions}` + return `# ${path.basename(filePath)}\n${definitions}` } return undefined @@ -90,7 +90,7 @@ export async function parseSourceCodeForDefinitionsTopLevel( for (const file of allowedFilesToParse) { const definitions = await parseFile(file, languageParsers, rooIgnoreController) if (definitions) { - result += `${path.relative(dirPath, file).toPosix()}\n${definitions}\n` + result += `# ${path.relative(dirPath, file).toPosix()}\n${definitions}\n` } // else { // filesWithoutDefinitions.push(file) @@ -177,10 +177,6 @@ async function parseFile( return null } - // Add a header with file information and definition count - // Make sure to normalize path separators to forward slashes for consistency - formattedOutput += `// File: ${path.basename(filePath).replace(/\\/g, "/")} (${captures.length} definitions)\n` - // Sort captures by their start position captures.sort((a, b) => a.node.startPosition.row - b.node.startPosition.row) @@ -224,15 +220,10 @@ async function parseFile( const lineKey = `${startLine}-${lines[startLine]}` const nodeLineKey = `${nodeLine}-${lines[nodeLine]}` - // Add separator if there's a gap between captures - if (lastLine !== -1 && startLine > lastLine + 1) { - formattedOutput += "|| ||----\n" - } - // Always show the class definition line if (name.includes("class") || (name.includes("name") && name.includes("class"))) { if (!processedLines.has(lineKey)) { - formattedOutput += `│| ${startLine} - ${endLine} ||${lines[startLine]}\n` + formattedOutput += `${startLine}--${endLine} | ${lines[startLine]}\n` processedLines.add(lineKey) } } @@ -243,7 +234,7 @@ async function parseFile( // For function definitions, we need to show the actual line with the function/method name // This handles the test case mocks where nodeLine is 2 (for "testMethod()") if (!processedLines.has(nodeLineKey) && lines[nodeLine]) { - formattedOutput += `│| ${nodeLine} - ${node.endPosition.row} ||${lines[nodeLine]}\n` + formattedOutput += `${nodeLine}--${node.endPosition.row} | ${lines[nodeLine]}\n` processedLines.add(nodeLineKey) } } @@ -256,7 +247,7 @@ async function parseFile( !name.includes("method") ) { if (!processedLines.has(lineKey)) { - formattedOutput += `│| ${startLine} - ${endLine} ||${lines[startLine]}\n` + formattedOutput += `${startLine}--${endLine} | ${lines[startLine]}\n` processedLines.add(lineKey) } } @@ -270,22 +261,7 @@ async function parseFile( } if (formattedOutput.length > 0) { - // Create categorized summary of definitions - const classCount = formattedOutput.split("class").length - 1 - const functionCount = - formattedOutput.split("function").length - 1 + (formattedOutput.split("method").length - 1) - const variableCount = - formattedOutput.split("const").length - - 1 + - formattedOutput.split("let").length - - 1 + - formattedOutput.split("var").length - - 1 - - // Add a footer with a summary of definitions - const summary = `// Summary: ${classCount > 0 ? `${classCount} classes, ` : ""}${functionCount > 0 ? `${functionCount} functions/methods, ` : ""}${variableCount > 0 ? `${variableCount} variables` : ""}` - - return `|----\n${formattedOutput}|----\n${summary}\n` + return formattedOutput } return null } diff --git a/src/services/tree-sitter/queries/typescript.ts b/src/services/tree-sitter/queries/typescript.ts index b30c10e9152..3db50f7f84a 100644 --- a/src/services/tree-sitter/queries/typescript.ts +++ b/src/services/tree-sitter/queries/typescript.ts @@ -29,4 +29,19 @@ export default ` (class_declaration name: (type_identifier) @name.definition.class) @definition.class + +(call_expression + function: (identifier) @func_name + arguments: (arguments + (string) @name + [(arrow_function) (function_expression)]) @definition.test) + (#match? @func_name "^(describe|test|it)$") + +(assignment_expression + left: (member_expression + object: (identifier) @obj + property: (property_identifier) @prop) + right: [(arrow_function) (function_expression)]) @definition.test + (#eq? @obj "exports") + (#eq? @prop "test") ` diff --git a/src/shared/ExtensionMessage.ts b/src/shared/ExtensionMessage.ts index b7219de2f85..f42381701a4 100644 --- a/src/shared/ExtensionMessage.ts +++ b/src/shared/ExtensionMessage.ts @@ -120,7 +120,9 @@ export interface ExtensionState { customModePrompts?: CustomModePrompts customSupportPrompts?: CustomSupportPrompts alwaysAllowReadOnly?: boolean + alwaysAllowReadOnlyOutsideWorkspace?: boolean alwaysAllowWrite?: boolean + alwaysAllowWriteOutsideWorkspace?: boolean alwaysAllowExecute?: boolean alwaysAllowBrowser?: boolean alwaysAllowMcp?: boolean @@ -151,7 +153,6 @@ export interface ExtensionState { terminalShellIntegrationTimeout?: number mcpEnabled: boolean enableMcpServerCreation: boolean - enableCustomModeCreation?: boolean mode: Mode modeApiConfigs?: Record enhancementApiConfigId?: string @@ -178,6 +179,7 @@ export interface ClineSayTool { | "appliedDiff" | "newFileCreated" | "readFile" + | "fetchInstructions" | "listFilesTopLevel" | "listFilesRecursive" | "listCodeDefinitionNames" @@ -192,6 +194,7 @@ export interface ClineSayTool { filePattern?: string mode?: string reason?: string + isOutsideWorkspace?: boolean } // Must keep in sync with system prompt. diff --git a/src/shared/WebviewMessage.ts b/src/shared/WebviewMessage.ts index d87be2a716d..7a4cb38c673 100644 --- a/src/shared/WebviewMessage.ts +++ b/src/shared/WebviewMessage.ts @@ -22,7 +22,9 @@ export interface WebviewMessage { | "customInstructions" | "allowedCommands" | "alwaysAllowReadOnly" + | "alwaysAllowReadOnlyOutsideWorkspace" | "alwaysAllowWrite" + | "alwaysAllowWriteOutsideWorkspace" | "alwaysAllowExecute" | "webviewDidLaunch" | "newTask" @@ -78,7 +80,6 @@ export interface WebviewMessage { | "terminalShellIntegrationTimeout" | "mcpEnabled" | "enableMcpServerCreation" - | "enableCustomModeCreation" | "searchCommits" | "alwaysApproveResubmit" | "requestDelaySeconds" diff --git a/src/shared/__tests__/context-mentions.test.ts b/src/shared/__tests__/context-mentions.test.ts deleted file mode 100644 index 99bad21ebb4..00000000000 --- a/src/shared/__tests__/context-mentions.test.ts +++ /dev/null @@ -1,325 +0,0 @@ -import { mentionRegex, mentionRegexGlobal } from "../context-mentions" - -interface TestResult { - actual: string | null - expected: string | null -} - -function testMention(input: string, expected: string | null): TestResult { - const match = mentionRegex.exec(input) - return { - actual: match ? match[0] : null, - expected, - } -} - -function expectMatch(result: TestResult) { - if (result.expected === null) { - return expect(result.actual).toBeNull() - } - if (result.actual !== result.expected) { - // Instead of console.log, use expect().toBe() with a descriptive message - expect(result.actual).toBe(result.expected) - } -} - -describe("Mention Regex", () => { - describe("Windows Path Support", () => { - it("matches simple Windows paths", () => { - const cases: Array<[string, string]> = [ - ["@C:\\folder\\file.txt", "@C:\\folder\\file.txt"], - ["@c:\\Program/ Files\\file.txt", "@c:\\Program/ Files\\file.txt"], - ["@C:\\file.txt", "@C:\\file.txt"], - ] - - cases.forEach(([input, expected]) => { - const result = testMention(input, expected) - expectMatch(result) - }) - }) - - it("matches Windows network shares", () => { - const cases: Array<[string, string]> = [ - ["@\\\\server\\share\\file.txt", "@\\\\server\\share\\file.txt"], - ["@\\\\127.0.0.1\\network-path\\file.txt", "@\\\\127.0.0.1\\network-path\\file.txt"], - ] - - cases.forEach(([input, expected]) => { - const result = testMention(input, expected) - expectMatch(result) - }) - }) - - it("matches mixed separators", () => { - const result = testMention("@C:\\folder\\file.txt", "@C:\\folder\\file.txt") - expectMatch(result) - }) - - it("matches Windows relative paths", () => { - const cases: Array<[string, string]> = [ - ["@folder\\file.txt", "@folder\\file.txt"], - ["@.\\folder\\file.txt", "@.\\folder\\file.txt"], - ["@..\\parent\\file.txt", "@..\\parent\\file.txt"], - ["@path\\to\\directory\\", "@path\\to\\directory\\"], - ["@.\\current\\path\\with/ space.txt", "@.\\current\\path\\with/ space.txt"], - ] - - cases.forEach(([input, expected]) => { - const result = testMention(input, expected) - expectMatch(result) - }) - }) - }) - - describe("Escaped Spaces Support", () => { - it("matches Unix paths with escaped spaces", () => { - const cases: Array<[string, string]> = [ - ["@/path/to/file\\ with\\ spaces.txt", "@/path/to/file\\ with\\ spaces.txt"], - ["@/path/with\\ \\ multiple\\ spaces.txt", "@/path/with\\ \\ multiple\\ spaces.txt"], - ] - - cases.forEach(([input, expected]) => { - const result = testMention(input, expected) - expectMatch(result) - }) - }) - - it("matches Windows paths with escaped spaces", () => { - const cases: Array<[string, string]> = [ - ["@C:\\path\\to\\file/ with/ spaces.txt", "@C:\\path\\to\\file/ with/ spaces.txt"], - ["@C:\\Program/ Files\\app\\file.txt", "@C:\\Program/ Files\\app\\file.txt"], - ] - - cases.forEach(([input, expected]) => { - const result = testMention(input, expected) - expectMatch(result) - }) - }) - }) - - describe("Combined Path Variations", () => { - it("matches complex path combinations", () => { - const cases: Array<[string, string]> = [ - [ - "@C:\\Users\\name\\Documents\\file/ with/ spaces.txt", - "@C:\\Users\\name\\Documents\\file/ with/ spaces.txt", - ], - [ - "@\\\\server\\share\\path/ with/ spaces\\file.txt", - "@\\\\server\\share\\path/ with/ spaces\\file.txt", - ], - ["@C:\\path/ with/ spaces\\file.txt", "@C:\\path/ with/ spaces\\file.txt"], - ] - - cases.forEach(([input, expected]) => { - const result = testMention(input, expected) - expectMatch(result) - }) - }) - }) - - describe("Edge Cases", () => { - it("handles edge cases correctly", () => { - const cases: Array<[string, string]> = [ - ["@C:\\", "@C:\\"], - ["@/path/to/folder", "@/path/to/folder"], - ["@C:\\folder\\file with spaces.txt", "@C:\\folder\\file"], - ["@C:\\Users\\name\\path\\to\\文件夹\\file.txt", "@C:\\Users\\name\\path\\to\\文件夹\\file.txt"], - ["@/path123/file-name_2.0.txt", "@/path123/file-name_2.0.txt"], - ] - - cases.forEach(([input, expected]) => { - const result = testMention(input, expected) - expectMatch(result) - }) - }) - }) - - describe("Existing Functionality", () => { - it("matches Unix paths", () => { - const cases: Array<[string, string]> = [ - ["@/usr/local/bin/file", "@/usr/local/bin/file"], - ["@/path/to/file.txt", "@/path/to/file.txt"], - ] - - cases.forEach(([input, expected]) => { - const result = testMention(input, expected) - expectMatch(result) - }) - }) - - it("matches URLs", () => { - const cases: Array<[string, string]> = [ - ["@http://example.com", "@http://example.com"], - ["@https://example.com/path/to/file.html", "@https://example.com/path/to/file.html"], - ["@ftp://server.example.com/file.zip", "@ftp://server.example.com/file.zip"], - ] - - cases.forEach(([input, expected]) => { - const result = testMention(input, expected) - expectMatch(result) - }) - }) - - it("matches git hashes", () => { - const cases: Array<[string, string]> = [ - ["@a1b2c3d4e5f6g7h8i9j0", "@a1b2c3d4e5f6g7h8i9j0"], - ["@abcdef1234567890abcdef1234567890abcdef12", "@abcdef1234567890abcdef1234567890abcdef12"], - ] - - cases.forEach(([input, expected]) => { - const result = testMention(input, expected) - expectMatch(result) - }) - }) - - it("matches special keywords", () => { - const cases: Array<[string, string]> = [ - ["@problems", "@problems"], - ["@git-changes", "@git-changes"], - ["@terminal", "@terminal"], - ] - - cases.forEach(([input, expected]) => { - const result = testMention(input, expected) - expectMatch(result) - }) - }) - }) - - describe("Invalid Patterns", () => { - it("rejects invalid patterns", () => { - const cases: Array<[string, null]> = [ - ["C:\\folder\\file.txt", null], - ["@", null], - ["@ C:\\file.txt", null], - ] - - cases.forEach(([input, expected]) => { - const result = testMention(input, expected) - expectMatch(result) - }) - }) - - it("matches only until invalid characters", () => { - const result = testMention("@C:\\folder\\file.txt invalid suffix", "@C:\\folder\\file.txt") - expectMatch(result) - }) - }) - - describe("In Context", () => { - it("matches mentions within text", () => { - const cases: Array<[string, string]> = [ - ["Check the file at @C:\\folder\\file.txt for details.", "@C:\\folder\\file.txt"], - ["See @/path/to/file\\ with\\ spaces.txt for an example.", "@/path/to/file\\ with\\ spaces.txt"], - ["Review @problems and @git-changes.", "@problems"], - ["Multiple: @/file1.txt and @C:\\file2.txt and @terminal", "@/file1.txt"], - ] - - cases.forEach(([input, expected]) => { - const result = testMention(input, expected) - expectMatch(result) - }) - }) - }) - - describe("Multiple Mentions", () => { - it("finds all mentions in a string using global regex", () => { - const text = "Check @/path/file1.txt and @C:\\folder\\file2.txt and report any @problems to @git-changes" - const matches = text.match(mentionRegexGlobal) - expect(matches).toEqual(["@/path/file1.txt", "@C:\\folder\\file2.txt", "@problems", "@git-changes"]) - }) - }) - - describe("Special Characters in Paths", () => { - it("handles special characters in file paths", () => { - const cases: Array<[string, string]> = [ - ["@/path/with-dash/file_underscore.txt", "@/path/with-dash/file_underscore.txt"], - ["@C:\\folder+plus\\file(parens)[]brackets.txt", "@C:\\folder+plus\\file(parens)[]brackets.txt"], - ["@/path/with/file#hash%percent.txt", "@/path/with/file#hash%percent.txt"], - ["@/path/with/file@symbol$dollar.txt", "@/path/with/file@symbol$dollar.txt"], - ] - - cases.forEach(([input, expected]) => { - const result = testMention(input, expected) - expectMatch(result) - }) - }) - }) - - describe("Mixed Path Types in Single String", () => { - it("correctly identifies the first path in a string with multiple path types", () => { - const text = "Check both @/unix/path and @C:\\windows\\path for details." - const result = mentionRegex.exec(text) - expect(result?.[0]).toBe("@/unix/path") - - // Test starting from after the first match - const secondSearchStart = text.indexOf("@C:") - const secondResult = mentionRegex.exec(text.substring(secondSearchStart)) - expect(secondResult?.[0]).toBe("@C:\\windows\\path") - }) - }) - - describe("Non-Latin Character Support", () => { - it("handles international characters in paths", () => { - const cases: Array<[string, string]> = [ - ["@/path/to/你好/file.txt", "@/path/to/你好/file.txt"], - ["@C:\\用户\\документы\\файл.txt", "@C:\\用户\\документы\\файл.txt"], - ["@/путь/к/файлу.txt", "@/путь/к/файлу.txt"], - ["@C:\\folder\\file_äöü.txt", "@C:\\folder\\file_äöü.txt"], - ] - - cases.forEach(([input, expected]) => { - const result = testMention(input, expected) - expectMatch(result) - }) - }) - }) - - describe("Mixed Path Delimiters", () => { - // Modifying expectations to match current behavior - it("documents behavior with mixed forward and backward slashes in Windows paths", () => { - const cases: Array<[string, null]> = [ - // Current implementation doesn't support mixed slashes - ["@C:\\Users/Documents\\folder/file.txt", null], - ["@C:/Windows\\System32/drivers\\etc/hosts", null], - ] - - cases.forEach(([input, expected]) => { - const result = testMention(input, expected) - expectMatch(result) - }) - }) - }) - - describe("Extended Negative Tests", () => { - // Modifying expectations to match current behavior - it("documents behavior with potentially invalid characters", () => { - const cases: Array<[string, string]> = [ - // Current implementation actually matches these patterns - ["@/path/withchars.txt", "@/path/withchars.txt"], - ["@C:\\folder\\file|with|pipe.txt", "@C:\\folder\\file|with|pipe.txt"], - ['@/path/with"quotes".txt', '@/path/with"quotes".txt'], - ] - - cases.forEach(([input, expected]) => { - const result = testMention(input, expected) - expectMatch(result) - }) - }) - }) - - // // These are documented as "not implemented yet" - // describe("Future Enhancement Candidates", () => { - // it("identifies patterns that could be supported in future enhancements", () => { - // // These patterns aren't currently supported by the regex - // // but might be considered for future improvements - // console.log( - // "The following patterns are not currently supported but might be considered for future enhancements:", - // ) - // console.log("- Paths with double slashes: @/path//with/double/slash.txt") - // console.log("- Complex path traversals: @/very/./long/../../path/.././traversal.txt") - // console.log("- Environment variables in paths: @$HOME/file.txt, @C:\\Users\\%USERNAME%\\file.txt") - // }) - // }) -}) diff --git a/src/shared/api.ts b/src/shared/api.ts index 498bb922b84..069b39884b2 100644 --- a/src/shared/api.ts +++ b/src/shared/api.ts @@ -48,6 +48,7 @@ export interface ApiHandlerOptions { vertexRegion?: string openAiBaseUrl?: string openAiApiKey?: string + openAiR1FormatEnabled?: boolean openAiModelId?: string openAiCustomModelInfo?: ModelInfo openAiUseAzure?: boolean @@ -127,6 +128,7 @@ export const API_CONFIG_KEYS: GlobalStateKey[] = [ "azureApiVersion", "openRouterUseMiddleOutTransform", "openAiStreamingEnabled", + "openAiR1FormatEnabled", // "deepSeekBaseUrl", // not exist on GlobalStateKey // "includeMaxTokens", // not exist on GlobalStateKey "unboundModelId", @@ -740,20 +742,19 @@ export const openAiModelInfoSaneDefaults: ModelInfo = { outputPrice: 0, } -export const requestyModelInfoSaneDefaults: ModelInfo = { - maxTokens: -1, - contextWindow: 128_000, - supportsImages: true, - supportsPromptCache: false, - inputPrice: 0, - outputPrice: 0, -} - // Gemini // https://ai.google.dev/gemini-api/docs/models/gemini export type GeminiModelId = keyof typeof geminiModels export const geminiDefaultModelId: GeminiModelId = "gemini-2.0-flash-001" export const geminiModels = { + "gemini-2.5-pro-exp-03-25": { + maxTokens: 65_536, + contextWindow: 1_048_576, + supportsImages: true, + supportsPromptCache: false, + inputPrice: 0, + outputPrice: 0, + }, "gemini-2.0-flash-001": { maxTokens: 8192, contextWindow: 1_048_576, @@ -862,7 +863,7 @@ export const openAiNativeModels = { maxTokens: 100_000, contextWindow: 200_000, supportsImages: false, - supportsPromptCache: false, + supportsPromptCache: true, inputPrice: 1.1, outputPrice: 4.4, reasoningEffort: "medium", @@ -871,7 +872,7 @@ export const openAiNativeModels = { maxTokens: 100_000, contextWindow: 200_000, supportsImages: false, - supportsPromptCache: false, + supportsPromptCache: true, inputPrice: 1.1, outputPrice: 4.4, reasoningEffort: "high", @@ -880,7 +881,7 @@ export const openAiNativeModels = { maxTokens: 100_000, contextWindow: 200_000, supportsImages: false, - supportsPromptCache: false, + supportsPromptCache: true, inputPrice: 1.1, outputPrice: 4.4, reasoningEffort: "low", @@ -889,7 +890,7 @@ export const openAiNativeModels = { maxTokens: 100_000, contextWindow: 200_000, supportsImages: true, - supportsPromptCache: false, + supportsPromptCache: true, inputPrice: 15, outputPrice: 60, }, @@ -897,7 +898,7 @@ export const openAiNativeModels = { maxTokens: 32_768, contextWindow: 128_000, supportsImages: true, - supportsPromptCache: false, + supportsPromptCache: true, inputPrice: 15, outputPrice: 60, }, @@ -905,7 +906,7 @@ export const openAiNativeModels = { maxTokens: 65_536, contextWindow: 128_000, supportsImages: true, - supportsPromptCache: false, + supportsPromptCache: true, inputPrice: 1.1, outputPrice: 4.4, }, @@ -913,7 +914,7 @@ export const openAiNativeModels = { maxTokens: 16_384, contextWindow: 128_000, supportsImages: true, - supportsPromptCache: false, + supportsPromptCache: true, inputPrice: 75, outputPrice: 150, }, @@ -921,7 +922,7 @@ export const openAiNativeModels = { maxTokens: 16_384, contextWindow: 128_000, supportsImages: true, - supportsPromptCache: false, + supportsPromptCache: true, inputPrice: 2.5, outputPrice: 10, }, @@ -929,7 +930,7 @@ export const openAiNativeModels = { maxTokens: 16_384, contextWindow: 128_000, supportsImages: true, - supportsPromptCache: false, + supportsPromptCache: true, inputPrice: 0.15, outputPrice: 0.6, }, diff --git a/src/shared/context-mentions.ts b/src/shared/context-mentions.ts index ddfc6650f5f..915114ab932 100644 --- a/src/shared/context-mentions.ts +++ b/src/shared/context-mentions.ts @@ -1,90 +1,57 @@ /* -- **Regex Breakdown**: - - 1. **Pattern Components**: - - The regex is built from multiple patterns joined with OR (|) operators - - Each pattern handles a specific type of mention: - - Unix/Linux paths - - Windows paths with drive letters - - Windows relative paths - - Windows network shares - - URLs with protocols - - Git commit hashes - - Special keywords (problems, git-changes, terminal) - - 2. **Unix Path Pattern**: - - `(?:\\/|^)`: Starts with a forward slash or beginning of line - - `(?:[^\\/\\s\\\\]|\\\\[ \\t])+`: Path segment that can include escaped spaces - - `(?:\\/(?:[^\\/\\s\\\\]|\\\\[ \\t])+)*`: Additional path segments after slashes - - `\\/?`: Optional trailing slash - - 3. **Windows Path Pattern**: - - `[A-Za-z]:\\\\`: Drive letter followed by colon and double backslash - - `(?:(?:[^\\\\\\s/]+|\\/[ ])+`: Path segment that can include spaces escaped with forward slash - - `(?:\\\\(?:[^\\\\\\s/]+|\\/[ ])+)*)?`: Additional path segments after backslashes - - 4. **Windows Relative Path Pattern**: - - `(?:\\.{0,2}|[^\\\\\\s/]+)`: Path prefix that can be: - - Current directory (.) - - Parent directory (..) - - Any directory name not containing spaces, backslashes, or forward slashes - - `\\\\`: Backslash separator - - `(?:[^\\\\\\s/]+|\\\\[ \\t]|\\/[ ])+`: Path segment that can include spaces escaped with backslash or forward slash - - `(?:\\\\(?:[^\\\\\\s/]+|\\\\[ \\t]|\\/[ ])+)*`: Additional path segments after backslashes - - `\\\\?`: Optional trailing backslash +Mention regex: +- **Purpose**: + - To identify and highlight specific mentions in text that start with '@'. + - These mentions can be file paths, URLs, or the exact word 'problems'. + - Ensures that trailing punctuation marks (like commas, periods, etc.) are not included in the match, allowing punctuation to follow the mention without being part of it. - 5. **Network Share Pattern**: - - `\\\\\\\\`: Double backslash (escaped) to start network path - - `[^\\\\\\s]+`: Server name - - `(?:\\\\(?:[^\\\\\\s/]+|\\/[ ])+)*`: Share name and additional path components - - `(?:\\\\)?`: Optional trailing backslash - - 6. **URL Pattern**: - - `\\w+:\/\/`: Protocol (http://, https://, etc.) - - `[^\\s]+`: Rest of the URL (non-whitespace characters) - - 7. **Git Hash Pattern**: - - `[a-zA-Z0-9]{7,40}\\b`: 7-40 alphanumeric characters followed by word boundary - - 8. **Special Keywords Pattern**: - - `problems\\b`, `git-changes\\b`, `terminal\\b`: Exact word matches with word boundaries +- **Regex Breakdown**: + - `/@`: + - **@**: The mention must start with the '@' symbol. + + - `((?:\/|\w+:\/\/)[^\s]+?|problems\b|git-changes\b)`: + - **Capturing Group (`(...)`)**: Captures the part of the string that matches one of the specified patterns. + - `(?:\/|\w+:\/\/)`: + - **Non-Capturing Group (`(?:...)`)**: Groups the alternatives without capturing them for back-referencing. + - `\/`: + - **Slash (`/`)**: Indicates that the mention is a file or folder path starting with a '/'. + - `|`: Logical OR. + - `\w+:\/\/`: + - **Protocol (`\w+://`)**: Matches URLs that start with a word character sequence followed by '://', such as 'http://', 'https://', 'ftp://', etc. + - `[^\s]+?`: + - **Non-Whitespace Characters (`[^\s]+`)**: Matches one or more characters that are not whitespace. + - **Non-Greedy (`+?`)**: Ensures the smallest possible match, preventing the inclusion of trailing punctuation. + - `|`: Logical OR. + - `problems\b`: + - **Exact Word ('problems')**: Matches the exact word 'problems'. + - **Word Boundary (`\b`)**: Ensures that 'problems' is matched as a whole word and not as part of another word (e.g., 'problematic'). + - `|`: Logical OR. + - `terminal\b`: + - **Exact Word ('terminal')**: Matches the exact word 'terminal'. + - **Word Boundary (`\b`)**: Ensures that 'terminal' is matched as a whole word and not as part of another word (e.g., 'terminals'). + - `(?=[.,;:!?]?(?=[\s\r\n]|$))`: + - **Positive Lookahead (`(?=...)`)**: Ensures that the match is followed by specific patterns without including them in the match. + - `[.,;:!?]?`: + - **Optional Punctuation (`[.,;:!?]?`)**: Matches zero or one of the specified punctuation marks. + - `(?=[\s\r\n]|$)`: + - **Nested Positive Lookahead (`(?=[\s\r\n]|$)`)**: Ensures that the punctuation (if present) is followed by a whitespace character, a line break, or the end of the string. + +- **Summary**: + - The regex effectively matches: + - Mentions that are file or folder paths starting with '/' and containing any non-whitespace characters (including periods within the path). + - URLs that start with a protocol (like 'http://') followed by any non-whitespace characters (including query parameters). + - The exact word 'problems'. + - The exact word 'git-changes'. + - The exact word 'terminal'. + - It ensures that any trailing punctuation marks (such as ',', '.', '!', etc.) are not included in the matched mention, allowing the punctuation to follow the mention naturally in the text. - 9. **Termination Logic**: - - `(?=[.,;:!?]?(?=[\\s\\r\\n]|$))`: Positive lookahead that: - - Allows an optional punctuation mark after the mention - - Ensures the mention (and optional punctuation) is followed by whitespace or end of string +- **Global Regex**: + - `mentionRegexGlobal`: Creates a global version of the `mentionRegex` to find all matches within a given string. -- **Behavior Summary**: - - Matches @-prefixed mentions - - Handles different path formats across operating systems - - Supports escaped spaces in paths using OS-appropriate conventions - - Cleanly terminates at whitespace or end of string - - Excludes trailing punctuation from the match - - Creates both single-match and global-match regex objects */ - -const mentionPatterns = [ - // Unix paths with escaped spaces using backslash - "(?:\\/|^)(?:[^\\/\\s\\\\]|\\\\[ \\t])+(?:\\/(?:[^\\/\\s\\\\]|\\\\[ \\t])+)*\\/?", - // Windows paths with drive letters (C:\path) with support for escaped spaces using forward slash - "[A-Za-z]:\\\\(?:(?:[^\\\\\\s/]+|\\/[ ])+(?:\\\\(?:[^\\\\\\s/]+|\\/[ ])+)*)?", - // Windows relative paths (folder\file or .\folder\file) with support for escaped spaces - "(?:\\.{0,2}|[^\\\\\\s/]+)\\\\(?:[^\\\\\\s/]+|\\\\[ \\t]|\\/[ ])+(?:\\\\(?:[^\\\\\\s/]+|\\\\[ \\t]|\\/[ ])+)*\\\\?", - // Windows network shares (\\server\share) with support for escaped spaces using forward slash - "\\\\\\\\[^\\\\\\s]+(?:\\\\(?:[^\\\\\\s/]+|\\/[ ])+)*(?:\\\\)?", - // URLs with protocols (http://, https://, etc.) - "\\w+:\/\/[^\\s]+", - // Git hashes (7-40 alphanumeric characters) - "[a-zA-Z0-9]{7,40}\\b", - // Special keywords - "problems\\b", - "git-changes\\b", - "terminal\\b", -] -// Build the full regex pattern by joining the patterns with OR operator -const mentionRegexPattern = `@(${mentionPatterns.join("|")})(?=[.,;:!?]?(?=[\\s\\r\\n]|$))` -export const mentionRegex = new RegExp(mentionRegexPattern) -export const mentionRegexGlobal = new RegExp(mentionRegexPattern, "g") +export const mentionRegex = + /@((?:\/|\w+:\/\/)[^\s]+?|[a-f0-9]{7,40}\b|problems\b|git-changes\b|terminal\b)(?=[.,;:!?]?(?=[\s\r\n]|$))/ +export const mentionRegexGlobal = new RegExp(mentionRegex.source, "g") export interface MentionSuggestion { type: "file" | "folder" | "git" | "problems" diff --git a/src/shared/globalFileNames.ts b/src/shared/globalFileNames.ts index 6088e95d999..f26174d224c 100644 --- a/src/shared/globalFileNames.ts +++ b/src/shared/globalFileNames.ts @@ -4,6 +4,7 @@ export const GlobalFileNames = { glamaModels: "glama_models.json", openRouterModels: "openrouter_models.json", requestyModels: "requesty_models.json", - mcpSettings: "cline_mcp_settings.json", + mcpSettings: "mcp_settings.json", unboundModels: "unbound_models.json", + customModes: "custom_modes.json", } diff --git a/src/shared/globalState.ts b/src/shared/globalState.ts index 5896bee9cd1..71d990906a5 100644 --- a/src/shared/globalState.ts +++ b/src/shared/globalState.ts @@ -49,7 +49,9 @@ export const GLOBAL_STATE_KEYS = [ "lastShownAnnouncementId", "customInstructions", "alwaysAllowReadOnly", + "alwaysAllowReadOnlyOutsideWorkspace", "alwaysAllowWrite", + "alwaysAllowWriteOutsideWorkspace", "alwaysAllowExecute", "alwaysAllowBrowser", "alwaysAllowMcp", @@ -68,6 +70,7 @@ export const GLOBAL_STATE_KEYS = [ "modelMaxThinkingTokens", "azureApiVersion", "openAiStreamingEnabled", + "openAiR1FormatEnabled", "openRouterModelId", "openRouterModelInfo", "openRouterBaseUrl", @@ -104,7 +107,6 @@ export const GLOBAL_STATE_KEYS = [ "enhancementApiConfigId", "experiments", // Map of experiment IDs to their enabled state. "autoApprovalEnabled", - "enableCustomModeCreation", // Enable the ability for Roo to create custom modes. "customModes", // Array of custom modes. "unboundModelId", "requestyModelId", diff --git a/src/shared/storagePathManager.ts b/src/shared/storagePathManager.ts new file mode 100644 index 00000000000..1dde82623a6 --- /dev/null +++ b/src/shared/storagePathManager.ts @@ -0,0 +1,149 @@ +import * as vscode from "vscode" +import * as path from "path" +import * as fs from "fs/promises" +import { t } from "../i18n" + +/** + * Gets the base storage path for conversations + * If a custom path is configured, uses that path + * Otherwise uses the default VSCode extension global storage path + */ +export async function getStorageBasePath(defaultPath: string): Promise { + // Get user-configured custom storage path + let customStoragePath = "" + + try { + // This is the line causing the error in tests + const config = vscode.workspace.getConfiguration("roo-cline") + customStoragePath = config.get("customStoragePath", "") + } catch (error) { + console.warn("Could not access VSCode configuration - using default path") + return defaultPath + } + + // If no custom path is set, use default path + if (!customStoragePath) { + return defaultPath + } + + try { + // Ensure custom path exists + await fs.mkdir(customStoragePath, { recursive: true }) + + // Test if path is writable + const testFile = path.join(customStoragePath, ".write_test") + await fs.writeFile(testFile, "test") + await fs.rm(testFile) + + return customStoragePath + } catch (error) { + // If path is unusable, report error and fall back to default path + console.error(`Custom storage path is unusable: ${error instanceof Error ? error.message : String(error)}`) + if (vscode.window) { + vscode.window.showErrorMessage(t("common:errors.custom_storage_path_unusable", { path: customStoragePath })) + } + return defaultPath + } +} + +/** + * Gets the storage directory path for a task + */ +export async function getTaskDirectoryPath(globalStoragePath: string, taskId: string): Promise { + const basePath = await getStorageBasePath(globalStoragePath) + const taskDir = path.join(basePath, "tasks", taskId) + await fs.mkdir(taskDir, { recursive: true }) + return taskDir +} + +/** + * Gets the settings directory path + */ +export async function getSettingsDirectoryPath(globalStoragePath: string): Promise { + const basePath = await getStorageBasePath(globalStoragePath) + const settingsDir = path.join(basePath, "settings") + await fs.mkdir(settingsDir, { recursive: true }) + return settingsDir +} + +/** + * Gets the cache directory path + */ +export async function getCacheDirectoryPath(globalStoragePath: string): Promise { + const basePath = await getStorageBasePath(globalStoragePath) + const cacheDir = path.join(basePath, "cache") + await fs.mkdir(cacheDir, { recursive: true }) + return cacheDir +} + +/** + * Prompts the user to set a custom storage path + * Displays an input box allowing the user to enter a custom path + */ +export async function promptForCustomStoragePath(): Promise { + if (!vscode.window || !vscode.workspace) { + console.error("VS Code API not available") + return + } + + let currentPath = "" + try { + const currentConfig = vscode.workspace.getConfiguration("roo-cline") + currentPath = currentConfig.get("customStoragePath", "") + } catch (error) { + console.error("Could not access configuration") + return + } + + const result = await vscode.window.showInputBox({ + value: currentPath, + placeHolder: t("common:storage.path_placeholder"), + prompt: t("common:storage.prompt_custom_path"), + validateInput: (input) => { + if (!input) { + return null // Allow empty value (use default path) + } + + try { + // Validate path format + path.parse(input) + + // Check if path is absolute + if (!path.isAbsolute(input)) { + return t("common:storage.enter_absolute_path") + } + + return null // Path format is valid + } catch (e) { + return t("common:storage.enter_valid_path") + } + }, + }) + + // If user canceled the operation, result will be undefined + if (result !== undefined) { + try { + const currentConfig = vscode.workspace.getConfiguration("roo-cline") + await currentConfig.update("customStoragePath", result, vscode.ConfigurationTarget.Global) + + if (result) { + try { + // Test if path is accessible + await fs.mkdir(result, { recursive: true }) + vscode.window.showInformationMessage(t("common:info.custom_storage_path_set", { path: result })) + } catch (error) { + vscode.window.showErrorMessage( + t("common:errors.cannot_access_path", { + path: result, + error: error instanceof Error ? error.message : String(error), + }), + ) + } + } else { + vscode.window.showInformationMessage(t("common:info.default_storage_path")) + } + } catch (error) { + console.error("Failed to update configuration", error) + } + } +} diff --git a/src/shared/support-prompt.ts b/src/shared/support-prompt.ts index ca22360632d..cc5e3e1d0df 100644 --- a/src/shared/support-prompt.ts +++ b/src/shared/support-prompt.ts @@ -25,24 +25,16 @@ export const createPrompt = (template: string, params: PromptParams): string => } interface SupportPromptConfig { - label: string - description: string template: string } const supportPromptConfigs: Record = { ENHANCE: { - label: "Enhance Prompt", - description: - "Use prompt enhancement to get tailored suggestions or improvements for your inputs. This ensures Roo understands your intent and provides the best possible responses. Available via the ✨ icon in chat.", template: `Generate an enhanced version of this prompt (reply with only the enhanced prompt - no conversation, explanations, lead-in, bullet points, placeholders, or surrounding quotes): \${userInput}`, }, EXPLAIN: { - label: "Explain Code", - description: - "Get detailed explanations of code snippets, functions, or entire files. Useful for understanding complex code or learning new patterns. Available in code actions (lightbulb icon in the editor) and the editor context menu (right-click on selected code).", template: `Explain the following code from file path @/\${filePath}: \${userInput} @@ -56,9 +48,6 @@ Please provide a clear and concise explanation of what this code does, including 3. Important patterns or techniques used`, }, FIX: { - label: "Fix Issues", - description: - "Get help identifying and resolving bugs, errors, or code quality issues. Provides step-by-step guidance for fixing problems. Available in code actions (lightbulb icon in the editor) and the editor context menu (right-click on selected code).", template: `Fix any issues in the following code from file path @/\${filePath} \${diagnosticText} \${userInput} @@ -74,9 +63,6 @@ Please: 4. Explain what was fixed and why`, }, IMPROVE: { - label: "Improve Code", - description: - "Receive suggestions for code optimization, better practices, and architectural improvements while maintaining functionality. Available in code actions (lightbulb icon in the editor) and the editor context menu (right-click on selected code).", template: `Improve the following code from file path @/\${filePath}: \${userInput} @@ -93,18 +79,12 @@ Please suggest improvements for: Provide the improved code along with explanations for each enhancement.`, }, ADD_TO_CONTEXT: { - label: "Add to Context", - description: - "Add context to your current task or conversation. Useful for providing additional information or clarifications. Available in code actions (lightbulb icon in the editor). and the editor context menu (right-click on selected code).", template: `\${filePath}: \`\`\` \${selectedText} \`\`\``, }, TERMINAL_ADD_TO_CONTEXT: { - label: "Add Terminal Content to Context", - description: - "Add terminal output to your current task or conversation. Useful for providing command outputs or logs. Available in the terminal context menu (right-click on selected terminal content).", template: `\${userInput} Terminal output: \`\`\` @@ -112,9 +92,6 @@ Terminal output: \`\`\``, }, TERMINAL_FIX: { - label: "Fix Terminal Command", - description: - "Get help fixing terminal commands that failed or need improvement. Available in the terminal context menu (right-click on selected terminal content).", template: `\${userInput} Fix this terminal command: \`\`\` @@ -127,9 +104,6 @@ Please: 3. Explain what was fixed and why`, }, TERMINAL_EXPLAIN: { - label: "Explain Terminal Command", - description: - "Get detailed explanations of terminal commands and their outputs. Available in the terminal context menu (right-click on selected terminal content).", template: `\${userInput} Explain this terminal command: \`\`\` @@ -141,6 +115,9 @@ Please provide: 2. Explanation of each part/flag 3. Expected output and behavior`, }, + NEW_TASK: { + template: `\${userInput}`, + }, } as const type SupportPromptType = keyof typeof supportPromptConfigs @@ -158,15 +135,6 @@ export const supportPrompt = { export type { SupportPromptType } -// Expose labels and descriptions for UI -export const supportPromptLabels = Object.fromEntries( - Object.entries(supportPromptConfigs).map(([key, config]) => [key, config.label]), -) as Record - -export const supportPromptDescriptions = Object.fromEntries( - Object.entries(supportPromptConfigs).map(([key, config]) => [key, config.description]), -) as Record - export type CustomSupportPrompts = { [key: string]: string | undefined } diff --git a/src/shared/tool-groups.ts b/src/shared/tool-groups.ts index 11d0513e47e..3cc4338394f 100644 --- a/src/shared/tool-groups.ts +++ b/src/shared/tool-groups.ts @@ -8,6 +8,7 @@ export type ToolGroupConfig = { export const TOOL_DISPLAY_NAMES = { execute_command: "run commands", read_file: "read files", + fetch_instructions: "fetch instructions", write_to_file: "write files", apply_diff: "apply changes", search_files: "search files", @@ -25,7 +26,7 @@ export const TOOL_DISPLAY_NAMES = { // Define available tool groups export const TOOL_GROUPS: Record = { read: { - tools: ["read_file", "search_files", "list_files", "list_code_definition_names"], + tools: ["read_file", "fetch_instructions", "search_files", "list_files", "list_code_definition_names"], }, edit: { tools: ["apply_diff", "write_to_file", "insert_content", "search_and_replace"], diff --git a/src/utils/migrateSettings.ts b/src/utils/migrateSettings.ts new file mode 100644 index 00000000000..a4d414b52ff --- /dev/null +++ b/src/utils/migrateSettings.ts @@ -0,0 +1,53 @@ +import * as vscode from "vscode" +import * as path from "path" +import * as fs from "fs/promises" +import { fileExistsAtPath } from "./fs" +import { GlobalFileNames } from "../shared/globalFileNames" + +/** + * Migrates old settings files to new file names + * + * TODO: Remove this migration code in September 2025 (6 months after implementation) + */ +export async function migrateSettings( + context: vscode.ExtensionContext, + outputChannel: vscode.OutputChannel, +): Promise { + // Legacy file names that need to be migrated to the new names in GlobalFileNames + const fileMigrations = [ + { oldName: "cline_custom_modes.json", newName: GlobalFileNames.customModes }, + { oldName: "cline_mcp_settings.json", newName: GlobalFileNames.mcpSettings }, + ] + + try { + const settingsDir = path.join(context.globalStorageUri.fsPath, "settings") + + // Check if settings directory exists first + if (!(await fileExistsAtPath(settingsDir))) { + outputChannel.appendLine("No settings directory found, no migrations necessary") + return + } + + // Process each file migration + for (const migration of fileMigrations) { + const oldPath = path.join(settingsDir, migration.oldName) + const newPath = path.join(settingsDir, migration.newName) + + // Only migrate if old file exists and new file doesn't exist yet + // This ensures we don't overwrite any existing new files + const oldFileExists = await fileExistsAtPath(oldPath) + const newFileExists = await fileExistsAtPath(newPath) + + if (oldFileExists && !newFileExists) { + await fs.rename(oldPath, newPath) + outputChannel.appendLine(`Renamed ${migration.oldName} to ${migration.newName}`) + } else { + outputChannel.appendLine( + `Skipping migration of ${migration.oldName} to ${migration.newName}: ${oldFileExists ? "new file already exists" : "old file not found"}`, + ) + } + } + } catch (error) { + outputChannel.appendLine(`Error migrating settings files: ${error}`) + } +} diff --git a/src/utils/pathUtils.ts b/src/utils/pathUtils.ts new file mode 100644 index 00000000000..dae300f8f38 --- /dev/null +++ b/src/utils/pathUtils.ts @@ -0,0 +1,24 @@ +import * as vscode from "vscode" +import * as path from "path" + +/** + * Checks if a file path is outside all workspace folders + * @param filePath The file path to check + * @returns true if the path is outside all workspace folders, false otherwise + */ +export function isPathOutsideWorkspace(filePath: string): boolean { + // If there are no workspace folders, consider everything outside workspace for safety + if (!vscode.workspace.workspaceFolders || vscode.workspace.workspaceFolders.length === 0) { + return true + } + + // Normalize and resolve the path to handle .. and . components correctly + const absolutePath = path.resolve(filePath) + + // Check if the path is within any workspace folder + return !vscode.workspace.workspaceFolders.some((folder) => { + const folderPath = folder.uri.fsPath + // Path is inside a workspace if it equals the workspace path or is a subfolder + return absolutePath === folderPath || absolutePath.startsWith(folderPath + path.sep) + }) +} diff --git a/webview-ui/package-lock.json b/webview-ui/package-lock.json index d6da7da4bf4..c9c933e5cd5 100644 --- a/webview-ui/package-lock.json +++ b/webview-ui/package-lock.json @@ -31,6 +31,7 @@ "fzf": "^0.5.2", "i18next": "^24.2.2", "i18next-http-backend": "^3.0.2", + "knuth-shuffle-seeded": "^1.0.6", "lucide-react": "^0.475.0", "mermaid": "^11.4.1", "posthog-js": "^1.227.2", @@ -483,27 +484,27 @@ } }, "node_modules/@babel/helpers": { - "version": "7.26.7", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.7.tgz", - "integrity": "sha512-8NHiL98vsi0mbPQmYAGWwfcFaOy4j2HY49fXJCfuDcdE7fMIsH9a7GdaeXpIBsbT7307WU8KCMp5pUVDNL4f9A==", + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.10.tgz", + "integrity": "sha512-UPYc3SauzZ3JGgj87GgZ89JVdC5dj0AoetR5Bw6wj4niittNyFh6+eOGonYvJ1ao6B8lEa3Q3klS7ADZ53bc5g==", "dev": true, "license": "MIT", "dependencies": { - "@babel/template": "^7.25.9", - "@babel/types": "^7.26.7" + "@babel/template": "^7.26.9", + "@babel/types": "^7.26.10" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.26.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.7.tgz", - "integrity": "sha512-kEvgGGgEjRUutvdVvZhbn/BxVt+5VSpwXz1j3WYXQbXDo8KzFOPNG2GQbdAiNq8g6wn1yKk7C/qrke03a84V+w==", + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.10.tgz", + "integrity": "sha512-6aQR2zGE/QFi8JpDLjUZEPYOs7+mhKXm86VaKFiLP35JQwQb6bwUE+XbvkH0EptsYhbNBSUGaUBLKqxH1xSgsA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.26.7" + "@babel/types": "^7.26.10" }, "bin": { "parser": "bin/babel-parser.js" @@ -2159,9 +2160,9 @@ } }, "node_modules/@babel/runtime": { - "version": "7.26.7", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.7.tgz", - "integrity": "sha512-AOPI3D+a8dXnja+iwsUqGRjr1BbZIe771sXdapOtYI531gSqpi92vXivKcq2asu/DFpdl1ceFAKZyRzK2PCVcQ==", + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.10.tgz", + "integrity": "sha512-2WJMeRQPHKSPemqk/awGrAiuFfzBmOIPXKizAsVhWH9YJqLZ0H+HS4c8loHGgW6utJ3E/ejXQUsiGaQy2NZ9Fw==", "license": "MIT", "dependencies": { "regenerator-runtime": "^0.14.0" @@ -2171,15 +2172,15 @@ } }, "node_modules/@babel/template": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.9.tgz", - "integrity": "sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg==", + "version": "7.26.9", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.26.9.tgz", + "integrity": "sha512-qyRplbeIpNZhmzOysF/wFMuP9sctmh2cFzRAZOn1YapxBsE1i9bJIY586R/WBLfLcmcBlM8ROBiQURnnNy+zfA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.25.9", - "@babel/parser": "^7.25.9", - "@babel/types": "^7.25.9" + "@babel/code-frame": "^7.26.2", + "@babel/parser": "^7.26.9", + "@babel/types": "^7.26.9" }, "engines": { "node": ">=6.9.0" @@ -2205,9 +2206,9 @@ } }, "node_modules/@babel/types": { - "version": "7.26.7", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.7.tgz", - "integrity": "sha512-t8kDRGrKXyp6+tjUh7hw2RLyclsW4TRoRvRHtSyAX9Bb5ldlFh+90YAYY6awRXrlB4G5G2izNeGySpATlFzmOg==", + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.10.tgz", + "integrity": "sha512-emqcG3vHrpxUKTrxcblR36dcrcoRDvKmnL/dCL6ZsHaShW80qxCAcNhzQZrpeM765VzEos+xOi4s+r4IXzTwdQ==", "dev": true, "license": "MIT", "dependencies": { @@ -6052,16 +6053,16 @@ } }, "node_modules/@storybook/core": { - "version": "8.5.6", - "resolved": "https://registry.npmjs.org/@storybook/core/-/core-8.5.6.tgz", - "integrity": "sha512-ibgTGI3mcSsADABIQuhHWL8rxqF6CvooKIWpkZsB9kwNActS3OJzfCSAZDcgtvRkwaarPVjYX/sAOBzjqQNkXg==", + "version": "8.6.7", + "resolved": "https://registry.npmjs.org/@storybook/core/-/core-8.6.7.tgz", + "integrity": "sha512-FcvLFA+Qn3+D6LgQkk0MOXA5FBz8DGc0UZmZuVbIwIUV4MV4ywCMwtKdG0cyhtzQg0YNyfiIYWJr7lZ4jLLhYg==", "dev": true, "license": "MIT", "dependencies": { - "@storybook/csf": "0.1.12", + "@storybook/theming": "8.6.7", "better-opn": "^3.0.2", "browser-assert": "^1.2.1", - "esbuild": "^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || ^0.24.0", + "esbuild": "^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || ^0.24.0 || ^0.25.0", "esbuild-register": "^3.5.0", "jsdoc-type-pratt-parser": "^4.0.0", "process": "^0.11.10", @@ -6097,6 +6098,20 @@ "storybook": "^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0" } }, + "node_modules/@storybook/core/node_modules/@storybook/theming": { + "version": "8.6.7", + "resolved": "https://registry.npmjs.org/@storybook/theming/-/theming-8.6.7.tgz", + "integrity": "sha512-F/i4XS5bew9dvtNiHvDJF0mko1IUbPM9PUjTYPaw6cK8ytS0kdec703MsJ/GUA7seeEWBeGdZjV3ua0pys650A==", + "dev": true, + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "peerDependencies": { + "storybook": "^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0" + } + }, "node_modules/@storybook/core/node_modules/semver": { "version": "7.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", @@ -15017,6 +15032,14 @@ "node": ">=6" } }, + "node_modules/knuth-shuffle-seeded": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/knuth-shuffle-seeded/-/knuth-shuffle-seeded-1.0.6.tgz", + "integrity": "sha512-9pFH0SplrfyKyojCLxZfMcvkhf5hH0d+UwR9nTVJ/DDQJGuzcXjTwB7TP7sDfehSudlGGaOLblmEWqv04ERVWg==", + "dependencies": { + "seed-random": "~2.2.0" + } + }, "node_modules/kolorist": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/kolorist/-/kolorist-1.8.0.tgz", @@ -18980,9 +19003,9 @@ } }, "node_modules/recast": { - "version": "0.23.9", - "resolved": "https://registry.npmjs.org/recast/-/recast-0.23.9.tgz", - "integrity": "sha512-Hx/BGIbwj+Des3+xy5uAtAbdCyqK9y9wbBcDFDYanLS9JnMqf7OeF87HQwUimE87OEc72mr6tkKUKMBBL+hF9Q==", + "version": "0.23.11", + "resolved": "https://registry.npmjs.org/recast/-/recast-0.23.11.tgz", + "integrity": "sha512-YTUo+Flmw4ZXiWfQKGcwwc11KnoRAYgzAE2E7mXKCjSviTKShtxBsN6YUUBB2gtaBzKzeKunxhUwNHQuRryhWA==", "dev": true, "license": "MIT", "dependencies": { @@ -19786,6 +19809,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/seed-random": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/seed-random/-/seed-random-2.2.0.tgz", + "integrity": "sha512-34EQV6AAHQGhoc0tn/96a9Fsi6v2xdqe/dMUwljGRaFOzR3EgRmECvD0O8vi8X+/uQ50LGHfkNu/Eue5TPKZkQ==" + }, "node_modules/semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", @@ -20127,13 +20155,13 @@ } }, "node_modules/storybook": { - "version": "8.5.6", - "resolved": "https://registry.npmjs.org/storybook/-/storybook-8.5.6.tgz", - "integrity": "sha512-mrcYAA5CP6QBrq5O9grz2eqBoEfJNsK3b+Iz+PdGYqpr04oMC7rg1h80murV2pRwsbHxIWBFpLpXAVX8tMK01w==", + "version": "8.6.7", + "resolved": "https://registry.npmjs.org/storybook/-/storybook-8.6.7.tgz", + "integrity": "sha512-9gktoFMQDSCINNGQH869d/sar9rVtAhr0HchcvDA6bssAqgQJvTphY4qC9lH54SxfTJm/7Sy+BKEngMK+dziJg==", "dev": true, "license": "MIT", "dependencies": { - "@storybook/core": "8.5.6" + "@storybook/core": "8.6.7" }, "bin": { "getstorybook": "bin/index.cjs", diff --git a/webview-ui/package.json b/webview-ui/package.json index a8d143b7d74..6c4c157176a 100644 --- a/webview-ui/package.json +++ b/webview-ui/package.json @@ -41,6 +41,7 @@ "fzf": "^0.5.2", "i18next": "^24.2.2", "i18next-http-backend": "^3.0.2", + "knuth-shuffle-seeded": "^1.0.6", "lucide-react": "^0.475.0", "mermaid": "^11.4.1", "posthog-js": "^1.227.2", diff --git a/webview-ui/src/components/chat/ChatRow.tsx b/webview-ui/src/components/chat/ChatRow.tsx index 3f7d174b494..f1a7ed994b9 100644 --- a/webview-ui/src/components/chat/ChatRow.tsx +++ b/webview-ui/src/components/chat/ChatRow.tsx @@ -252,7 +252,7 @@ export const ChatRowContent = ({ }, [message.ask, message.say, message.text]) const followUpData = useMemo(() => { - if (message.type === "ask" && message.ask === "followup" && message.partial === false) { + if (message.type === "ask" && message.ask === "followup" && !message.partial) { return JSON.parse(message.text || "{}") } return null @@ -272,7 +272,11 @@ export const ChatRowContent = ({ <>
{toolIcon(tool.tool === "appliedDiff" ? "diff" : "edit")} - {t("chat:fileOperations.wantsToEdit")} + + {tool.isOutsideWorkspace + ? t("chat:fileOperations.wantsToEditOutsideWorkspace") + : t("chat:fileOperations.wantsToEdit")} +
{message.type === "ask" - ? t("chat:fileOperations.wantsToRead") + ? tool.isOutsideWorkspace + ? t("chat:fileOperations.wantsToReadOutsideWorkspace") + : t("chat:fileOperations.wantsToRead") : t("chat:fileOperations.didRead")} @@ -359,6 +365,21 @@ export const ChatRowContent = ({ ) + case "fetchInstructions": + return ( + <> +
+ {toolIcon("file-code")} + {t("chat:instructions.wantsToFetch")} +
+ + + ) case "listFilesTopLevel": return ( <> diff --git a/webview-ui/src/components/chat/ChatTextArea.tsx b/webview-ui/src/components/chat/ChatTextArea.tsx index b0b6362fcee..a6cacfe7cdc 100644 --- a/webview-ui/src/components/chat/ChatTextArea.tsx +++ b/webview-ui/src/components/chat/ChatTextArea.tsx @@ -25,6 +25,8 @@ import Thumbnails from "../common/Thumbnails" import { MAX_IMAGES_PER_MESSAGE } from "./ChatView" import ContextMenu from "./ContextMenu" import { VolumeX } from "lucide-react" +import { IconButton } from "./IconButton" +import { cn } from "@/lib/utils" interface ChatTextAreaProps { inputValue: string @@ -113,7 +115,7 @@ const ChatTextArea = forwardRef( return () => window.removeEventListener("message", messageHandler) }, [setInputValue, searchRequestId]) - const [thumbnailsHeight, setThumbnailsHeight] = useState(0) + const [isDraggingOver, setIsDraggingOver] = useState(false) const [textAreaBaseHeight, setTextAreaBaseHeight] = useState(undefined) const [showContextMenu, setShowContextMenu] = useState(false) const [cursorPosition, setCursorPosition] = useState(0) @@ -547,14 +549,6 @@ const ChatTextArea = forwardRef( [shouldDisableImages, setSelectedImages, cursorPosition, setInputValue, inputValue, t], ) - const handleThumbnailsHeightChange = useCallback((height: number) => setThumbnailsHeight(height), []) - - useEffect(() => { - if (selectedImages.length === 0) { - setThumbnailsHeight(0) - } - }, [selectedImages]) - const handleMenuMouseDown = useCallback(() => { setIsMouseDownOnMenu(true) }, []) @@ -592,75 +586,51 @@ const ChatTextArea = forwardRef( [updateCursorPosition], ) - const [isTtsPlaying, setIsTtsPlaying] = useState(false) - - useEvent("message", (event: MessageEvent) => { - const message: ExtensionMessage = event.data - - if (message.type === "ttsStart") { - setIsTtsPlaying(true) - } else if (message.type === "ttsStop") { - setIsTtsPlaying(false) - } - }) - - return ( -
{ - e.preventDefault() - const files = Array.from(e.dataTransfer.files) - const text = e.dataTransfer.getData("text") - - if (text) { - // Split text on newlines to handle multiple files - const lines = text.split(/\r?\n/).filter((line) => line.trim() !== "") - - if (lines.length > 0) { - // Process each line as a separate file path - let newValue = inputValue.slice(0, cursorPosition) - let totalLength = 0 - - lines.forEach((line, index) => { - // Convert each path to a mention-friendly format - const mentionText = convertToMentionPath(line, cwd) - newValue += mentionText - totalLength += mentionText.length - - // Add space after each mention except the last one - if (index < lines.length - 1) { - newValue += " " - totalLength += 1 - } - }) - - // Add space after the last mention and append the rest of the input - newValue += " " + inputValue.slice(cursorPosition) - totalLength += 1 - - setInputValue(newValue) - const newCursorPosition = cursorPosition + totalLength - setCursorPosition(newCursorPosition) - setIntendedCursorPosition(newCursorPosition) + const handleDrop = useCallback( + async (e: React.DragEvent) => { + e.preventDefault() + setIsDraggingOver(false) + + const text = e.dataTransfer.getData("text") + if (text) { + // Split text on newlines to handle multiple files + const lines = text.split(/\r?\n/).filter((line) => line.trim() !== "") + + if (lines.length > 0) { + // Process each line as a separate file path + let newValue = inputValue.slice(0, cursorPosition) + let totalLength = 0 + + // Using a standard for loop instead of forEach for potential performance gains. + for (let i = 0; i < lines.length; i++) { + const line = lines[i] + // Convert each path to a mention-friendly format + const mentionText = convertToMentionPath(line, cwd) + newValue += mentionText + totalLength += mentionText.length + + // Add space after each mention except the last one + if (i < lines.length - 1) { + newValue += " " + totalLength += 1 + } } - return + // Add space after the last mention and append the rest of the input + newValue += " " + inputValue.slice(cursorPosition) + totalLength += 1 + + setInputValue(newValue) + const newCursorPosition = cursorPosition + totalLength + setCursorPosition(newCursorPosition) + setIntendedCursorPosition(newCursorPosition) } + return + } + + const files = Array.from(e.dataTransfer.files) + if (!textAreaDisabled && files.length > 0) { const acceptedTypes = ["png", "jpeg", "webp"] const imageFiles = files.filter((file) => { const [type, subtype] = file.type.split("/") @@ -699,159 +669,256 @@ const ChatTextArea = forwardRef( console.warn(t("chat:noValidImages")) } } - }} - onDragOver={(e) => { - e.preventDefault() - }}> - {showContextMenu && ( -
- -
- )} + } + }, + [ + cursorPosition, + cwd, + inputValue, + setInputValue, + setCursorPosition, + setIntendedCursorPosition, + textAreaDisabled, + shouldDisableImages, + setSelectedImages, + t, + ], + ) -
+ const [isTtsPlaying, setIsTtsPlaying] = useState(false) + + useEvent("message", (event: MessageEvent) => { + const message: ExtensionMessage = event.data + + if (message.type === "ttsStart") { + setIsTtsPlaying(true) + } else if (message.type === "ttsStop") { + setIsTtsPlaying(false) + } + }) + + const placeholderBottomText = `\n(${t("chat:addContext")}${shouldDisableImages ? `, ${t("chat:dragFiles")}` : `, ${t("chat:dragFilesImages")}`})` + + return ( +
+
0 ? `${thumbnailsHeight + 16}px` : 0, - zIndex: 1, - }} - /> - { - if (typeof ref === "function") { - ref(el) - } else if (ref) { - ref.current = el + className={cn("chat-text-area", "relative", "flex", "flex-col", "outline-none")} + onDrop={handleDrop} + onDragOver={(e) => { + //Only allowed to drop images/files on shift key pressed + if (!e.shiftKey) { + setIsDraggingOver(false) + return } - textAreaRef.current = el - }} - value={inputValue} - disabled={textAreaDisabled} - onChange={(e) => { - handleInputChange(e) - updateHighlights() + e.preventDefault() + setIsDraggingOver(true) + e.dataTransfer.dropEffect = "copy" }} - onFocus={() => setIsFocused(true)} - onKeyDown={handleKeyDown} - onKeyUp={handleKeyUp} - onBlur={handleBlur} - onPaste={handlePaste} - onSelect={updateCursorPosition} - onMouseUp={updateCursorPosition} - onHeightChange={(height) => { - if (textAreaBaseHeight === undefined || height < textAreaBaseHeight) { - setTextAreaBaseHeight(height) + onDragLeave={(e) => { + e.preventDefault() + const rect = e.currentTarget.getBoundingClientRect() + if ( + e.clientX <= rect.left || + e.clientX >= rect.right || + e.clientY <= rect.top || + e.clientY >= rect.bottom + ) { + setIsDraggingOver(false) } - onHeightChange?.(height) - }} - placeholder={placeholderText} - minRows={3} - maxRows={15} - autoFocus={true} - style={{ - width: "100%", - outline: "none", - boxSizing: "border-box", - backgroundColor: "transparent", - color: "var(--vscode-input-foreground)", - borderRadius: 2, - fontFamily: "var(--vscode-font-family)", - fontSize: "var(--vscode-editor-font-size)", - lineHeight: "var(--vscode-editor-line-height)", - resize: "none", - overflowX: "hidden", - overflowY: "auto", - border: "none", - padding: "2px", - paddingRight: "8px", - marginBottom: thumbnailsHeight > 0 ? `${thumbnailsHeight + 16}px` : 0, - cursor: textAreaDisabled ? "not-allowed" : undefined, - flex: "0 1 auto", - zIndex: 2, - scrollbarWidth: "none", - }} - onScroll={() => updateHighlights()} - /> - {isTtsPlaying && ( - - )} + }}> + {showContextMenu && ( +
+ +
+ )} +
+
+ { + if (typeof ref === "function") { + ref(el) + } else if (ref) { + ref.current = el + } + textAreaRef.current = el + }} + value={inputValue} + disabled={textAreaDisabled} + onChange={(e) => { + handleInputChange(e) + updateHighlights() + }} + onFocus={() => setIsFocused(true)} + onKeyDown={handleKeyDown} + onKeyUp={handleKeyUp} + onBlur={handleBlur} + onPaste={handlePaste} + onSelect={updateCursorPosition} + onMouseUp={updateCursorPosition} + onHeightChange={(height) => { + if (textAreaBaseHeight === undefined || height < textAreaBaseHeight) { + setTextAreaBaseHeight(height) + } + onHeightChange?.(height) + }} + placeholder={placeholderText} + minRows={3} + maxRows={15} + autoFocus={true} + className={cn( + "w-full", + "text-vscode-input-foreground", + "font-vscode-font-family", + "text-vscode-editor-font-size", + "leading-vscode-editor-line-height", + textAreaDisabled ? "cursor-not-allowed" : "cursor-text", + "py-1.5 px-2", + isFocused + ? "border border-vscode-focusBorder outline outline-vscode-focusBorder" + : isDraggingOver + ? "border-2 border-dashed border-vscode-focusBorder" + : "border border-transparent", + textAreaDisabled ? "opacity-50" : "opacity-100", + isDraggingOver + ? "bg-[color-mix(in_srgb,var(--vscode-input-background)_95%,var(--vscode-focusBorder))]" + : "bg-vscode-input-background", + "transition-background-color duration-150 ease-in-out", + "will-change-background-color", + "h-[100px]", + "[@media(min-width:150px)]:min-h-[80px]", + "[@media(min-width:425px)]:min-h-[60px]", + "box-border", + "rounded", + "resize-none", + "overflow-x-hidden", + "overflow-y-auto", + "pr-2", + "flex-none flex-grow", + "z-[2]", + "scrollbar-none", + )} + onScroll={() => updateHighlights()} + /> + {isTtsPlaying && ( + + )} + {!inputValue && ( +
+ {placeholderBottomText} +
+ )} +
+
{selectedImages.length > 0 && ( )} -
- {/* Left side - dropdowns container */} -
+
+
{/* Mode selector - fixed width */} -
+
(
{/* API configuration selector - flexible width */} -
+
(
{/* Right side - action buttons */} -
-
- {isEnhancingPrompt ? ( - - ) : ( - !textAreaDisabled && handleEnhancePrompt()} - style={{ fontSize: 16.5 }} - /> - )} -
- + + !shouldDisableImages && onSelectImages()} - style={{ fontSize: 16.5 }} + disabled={shouldDisableImages} + onClick={onSelectImages} /> - !textAreaDisabled && onSend()} - style={{ fontSize: 15 }} + disabled={textAreaDisabled} + onClick={onSend} />
diff --git a/webview-ui/src/components/chat/ChatView.tsx b/webview-ui/src/components/chat/ChatView.tsx index 554e8ac0e3a..40754857321 100644 --- a/webview-ui/src/components/chat/ChatView.tsx +++ b/webview-ui/src/components/chat/ChatView.tsx @@ -55,7 +55,9 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie mcpServers, alwaysAllowBrowser, alwaysAllowReadOnly, + alwaysAllowReadOnlyOutsideWorkspace, alwaysAllowWrite, + alwaysAllowWriteOutsideWorkspace, alwaysAllowExecute, alwaysAllowMcp, allowedCommands, @@ -649,26 +651,69 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie (message: ClineMessage | undefined) => { if (!autoApprovalEnabled || !message || message.type !== "ask") return false - return ( - (alwaysAllowBrowser && message.ask === "browser_action_launch") || - (alwaysAllowReadOnly && message.ask === "tool" && isReadOnlyToolAction(message)) || - (alwaysAllowWrite && message.ask === "tool" && isWriteToolAction(message)) || - (alwaysAllowExecute && message.ask === "command" && isAllowedCommand(message)) || - (alwaysAllowMcp && message.ask === "use_mcp_server" && isMcpToolAlwaysAllowed(message)) || - (alwaysAllowModeSwitch && - message.ask === "tool" && - JSON.parse(message.text || "{}")?.tool === "switchMode") || - (alwaysAllowSubtasks && - message.ask === "tool" && - ["newTask", "finishTask"].includes(JSON.parse(message.text || "{}")?.tool)) - ) + if (message.ask === "browser_action_launch") { + return alwaysAllowBrowser + } + + if (message.ask === "use_mcp_server") { + return alwaysAllowMcp && isMcpToolAlwaysAllowed(message) + } + + if (message.ask === "command") { + return alwaysAllowExecute && isAllowedCommand(message) + } + + // For read/write operations, check if it's outside workspace and if we have permission for that + if (message.ask === "tool") { + let tool: any = {} + try { + tool = JSON.parse(message.text || "{}") + } catch (error) { + console.error("Failed to parse tool:", error) + } + + if (!tool) { + return false + } + + if (tool?.tool === "fetchInstructions") { + if (tool.content === "create_mode") { + return alwaysAllowModeSwitch + } + if (tool.content === "create_mcp_server") { + return alwaysAllowMcp + } + } + + if (tool?.tool === "switchMode") { + return alwaysAllowModeSwitch + } + + if (["newTask", "finishTask"].includes(tool?.tool)) { + return alwaysAllowSubtasks + } + + const isOutsideWorkspace = !!tool.isOutsideWorkspace + + if (isReadOnlyToolAction(message)) { + return alwaysAllowReadOnly && (!isOutsideWorkspace || alwaysAllowReadOnlyOutsideWorkspace) + } + + if (isWriteToolAction(message)) { + return alwaysAllowWrite && (!isOutsideWorkspace || alwaysAllowWriteOutsideWorkspace) + } + } + + return false }, [ autoApprovalEnabled, alwaysAllowBrowser, alwaysAllowReadOnly, + alwaysAllowReadOnlyOutsideWorkspace, isReadOnlyToolAction, alwaysAllowWrite, + alwaysAllowWriteOutsideWorkspace, isWriteToolAction, alwaysAllowExecute, isAllowedCommand, @@ -974,10 +1019,7 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie [], ) - const baseText = task ? t("chat:typeMessage") : t("chat:typeTask") - const placeholderText = - baseText + - `\n(${t("chat:addContext")}${shouldDisableImages ? `, ${t("chat:dragFiles")}` : `, ${t("chat:dragFilesImages")}`})` + const placeholderText = task ? t("chat:typeMessage") : t("chat:typeTask") const itemContent = useCallback( (index: number, messageOrGroup: ClineMessage | ClineMessage[]) => { @@ -1050,7 +1092,9 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie handlePrimaryButtonClick, alwaysAllowBrowser, alwaysAllowReadOnly, + alwaysAllowReadOnlyOutsideWorkspace, alwaysAllowWrite, + alwaysAllowWriteOutsideWorkspace, alwaysAllowExecute, alwaysAllowMcp, messages, diff --git a/webview-ui/src/components/chat/FollowUpSuggest.tsx b/webview-ui/src/components/chat/FollowUpSuggest.tsx index 76aa32c7fb3..24dc42ca7de 100644 --- a/webview-ui/src/components/chat/FollowUpSuggest.tsx +++ b/webview-ui/src/components/chat/FollowUpSuggest.tsx @@ -28,7 +28,7 @@ const FollowUpSuggest = ({ suggestions = [], onSuggestionClick, ts = 1 }: Follow {suggestions.map((suggestion) => (
+ ) +} diff --git a/webview-ui/src/components/chat/__tests__/ChatTextArea.test.tsx b/webview-ui/src/components/chat/__tests__/ChatTextArea.test.tsx index e7abb1f65e9..9baf2a7c3c2 100644 --- a/webview-ui/src/components/chat/__tests__/ChatTextArea.test.tsx +++ b/webview-ui/src/components/chat/__tests__/ChatTextArea.test.tsx @@ -31,6 +31,16 @@ const mockConvertToMentionPath = pathMentions.convertToMentionPath as jest.Mock // Mock ExtensionStateContext jest.mock("../../../context/ExtensionStateContext") +// Custom query function to get the enhance prompt button +const getEnhancePromptButton = () => { + return screen.getByRole("button", { + name: (_, element) => { + // Find the button with the sparkle icon + return element.querySelector(".codicon-sparkle") !== null + }, + }) +} + describe("ChatTextArea", () => { const defaultProps = { inputValue: "", @@ -66,10 +76,9 @@ describe("ChatTextArea", () => { filePaths: [], openedTabs: [], }) - render() - const enhanceButton = screen.getByRole("button", { name: /enhance prompt/i }) - expect(enhanceButton).toHaveClass("disabled") + const enhanceButton = getEnhancePromptButton() + expect(enhanceButton).toHaveClass("cursor-not-allowed") }) }) @@ -88,7 +97,7 @@ describe("ChatTextArea", () => { render() - const enhanceButton = screen.getByRole("button", { name: /enhance prompt/i }) + const enhanceButton = getEnhancePromptButton() fireEvent.click(enhanceButton) expect(mockPostMessage).toHaveBeenCalledWith({ @@ -108,7 +117,7 @@ describe("ChatTextArea", () => { render() - const enhanceButton = screen.getByRole("button", { name: /enhance prompt/i }) + const enhanceButton = getEnhancePromptButton() fireEvent.click(enhanceButton) expect(mockPostMessage).not.toHaveBeenCalled() @@ -125,7 +134,7 @@ describe("ChatTextArea", () => { render() - const enhanceButton = screen.getByRole("button", { name: /enhance prompt/i }) + const enhanceButton = getEnhancePromptButton() fireEvent.click(enhanceButton) const loadingSpinner = screen.getByText("", { selector: ".codicon-loading" }) @@ -150,7 +159,7 @@ describe("ChatTextArea", () => { rerender() // Verify the enhance button appears after apiConfiguration changes - expect(screen.getByRole("button", { name: /enhance prompt/i })).toBeInTheDocument() + expect(getEnhancePromptButton()).toBeInTheDocument() }) }) diff --git a/webview-ui/src/components/chat/__tests__/ChatView.auto-approve.test.tsx b/webview-ui/src/components/chat/__tests__/ChatView.auto-approve.test.tsx index f16e045383a..d188ddb8cfd 100644 --- a/webview-ui/src/components/chat/__tests__/ChatView.auto-approve.test.tsx +++ b/webview-ui/src/components/chat/__tests__/ChatView.auto-approve.test.tsx @@ -146,6 +146,156 @@ describe("ChatView - Auto Approval Tests", () => { }) }) + it("auto-approves outside workspace read operations when enabled", async () => { + render( + + {}} + showHistoryView={() => {}} + /> + , + ) + + // First hydrate state with initial task + mockPostMessage({ + alwaysAllowReadOnly: true, + alwaysAllowReadOnlyOutsideWorkspace: true, + autoApprovalEnabled: true, + clineMessages: [ + { + type: "say", + say: "task", + ts: Date.now() - 2000, + text: "Initial task", + }, + ], + }) + + // Then send the read tool ask message with an absolute path (outside workspace) + mockPostMessage({ + alwaysAllowReadOnly: true, + alwaysAllowReadOnlyOutsideWorkspace: true, + autoApprovalEnabled: true, + clineMessages: [ + { + type: "say", + say: "task", + ts: Date.now() - 2000, + text: "Initial task", + }, + { + type: "ask", + ask: "tool", + ts: Date.now(), + text: JSON.stringify({ + tool: "readFile", + path: "/absolute/path/test.txt", + // Use an absolute path that's clearly outside workspace + }), + partial: false, + }, + ], + }) + + // Also mock the filePaths for workspace detection + mockPostMessage({ + alwaysAllowReadOnly: true, + alwaysAllowReadOnlyOutsideWorkspace: true, + autoApprovalEnabled: true, + filePaths: ["/workspace/root", "/another/workspace"], + clineMessages: [ + { + type: "say", + say: "task", + ts: Date.now() - 2000, + text: "Initial task", + }, + { + type: "ask", + ask: "tool", + ts: Date.now(), + text: JSON.stringify({ + tool: "readFile", + path: "/absolute/path/test.txt", + }), + partial: false, + }, + ], + }) + + // Wait for the auto-approval message + await waitFor(() => { + expect(vscode.postMessage).toHaveBeenCalledWith({ + type: "askResponse", + askResponse: "yesButtonClicked", + }) + }) + }) + + it("does not auto-approve outside workspace read operations without permission", async () => { + render( + + {}} + showHistoryView={() => {}} + /> + , + ) + + // First hydrate state with initial task + mockPostMessage({ + alwaysAllowReadOnly: true, + alwaysAllowReadOnlyOutsideWorkspace: false, // No permission for outside workspace + autoApprovalEnabled: true, + filePaths: ["/workspace/root", "/another/workspace"], // Same workspace paths as before + clineMessages: [ + { + type: "say", + say: "task", + ts: Date.now() - 2000, + text: "Initial task", + }, + ], + }) + + // Then send the read tool ask message with an absolute path (outside workspace) + mockPostMessage({ + alwaysAllowReadOnly: true, + alwaysAllowReadOnlyOutsideWorkspace: false, + autoApprovalEnabled: true, + clineMessages: [ + { + type: "say", + say: "task", + ts: Date.now() - 2000, + text: "Initial task", + }, + { + type: "ask", + ask: "tool", + ts: Date.now(), + text: JSON.stringify({ + tool: "readFile", + path: "/absolute/path/test.txt", + isOutsideWorkspace: true, // Explicitly indicate this is outside workspace + }), + partial: false, + }, + ], + }) + + // Wait a short time and verify no auto-approval message was sent + await new Promise((resolve) => setTimeout(resolve, 100)) + expect(vscode.postMessage).not.toHaveBeenCalledWith({ + type: "askResponse", + askResponse: "yesButtonClicked", + }) + }) + it("does not auto-approve when autoApprovalEnabled is false", async () => { render( @@ -258,6 +408,136 @@ describe("ChatView - Auto Approval Tests", () => { }) }) + it("auto-approves outside workspace write operations when enabled", async () => { + render( + + {}} + showHistoryView={() => {}} + /> + , + ) + + // First hydrate state with initial task + mockPostMessage({ + alwaysAllowWrite: true, + alwaysAllowWriteOutsideWorkspace: true, + autoApprovalEnabled: true, + writeDelayMs: 0, // Set to 0 for testing + filePaths: ["/workspace/root", "/another/workspace"], // Define workspace paths for testing + clineMessages: [ + { + type: "say", + say: "task", + ts: Date.now() - 2000, + text: "Initial task", + }, + ], + }) + + // Then send the write tool ask message with an absolute path (outside workspace) + mockPostMessage({ + alwaysAllowWrite: true, + alwaysAllowWriteOutsideWorkspace: true, + autoApprovalEnabled: true, + writeDelayMs: 0, + clineMessages: [ + { + type: "say", + say: "task", + ts: Date.now() - 2000, + text: "Initial task", + }, + { + type: "ask", + ask: "tool", + ts: Date.now(), + text: JSON.stringify({ + tool: "editedExistingFile", + path: "/absolute/path/test.txt", + content: "Test content", + }), + partial: false, + }, + ], + }) + + // Wait for the auto-approval message + await waitFor(() => { + expect(vscode.postMessage).toHaveBeenCalledWith({ + type: "askResponse", + askResponse: "yesButtonClicked", + }) + }) + }) + + it("does not auto-approve outside workspace write operations without permission", async () => { + render( + + {}} + showHistoryView={() => {}} + /> + , + ) + + // First hydrate state with initial task + mockPostMessage({ + alwaysAllowWrite: true, + alwaysAllowWriteOutsideWorkspace: false, // No permission for outside workspace + autoApprovalEnabled: true, + writeDelayMs: 0, + filePaths: ["/workspace/root", "/another/workspace"], // Define workspace paths for testing + clineMessages: [ + { + type: "say", + say: "task", + ts: Date.now() - 2000, + text: "Initial task", + }, + ], + }) + + // Then send the write tool ask message with an absolute path (outside workspace) + mockPostMessage({ + alwaysAllowWrite: true, + alwaysAllowWriteOutsideWorkspace: false, + autoApprovalEnabled: true, + writeDelayMs: 0, + clineMessages: [ + { + type: "say", + say: "task", + ts: Date.now() - 2000, + text: "Initial task", + }, + { + type: "ask", + ask: "tool", + ts: Date.now(), + text: JSON.stringify({ + tool: "editedExistingFile", + path: "/absolute/path/test.txt", + content: "Test content", + isOutsideWorkspace: true, // Explicitly indicate this is outside workspace + }), + partial: false, + }, + ], + }) + + // Wait a short time and verify no auto-approval message was sent + await new Promise((resolve) => setTimeout(resolve, 100)) + expect(vscode.postMessage).not.toHaveBeenCalledWith({ + type: "askResponse", + askResponse: "yesButtonClicked", + }) + }) + it("auto-approves browser actions when enabled", async () => { render( diff --git a/webview-ui/src/components/common/Alert.tsx b/webview-ui/src/components/common/Alert.tsx deleted file mode 100644 index b16e799b910..00000000000 --- a/webview-ui/src/components/common/Alert.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import { cn } from "@/lib/utils" -import { HTMLAttributes } from "react" - -type AlertProps = HTMLAttributes - -export const Alert = ({ className, children, ...props }: AlertProps) => ( -
- {children} -
-) diff --git a/webview-ui/src/components/common/TelemetryBanner.tsx b/webview-ui/src/components/common/TelemetryBanner.tsx index ee3a993f349..8d96359aca4 100644 --- a/webview-ui/src/components/common/TelemetryBanner.tsx +++ b/webview-ui/src/components/common/TelemetryBanner.tsx @@ -4,6 +4,7 @@ import styled from "styled-components" import { vscode } from "../../utils/vscode" import { TelemetrySetting } from "../../../../src/shared/TelemetrySetting" import { useAppTranslation } from "../../i18n/TranslationContext" +import { Trans } from "react-i18next" const BannerContainer = styled.div` background-color: var(--vscode-banner-background); @@ -49,10 +50,12 @@ const TelemetryBanner = () => {
{t("welcome:telemetry.anonymousTelemetry")}
- {t("welcome:telemetry.changeSettings")}{" "} - - {t("welcome:telemetry.settings")} - + , + }} + /> .
diff --git a/webview-ui/src/components/prompts/PromptsView.tsx b/webview-ui/src/components/prompts/PromptsView.tsx index 4011e159508..d1b0a9d7325 100644 --- a/webview-ui/src/components/prompts/PromptsView.tsx +++ b/webview-ui/src/components/prompts/PromptsView.tsx @@ -57,8 +57,6 @@ const PromptsView = ({ onDone }: PromptsViewProps) => { customInstructions, setCustomInstructions, customModes, - enableCustomModeCreation, - setEnableCustomModeCreation, } = useExtensionState() // Memoize modes to preserve array order @@ -326,17 +324,6 @@ const PromptsView = ({ onDone }: PromptsViewProps) => { return () => document.removeEventListener("click", handleClickOutside) }, [showConfigMenu]) - // Add effect to sync enableCustomModeCreation with backend - useEffect(() => { - if (enableCustomModeCreation !== undefined) { - // Send the value to the extension's global state - vscode.postMessage({ - type: "enableCustomModeCreation", // Using dedicated message type - bool: enableCustomModeCreation, - }) - } - }, [enableCustomModeCreation]) - useEffect(() => { const handler = (event: MessageEvent) => { const message = event.data @@ -857,32 +844,6 @@ const PromptsView = ({ onDone }: PromptsViewProps) => {
- {/* - NOTE: This setting is placed in PromptsView rather than SettingsView since it - directly affects the functionality related to modes and custom mode creation, - which are managed in this component. This is an intentional deviation from - the standard pattern described in cline_docs/settings.md. - */} -
- { - // Just update the local state through React context - // The React context will update the global state - setEnableCustomModeCreation(e.target.checked) - }}> - {t("prompts:customModeCreation.enableTitle")} - -

- {t("prompts:customModeCreation.description")} -

-
- {/* Custom System Prompt Disclosure */}
{!apiConfiguration?.openRouterApiKey && ( - + {t("settings:providers.getOpenRouterApiKey")} )} @@ -380,7 +384,10 @@ const ApiOptions = ({ {t("settings:providers.apiKeyStorageNotice")}
{!apiConfiguration?.glamaApiKey && ( - + {t("settings:providers.getGlamaApiKey")} )} @@ -400,6 +407,14 @@ const ApiOptions = ({
{t("settings:providers.apiKeyStorageNotice")}
+ {!apiConfiguration?.requestyApiKey && ( + + {t("settings:providers.getRequestyApiKey")} + + )} )} @@ -681,6 +696,10 @@ const ApiOptions = ({ serviceName="OpenAI" serviceUrl="https://platform.openai.com" /> + @@ -1536,15 +1555,6 @@ const ApiOptions = ({ ) } -export function getGlamaAuthUrl(uriScheme?: string) { - const callbackUrl = `${uriScheme || "vscode"}://rooveterinaryinc.roo-cline/glama` - return `https://glama.ai/oauth/authorize?callback_url=${encodeURIComponent(callbackUrl)}` -} - -export function getOpenRouterAuthUrl(uriScheme?: string) { - return `https://openrouter.ai/auth?callback_url=${uriScheme || "vscode"}://rooveterinaryinc.roo-cline/openrouter` -} - export function normalizeApiConfiguration(apiConfiguration?: ApiConfiguration) { const provider = apiConfiguration?.apiProvider || "anthropic" const modelId = apiConfiguration?.apiModelId diff --git a/webview-ui/src/components/settings/AutoApproveSettings.tsx b/webview-ui/src/components/settings/AutoApproveSettings.tsx index a5f9e9c1c7d..94e18ffe71a 100644 --- a/webview-ui/src/components/settings/AutoApproveSettings.tsx +++ b/webview-ui/src/components/settings/AutoApproveSettings.tsx @@ -12,7 +12,9 @@ import { Section } from "./Section" type AutoApproveSettingsProps = HTMLAttributes & { alwaysAllowReadOnly?: boolean + alwaysAllowReadOnlyOutsideWorkspace?: boolean alwaysAllowWrite?: boolean + alwaysAllowWriteOutsideWorkspace?: boolean writeDelayMs: number alwaysAllowBrowser?: boolean alwaysApproveResubmit?: boolean @@ -24,7 +26,9 @@ type AutoApproveSettingsProps = HTMLAttributes & { allowedCommands?: string[] setCachedStateField: SetCachedStateField< | "alwaysAllowReadOnly" + | "alwaysAllowReadOnlyOutsideWorkspace" | "alwaysAllowWrite" + | "alwaysAllowWriteOutsideWorkspace" | "writeDelayMs" | "alwaysAllowBrowser" | "alwaysApproveResubmit" @@ -39,7 +43,9 @@ type AutoApproveSettingsProps = HTMLAttributes & { export const AutoApproveSettings = ({ alwaysAllowReadOnly, + alwaysAllowReadOnlyOutsideWorkspace, alwaysAllowWrite, + alwaysAllowWriteOutsideWorkspace, writeDelayMs, alwaysAllowBrowser, alwaysApproveResubmit, @@ -88,6 +94,26 @@ export const AutoApproveSettings = ({
+ {alwaysAllowReadOnly && ( +
+
+ + setCachedStateField("alwaysAllowReadOnlyOutsideWorkspace", e.target.checked) + } + data-testid="always-allow-readonly-outside-workspace-checkbox"> + + {t("settings:autoApprove.readOnly.outsideWorkspace.label")} + + +
+ {t("settings:autoApprove.readOnly.outsideWorkspace.description")} +
+
+
+ )} +
+
+ + setCachedStateField("alwaysAllowWriteOutsideWorkspace", e.target.checked) + } + data-testid="always-allow-write-outside-workspace-checkbox"> + + {t("settings:autoApprove.write.outsideWorkspace.label")} + + +
+ {t("settings:autoApprove.write.outsideWorkspace.description")} +
+
{t("settings:contextManagement.maxReadFile.label")}
- setCachedStateField("maxReadFileLine", value)} - data-testid="max-read-file-line-slider" + onChange={(e) => { + const newValue = parseInt(e.target.value, 10) + if (!isNaN(newValue) && newValue >= 0) { + setCachedStateField("maxReadFileLine", newValue) + } + }} + onClick={(e) => e.currentTarget.select()} + data-testid="max-read-file-line-input" /> - {maxReadFileLine ?? 450} + {t("settings:contextManagement.maxReadFile.lines")}
-
+
{t("settings:contextManagement.maxReadFile.description")}
diff --git a/webview-ui/src/components/settings/R1FormatSetting.tsx b/webview-ui/src/components/settings/R1FormatSetting.tsx new file mode 100644 index 00000000000..6418c949bd4 --- /dev/null +++ b/webview-ui/src/components/settings/R1FormatSetting.tsx @@ -0,0 +1,25 @@ +import { Checkbox } from "vscrui" + +import { useAppTranslation } from "@/i18n/TranslationContext" + +interface R1FormatSettingProps { + onChange: (value: boolean) => void + openAiR1FormatEnabled?: boolean +} + +export const R1FormatSetting = ({ onChange, openAiR1FormatEnabled }: R1FormatSettingProps) => { + const { t } = useAppTranslation() + + return ( +
+
+ + {t("settings:modelInfo.enableR1Format")} + +
+

+ {t("settings:modelInfo.enableR1FormatTips")} +

+
+ ) +} diff --git a/webview-ui/src/components/settings/SettingsView.tsx b/webview-ui/src/components/settings/SettingsView.tsx index e2a5c6f25b2..a269e6b6728 100644 --- a/webview-ui/src/components/settings/SettingsView.tsx +++ b/webview-ui/src/components/settings/SettingsView.tsx @@ -98,6 +98,7 @@ const SettingsView = forwardRef(({ onDone }, const { alwaysAllowReadOnly, + alwaysAllowReadOnlyOutsideWorkspace, allowedCommands, language, alwaysAllowBrowser, @@ -106,6 +107,7 @@ const SettingsView = forwardRef(({ onDone }, alwaysAllowModeSwitch, alwaysAllowSubtasks, alwaysAllowWrite, + alwaysAllowWriteOutsideWorkspace, alwaysApproveResubmit, browserToolEnabled, browserViewportSize, @@ -136,7 +138,6 @@ const SettingsView = forwardRef(({ onDone }, // Make sure apiConfiguration is initialized and managed by SettingsView. const apiConfiguration = useMemo(() => cachedState.apiConfiguration ?? {}, [cachedState.apiConfiguration]) - useEffect(() => { // Update only when currentApiConfigName is changed. // Expected to be triggered by loadApiConfiguration/upsertApiConfiguration. @@ -168,7 +169,6 @@ const SettingsView = forwardRef(({ onDone }, } setChangeDetected(true) - return { ...prevState, apiConfiguration: { ...prevState.apiConfiguration, [field]: value } } }) }, @@ -209,7 +209,12 @@ const SettingsView = forwardRef(({ onDone }, if (isSettingValid) { vscode.postMessage({ type: "language", text: language }) vscode.postMessage({ type: "alwaysAllowReadOnly", bool: alwaysAllowReadOnly }) + vscode.postMessage({ + type: "alwaysAllowReadOnlyOutsideWorkspace", + bool: alwaysAllowReadOnlyOutsideWorkspace, + }) vscode.postMessage({ type: "alwaysAllowWrite", bool: alwaysAllowWrite }) + vscode.postMessage({ type: "alwaysAllowWriteOutsideWorkspace", bool: alwaysAllowWriteOutsideWorkspace }) vscode.postMessage({ type: "alwaysAllowExecute", bool: alwaysAllowExecute }) vscode.postMessage({ type: "alwaysAllowBrowser", bool: alwaysAllowBrowser }) vscode.postMessage({ type: "alwaysAllowMcp", bool: alwaysAllowMcp }) @@ -405,7 +410,9 @@ const SettingsView = forwardRef(({ onDone },
diff --git a/webview-ui/src/components/welcome/WelcomeView.tsx b/webview-ui/src/components/welcome/WelcomeView.tsx index 937c59a5f10..3b81f51b618 100644 --- a/webview-ui/src/components/welcome/WelcomeView.tsx +++ b/webview-ui/src/components/welcome/WelcomeView.tsx @@ -1,18 +1,17 @@ import { useCallback, useState } from "react" import { VSCodeButton } from "@vscode/webview-ui-toolkit/react" - import { useExtensionState } from "../../context/ExtensionStateContext" import { validateApiConfiguration } from "../../utils/validate" import { vscode } from "../../utils/vscode" import ApiOptions from "../settings/ApiOptions" import { Tab, TabContent } from "../common/Tab" -import { Alert } from "../common/Alert" import { useAppTranslation } from "../../i18n/TranslationContext" +import { getRequestyAuthUrl, getOpenRouterAuthUrl } from "../../oauth/urls" +import knuthShuffle from "knuth-shuffle-seeded" const WelcomeView = () => { - const { apiConfiguration, currentApiConfigName, setApiConfiguration, uriScheme } = useExtensionState() + const { apiConfiguration, currentApiConfigName, setApiConfiguration, uriScheme, machineId } = useExtensionState() const { t } = useAppTranslation() - const [errorMessage, setErrorMessage] = useState(undefined) const handleSubmit = useCallback(() => { @@ -27,24 +26,92 @@ const WelcomeView = () => { vscode.postMessage({ type: "upsertApiConfiguration", text: currentApiConfigName, apiConfiguration }) }, [apiConfiguration, currentApiConfigName]) + // Using a lazy initializer so it reads once at mount + const [imagesBaseUri] = useState(() => { + const w = window as any + return w.IMAGES_BASE_URI || "" + }) + return (

{t("welcome:greeting")}

{t("welcome:introduction")}
- {t("welcome:notice")} - setApiConfiguration({ [field]: value })} - errorMessage={errorMessage} - setErrorMessage={setErrorMessage} - /> +
{t("welcome:chooseProvider")}
+ +
+

{t("welcome:startRouter")}

+ +
+ {/* Define the providers */} + {(() => { + // Provider card configuration + const providers = [ + { + slug: "requesty", + name: "Requesty", + description: t("welcome:routers.requesty.description"), + incentive: t("welcome:routers.requesty.incentive"), + authUrl: getRequestyAuthUrl(uriScheme), + }, + { + slug: "openrouter", + name: "OpenRouter", + description: t("welcome:routers.openrouter.description"), + authUrl: getOpenRouterAuthUrl(uriScheme), + }, + ] + + // Shuffle providers based on machine ID (will be consistent for the same machine) + const orderedProviders = [...providers] + knuthShuffle(orderedProviders, (machineId as any) || Date.now()) + + // Render the provider cards + return orderedProviders.map((provider, index) => ( + +
+ {provider.name} +
+
+
{provider.name}
+
+ {provider.description} +
+ {provider.incentive && ( +
{provider.incentive}
+ )} +
+
+ )) + })()} +
+ +
{t("welcome:or")}
+

{t("welcome:startCustom")}

+ setApiConfiguration({ [field]: value })} + errorMessage={errorMessage} + setErrorMessage={setErrorMessage} + /> +
- {t("welcome:start")} + + {t("welcome:start")} + {errorMessage &&
{errorMessage}
}
diff --git a/webview-ui/src/context/ExtensionStateContext.tsx b/webview-ui/src/context/ExtensionStateContext.tsx index 389592fa27f..b181e50e019 100644 --- a/webview-ui/src/context/ExtensionStateContext.tsx +++ b/webview-ui/src/context/ExtensionStateContext.tsx @@ -23,7 +23,9 @@ export interface ExtensionStateContextType extends ExtensionState { setApiConfiguration: (config: ApiConfiguration) => void setCustomInstructions: (value?: string) => void setAlwaysAllowReadOnly: (value: boolean) => void + setAlwaysAllowReadOnlyOutsideWorkspace: (value: boolean) => void setAlwaysAllowWrite: (value: boolean) => void + setAlwaysAllowWriteOutsideWorkspace: (value: boolean) => void setAlwaysAllowExecute: (value: boolean) => void setAlwaysAllowBrowser: (value: boolean) => void setAlwaysAllowMcp: (value: boolean) => void @@ -52,8 +54,6 @@ export interface ExtensionStateContextType extends ExtensionState { setMcpEnabled: (value: boolean) => void enableMcpServerCreation: boolean setEnableMcpServerCreation: (value: boolean) => void - enableCustomModeCreation?: boolean - setEnableCustomModeCreation: (value: boolean) => void alwaysApproveResubmit?: boolean setAlwaysApproveResubmit: (value: boolean) => void requestDelaySeconds: number @@ -128,7 +128,6 @@ export const ExtensionStateContextProvider: React.FC<{ children: React.ReactNode checkpointStorage: "task", fuzzyMatchThreshold: 1.0, language: "en", // Default language code - enableCustomModeCreation: true, writeDelayMs: 1000, browserViewportSize: "900x600", screenshotQuality: 75, @@ -259,7 +258,11 @@ export const ExtensionStateContextProvider: React.FC<{ children: React.ReactNode })), setCustomInstructions: (value) => setState((prevState) => ({ ...prevState, customInstructions: value })), setAlwaysAllowReadOnly: (value) => setState((prevState) => ({ ...prevState, alwaysAllowReadOnly: value })), + setAlwaysAllowReadOnlyOutsideWorkspace: (value) => + setState((prevState) => ({ ...prevState, alwaysAllowReadOnlyOutsideWorkspace: value })), setAlwaysAllowWrite: (value) => setState((prevState) => ({ ...prevState, alwaysAllowWrite: value })), + setAlwaysAllowWriteOutsideWorkspace: (value) => + setState((prevState) => ({ ...prevState, alwaysAllowWriteOutsideWorkspace: value })), setAlwaysAllowExecute: (value) => setState((prevState) => ({ ...prevState, alwaysAllowExecute: value })), setAlwaysAllowBrowser: (value) => setState((prevState) => ({ ...prevState, alwaysAllowBrowser: value })), setAlwaysAllowMcp: (value) => setState((prevState) => ({ ...prevState, alwaysAllowMcp: value })), @@ -295,8 +298,6 @@ export const ExtensionStateContextProvider: React.FC<{ children: React.ReactNode setCustomSupportPrompts: (value) => setState((prevState) => ({ ...prevState, customSupportPrompts: value })), setEnhancementApiConfigId: (value) => setState((prevState) => ({ ...prevState, enhancementApiConfigId: value })), - setEnableCustomModeCreation: (value) => - setState((prevState) => ({ ...prevState, enableCustomModeCreation: value })), setAutoApprovalEnabled: (value) => setState((prevState) => ({ ...prevState, autoApprovalEnabled: value })), setCustomModes: (value) => setState((prevState) => ({ ...prevState, customModes: value })), setMaxOpenTabsContext: (value) => setState((prevState) => ({ ...prevState, maxOpenTabsContext: value })), diff --git a/webview-ui/src/i18n/locales/ca/chat.json b/webview-ui/src/i18n/locales/ca/chat.json index 2c06a9a2d1b..1d29d269fde 100644 --- a/webview-ui/src/i18n/locales/ca/chat.json +++ b/webview-ui/src/i18n/locales/ca/chat.json @@ -105,10 +105,15 @@ }, "current": "Actual" }, + "instructions": { + "wantsToFetch": "Roo vol obtenir instruccions detallades per ajudar amb la tasca actual." + }, "fileOperations": { "wantsToRead": "Roo vol llegir aquest fitxer:", + "wantsToReadOutsideWorkspace": "Roo vol llegir aquest fitxer fora de l'espai de treball:", "didRead": "Roo ha llegit aquest fitxer:", "wantsToEdit": "Roo vol editar aquest fitxer:", + "wantsToEditOutsideWorkspace": "Roo vol editar aquest fitxer fora de l'espai de treball:", "wantsToCreate": "Roo vol crear un nou fitxer:" }, "directoryOperations": { diff --git a/webview-ui/src/i18n/locales/ca/common.json b/webview-ui/src/i18n/locales/ca/common.json index bdbe1d188a3..2a10002acb4 100644 --- a/webview-ui/src/i18n/locales/ca/common.json +++ b/webview-ui/src/i18n/locales/ca/common.json @@ -1,7 +1,7 @@ { "number_format": { - "thousand_suffix": "mil", - "million_suffix": "M", - "billion_suffix": "MM" + "thousand_suffix": "k", + "million_suffix": "m", + "billion_suffix": "b" } } diff --git a/webview-ui/src/i18n/locales/ca/prompts.json b/webview-ui/src/i18n/locales/ca/prompts.json index f876bd1f7e0..dee15a23451 100644 --- a/webview-ui/src/i18n/locales/ca/prompts.json +++ b/webview-ui/src/i18n/locales/ca/prompts.json @@ -91,13 +91,13 @@ "TERMINAL_EXPLAIN": { "label": "Explicar comanda del terminal", "description": "Obtingueu explicacions detallades de les comandes del terminal i les seves sortides. Disponible al menú contextual del terminal (clic dret al contingut seleccionat del terminal)." + }, + "NEW_TASK": { + "label": "Iniciar nova tasca", + "description": "Inicieu una nova tasca amb l'entrada proporcionada. Disponible a la paleta de comandes." } } }, - "customModeCreation": { - "enableTitle": "Habilitar la creació de modes personalitzats a través de prompts", - "description": "Quan està habilitat, Roo us permet crear modes personalitzats utilitzant prompts com 'Crea'm un mode personalitzat que...'. Desactivar-ho redueix el vostre prompt del sistema en aproximadament 700 tokens quan aquesta funcionalitat no és necessària. Quan està desactivat, encara podeu crear modes personalitzats manualment utilitzant el botó + de dalt o editant el JSON de configuració relacionat." - }, "advancedSystemPrompt": { "title": "Avançat: Sobreescriure prompt del sistema", "description": "Podeu reemplaçar completament el prompt del sistema per a aquest mode (a part de la definició de rol i instruccions personalitzades) creant un fitxer a .roo/system-prompt-{{slug}} al vostre espai de treball. Aquesta és una funcionalitat molt avançada que eludeix les salvaguardes integrades i les comprovacions de consistència (especialment al voltant de l'ús d'eines), així que aneu amb compte!" diff --git a/webview-ui/src/i18n/locales/ca/settings.json b/webview-ui/src/i18n/locales/ca/settings.json index 571da595eb3..b88860eedce 100644 --- a/webview-ui/src/i18n/locales/ca/settings.json +++ b/webview-ui/src/i18n/locales/ca/settings.json @@ -35,12 +35,20 @@ "description": "Permet que Roo realitzi operacions automàticament sense requerir aprovació. Activeu aquesta configuració només si confieu plenament en la IA i enteneu els riscos de seguretat associats.", "readOnly": { "label": "Aprovar sempre operacions de només lectura", - "description": "Quan està activat, Roo veurà automàticament el contingut del directori i llegirà fitxers sense que calgui fer clic al botó Aprovar." + "description": "Quan està activat, Roo veurà automàticament el contingut del directori i llegirà fitxers sense que calgui fer clic al botó Aprovar.", + "outsideWorkspace": { + "label": "Incloure fitxers fora de l'espai de treball", + "description": "Permetre a Roo llegir fitxers fora de l'espai de treball actual sense requerir aprovació." + } }, "write": { "label": "Aprovar sempre operacions d'escriptura", "description": "Crear i editar fitxers automàticament sense requerir aprovació", - "delayLabel": "Retard després d'escriptura per permetre que els diagnòstics detectin possibles problemes" + "delayLabel": "Retard després d'escriptura per permetre que els diagnòstics detectin possibles problemes", + "outsideWorkspace": { + "label": "Incloure fitxers fora de l'espai de treball", + "description": "Permetre a Roo crear i editar fitxers fora de l'espai de treball actual sense requerir aprovació." + } }, "browser": { "label": "Aprovar sempre accions del navegador", @@ -267,8 +275,9 @@ "description": "Quan està habilitat, els fitxers que coincideixen amb els patrons a .rooignore es mostraran en llistes amb un símbol de cadenat. Quan està deshabilitat, aquests fitxers s'ocultaran completament de les llistes de fitxers i cerques." }, "maxReadFile": { - "label": "Nombre màxim de línies per llegir d'un fitxer", - "description": "Nombre màxim de línies per llegir d'un fitxer a la vegada. Valors més baixos redueixen l'ús de context/recursos però poden requerir més lectures per a fitxers grans." + "label": "Llindar d'auto-truncament de lectura de fitxers", + "description": "El nombre predeterminat de línies per llegir d'un fitxer en un lot. Valors més baixos redueixen l'ús de context/recursos però poden requerir més lectures per a fitxers grans.", + "lines": "línies" } }, "terminal": { @@ -348,13 +357,15 @@ "outputPrice": "Preu de sortida", "cacheReadsPrice": "Preu de lectures de caché", "cacheWritesPrice": "Preu d'escriptures de caché", + "enableStreaming": "Habilitar streaming", + "enableR1Format": "Activar els paràmetres del model R1", + "enableR1FormatTips": "S'ha d'activat quan s'utilitzen models R1 com el QWQ per evitar errors 400", + "useAzure": "Utilitzar Azure", + "azureApiVersion": "Establir versió de l'API d'Azure", "gemini": { "freeRequests": "* Gratuït fins a {{count}} sol·licituds per minut. Després d'això, la facturació depèn de la mida del prompt.", "pricingDetails": "Per a més informació, consulteu els detalls de preus." - }, - "enableStreaming": "Habilitar streaming", - "useAzure": "Utilitzar Azure", - "azureApiVersion": "Establir versió de l'API d'Azure" + } }, "modelPicker": { "automaticFetch": "L'extensió obté automàticament la llista més recent de models disponibles a {{serviceName}}. Si no esteu segur de quin model triar, Roo Code funciona millor amb {{defaultModelId}}. També podeu cercar \"free\" per a opcions gratuïtes actualment disponibles.", diff --git a/webview-ui/src/i18n/locales/ca/welcome.json b/webview-ui/src/i18n/locales/ca/welcome.json index d17b0ca6058..89b1611881c 100644 --- a/webview-ui/src/i18n/locales/ca/welcome.json +++ b/webview-ui/src/i18n/locales/ca/welcome.json @@ -3,12 +3,25 @@ "introduction": "Puc fer tot tipus de tasques gràcies als últims avenços en capacitats de codificació agent i accés a eines que em permeten crear i editar fitxers, explorar projectes complexos, utilitzar el navegador i executar ordres de terminal (amb el teu permís, és clar). Fins i tot puc utilitzar MCP per crear noves eines i ampliar les meves pròpies capacitats.", "notice": "Per començar, aquesta extensió necessita un proveïdor d'API.", "start": "Som-hi!", + "chooseProvider": "Tria un proveïdor d'API per començar:", + "routers": { + "requesty": { + "description": "El teu router LLM optimitzat", + "incentive": "$1 de crèdit gratuït" + }, + "openrouter": { + "description": "Una interfície unificada per a LLMs" + } + }, + "startRouter": "Configuració ràpida a través d'un router", + "startCustom": "Utilitza la teva pròpia clau API", "telemetry": { "title": "Ajuda a millorar Roo Code", "anonymousTelemetry": "Envia dades d'ús i errors anònims per ajudar-nos a corregir errors i millorar l'extensió. No s'envia mai cap codi, text o informació personal.", - "changeSettings": "Sempre pots canviar això a la part inferior de la configuració", + "changeSettings": "Sempre pots canviar això a la part inferior de la configuració", "settings": "configuració", "allow": "Permetre", "deny": "Denegar" - } + }, + "or": "o" } diff --git a/webview-ui/src/i18n/locales/de/chat.json b/webview-ui/src/i18n/locales/de/chat.json index 78db75b7f09..5dd572796d0 100644 --- a/webview-ui/src/i18n/locales/de/chat.json +++ b/webview-ui/src/i18n/locales/de/chat.json @@ -105,10 +105,15 @@ }, "current": "Aktuell" }, + "instructions": { + "wantsToFetch": "Roo möchte detaillierte Anweisungen abrufen, um bei der aktuellen Aufgabe zu helfen" + }, "fileOperations": { "wantsToRead": "Roo möchte diese Datei lesen:", + "wantsToReadOutsideWorkspace": "Roo möchte diese Datei außerhalb des Arbeitsbereichs lesen:", "didRead": "Roo hat diese Datei gelesen:", "wantsToEdit": "Roo möchte diese Datei bearbeiten:", + "wantsToEditOutsideWorkspace": "Roo möchte diese Datei außerhalb des Arbeitsbereichs bearbeiten:", "wantsToCreate": "Roo möchte eine neue Datei erstellen:" }, "directoryOperations": { diff --git a/webview-ui/src/i18n/locales/de/common.json b/webview-ui/src/i18n/locales/de/common.json index ba8ee29b2df..2a10002acb4 100644 --- a/webview-ui/src/i18n/locales/de/common.json +++ b/webview-ui/src/i18n/locales/de/common.json @@ -1,7 +1,7 @@ { "number_format": { - "thousand_suffix": "Tsd.", - "million_suffix": "Mio.", - "billion_suffix": "Mrd." + "thousand_suffix": "k", + "million_suffix": "m", + "billion_suffix": "b" } } diff --git a/webview-ui/src/i18n/locales/de/prompts.json b/webview-ui/src/i18n/locales/de/prompts.json index ee2517c3fcb..211699482d6 100644 --- a/webview-ui/src/i18n/locales/de/prompts.json +++ b/webview-ui/src/i18n/locales/de/prompts.json @@ -91,13 +91,13 @@ "TERMINAL_EXPLAIN": { "label": "Terminal-Befehl erklären", "description": "Erhalten Sie detaillierte Erklärungen zu Terminal-Befehlen und deren Ausgaben. Verfügbar im Kontextmenü des Terminals (Rechtsklick auf ausgewählten Terminal-Inhalt)." + }, + "NEW_TASK": { + "label": "Neue Aufgabe starten", + "description": "Starte eine neue Aufgabe mit deiner Eingabe. Verfügbar in der Befehlspalette." } } }, - "customModeCreation": { - "enableTitle": "Erstellung benutzerdefinierter Modi über Prompts aktivieren", - "description": "Wenn aktiviert, ermöglicht Roo dir, benutzerdefinierte Modi mit Prompts wie 'Erstelle mir einen benutzerdefinierten Modus, der...' zu erstellen. Die Deaktivierung reduziert deinen System-Prompt um etwa 700 Tokens, wenn diese Funktion nicht benötigt wird. Bei Deaktivierung kannst du immer noch manuell benutzerdefinierte Modi mit der +-Schaltfläche oben erstellen oder durch Bearbeiten der zugehörigen Konfigurations-JSON." - }, "advancedSystemPrompt": { "title": "Erweitert: System-Prompt überschreiben", "description": "Du kannst den System-Prompt für diesen Modus vollständig ersetzen (abgesehen von der Rollendefinition und benutzerdefinierten Anweisungen), indem du eine Datei unter .roo/system-prompt-{{slug}} in deinem Arbeitsbereich erstellst. Dies ist eine sehr fortgeschrittene Funktion, die eingebaute Schutzmaßnahmen und Konsistenzprüfungen umgeht (besonders bei der Werkzeugnutzung), also sei vorsichtig!" diff --git a/webview-ui/src/i18n/locales/de/settings.json b/webview-ui/src/i18n/locales/de/settings.json index 277ab839823..d93d661473a 100644 --- a/webview-ui/src/i18n/locales/de/settings.json +++ b/webview-ui/src/i18n/locales/de/settings.json @@ -35,12 +35,20 @@ "description": "Erlaubt Roo, Operationen automatisch ohne Genehmigung durchzuführen. Aktiviere diese Einstellungen nur, wenn du der KI vollständig vertraust und die damit verbundenen Sicherheitsrisiken verstehst.", "readOnly": { "label": "Schreibgeschützte Operationen immer genehmigen", - "description": "Wenn aktiviert, wird Roo automatisch Verzeichnisinhalte anzeigen und Dateien lesen, ohne dass du auf die Genehmigen-Schaltfläche klicken musst." + "description": "Wenn aktiviert, wird Roo automatisch Verzeichnisinhalte anzeigen und Dateien lesen, ohne dass du auf die Genehmigen-Schaltfläche klicken musst.", + "outsideWorkspace": { + "label": "Dateien außerhalb des Arbeitsbereichs einbeziehen", + "description": "Roo erlauben, Dateien außerhalb des aktuellen Arbeitsbereichs ohne Genehmigung zu lesen." + } }, "write": { "label": "Schreiboperationen immer genehmigen", "description": "Dateien automatisch erstellen und bearbeiten ohne Genehmigung", - "delayLabel": "Verzögerung nach Schreibvorgängen, damit Diagnosefunktionen potenzielle Probleme erkennen können" + "delayLabel": "Verzögerung nach Schreibvorgängen, damit Diagnosefunktionen potenzielle Probleme erkennen können", + "outsideWorkspace": { + "label": "Dateien außerhalb des Arbeitsbereichs einbeziehen", + "description": "Roo erlauben, Dateien außerhalb des aktuellen Arbeitsbereichs ohne Genehmigung zu erstellen und zu bearbeiten." + } }, "browser": { "label": "Browser-Aktionen immer genehmigen", @@ -267,8 +275,9 @@ "description": "Wenn aktiviert, werden Dateien, die mit Mustern in .rooignore übereinstimmen, in Listen mit einem Schlosssymbol angezeigt. Wenn deaktiviert, werden diese Dateien vollständig aus Dateilisten und Suchen ausgeblendet." }, "maxReadFile": { - "label": "Maximale Anzahl an Zeilen, die aus einer Datei gelesen werden", - "description": "Maximale Anzahl an Zeilen, die auf einmal aus einer Datei gelesen werden. Niedrigere Werte reduzieren den Kontext-/Ressourcenverbrauch, können aber mehr Lesevorgänge für große Dateien erfordern." + "label": "Schwellenwert für automatische Dateilesekürzung", + "description": "Die Standardanzahl an Zeilen, die in einem Durchgang aus einer Datei gelesen werden. Niedrigere Werte reduzieren den Kontext-/Ressourcenverbrauch, können aber mehr Lesevorgänge für große Dateien erfordern.", + "lines": "Zeilen" } }, "terminal": { @@ -349,6 +358,8 @@ "cacheReadsPrice": "Cache-Lesepreis", "cacheWritesPrice": "Cache-Schreibpreis", "enableStreaming": "Streaming aktivieren", + "enableR1Format": "R1-Modellparameter aktivieren", + "enableR1FormatTips": "Muss aktiviert werden, wenn R1-Modelle wie QWQ verwendet werden, um 400-Fehler zu vermeiden", "useAzure": "Azure verwenden", "azureApiVersion": "Azure API-Version festlegen", "gemini": { diff --git a/webview-ui/src/i18n/locales/de/welcome.json b/webview-ui/src/i18n/locales/de/welcome.json index 76228a575d6..19fcb0eac34 100644 --- a/webview-ui/src/i18n/locales/de/welcome.json +++ b/webview-ui/src/i18n/locales/de/welcome.json @@ -3,12 +3,25 @@ "introduction": "Ich kann alle Arten von Aufgaben erledigen, dank der neuesten Durchbrüche in agentenbasierten Codierungsfähigkeiten und dem Zugang zu Tools, die es mir ermöglichen, Dateien zu erstellen und zu bearbeiten, komplexe Projekte zu erkunden, den Browser zu verwenden und Terminalbefehle auszuführen (natürlich mit deiner Erlaubnis). Ich kann sogar MCP verwenden, um neue Tools zu erstellen und meine eigenen Fähigkeiten zu erweitern.", "notice": "Um loszulegen, benötigt diese Erweiterung einen API-Anbieter.", "start": "Los geht's!", + "chooseProvider": "Wähle einen API-Anbieter, um zu beginnen:", + "routers": { + "requesty": { + "description": "Dein optimierter LLM-Router", + "incentive": "$1 Guthaben gratis" + }, + "openrouter": { + "description": "Eine einheitliche Schnittstelle für LLMs" + } + }, + "startRouter": "Express-Einrichtung über einen Router", + "startCustom": "Eigenen API-Schlüssel verwenden", "telemetry": { "title": "Hilf, Roo Code zu verbessern", "anonymousTelemetry": "Sende anonyme Fehler- und Nutzungsdaten, um uns bei der Fehlerbehebung und Verbesserung der Erweiterung zu helfen. Es werden niemals Code, Texte oder persönliche Informationen gesendet.", - "changeSettings": "Du kannst dies jederzeit unten in den Einstellungen ändern", + "changeSettings": "Du kannst dies jederzeit unten in den Einstellungen ändern", "settings": "Einstellungen", "allow": "Erlauben", "deny": "Ablehnen" - } + }, + "or": "oder" } diff --git a/webview-ui/src/i18n/locales/en/chat.json b/webview-ui/src/i18n/locales/en/chat.json index dbc5712d697..3e3e5ecfacf 100644 --- a/webview-ui/src/i18n/locales/en/chat.json +++ b/webview-ui/src/i18n/locales/en/chat.json @@ -103,10 +103,15 @@ }, "current": "Current" }, + "instructions": { + "wantsToFetch": "Roo wants to fetch detailed instructions to assist with the current task" + }, "fileOperations": { "wantsToRead": "Roo wants to read this file:", + "wantsToReadOutsideWorkspace": "Roo wants to read this file outside of the workspace:", "didRead": "Roo read this file:", "wantsToEdit": "Roo wants to edit this file:", + "wantsToEditOutsideWorkspace": "Roo wants to edit this file outside of the workspace:", "wantsToCreate": "Roo wants to create a new file:" }, "directoryOperations": { diff --git a/webview-ui/src/i18n/locales/en/prompts.json b/webview-ui/src/i18n/locales/en/prompts.json index 4adc3ead4be..2fc58b9557c 100644 --- a/webview-ui/src/i18n/locales/en/prompts.json +++ b/webview-ui/src/i18n/locales/en/prompts.json @@ -91,13 +91,13 @@ "TERMINAL_EXPLAIN": { "label": "Explain Terminal Command", "description": "Get detailed explanations of terminal commands and their outputs. Available in the terminal context menu (right-click on selected terminal content)." + }, + "NEW_TASK": { + "label": "Start New Task", + "description": "Start a new task with user input. Available in the Command Palette." } } }, - "customModeCreation": { - "enableTitle": "Enable Custom Mode Creation Through Prompts", - "description": "When enabled, Roo allows you to create custom modes using prompts like 'Make me a custom mode that…'. Disabling this reduces your system prompt by about 700 tokens when this feature isn't needed. When disabled you can still manually create custom modes using the + button above or by editing the related config JSON." - }, "advancedSystemPrompt": { "title": "Advanced: Override System Prompt", "description": "You can completely replace the system prompt for this mode (aside from the role definition and custom instructions) by creating a file at .roo/system-prompt-{{slug}} in your workspace. This is a very advanced feature that bypasses built-in safeguards and consistency checks (especially around tool usage), so be careful!" diff --git a/webview-ui/src/i18n/locales/en/settings.json b/webview-ui/src/i18n/locales/en/settings.json index 29b163512eb..2ad31355a16 100644 --- a/webview-ui/src/i18n/locales/en/settings.json +++ b/webview-ui/src/i18n/locales/en/settings.json @@ -35,12 +35,20 @@ "description": "Allow Roo to automatically perform operations without requiring approval. Enable these settings only if you fully trust the AI and understand the associated security risks.", "readOnly": { "label": "Always approve read-only operations", - "description": "When enabled, Roo will automatically view directory contents and read files without requiring you to click the Approve button." + "description": "When enabled, Roo will automatically view directory contents and read files without requiring you to click the Approve button.", + "outsideWorkspace": { + "label": "Include files outside workspace", + "description": "Allow Roo to read files outside the current workspace without requiring approval." + } }, "write": { "label": "Always approve write operations", "description": "Automatically create and edit files without requiring approval", - "delayLabel": "Delay after writes to allow diagnostics to detect potential problems" + "delayLabel": "Delay after writes to allow diagnostics to detect potential problems", + "outsideWorkspace": { + "label": "Include files outside workspace", + "description": "Allow Roo to create and edit files outside the current workspace without requiring approval." + } }, "browser": { "label": "Always approve browser actions", @@ -267,8 +275,9 @@ "description": "When enabled, files matching patterns in .rooignore will be shown in lists with a lock symbol. When disabled, these files will be completely hidden from file lists and searches." }, "maxReadFile": { - "label": "Maximum lines to read from a file", - "description": "Maximum number of lines to read from a file at once. Lower values reduce context/resource usage but may require more reads for large files." + "label": "File read auto-truncate threshold", + "description": "The default number of lines to read from a file in one batch. Lower values reduce context/resource usage but may require more reads for large files.", + "lines": "lines" } }, "terminal": { @@ -349,6 +358,8 @@ "cacheReadsPrice": "Cache reads price", "cacheWritesPrice": "Cache writes price", "enableStreaming": "Enable streaming", + "enableR1Format": "Enable R1 model parameters", + "enableR1FormatTips": "Must be enabled when using R1 models such as QWQ to prevent 400 errors", "useAzure": "Use Azure", "azureApiVersion": "Set Azure API version", "gemini": { diff --git a/webview-ui/src/i18n/locales/en/welcome.json b/webview-ui/src/i18n/locales/en/welcome.json index 23174bd053e..811d760c0f1 100644 --- a/webview-ui/src/i18n/locales/en/welcome.json +++ b/webview-ui/src/i18n/locales/en/welcome.json @@ -3,12 +3,25 @@ "introduction": "I can do all kinds of tasks thanks to the latest breakthroughs in agentic coding capabilities and access to tools that let me create & edit files, explore complex projects, use the browser, and execute terminal commands (with your permission, of course). I can even use MCP to create new tools and extend my own capabilities.", "notice": "To get started, this extension needs an API provider.", "start": "Let's go!", + "chooseProvider": "Choose an API provider to get started:", + "routers": { + "requesty": { + "description": "Your optimized LLM router", + "incentive": "$1 free credit" + }, + "openrouter": { + "description": "A unified interface for LLMs" + } + }, + "startRouter": "Express Setup Through a Router", + "startCustom": "Bring Your Own API Key", "telemetry": { "title": "Help Improve Roo Code", "anonymousTelemetry": "Send anonymous error and usage data to help us fix bugs and improve the extension. No code, prompts, or personal information is ever sent.", - "changeSettings": "You can always change this at the bottom of the settings", + "changeSettings": "You can always change this at the bottom of the settings", "settings": "settings", "allow": "Allow", "deny": "Deny" - } + }, + "or": "or" } diff --git a/webview-ui/src/i18n/locales/es/chat.json b/webview-ui/src/i18n/locales/es/chat.json index bfb536d6743..fdaa5a69b00 100644 --- a/webview-ui/src/i18n/locales/es/chat.json +++ b/webview-ui/src/i18n/locales/es/chat.json @@ -105,10 +105,15 @@ }, "current": "Actual" }, + "instructions": { + "wantsToFetch": "Roo quiere obtener instrucciones detalladas para ayudar con la tarea actual" + }, "fileOperations": { "wantsToRead": "Roo quiere leer este archivo:", + "wantsToReadOutsideWorkspace": "Roo quiere leer este archivo fuera del espacio de trabajo:", "didRead": "Roo leyó este archivo:", "wantsToEdit": "Roo quiere editar este archivo:", + "wantsToEditOutsideWorkspace": "Roo quiere editar este archivo fuera del espacio de trabajo:", "wantsToCreate": "Roo quiere crear un nuevo archivo:" }, "directoryOperations": { diff --git a/webview-ui/src/i18n/locales/es/common.json b/webview-ui/src/i18n/locales/es/common.json index f0ed1318575..2a10002acb4 100644 --- a/webview-ui/src/i18n/locales/es/common.json +++ b/webview-ui/src/i18n/locales/es/common.json @@ -1,7 +1,7 @@ { "number_format": { "thousand_suffix": "k", - "million_suffix": "M", - "billion_suffix": "MM" + "million_suffix": "m", + "billion_suffix": "b" } } diff --git a/webview-ui/src/i18n/locales/es/prompts.json b/webview-ui/src/i18n/locales/es/prompts.json index ba0b2937ebc..91b31c5419c 100644 --- a/webview-ui/src/i18n/locales/es/prompts.json +++ b/webview-ui/src/i18n/locales/es/prompts.json @@ -91,13 +91,13 @@ "TERMINAL_EXPLAIN": { "label": "Explicar comando de terminal", "description": "Obtén explicaciones detalladas de comandos de terminal y sus salidas. Disponible en el menú contextual de la terminal (clic derecho en el contenido seleccionado de la terminal)." + }, + "NEW_TASK": { + "label": "Iniciar nueva tarea", + "description": "Inicia una nueva tarea con entrada del usuario. Disponible en la Paleta de comandos." } } }, - "customModeCreation": { - "enableTitle": "Habilitar la creación de modos personalizados a través de solicitudes", - "description": "Cuando está habilitado, Roo te permite crear modos personalizados usando solicitudes como 'Hazme un modo personalizado que...'. Deshabilitarlo reduce tu solicitud del sistema en aproximadamente 700 tokens cuando esta función no es necesaria. Cuando está deshabilitado, aún puedes crear modos personalizados manualmente usando el botón + de arriba o editando el JSON de configuración relacionado." - }, "advancedSystemPrompt": { "title": "Avanzado: Anular solicitud del sistema", "description": "Puedes reemplazar completamente la solicitud del sistema para este modo (aparte de la definición de rol e instrucciones personalizadas) creando un archivo en .roo/system-prompt-{{slug}} en tu espacio de trabajo. ¡Esta es una función muy avanzada que omite las salvaguardas integradas y las verificaciones de consistencia (especialmente en torno al uso de herramientas), así que ten cuidado!" diff --git a/webview-ui/src/i18n/locales/es/settings.json b/webview-ui/src/i18n/locales/es/settings.json index ccc255e8a1d..d98b59c63ac 100644 --- a/webview-ui/src/i18n/locales/es/settings.json +++ b/webview-ui/src/i18n/locales/es/settings.json @@ -35,12 +35,20 @@ "description": "Permitir que Roo realice operaciones automáticamente sin requerir aprobación. Habilite esta configuración solo si confía plenamente en la IA y comprende los riesgos de seguridad asociados.", "readOnly": { "label": "Aprobar siempre operaciones de solo lectura", - "description": "Cuando está habilitado, Roo verá automáticamente el contenido del directorio y leerá archivos sin que necesite hacer clic en el botón Aprobar." + "description": "Cuando está habilitado, Roo verá automáticamente el contenido del directorio y leerá archivos sin que necesite hacer clic en el botón Aprobar.", + "outsideWorkspace": { + "label": "Incluir archivos fuera del espacio de trabajo", + "description": "Permitir a Roo leer archivos fuera del espacio de trabajo actual sin requerir aprobación." + } }, "write": { "label": "Aprobar siempre operaciones de escritura", "description": "Crear y editar archivos automáticamente sin requerir aprobación", - "delayLabel": "Retraso después de escritura para permitir que los diagnósticos detecten posibles problemas" + "delayLabel": "Retraso después de escritura para permitir que los diagnósticos detecten posibles problemas", + "outsideWorkspace": { + "label": "Incluir archivos fuera del espacio de trabajo", + "description": "Permitir a Roo crear y editar archivos fuera del espacio de trabajo actual sin requerir aprobación." + } }, "browser": { "label": "Aprobar siempre acciones del navegador", @@ -267,8 +275,9 @@ "description": "Cuando está habilitado, los archivos que coinciden con los patrones en .rooignore se mostrarán en listas con un símbolo de candado. Cuando está deshabilitado, estos archivos se ocultarán completamente de las listas de archivos y búsquedas." }, "maxReadFile": { - "label": "Número máximo de líneas para leer de un archivo", - "description": "Número máximo de líneas para leer de un archivo a la vez. Valores más bajos reducen el uso de contexto/recursos pero pueden requerir más lecturas para archivos grandes." + "label": "Umbral de auto-truncado de lectura de archivos", + "description": "El número predeterminado de líneas para leer de un archivo en un lote. Valores más bajos reducen el uso de contexto/recursos pero pueden requerir más lecturas para archivos grandes.", + "lines": "líneas" } }, "terminal": { @@ -349,6 +358,8 @@ "cacheReadsPrice": "Precio de lecturas de caché", "cacheWritesPrice": "Precio de escrituras de caché", "enableStreaming": "Habilitar streaming", + "enableR1Format": "Habilitar parámetros del modelo R1", + "enableR1FormatTips": "Debe habilitarse al utilizar modelos R1 como QWQ, para evitar el error 400", "useAzure": "Usar Azure", "azureApiVersion": "Establecer versión de API de Azure", "gemini": { diff --git a/webview-ui/src/i18n/locales/es/welcome.json b/webview-ui/src/i18n/locales/es/welcome.json index 02e36a25723..b2289200a1c 100644 --- a/webview-ui/src/i18n/locales/es/welcome.json +++ b/webview-ui/src/i18n/locales/es/welcome.json @@ -3,12 +3,25 @@ "introduction": "Puedo realizar todo tipo de tareas gracias a los últimos avances en capacidades de codificación agentica y acceso a herramientas que me permiten crear y editar archivos, explorar proyectos complejos, usar el navegador y ejecutar comandos de terminal (con tu permiso, por supuesto). Incluso puedo usar MCP para crear nuevas herramientas y ampliar mis propias capacidades.", "notice": "Para comenzar, esta extensión necesita un proveedor de API.", "start": "¡Vamos!", + "chooseProvider": "Elige un proveedor de API para comenzar:", + "routers": { + "requesty": { + "description": "Tu router LLM optimizado", + "incentive": "$1 de crédito gratis" + }, + "openrouter": { + "description": "Una interfaz unificada para LLMs" + } + }, + "startRouter": "Configuración rápida a través de un router", + "startCustom": "Usa tu propia clave API", "telemetry": { "title": "Ayuda a mejorar Roo Code", "anonymousTelemetry": "Envía datos de uso y errores anónimos para ayudarnos a corregir errores y mejorar la extensión. Nunca se envía código, texto o información personal.", - "changeSettings": "Siempre puedes cambiar esto en la parte inferior de la configuración", + "changeSettings": "Siempre puedes cambiar esto en la parte inferior de la configuración", "settings": "configuración", "allow": "Permitir", "deny": "Denegar" - } + }, + "or": "o" } diff --git a/webview-ui/src/i18n/locales/fr/chat.json b/webview-ui/src/i18n/locales/fr/chat.json index da516362a77..5aa3490b9a6 100644 --- a/webview-ui/src/i18n/locales/fr/chat.json +++ b/webview-ui/src/i18n/locales/fr/chat.json @@ -107,10 +107,15 @@ }, "fileOperations": { "wantsToRead": "Roo veut lire ce fichier :", + "wantsToReadOutsideWorkspace": "Roo veut lire ce fichier en dehors de l'espace de travail :", "didRead": "Roo a lu ce fichier :", "wantsToEdit": "Roo veut éditer ce fichier :", + "wantsToEditOutsideWorkspace": "Roo veut éditer ce fichier en dehors de l'espace de travail :", "wantsToCreate": "Roo veut créer un nouveau fichier :" }, + "instructions": { + "wantsToFetch": "Roo veut récupérer des instructions détaillées pour aider à la tâche actuelle" + }, "directoryOperations": { "wantsToViewTopLevel": "Roo veut voir les fichiers de premier niveau dans ce répertoire :", "didViewTopLevel": "Roo a vu les fichiers de premier niveau dans ce répertoire :", diff --git a/webview-ui/src/i18n/locales/fr/common.json b/webview-ui/src/i18n/locales/fr/common.json index e55e852b3ff..2a10002acb4 100644 --- a/webview-ui/src/i18n/locales/fr/common.json +++ b/webview-ui/src/i18n/locales/fr/common.json @@ -1,7 +1,7 @@ { "number_format": { "thousand_suffix": "k", - "million_suffix": "M", - "billion_suffix": "Md" + "million_suffix": "m", + "billion_suffix": "b" } } diff --git a/webview-ui/src/i18n/locales/fr/prompts.json b/webview-ui/src/i18n/locales/fr/prompts.json index c4ac745b812..2cbb9713c9a 100644 --- a/webview-ui/src/i18n/locales/fr/prompts.json +++ b/webview-ui/src/i18n/locales/fr/prompts.json @@ -91,13 +91,13 @@ "TERMINAL_EXPLAIN": { "label": "Expliquer la commande du terminal", "description": "Obtenez des explications détaillées sur les commandes du terminal et leurs sorties. Disponible dans le menu contextuel du terminal (clic droit sur le contenu sélectionné du terminal)." + }, + "NEW_TASK": { + "label": "Démarrer une nouvelle tâche", + "description": "Démarre une nouvelle tâche avec ton entrée. Disponible dans la palette de commandes." } } }, - "customModeCreation": { - "enableTitle": "Activer la création de modes personnalisés via les prompts", - "description": "Lorsque cette option est activée, Roo vous permet de créer des modes personnalisés en utilisant des prompts comme 'Crée-moi un mode personnalisé qui...'. La désactivation réduit votre prompt système d'environ 700 tokens lorsque cette fonctionnalité n'est pas nécessaire. Lorsqu'elle est désactivée, vous pouvez toujours créer manuellement des modes personnalisés en utilisant le bouton + ci-dessus ou en modifiant le JSON de configuration associé." - }, "advancedSystemPrompt": { "title": "Avancé : Remplacer le prompt système", "description": "Vous pouvez complètement remplacer le prompt système pour ce mode (en dehors de la définition du rôle et des instructions personnalisées) en créant un fichier à .roo/system-prompt-{{slug}} dans votre espace de travail. Il s'agit d'une fonctionnalité très avancée qui contourne les garanties intégrées et les vérifications de cohérence (notamment concernant l'utilisation des outils), alors soyez prudent !" diff --git a/webview-ui/src/i18n/locales/fr/settings.json b/webview-ui/src/i18n/locales/fr/settings.json index 63a3c4be71e..ca4e6fc4945 100644 --- a/webview-ui/src/i18n/locales/fr/settings.json +++ b/webview-ui/src/i18n/locales/fr/settings.json @@ -35,12 +35,20 @@ "description": "Permettre à Roo d'effectuer automatiquement des opérations sans requérir d'approbation. Activez ces paramètres uniquement si vous faites entièrement confiance à l'IA et que vous comprenez les risques de sécurité associés.", "readOnly": { "label": "Toujours approuver les opérations en lecture seule", - "description": "Lorsque cette option est activée, Roo affichera automatiquement le contenu des répertoires et lira les fichiers sans que vous ayez à cliquer sur le bouton Approuver." + "description": "Lorsque cette option est activée, Roo affichera automatiquement le contenu des répertoires et lira les fichiers sans que vous ayez à cliquer sur le bouton Approuver.", + "outsideWorkspace": { + "label": "Inclure les fichiers en dehors de l'espace de travail", + "description": "Permettre à Roo de lire des fichiers en dehors de l'espace de travail actuel sans nécessiter d'approbation." + } }, "write": { "label": "Toujours approuver les opérations d'écriture", "description": "Créer et modifier automatiquement des fichiers sans nécessiter d'approbation", - "delayLabel": "Délai après les écritures pour permettre aux diagnostics de détecter les problèmes potentiels" + "delayLabel": "Délai après les écritures pour permettre aux diagnostics de détecter les problèmes potentiels", + "outsideWorkspace": { + "label": "Inclure les fichiers en dehors de l'espace de travail", + "description": "Permettre à Roo de créer et modifier des fichiers en dehors de l'espace de travail actuel sans nécessiter d'approbation." + } }, "browser": { "label": "Toujours approuver les actions du navigateur", @@ -267,8 +275,9 @@ "description": "Lorsque cette option est activée, les fichiers correspondant aux modèles dans .rooignore seront affichés dans les listes avec un symbole de cadenas. Lorsqu'elle est désactivée, ces fichiers seront complètement masqués des listes de fichiers et des recherches." }, "maxReadFile": { - "label": "Nombre maximum de lignes à lire depuis un fichier", - "description": "Nombre maximum de lignes à lire depuis un fichier à la fois. Des valeurs plus basses réduisent l'utilisation de contexte/ressources mais peuvent nécessiter plus de lectures pour les fichiers volumineux." + "label": "Seuil d'auto-troncature de lecture de fichier", + "description": "Le nombre par défaut de lignes à lire depuis un fichier en un lot. Des valeurs plus basses réduisent l'utilisation de contexte/ressources mais peuvent nécessiter plus de lectures pour les fichiers volumineux.", + "lines": "lignes" } }, "terminal": { @@ -349,6 +358,8 @@ "cacheReadsPrice": "Prix des lectures de cache", "cacheWritesPrice": "Prix des écritures de cache", "enableStreaming": "Activer le streaming", + "enableR1Format": "Activer les paramètres du modèle R1", + "enableR1FormatTips": "Doit être activé lors de l'utilisation de modèles R1 tels que QWQ, pour éviter l'erreur 400", "useAzure": "Utiliser Azure", "azureApiVersion": "Définir la version de l'API Azure", "gemini": { diff --git a/webview-ui/src/i18n/locales/fr/welcome.json b/webview-ui/src/i18n/locales/fr/welcome.json index 310c709fc94..ca2038a4f5a 100644 --- a/webview-ui/src/i18n/locales/fr/welcome.json +++ b/webview-ui/src/i18n/locales/fr/welcome.json @@ -1,14 +1,27 @@ { "greeting": "Salut, je suis Roo !", - "introduction": "Je peux effectuer toutes sortes de tâches grâce aux dernières avancées en matière de capacités de codage agentique et à l'accès à des outils qui me permettent de créer et de modifier des fichiers, d'explorer des projets complexes, d'utiliser le navigateur et d'exécuter des commandes terminal (avec votre permission, bien sûr). Je peux même utiliser MCP pour créer de nouveaux outils et étendre mes propres capacités.", + "introduction": "Je peux effectuer toutes sortes de tâches grâce aux dernières avancées en matière de capacités de codage agentique et à l'accès à des outils qui me permettent de créer et de modifier des fichiers, d'explorer des projets complexes, d'utiliser le navigateur et d'exécuter des commandes terminal (avec ta permission, bien sûr). Je peux même utiliser MCP pour créer de nouveaux outils et étendre mes propres capacités.", "notice": "Pour commencer, cette extension a besoin d'un fournisseur d'API.", "start": "C'est parti !", + "chooseProvider": "Choisis un fournisseur d'API pour commencer :", + "routers": { + "requesty": { + "description": "Ton routeur LLM optimisé", + "incentive": "1$ de crédit gratuit" + }, + "openrouter": { + "description": "Une interface unifiée pour les LLMs" + } + }, + "startRouter": "Configuration rapide via un routeur", + "startCustom": "Utiliser ta propre clé API", "telemetry": { - "title": "Aidez à améliorer Roo Code", - "anonymousTelemetry": "Envoyez des données d'utilisation et d'erreurs anonymes pour nous aider à corriger les bugs et améliorer l'extension. Aucun code, texte ou information personnelle n'est jamais envoyé.", - "changeSettings": "Vous pouvez toujours modifier cela en bas des paramètres", + "title": "Aide à améliorer Roo Code", + "anonymousTelemetry": "Envoie des données d'utilisation et d'erreurs anonymes pour nous aider à corriger les bugs et améliorer l'extension. Aucun code, texte ou information personnelle n'est jamais envoyé.", + "changeSettings": "Tu peux toujours modifier cela en bas des paramètres", "settings": "paramètres", "allow": "Autoriser", "deny": "Refuser" - } + }, + "or": "ou" } diff --git a/webview-ui/src/i18n/locales/hi/chat.json b/webview-ui/src/i18n/locales/hi/chat.json index bcd1ca43fff..0d00d2fd8d8 100644 --- a/webview-ui/src/i18n/locales/hi/chat.json +++ b/webview-ui/src/i18n/locales/hi/chat.json @@ -105,10 +105,15 @@ }, "current": "वर्तमान" }, + "instructions": { + "wantsToFetch": "Roo को वर्तमान कार्य में सहायता के लिए विस्तृत निर्देश प्राप्त करना है" + }, "fileOperations": { "wantsToRead": "Roo इस फ़ाइल को पढ़ना चाहता है:", + "wantsToReadOutsideWorkspace": "Roo कार्यक्षेत्र के बाहर इस फ़ाइल को पढ़ना चाहता है:", "didRead": "Roo ने इस फ़ाइल को पढ़ा:", "wantsToEdit": "Roo इस फ़ाइल को संपादित करना चाहता है:", + "wantsToEditOutsideWorkspace": "Roo कार्यक्षेत्र के बाहर इस फ़ाइल को संपादित करना चाहता है:", "wantsToCreate": "Roo एक नई फ़ाइल बनाना चाहता है:" }, "directoryOperations": { diff --git a/webview-ui/src/i18n/locales/hi/common.json b/webview-ui/src/i18n/locales/hi/common.json index b1a651ba2e5..2a10002acb4 100644 --- a/webview-ui/src/i18n/locales/hi/common.json +++ b/webview-ui/src/i18n/locales/hi/common.json @@ -1,7 +1,7 @@ { "number_format": { - "thousand_suffix": "ह", - "million_suffix": "लाख", - "billion_suffix": "अरब" + "thousand_suffix": "k", + "million_suffix": "m", + "billion_suffix": "b" } } diff --git a/webview-ui/src/i18n/locales/hi/prompts.json b/webview-ui/src/i18n/locales/hi/prompts.json index c0c83afc2f3..196fc6dbf53 100644 --- a/webview-ui/src/i18n/locales/hi/prompts.json +++ b/webview-ui/src/i18n/locales/hi/prompts.json @@ -91,13 +91,13 @@ "TERMINAL_EXPLAIN": { "label": "टर्मिनल कमांड समझाएँ", "description": "टर्मिनल कमांड और उनके आउटपुट के विस्तृत स्पष्टीकरण प्राप्त करें। टर्मिनल के कंटेक्स्ट मेनू (चयनित टर्मिनल सामग्री पर राइट-क्लिक) में उपलब्ध है।" + }, + "NEW_TASK": { + "label": "नया कार्य शुरू करें", + "description": "इनपुट के साथ नया कार्य शुरू करें। कमांड पैलेट में उपलब्ध है।" } } }, - "customModeCreation": { - "enableTitle": "प्रॉम्प्ट्स के माध्यम से कस्टम मोड निर्माण सक्षम करें", - "description": "सक्षम होने पर, Roo आपको 'मेरे लिए एक कस्टम मोड बनाएँ जो...' जैसे प्रॉम्प्ट्स का उपयोग करके कस्टम मोड बनाने की अनुमति देता है। इस सुविधा की आवश्यकता न होने पर इसे अक्षम करने से आपका सिस्टम प्रॉम्प्ट लगभग 700 token कम हो जाता है। अक्षम होने पर भी आप ऊपर दिए गए + बटन का उपयोग करके या संबंधित कॉन्फिग JSON को संपादित करके मैन्युअल रूप से कस्टम मोड बना सकते हैं।" - }, "advancedSystemPrompt": { "title": "उन्नत: सिस्टम प्रॉम्प्ट ओवरराइड करें", "description": "आप अपने वर्कस्पेस में .roo/system-prompt-{{slug}} पर एक फाइल बनाकर इस मोड के लिए सिस्टम प्रॉम्प्ट को पूरी तरह से बदल सकते हैं (भूमिका परिभाषा और कस्टम निर्देशों को छोड़कर)। यह एक बहुत उन्नत सुविधा है जो अंतर्निहित सुरक्षा उपायों और सामंजस्यता जांचों को बायपास करती है (विशेष रूप से टूल उपयोग के आसपास), इसलिए सावधान रहें!" diff --git a/webview-ui/src/i18n/locales/hi/settings.json b/webview-ui/src/i18n/locales/hi/settings.json index ba0461071f4..b60bf6c72ee 100644 --- a/webview-ui/src/i18n/locales/hi/settings.json +++ b/webview-ui/src/i18n/locales/hi/settings.json @@ -35,12 +35,20 @@ "description": "Roo को अनुमोदन की आवश्यकता के बिना स्वचालित रूप से ऑपरेशन करने की अनुमति दें। इन सेटिंग्स को केवल तभी सक्षम करें जब आप AI पर पूरी तरह से भरोसा करते हों और संबंधित सुरक्षा जोखिमों को समझते हों।", "readOnly": { "label": "केवल पढ़ने वाले ऑपरेशन हमेशा अनुमोदित करें", - "description": "जब सक्षम होता है, तो Roo आपके अनुमोदित बटन पर क्लिक किए बिना स्वचालित रूप से निर्देशिका सामग्री देखेगा और फाइलें पढ़ेगा।" + "description": "जब सक्षम होता है, तो Roo आपके अनुमोदित बटन पर क्लिक किए बिना स्वचालित रूप से निर्देशिका सामग्री देखेगा और फाइलें पढ़ेगा।", + "outsideWorkspace": { + "label": "वर्कस्पेस के बाहर की फाइलें शामिल करें", + "description": "Roo को अनुमोदन की आवश्यकता के बिना वर्तमान वर्कस्पेस के बाहर की फाइलें पढ़ने की अनुमति दें।" + } }, "write": { "label": "लिखने वाले ऑपरेशन हमेशा अनुमोदित करें", "description": "अनुमोदन की आवश्यकता के बिना स्वचालित रूप से फाइलें बनाएँ और संपादित करें", - "delayLabel": "लिखने के बाद विलंब ताकि डायग्नोस्टिक संभावित समस्याओं का पता लगा सकें" + "delayLabel": "लिखने के बाद विलंब ताकि डायग्नोस्टिक संभावित समस्याओं का पता लगा सकें", + "outsideWorkspace": { + "label": "वर्कस्पेस के बाहर की फाइलें शामिल करें", + "description": "Roo को अनुमोदन की आवश्यकता के बिना वर्तमान वर्कस्पेस के बाहर फाइलें बनाने और संपादित करने की अनुमति दें।" + } }, "browser": { "label": "ब्राउज़र क्रियाएँ हमेशा अनुमोदित करें", @@ -267,8 +275,9 @@ "description": "जब सक्षम होता है, .rooignore में पैटर्न से मेल खाने वाली फाइलें लॉक प्रतीक के साथ सूचियों में दिखाई जाएंगी। जब अक्षम होता है, ये फाइलें फाइल सूचियों और खोजों से पूरी तरह छिपा दी जाएंगी।" }, "maxReadFile": { - "label": "फ़ाइल से पढ़ने के लिए अधिकतम लाइनें", - "description": "फ़ाइल से एक बार में पढ़ने के लिए अधिकतम लाइनों की संख्या। कम मान संदर्भ/संसाधन उपयोग को कम करते हैं लेकिन बड़ी फाइलों के लिए अधिक पठन की आवश्यकता हो सकती है।" + "label": "फ़ाइल पढ़ने का स्वचालित काटने की सीमा", + "description": "एक बैच में फ़ाइल से पढ़ने के लिए डिफ़ॉल्ट लाइनों की संख्या। कम मान संदर्भ/संसाधन उपयोग को कम करते हैं लेकिन बड़ी फाइलों के लिए अधिक पठन की आवश्यकता हो सकती है।", + "lines": "पंक्तियाँ" } }, "terminal": { @@ -349,6 +358,8 @@ "cacheReadsPrice": "कैश रीड्स मूल्य", "cacheWritesPrice": "कैश राइट्स मूल्य", "enableStreaming": "स्ट्रीमिंग सक्षम करें", + "enableR1Format": "R1 मॉडल पैरामीटर सक्षम करें", + "enableR1FormatTips": "QWQ जैसी R1 मॉडलों का उपयोग करते समय इसे सक्षम करना आवश्यक है, ताकि 400 त्रुटि से बचा जा सके", "useAzure": "Azure का उपयोग करें", "azureApiVersion": "Azure API संस्करण सेट करें", "gemini": { diff --git a/webview-ui/src/i18n/locales/hi/welcome.json b/webview-ui/src/i18n/locales/hi/welcome.json index 1e78c71cc16..6ec08c646b7 100644 --- a/webview-ui/src/i18n/locales/hi/welcome.json +++ b/webview-ui/src/i18n/locales/hi/welcome.json @@ -3,12 +3,25 @@ "introduction": "मैं सभी प्रकार के कार्य कर सकता हूँ, एजेंटिक कोडिंग क्षमताओं में नवीनतम सफलताओं और उन टूल्स तक पहुंच के लिए धन्यवाद जो मुझे फाइलें बनाने और संपादित करने, जटिल परियोजनाओं का पता लगाने, ब्राउज़र का उपयोग करने और टर्मिनल कमांड निष्पादित करने की अनुमति देते हैं (आपकी अनुमति से, बिल्कुल)। मैं MCP का उपयोग करके नए टूल बना सकता हूँ और अपनी क्षमताओं का विस्तार कर सकता हूँ।", "notice": "शुरू करने के लिए, इस एक्सटेंशन को एक API प्रदाता की आवश्यकता है।", "start": "चलो शुरू करें!", + "chooseProvider": "शुरू करने के लिए एक API प्रदाता चुनें:", + "routers": { + "requesty": { + "description": "आपका अनुकूलित LLM राउटर", + "incentive": "$1 मुफ्त क्रेडिट" + }, + "openrouter": { + "description": "LLMs के लिए एक एकीकृत इंटरफेस" + } + }, + "startRouter": "राउटर के माध्यम से तेज़ सेटअप", + "startCustom": "अपनी खुद की API कुंजी का उपयोग करें", "telemetry": { "title": "Roo Code को बेहतर बनाने में मदद करें", "anonymousTelemetry": "बग ठीक करने और एक्सटेंशन को बेहतर बनाने में हमारी मदद करने के लिए गुमनाम त्रुटि और उपयोग डेटा भेजें। कोड, संकेत या व्यक्तिगत जानकारी कभी नहीं भेजी जाती है।", - "changeSettings": "आप इसे हमेशा सेटिंग्स के निचले भाग में बदल सकते हैं", + "changeSettings": "आप इसे हमेशा सेटिंग्स के निचले भाग में बदल सकते हैं", "settings": "सेटिंग्स", "allow": "अनुमति दें", "deny": "अस्वीकार करें" - } + }, + "or": "या" } diff --git a/webview-ui/src/i18n/locales/it/chat.json b/webview-ui/src/i18n/locales/it/chat.json index fea9861c85b..e21a82da0d9 100644 --- a/webview-ui/src/i18n/locales/it/chat.json +++ b/webview-ui/src/i18n/locales/it/chat.json @@ -80,6 +80,9 @@ "separator": "Separatore", "edit": "Modifica...", "forNextMode": "per la prossima modalità", + "instructions": { + "wantsToFetch": "Roo vuole recuperare istruzioni dettagliate per aiutare con l'attività corrente" + }, "error": "Errore", "troubleMessage": "Roo sta avendo problemi...", "apiRequest": { @@ -107,8 +110,10 @@ }, "fileOperations": { "wantsToRead": "Roo vuole leggere questo file:", + "wantsToReadOutsideWorkspace": "Roo vuole leggere questo file al di fuori dell'area di lavoro:", "didRead": "Roo ha letto questo file:", "wantsToEdit": "Roo vuole modificare questo file:", + "wantsToEditOutsideWorkspace": "Roo vuole modificare questo file al di fuori dell'area di lavoro:", "wantsToCreate": "Roo vuole creare un nuovo file:" }, "directoryOperations": { diff --git a/webview-ui/src/i18n/locales/it/common.json b/webview-ui/src/i18n/locales/it/common.json index c010b119567..2a10002acb4 100644 --- a/webview-ui/src/i18n/locales/it/common.json +++ b/webview-ui/src/i18n/locales/it/common.json @@ -1,7 +1,7 @@ { "number_format": { "thousand_suffix": "k", - "million_suffix": "Mln", - "billion_suffix": "Mld" + "million_suffix": "m", + "billion_suffix": "b" } } diff --git a/webview-ui/src/i18n/locales/it/prompts.json b/webview-ui/src/i18n/locales/it/prompts.json index 15d52b65d89..bf29bc6184c 100644 --- a/webview-ui/src/i18n/locales/it/prompts.json +++ b/webview-ui/src/i18n/locales/it/prompts.json @@ -91,13 +91,13 @@ "TERMINAL_EXPLAIN": { "label": "Spiega comando del terminale", "description": "Ottieni spiegazioni dettagliate sui comandi del terminale e sui loro output. Disponibile nel menu contestuale del terminale (clic destro sul contenuto selezionato del terminale)." + }, + "NEW_TASK": { + "label": "Avvia nuova attività", + "description": "Avvia una nuova attività con il tuo input. Disponibile nella palette dei comandi." } } }, - "customModeCreation": { - "enableTitle": "Abilita creazione di modalità personalizzate tramite prompt", - "description": "Quando abilitato, Roo ti permette di creare modalità personalizzate usando prompt come 'Crea una modalità personalizzata che...'. Disabilitarlo riduce il tuo prompt di sistema di circa 700 token quando questa funzionalità non è necessaria. Quando disabilitato, puoi comunque creare manualmente modalità personalizzate usando il pulsante + sopra o modificando il JSON di configurazione correlato." - }, "advancedSystemPrompt": { "title": "Avanzato: Sovrascrivi prompt di sistema", "description": "Puoi sostituire completamente il prompt di sistema per questa modalità (a parte la definizione del ruolo e le istruzioni personalizzate) creando un file in .roo/system-prompt-{{slug}} nel tuo spazio di lavoro. Questa è una funzionalità molto avanzata che bypassa le protezioni integrate e i controlli di coerenza (specialmente riguardo all'uso degli strumenti), quindi fai attenzione!" diff --git a/webview-ui/src/i18n/locales/it/settings.json b/webview-ui/src/i18n/locales/it/settings.json index 4d5ea142a22..fe849f4ea41 100644 --- a/webview-ui/src/i18n/locales/it/settings.json +++ b/webview-ui/src/i18n/locales/it/settings.json @@ -35,12 +35,20 @@ "description": "Permetti a Roo di eseguire automaticamente operazioni senza richiedere approvazione. Abilita queste impostazioni solo se ti fidi completamente dell'IA e comprendi i rischi di sicurezza associati.", "readOnly": { "label": "Approva sempre operazioni di sola lettura", - "description": "Quando abilitato, Roo visualizzerà automaticamente i contenuti della directory e leggerà i file senza richiedere di cliccare sul pulsante Approva." + "description": "Quando abilitato, Roo visualizzerà automaticamente i contenuti della directory e leggerà i file senza richiedere di cliccare sul pulsante Approva.", + "outsideWorkspace": { + "label": "Includi file al di fuori dell'area di lavoro", + "description": "Permetti a Roo di leggere file al di fuori dell'area di lavoro attuale senza richiedere approvazione." + } }, "write": { "label": "Approva sempre operazioni di scrittura", "description": "Crea e modifica automaticamente i file senza richiedere approvazione", - "delayLabel": "Ritardo dopo le scritture per consentire alla diagnostica di rilevare potenziali problemi" + "delayLabel": "Ritardo dopo le scritture per consentire alla diagnostica di rilevare potenziali problemi", + "outsideWorkspace": { + "label": "Includi file al di fuori dell'area di lavoro", + "description": "Permetti a Roo di creare e modificare file al di fuori dell'area di lavoro attuale senza richiedere approvazione." + } }, "browser": { "label": "Approva sempre azioni del browser", @@ -267,8 +275,9 @@ "description": "Quando abilitato, i file che corrispondono ai pattern in .rooignore verranno mostrati negli elenchi con un simbolo di blocco. Quando disabilitato, questi file saranno completamente nascosti dagli elenchi di file e dalle ricerche." }, "maxReadFile": { - "label": "Numero massimo di righe da leggere da un file", - "description": "Numero massimo di righe da leggere da un file alla volta. Valori più bassi riducono l'utilizzo di contesto/risorse ma potrebbero richiedere più letture per file di grandi dimensioni." + "label": "Soglia di auto-troncamento lettura file", + "description": "Il numero predefinito di righe da leggere da un file in un singolo batch. Valori più bassi riducono l'utilizzo di contesto/risorse ma potrebbero richiedere più letture per file di grandi dimensioni.", + "lines": "righe" } }, "terminal": { @@ -349,6 +358,8 @@ "cacheReadsPrice": "Prezzo letture cache", "cacheWritesPrice": "Prezzo scritture cache", "enableStreaming": "Abilita streaming", + "enableR1Format": "Abilita i parametri del modello R1", + "enableR1FormatTips": "Deve essere abilitato quando si utilizzano modelli R1 come QWQ, per evitare l'errore 400", "useAzure": "Usa Azure", "azureApiVersion": "Imposta versione API Azure", "gemini": { diff --git a/webview-ui/src/i18n/locales/it/welcome.json b/webview-ui/src/i18n/locales/it/welcome.json index 5271886a240..94dba7c2e90 100644 --- a/webview-ui/src/i18n/locales/it/welcome.json +++ b/webview-ui/src/i18n/locales/it/welcome.json @@ -3,12 +3,25 @@ "introduction": "Posso svolgere tutti i tipi di attività grazie ai più recenti progressi nelle capacità di codifica agentica e all'accesso a strumenti che mi permettono di creare e modificare file, esplorare progetti complessi, utilizzare il browser ed eseguire comandi terminal (con il tuo permesso, ovviamente). Posso persino utilizzare MCP per creare nuovi strumenti ed estendere le mie capacità.", "notice": "Per iniziare, questa estensione necessita di un fornitore di API.", "start": "Andiamo!", + "chooseProvider": "Scegli un fornitore di API per iniziare:", + "routers": { + "requesty": { + "description": "Il tuo router LLM ottimizzato", + "incentive": "$1 di credito gratuito" + }, + "openrouter": { + "description": "Un'interfaccia unificata per LLMs" + } + }, + "startRouter": "Configurazione rapida tramite router", + "startCustom": "Usa la tua chiave API", "telemetry": { "title": "Aiuta a migliorare Roo Code", "anonymousTelemetry": "Invia dati di utilizzo ed errori anonimi per aiutarci a correggere bug e migliorare l'estensione. Non viene mai inviato codice, testo o informazioni personali.", - "changeSettings": "Puoi sempre cambiare questo in fondo alle impostazioni", + "changeSettings": "Puoi sempre cambiare questo in fondo alle impostazioni", "settings": "impostazioni", "allow": "Consenti", "deny": "Nega" - } + }, + "or": "o" } diff --git a/webview-ui/src/i18n/locales/ja/chat.json b/webview-ui/src/i18n/locales/ja/chat.json index 766d8797ddb..9b82e56001d 100644 --- a/webview-ui/src/i18n/locales/ja/chat.json +++ b/webview-ui/src/i18n/locales/ja/chat.json @@ -105,10 +105,15 @@ }, "current": "現在" }, + "instructions": { + "wantsToFetch": "Rooは現在のタスクを支援するための詳細な指示を取得したい" + }, "fileOperations": { "wantsToRead": "Rooはこのファイルを読みたい:", + "wantsToReadOutsideWorkspace": "Rooはワークスペース外のこのファイルを読みたい:", "didRead": "Rooはこのファイルを読みました:", "wantsToEdit": "Rooはこのファイルを編集したい:", + "wantsToEditOutsideWorkspace": "Rooはワークスペース外のこのファイルを編集したい:", "wantsToCreate": "Rooは新しいファイルを作成したい:" }, "directoryOperations": { diff --git a/webview-ui/src/i18n/locales/ja/common.json b/webview-ui/src/i18n/locales/ja/common.json index b76d0c03a93..2a10002acb4 100644 --- a/webview-ui/src/i18n/locales/ja/common.json +++ b/webview-ui/src/i18n/locales/ja/common.json @@ -1,7 +1,7 @@ { "number_format": { "thousand_suffix": "k", - "million_suffix": "M", - "billion_suffix": "B" + "million_suffix": "m", + "billion_suffix": "b" } } diff --git a/webview-ui/src/i18n/locales/ja/prompts.json b/webview-ui/src/i18n/locales/ja/prompts.json index 87059150d73..7199c31d47c 100644 --- a/webview-ui/src/i18n/locales/ja/prompts.json +++ b/webview-ui/src/i18n/locales/ja/prompts.json @@ -91,13 +91,13 @@ "TERMINAL_EXPLAIN": { "label": "ターミナルコマンドを説明", "description": "ターミナルコマンドとその出力の詳細な説明を得ることができます。ターミナルのコンテキストメニュー(選択したターミナルの内容で右クリック)から利用できます。" + }, + "NEW_TASK": { + "label": "新しいタスクを開始", + "description": "入力内容で新しいタスクを開始できます。コマンドパレットから利用できます。" } } }, - "customModeCreation": { - "enableTitle": "プロンプトを通じたカスタムモード作成を有効にする", - "description": "有効にすると、Rooは「~するカスタムモードを作成して」のようなプロンプトを使用してカスタムモードを作成できます。無効にすると、この機能が不要な場合、システムプロンプトが約700トークン削減されます。無効にしても、上記の+ボタンを使用するか、関連する設定JSONを編集して手動でカスタムモードを作成できます。" - }, "advancedSystemPrompt": { "title": "詳細設定:システムプロンプトの上書き", "description": "ワークスペースの.roo/system-prompt-{{slug}}にファイルを作成することで、このモードのシステムプロンプト(役割定義とカスタム指示以外)を完全に置き換えることができます。これは組み込みの安全対策と一貫性チェック(特にツールの使用に関して)をバイパスする非常に高度な機能なので、注意して使用してください!" diff --git a/webview-ui/src/i18n/locales/ja/settings.json b/webview-ui/src/i18n/locales/ja/settings.json index 21a2f5410eb..ec195a3ace3 100644 --- a/webview-ui/src/i18n/locales/ja/settings.json +++ b/webview-ui/src/i18n/locales/ja/settings.json @@ -35,12 +35,20 @@ "description": "Rooが承認なしで自動的に操作を実行できるようにします。AIを完全に信頼し、関連するセキュリティリスクを理解している場合にのみ、これらの設定を有効にしてください。", "readOnly": { "label": "読み取り専用操作を常に承認", - "description": "有効にすると、Rooは承認ボタンをクリックすることなく、自動的にディレクトリの内容を表示してファイルを読み取ります。" + "description": "有効にすると、Rooは承認ボタンをクリックすることなく、自動的にディレクトリの内容を表示してファイルを読み取ります。", + "outsideWorkspace": { + "label": "ワークスペース外のファイルを含める", + "description": "Rooが承認なしで現在のワークスペース外のファイルを読み取ることを許可します。" + } }, "write": { "label": "書き込み操作を常に承認", "description": "承認なしで自動的にファイルを作成・編集", - "delayLabel": "診断が潜在的な問題を検出できるよう、書き込み後に遅延を設ける" + "delayLabel": "診断が潜在的な問題を検出できるよう、書き込み後に遅延を設ける", + "outsideWorkspace": { + "label": "ワークスペース外のファイルを含める", + "description": "Rooが承認なしで現在のワークスペース外のファイルを作成・編集することを許可します。" + } }, "browser": { "label": "ブラウザアクションを常に承認", @@ -267,8 +275,9 @@ "description": "有効にすると、.rooignoreのパターンに一致するファイルがロックシンボル付きでリストに表示されます。無効にすると、これらのファイルはファイルリストや検索から完全に非表示になります。" }, "maxReadFile": { - "label": "ファイルから読み込む最大行数", - "description": "一度にファイルから読み込む最大行数。低い値はコンテキスト/リソース使用量を減らしますが、大きなファイルではより多くの読み込みが必要になる場合があります。" + "label": "ファイル読み込み自動切り詰めしきい値", + "description": "一括でファイルから読み込むデフォルトの行数。低い値はコンテキスト/リソース使用量を減らしますが、大きなファイルではより多くの読み込みが必要になる場合があります。", + "lines": "行" } }, "terminal": { @@ -349,6 +358,8 @@ "cacheReadsPrice": "キャッシュ読み取り価格", "cacheWritesPrice": "キャッシュ書き込み価格", "enableStreaming": "ストリーミングを有効化", + "enableR1Format": "R1モデルパラメータを有効にする", + "enableR1FormatTips": "QWQなどのR1モデルを使用する際には、有効にする必要があります。400エラーを防ぐために", "useAzure": "Azureを使用", "azureApiVersion": "Azure APIバージョンを設定", "gemini": { diff --git a/webview-ui/src/i18n/locales/ja/welcome.json b/webview-ui/src/i18n/locales/ja/welcome.json index 835d3e4de7f..6b614d3dd20 100644 --- a/webview-ui/src/i18n/locales/ja/welcome.json +++ b/webview-ui/src/i18n/locales/ja/welcome.json @@ -3,12 +3,25 @@ "introduction": "エージェント型コーディング能力の最新の進歩と、ファイルの作成・編集、複雑なプロジェクトの探索、ブラウザの使用、ターミナルコマンドの実行(もちろんあなたの許可を得て)を可能にするツールへのアクセスにより、あらゆる種類のタスクを実行できます。MCPを使用して新しいツールを作成し、自分の能力を拡張することもできます。", "notice": "開始するには、この拡張機能にはAPIプロバイダーが必要です。", "start": "さあ、始めましょう!", + "chooseProvider": "開始するにはAPIプロバイダーを選択してください:", + "routers": { + "requesty": { + "description": "最適化されたLLMルーター", + "incentive": "$1の無料クレジット" + }, + "openrouter": { + "description": "LLMsのための統一インターフェース" + } + }, + "startRouter": "ルーター経由の簡単セットアップ", + "startCustom": "自分のAPIキーを使用", "telemetry": { "title": "Roo Codeの改善にご協力ください", "anonymousTelemetry": "バグの修正と拡張機能の改善のため、匿名のエラーと使用データを送信してください。コード、プロンプト、個人情報は一切送信されません。", - "changeSettings": "設定の下部でいつでも変更できます", + "changeSettings": "設定の下部でいつでも変更できます", "settings": "設定", "allow": "許可", "deny": "拒否" - } + }, + "or": "または" } diff --git a/webview-ui/src/i18n/locales/ko/chat.json b/webview-ui/src/i18n/locales/ko/chat.json index db49282dd98..c1b288e39b3 100644 --- a/webview-ui/src/i18n/locales/ko/chat.json +++ b/webview-ui/src/i18n/locales/ko/chat.json @@ -105,10 +105,15 @@ }, "current": "현재" }, + "instructions": { + "wantsToFetch": "Roo는 현재 작업을 지원하기 위해 자세한 지침을 가져오려고 합니다" + }, "fileOperations": { "wantsToRead": "Roo가 이 파일을 읽고 싶어합니다:", + "wantsToReadOutsideWorkspace": "Roo가 워크스페이스 외부의 이 파일을 읽고 싶어합니다:", "didRead": "Roo가 이 파일을 읽었습니다:", "wantsToEdit": "Roo가 이 파일을 편집하고 싶어합니다:", + "wantsToEditOutsideWorkspace": "Roo가 워크스페이스 외부의 이 파일을 편집하고 싶어합니다:", "wantsToCreate": "Roo가 새 파일을 만들고 싶어합니다:" }, "directoryOperations": { diff --git a/webview-ui/src/i18n/locales/ko/common.json b/webview-ui/src/i18n/locales/ko/common.json index 4ee4c67efd1..2a10002acb4 100644 --- a/webview-ui/src/i18n/locales/ko/common.json +++ b/webview-ui/src/i18n/locales/ko/common.json @@ -1,7 +1,7 @@ { "number_format": { - "thousand_suffix": "천", - "million_suffix": "백만", - "billion_suffix": "십억" + "thousand_suffix": "k", + "million_suffix": "m", + "billion_suffix": "b" } } diff --git a/webview-ui/src/i18n/locales/ko/prompts.json b/webview-ui/src/i18n/locales/ko/prompts.json index d07a0de3c7d..b637c0db313 100644 --- a/webview-ui/src/i18n/locales/ko/prompts.json +++ b/webview-ui/src/i18n/locales/ko/prompts.json @@ -91,13 +91,13 @@ "TERMINAL_EXPLAIN": { "label": "터미널 명령 설명", "description": "터미널 명령과 그 출력에 대한 상세한 설명을 얻을 수 있습니다. 터미널 컨텍스트 메뉴(선택한 터미널 콘텐츠에서 우클릭)에서 이용 가능합니다." + }, + "NEW_TASK": { + "label": "새 작업 시작", + "description": "입력한 내용으로 새 작업을 시작할 수 있습니다. 명령 팔레트에서 이용 가능합니다." } } }, - "customModeCreation": { - "enableTitle": "프롬프트를 통한 커스텀 모드 생성 활성화", - "description": "활성화하면 Roo를 통해 '...하는 커스텀 모드를 만들어줘'와 같은 프롬프트를 사용하여 커스텀 모드를 생성할 수 있습니다. 이 기능이 필요하지 않을 때 비활성화하면 시스템 프롬프트가 약 700 token 감소합니다. 비활성화해도 위의 + 버튼을 사용하거나 관련 구성 JSON을 편집하여 수동으로 커스텀 모드를 생성할 수 있습니다." - }, "advancedSystemPrompt": { "title": "고급: 시스템 프롬프트 재정의", "description": "작업 공간의 .roo/system-prompt-{{slug}}에 파일을 생성하여 이 모드의 시스템 프롬프트(역할 정의 및 사용자 지정 지침 제외)를 완전히 대체할 수 있습니다. 이는 내장된 안전 장치와 일관성 검사(특히 도구 사용 관련)를 우회하는 매우 고급 기능이므로 주의하세요!" diff --git a/webview-ui/src/i18n/locales/ko/settings.json b/webview-ui/src/i18n/locales/ko/settings.json index 54debd390fc..d83111b89e8 100644 --- a/webview-ui/src/i18n/locales/ko/settings.json +++ b/webview-ui/src/i18n/locales/ko/settings.json @@ -35,12 +35,20 @@ "description": "Roo가 승인 없이 자동으로 작업을 수행할 수 있도록 허용합니다. AI를 완전히 신뢰하고 관련 보안 위험을 이해하는 경우에만 이러한 설정을 활성화하세요.", "readOnly": { "label": "읽기 전용 작업 항상 승인", - "description": "활성화되면 Roo는 승인 버튼을 클릭하지 않고도 자동으로 디렉토리 내용을 보고 파일을 읽습니다." + "description": "활성화되면 Roo는 승인 버튼을 클릭하지 않고도 자동으로 디렉토리 내용을 보고 파일을 읽습니다.", + "outsideWorkspace": { + "label": "워크스페이스 외부 파일 포함", + "description": "Roo가 승인 없이 현재 워크스페이스 외부의 파일을 읽을 수 있도록 허용합니다." + } }, "write": { "label": "쓰기 작업 항상 승인", "description": "승인 없이 자동으로 파일 생성 및 편집", - "delayLabel": "진단이 잠재적 문제를 감지할 수 있도록 쓰기 후 지연" + "delayLabel": "진단이 잠재적 문제를 감지할 수 있도록 쓰기 후 지연", + "outsideWorkspace": { + "label": "워크스페이스 외부 파일 포함", + "description": "Roo가 승인 없이 현재 워크스페이스 외부의 파일을 생성하고 편집할 수 있도록 허용합니다." + } }, "browser": { "label": "브라우저 작업 항상 승인", @@ -267,8 +275,9 @@ "description": "활성화되면 .rooignore의 패턴과 일치하는 파일이 잠금 기호와 함께 목록에 표시됩니다. 비활성화되면 이러한 파일은 파일 목록 및 검색에서 완전히 숨겨집니다." }, "maxReadFile": { - "label": "파일에서 읽을 최대 라인 수", - "description": "한 번에 파일에서 읽을 최대 라인 수. 낮은 값은 컨텍스트/리소스 사용량을 줄이지만 대용량 파일의 경우 더 많은 읽기가 필요할 수 있습니다." + "label": "파일 읽기 자동 축소 임계값", + "description": "한 번에 파일에서 읽을 기본 라인 수. 낮은 값은 컨텍스트/리소스 사용량을 줄이지만 대용량 파일의 경우 더 많은 읽기가 필요할 수 있습니다.", + "lines": "줄" } }, "terminal": { @@ -349,6 +358,8 @@ "cacheReadsPrice": "캐시 읽기 가격", "cacheWritesPrice": "캐시 쓰기 가격", "enableStreaming": "스트리밍 활성화", + "enableR1Format": "R1 모델 매개변수 활성화", + "enableR1FormatTips": "QWQ와 같은 R1 모델을 사용할 때 활성화해야 하며, 400 오류를 방지합니다", "useAzure": "Azure 사용", "azureApiVersion": "Azure API 버전 설정", "gemini": { diff --git a/webview-ui/src/i18n/locales/ko/welcome.json b/webview-ui/src/i18n/locales/ko/welcome.json index af9e1dc4994..83eb000af1b 100644 --- a/webview-ui/src/i18n/locales/ko/welcome.json +++ b/webview-ui/src/i18n/locales/ko/welcome.json @@ -3,12 +3,25 @@ "introduction": "에이전트 코딩 능력의 최신 발전과 파일 생성 및 편집, 복잡한 프로젝트 탐색, 브라우저 사용, 터미널 명령 실행(물론 사용자의 허락 하에)을 가능하게 하는 도구에 대한 접근 덕분에 모든 종류의 작업을 수행할 수 있습니다. MCP를 사용하여 새로운 도구를 만들고 제 능력을 확장할 수도 있습니다.", "notice": "시작하려면 이 확장 프로그램에 API 공급자가 필요합니다.", "start": "시작해 봅시다!", + "chooseProvider": "시작하려면 API 공급자를 선택하세요:", + "routers": { + "requesty": { + "description": "최적화된 LLM 라우터", + "incentive": "$1 무료 크레딧" + }, + "openrouter": { + "description": "LLM을 위한 통합 인터페이스" + } + }, + "startRouter": "라우터를 통한 빠른 설정", + "startCustom": "직접 API 키 사용하기", "telemetry": { "title": "Roo Code 개선에 도움 주세요", "anonymousTelemetry": "버그 수정 및 확장 기능 개선을 위해 익명의 오류 및 사용 데이터를 보내주세요. 코드, 프롬프트 또는 개인 정보는 절대 전송되지 않습니다.", - "changeSettings": "설정 하단에서 언제든지 변경할 수 있습니다", + "changeSettings": "설정 하단에서 언제든지 변경할 수 있습니다", "settings": "설정", "allow": "허용", "deny": "거부" - } + }, + "or": "또는" } diff --git a/webview-ui/src/i18n/locales/pl/chat.json b/webview-ui/src/i18n/locales/pl/chat.json index 96cd92f7c2f..846534c5598 100644 --- a/webview-ui/src/i18n/locales/pl/chat.json +++ b/webview-ui/src/i18n/locales/pl/chat.json @@ -105,10 +105,15 @@ }, "current": "Bieżący" }, + "instructions": { + "wantsToFetch": "Roo chce pobrać szczegółowe instrukcje, aby pomóc w bieżącym zadaniu" + }, "fileOperations": { "wantsToRead": "Roo chce przeczytać ten plik:", + "wantsToReadOutsideWorkspace": "Roo chce przeczytać ten plik poza obszarem roboczym:", "didRead": "Roo przeczytał ten plik:", "wantsToEdit": "Roo chce edytować ten plik:", + "wantsToEditOutsideWorkspace": "Roo chce edytować ten plik poza obszarem roboczym:", "wantsToCreate": "Roo chce utworzyć nowy plik:" }, "directoryOperations": { diff --git a/webview-ui/src/i18n/locales/pl/common.json b/webview-ui/src/i18n/locales/pl/common.json index e020754bf2d..2a10002acb4 100644 --- a/webview-ui/src/i18n/locales/pl/common.json +++ b/webview-ui/src/i18n/locales/pl/common.json @@ -1,7 +1,7 @@ { "number_format": { - "thousand_suffix": "tys.", - "million_suffix": "mln", - "billion_suffix": "mld" + "thousand_suffix": "k", + "million_suffix": "m", + "billion_suffix": "b" } } diff --git a/webview-ui/src/i18n/locales/pl/prompts.json b/webview-ui/src/i18n/locales/pl/prompts.json index 1ea10ea1412..f8393ea31ea 100644 --- a/webview-ui/src/i18n/locales/pl/prompts.json +++ b/webview-ui/src/i18n/locales/pl/prompts.json @@ -91,13 +91,13 @@ "TERMINAL_EXPLAIN": { "label": "Wyjaśnij polecenie terminala", "description": "Uzyskaj szczegółowe wyjaśnienia poleceń terminala i ich wyników. Dostępne w menu kontekstowym terminala (prawy przycisk myszy na wybranej zawartości terminala)." + }, + "NEW_TASK": { + "label": "Rozpocznij nowe zadanie", + "description": "Rozpocznij nowe zadanie z wprowadzonymi danymi. Dostępne w palecie poleceń." } } }, - "customModeCreation": { - "enableTitle": "Włącz tworzenie niestandardowych trybów przez podpowiedzi", - "description": "Gdy włączone, Roo pozwala na tworzenie niestandardowych trybów za pomocą podpowiedzi takich jak 'Stwórz dla mnie niestandardowy tryb, który...'. Wyłączenie tej opcji zmniejsza podpowiedź systemową o około 700 tokenów, gdy ta funkcja nie jest potrzebna. Po wyłączeniu nadal możesz ręcznie tworzyć niestandardowe tryby za pomocą przycisku + powyżej lub edytując powiązany plik konfiguracyjny JSON." - }, "advancedSystemPrompt": { "title": "Zaawansowane: Zastąp podpowiedź systemową", "description": "Możesz całkowicie zastąpić podpowiedź systemową dla tego trybu (oprócz definicji roli i niestandardowych instrukcji) poprzez utworzenie pliku w .roo/system-prompt-{{modeSlug}} w swoim obszarze roboczym. Jest to bardzo zaawansowana funkcja, która omija wbudowane zabezpieczenia i kontrole spójności (szczególnie wokół używania narzędzi), więc bądź ostrożny!" diff --git a/webview-ui/src/i18n/locales/pl/settings.json b/webview-ui/src/i18n/locales/pl/settings.json index 2b5938ddd70..8ea8a6b2507 100644 --- a/webview-ui/src/i18n/locales/pl/settings.json +++ b/webview-ui/src/i18n/locales/pl/settings.json @@ -35,12 +35,20 @@ "description": "Pozwól Roo na automatyczne wykonywanie operacji bez wymagania zatwierdzenia. Włącz te ustawienia tylko jeśli w pełni ufasz AI i rozumiesz związane z tym zagrożenia bezpieczeństwa.", "readOnly": { "label": "Zawsze zatwierdzaj operacje tylko do odczytu", - "description": "Gdy włączone, Roo automatycznie będzie wyświetlać zawartość katalogów i czytać pliki bez konieczności klikania przycisku Zatwierdź." + "description": "Gdy włączone, Roo automatycznie będzie wyświetlać zawartość katalogów i czytać pliki bez konieczności klikania przycisku Zatwierdź.", + "outsideWorkspace": { + "label": "Uwzględnij pliki poza obszarem roboczym", + "description": "Pozwól Roo na odczyt plików poza bieżącym obszarem roboczym bez konieczności zatwierdzania." + } }, "write": { "label": "Zawsze zatwierdzaj operacje zapisu", "description": "Automatycznie twórz i edytuj pliki bez konieczności zatwierdzania", - "delayLabel": "Opóźnienie po zapisach, aby umożliwić diagnostyce wykrycie potencjalnych problemów" + "delayLabel": "Opóźnienie po zapisach, aby umożliwić diagnostyce wykrycie potencjalnych problemów", + "outsideWorkspace": { + "label": "Uwzględnij pliki poza obszarem roboczym", + "description": "Pozwól Roo na tworzenie i edycję plików poza bieżącym obszarem roboczym bez konieczności zatwierdzania." + } }, "browser": { "label": "Zawsze zatwierdzaj akcje przeglądarki", @@ -267,8 +275,9 @@ "description": "Gdy włączone, pliki pasujące do wzorców w .rooignore będą pokazywane na listach z symbolem kłódki. Gdy wyłączone, te pliki będą całkowicie ukryte z list plików i wyszukiwań." }, "maxReadFile": { - "label": "Maksymalna liczba linii do odczytu z pliku", - "description": "Maksymalna liczba linii odczytywanych z pliku jednocześnie. Niższe wartości zmniejszają użycie kontekstu/zasobów, ale mogą wymagać więcej odczytów dla dużych plików." + "label": "Próg automatycznego skracania odczytu pliku", + "description": "Domyślna liczba linii odczytywanych z pliku w jednej partii. Niższe wartości zmniejszają użycie kontekstu/zasobów, ale mogą wymagać więcej odczytów dla dużych plików.", + "lines": "linii" } }, "terminal": { @@ -349,6 +358,8 @@ "cacheReadsPrice": "Cena odczytów bufora", "cacheWritesPrice": "Cena zapisów bufora", "enableStreaming": "Włącz strumieniowanie", + "enableR1Format": "Włącz parametry modelu R1", + "enableR1FormatTips": "Należy włączyć podczas korzystania z modeli R1, takich jak QWQ, aby uniknąć błędu 400", "useAzure": "Użyj Azure", "azureApiVersion": "Ustaw wersję API Azure", "gemini": { diff --git a/webview-ui/src/i18n/locales/pl/welcome.json b/webview-ui/src/i18n/locales/pl/welcome.json index cc9907f3f82..fb13723490b 100644 --- a/webview-ui/src/i18n/locales/pl/welcome.json +++ b/webview-ui/src/i18n/locales/pl/welcome.json @@ -3,12 +3,25 @@ "introduction": "Mogę wykonywać wszelkiego rodzaju zadania dzięki najnowszym osiągnięciom w zakresie możliwości kodowania agentowego i dostępu do narzędzi, które pozwalają mi tworzyć i edytować pliki, eksplorować złożone projekty, korzystać z przeglądarki i wykonywać polecenia terminalowe (oczywiście za Twoją zgodą). Mogę nawet używać MCP do tworzenia nowych narzędzi i rozszerzania własnych możliwości.", "notice": "Aby rozpocząć, to rozszerzenie potrzebuje dostawcy API.", "start": "Zaczynajmy!", + "chooseProvider": "Wybierz dostawcę API, aby rozpocząć:", + "routers": { + "requesty": { + "description": "Twój zoptymalizowany router LLM", + "incentive": "$1 darmowego kredytu" + }, + "openrouter": { + "description": "Ujednolicony interfejs dla LLMs" + } + }, + "startRouter": "Szybka konfiguracja przez router", + "startCustom": "Użyj własnego klucza API", "telemetry": { "title": "Pomóż ulepszyć Roo Code", "anonymousTelemetry": "Wyślij anonimowe dane o błędach i użyciu, aby pomóc nam w naprawianiu błędów i ulepszaniu rozszerzenia. Nigdy nie są wysyłane żadne kody, teksty ani informacje osobiste.", - "changeSettings": "Zawsze możesz to zmienić na dole ustawień", + "changeSettings": "Zawsze możesz to zmienić na dole ustawień", "settings": "ustawienia", "allow": "Zezwól", "deny": "Odmów" - } + }, + "or": "lub" } diff --git a/webview-ui/src/i18n/locales/pt-BR/chat.json b/webview-ui/src/i18n/locales/pt-BR/chat.json index 97c13c3cfb1..560e9b9bff6 100644 --- a/webview-ui/src/i18n/locales/pt-BR/chat.json +++ b/webview-ui/src/i18n/locales/pt-BR/chat.json @@ -105,10 +105,15 @@ }, "current": "Atual" }, + "instructions": { + "wantsToFetch": "Roo quer buscar instruções detalhadas para ajudar com a tarefa atual" + }, "fileOperations": { "wantsToRead": "Roo quer ler este arquivo:", + "wantsToReadOutsideWorkspace": "Roo quer ler este arquivo fora do espaço de trabalho:", "didRead": "Roo leu este arquivo:", "wantsToEdit": "Roo quer editar este arquivo:", + "wantsToEditOutsideWorkspace": "Roo quer editar este arquivo fora do espaço de trabalho:", "wantsToCreate": "Roo quer criar um novo arquivo:" }, "directoryOperations": { diff --git a/webview-ui/src/i18n/locales/pt-BR/common.json b/webview-ui/src/i18n/locales/pt-BR/common.json index a003f6ee918..2a10002acb4 100644 --- a/webview-ui/src/i18n/locales/pt-BR/common.json +++ b/webview-ui/src/i18n/locales/pt-BR/common.json @@ -1,7 +1,7 @@ { "number_format": { - "thousand_suffix": "mil", - "million_suffix": "mi", - "billion_suffix": "bi" + "thousand_suffix": "k", + "million_suffix": "m", + "billion_suffix": "b" } } diff --git a/webview-ui/src/i18n/locales/pt-BR/prompts.json b/webview-ui/src/i18n/locales/pt-BR/prompts.json index b65f9930fd4..030c165b7fa 100644 --- a/webview-ui/src/i18n/locales/pt-BR/prompts.json +++ b/webview-ui/src/i18n/locales/pt-BR/prompts.json @@ -91,13 +91,13 @@ "TERMINAL_EXPLAIN": { "label": "Explicar Comando do Terminal", "description": "Obtenha explicações detalhadas de comandos de terminal e suas saídas. Available in the terminal context menu (right-click on selected terminal content)." + }, + "NEW_TASK": { + "label": "Iniciar Nova Tarefa", + "description": "Inicie uma nova tarefa com a entrada fornecida. Disponível na paleta de comandos." } } }, - "customModeCreation": { - "enableTitle": "Ativar criação de modo personalizado através de prompts", - "description": "Quando ativado, o Roo permite que você crie modos personalizados usando prompts como 'Crie para mim um modo personalizado que...'. Desativar isto reduz seu prompt de sistema em cerca de 700 tokens quando esta funcionalidade não é necessária. Quando desativado, você ainda pode criar modos personalizados manualmente usando o botão + acima ou editando o JSON de configuração relacionado." - }, "advancedSystemPrompt": { "title": "Avançado: Substituir prompt do sistema", "description": "Você pode substituir completamente o prompt do sistema para este modo (além da definição de função e instruções personalizadas) criando um arquivo em .roo/system-prompt-{{modeSlug}} no seu espaço de trabalho. Esta é uma funcionalidade muito avançada que contorna as salvaguardas integradas e verificações de consistência (especialmente em torno do uso de ferramentas), então tenha cuidado!" diff --git a/webview-ui/src/i18n/locales/pt-BR/settings.json b/webview-ui/src/i18n/locales/pt-BR/settings.json index a7c4b7283e0..017f5714d11 100644 --- a/webview-ui/src/i18n/locales/pt-BR/settings.json +++ b/webview-ui/src/i18n/locales/pt-BR/settings.json @@ -35,12 +35,20 @@ "description": "Permitir que o Roo realize operações automaticamente sem exigir aprovação. Ative essas configurações apenas se confiar totalmente na IA e compreender os riscos de segurança associados.", "readOnly": { "label": "Aprovar sempre operações somente de leitura", - "description": "Quando ativado, o Roo visualizará automaticamente o conteúdo do diretório e lerá arquivos sem que você precise clicar no botão Aprovar." + "description": "Quando ativado, o Roo visualizará automaticamente o conteúdo do diretório e lerá arquivos sem que você precise clicar no botão Aprovar.", + "outsideWorkspace": { + "label": "Incluir arquivos fora do espaço de trabalho", + "description": "Permitir que o Roo leia arquivos fora do espaço de trabalho atual sem exigir aprovação." + } }, "write": { "label": "Aprovar sempre operações de escrita", "description": "Criar e editar arquivos automaticamente sem exigir aprovação", - "delayLabel": "Atraso após escritas para permitir que diagnósticos detectem problemas potenciais" + "delayLabel": "Atraso após escritas para permitir que diagnósticos detectem problemas potenciais", + "outsideWorkspace": { + "label": "Incluir arquivos fora do espaço de trabalho", + "description": "Permitir que o Roo crie e edite arquivos fora do espaço de trabalho atual sem exigir aprovação." + } }, "browser": { "label": "Aprovar sempre ações do navegador", @@ -267,8 +275,9 @@ "description": "Quando ativado, os arquivos que correspondem aos padrões em .rooignore serão mostrados em listas com um símbolo de cadeado. Quando desativado, esses arquivos serão completamente ocultos das listas de arquivos e pesquisas." }, "maxReadFile": { - "label": "Número máximo de linhas para ler de um arquivo", - "description": "Número máximo de linhas para ler de um arquivo de uma vez. Valores mais baixos reduzem o uso de contexto/recursos, mas podem exigir mais leituras para arquivos grandes." + "label": "Limite de auto-truncamento de leitura de arquivo", + "description": "O número padrão de linhas para ler de um arquivo em um lote. Valores mais baixos reduzem o uso de contexto/recursos, mas podem exigir mais leituras para arquivos grandes.", + "lines": "linhas" } }, "terminal": { @@ -349,6 +358,8 @@ "cacheReadsPrice": "Preço de leituras de cache", "cacheWritesPrice": "Preço de escritas de cache", "enableStreaming": "Ativar streaming", + "enableR1Format": "Ativar parâmetros do modelo R1", + "enableR1FormatTips": "Deve ser ativado ao usar modelos R1 como QWQ, para evitar erro 400", "useAzure": "Usar Azure", "azureApiVersion": "Definir versão da API Azure", "gemini": { diff --git a/webview-ui/src/i18n/locales/pt-BR/welcome.json b/webview-ui/src/i18n/locales/pt-BR/welcome.json index 7123772d67a..5f0fa0c193b 100644 --- a/webview-ui/src/i18n/locales/pt-BR/welcome.json +++ b/webview-ui/src/i18n/locales/pt-BR/welcome.json @@ -3,12 +3,25 @@ "introduction": "Posso realizar todos os tipos de tarefas graças aos últimos avanços nas capacidades de codificação agentica e ao acesso a ferramentas que me permitem criar e editar arquivos, explorar projetos complexos, usar o navegador e executar comandos de terminal (com sua permissão, é claro). Posso até usar o MCP para criar novas ferramentas e expandir minhas próprias capacidades.", "notice": "Para começar, esta extensão precisa de um provedor de API.", "start": "Vamos lá!", + "chooseProvider": "Escolha um provedor de API para começar:", + "routers": { + "requesty": { + "description": "Seu roteador LLM otimizado", + "incentive": "$1 de crédito grátis" + }, + "openrouter": { + "description": "Uma interface unificada para LLMs" + } + }, + "startRouter": "Configuração rápida através de um roteador", + "startCustom": "Use sua própria chave API", "telemetry": { "title": "Ajude a melhorar o Roo Code", "anonymousTelemetry": "Envie dados de uso e erros anônimos para nos ajudar a corrigir bugs e melhorar a extensão. Nenhum código, texto ou informação pessoal é enviado.", - "changeSettings": "Você sempre pode mudar isso na parte inferior das configurações", + "changeSettings": "Você sempre pode mudar isso na parte inferior das configurações", "settings": "configurações", "allow": "Permitir", "deny": "Negar" - } + }, + "or": "ou" } diff --git a/webview-ui/src/i18n/locales/tr/chat.json b/webview-ui/src/i18n/locales/tr/chat.json index 4fff9c2ad35..b415524f929 100644 --- a/webview-ui/src/i18n/locales/tr/chat.json +++ b/webview-ui/src/i18n/locales/tr/chat.json @@ -105,10 +105,15 @@ }, "current": "Mevcut" }, + "instructions": { + "wantsToFetch": "Roo mevcut göreve yardımcı olmak için ayrıntılı talimatlar almak istiyor" + }, "fileOperations": { "wantsToRead": "Roo bu dosyayı okumak istiyor:", + "wantsToReadOutsideWorkspace": "Roo çalışma alanı dışındaki bu dosyayı okumak istiyor:", "didRead": "Roo bu dosyayı okudu:", "wantsToEdit": "Roo bu dosyayı düzenlemek istiyor:", + "wantsToEditOutsideWorkspace": "Roo çalışma alanı dışındaki bu dosyayı düzenlemek istiyor:", "wantsToCreate": "Roo yeni bir dosya oluşturmak istiyor:" }, "directoryOperations": { diff --git a/webview-ui/src/i18n/locales/tr/common.json b/webview-ui/src/i18n/locales/tr/common.json index 9bd908ea143..2a10002acb4 100644 --- a/webview-ui/src/i18n/locales/tr/common.json +++ b/webview-ui/src/i18n/locales/tr/common.json @@ -1,7 +1,7 @@ { "number_format": { - "thousand_suffix": "B", - "million_suffix": "Mn", - "billion_suffix": "Mr" + "thousand_suffix": "k", + "million_suffix": "m", + "billion_suffix": "b" } } diff --git a/webview-ui/src/i18n/locales/tr/prompts.json b/webview-ui/src/i18n/locales/tr/prompts.json index b9a6a808cdf..e10bf5d4451 100644 --- a/webview-ui/src/i18n/locales/tr/prompts.json +++ b/webview-ui/src/i18n/locales/tr/prompts.json @@ -91,13 +91,13 @@ "TERMINAL_EXPLAIN": { "label": "Terminal Komutunu Açıkla", "description": "Terminal komutları ve çıktıları hakkında ayrıntılı açıklamalar alın. Terminal bağlam menüsünde (seçili terminal içeriğine sağ tıklayın) kullanılabilir." + }, + "NEW_TASK": { + "label": "Yeni Görev Başlat", + "description": "Girdiyle yeni bir görev başlat. Komut paletinde kullanılabilir." } } }, - "customModeCreation": { - "enableTitle": "Promptlar aracılığıyla özel mod oluşturmayı etkinleştir", - "description": "Etkinleştirildiğinde, Roo 'Bana ... yapabilen özel bir mod oluştur' gibi promptlar kullanarak özel modlar oluşturmanıza olanak tanır. Bu özelliğe ihtiyaç duyulmadığında devre dışı bırakmak, sistem promptunuzu yaklaşık 700 token azaltır. Devre dışı bırakıldığında, yukarıdaki + düğmesini kullanarak veya ilgili yapılandırma JSON'ını düzenleyerek manuel olarak özel modlar oluşturabilirsiniz." - }, "advancedSystemPrompt": { "title": "Gelişmiş: Sistem Promptunu Geçersiz Kıl", "description": "Çalışma alanınızda .roo/system-prompt-{{slug}} adresinde bir dosya oluşturarak bu mod için sistem istemini tamamen değiştirebilirsiniz (rol tanımı ve özel talimatlar hariç). Bu, yerleşik güvenlik önlemlerini ve tutarlılık kontrollerini (özellikle araç kullanımıyla ilgili) aşan çok gelişmiş bir özelliktir, bu yüzden dikkatli olun!" diff --git a/webview-ui/src/i18n/locales/tr/settings.json b/webview-ui/src/i18n/locales/tr/settings.json index 078c495c46c..7cc8cc06ac6 100644 --- a/webview-ui/src/i18n/locales/tr/settings.json +++ b/webview-ui/src/i18n/locales/tr/settings.json @@ -35,12 +35,20 @@ "description": "Roo'nun onay gerektirmeden otomatik olarak işlemler gerçekleştirmesine izin verin. Bu ayarları yalnızca yapay zekaya tamamen güveniyorsanız ve ilgili güvenlik risklerini anlıyorsanız etkinleştirin.", "readOnly": { "label": "Salt okunur işlemleri her zaman onayla", - "description": "Etkinleştirildiğinde, Roo otomatik olarak dizin içeriğini görüntüleyecek ve Onayla düğmesine tıklamanıza gerek kalmadan dosyaları okuyacaktır." + "description": "Etkinleştirildiğinde, Roo otomatik olarak dizin içeriğini görüntüleyecek ve Onayla düğmesine tıklamanıza gerek kalmadan dosyaları okuyacaktır.", + "outsideWorkspace": { + "label": "Çalışma alanı dışındaki dosyaları dahil et", + "description": "Roo'nun onay gerektirmeden mevcut çalışma alanı dışındaki dosyaları okumasına izin ver." + } }, "write": { "label": "Yazma işlemlerini her zaman onayla", "description": "Onay gerektirmeden otomatik olarak dosya oluştur ve düzenle", - "delayLabel": "Tanılamanın potansiyel sorunları tespit etmesine izin vermek için yazmalardan sonra gecikme" + "delayLabel": "Tanılamanın potansiyel sorunları tespit etmesine izin vermek için yazmalardan sonra gecikme", + "outsideWorkspace": { + "label": "Çalışma alanı dışındaki dosyaları dahil et", + "description": "Roo'nun onay gerektirmeden mevcut çalışma alanı dışında dosya oluşturmasına ve düzenlemesine izin ver." + } }, "browser": { "label": "Tarayıcı eylemlerini her zaman onayla", @@ -267,8 +275,9 @@ "description": "Etkinleştirildiğinde, .rooignore'daki desenlerle eşleşen dosyalar kilit sembolü ile listelerde gösterilecektir. Devre dışı bırakıldığında, bu dosyalar dosya listelerinden ve aramalardan tamamen gizlenecektir." }, "maxReadFile": { - "label": "Bir dosyadan okunacak maksimum satır sayısı", - "description": "Bir dosyadan bir kerede okunacak maksimum satır sayısı. Daha düşük değerler bağlam/kaynak kullanımını azaltır ancak büyük dosyalar için daha fazla okuma gerektirebilir." + "label": "Dosya okuma otomatik kısaltma eşiği", + "description": "Bir dosyadan bir partide okunacak varsayılan satır sayısı. Daha düşük değerler bağlam/kaynak kullanımını azaltır ancak büyük dosyalar için daha fazla okuma gerektirebilir.", + "lines": "satır" } }, "terminal": { @@ -349,6 +358,8 @@ "cacheReadsPrice": "Önbellek okuma fiyatı", "cacheWritesPrice": "Önbellek yazma fiyatı", "enableStreaming": "Akışı etkinleştir", + "enableR1Format": "R1 model parametrelerini etkinleştir", + "enableR1FormatTips": "QWQ gibi R1 modelleri kullanıldığında etkinleştirilmelidir, 400 hatası alınmaması için", "useAzure": "Azure kullan", "azureApiVersion": "Azure API sürümünü ayarla", "gemini": { diff --git a/webview-ui/src/i18n/locales/tr/welcome.json b/webview-ui/src/i18n/locales/tr/welcome.json index f462c1dd3d4..76bf97429e3 100644 --- a/webview-ui/src/i18n/locales/tr/welcome.json +++ b/webview-ui/src/i18n/locales/tr/welcome.json @@ -1,14 +1,27 @@ { "greeting": "Merhaba, ben Roo!", - "introduction": "Ajan tabanlı kodlama yeteneklerindeki son gelişmeler ve dosya oluşturma ve düzenleme, karmaşık projeleri keşfetme, tarayıcı kullanma ve terminal komutları çalıştırma (tabii ki sizin izninizle) gibi işlemleri yapmamı sağlayan araçlara erişim sayesinde her türlü görevi gerçekleştirebilirim. Hatta MCP'yi kullanarak yeni araçlar oluşturabilir ve kendi yeteneklerimi genişletebilirim.", + "introduction": "Ajan tabanlı kodlama yeteneklerindeki son gelişmeler ve dosya oluşturma ve düzenleme, karmaşık projeleri keşfetme, tarayıcı kullanma ve terminal komutları çalıştırma (tabii ki senin izninle) gibi işlemleri yapmamı sağlayan araçlara erişim sayesinde her türlü görevi gerçekleştirebilirim. Hatta MCP'yi kullanarak yeni araçlar oluşturabilir ve kendi yeteneklerimi genişletebilirim.", "notice": "Başlamak için bu eklentinin bir API sağlayıcısına ihtiyacı var.", "start": "Hadi başlayalım!", + "chooseProvider": "Başlamak için bir API sağlayıcısı seç:", + "routers": { + "requesty": { + "description": "Optimize edilmiş LLM yönlendiricin", + "incentive": "$1 ücretsiz kredi" + }, + "openrouter": { + "description": "LLM'ler için birleşik bir arayüz" + } + }, + "startRouter": "Yönlendirici Üzerinden Hızlı Kurulum", + "startCustom": "Kendi API Anahtarını Kullan", "telemetry": { - "title": "Roo Code'u Geliştirmeye Yardım Edin", - "anonymousTelemetry": "Hataları düzeltmemize ve eklentiyi geliştirmemize yardımcı olmak için anonim hata ve kullanım verileri gönderin. Hiçbir zaman kod, metin veya kişisel bilgi gönderilmez.", - "changeSettings": "Bunu her zaman ayarların altından değiştirebilirsiniz", + "title": "Roo Code'u Geliştirmeye Yardım Et", + "anonymousTelemetry": "Hataları düzeltmemize ve eklentiyi geliştirmemize yardımcı olmak için anonim hata ve kullanım verileri gönder. Hiçbir zaman kod, metin veya kişisel bilgi gönderilmez.", + "changeSettings": "Bunu her zaman ayarların altından değiştirebilirsin", "settings": "ayarlar", "allow": "İzin Ver", "deny": "Reddet" - } + }, + "or": "veya" } diff --git a/webview-ui/src/i18n/locales/vi/chat.json b/webview-ui/src/i18n/locales/vi/chat.json index cbabb4634a3..f0f32210693 100644 --- a/webview-ui/src/i18n/locales/vi/chat.json +++ b/webview-ui/src/i18n/locales/vi/chat.json @@ -105,10 +105,15 @@ }, "current": "Hiện tại" }, + "instructions": { + "wantsToFetch": "Roo muốn lấy hướng dẫn chi tiết để hỗ trợ nhiệm vụ hiện tại" + }, "fileOperations": { "wantsToRead": "Roo muốn đọc tệp này:", + "wantsToReadOutsideWorkspace": "Roo muốn đọc tệp này bên ngoài không gian làm việc:", "didRead": "Roo đã đọc tệp này:", "wantsToEdit": "Roo muốn chỉnh sửa tệp này:", + "wantsToEditOutsideWorkspace": "Roo muốn chỉnh sửa tệp này bên ngoài không gian làm việc:", "wantsToCreate": "Roo muốn tạo một tệp mới:" }, "directoryOperations": { diff --git a/webview-ui/src/i18n/locales/vi/common.json b/webview-ui/src/i18n/locales/vi/common.json index dc5650760a1..2a10002acb4 100644 --- a/webview-ui/src/i18n/locales/vi/common.json +++ b/webview-ui/src/i18n/locales/vi/common.json @@ -1,7 +1,7 @@ { "number_format": { "thousand_suffix": "k", - "million_suffix": "tr", - "billion_suffix": "tỷ" + "million_suffix": "m", + "billion_suffix": "b" } } diff --git a/webview-ui/src/i18n/locales/vi/prompts.json b/webview-ui/src/i18n/locales/vi/prompts.json index e541a38bc2f..793a7931331 100644 --- a/webview-ui/src/i18n/locales/vi/prompts.json +++ b/webview-ui/src/i18n/locales/vi/prompts.json @@ -91,13 +91,13 @@ "TERMINAL_EXPLAIN": { "label": "Giải thích lệnh terminal", "description": "Nhận giải thích chi tiết về lệnh terminal và đầu ra của chúng. Có sẵn trong menu ngữ cảnh terminal (nhấp chuột phải vào nội dung terminal đã chọn)." + }, + "NEW_TASK": { + "label": "Bắt đầu tác vụ mới", + "description": "Bắt đầu tác vụ mới với nội dung đã nhập. Có sẵn trong bảng lệnh." } } }, - "customModeCreation": { - "enableTitle": "Bật tạo chế độ tùy chỉnh thông qua lời nhắc", - "description": "Khi được bật, Roo cho phép bạn tạo chế độ tùy chỉnh bằng cách sử dụng lời nhắc như 'Tạo cho tôi một chế độ tùy chỉnh mà…'. Việc tắt tính năng này giảm lời nhắc hệ thống của bạn khoảng 700 token khi tính năng này không cần thiết. Khi tắt, bạn vẫn có thể tạo chế độ tùy chỉnh bằng cách sử dụng nút + ở trên hoặc bằng cách chỉnh sửa tệp JSON cấu hình liên quan." - }, "advancedSystemPrompt": { "title": "Nâng cao: Ghi đè lời nhắc hệ thống", "description": "Bạn có thể hoàn toàn thay thế lời nhắc hệ thống cho chế độ này (ngoài định nghĩa vai trò và hướng dẫn tùy chỉnh) bằng cách tạo một tệp tại .roo/system-prompt-{{modeSlug}} trong không gian làm việc của bạn. Đây là một tính năng rất nâng cao bỏ qua các biện pháp bảo vệ và kiểm tra nhất quán tích hợp sẵn (đặc biệt là xung quanh việc sử dụng công cụ), vì vậy hãy cẩn thận!" diff --git a/webview-ui/src/i18n/locales/vi/settings.json b/webview-ui/src/i18n/locales/vi/settings.json index 5344cc73308..b93b4617cd0 100644 --- a/webview-ui/src/i18n/locales/vi/settings.json +++ b/webview-ui/src/i18n/locales/vi/settings.json @@ -35,12 +35,20 @@ "description": "Cho phép Roo tự động thực hiện các hoạt động mà không cần phê duyệt. Chỉ bật những cài đặt này nếu bạn hoàn toàn tin tưởng AI và hiểu rõ các rủi ro bảo mật liên quan.", "readOnly": { "label": "Luôn phê duyệt các hoạt động chỉ đọc", - "description": "Khi được bật, Roo sẽ tự động xem nội dung thư mục và đọc tệp mà không yêu cầu bạn nhấp vào nút Phê duyệt." + "description": "Khi được bật, Roo sẽ tự động xem nội dung thư mục và đọc tệp mà không yêu cầu bạn nhấp vào nút Phê duyệt.", + "outsideWorkspace": { + "label": "Bao gồm các tệp ngoài không gian làm việc", + "description": "Cho phép Roo đọc các tệp bên ngoài không gian làm việc hiện tại mà không yêu cầu phê duyệt." + } }, "write": { "label": "Luôn phê duyệt các hoạt động ghi", "description": "Tự động tạo và chỉnh sửa tệp mà không cần phê duyệt", - "delayLabel": "Trì hoãn sau khi ghi để cho phép chẩn đoán phát hiện các vấn đề tiềm ẩn" + "delayLabel": "Trì hoãn sau khi ghi để cho phép chẩn đoán phát hiện các vấn đề tiềm ẩn", + "outsideWorkspace": { + "label": "Bao gồm các tệp ngoài không gian làm việc", + "description": "Cho phép Roo tạo và chỉnh sửa các tệp bên ngoài không gian làm việc hiện tại mà không yêu cầu phê duyệt." + } }, "browser": { "label": "Luôn phê duyệt các hành động trình duyệt", @@ -267,8 +275,9 @@ "description": "Khi được bật, các tệp khớp với mẫu trong .rooignore sẽ được hiển thị trong danh sách với biểu tượng khóa. Khi bị tắt, các tệp này sẽ hoàn toàn bị ẩn khỏi danh sách tệp và tìm kiếm." }, "maxReadFile": { - "label": "Số dòng tối đa để đọc từ một tệp", - "description": "Số dòng tối đa để đọc từ một tệp cùng một lúc. Giá trị thấp hơn giảm sử dụng ngữ cảnh/tài nguyên nhưng có thể yêu cầu đọc nhiều lần hơn cho các tệp lớn." + "label": "Ngưỡng tự động cắt ngắn khi đọc tệp", + "description": "Số dòng mặc định để đọc từ một tệp trong một lô. Giá trị thấp hơn giảm sử dụng ngữ cảnh/tài nguyên nhưng có thể yêu cầu đọc nhiều lần hơn cho các tệp lớn.", + "lines": "dòng" } }, "terminal": { @@ -349,6 +358,8 @@ "cacheReadsPrice": "Giá đọc bộ nhớ đệm", "cacheWritesPrice": "Giá ghi bộ nhớ đệm", "enableStreaming": "Bật streaming", + "enableR1Format": "Kích hoạt tham số mô hình R1", + "enableR1FormatTips": "Cần kích hoạt khi sử dụng các mô hình R1 như QWQ, để tránh lỗi 400", "useAzure": "Sử dụng Azure", "azureApiVersion": "Đặt phiên bản API Azure", "gemini": { diff --git a/webview-ui/src/i18n/locales/vi/welcome.json b/webview-ui/src/i18n/locales/vi/welcome.json index e2eae822da8..91dcea70c67 100644 --- a/webview-ui/src/i18n/locales/vi/welcome.json +++ b/webview-ui/src/i18n/locales/vi/welcome.json @@ -3,12 +3,25 @@ "introduction": "Tôi có thể thực hiện nhiều loại nhiệm vụ nhờ vào những đột phá mới nhất trong khả năng lập trình dạng đại lý và quyền truy cập vào các công cụ cho phép tôi tạo & chỉnh sửa tệp, khám phá các dự án phức tạp, sử dụng trình duyệt và thực thi lệnh terminal (với sự cho phép của bạn, tất nhiên). Tôi thậm chí có thể sử dụng MCP để tạo công cụ mới và mở rộng khả năng của mình.", "notice": "Để bắt đầu, tiện ích mở rộng này cần một nhà cung cấp API.", "start": "Bắt đầu thôi!", + "chooseProvider": "Chọn một nhà cung cấp API để bắt đầu:", + "routers": { + "requesty": { + "description": "Bộ định tuyến LLM được tối ưu hóa của bạn", + "incentive": "$1 tín dụng miễn phí" + }, + "openrouter": { + "description": "Giao diện thống nhất cho các LLM" + } + }, + "startRouter": "Thiết lập nhanh qua bộ định tuyến", + "startCustom": "Sử dụng khóa API của riêng bạn", "telemetry": { "title": "Giúp cải thiện Roo Code", "anonymousTelemetry": "Gửi dữ liệu lỗi và sử dụng ẩn danh để giúp chúng tôi sửa lỗi và cải thiện tiện ích mở rộng. Không bao giờ gửi mã, lời nhắc hoặc thông tin cá nhân.", - "changeSettings": "Bạn luôn có thể thay đổi điều này ở cuối phần cài đặt", + "changeSettings": "Bạn luôn có thể thay đổi điều này ở cuối phần cài đặt", "settings": "cài đặt", "allow": "Cho phép", "deny": "Từ chối" - } + }, + "or": "hoặc" } diff --git a/webview-ui/src/i18n/locales/zh-CN/chat.json b/webview-ui/src/i18n/locales/zh-CN/chat.json index a0310a5919c..be20601e9bb 100644 --- a/webview-ui/src/i18n/locales/zh-CN/chat.json +++ b/webview-ui/src/i18n/locales/zh-CN/chat.json @@ -105,10 +105,15 @@ }, "current": "当前" }, + "instructions": { + "wantsToFetch": "Roo 想要获取详细指示以协助当前任务" + }, "fileOperations": { "wantsToRead": "Roo想读取此文件:", + "wantsToReadOutsideWorkspace": "Roo想读取此工作区外的文件:", "didRead": "Roo已读取此文件:", "wantsToEdit": "Roo想编辑此文件:", + "wantsToEditOutsideWorkspace": "Roo想编辑此工作区外的文件:", "wantsToCreate": "Roo想创建新文件:" }, "directoryOperations": { diff --git a/webview-ui/src/i18n/locales/zh-CN/common.json b/webview-ui/src/i18n/locales/zh-CN/common.json index a1d34b00598..2a10002acb4 100644 --- a/webview-ui/src/i18n/locales/zh-CN/common.json +++ b/webview-ui/src/i18n/locales/zh-CN/common.json @@ -1,7 +1,7 @@ { "number_format": { - "thousand_suffix": "千", - "million_suffix": "百万", - "billion_suffix": "十亿" + "thousand_suffix": "k", + "million_suffix": "m", + "billion_suffix": "b" } } diff --git a/webview-ui/src/i18n/locales/zh-CN/prompts.json b/webview-ui/src/i18n/locales/zh-CN/prompts.json index 0b9af777ba0..7a32607c457 100644 --- a/webview-ui/src/i18n/locales/zh-CN/prompts.json +++ b/webview-ui/src/i18n/locales/zh-CN/prompts.json @@ -91,13 +91,13 @@ "TERMINAL_EXPLAIN": { "label": "解释终端命令", "description": "获取对终端命令及其输出的详细解释。可在终端上下文菜单(右键点击选中的终端内容)中使用。" + }, + "NEW_TASK": { + "label": "开始新任务", + "description": "使用输入内容开始新任务。可在命令面板中使用。" } } }, - "customModeCreation": { - "enableTitle": "通过提示词启用自定义模式创建", - "description": "启用后,Roo允许您使用类似\"为我创建一个自定义模式,它可以...\"的提示词来创建自定义模式。禁用此功能可以在不需要时减少系统提示词约700个token。禁用后您仍然可以通过上方的+按钮或编辑相关配置JSON手动创建自定义模式。" - }, "advancedSystemPrompt": { "title": "高级:覆盖系统提示词", "description": "您可以通过在工作区创建文件 .roo/system-prompt-{{slug}},完全替换此模式的系统提示(角色定义和自定义指令除外)。这是一个非常高级的功能,会绕过内置的安全措施和一致性检查(尤其是与工具使用相关的部分),请谨慎操作!" diff --git a/webview-ui/src/i18n/locales/zh-CN/settings.json b/webview-ui/src/i18n/locales/zh-CN/settings.json index aec816d94ad..8ab8055767a 100644 --- a/webview-ui/src/i18n/locales/zh-CN/settings.json +++ b/webview-ui/src/i18n/locales/zh-CN/settings.json @@ -35,12 +35,20 @@ "description": "允许 Roo 自动执行操作而无需批准。只有在您完全信任 AI 并了解相关安全风险的情况下才启用这些设置。", "readOnly": { "label": "始终批准只读操作", - "description": "启用后,Roo 将自动查看目录内容并读取文件,无需点击批准按钮。" + "description": "启用后,Roo 将自动查看目录内容并读取文件,无需点击批准按钮。", + "outsideWorkspace": { + "label": "包含工作区外的文件", + "description": "允许 Roo 读取当前工作区外的文件,无需批准。" + } }, "write": { "label": "始终批准写入操作", "description": "自动创建和编辑文件而无需批准", - "delayLabel": "写入后延迟以允许诊断检测潜在问题" + "delayLabel": "写入后延迟以允许诊断检测潜在问题", + "outsideWorkspace": { + "label": "包含工作区外的文件", + "description": "允许 Roo 创建和编辑当前工作区外的文件,无需批准。" + } }, "browser": { "label": "始终批准浏览器操作", @@ -267,8 +275,9 @@ "description": "启用后,与 .rooignore 中模式匹配的文件将在列表中显示锁定符号。禁用时,这些文件将从文件列表和搜索中完全隐藏。" }, "maxReadFile": { - "label": "文件读取的最大行数", - "description": "一次从文件读取的最大行数。较低的值会减少上下文/资源使用,但可能需要对大文件进行更多次读取。" + "label": "文件读取自动截断阈值", + "description": "一次批处理中从文件读取的默认行数。较低的值会减少上下文/资源使用,但可能需要对大文件进行更多次读取。", + "lines": "行" } }, "terminal": { @@ -349,6 +358,8 @@ "cacheReadsPrice": "缓存读取价格", "cacheWritesPrice": "缓存写入价格", "enableStreaming": "启用流式传输", + "enableR1Format": "启用R1模型传参", + "enableR1FormatTips": "当使用QWQ等类R1模型时需启用,防止报400错误", "useAzure": "使用 Azure 服务", "azureApiVersion": "设置 Azure API 版本", "gemini": { diff --git a/webview-ui/src/i18n/locales/zh-CN/welcome.json b/webview-ui/src/i18n/locales/zh-CN/welcome.json index dfa80dc7c6b..27fc616cf67 100644 --- a/webview-ui/src/i18n/locales/zh-CN/welcome.json +++ b/webview-ui/src/i18n/locales/zh-CN/welcome.json @@ -3,12 +3,25 @@ "introduction": "得益于最新的代理编码能力突破和对各种工具的访问权限,我可以完成各种任务。我可以创建和编辑文件、探索复杂项目、使用浏览器,以及执行终端命令(当然,需要你的许可)。我甚至可以使用 MCP 创建新工具并扩展自己的能力。", "notice": "首先,请配置一个大模型 API 服务商。", "start": "开始吧!", + "chooseProvider": "选择一个 API 服务商开始:", + "routers": { + "requesty": { + "description": "你的优化 LLM 路由器", + "incentive": "$1 免费额度" + }, + "openrouter": { + "description": "LLM 的统一接口" + } + }, + "startRouter": "通过路由器快速设置", + "startCustom": "使用你自己的 API 密钥", "telemetry": { "title": "帮助改进 Roo 代码", - "changeSettings": "可以随时在设置页面底部更改此设置", + "changeSettings": "可以随时在设置页面底部更改此设置", "settings": "设置", "anonymousTelemetry": "发送匿名的错误和使用数据,以帮助我们修复错误并改进扩展程序。不会发送任何代码、提示或个人信息。", "allow": "允许", "deny": "拒绝" - } + }, + "or": "或" } diff --git a/webview-ui/src/i18n/locales/zh-TW/chat.json b/webview-ui/src/i18n/locales/zh-TW/chat.json index 69804c0f8f4..1e228773550 100644 --- a/webview-ui/src/i18n/locales/zh-TW/chat.json +++ b/webview-ui/src/i18n/locales/zh-TW/chat.json @@ -105,10 +105,15 @@ }, "current": "當前" }, + "instructions": { + "wantsToFetch": "Roo想要獲取詳細指示以協助目前任務" + }, "fileOperations": { "wantsToRead": "Roo想讀取此檔案:", + "wantsToReadOutsideWorkspace": "Roo想讀取此工作區外的檔案:", "didRead": "Roo已讀取此檔案:", "wantsToEdit": "Roo想編輯此檔案:", + "wantsToEditOutsideWorkspace": "Roo想編輯此工作區外的檔案:", "wantsToCreate": "Roo想創建新檔案:" }, "directoryOperations": { diff --git a/webview-ui/src/i18n/locales/zh-TW/common.json b/webview-ui/src/i18n/locales/zh-TW/common.json index 40f2534e471..2a10002acb4 100644 --- a/webview-ui/src/i18n/locales/zh-TW/common.json +++ b/webview-ui/src/i18n/locales/zh-TW/common.json @@ -1,7 +1,7 @@ { "number_format": { - "thousand_suffix": "千", - "million_suffix": "百萬", - "billion_suffix": "十億" + "thousand_suffix": "k", + "million_suffix": "m", + "billion_suffix": "b" } } diff --git a/webview-ui/src/i18n/locales/zh-TW/prompts.json b/webview-ui/src/i18n/locales/zh-TW/prompts.json index 0eb5c58d925..496c5802325 100644 --- a/webview-ui/src/i18n/locales/zh-TW/prompts.json +++ b/webview-ui/src/i18n/locales/zh-TW/prompts.json @@ -91,13 +91,13 @@ "TERMINAL_EXPLAIN": { "label": "解釋終端命令", "description": "獲取對終端命令及其輸出的詳細解釋。可在終端右鍵選單(右鍵點擊選中的終端內容)中使用。" + }, + "NEW_TASK": { + "label": "開始新工作", + "description": "使用輸入內容開始新工作。可在命令選擇區中使用。" } } }, - "customModeCreation": { - "enableTitle": "透過提示詞啟用自訂模式建立", - "description": "啟用後,Roo允許您使用類似\"為我建立一個自訂模式,它可以...\"的提示詞來建立自訂模式。禁用此功能可以在不需要時減少系統提示詞約700個token。禁用後您仍然可以透過上方的+按鈕或編輯相關設定JSON手動建立自訂模式。" - }, "advancedSystemPrompt": { "title": "進階:覆寫系統提示詞", "description": "您可以透過在工作區建立檔案.roo/system-prompt-{{slug}}來完全替換此模式的系統提示詞(角色定義和自訂指令除外)。這是一個非常進階的功能,會繞過內建的安全措施和一致性檢查(尤其是圍繞工具使用的檢查),請謹慎使用!" diff --git a/webview-ui/src/i18n/locales/zh-TW/settings.json b/webview-ui/src/i18n/locales/zh-TW/settings.json index a2778f5bb8c..071d307def7 100644 --- a/webview-ui/src/i18n/locales/zh-TW/settings.json +++ b/webview-ui/src/i18n/locales/zh-TW/settings.json @@ -9,22 +9,22 @@ "header": { "title": "設定", "saveButtonTooltip": "儲存變更", - "nothingChangedTooltip": "沒有變更", - "doneButtonTooltip": "捨棄未儲存的變更並關閉設定面板" + "nothingChangedTooltip": "無任何變更", + "doneButtonTooltip": "取消未保存的變更並關閉設定面板" }, "unsavedChangesDialog": { - "title": "未儲存的變更", - "description": "是否捨棄變更並繼續?", + "title": "未保存的變更", + "description": "是否要取消變更並繼續?", "cancelButton": "取消", - "discardButton": "捨棄變更" + "discardButton": "取消變更" }, "sections": { "providers": "提供者", - "autoApprove": "自動核准", - "browser": "瀏覽器 / 電腦使用", + "autoApprove": "自動批准", + "browser": "瀏覽器/電腦使用", "checkpoints": "檢查點", "notifications": "通知", - "contextManagement": "內容管理", + "contextManagement": "上下文管理", "terminal": "終端機", "advanced": "進階", "experimental": "實驗性功能", @@ -32,75 +32,83 @@ "about": "關於 Roo Code" }, "autoApprove": { - "description": "允許 Roo 自動執行操作而無需核准。僅在您完全信任 AI 並理解相關安全風險的情況下啟用這些設定。", + "description": "允許 Roo 無需批准即執行操作。僅在您完全信任 AI 並了解相關安全風險時啟用這些設定。", "readOnly": { - "label": "始終核准唯讀操作", - "description": "啟用後,Roo 將自動檢視目錄內容並讀取檔案,無需點擊核准按鈕。" + "label": "始終批准只讀操作", + "description": "啟用後,Roo 將自動查看目錄內容和讀取文件,無需點擊批准按鈕。", + "outsideWorkspace": { + "label": "包含工作區外的檔案", + "description": "允許 Roo 讀取當前工作區外的檔案,無需批准。" + } }, "write": { - "label": "始終核准寫入操作", - "description": "自動建立和編輯檔案而無需核准", - "delayLabel": "寫入後延遲以允許診斷偵測潛在問題" + "label": "始終批准寫入操作", + "description": "自動建立和編輯文件而無需批准", + "delayLabel": "寫入後延遲以允許診斷檢測潛在問題", + "outsideWorkspace": { + "label": "包含工作區外的檔案", + "description": "允許 Roo 在當前工作區外建立和編輯檔案,無需批准。" + } }, "browser": { - "label": "始終核准瀏覽器操作", - "description": "自動執行瀏覽器操作而無需核准", - "note": "注意:僅當模型支援電腦使用時適用" + "label": "始終批准瀏覽器操作", + "description": "自動執行瀏覽器操作而無需批准", + "note": "注意:僅適用於模型支援電腦使用時" }, "retry": { "label": "始終重試失敗的 API 請求", - "description": "當伺服器傳回錯誤回應時自動重試失敗的 API 請求", + "description": "當伺服器返回錯誤響應時自動重試失敗的 API 請求", "delayLabel": "重試請求前的延遲" }, "mcp": { - "label": "始終核准 MCP 工具", - "description": "在 MCP 伺服器檢視中啟用個別 MCP 工具的自動核准(需要此設定和工具的\"始終允許\"核取方塊)" + "label": "始終批准 MCP 工具", + "description": "在 MCP 伺服器檢視中啟用單個 MCP 工具的自動批准(需要此設定和工具的「始終允許」核取方框)" }, "modeSwitch": { - "label": "始終核准模式切換", - "description": "自動在不同模式之間切換而無需核准" + "label": "始終批准模式切換", + "description": "自動在不同模式之間切換而無需批准" }, "subtasks": { - "label": "始終核准子任務的建立和完成", - "description": "允許建立和完成子任務而無需核准" + "label": "始終批准子任務的建立與完成", + "description": "允許建立和完成子任務而無需批准" }, "execute": { - "label": "始終核准允許的執行操作", - "description": "自動執行允許的終端機命令而無需核准", - "allowedCommands": "允許的自動執行命令", - "allowedCommandsDescription": "當\"始終核准執行操作\"啟用時可以自動執行的命令前綴。添加 * 以允許所有命令(謹慎使用)。", - "commandPlaceholder": "輸入命令前綴(例如 'git ')", + "label": "始終批准允許的執行操作", + "description": "自動執行允許的終端機指令而無需批准", + "allowedCommands": "允許自動執行的指令", + "allowedCommandsDescription": "當「始終批准執行操作」啟用時可自動執行的指令前綴。加入 * 以允許所有指令(謹慎使用)。", + "commandPlaceholder": "輸入指令前綴(例如:git )", "addButton": "新增" } }, "providers": { - "configProfile": "設定檔案", + "configProfile": "配置設定檔", "description": "儲存不同的 API 設定以快速切換提供者和設定。", "apiProvider": "API 提供者", "model": "模型", - "nameEmpty": "名稱不能為空", + "nameEmpty": "名稱不可為空", "nameExists": "已存在同名的設定檔", "deleteProfile": "刪除設定檔", - "invalidArnFormat": "無效的 ARN 格式。請檢查上面的範例。", + "invalidArnFormat": "ARN 格式無效。請檢查上方示例。", "enterNewName": "輸入新名稱", "addProfile": "新增設定檔", "renameProfile": "重新命名設定檔", - "newProfile": "新建設定檔", + "newProfile": "新配置設定檔", "enterProfileName": "輸入設定檔名稱", "createProfile": "建立設定檔", "cannotDeleteOnlyProfile": "無法刪除唯一的設定檔", - "vscodeLmDescription": "VS Code 語言模型 API 允許您運行其他 VS Code 擴展提供的模型(包括但不限於 GitHub Copilot)。最簡單的方式是從 VS Code Marketplace 安裝 Copilot 和 Copilot Chat 擴展。", - "awsCustomArnUse": "輸入您要使用的模型的有效 AWS Bedrock ARN。格式範例:", - "awsCustomArnDesc": "確保 ARN 中的區域與您上面選擇的 AWS 區域匹配。", + "vscodeLmDescription": "VS Code 語言模型 API 可讓您執行其他擴充功能(如 GitHub Copilot)提供的模型。最快捷的方式是從 VS Code 市集安裝 Copilot 和 Copilot Chat 擴充功能。", + "awsCustomArnUse": "輸入要使用的模型有效 AWS Bedrock ARN。格式範例:", + "awsCustomArnDesc": "確保 ARN 中的區域與您選擇的 AWS 區域相符。", "openRouterApiKey": "OpenRouter API 金鑰", "getOpenRouterApiKey": "取得 OpenRouter API 金鑰", - "apiKeyStorageNotice": "API 金鑰安全儲存在 VSCode 的秘密儲存中", + "apiKeyStorageNotice": "API 金鑰安全儲存於 VSCode 金鑰儲存中", "glamaApiKey": "Glama API 金鑰", "getGlamaApiKey": "取得 Glama API 金鑰", - "useCustomBaseUrl": "使用自訂基礎 URL", + "useCustomBaseUrl": "使用自定義基礎 URL", "requestyApiKey": "Requesty API 金鑰", "getRequestyApiKey": "取得 Requesty API 金鑰", - "openRouterTransformsText": "將提示和訊息鏈壓縮到內容大小 (OpenRouter 轉換)", + "openRouterTransformsText": "將提示和訊息鏈壓縮到上下文大小 (OpenRouter 轉換)", "anthropicApiKey": "Anthropic API 金鑰", "getAnthropicApiKey": "取得 Anthropic API 金鑰", "deepSeekApiKey": "DeepSeek API 金鑰", @@ -111,109 +119,109 @@ "openAiBaseUrl": "基礎 URL", "getOpenAiApiKey": "取得 OpenAI API 金鑰", "mistralApiKey": "Mistral API 金鑰", - "getMistralApiKey": "取得 Mistral / Codestral API 金鑰", - "codestralBaseUrl": "Codestral 基礎 URL(選用)", - "codestralBaseUrlDesc": "設定 Codestral 模型的替代 URL。", - "awsCredentials": "AWS 憑證", - "awsProfile": "AWS 設定檔", - "awsProfileName": "AWS 設定檔名稱", + "getMistralApiKey": "取得 Mistral/Codestral API 金鑰", + "codestralBaseUrl": "Codestral 基礎 URL(可選)", + "codestralBaseUrlDesc": "設置 Codestral 模型的替代 URL。", + "awsCredentials": "AWS 認證", + "awsProfile": "AWS 個人設定", + "awsProfileName": "AWS 個人設定名稱", "awsAccessKey": "AWS 存取金鑰", - "awsSecretKey": "AWS 秘密金鑰", - "awsSessionToken": "AWS 工作階段權杖", + "awsSecretKey": "AWS 機密金鑰", + "awsSessionToken": "AWS 會話權杖", "awsRegion": "AWS 區域", "awsCrossRegion": "使用跨區域推論", - "vscodeLmModel": "VSCode LM 模型", - "vscodeLmWarning": "注意:這是一個非常實驗性的集成,提供者支援會有所不同。如果您收到有關不支援模型的錯誤,那麼這是提供者方面的問題。", + "vscodeLmModel": "語言模型", + "vscodeLmWarning": "注意:此為實驗性整合,提供者支援可能不同。若遇到模型不支援錯誤,請聯繫提供者。", "googleCloudSetup": { "title": "要使用 Google Cloud Vertex AI,您需要:", - "step1": "1. 建立 Google Cloud 帳戶,啟用 Vertex AI API 並啟用所需的 Claude 模型。", + "step1": "1. 建立 Google Cloud 帳戶,啟用 Vertex AI API 並啟用所需 Claude 模型。", "step2": "2. 安裝 Google Cloud CLI 並設定應用程式預設憑證。", - "step3": "3. 或建立具有憑證的服務帳戶。" + "step3": "3. 或建立具憑證的服務帳戶。" }, "googleCloudCredentials": "Google Cloud 憑證", "googleCloudKeyFile": "Google Cloud 金鑰檔案路徑", "googleCloudProjectId": "Google Cloud 專案 ID", "googleCloudRegion": "Google Cloud 區域", "lmStudio": { - "baseUrl": "基礎 URL(選用)", + "baseUrl": "基礎 URL(可選)", "modelId": "模型 ID", - "speculativeDecoding": "啟用推測解碼", + "speculativeDecoding": "啟用預測性解碼", "draftModelId": "草稿模型 ID", - "draftModelDesc": "推測解碼要正確運作,草稿模型必須來自相同的模型系列。", + "draftModelDesc": "草稿模型必須來自相同模型系列才能正確運作。", "selectDraftModel": "選擇草稿模型", - "noModelsFound": "找不到草稿模型。請確保 LM Studio 已在伺服器模式下執行。", - "description": "LM Studio 允許您在本機電腦上執行模型。關於如何開始使用,請參閱他們的快速入門指南。您還需要啟動 LM Studio 的本機伺服器功能才能與此擴充功能一起使用。注意:Roo Code 使用複雜的提示,並在 Claude 模型上運作最佳。功能較弱的模型可能無法如預期運作。" + "noModelsFound": "未找到草稿模型。請確保 LM Studio 以伺服器模式運行。", + "description": "LM Studio 允許您在本地電腦運行模型。詳細資訊請參閱快速入門指南。您需要啟動 LM Studio 的本地伺服器功能才能與此擴充功能搭配使用。注意: Roo Code 使用複雜提示,與 Claude 模型搭配最佳。功能較弱的模型可能無法正常運作。" }, "ollama": { - "baseUrl": "基礎 URL(選用)", + "baseUrl": "基礎 URL(可選)", "modelId": "模型 ID", - "description": "Ollama 允許您在本機電腦上執行模型。關於如何開始使用,請參閱快速入門指南。", - "warning": "注意:Roo Code 使用複雜的提示,並在 Claude 模型上運作最佳。功能較弱的模型可能無法如預期運作。" + "description": "Ollama 允許您在本地電腦運行模型。請參閱快速入門指南。", + "warning": "注意:Roo Code 使用複雜提示,與 Claude 模型搭配最佳。功能較弱的模型可能無法正常運作。" }, "unboundApiKey": "Unbound API 金鑰", "getUnboundApiKey": "取得 Unbound API 金鑰", "humanRelay": { - "description": "不需要 API 金鑰,但使用者需要協助將資訊複製並貼上到網頁聊天 AI。", - "instructions": "使用期間會彈出對話框,並自動將目前訊息複製到剪貼簿。您需要將這些內容貼上到網頁版 AI(如 ChatGPT 或 Claude),然後將 AI 的回覆複製回對話框並點擊確認按鈕。" + "description": "無需 API 金鑰,但使用者需協助將資訊複製到網頁聊天 AI。", + "instructions": "使用期間,對話方格會彈出且當前訊息會自動複製到剪貼簿。您需將其貼到 ChatGPT 或 Claude 網頁版,再將 AI 回應複製回對話方塊並點擊確認按鈕。" }, "openRouter": { "providerRouting": { "title": "OpenRouter 提供者路由", - "description": "OpenRouter 將請求路由到適合您模型的最佳可用提供者。預設情況下,請求會在頂級提供者之間進行負載平衡以最大化正常運行時間。但是,您可以為此模型選擇特定的提供者。", - "learnMore": "了解更多關於提供者路由的資訊" + "description": "OpenRouter 會將請求路由到適合模型的最佳提供者。預設會在頂尖提供者之間負載平衡以確保正常運作時間。您可為此模型選擇特定提供者。", + "learnMore": "了解更多關於提供者路由" } }, "customModel": { - "capabilities": "設定您的自訂 OpenAI 相容模型的功能和定價。請謹慎指定模型功能,因為它們會影響 Roo Code 的效能。", + "capabilities": "設定自定義 OpenAI 相容模型的功能和定價。指定功能時需謹慎。", "maxTokens": { - "label": "最大輸出權杖", - "description": "模型在回應中可以生成的最大權杖數。(指定 -1 以允許伺服器設定最大權杖數。)" + "label": "最大輸出トークン", + "description": "模型回應可產生的最大トークン數。(指定 -1 使用伺服器設定最大值)" }, "contextWindow": { - "label": "內容視窗大小", - "description": "模型可以處理的總權杖數(輸入 + 輸出)。" + "label": "上下文視窗大小", + "description": "模型可處理的總トークン數(輸入+輸出)" }, "imageSupport": { - "label": "圖像支援", - "description": "此模型是否能夠處理和理解圖像?" + "label": "影像支援", + "description": "此模型是否能處理和理解影像?" }, "computerUse": { "label": "電腦使用", - "description": "此模型是否能夠與瀏覽器互動?(例如 Claude 3.7 Sonnet)" + "description": "此模型能否與瀏覽器互動?(例如 Claude 3.7 Sonnet)" }, "promptCache": { "label": "提示快取", - "description": "此模型是否能夠快取提示?" + "description": "此模型是否能快取提示?" }, "pricing": { "input": { "label": "輸入價格", - "description": "輸入/提示每百萬權杖的成本。這會影響向模型發送內容和指令的成本。" + "description": "每百萬輸入/提示トークン的費用" }, "output": { "label": "輸出價格", - "description": "模型回應每百萬權杖的成本。這會影響生成內容和完成的成本。" + "description": "模型回應每百萬トークン的費用" }, "cacheReads": { "label": "快取讀取價格", - "description": "從快取讀取每百萬權杖的成本。這是檢索快取回應時收取的價格。" + "description": "讀取快取時的費用" }, "cacheWrites": { "label": "快取寫入價格", - "description": "寫入快取每百萬權杖的成本。這是首次快取提示時收取的價格。" + "description": "首次將提示寫入快取時的費用" } }, - "resetDefaults": "重設為預設值" + "resetDefaults": "重設預設值" } }, "browser": { "enable": { "label": "啟用瀏覽器工具", - "description": "啟用後,Roo 可以在使用支援電腦使用的模型時使用瀏覽器與網站互動。" + "description": "啟用後,Roo 可在使用支援電腦使用的模型時使用瀏覽器互動。" }, "viewport": { - "label": "視窗大小", - "description": "選擇瀏覽器互動的視窗大小。這會影響網站的顯示方式和互動方式。", + "label": "視口大小", + "description": "選擇瀏覽器互動的視口大小。", "options": { "largeDesktop": "大型桌面 (1280x800)", "smallDesktop": "小型桌面 (900x600)", @@ -223,122 +231,123 @@ }, "screenshotQuality": { "label": "截圖品質", - "description": "調整瀏覽器截圖的 WebP 品質。較高的值提供更清晰的截圖,但會增加 token 使用量。" + "description": "調整瀏覽器截圖的 WebP 品質。較高值會增加 token 使用量。" }, "remote": { "label": "使用遠端瀏覽器連線", - "description": "連線到啟用遠端偵錯的 Chrome 瀏覽器 (--remote-debugging-port=9222)。", - "urlPlaceholder": "自訂 URL(例如 http://localhost:9222)", + "description": "連線到啟用遠端除錯的 Chrome 瀏覽器(--remote-debugging-port=9222)。", + "urlPlaceholder": "自定義 URL(例如 http://localhost:9222)", "testButton": "測試連線", "testingButton": "測試中...", - "instructions": "輸入 DevTools 協議主機地址或留空以自動探索本地 Chrome 實例。測試連線按鈕將嘗試使用自訂 URL(如果提供),或者如果欄位為空則自動探索。" + "instructions": "輸入 DevTools 協定主機位址或留空以自動發現本機 Chrome 執行個體。" } }, "checkpoints": { "enable": { "label": "啟用自動檢查點", - "description": "啟用後,Roo 將在任務執行期間自動建立檢查點,使審核變更或返回到早期狀態變得容易。" + "description": "啟用後,Roo 將在任務執行期間自動建立檢查點。" } }, "notifications": { "sound": { "label": "啟用音效", - "description": "啟用後,Roo 將為通知和事件播放音效。", + "description": "啟用後,Roo 將為通知播放音效", "volumeLabel": "音量" }, "tts": { "label": "啟用文字轉語音", - "description": "啟用後,Roo 將使用文字轉語音功能朗讀其回應。", + "description": "啟用後,Roo 將使用文字轉語音朗讀回應", "speedLabel": "速度" } }, "contextManagement": { - "description": "控制在 AI 的內容視窗中包含哪些資訊,影響 token 使用和回應品質", + "description": "控制 AI 上下文視窗包含的資訊,影響 token 使用和回應品質", "openTabs": { - "label": "開啟分頁內容限制", - "description": "在內容中包含的 VSCode 開啟分頁的最大數量。較高的值提供更多內容,但會增加 token 使用量。" + "label": "開啟的分頁上下文限制", + "description": "最多包含的 VSCode 開啟分頁數" }, "workspaceFiles": { - "label": "工作區檔案內容限制", - "description": "在目前工作目錄詳細資訊中包含的最大檔案數。較高的值提供更多內容,但會增加 token 使用量。" + "label": "工作區檔案上下文限制", + "description": "最多包含的當前工作目錄詳細資訊檔案數" }, "rooignore": { - "label": "在列表和搜尋中顯示 .rooignore 檔案", - "description": "啟用後,與 .rooignore 中模式匹配的檔案將在列表中顯示鎖定符號。禁用時,這些檔案將從檔案列表和搜尋中完全隱藏。" + "label": "顯示 .rooignore 檔案", + "description": "啟用後,符合 .rooignore 模式之檔案會顯示上鎖符號" }, "maxReadFile": { - "label": "從檔案讀取的最大行數", - "description": "一次從檔案讀取的最大行數。較低的值會減少內容/資源使用,但可能需要對大型檔案進行更多次讀取。" + "label": "檔案讀取自動截斷閾值", + "description": "預設讀取檔案的行數", + "lines": "行" } }, "terminal": { "outputLineLimit": { "label": "終端機輸出限制", - "description": "執行命令時在終端機輸出中包含的最大行數。超過時將從中間刪除行,節省 token。" + "description": "執行指令時包含的最大行數" }, "shellIntegrationTimeout": { - "label": "終端機 Shell 整合逾時", - "description": "執行命令前等待 Shell 整合初始化的最長時間。對於 Shell 啟動時間較長的使用者,如果在終端機中看到\"Shell Integration Unavailable\"錯誤,可能需要增加此值。" + "label": "終端機 shell 綜合超時", + "description": "shell 綜合初始化的最長等待時間" } }, "advanced": { "rateLimit": { "label": "速率限制", - "description": "API 請求之間的最小時間。" + "description": "API 請求間的最短時間" }, "diff": { - "label": "啟用透過差異編輯", - "description": "啟用後,Roo 將能夠更快地編輯檔案,並將自動拒絕截斷的完整檔案寫入。與最新的 Claude 3.7 Sonnet 模型搭配最佳。", + "label": "啟用 diff 編輯", + "description": "啟用後可更快編輯文件並自動拒絕不完整的完整文件寫入", "strategy": { - "label": "Diff 策略", + "label": "diff 策略", "options": { - "standard": "標準(單塊)", - "multiBlock": "實驗性:多塊 diff", + "standard": "標準(單一區塊)", + "multiBlock": "實驗性:多區塊 diff", "unified": "實驗性:統一 diff" }, "descriptions": { - "standard": "標準 diff 策略一次對一個程式碼塊應用變更。", - "unified": "統一 diff 策略採用多種方法應用差異並選擇最佳方法。", - "multiBlock": "多塊 diff 策略允許在一個請求中更新檔案中的多個程式碼塊。" + "standard": "每次修改單一程式區塊", + "multiBlock": "單次請求更新多個程式區塊", + "unified": "多種 diff 方法選擇最佳方案" } }, "matchPrecision": { - "label": "匹配精度", - "description": "此滑桿控制應用差異時程式碼部分必須匹配的精確度。較低的值允許更靈活的匹配,但會增加錯誤替換的風險。極其謹慎地使用低於 100% 的值。" + "label": "匹配精確度", + "description": "此滑桿控制應用 diff 時程式區塊的匹配精確度" } } }, "experimental": { "warning": "⚠️", "DIFF_STRATEGY": { - "name": "使用實驗性統一差異策略", - "description": "啟用實驗性統一差異策略。此策略可能減少由模型錯誤引起的重試次數,但可能導致意外行為或不正確的編輯。僅在您了解風險並願意仔細審查所有更改時才啟用。" + "name": "使用實驗性統一 diff 策略", + "description": "此實驗性策略可能減少模型錯誤導致的重試次數,但需謹慎使用" }, "SEARCH_AND_REPLACE": { - "name": "使用實驗性搜索和替換工具", - "description": "啟用實驗性搜索和替換工具,允許 Roo 在一個請求中替換搜索詞的多個實例。" + "name": "使用實驗性搜尋與取代工具", + "description": "允許 Roo 在單一請求中取代多個搜尋詞實例" }, "INSERT_BLOCK": { "name": "使用實驗性插入內容工具", - "description": "啟用實驗性插入內容工具,允許 Roo 在特定行號插入內容,無需創建差異。" + "description": "允許在特定行號插入內容而無需建立 diff" }, "POWER_STEERING": { - "name": "使用實驗性\"動力轉向\"模式", - "description": "啟用後,Roo 將更頻繁地提醒模型關於其當前模式定義的詳細信息。這將導致對角色定義和自定義指令的更強遵守,但每條消息將使用更多 token。" + "name": "使用實驗性「動力轉向」模式", + "description": "此模式會更頻繁地提醒模型其角色定義" }, "MULTI_SEARCH_AND_REPLACE": { - "name": "使用實驗性多塊差異工具", - "description": "啟用後,Roo 將使用多塊差異工具。這將嘗試在一個請求中更新文件中的多個代碼塊。" + "name": "使用實驗性多區塊 diff 工具", + "description": "單次請求更新檔案中的多個程式區塊" } }, "temperature": { - "useCustom": "使用自訂溫度", - "description": "控制模型回應中的隨機性。", - "rangeDescription": "較高的值使輸出更隨機,較低的值使其更確定性。" + "useCustom": "使用自定義溫度", + "description": "控制模型回應的隨機性", + "rangeDescription": "較高值使輸出更隨機,較低值更確定" }, "modelInfo": { - "supportsImages": "支援圖像", - "noImages": "不支援圖像", + "supportsImages": "支援影像", + "noImages": "不支援影像", "supportsComputerUse": "支援電腦使用", "noComputerUse": "不支援電腦使用", "supportsPromptCache": "支援提示快取", @@ -348,81 +357,83 @@ "outputPrice": "輸出價格", "cacheReadsPrice": "快取讀取價格", "cacheWritesPrice": "快取寫入價格", - "enableStreaming": "啟用串流媒體", + "enableStreaming": "啟用串流", + "enableR1Format": "啟用R1模型參數", + "enableR1FormatTips": "當使用QWQ等類R1模型時需啟用,防止400錯誤", "useAzure": "使用 Azure", "azureApiVersion": "設定 Azure API 版本", "gemini": { - "freeRequests": "* 每分鐘免費 {{count}} 個請求。之後,計費取決於提示大小。", - "pricingDetails": "有關更多資訊,請參閱定價詳情。" + "freeRequests": "* 每分鐘免費 {{count}} 次請求。超過後依提示大小計費。", + "pricingDetails": "查看定價細節" } }, "modelPicker": { - "automaticFetch": "擴充功能會自動獲取 {{serviceName}} 上可用的最新模型列表。如果您不確定選擇哪個模型,Roo Code 與 {{defaultModelId}} 配合最佳。您還可以搜尋\"free\"以尋找目前可用的免費選項。", + "automaticFetch": "擴充功能會自動取得 {{serviceName}} 上最新模型列表。若不確定選擇,Roo Code 與 {{defaultModelId}} 搭配最佳。", "label": "模型", "searchPlaceholder": "搜尋", "noMatchFound": "未找到相符項目", - "useCustomModel": "使用自訂: {{modelId}}" + "useCustomModel": "使用自定義模型:{{modelId}}" }, "footer": { - "feedback": "如果您有任何問題或反饋,請隨時在 github.com/RooVetGit/Roo-Code 上提出問題或加入 reddit.com/r/RooCodediscord.gg/roocode", + "feedback": "若有問題或建議,請在 GitHub 建立 issue 或加入 Discord", "version": "Roo Code v{{version}}", "telemetry": { - "label": "允許匿名錯誤和使用情況報告", - "description": "透過發送匿名使用資料和錯誤報告來幫助改進 Roo Code。絕不會發送程式碼、提示或個人資訊。有關更多詳細資訊,請參閱我們的隱私政策。" + "label": "允許匿名錯誤和使用報告", + "description": "匿名資料協助改善 Roo Code,絕不傳送程式碼或個人資訊" }, "reset": { - "description": "重設擴充功能中的所有全域狀態和秘密儲存。", + "description": "重設擴充功能的全局狀態和金鑰儲存", "button": "重設" } }, "thinkingBudget": { - "maxTokens": "最大 tokens", - "maxThinkingTokens": "最大思考 tokens" + "maxTokens": "最大 token 數", + "maxThinkingTokens": "最大思考 token 數" }, "validation": { - "apiKey": "您必須提供有效的 API 金鑰。", - "awsRegion": "您必須選擇一個區域來使用 AWS Bedrock。", - "googleCloud": "您必須提供有效的 Google Cloud 專案 ID 和區域。", - "modelId": "您必須提供有效的模型 ID。", - "modelSelector": "您必須提供有效的模型選擇器。", - "openAi": "您必須提供有效的基礎 URL、API 金鑰和模型 ID。", + "apiKey": "需要有效 API 金鑰", + "awsRegion": "請選擇 AWS 區域", + "googleCloud": "需要有效的 Google Cloud 專案 ID 和區域", + "modelId": "需要有效模型 ID", + "modelSelector": "需要有效模型選擇器", + "openAi": "需要有效的基礎 URL、API 金鑰和模型 ID", "arn": { - "invalidFormat": "ARN 格式無效。請檢查格式要求。", - "regionMismatch": "警告:您的 ARN 中的區域 ({{arnRegion}}) 與您選擇的區域 ({{region}}) 不符。這可能會導致存取問題。提供者將使用 ARN 中的區域。" + "invalidFormat": "ARN 格式無效", + "regionMismatch": "ARN 區域與選擇的區域不匹配" }, - "modelAvailability": "您提供的模型 ID ({{modelId}}) 無法使用。請選擇其他模型。" + "modelAvailability": "該模型 ID 不可用" }, "placeholders": { - "apiKey": "請輸入 API 金鑰...", - "profileName": "請輸入設定檔名稱", - "accessKey": "請輸入存取金鑰...", - "secretKey": "請輸入密鑰...", - "sessionToken": "請輸入工作階段權杖...", - "credentialsJson": "請輸入憑證 JSON...", - "keyFilePath": "請輸入金鑰檔案路徑...", - "projectId": "請輸入專案 ID...", - "customArn": "請輸入 ARN(例:arn:aws:bedrock:us-east-1:123456789012:foundation-model/my-model)", - "baseUrl": "請輸入基礎 URL...", + "apiKey": "輸入 API 金鑰...", + "profileName": "輸入設定檔名稱", + "accessKey": "輸入存取金鑰...", + "secretKey": "輸入機密金鑰...", + "sessionToken": "輸入會話權杖...", + "credentialsJson": "輸入憑證 JSON...", + "keyFilePath": "輸入金鑰檔案路徑...", + "projectId": "輸入專案 ID...", + "customArn": "ARN 範例:arn:aws:bedrock:...", + "baseUrl": "輸入基礎 URL...", "modelId": { - "lmStudio": "例:meta-llama-3.1-8b-instruct", - "lmStudioDraft": "例:lmstudio-community/llama-3.2-1b-instruct", - "ollama": "例:llama3.1" + "lmStudio": "範例:meta-llama-3.1-8b-instruct", + "lmStudioDraft": "範例:lmstudio-community/llama-3.2-1b-instruct", + "ollama": "範例:llama3.1" }, "numbers": { - "maxTokens": "例:4096", - "contextWindow": "例:128000", - "inputPrice": "例:0.0001", - "outputPrice": "例:0.0002", - "cacheWritePrice": "例:0.00005" + "maxTokens": "範例:4096", + "contextWindow": "範例:128000", + "inputPrice": "範例:0.0001", + "outputPrice": "範例:0.0002", + "cacheWritePrice": "範例:0.00005" } }, "defaults": { - "ollamaUrl": "預設值:http://localhost:11434", - "lmStudioUrl": "預設值:http://localhost:1234", - "geminiUrl": "預設值:https://generativelanguage.googleapis.com" + "ollamaUrl": "預設:http://localhost:11434", + "lmStudioUrl": "預設:http://localhost:1234", + "geminiUrl": "預設:https://generativelanguage.googleapis.com" }, "labels": { - "customArn": "自訂 ARN", - "useCustomArn": "使用自訂 ARN..." + "customArn": "自定義 ARN", + "useCustomArn": "使用自定義 ARN..." } } diff --git a/webview-ui/src/i18n/locales/zh-TW/welcome.json b/webview-ui/src/i18n/locales/zh-TW/welcome.json index d3b912215c7..4d987628072 100644 --- a/webview-ui/src/i18n/locales/zh-TW/welcome.json +++ b/webview-ui/src/i18n/locales/zh-TW/welcome.json @@ -1,14 +1,27 @@ { "greeting": "嗨,我是 Roo!", - "introduction": "由於最新的代理編碼能力突破,以及能夠讓我創建和編輯文件、探索複雜項目、使用瀏覽器和執行終端命令的工具(當然是在您的許可下),我可以完成各種任務。我甚至可以使用 MCP 創建新工具並擴展自己的能力。", + "introduction": "由於最新的代理編碼能力突破,以及能夠讓我創建和編輯文件、探索複雜項目、使用瀏覽器和執行終端命令的工具(當然是在你的許可下),我可以完成各種任務。我甚至可以使用 MCP 創建新工具並擴展自己的能力。", "notice": "要開始使用,此擴展需要一個 API 提供者。", "start": "我們開始吧!", + "chooseProvider": "選擇一個 API 提供者開始:", + "routers": { + "requesty": { + "description": "你的優化 LLM 路由器", + "incentive": "$1 免費額度" + }, + "openrouter": { + "description": "LLM 的統一接口" + } + }, + "startRouter": "通過路由器快速設置", + "startCustom": "使用你自己的 API 密鑰", "telemetry": { "title": "幫助改進 Roo Code", "anonymousTelemetry": "發送匿名的錯誤和使用數據,以幫助我們修復錯誤並改進擴展功能。不會發送任何代碼、提示或個人信息。", - "changeSettings": "您隨時可以在設置底部更改此選項", + "changeSettings": "你隨時可以在設置底部更改此選項", "settings": "設置", "allow": "允許", "deny": "拒絕" - } + }, + "or": "或" } diff --git a/webview-ui/src/oauth/urls.ts b/webview-ui/src/oauth/urls.ts new file mode 100644 index 00000000000..46a1815377c --- /dev/null +++ b/webview-ui/src/oauth/urls.ts @@ -0,0 +1,16 @@ +export function getCallbackUrl(provider: string, uriScheme?: string) { + const callbackUrl = `${uriScheme || "vscode"}://rooveterinaryinc.roo-cline/${provider}` + return encodeURIComponent(callbackUrl) +} + +export function getGlamaAuthUrl(uriScheme?: string) { + return `https://glama.ai/oauth/authorize?callback_url=${getCallbackUrl("glama", uriScheme)}` +} + +export function getOpenRouterAuthUrl(uriScheme?: string) { + return `https://openrouter.ai/auth?callback_url=${getCallbackUrl("openrouter", uriScheme)}` +} + +export function getRequestyAuthUrl(uriScheme?: string) { + return `https://app.requesty.ai/oauth/authorize?callback_url=${getCallbackUrl("requesty", uriScheme)}` +} diff --git a/webview-ui/src/types.d.ts b/webview-ui/src/types.d.ts new file mode 100644 index 00000000000..ff5ef47841a --- /dev/null +++ b/webview-ui/src/types.d.ts @@ -0,0 +1,5 @@ +// Type declarations for third-party modules + +declare module "knuth-shuffle-seeded" { + export default function knuthShuffle(array: T[], seed: any): T[] +} diff --git a/webview-ui/src/utils/__tests__/context-mentions.test.ts b/webview-ui/src/utils/__tests__/context-mentions.test.ts index bd3696f191b..c72a26d911f 100644 --- a/webview-ui/src/utils/__tests__/context-mentions.test.ts +++ b/webview-ui/src/utils/__tests__/context-mentions.test.ts @@ -56,6 +56,12 @@ describe("getContextMenuOptions", () => { label: "test.ts", description: "Source file", }, + { + type: ContextMenuOptionType.OpenedFile, + value: "src/opened.ts", + label: "opened.ts", + description: "Currently opened file", + }, { type: ContextMenuOptionType.Git, value: "abc1234", @@ -71,6 +77,18 @@ describe("getContextMenuOptions", () => { }, ] + const mockDynamicSearchResults = [ + { + path: "search/result1.ts", + type: "file" as const, + label: "result1.ts", + }, + { + path: "search/folder", + type: "folder" as const, + }, + ] + it("should return all option types for empty query", () => { const result = getContextMenuOptions("", null, []) expect(result).toHaveLength(6) @@ -86,9 +104,11 @@ describe("getContextMenuOptions", () => { it("should filter by selected type when query is empty", () => { const result = getContextMenuOptions("", ContextMenuOptionType.File, mockQueryItems) - expect(result).toHaveLength(1) - expect(result[0].type).toBe(ContextMenuOptionType.File) - expect(result[0].value).toBe("src/test.ts") + expect(result).toHaveLength(2) + expect(result.map((item) => item.type)).toContain(ContextMenuOptionType.File) + expect(result.map((item) => item.type)).toContain(ContextMenuOptionType.OpenedFile) + expect(result.map((item) => item.value)).toContain("src/test.ts") + expect(result.map((item) => item.value)).toContain("src/opened.ts") }) it("should match git commands", () => { @@ -108,6 +128,188 @@ describe("getContextMenuOptions", () => { expect(result).toHaveLength(1) expect(result[0].type).toBe(ContextMenuOptionType.NoResults) }) + + /** + * Tests for the combined handling of open files, git results, and search results + * Added for commit 3cd7dec78faf786e468ae4f66cef0b81a76d9075 + */ + it("should include dynamic search results along with other matches", () => { + // Add an opened file that will match the query + const testItems = [ + ...mockQueryItems, + { + type: ContextMenuOptionType.OpenedFile, + value: "src/test-opened.ts", + label: "test-opened.ts", + description: "Opened test file for search test", + }, + ] + + const result = getContextMenuOptions("test", null, testItems, mockDynamicSearchResults) + + // Check if opened files and dynamic search results are included + expect(result.some((item) => item.type === ContextMenuOptionType.OpenedFile)).toBe(true) + expect(result.some((item) => item.value === "/search/result1.ts")).toBe(true) + }) + + it("should maintain correct result ordering according to implementation", () => { + // Add multiple item types to test ordering + const result = getContextMenuOptions("t", null, mockQueryItems, mockDynamicSearchResults) + + // Find the different result types + const fileResults = result.filter( + (item) => + item.type === ContextMenuOptionType.File || + item.type === ContextMenuOptionType.OpenedFile || + item.type === ContextMenuOptionType.Folder, + ) + + const searchResults = result.filter( + (item) => item.type === ContextMenuOptionType.File && item.value?.includes("/search/"), + ) + + const gitResults = result.filter((item) => item.type === ContextMenuOptionType.Git) + + // Find the indexes of the first item of each type in the results array + const firstFileIndex = result.findIndex((item) => fileResults.some((f) => f === item)) + + const firstSearchResultIndex = result.findIndex((item) => searchResults.some((s) => s === item)) + + const firstGitResultIndex = result.findIndex((item) => gitResults.some((g) => g === item)) + + // Verify file results come before search results + expect(firstFileIndex).toBeLessThan(firstSearchResultIndex) + + // Verify search results appear before git results + expect(firstSearchResultIndex).toBeLessThan(firstGitResultIndex) + }) + + it("should include opened files when dynamic search results exist", () => { + const result = getContextMenuOptions("open", null, mockQueryItems, mockDynamicSearchResults) + + // Verify opened files are included + expect(result.some((item) => item.type === ContextMenuOptionType.OpenedFile)).toBe(true) + // Verify dynamic search results are also present + expect(result.some((item) => item.value === "/search/result1.ts")).toBe(true) + }) + + it("should include git results when dynamic search results exist", () => { + const result = getContextMenuOptions("commit", null, mockQueryItems, mockDynamicSearchResults) + + // Verify git results are included + expect(result.some((item) => item.type === ContextMenuOptionType.Git)).toBe(true) + // Verify dynamic search results are also present + expect(result.some((item) => item.value === "/search/result1.ts")).toBe(true) + }) + + it("should deduplicate items correctly when combining different result types", () => { + // Create duplicate search result with same path as an existing file + const duplicateSearchResults = [ + { + path: "src/test.ts", // Duplicate of existing file in mockQueryItems + type: "file" as const, + }, + { + path: "unique/path.ts", + type: "file" as const, + }, + ] + + const result = getContextMenuOptions("test", null, mockQueryItems, duplicateSearchResults) + + // Count occurrences of src/test.ts in results + const duplicateCount = result.filter( + (item) => + (item.value === "src/test.ts" || item.value === "/src/test.ts") && + item.type === ContextMenuOptionType.File, + ).length + // With path normalization, these should be treated as duplicates + expect(duplicateCount).toBe(1) + + // Verify the unique item was included (check both path formats) + expect(result.some((item) => item.value === "/unique/path.ts" || item.value === "unique/path.ts")).toBe(true) + }) + + it("should return NoResults when all combined results are empty with dynamic search", () => { + // Use a query that won't match anything + const result = getContextMenuOptions( + "nonexistentquery123456", + null, + mockQueryItems, + [], // Empty dynamic search results + ) + + expect(result).toHaveLength(1) + expect(result[0].type).toBe(ContextMenuOptionType.NoResults) + }) + + /** + * Tests that opened files appear first in the results, according to the updated implementation + * This test validates the updated ordering where opened files have the highest priority + */ + it("should place opened files first in result order", () => { + // Create test data with multiple types that should match the query + const testQuery = "test" // Using "test" as the query to match all items + + const testItems: ContextMenuQueryItem[] = [ + { + type: ContextMenuOptionType.File, + value: "src/test-file.ts", + label: "test-file.ts", + description: "Regular test file", + }, + { + type: ContextMenuOptionType.OpenedFile, + value: "src/test-opened.ts", + label: "test-opened.ts", + description: "Opened test file", + }, + { + type: ContextMenuOptionType.Git, + value: "abctest", + label: "Test commit", + description: "Git test commit", + }, + ] + + const testSearchResults = [ + { + path: "search/test-result.ts", + type: "file" as const, + label: "test-result.ts", + }, + ] + + // Get results for "test" query + const result = getContextMenuOptions(testQuery, null, testItems, testSearchResults) + + // Verify we have results + expect(result.length).toBeGreaterThan(0) + + // Verify the first item is an opened file type + expect(result[0].type).toBe(ContextMenuOptionType.OpenedFile) + + // Verify the remaining items are in the correct order: + // suggestions -> openedFiles -> searchResults -> gitResults + + // Get index of first item of each type + const firstOpenedFileIndex = result.findIndex((item) => item.type === ContextMenuOptionType.OpenedFile) + const firstSearchResultIndex = result.findIndex( + (item) => item.type === ContextMenuOptionType.File && item.value?.includes("/search/"), + ) + const firstGitResultIndex = result.findIndex((item) => item.type === ContextMenuOptionType.Git) + + // Verify opened files come first + expect(firstOpenedFileIndex).toBe(0) + + // Verify search results come after opened files but before git results + expect(firstSearchResultIndex).toBeGreaterThan(firstOpenedFileIndex) + + // Verify git results come after search results + if (firstGitResultIndex !== -1 && firstSearchResultIndex !== -1) { + expect(firstGitResultIndex).toBeGreaterThan(firstSearchResultIndex) + } + }) }) describe("shouldShowContextMenu", () => { diff --git a/webview-ui/src/utils/context-mentions.ts b/webview-ui/src/utils/context-mentions.ts index 463eedb04ea..5d240d8fd2e 100644 --- a/webview-ui/src/utils/context-mentions.ts +++ b/webview-ui/src/utils/context-mentions.ts @@ -210,34 +210,6 @@ export function getContextMenuOptions( } } - if (dynamicSearchResults.length > 0) { - // Convert search results to queryItems format - const searchResultItems = dynamicSearchResults.map((result) => { - const formattedPath = result.path.startsWith("/") ? result.path : `/${result.path}` - - return { - type: result.type === "folder" ? ContextMenuOptionType.Folder : ContextMenuOptionType.File, - value: formattedPath, - label: result.label || path.basename(result.path), - description: formattedPath, - } - }) - - const allItems = [...suggestions, ...searchResultItems] - - // Remove duplicates - const seen = new Set() - const deduped = allItems.filter((item) => { - const key = `${item.type}-${item.value}` - if (seen.has(key)) return false - seen.add(key) - return true - }) - - return deduped - } - - // Fallback to original static filtering if no dynamic results const searchableItems = queryItems.map((item) => ({ original: item, searchStr: [item.value, item.label, item.description].filter(Boolean).join(" "), @@ -252,38 +224,36 @@ export function getContextMenuOptions( const matchingItems = query ? fzf.find(query).map((result) => result.item.original) : [] // Separate matches by type - const fileMatches = matchingItems.filter( - (item) => - item.type === ContextMenuOptionType.File || - item.type === ContextMenuOptionType.OpenedFile || - item.type === ContextMenuOptionType.Folder, - ) + const openedFileMatches = matchingItems.filter((item) => item.type === ContextMenuOptionType.OpenedFile) + const gitMatches = matchingItems.filter((item) => item.type === ContextMenuOptionType.Git) - const otherMatches = matchingItems.filter( - (item) => - item.type !== ContextMenuOptionType.File && - item.type !== ContextMenuOptionType.OpenedFile && - item.type !== ContextMenuOptionType.Folder && - item.type !== ContextMenuOptionType.Git, - ) - - // Combine suggestions with matching items in the desired order - if (suggestions.length > 0 || matchingItems.length > 0) { - const allItems = [...suggestions, ...fileMatches, ...gitMatches, ...otherMatches] - - // Remove duplicates based on type and value - const seen = new Set() - const deduped = allItems.filter((item) => { - const key = `${item.type}-${item.value}` - if (seen.has(key)) return false - seen.add(key) - return true - }) - return deduped - } + // Convert search results to queryItems format + const searchResultItems = dynamicSearchResults.map((result) => { + const formattedPath = result.path.startsWith("/") ? result.path : `/${result.path}` + + return { + type: result.type === "folder" ? ContextMenuOptionType.Folder : ContextMenuOptionType.File, + value: formattedPath, + label: result.label || path.basename(result.path), + description: formattedPath, + } + }) + + const allItems = [...suggestions, ...openedFileMatches, ...searchResultItems, ...gitMatches] + + // Remove duplicates - normalize paths by ensuring all have leading slashes + const seen = new Set() + const deduped = allItems.filter((item) => { + // Normalize paths for deduplication by ensuring leading slashes + const normalizedValue = item.value && !item.value.startsWith("/") ? `/${item.value}` : item.value + const key = `${item.type}-${normalizedValue}` + if (seen.has(key)) return false + seen.add(key) + return true + }) - return [{ type: ContextMenuOptionType.NoResults }] + return deduped.length > 0 ? deduped : [{ type: ContextMenuOptionType.NoResults }] } export function shouldShowContextMenu(text: string, position: number): boolean {