diff --git a/src/__tests__/single-open-invariant.spec.ts b/src/__tests__/single-open-invariant.spec.ts index 9eeec8a960..2182303222 100644 --- a/src/__tests__/single-open-invariant.spec.ts +++ b/src/__tests__/single-open-invariant.spec.ts @@ -166,6 +166,7 @@ describe("Single-open-task invariant", () => { getCurrentTask: vi.fn(() => undefined), // ensure not rehydrating taskHistoryStore: { get: vi.fn(() => undefined) }, markDelegatedChildInterrupted: vi.fn().mockResolvedValue(undefined), + backfillTaskDepth: vi.fn().mockResolvedValue(undefined), get evictCurrentTask() { return privateClineProvider.evictCurrentTask.bind(this) }, @@ -265,6 +266,7 @@ describe("Single-open-task invariant", () => { taskScheduler: { schedule: schedulespy }, taskEventListeners: new WeakMap(), performPreparationTasks: vi.fn().mockResolvedValue(undefined), + backfillTaskDepth: vi.fn().mockResolvedValue(undefined), context: { extension: { packageJSON: {} }, globalStorageUri: { fsPath: "/tmp" } }, contextProxy: { extensionUri: {}, diff --git a/webview-ui/src/i18n/locales/ca/settings.json b/webview-ui/src/i18n/locales/ca/settings.json index fa5cc11d65..a1eab76fb8 100644 --- a/webview-ui/src/i18n/locales/ca/settings.json +++ b/webview-ui/src/i18n/locales/ca/settings.json @@ -767,6 +767,16 @@ "description": "Els llindars més baixos fan que les edicions de fitxer siguin més resistents a variacions de format i espais en blanc. Un llindar del 100% requereix una coincidència exacta." } }, + "taskTree": { + "maxNestingDepth": { + "label": "Profunditat màxima d'encadenament de tasques", + "description": "Quants nivells de subtasques es poden encadenar (arrel = 0). Un valor de 0 desactiva completament la delegació — cada new_task s'executa en línia a la conversa actual. Interval: 0–5." + }, + "autoFlattenOnLimit": { + "label": "Aplanar automàticament subtasques al límit d'encadenament", + "description": "Quan una subtasca superaria la profunditat màxima d'encadenament, s'executa en línia a la conversa actual en lloc d'obrir una nova pestanya. Quan està desactivat, aquestes sol·licituds es rebutgen perquè continueu treballant directament." + } + }, "condensingThreshold": { "label": "Llindar d'activació de condensació", "selectProfile": "Configura el llindar per al perfil", diff --git a/webview-ui/src/i18n/locales/de/settings.json b/webview-ui/src/i18n/locales/de/settings.json index 2cb83f7893..f4b0bc7e4c 100644 --- a/webview-ui/src/i18n/locales/de/settings.json +++ b/webview-ui/src/i18n/locales/de/settings.json @@ -767,6 +767,16 @@ "description": "Niedrigere Schwellenwerte machen Dateibearbeitungen widerstandsfähiger gegen Formatierungs- und Leerzeichenunterschiede. Ein Schwellenwert von 100% erfordert eine exakte Übereinstimmung." } }, + "taskTree": { + "maxNestingDepth": { + "label": "Maximale Aufgaben-Nestungstiefe", + "description": "Wie viele Ebenen von Unteraufgaben verschachtelt werden können (Wurzel = 0). Ein Wert von 0 deaktiviert die Delegation vollständig — jedes new_task wird inline im aktuellen Gespräch ausgeführt. Bereich: 0–5." + }, + "autoFlattenOnLimit": { + "label": "Unteraufgaben am Nestungslimit automatisch aplanen", + "description": "Wenn eine Unteraufgabe die maximale Nestungstiefe überschreiten würde, wird sie stattdessen inline im aktuellen Gespräch ausgeführt und es wird kein neuer Tab geöffnet. Wenn deaktiviert, werden solche Anfragen abgelehnt, damit Sie direkt weiterarbeiten." + } + }, "condensingThreshold": { "label": "Schwellenwert für Kontextkomprimierung", "selectProfile": "Profil für Schwellenwert konfigurieren", diff --git a/webview-ui/src/i18n/locales/es/settings.json b/webview-ui/src/i18n/locales/es/settings.json index 305a8dd5d7..f9cbc06206 100644 --- a/webview-ui/src/i18n/locales/es/settings.json +++ b/webview-ui/src/i18n/locales/es/settings.json @@ -777,6 +777,16 @@ "description": "Los umbrales más bajos hacen que las ediciones de archivos sean más resistentes a variaciones de formato y espacios en blanco. Un umbral del 100% requiere una coincidencia exacta." } }, + "taskTree": { + "maxNestingDepth": { + "label": "Profundidad máxima de anidación de tareas", + "description": "Cuántos niveles de subtareas pueden anidarse (raíz = 0). Un valor de 0 desactiva por completo la delegación — cada new_task se ejecuta en línea en la conversación actual. Rango: 0–5." + }, + "autoFlattenOnLimit": { + "label": "Aplanar automáticamente subtareas al límite de anidación", + "description": "Cuando una subtarea superaría la profundidad máxima de anidación, se ejecuta en línea en la conversación actual en lugar de abrir una nueva pestaña. Cuando está desactivado, dichas solicitudes se rechazan para que continúes trabajando directamente." + } + }, "condensingThreshold": { "label": "Umbral de condensación de contexto", "selectProfile": "Configurar umbral para perfil", diff --git a/webview-ui/src/i18n/locales/fr/settings.json b/webview-ui/src/i18n/locales/fr/settings.json index d5728833dd..02f01f0c8f 100644 --- a/webview-ui/src/i18n/locales/fr/settings.json +++ b/webview-ui/src/i18n/locales/fr/settings.json @@ -777,6 +777,16 @@ "description": "Des seuils plus bas rendent les modifications de fichiers plus résistantes aux variations de formatage et d'espaces blancs. Un seuil de 100% nécessite une correspondance exacte." } }, + "taskTree": { + "maxNestingDepth": { + "label": "Profondeur d'imbrication maximale des tâches", + "description": "Nombre de niveaux de sous-tâches pouvant être imbriqués (racine = 0). Une valeur de 0 désactive entièrement la délégation — chaque new_task s'exécute en ligne dans la conversation actuelle. Plage : 0–5." + }, + "autoFlattenOnLimit": { + "label": "Aplatir automatiquement les sous-tâches à la limite d'imbrication", + "description": "Lorsqu'une sous-tâche dépasserait la profondeur maximale d'imbrication, elle s'exécute en ligne dans la conversation actuelle au lieu d'ouvrir un nouvel onglet. Désactivé, ces demandes sont rejetées afin de continuer à travailler directement." + } + }, "condensingThreshold": { "label": "Seuil de condensation du contexte", "selectProfile": "Configurer le seuil pour le profil", diff --git a/webview-ui/src/i18n/locales/hi/settings.json b/webview-ui/src/i18n/locales/hi/settings.json index 3fce97a378..a639479391 100644 --- a/webview-ui/src/i18n/locales/hi/settings.json +++ b/webview-ui/src/i18n/locales/hi/settings.json @@ -767,6 +767,16 @@ "description": "कम थ्रेशोल्ड फ़ाइल संपादनों को फ़ॉर्मेटिंग और व्हाइटस्पेस भिन्नताओं के प्रति अधिक लचीला बनाते हैं। 100% का थ्रेशोल्ड सटीक मिलान की आवश्यकता रखता है।" } }, + "taskTree": { + "maxNestingDepth": { + "label": "अधिकतम कार्य नेस्टिंग गहराई", + "description": "कितने स्तरों की उपकार्य (subtask) को नेस्ट किया जा सकता है (रूट = 0)। मान 0 पूरा विनिर्देशन (delegation) बंद कर देता है — हर new_task वर्तमान संवाद में इनलाइन चलता है। सीमा: 0–5।" + }, + "autoFlattenOnLimit": { + "label": "नेस्टिंग सीमा पर उपकार्य स्वतः फ्लैट करें", + "description": "जब कोई उपकार्य अधिकतम नेस्टिंग गहराई से पार करे, तो उसे नया टैब खोलने के बजाय वर्तमान संवाद में इनलाइन चलाया जाता है। अक्षम होने पर ऐसे अनुरोध अस्वीकृत हो जाते हैं ताकि आप सीधे काम जारी रख सकें।" + } + }, "condensingThreshold": { "label": "संघनन ट्रिगर सीमा", "selectProfile": "प्रोफ़ाइल के लिए सीमा कॉन्फ़िगर करें", diff --git a/webview-ui/src/i18n/locales/id/settings.json b/webview-ui/src/i18n/locales/id/settings.json index bcdd0ae76d..f07646e8db 100644 --- a/webview-ui/src/i18n/locales/id/settings.json +++ b/webview-ui/src/i18n/locales/id/settings.json @@ -745,6 +745,16 @@ "description": "Ambang batas yang lebih rendah membuat pengeditan file lebih tahan terhadap variasi format dan spasi. Ambang batas 100% memerlukan kecocokan yang tepat." } }, + "taskTree": { + "maxNestingDepth": { + "label": "Kedalaman penempatan tugas maksimum", + "description": "Berapa tingkat sub-tugas yang dapat ditumpuk (akar = 0). Nilai 0 menonaktifkan delegasi sepenuhnya — setiap new_task berjalan inline di percakapan saat ini. Rentang: 0–5." + }, + "autoFlattenOnLimit": { + "label": "Ratakan otomatis sub-tugas pada batas penempatan", + "description": "Ketika sub-tugas akan melebihi kedalaman penempatan maksimum, jalankan secara inline di percakapan saat ini alih-alih membuka tab baru. Saat dinonaktifkan, permintaan semacam itu ditolak agar Anda terus bekerja langsung." + } + }, "condensingThreshold": { "label": "Ambang Batas Pemicu Kondensasi", "selectProfile": "Konfigurasi ambang batas untuk profil", diff --git a/webview-ui/src/i18n/locales/it/settings.json b/webview-ui/src/i18n/locales/it/settings.json index b22fb4c652..efd82c4bb3 100644 --- a/webview-ui/src/i18n/locales/it/settings.json +++ b/webview-ui/src/i18n/locales/it/settings.json @@ -767,6 +767,16 @@ "description": "Soglie più basse rendono le modifiche ai file più resilienti a variazioni di formattazione e spazi bianchi. Una soglia del 100% richiede una corrispondenza esatta." } }, + "taskTree": { + "maxNestingDepth": { + "label": "Profondità massima di annidamento dei task", + "description": "Quanti livelli di sotto-task possono essere annidati (radice = 0). Un valore di 0 disabilita completamente la delega — ogni new_task viene eseguito in linea nella conversazione attuale. Intervallo: 0–5." + }, + "autoFlattenOnLimit": { + "label": "Appiattisci automaticamente i sotto-task al limite di annidamento", + "description": "Quando un sotto-task supererebbe la profondità massima di annidamento, viene eseguito in linea nella conversazione attuale invece di aprire una nuova scheda. Quando disattivato, tali richieste vengono rifiutate così continui a lavorare direttamente." + } + }, "condensingThreshold": { "label": "Soglia di attivazione condensazione", "selectProfile": "Configura soglia per profilo", diff --git a/webview-ui/src/i18n/locales/ja/settings.json b/webview-ui/src/i18n/locales/ja/settings.json index bbdc5c8e8a..b868a263e6 100644 --- a/webview-ui/src/i18n/locales/ja/settings.json +++ b/webview-ui/src/i18n/locales/ja/settings.json @@ -767,6 +767,16 @@ "description": "しきい値を低くすると、ファイル編集が書式や空白のバリエーションに対してより柔軟になります。100%のしきい値は完全一致が必要です。" } }, + "taskTree": { + "maxNestingDepth": { + "label": "タスクの最大ネスト深度", + "description": "サブタスクを何レベルまでネストできるか(ルート = 0)。値が 0 の場合は委譲が完全に無効になり、すべての new_task が現在の会話でインライン実行されます。範囲:0–5。" + }, + "autoFlattenOnLimit": { + "label": "ネスト上限時にサブタスクを自動フラット化", + "description": "サブタスクが最大ネスト深度を超える場合、新しいタブを開く代わりに現在の会話でインライン実行します。無効にすると、そのようなリクエストは拒否され、直接作業を継続できます。" + } + }, "condensingThreshold": { "label": "圧縮トリガーしきい値", "selectProfile": "プロファイルのしきい値を設定", diff --git a/webview-ui/src/i18n/locales/ko/settings.json b/webview-ui/src/i18n/locales/ko/settings.json index c2062a5335..0bcdb2f9f9 100644 --- a/webview-ui/src/i18n/locales/ko/settings.json +++ b/webview-ui/src/i18n/locales/ko/settings.json @@ -767,6 +767,16 @@ "description": "낮은 임계값은 파일 편집이 서식 및 공백 변동에 더 탄력적으로 대응하게 합니다. 100% 임계값은 정확히 일치해야 합니다." } }, + "taskTree": { + "maxNestingDepth": { + "label": "최대 작업 중첩 깊이", + "description": "서브태스크를 몇 단계까지 중첩할 수 있는지 (루트 = 0). 값이 0이면 위임(delegation)이 완전히 비활성화되어 모든 new_task가 현재 대화에서 인라인으로 실행됩니다. 범위: 0–5." + }, + "autoFlattenOnLimit": { + "label": "중첩 한도 도달 시 서브태스크 자동 평탄화", + "description": "서브태스크가 최대 중첩 깊이를 초과할 경우 새 탭을 여는 대신 현재 대화에서 인라인으로 실행합니다. 비활성화된 경우 이러한 요청이 거부되어 직접 작업을 계속할 수 있습니다." + } + }, "condensingThreshold": { "label": "압축 트리거 임계값", "selectProfile": "프로필 임계값 구성", diff --git a/webview-ui/src/i18n/locales/nl/settings.json b/webview-ui/src/i18n/locales/nl/settings.json index cf148f5617..18a956490e 100644 --- a/webview-ui/src/i18n/locales/nl/settings.json +++ b/webview-ui/src/i18n/locales/nl/settings.json @@ -777,6 +777,16 @@ "description": "Lagere drempelwaarden maken bestandbewerkingen beter bestand tegen opmaak- en witruimtevariaties. Een drempelwaarde van 100% vereist een exacte overeenkomst." } }, + "taskTree": { + "maxNestingDepth": { + "label": "Maximale nestingsdiepte van taken", + "description": "Hoeveel niveaus van subtaken genest kunnen worden (wortel = 0). Een waarde van 0 schakelt delegering volledig uit — elke new_task wordt inline uitgevoerd in het huidige gesprek. Bereik: 0–5." + }, + "autoFlattenOnLimit": { + "label": "Subtaken automatisch platteien op nestingslimiet", + "description": "Wanneer een subtaak de maximale nestingsdiepte zou overschrijden, wordt deze inline uitgevoerd in het huidige gesprek in plaats van een nieuw tabblad te openen. Wanneer uitgeschakeld, worden dergelijke verzoeken afgewezen zodat u direct blijft werken." + } + }, "condensingThreshold": { "label": "Compressie trigger drempelwaarde", "selectProfile": "Drempelwaarde voor profiel configureren", diff --git a/webview-ui/src/i18n/locales/pl/settings.json b/webview-ui/src/i18n/locales/pl/settings.json index ace780f529..b369bd0354 100644 --- a/webview-ui/src/i18n/locales/pl/settings.json +++ b/webview-ui/src/i18n/locales/pl/settings.json @@ -767,6 +767,16 @@ "description": "Niższe progi sprawiają, że edycje plików są bardziej odporne na różnice w formatowaniu i białych znakach. Próg 100% wymaga dokładnego dopasowania." } }, + "taskTree": { + "maxNestingDepth": { + "label": "Maksymalna głębokość zagnieżdżania zadań", + "description": "Ile poziomów podzadań może być zagnieżdżonych (korzeń = 0). Wartość 0 całkowicie wyłącza delegowanie — każde new_task jest wykonywane inline w bieżącej rozmowie. Zakres: 0–5." + }, + "autoFlattenOnLimit": { + "label": "Automatyczne spłaszczanie podzadań przy limicie zagnieżdżania", + "description": "Gdy podzadanie przekroczyłoby maksymalną głębokość zagnieżdżania, jest wykonywane inline w bieżącej rozmowie zamiast otwierania nowej karty. Gdy wyłączone, takie żądania są odrzucane, abyś mógł kontynuować pracę bezpośrednio." + } + }, "condensingThreshold": { "label": "Próg wyzwalania kondensacji", "selectProfile": "Skonfiguruj próg dla profilu", diff --git a/webview-ui/src/i18n/locales/pt-BR/settings.json b/webview-ui/src/i18n/locales/pt-BR/settings.json index 446aa8ac02..f159b4d507 100644 --- a/webview-ui/src/i18n/locales/pt-BR/settings.json +++ b/webview-ui/src/i18n/locales/pt-BR/settings.json @@ -767,6 +767,16 @@ "description": "Limites mais baixos tornam as edições de arquivo mais resistentes a variações de formatação e espaços em branco. Um limite de 100% exige uma correspondência exata." } }, + "taskTree": { + "maxNestingDepth": { + "label": "Profundidade máxima de aninhamento de tarefas", + "description": "Quantos níveis de subtarefas podem ser aninhados (raiz = 0). Um valor de 0 desativa completamente a delegação — cada new_task é executado em linha na conversa atual. Intervalo: 0–5." + }, + "autoFlattenOnLimit": { + "label": "Achatar automaticamente subtarefas no limite de aninhamento", + "description": "Quando uma subtarefa excederia a profundidade máxima de aninhamento, ela é executada em linha na conversa atual em vez de abrir uma nova aba. Quando desativado, essas solicitações são rejeitadas para que você continue trabalhando diretamente." + } + }, "condensingThreshold": { "label": "Limite de Ativação de Condensação", "selectProfile": "Configurar limite para perfil", diff --git a/webview-ui/src/i18n/locales/ru/settings.json b/webview-ui/src/i18n/locales/ru/settings.json index f2719ad06e..c474e16c59 100644 --- a/webview-ui/src/i18n/locales/ru/settings.json +++ b/webview-ui/src/i18n/locales/ru/settings.json @@ -767,6 +767,16 @@ "description": "Более низкие пороги делают редактирование файлов более устойчивым к изменениям форматирования и пробелов. Порог 100% требует точного совпадения." } }, + "taskTree": { + "maxNestingDepth": { + "label": "Максимальная глубина вложенности задач", + "description": "Сколько уровней подзадач можно вложить (корень = 0). Значение 0 полностью отключает делегирование — каждый new_task выполняется inline в текущем диалоге. Диапазон: 0–5." + }, + "autoFlattenOnLimit": { + "label": "Автоматически сглаживать подзадачи при лимите вложенности", + "description": "Если подзадача превысила бы максимальную глубину вложенности, она выполняется inline в текущем диалоге вместо открытия новой вкладки. При отключении такие запросы отклоняются, чтобы вы могли продолжать работу напрямую." + } + }, "condensingThreshold": { "label": "Порог запуска сжатия", "selectProfile": "Настроить порог для профиля", diff --git a/webview-ui/src/i18n/locales/tr/settings.json b/webview-ui/src/i18n/locales/tr/settings.json index 08374b6d20..5e8d610949 100644 --- a/webview-ui/src/i18n/locales/tr/settings.json +++ b/webview-ui/src/i18n/locales/tr/settings.json @@ -767,6 +767,16 @@ "description": "Düşük eşikler, dosya düzenlemelerini biçimlendirme ve boşluk farklılıklarına karşı daha dayanıklı hale getirir. %100 eşik, tam eşleşme gerektirir." } }, + "taskTree": { + "maxNestingDepth": { + "label": "Maksimum görev iç içe derinliği", + "description": "Kaç düzeyde alt görevin iç içe geçirilebileceği (kök = 0). 0 değeri devri tamamen devre dışı bırakır — her new_task mevcut sohbette satır içi çalıştırılır. Aralık: 0–5." + }, + "autoFlattenOnLimit": { + "label": "İç içe sınırında alt görevleri otomatik düzleştir", + "description": "Bir alt görev maksimum iç içe derinliği aşacaksa, yeni bir sekme açmak yerine mevcut sohbette satır içi çalıştırılır. Devre dışı bırakıldığında bu tür istekler reddedilir ve doğrudan çalışmaya devam edersiniz." + } + }, "condensingThreshold": { "label": "Sıkıştırma Tetikleme Eşiği", "selectProfile": "Profil için eşik yapılandır", diff --git a/webview-ui/src/i18n/locales/vi/settings.json b/webview-ui/src/i18n/locales/vi/settings.json index a8611ca687..2d4b17cf7f 100644 --- a/webview-ui/src/i18n/locales/vi/settings.json +++ b/webview-ui/src/i18n/locales/vi/settings.json @@ -767,6 +767,16 @@ "description": "Ngưỡng thấp hơn làm cho việc chỉnh sửa tệp linh hoạt hơn với các biến thể định dạng và khoảng trắng. Ngưỡng 100% yêu cầu khớp chính xác." } }, + "taskTree": { + "maxNestingDepth": { + "label": "Độ sâu lồng nhau tối đa của tác vụ", + "description": "Số mức phụ tác vụ có thể lồng vào nhau (gốc = 0). Giá trị 0 tắt hoàn toàn việc ủy quyền — mọi new_task chạy inline trong cuộc trò chuyện hiện tại. Phạm vi: 0–5." + }, + "autoFlattenOnLimit": { + "label": "Tự động dẹt phụ tác vụ ở giới hạn lồng nhau", + "description": "Khi một phụ tác vụ vượt quá độ sâu lồng nhau tối đa, nó được thực thi inline trong cuộc trò chuyện hiện tại thay vì mở tab mới. Khi tắt, các yêu cầu như vậy bị từ chối để bạn tiếp tục làm việc trực tiếp." + } + }, "condensingThreshold": { "label": "Ngưỡng kích hoạt nén", "selectProfile": "Cấu hình ngưỡng cho hồ sơ", diff --git a/webview-ui/src/i18n/locales/zh-CN/settings.json b/webview-ui/src/i18n/locales/zh-CN/settings.json index 9f3913e872..9a7f958bb8 100644 --- a/webview-ui/src/i18n/locales/zh-CN/settings.json +++ b/webview-ui/src/i18n/locales/zh-CN/settings.json @@ -767,6 +767,16 @@ "description": "较低的阈值使文件编辑对格式和空白变化更具弹性。100%的阈值要求完全匹配。" } }, + "taskTree": { + "maxNestingDepth": { + "label": "任务最大嵌套深度", + "description": "子任务可以嵌套多少层(根 = 0)。值为 0 时完全禁用委派——每个 new_task 都在当前对话中内联执行。范围:0–5。" + }, + "autoFlattenOnLimit": { + "label": "达到嵌套上限时自动压平子任务", + "description": "当子任务将超过最大嵌套深度时,在当前对话中内联执行,而不是打开新标签页。禁用后,此类请求将被拒绝,以便你直接继续工作。" + } + }, "condensingThreshold": { "label": "压缩触发阈值", "selectProfile": "配置配置文件阈值", diff --git a/webview-ui/src/i18n/locales/zh-TW/settings.json b/webview-ui/src/i18n/locales/zh-TW/settings.json index 80d0d18735..751e6c5fb8 100644 --- a/webview-ui/src/i18n/locales/zh-TW/settings.json +++ b/webview-ui/src/i18n/locales/zh-TW/settings.json @@ -804,6 +804,16 @@ "description": "較低的閾值使檔案編輯對格式和空白變化更具彈性。100%的閾值要求完全匹配。" } }, + "taskTree": { + "maxNestingDepth": { + "label": "任務最大巢狀深度", + "description": "子任務可以巢狀多少層(根 = 0)。值為 0 時完全停用委派——每個 new_task 都在目前對話中內聯執行。範圍:0–5。" + }, + "autoFlattenOnLimit": { + "label": "達到巢狀上限時自動壓平子任務", + "description": "當子任務將超過最大巢狀深度時,在目前對話中內聯執行,而不是開啟新分頁。停用後,此類請求將被拒絕,以便你直接繼續工作。" + } + }, "condensingThreshold": { "label": "壓縮觸發閾值", "selectProfile": "設定檔的閾值",