{t("settings:contextManagement.maxReadFile.label")}
-
diff --git a/webview-ui/src/context/ExtensionStateContext.tsx b/webview-ui/src/context/ExtensionStateContext.tsx
index b8c8b3316b..2dcf336c66 100644
--- a/webview-ui/src/context/ExtensionStateContext.tsx
+++ b/webview-ui/src/context/ExtensionStateContext.tsx
@@ -118,6 +118,7 @@ export const mergeExtensionState = (prevState: ExtensionState, newState: Extensi
export const ExtensionStateContextProvider: React.FC<{ children: React.ReactNode }> = ({ children }) => {
const [state, setState] = useState({
version: "",
+ osInfo: "",
clineMessages: [],
taskHistory: [],
shouldShowAnnouncement: false,
diff --git a/webview-ui/src/context/__tests__/ExtensionStateContext.test.tsx b/webview-ui/src/context/__tests__/ExtensionStateContext.test.tsx
index b98137fe99..597b2dab9f 100644
--- a/webview-ui/src/context/__tests__/ExtensionStateContext.test.tsx
+++ b/webview-ui/src/context/__tests__/ExtensionStateContext.test.tsx
@@ -184,6 +184,7 @@ describe("mergeExtensionState", () => {
it("should correctly merge extension states", () => {
const baseState: ExtensionState = {
version: "",
+ osInfo: "unix",
mcpEnabled: false,
enableMcpServerCreation: false,
clineMessages: [],
diff --git a/webview-ui/src/i18n/locales/ca/mcp.json b/webview-ui/src/i18n/locales/ca/mcp.json
index 1f339dd09f..8da2cbb953 100644
--- a/webview-ui/src/i18n/locales/ca/mcp.json
+++ b/webview-ui/src/i18n/locales/ca/mcp.json
@@ -10,7 +10,8 @@
"title": "Habilitar creació de servidors MCP",
"description": "Quan està habilitat, Roo pot ajudar-te a crear nous servidors MCP mitjançant ordres com \"afegir una nova eina per a...\". Si no necessites crear servidors MCP, pots desactivar això per reduir l'ús de tokens de Roo."
},
- "editSettings": "Editar configuració de MCP",
+ "editGlobalMCP": "Editar MCP Global",
+ "editProjectMCP": "Editar MCP del Projecte",
"tool": {
"alwaysAllow": "Permetre sempre",
"parameters": "Paràmetres",
diff --git a/webview-ui/src/i18n/locales/ca/settings.json b/webview-ui/src/i18n/locales/ca/settings.json
index 4ca952528c..598827b3f2 100644
--- a/webview-ui/src/i18n/locales/ca/settings.json
+++ b/webview-ui/src/i18n/locales/ca/settings.json
@@ -276,8 +276,9 @@
},
"maxReadFile": {
"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"
+ "description": "Roo llegeix aquest nombre de línies quan el model omet els valors d'inici/final. Si aquest nombre és menor que el total del fitxer, Roo genera un índex de números de línia de les definicions de codi. Casos especials: -1 indica a Roo que llegeixi tot el fitxer (sense indexació), i 0 indica que no llegeixi cap línia i proporcioni només índexs de línia per a un context mínim. Valors més baixos minimitzen l'ús inicial de context, permetent lectures posteriors de rangs de línies precisos. Les sol·licituds amb inici/final explícits no estan limitades per aquesta configuració.",
+ "lines": "línies",
+ "always_full_read": "Llegeix sempre el fitxer sencer"
}
},
"terminal": {
diff --git a/webview-ui/src/i18n/locales/de/mcp.json b/webview-ui/src/i18n/locales/de/mcp.json
index 2455f20cd0..60332c27d6 100644
--- a/webview-ui/src/i18n/locales/de/mcp.json
+++ b/webview-ui/src/i18n/locales/de/mcp.json
@@ -10,7 +10,8 @@
"title": "MCP-Server-Erstellung aktivieren",
"description": "Wenn aktiviert, kann Roo dir helfen, neue MCP-Server über Befehle wie \"neues Tool hinzufügen zu...\" zu erstellen. Wenn du keine MCP-Server erstellen musst, kannst du dies deaktivieren, um den Token-Verbrauch von Roo zu reduzieren."
},
- "editSettings": "MCP-Einstellungen bearbeiten",
+ "editGlobalMCP": "Globales MCP bearbeiten",
+ "editProjectMCP": "Projekt-MCP bearbeiten",
"tool": {
"alwaysAllow": "Immer erlauben",
"parameters": "Parameter",
diff --git a/webview-ui/src/i18n/locales/de/settings.json b/webview-ui/src/i18n/locales/de/settings.json
index d934c54c6a..503a159025 100644
--- a/webview-ui/src/i18n/locales/de/settings.json
+++ b/webview-ui/src/i18n/locales/de/settings.json
@@ -276,8 +276,9 @@
},
"maxReadFile": {
"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"
+ "description": "Roo liest diese Anzahl von Zeilen, wenn das Modell keine Start-/Endwerte angibt. Wenn diese Zahl kleiner als die Gesamtzahl der Zeilen ist, erstellt Roo einen Zeilennummernindex der Codedefinitionen. Spezialfälle: -1 weist Roo an, die gesamte Datei zu lesen (ohne Indexierung), und 0 weist an, keine Zeilen zu lesen und nur Zeilenindizes für minimalen Kontext bereitzustellen. Niedrigere Werte minimieren die anfängliche Kontextnutzung und ermöglichen präzise nachfolgende Zeilenbereich-Lesungen. Explizite Start-/End-Anfragen sind von dieser Einstellung nicht begrenzt.",
+ "lines": "Zeilen",
+ "always_full_read": "Immer die gesamte Datei lesen"
}
},
"terminal": {
diff --git a/webview-ui/src/i18n/locales/en/mcp.json b/webview-ui/src/i18n/locales/en/mcp.json
index 710b787e5d..95ec55bd0c 100644
--- a/webview-ui/src/i18n/locales/en/mcp.json
+++ b/webview-ui/src/i18n/locales/en/mcp.json
@@ -10,7 +10,8 @@
"title": "Enable MCP Server Creation",
"description": "When enabled, Roo can help you create new MCP servers via commands like \"add a new tool to...\". If you don't need to create MCP servers you can disable this to reduce Roo's token usage."
},
- "editSettings": "Edit MCP Settings",
+ "editGlobalMCP": "Edit Global MCP",
+ "editProjectMCP": "Edit Project MCP",
"tool": {
"alwaysAllow": "Always allow",
"parameters": "Parameters",
diff --git a/webview-ui/src/i18n/locales/en/settings.json b/webview-ui/src/i18n/locales/en/settings.json
index a860f0b79c..c0edeefd37 100644
--- a/webview-ui/src/i18n/locales/en/settings.json
+++ b/webview-ui/src/i18n/locales/en/settings.json
@@ -276,8 +276,9 @@
},
"maxReadFile": {
"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"
+ "description": "Roo reads this number of lines when the model omits start/end values. If this number is less than the file's total, Roo generates a line number index of code definitions. Special cases: -1 instructs Roo to read the entire file (without indexing), and 0 instructs it to read no lines and provides line indexes only for minimal context. Lower values minimize initial context usage, enabling precise subsequent line-range reads. Explicit start/end requests are not limited by this setting.",
+ "lines": "lines",
+ "always_full_read": "Always read entire file"
}
},
"terminal": {
diff --git a/webview-ui/src/i18n/locales/es/mcp.json b/webview-ui/src/i18n/locales/es/mcp.json
index 8cc199ad25..6b6c7eb198 100644
--- a/webview-ui/src/i18n/locales/es/mcp.json
+++ b/webview-ui/src/i18n/locales/es/mcp.json
@@ -10,7 +10,8 @@
"title": "Habilitar creación de servidores MCP",
"description": "Cuando está habilitado, Roo puede ayudarte a crear nuevos servidores MCP mediante comandos como \"añadir una nueva herramienta para...\". Si no necesitas crear servidores MCP, puedes desactivar esto para reducir el uso de tokens de Roo."
},
- "editSettings": "Editar configuración de MCP",
+ "editGlobalMCP": "Editar MCP Global",
+ "editProjectMCP": "Editar MCP del Proyecto",
"tool": {
"alwaysAllow": "Permitir siempre",
"parameters": "Parámetros",
diff --git a/webview-ui/src/i18n/locales/es/settings.json b/webview-ui/src/i18n/locales/es/settings.json
index 3a838cce1f..7a12c7c533 100644
--- a/webview-ui/src/i18n/locales/es/settings.json
+++ b/webview-ui/src/i18n/locales/es/settings.json
@@ -276,8 +276,9 @@
},
"maxReadFile": {
"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"
+ "description": "Roo lee este número de líneas cuando el modelo omite valores de inicio/fin. Si este número es menor que el total del archivo, Roo genera un índice de números de línea de las definiciones de código. Casos especiales: -1 indica a Roo que lea el archivo completo (sin indexación), y 0 indica que no lea líneas y proporcione solo índices de línea para un contexto mínimo. Valores más bajos minimizan el uso inicial de contexto, permitiendo lecturas posteriores de rangos de líneas precisos. Las solicitudes con inicio/fin explícitos no están limitadas por esta configuración.",
+ "lines": "líneas",
+ "always_full_read": "Siempre leer el archivo completo"
}
},
"terminal": {
diff --git a/webview-ui/src/i18n/locales/fr/mcp.json b/webview-ui/src/i18n/locales/fr/mcp.json
index 2a239cd33e..2f3195067c 100644
--- a/webview-ui/src/i18n/locales/fr/mcp.json
+++ b/webview-ui/src/i18n/locales/fr/mcp.json
@@ -10,7 +10,8 @@
"title": "Activer la création de serveurs MCP",
"description": "Lorsqu'activé, Roo peut vous aider à créer de nouveaux serveurs MCP via des commandes comme \"ajouter un nouvel outil pour...\". Si vous n'avez pas besoin de créer des serveurs MCP, vous pouvez désactiver cette option pour réduire l'utilisation de tokens par Roo."
},
- "editSettings": "Modifier les paramètres MCP",
+ "editGlobalMCP": "Modifier MCP Global",
+ "editProjectMCP": "Modifier MCP du Projet",
"tool": {
"alwaysAllow": "Toujours autoriser",
"parameters": "Paramètres",
diff --git a/webview-ui/src/i18n/locales/fr/settings.json b/webview-ui/src/i18n/locales/fr/settings.json
index ce024bf4be..52d52c0704 100644
--- a/webview-ui/src/i18n/locales/fr/settings.json
+++ b/webview-ui/src/i18n/locales/fr/settings.json
@@ -276,8 +276,9 @@
},
"maxReadFile": {
"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"
+ "description": "Roo lit ce nombre de lignes lorsque le modèle omet les valeurs de début/fin. Si ce nombre est inférieur au total du fichier, Roo génère un index des numéros de ligne des définitions de code. Cas spéciaux : -1 indique à Roo de lire le fichier entier (sans indexation), et 0 indique de ne lire aucune ligne et de fournir uniquement les index de ligne pour un contexte minimal. Des valeurs plus basses minimisent l'utilisation initiale du contexte, permettant des lectures ultérieures de plages de lignes précises. Les requêtes avec début/fin explicites ne sont pas limitées par ce paramètre.",
+ "lines": "lignes",
+ "always_full_read": "Toujours lire le fichier entier"
}
},
"terminal": {
diff --git a/webview-ui/src/i18n/locales/hi/mcp.json b/webview-ui/src/i18n/locales/hi/mcp.json
index 5827787b67..32aee49dc4 100644
--- a/webview-ui/src/i18n/locales/hi/mcp.json
+++ b/webview-ui/src/i18n/locales/hi/mcp.json
@@ -10,7 +10,8 @@
"title": "MCP सर्वर निर्माण सक्षम करें",
"description": "जब सक्षम होता है, तो Roo आपको \"में नया उपकरण जोड़ें...\" जैसे कमांड के माध्यम से नए MCP सर्वर बनाने में मदद कर सकता है। यदि आपको MCP सर्वर बनाने की आवश्यकता नहीं है, तो आप Roo के token उपयोग को कम करने के लिए इसे अक्षम कर सकते हैं।"
},
- "editSettings": "MCP सेटिंग्स संपादित करें",
+ "editGlobalMCP": "वैश्विक MCP संपादित करें",
+ "editProjectMCP": "प्रोजेक्ट MCP संपादित करें",
"tool": {
"alwaysAllow": "हमेशा अनुमति दें",
"parameters": "पैरामीटर",
diff --git a/webview-ui/src/i18n/locales/hi/settings.json b/webview-ui/src/i18n/locales/hi/settings.json
index d82f8a9eb9..040e87a19c 100644
--- a/webview-ui/src/i18n/locales/hi/settings.json
+++ b/webview-ui/src/i18n/locales/hi/settings.json
@@ -276,8 +276,9 @@
},
"maxReadFile": {
"label": "फ़ाइल पढ़ने का स्वचालित काटने की सीमा",
- "description": "एक बैच में फ़ाइल से पढ़ने के लिए डिफ़ॉल्ट लाइनों की संख्या। कम मान संदर्भ/संसाधन उपयोग को कम करते हैं लेकिन बड़ी फाइलों के लिए अधिक पठन की आवश्यकता हो सकती है।",
- "lines": "पंक्तियाँ"
+ "description": "जब मॉडल प्रारंभ/अंत मान नहीं देता है, तो Roo इतनी पंक्तियाँ पढ़ता है। यदि यह संख्या फ़ाइल की कुल पंक्तियों से कम है, तो Roo कोड परिभाषाओं का पंक्ति क्रमांक इंडेक्स बनाता है। विशेष मामले: -1 Roo को पूरी फ़ाइल पढ़ने का निर्देश देता है (इंडेक्सिंग के बिना), और 0 कोई पंक्ति न पढ़ने और न्यूनतम संदर्भ के लिए केवल पंक्ति इंडेक्स प्रदान करने का निर्देश देता है। कम मान प्रारंभिक संदर्भ उपयोग को कम करते हैं, जो बाद में सटीक पंक्ति श्रेणी पढ़ने की अनुमति देता है। स्पष्ट प्रारंभ/अंत अनुरोध इस सेटिंग से सीमित नहीं हैं।",
+ "lines": "पंक्तियाँ",
+ "always_full_read": "हमेशा पूरी फ़ाइल पढ़ें"
}
},
"terminal": {
diff --git a/webview-ui/src/i18n/locales/it/mcp.json b/webview-ui/src/i18n/locales/it/mcp.json
index c297cca91a..18bc9b487e 100644
--- a/webview-ui/src/i18n/locales/it/mcp.json
+++ b/webview-ui/src/i18n/locales/it/mcp.json
@@ -10,7 +10,8 @@
"title": "Abilita creazione server MCP",
"description": "Quando abilitato, Roo può aiutarti a creare nuovi server MCP tramite comandi come \"aggiungi un nuovo strumento per...\". Se non hai bisogno di creare server MCP, puoi disabilitare questa opzione per ridurre l'utilizzo di token da parte di Roo."
},
- "editSettings": "Modifica impostazioni MCP",
+ "editGlobalMCP": "Modifica MCP Globale",
+ "editProjectMCP": "Modifica MCP del Progetto",
"tool": {
"alwaysAllow": "Consenti sempre",
"parameters": "Parametri",
diff --git a/webview-ui/src/i18n/locales/it/settings.json b/webview-ui/src/i18n/locales/it/settings.json
index 06257f4ede..fc42115bcb 100644
--- a/webview-ui/src/i18n/locales/it/settings.json
+++ b/webview-ui/src/i18n/locales/it/settings.json
@@ -276,8 +276,9 @@
},
"maxReadFile": {
"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"
+ "description": "Roo legge questo numero di righe quando il modello omette i valori di inizio/fine. Se questo numero è inferiore al totale del file, Roo genera un indice dei numeri di riga delle definizioni di codice. Casi speciali: -1 indica a Roo di leggere l'intero file (senza indicizzazione), e 0 indica di non leggere righe e fornire solo indici di riga per un contesto minimo. Valori più bassi minimizzano l'utilizzo iniziale del contesto, permettendo successive letture precise di intervalli di righe. Le richieste con inizio/fine espliciti non sono limitate da questa impostazione.",
+ "lines": "righe",
+ "always_full_read": "Leggi sempre l'intero file"
}
},
"terminal": {
diff --git a/webview-ui/src/i18n/locales/ja/mcp.json b/webview-ui/src/i18n/locales/ja/mcp.json
index 62e340db84..d5920c1c46 100644
--- a/webview-ui/src/i18n/locales/ja/mcp.json
+++ b/webview-ui/src/i18n/locales/ja/mcp.json
@@ -10,7 +10,8 @@
"title": "MCPサーバー作成を有効にする",
"description": "有効にすると、Rooは「新しいツールを追加する...」などのコマンドを通じて新しいMCPサーバーの作成を支援できます。MCPサーバーを作成する必要がない場合は、これを無効にしてRooのtoken使用量を減らすことができます。"
},
- "editSettings": "MCP設定を編集",
+ "editGlobalMCP": "グローバルMCPを編集",
+ "editProjectMCP": "プロジェクトMCPを編集",
"tool": {
"alwaysAllow": "常に許可",
"parameters": "パラメータ",
diff --git a/webview-ui/src/i18n/locales/ja/settings.json b/webview-ui/src/i18n/locales/ja/settings.json
index 6726257d2e..f53af6b04d 100644
--- a/webview-ui/src/i18n/locales/ja/settings.json
+++ b/webview-ui/src/i18n/locales/ja/settings.json
@@ -276,8 +276,9 @@
},
"maxReadFile": {
"label": "ファイル読み込み自動切り詰めしきい値",
- "description": "一括でファイルから読み込むデフォルトの行数。低い値はコンテキスト/リソース使用量を減らしますが、大きなファイルではより多くの読み込みが必要になる場合があります。",
- "lines": "行"
+ "description": "モデルが開始/終了の値を指定しない場合、Rooはこの行数を読み込みます。この数がファイルの総行数より少ない場合、Rooはコード定義の行番号インデックスを生成します。特殊なケース:-1はRooにファイル全体を読み込むよう指示し(インデックス作成なし)、0は行を読み込まず最小限のコンテキストのために行インデックスのみを提供するよう指示します。低い値は初期コンテキスト使用量を最小限に抑え、後続の正確な行範囲の読み込みを可能にします。明示的な開始/終了の要求はこの設定による制限を受けません。",
+ "lines": "行",
+ "always_full_read": "常にファイル全体を読み込む"
}
},
"terminal": {
diff --git a/webview-ui/src/i18n/locales/ko/mcp.json b/webview-ui/src/i18n/locales/ko/mcp.json
index f79409d441..5d45eb0fca 100644
--- a/webview-ui/src/i18n/locales/ko/mcp.json
+++ b/webview-ui/src/i18n/locales/ko/mcp.json
@@ -10,7 +10,8 @@
"title": "MCP 서버 생성 활성화",
"description": "활성화하면 Roo가 \"새 도구 추가...\"와 같은 명령을 통해 새 MCP 서버를 만드는 데 도움을 줄 수 있습니다. MCP 서버를 만들 필요가 없다면 이 기능을 비활성화하여 Roo의 token 사용량을 줄일 수 있습니다."
},
- "editSettings": "MCP 설정 편집",
+ "editGlobalMCP": "전역 MCP 편집",
+ "editProjectMCP": "프로젝트 MCP 편집",
"tool": {
"alwaysAllow": "항상 허용",
"parameters": "매개변수",
diff --git a/webview-ui/src/i18n/locales/ko/settings.json b/webview-ui/src/i18n/locales/ko/settings.json
index 903e783aa8..cc2ce893c1 100644
--- a/webview-ui/src/i18n/locales/ko/settings.json
+++ b/webview-ui/src/i18n/locales/ko/settings.json
@@ -276,8 +276,9 @@
},
"maxReadFile": {
"label": "파일 읽기 자동 축소 임계값",
- "description": "한 번에 파일에서 읽을 기본 라인 수. 낮은 값은 컨텍스트/리소스 사용량을 줄이지만 대용량 파일의 경우 더 많은 읽기가 필요할 수 있습니다.",
- "lines": "줄"
+ "description": "모델이 시작/끝 값을 지정하지 않을 때 Roo가 읽는 줄 수입니다. 이 수가 파일의 총 줄 수보다 적으면 Roo는 코드 정의의 줄 번호 인덱스를 생성합니다. 특수한 경우: -1은 Roo에게 전체 파일을 읽도록 지시하고(인덱싱 없이), 0은 줄을 읽지 않고 최소한의 컨텍스트를 위해 줄 인덱스만 제공하도록 지시합니다. 낮은 값은 초기 컨텍스트 사용을 최소화하고, 이후 정확한 줄 범위 읽기를 가능하게 합니다. 명시적 시작/끝 요청은 이 설정의 제한을 받지 않습니다.",
+ "lines": "줄",
+ "always_full_read": "항상 전체 파일 읽기"
}
},
"terminal": {
diff --git a/webview-ui/src/i18n/locales/pl/mcp.json b/webview-ui/src/i18n/locales/pl/mcp.json
index 7308698d79..4f1f2a9411 100644
--- a/webview-ui/src/i18n/locales/pl/mcp.json
+++ b/webview-ui/src/i18n/locales/pl/mcp.json
@@ -10,7 +10,8 @@
"title": "Włącz tworzenie serwerów MCP",
"description": "Po włączeniu, Roo może pomóc w tworzeniu nowych serwerów MCP za pomocą poleceń takich jak \"dodaj nowe narzędzie do...\". Jeśli nie potrzebujesz tworzyć serwerów MCP, możesz to wyłączyć, aby zmniejszyć zużycie tokenów przez Roo."
},
- "editSettings": "Edytuj ustawienia MCP",
+ "editGlobalMCP": "Edytuj globalne MCP",
+ "editProjectMCP": "Edytuj projektowe MCP",
"tool": {
"alwaysAllow": "Zawsze zezwalaj",
"parameters": "Parametry",
diff --git a/webview-ui/src/i18n/locales/pl/settings.json b/webview-ui/src/i18n/locales/pl/settings.json
index 3c589f5497..5fefd1957f 100644
--- a/webview-ui/src/i18n/locales/pl/settings.json
+++ b/webview-ui/src/i18n/locales/pl/settings.json
@@ -276,8 +276,9 @@
},
"maxReadFile": {
"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"
+ "description": "Roo odczytuje tę liczbę linii, gdy model nie określa wartości początkowej/końcowej. Jeśli ta liczba jest mniejsza niż całkowita liczba linii pliku, Roo generuje indeks numerów linii definicji kodu. Przypadki specjalne: -1 nakazuje Roo odczytać cały plik (bez indeksowania), a 0 nakazuje nie czytać żadnych linii i dostarczyć tylko indeksy linii dla minimalnego kontekstu. Niższe wartości minimalizują początkowe użycie kontekstu, umożliwiając późniejsze precyzyjne odczyty zakresów linii. Jawne żądania początku/końca nie są ograniczone tym ustawieniem.",
+ "lines": "linii",
+ "always_full_read": "Zawsze czytaj cały plik"
}
},
"terminal": {
diff --git a/webview-ui/src/i18n/locales/pt-BR/mcp.json b/webview-ui/src/i18n/locales/pt-BR/mcp.json
index e5713608eb..2c8c282e0d 100644
--- a/webview-ui/src/i18n/locales/pt-BR/mcp.json
+++ b/webview-ui/src/i18n/locales/pt-BR/mcp.json
@@ -10,7 +10,8 @@
"title": "Ativar criação de servidores MCP",
"description": "Quando ativado, o Roo pode ajudar você a criar novos servidores MCP por meio de comandos como \"adicionar uma nova ferramenta para...\". Se você não precisar criar servidores MCP, pode desativar isso para reduzir o uso de tokens do Roo."
},
- "editSettings": "Editar configurações do MCP",
+ "editGlobalMCP": "Editar MCP Global",
+ "editProjectMCP": "Editar MCP do Projeto",
"tool": {
"alwaysAllow": "Sempre permitir",
"parameters": "Parâmetros",
diff --git a/webview-ui/src/i18n/locales/pt-BR/settings.json b/webview-ui/src/i18n/locales/pt-BR/settings.json
index e73f822cec..716556b807 100644
--- a/webview-ui/src/i18n/locales/pt-BR/settings.json
+++ b/webview-ui/src/i18n/locales/pt-BR/settings.json
@@ -276,8 +276,9 @@
},
"maxReadFile": {
"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"
+ "description": "O Roo lê este número de linhas quando o modelo omite valores de início/fim. Se este número for menor que o total do arquivo, o Roo gera um índice de números de linha das definições de código. Casos especiais: -1 instrui o Roo a ler o arquivo inteiro (sem indexação), e 0 instrui a não ler linhas e fornecer apenas índices de linha para contexto mínimo. Valores mais baixos minimizam o uso inicial de contexto, permitindo leituras posteriores precisas de intervalos de linhas. Requisições com início/fim explícitos não são limitadas por esta configuração.",
+ "lines": "linhas",
+ "always_full_read": "Sempre ler o arquivo inteiro"
}
},
"terminal": {
diff --git a/webview-ui/src/i18n/locales/tr/mcp.json b/webview-ui/src/i18n/locales/tr/mcp.json
index f0610630c0..c21b009773 100644
--- a/webview-ui/src/i18n/locales/tr/mcp.json
+++ b/webview-ui/src/i18n/locales/tr/mcp.json
@@ -10,7 +10,8 @@
"title": "MCP Sunucu Oluşturmayı Etkinleştir",
"description": "Etkinleştirildiğinde, Roo \"için yeni bir araç ekle...\" gibi komutlar aracılığıyla yeni MCP sunucuları oluşturmanıza yardımcı olabilir. MCP sunucuları oluşturmanız gerekmiyorsa, Roo'nun token kullanımını azaltmak için bunu devre dışı bırakabilirsiniz."
},
- "editSettings": "MCP Ayarlarını Düzenle",
+ "editGlobalMCP": "Global MCP'yi Düzenle",
+ "editProjectMCP": "Proje MCP'yi Düzenle",
"tool": {
"alwaysAllow": "Her zaman izin ver",
"parameters": "Parametreler",
diff --git a/webview-ui/src/i18n/locales/tr/settings.json b/webview-ui/src/i18n/locales/tr/settings.json
index 5d00bfa13c..e717841b01 100644
--- a/webview-ui/src/i18n/locales/tr/settings.json
+++ b/webview-ui/src/i18n/locales/tr/settings.json
@@ -276,8 +276,9 @@
},
"maxReadFile": {
"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"
+ "description": "Model başlangıç/bitiş değerlerini belirtmediğinde Roo bu sayıda satırı okur. Bu sayı dosyanın toplam satır sayısından azsa, Roo kod tanımlamalarının satır numarası dizinini oluşturur. Özel durumlar: -1, Roo'ya tüm dosyayı okumasını (dizinleme olmadan), 0 ise hiç satır okumamasını ve minimum bağlam için yalnızca satır dizinleri sağlamasını belirtir. Düşük değerler başlangıç bağlam kullanımını en aza indirir ve sonraki hassas satır aralığı okumalarına olanak tanır. Açık başlangıç/bitiş istekleri bu ayarla sınırlı değildir.",
+ "lines": "satır",
+ "always_full_read": "Her zaman tüm dosyayı oku"
}
},
"terminal": {
diff --git a/webview-ui/src/i18n/locales/vi/mcp.json b/webview-ui/src/i18n/locales/vi/mcp.json
index 37f16cbec4..1252094da4 100644
--- a/webview-ui/src/i18n/locales/vi/mcp.json
+++ b/webview-ui/src/i18n/locales/vi/mcp.json
@@ -10,6 +10,8 @@
"title": "Bật tạo máy chủ MCP",
"description": "Khi được bật, Roo có thể giúp bạn tạo máy chủ MCP mới thông qua các lệnh như \"thêm công cụ mới để...\". Nếu bạn không cần tạo máy chủ MCP, bạn có thể tắt tính năng này để giảm lượng token mà Roo sử dụng."
},
+ "editGlobalMCP": "Chỉnh sửa MCP toàn cục",
+ "editProjectMCP": "Chỉnh sửa MCP dự án",
"editSettings": "Chỉnh sửa cài đặt MCP",
"tool": {
"alwaysAllow": "Luôn cho phép",
diff --git a/webview-ui/src/i18n/locales/vi/settings.json b/webview-ui/src/i18n/locales/vi/settings.json
index 6af2f6a5ef..39dfaa470d 100644
--- a/webview-ui/src/i18n/locales/vi/settings.json
+++ b/webview-ui/src/i18n/locales/vi/settings.json
@@ -276,8 +276,9 @@
},
"maxReadFile": {
"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"
+ "description": "Roo đọc số dòng này khi mô hình không chỉ định giá trị bắt đầu/kết thúc. Nếu số này nhỏ hơn tổng số dòng của tệp, Roo sẽ tạo một chỉ mục số dòng của các định nghĩa mã. Trường hợp đặc biệt: -1 chỉ thị Roo đọc toàn bộ tệp (không tạo chỉ mục), và 0 chỉ thị không đọc dòng nào và chỉ cung cấp chỉ mục dòng cho ngữ cảnh tối thiểu. Giá trị thấp hơn giảm thiểu việc sử dụng ngữ cảnh ban đầu, cho phép đọc chính xác các phạm vi dòng sau này. Các yêu cầu có chỉ định bắt đầu/kết thúc rõ ràng không bị giới hạn bởi cài đặt này.",
+ "lines": "dòng",
+ "always_full_read": "Luôn đọc toàn bộ tệp"
}
},
"terminal": {
diff --git a/webview-ui/src/i18n/locales/zh-CN/mcp.json b/webview-ui/src/i18n/locales/zh-CN/mcp.json
index f57f419091..703ae43140 100644
--- a/webview-ui/src/i18n/locales/zh-CN/mcp.json
+++ b/webview-ui/src/i18n/locales/zh-CN/mcp.json
@@ -10,6 +10,8 @@
"title": "启用 MCP 服务器创建",
"description": "启用后,Roo 可以通过诸如\"添加新工具到...\"之类的命令帮助您创建新的 MCP 服务器。如果您不需要创建 MCP 服务器,可以禁用此功能以减少 Roo 的 token 使用量。"
},
+ "editGlobalMCP": "编辑全局 MCP",
+ "editProjectMCP": "编辑项目 MCP",
"editSettings": "编辑 MCP 设置",
"tool": {
"alwaysAllow": "始终允许",
diff --git a/webview-ui/src/i18n/locales/zh-CN/settings.json b/webview-ui/src/i18n/locales/zh-CN/settings.json
index c13ed64312..64721f6db1 100644
--- a/webview-ui/src/i18n/locales/zh-CN/settings.json
+++ b/webview-ui/src/i18n/locales/zh-CN/settings.json
@@ -276,8 +276,9 @@
},
"maxReadFile": {
"label": "文件读取自动截断阈值",
- "description": "一次批处理中从文件读取的默认行数。较低的值会减少上下文/资源使用,但可能需要对大文件进行更多次读取。",
- "lines": "行"
+ "description": "当模型未指定起始/结束值时,Roo 读取的行数。如果此数值小于文件总行数,Roo 将生成代码定义的行号索引。特殊情况:-1 指示 Roo 读取整个文件(不创建索引),0 指示不读取任何行并仅提供行索引以获得最小上下文。较低的值可最小化初始上下文使用,允许后续精确的行范围读取。显式指定起始/结束的请求不受此设置限制。",
+ "lines": "行",
+ "always_full_read": "始终读取整个文件"
}
},
"terminal": {
diff --git a/webview-ui/src/i18n/locales/zh-TW/mcp.json b/webview-ui/src/i18n/locales/zh-TW/mcp.json
index e8ddba2f2c..ee85661101 100644
--- a/webview-ui/src/i18n/locales/zh-TW/mcp.json
+++ b/webview-ui/src/i18n/locales/zh-TW/mcp.json
@@ -10,6 +10,8 @@
"title": "啟用 MCP 伺服器創建",
"description": "啟用後,Roo 可以通過如\"新增工具到...\"之類的命令幫助您創建新的 MCP 伺服器。如果您不需要創建 MCP 伺服器,可以停用此功能以減少 Roo 的 token 使用量。"
},
+ "editGlobalMCP": "編輯全域 MCP",
+ "editProjectMCP": "編輯專案 MCP",
"editSettings": "編輯 MCP 設定",
"tool": {
"alwaysAllow": "始終允許",
diff --git a/webview-ui/src/i18n/locales/zh-TW/settings.json b/webview-ui/src/i18n/locales/zh-TW/settings.json
index 706faf37bc..2da2373929 100644
--- a/webview-ui/src/i18n/locales/zh-TW/settings.json
+++ b/webview-ui/src/i18n/locales/zh-TW/settings.json
@@ -276,8 +276,9 @@
},
"maxReadFile": {
"label": "檔案讀取自動截斷閾值",
- "description": "預設讀取檔案的行數",
- "lines": "行"
+ "description": "當模型未指定起始/結束值時,Roo 讀取的行數。如果此數值小於檔案總行數,Roo 將產生程式碼定義的行號索引。特殊情況:-1 指示 Roo 讀取整個檔案(不建立索引),0 指示不讀取任何行並僅提供行索引以取得最小上下文。較低的值可最小化初始上下文使用,允許後續精確的行範圍讀取。明確指定起始/結束的請求不受此設定限制。",
+ "lines": "行",
+ "always_full_read": "始終讀取整個檔案"
}
},
"terminal": {
diff --git a/webview-ui/src/utils/__tests__/path-mentions.test.ts b/webview-ui/src/utils/__tests__/path-mentions.test.ts
index bb5591fbe5..725801b8a0 100644
--- a/webview-ui/src/utils/__tests__/path-mentions.test.ts
+++ b/webview-ui/src/utils/__tests__/path-mentions.test.ts
@@ -3,10 +3,10 @@ import { convertToMentionPath } from "../path-mentions"
describe("path-mentions", () => {
describe("convertToMentionPath", () => {
it("should convert an absolute path to a mention path when it starts with cwd", () => {
- // Windows-style paths
- expect(convertToMentionPath("C:\\Users\\user\\project\\file.txt", "C:\\Users\\user\\project")).toBe(
- "@/file.txt",
- )
+ // win32-style paths
+ expect(
+ convertToMentionPath("C:\\Users\\user\\project\\file.txt", "C:\\Users\\user\\project", "win32"),
+ ).toBe("@\\file.txt")
// Unix-style paths
expect(convertToMentionPath("/Users/user/project/file.txt", "/Users/user/project")).toBe("@/file.txt")
@@ -31,9 +31,9 @@ describe("path-mentions", () => {
})
it("should normalize backslashes to forward slashes", () => {
- expect(convertToMentionPath("C:\\Users\\user\\project\\subdir\\file.txt", "C:\\Users\\user\\project")).toBe(
- "@/subdir/file.txt",
- )
+ expect(
+ convertToMentionPath("C:\\Users\\user\\project\\subdir\\file.txt", "C:\\Users\\user\\project", "win32"),
+ ).toBe("@\\subdir\\file.txt")
})
it("should handle nested paths correctly", () => {
diff --git a/webview-ui/src/utils/context-mentions.ts b/webview-ui/src/utils/context-mentions.ts
index 5d240d8fd2..eee537af67 100644
--- a/webview-ui/src/utils/context-mentions.ts
+++ b/webview-ui/src/utils/context-mentions.ts
@@ -2,6 +2,7 @@ import { mentionRegex } from "../../../src/shared/context-mentions"
import { Fzf } from "fzf"
import { ModeConfig } from "../../../src/shared/modes"
import * as path from "path"
+import { formatPath } from "../../../src/shared/formatPath"
export interface SearchResult {
path: string
@@ -82,12 +83,24 @@ export interface ContextMenuQueryItem {
icon?: string
}
+function mapSearchResult(result: SearchResult, os?: string): ContextMenuQueryItem {
+ const formattedPath = formatPath(result.path, os)
+
+ return {
+ type: result.type === "folder" ? ContextMenuOptionType.Folder : ContextMenuOptionType.File,
+ value: formattedPath,
+ label: result.label || path.basename(result.path),
+ description: formattedPath,
+ }
+}
+
export function getContextMenuOptions(
query: string,
selectedType: ContextMenuOptionType | null = null,
queryItems: ContextMenuQueryItem[],
dynamicSearchResults: SearchResult[] = [],
modes?: ModeConfig[],
+ os?: string,
): ContextMenuQueryItem[] {
// Handle slash commands for modes
if (query.startsWith("/")) {
@@ -229,25 +242,24 @@ export function getContextMenuOptions(
const gitMatches = matchingItems.filter((item) => item.type === ContextMenuOptionType.Git)
// 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 searchResultItems = dynamicSearchResults.map((result) => mapSearchResult(result, os))
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}`
+ const normalizedValue = item.value
+ let key = ""
+ if (
+ item.type === ContextMenuOptionType.File ||
+ item.type === ContextMenuOptionType.Folder ||
+ item.type === ContextMenuOptionType.OpenedFile
+ ) {
+ key = normalizedValue!
+ } else {
+ key = `${item.type}-${normalizedValue}`
+ }
if (seen.has(key)) return false
seen.add(key)
return true
diff --git a/webview-ui/src/utils/path-mentions.ts b/webview-ui/src/utils/path-mentions.ts
index 960483f593..6709c48bd3 100644
--- a/webview-ui/src/utils/path-mentions.ts
+++ b/webview-ui/src/utils/path-mentions.ts
@@ -2,6 +2,8 @@
* Utilities for handling path-related operations in mentions
*/
+import { formatPath } from "../../../src/shared/formatPath"
+
/**
* Converts an absolute path to a mention-friendly path
* If the provided path starts with the current working directory,
@@ -11,16 +13,16 @@
* @param cwd The current working directory
* @returns A mention-friendly path
*/
-export function convertToMentionPath(path: string, cwd?: string): string {
- const normalizedPath = path.replace(/\\/g, "/")
- let normalizedCwd = cwd ? cwd.replace(/\\/g, "/") : ""
+export function convertToMentionPath(path: string, cwd?: string, os?: string): string {
+ const normalizedPath = formatPath(path, os)
+ let normalizedCwd = cwd ? formatPath(cwd, os) : ""
if (!normalizedCwd) {
return path
}
// Remove trailing slash from cwd if it exists
- if (normalizedCwd.endsWith("/")) {
+ if ((os !== "win32" && normalizedCwd.endsWith("/")) || (os === "win32" && normalizedCwd.endsWith("\\"))) {
normalizedCwd = normalizedCwd.slice(0, -1)
}
@@ -31,7 +33,7 @@ export function convertToMentionPath(path: string, cwd?: string): string {
if (lowerPath.startsWith(lowerCwd)) {
const relativePath = normalizedPath.substring(normalizedCwd.length)
// Ensure there's a slash after the @ symbol when we create the mention path
- return "@" + (relativePath.startsWith("/") ? relativePath : "/" + relativePath)
+ return "@" + formatPath(relativePath, os, false)
}
return path