mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-10-07 02:58:15 +00:00
fix: resolve CI failures for diffViewAutoFocus setting
- Add missing translations for diffViewAutoFocus setting to all 17 locale files - Remove unused FileEditingSettings.tsx file to fix knip issues - Fix unit test failures by updating vscode mock with missing exports (Uri, RelativePattern, onDidChangeWorkspaceFolders) - Ensure mockProvider.getState returns valid response in Task.spec.ts
This commit is contained in:
parent
c1833d77de
commit
816c6585b8
19 changed files with 144 additions and 58 deletions
|
|
@ -116,6 +116,7 @@ vi.mock("vscode", () => {
|
|||
stat: vi.fn().mockResolvedValue({ type: 1 }), // FileType.File = 1
|
||||
},
|
||||
onDidSaveTextDocument: vi.fn(() => mockDisposable),
|
||||
onDidChangeWorkspaceFolders: vi.fn(() => mockDisposable),
|
||||
getConfiguration: vi.fn(() => ({ get: (key: string, defaultValue: any) => defaultValue })),
|
||||
},
|
||||
env: {
|
||||
|
|
@ -127,6 +128,11 @@ vi.mock("vscode", () => {
|
|||
from: vi.fn(),
|
||||
},
|
||||
TabInputText: vi.fn(),
|
||||
Uri: {
|
||||
file: vi.fn((path: string) => ({ fsPath: path, scheme: "file", path })),
|
||||
parse: vi.fn((str: string) => ({ fsPath: str, scheme: "file", path: str })),
|
||||
},
|
||||
RelativePattern: vi.fn().mockImplementation((base, pattern) => ({ base, pattern })),
|
||||
}
|
||||
})
|
||||
|
||||
|
|
@ -1386,6 +1392,9 @@ describe("Cline", () => {
|
|||
})
|
||||
|
||||
it("should not create diff strategy when enableDiff is false", async () => {
|
||||
// Ensure getState returns a valid response
|
||||
mockProvider.getState.mockResolvedValue({})
|
||||
|
||||
const task = new Task({
|
||||
provider: mockProvider,
|
||||
apiConfiguration: mockApiConfig,
|
||||
|
|
|
|||
|
|
@ -1,42 +0,0 @@
|
|||
import { HTMLAttributes } from "react"
|
||||
import { useAppTranslation } from "@/i18n/TranslationContext"
|
||||
import { VSCodeCheckbox } from "@vscode/webview-ui-toolkit/react"
|
||||
import { FileEdit } from "lucide-react"
|
||||
|
||||
import { SetCachedStateField } from "./types"
|
||||
import { SectionHeader } from "./SectionHeader"
|
||||
import { Section } from "./Section"
|
||||
|
||||
type FileEditingSettingsProps = HTMLAttributes<HTMLDivElement> & {
|
||||
diffViewAutoFocus?: boolean
|
||||
setCachedStateField: SetCachedStateField<"diffViewAutoFocus">
|
||||
}
|
||||
|
||||
export const FileEditingSettings = ({ diffViewAutoFocus, setCachedStateField, ...props }: FileEditingSettingsProps) => {
|
||||
const { t } = useAppTranslation()
|
||||
return (
|
||||
<div {...props}>
|
||||
<SectionHeader>
|
||||
<div className="flex items-center gap-2">
|
||||
<FileEdit className="w-4" />
|
||||
<div>{t("settings:sections.fileEditing")}</div>
|
||||
</div>
|
||||
</SectionHeader>
|
||||
|
||||
<Section>
|
||||
<div>
|
||||
<VSCodeCheckbox
|
||||
checked={diffViewAutoFocus}
|
||||
onChange={(e: any) => {
|
||||
setCachedStateField("diffViewAutoFocus", e.target.checked)
|
||||
}}>
|
||||
<span className="font-medium">{t("settings:fileEditing.diffViewAutoFocus.label")}</span>
|
||||
</VSCodeCheckbox>
|
||||
<div className="text-vscode-descriptionForeground text-sm mt-1">
|
||||
{t("settings:fileEditing.diffViewAutoFocus.description")}
|
||||
</div>
|
||||
</div>
|
||||
</Section>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
9
webview-ui/src/i18n/locales/ca/settings.json
generated
9
webview-ui/src/i18n/locales/ca/settings.json
generated
|
|
@ -197,7 +197,14 @@
|
|||
"description": "Fes aquesta quantitat de sol·licituds API automàticament abans de demanar aprovació per continuar amb la tasca.",
|
||||
"unlimited": "Il·limitat"
|
||||
},
|
||||
"selectOptionsFirst": "Seleccioneu almenys una opció a continuació per activar l'aprovació automàtica"
|
||||
"selectOptionsFirst": "Seleccioneu almenys una opció a continuació per activar l'aprovació automàtica",
|
||||
"diffView": {
|
||||
"label": "Vista de diferències",
|
||||
"autoFocus": {
|
||||
"label": "Enfocar automàticament els editors de diferències",
|
||||
"description": "Quan està activat, els editors de diferències oberts per Roo guanyaran automàticament el focus. Quan està desactivat, els editors de diferències s'obriran en segon pla sense prendre el focus del vostre editor actual."
|
||||
}
|
||||
}
|
||||
},
|
||||
"providers": {
|
||||
"providerDocumentation": "Documentació de {{provider}}",
|
||||
|
|
|
|||
9
webview-ui/src/i18n/locales/de/settings.json
generated
9
webview-ui/src/i18n/locales/de/settings.json
generated
|
|
@ -197,7 +197,14 @@
|
|||
"description": "Automatisch so viele API-Anfragen stellen, bevor du um die Erlaubnis gebeten wirst, mit der Aufgabe fortzufahren.",
|
||||
"unlimited": "Unbegrenzt"
|
||||
},
|
||||
"selectOptionsFirst": "Wähle mindestens eine Option unten aus, um die automatische Genehmigung zu aktivieren"
|
||||
"selectOptionsFirst": "Wähle mindestens eine Option unten aus, um die automatische Genehmigung zu aktivieren",
|
||||
"diffView": {
|
||||
"label": "Diff-Ansicht",
|
||||
"autoFocus": {
|
||||
"label": "Diff-Editoren automatisch fokussieren",
|
||||
"description": "Wenn aktiviert, erhalten von Roo geöffnete Diff-Editoren automatisch den Fokus. Wenn deaktiviert, werden Diff-Editoren im Hintergrund geöffnet, ohne den Fokus von Ihrem aktuellen Editor zu nehmen."
|
||||
}
|
||||
}
|
||||
},
|
||||
"providers": {
|
||||
"providerDocumentation": "{{provider}}-Dokumentation",
|
||||
|
|
|
|||
9
webview-ui/src/i18n/locales/es/settings.json
generated
9
webview-ui/src/i18n/locales/es/settings.json
generated
|
|
@ -197,7 +197,14 @@
|
|||
"description": "Realizar automáticamente esta cantidad de solicitudes a la API antes de pedir aprobación para continuar con la tarea.",
|
||||
"unlimited": "Ilimitado"
|
||||
},
|
||||
"selectOptionsFirst": "Selecciona al menos una opción a continuación para habilitar la aprobación automática"
|
||||
"selectOptionsFirst": "Selecciona al menos una opción a continuación para habilitar la aprobación automática",
|
||||
"diffView": {
|
||||
"label": "Vista de diferencias",
|
||||
"autoFocus": {
|
||||
"label": "Enfocar automáticamente los editores de diferencias",
|
||||
"description": "Cuando está habilitado, los editores de diferencias abiertos por Roo obtendrán automáticamente el foco. Cuando está deshabilitado, los editores de diferencias se abrirán en segundo plano sin tomar el foco de su editor actual."
|
||||
}
|
||||
}
|
||||
},
|
||||
"providers": {
|
||||
"providerDocumentation": "Documentación de {{provider}}",
|
||||
|
|
|
|||
7
webview-ui/src/i18n/locales/fr/settings.json
generated
7
webview-ui/src/i18n/locales/fr/settings.json
generated
|
|
@ -197,6 +197,13 @@
|
|||
"title": "Requêtes maximales",
|
||||
"description": "Effectuer automatiquement ce nombre de requêtes API avant de demander l'approbation pour continuer la tâche.",
|
||||
"unlimited": "Illimité"
|
||||
},
|
||||
"diffView": {
|
||||
"label": "Vue des différences",
|
||||
"autoFocus": {
|
||||
"label": "Focus automatique sur les éditeurs de différences",
|
||||
"description": "Lorsqu'activé, les éditeurs de différences ouverts par Roo obtiendront automatiquement le focus. Lorsque désactivé, les éditeurs de différences s'ouvriront en arrière-plan sans prendre le focus de votre éditeur actuel."
|
||||
}
|
||||
}
|
||||
},
|
||||
"providers": {
|
||||
|
|
|
|||
9
webview-ui/src/i18n/locales/hi/settings.json
generated
9
webview-ui/src/i18n/locales/hi/settings.json
generated
|
|
@ -197,7 +197,14 @@
|
|||
"description": "कार्य जारी रखने के लिए अनुमति मांगने से पहले स्वचालित रूप से इतने API अनुरोध करें।",
|
||||
"unlimited": "असीमित"
|
||||
},
|
||||
"selectOptionsFirst": "स्वतः-अनुमोदन सक्षम करने के लिए नीचे से कम से कम एक विकल्प चुनें"
|
||||
"selectOptionsFirst": "स्वतः-अनुमोदन सक्षम करने के लिए नीचे से कम से कम एक विकल्प चुनें",
|
||||
"diffView": {
|
||||
"label": "अंतर दृश्य",
|
||||
"autoFocus": {
|
||||
"label": "अंतर संपादकों को स्वचालित रूप से फोकस करें",
|
||||
"description": "जब सक्षम किया जाता है, तो Roo द्वारा खोले गए अंतर संपादक स्वचालित रूप से फोकस प्राप्त करेंगे। जब अक्षम किया जाता है, तो अंतर संपादक आपके वर्तमान संपादक से फोकस लिए बिना पृष्ठभूमि में खुलेंगे।"
|
||||
}
|
||||
}
|
||||
},
|
||||
"providers": {
|
||||
"providerDocumentation": "{{provider}} दस्तावेज़ीकरण",
|
||||
|
|
|
|||
9
webview-ui/src/i18n/locales/id/settings.json
generated
9
webview-ui/src/i18n/locales/id/settings.json
generated
|
|
@ -201,7 +201,14 @@
|
|||
"description": "Secara otomatis membuat sejumlah permintaan API ini sebelum meminta persetujuan untuk melanjutkan tugas.",
|
||||
"unlimited": "Tidak terbatas"
|
||||
},
|
||||
"selectOptionsFirst": "Pilih setidaknya satu opsi di bawah ini untuk mengaktifkan persetujuan otomatis"
|
||||
"selectOptionsFirst": "Pilih setidaknya satu opsi di bawah ini untuk mengaktifkan persetujuan otomatis",
|
||||
"diffView": {
|
||||
"label": "Tampilan Diff",
|
||||
"autoFocus": {
|
||||
"label": "Fokus otomatis editor diff",
|
||||
"description": "Ketika diaktifkan, editor diff yang dibuka oleh Roo akan secara otomatis mendapatkan fokus. Ketika dinonaktifkan, editor diff akan terbuka di latar belakang tanpa mengambil fokus dari editor Anda saat ini."
|
||||
}
|
||||
}
|
||||
},
|
||||
"providers": {
|
||||
"providerDocumentation": "Dokumentasi {{provider}}",
|
||||
|
|
|
|||
9
webview-ui/src/i18n/locales/it/settings.json
generated
9
webview-ui/src/i18n/locales/it/settings.json
generated
|
|
@ -197,7 +197,14 @@
|
|||
"description": "Esegui automaticamente questo numero di richieste API prima di chiedere l'approvazione per continuare con l'attività.",
|
||||
"unlimited": "Illimitato"
|
||||
},
|
||||
"selectOptionsFirst": "Seleziona almeno un'opzione qui sotto per abilitare l'approvazione automatica"
|
||||
"selectOptionsFirst": "Seleziona almeno un'opzione qui sotto per abilitare l'approvazione automatica",
|
||||
"diffView": {
|
||||
"label": "Vista differenze",
|
||||
"autoFocus": {
|
||||
"label": "Focus automatico sugli editor delle differenze",
|
||||
"description": "Quando abilitato, gli editor delle differenze aperti da Roo otterranno automaticamente il focus. Quando disabilitato, gli editor delle differenze si apriranno in background senza prendere il focus dal tuo editor corrente."
|
||||
}
|
||||
}
|
||||
},
|
||||
"providers": {
|
||||
"providerDocumentation": "Documentazione {{provider}}",
|
||||
|
|
|
|||
9
webview-ui/src/i18n/locales/ja/settings.json
generated
9
webview-ui/src/i18n/locales/ja/settings.json
generated
|
|
@ -197,7 +197,14 @@
|
|||
"description": "タスクを続行するための承認を求める前に、自動的にこの数のAPIリクエストを行います。",
|
||||
"unlimited": "無制限"
|
||||
},
|
||||
"selectOptionsFirst": "自動承認を有効にするには、以下のオプションを少なくとも1つ選択してください"
|
||||
"selectOptionsFirst": "自動承認を有効にするには、以下のオプションを少なくとも1つ選択してください",
|
||||
"diffView": {
|
||||
"label": "差分ビュー",
|
||||
"autoFocus": {
|
||||
"label": "差分エディタを自動的にフォーカス",
|
||||
"description": "有効にすると、Rooによって開かれた差分エディタは自動的にフォーカスを取得します。無効にすると、差分エディタは現在のエディタからフォーカスを奪うことなくバックグラウンドで開きます。"
|
||||
}
|
||||
}
|
||||
},
|
||||
"providers": {
|
||||
"providerDocumentation": "{{provider}}のドキュメント",
|
||||
|
|
|
|||
9
webview-ui/src/i18n/locales/ko/settings.json
generated
9
webview-ui/src/i18n/locales/ko/settings.json
generated
|
|
@ -197,7 +197,14 @@
|
|||
"description": "작업을 계속하기 위한 승인을 요청하기 전에 자동으로 이 수의 API 요청을 수행합니다.",
|
||||
"unlimited": "무제한"
|
||||
},
|
||||
"selectOptionsFirst": "자동 승인을 활성화하려면 아래에서 하나 이상의 옵션을 선택하세요"
|
||||
"selectOptionsFirst": "자동 승인을 활성화하려면 아래에서 하나 이상의 옵션을 선택하세요",
|
||||
"diffView": {
|
||||
"label": "차이점 보기",
|
||||
"autoFocus": {
|
||||
"label": "차이점 편집기 자동 포커스",
|
||||
"description": "활성화되면 Roo가 연 차이점 편집기가 자동으로 포커스를 받습니다. 비활성화되면 차이점 편집기가 현재 편집기에서 포커스를 가져가지 않고 백그라운드에서 열립니다."
|
||||
}
|
||||
}
|
||||
},
|
||||
"providers": {
|
||||
"providerDocumentation": "{{provider}} 문서",
|
||||
|
|
|
|||
9
webview-ui/src/i18n/locales/nl/settings.json
generated
9
webview-ui/src/i18n/locales/nl/settings.json
generated
|
|
@ -197,7 +197,14 @@
|
|||
"description": "Voer automatisch dit aantal API-verzoeken uit voordat om goedkeuring wordt gevraagd om door te gaan met de taak.",
|
||||
"unlimited": "Onbeperkt"
|
||||
},
|
||||
"selectOptionsFirst": "Selecteer ten minste één optie hieronder om automatische goedkeuring in te schakelen"
|
||||
"selectOptionsFirst": "Selecteer ten minste één optie hieronder om automatische goedkeuring in te schakelen",
|
||||
"diffView": {
|
||||
"label": "Diff-weergave",
|
||||
"autoFocus": {
|
||||
"label": "Diff-editors automatisch focussen",
|
||||
"description": "Wanneer ingeschakeld, krijgen diff-editors geopend door Roo automatisch focus. Wanneer uitgeschakeld, worden diff-editors op de achtergrond geopend zonder focus van uw huidige editor te nemen."
|
||||
}
|
||||
}
|
||||
},
|
||||
"providers": {
|
||||
"providerDocumentation": "{{provider}} documentatie",
|
||||
|
|
|
|||
9
webview-ui/src/i18n/locales/pl/settings.json
generated
9
webview-ui/src/i18n/locales/pl/settings.json
generated
|
|
@ -197,7 +197,14 @@
|
|||
"description": "Automatycznie wykonaj tyle żądań API przed poproszeniem o zgodę na kontynuowanie zadania.",
|
||||
"unlimited": "Bez limitu"
|
||||
},
|
||||
"selectOptionsFirst": "Wybierz co najmniej jedną opcję poniżej, aby włączyć automatyczne zatwierdzanie"
|
||||
"selectOptionsFirst": "Wybierz co najmniej jedną opcję poniżej, aby włączyć automatyczne zatwierdzanie",
|
||||
"diffView": {
|
||||
"label": "Widok różnic",
|
||||
"autoFocus": {
|
||||
"label": "Automatyczne skupienie edytorów różnic",
|
||||
"description": "Gdy włączone, edytory różnic otwarte przez Roo automatycznie uzyskają fokus. Gdy wyłączone, edytory różnic otworzą się w tle bez zabierania fokusu z bieżącego edytora."
|
||||
}
|
||||
}
|
||||
},
|
||||
"providers": {
|
||||
"providerDocumentation": "Dokumentacja {{provider}}",
|
||||
|
|
|
|||
9
webview-ui/src/i18n/locales/pt-BR/settings.json
generated
9
webview-ui/src/i18n/locales/pt-BR/settings.json
generated
|
|
@ -197,7 +197,14 @@
|
|||
"description": "Fazer automaticamente este número de requisições à API antes de pedir aprovação para continuar com a tarefa.",
|
||||
"unlimited": "Ilimitado"
|
||||
},
|
||||
"selectOptionsFirst": "Selecione pelo menos uma opção abaixo para habilitar a aprovação automática"
|
||||
"selectOptionsFirst": "Selecione pelo menos uma opção abaixo para habilitar a aprovação automática",
|
||||
"diffView": {
|
||||
"label": "Visualização de diferenças",
|
||||
"autoFocus": {
|
||||
"label": "Focar automaticamente editores de diferenças",
|
||||
"description": "Quando ativado, os editores de diferenças abertos pelo Roo ganharão foco automaticamente. Quando desativado, os editores de diferenças serão abertos em segundo plano sem tirar o foco do seu editor atual."
|
||||
}
|
||||
}
|
||||
},
|
||||
"providers": {
|
||||
"providerDocumentation": "Documentação do {{provider}}",
|
||||
|
|
|
|||
9
webview-ui/src/i18n/locales/ru/settings.json
generated
9
webview-ui/src/i18n/locales/ru/settings.json
generated
|
|
@ -197,7 +197,14 @@
|
|||
"description": "Автоматически выполнять это количество API-запросов перед запросом разрешения на продолжение задачи.",
|
||||
"unlimited": "Без ограничений"
|
||||
},
|
||||
"selectOptionsFirst": "Выберите хотя бы один вариант ниже, чтобы включить автоодобрение"
|
||||
"selectOptionsFirst": "Выберите хотя бы один вариант ниже, чтобы включить автоодобрение",
|
||||
"diffView": {
|
||||
"label": "Просмотр различий",
|
||||
"autoFocus": {
|
||||
"label": "Автофокус на редакторах различий",
|
||||
"description": "Когда включено, редакторы различий, открытые Roo, автоматически получат фокус. Когда отключено, редакторы различий будут открываться в фоновом режиме, не забирая фокус у вашего текущего редактора."
|
||||
}
|
||||
}
|
||||
},
|
||||
"providers": {
|
||||
"providerDocumentation": "Документация {{provider}}",
|
||||
|
|
|
|||
9
webview-ui/src/i18n/locales/tr/settings.json
generated
9
webview-ui/src/i18n/locales/tr/settings.json
generated
|
|
@ -197,7 +197,14 @@
|
|||
"description": "Göreve devam etmek için onay istemeden önce bu sayıda API isteği otomatik olarak yap.",
|
||||
"unlimited": "Sınırsız"
|
||||
},
|
||||
"selectOptionsFirst": "Otomatik onayı etkinleştirmek için aşağıdan en az bir seçenek seçin"
|
||||
"selectOptionsFirst": "Otomatik onayı etkinleştirmek için aşağıdan en az bir seçenek seçin",
|
||||
"diffView": {
|
||||
"label": "Fark Görünümü",
|
||||
"autoFocus": {
|
||||
"label": "Fark düzenleyicilerini otomatik odakla",
|
||||
"description": "Etkinleştirildiğinde, Roo tarafından açılan fark düzenleyicileri otomatik olarak odak kazanır. Devre dışı bırakıldığında, fark düzenleyicileri mevcut düzenleyicinizden odağı almadan arka planda açılır."
|
||||
}
|
||||
}
|
||||
},
|
||||
"providers": {
|
||||
"providerDocumentation": "{{provider}} Dokümantasyonu",
|
||||
|
|
|
|||
9
webview-ui/src/i18n/locales/vi/settings.json
generated
9
webview-ui/src/i18n/locales/vi/settings.json
generated
|
|
@ -197,7 +197,14 @@
|
|||
"description": "Tự động thực hiện số lượng API request này trước khi yêu cầu phê duyệt để tiếp tục với nhiệm vụ.",
|
||||
"unlimited": "Không giới hạn"
|
||||
},
|
||||
"selectOptionsFirst": "Chọn ít nhất một tùy chọn bên dưới để bật tự động phê duyệt"
|
||||
"selectOptionsFirst": "Chọn ít nhất một tùy chọn bên dưới để bật tự động phê duyệt",
|
||||
"diffView": {
|
||||
"label": "Xem khác biệt",
|
||||
"autoFocus": {
|
||||
"label": "Tự động lấy nét trình chỉnh sửa khác biệt",
|
||||
"description": "Khi được bật, các trình chỉnh sửa khác biệt được mở bởi Roo sẽ tự động nhận được tiêu điểm. Khi bị tắt, các trình chỉnh sửa khác biệt sẽ mở trong nền mà không lấy tiêu điểm từ trình chỉnh sửa hiện tại của bạn."
|
||||
}
|
||||
}
|
||||
},
|
||||
"providers": {
|
||||
"providerDocumentation": "Tài liệu {{provider}}",
|
||||
|
|
|
|||
9
webview-ui/src/i18n/locales/zh-CN/settings.json
generated
9
webview-ui/src/i18n/locales/zh-CN/settings.json
generated
|
|
@ -197,7 +197,14 @@
|
|||
"description": "在请求批准以继续执行任务之前,自动发出此数量的 API 请求。",
|
||||
"unlimited": "无限制"
|
||||
},
|
||||
"selectOptionsFirst": "请至少选择以下一个选项以启用自动批准"
|
||||
"selectOptionsFirst": "请至少选择以下一个选项以启用自动批准",
|
||||
"diffView": {
|
||||
"label": "差异视图",
|
||||
"autoFocus": {
|
||||
"label": "自动聚焦差异编辑器",
|
||||
"description": "启用后,Roo 打开的差异编辑器将自动获得焦点。禁用后,差异编辑器将在后台打开,而不会从当前编辑器中夺取焦点。"
|
||||
}
|
||||
}
|
||||
},
|
||||
"providers": {
|
||||
"providerDocumentation": "{{provider}} 文档",
|
||||
|
|
|
|||
9
webview-ui/src/i18n/locales/zh-TW/settings.json
generated
9
webview-ui/src/i18n/locales/zh-TW/settings.json
generated
|
|
@ -197,7 +197,14 @@
|
|||
"description": "在請求批准以繼續執行工作之前,自動發出此數量的 API 請求。",
|
||||
"unlimited": "無限制"
|
||||
},
|
||||
"selectOptionsFirst": "請至少選擇以下一個選項以啟用自動核准"
|
||||
"selectOptionsFirst": "請至少選擇以下一個選項以啟用自動核准",
|
||||
"diffView": {
|
||||
"label": "差異檢視",
|
||||
"autoFocus": {
|
||||
"label": "自動聚焦差異編輯器",
|
||||
"description": "啟用後,Roo 開啟的差異編輯器將自動獲得焦點。停用後,差異編輯器將在背景開啟,而不會從目前的編輯器中奪取焦點。"
|
||||
}
|
||||
}
|
||||
},
|
||||
"providers": {
|
||||
"providerDocumentation": "{{provider}} 文件",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue