diff --git a/src/core/checkpoints/index.ts b/src/core/checkpoints/index.ts index 152f521d1d..2c9c5a3612 100644 --- a/src/core/checkpoints/index.ts +++ b/src/core/checkpoints/index.ts @@ -17,13 +17,11 @@ import { DIFF_VIEW_URI_SCHEME } from "../../integrations/editor/DiffViewProvider import { CheckpointServiceOptions, RepoPerTaskCheckpointService } from "../../services/checkpoints" const WARNING_THRESHOLD_MS = 5000 -const WAIT_LONG_TIME_I18_KEY = "common:errors.wait_checkpoint_long_time" -const INIT_FAIL_LONG_TIME_I18_KEY = "common:errors.init_checkpoint_fail_long_time" -function sendCheckpointInitWarn(task: Task, checkpointWarning: string) { +function sendCheckpointInitWarn(task: Task, type?: "WAIT_TIMEOUT" | "INIT_TIMEOUT", timeout?: number) { task.providerRef.deref()?.postMessageToWebview({ type: "checkpointInitWarning", - checkpointWarning, + checkpointWarning: type && timeout ? { type, timeout } : undefined, }) } @@ -88,10 +86,7 @@ export async function getCheckpointService(task: Task, { interval = 250 }: { int // Show warning if we're past the threshold and haven't shown it yet if (!warningShown && elapsed >= WARNING_THRESHOLD_MS) { warningShown = true - sendCheckpointInitWarn( - task, - t(WAIT_LONG_TIME_I18_KEY, { timeout: WARNING_THRESHOLD_MS / 1000 }), - ) + sendCheckpointInitWarn(task, "WAIT_TIMEOUT", WARNING_THRESHOLD_MS / 1000) } console.log( @@ -102,11 +97,11 @@ export async function getCheckpointService(task: Task, { interval = 250 }: { int { interval, timeout: checkpointTimeoutMs }, ) if (!task?.checkpointService) { - sendCheckpointInitWarn(task, t(INIT_FAIL_LONG_TIME_I18_KEY, { timeout: task.checkpointTimeout })) + sendCheckpointInitWarn(task, "INIT_TIMEOUT", task.checkpointTimeout) task.enableCheckpoints = false return undefined } else { - sendCheckpointInitWarn(task, "") + sendCheckpointInitWarn(task) } return task.checkpointService } @@ -120,12 +115,12 @@ export async function getCheckpointService(task: Task, { interval = 250 }: { int await checkGitInstallation(task, service, log, provider) task.checkpointService = service if (task.enableCheckpoints) { - sendCheckpointInitWarn(task, "") + sendCheckpointInitWarn(task) } return service } catch (err) { if (err.name === "TimeoutError" && task.enableCheckpoints) { - sendCheckpointInitWarn(task, t(INIT_FAIL_LONG_TIME_I18_KEY, { timeout: task.checkpointTimeout })) + sendCheckpointInitWarn(task, "INIT_TIMEOUT", task.checkpointTimeout) } log(`[Task#getCheckpointService] ${err.message}`) task.enableCheckpoints = false @@ -169,7 +164,7 @@ async function checkGitInstallation( service.on("checkpoint", ({ fromHash: from, toHash: to, suppressMessage }) => { try { - sendCheckpointInitWarn(task, "") + sendCheckpointInitWarn(task) // Always update the current checkpoint hash in the webview, including the suppress flag provider?.postMessageToWebview({ type: "currentCheckpointUpdated", diff --git a/src/i18n/locales/ca/common.json b/src/i18n/locales/ca/common.json index af48a75103..b71b7eb913 100644 --- a/src/i18n/locales/ca/common.json +++ b/src/i18n/locales/ca/common.json @@ -31,8 +31,6 @@ "could_not_open_file": "No s'ha pogut obrir el fitxer: {{errorMessage}}", "could_not_open_file_generic": "No s'ha pogut obrir el fitxer!", "checkpoint_timeout": "S'ha esgotat el temps en intentar restaurar el punt de control.", - "wait_checkpoint_long_time": "Has esperat {{timeout}} segons per inicialitzar el punt de control. Si no necessites aquesta funció, desactiva-la a la configuració.", - "init_checkpoint_fail_long_time": "La inicialització del punt de control ha trigat més de {{timeout}} segons. La funció de punt de control s'ha desactivat per a aquesta tasca. Pots desactivar-la o augmentar el temps d'espera a la configuració.", "checkpoint_failed": "Ha fallat la restauració del punt de control.", "git_not_installed": "Git és necessari per a la funció de punts de control. Si us plau, instal·la Git per activar els punts de control.", "nested_git_repos_warning": "Els punts de control estan deshabilitats perquè s'ha detectat un repositori git niat a: {{path}}. Per utilitzar punts de control, si us plau elimina o reubica aquest repositori git niat.", diff --git a/src/i18n/locales/de/common.json b/src/i18n/locales/de/common.json index 3095d93bf4..6577d460d1 100644 --- a/src/i18n/locales/de/common.json +++ b/src/i18n/locales/de/common.json @@ -27,8 +27,6 @@ "could_not_open_file": "Datei konnte nicht geöffnet werden: {{errorMessage}}", "could_not_open_file_generic": "Datei konnte nicht geöffnet werden!", "checkpoint_timeout": "Zeitüberschreitung beim Versuch, den Checkpoint wiederherzustellen.", - "wait_checkpoint_long_time": "Du hast {{timeout}} Sekunden auf die Initialisierung des Checkpoints gewartet. Wenn du die Checkpoint-Funktion nicht brauchst, kannst du sie in den Einstellungen ausschalten.", - "init_checkpoint_fail_long_time": "Die Initialisierung des Checkpoints dauert länger als {{timeout}} Sekunden. Die Checkpoint-Funktion ist für diese Aufgabe deaktiviert. Du kannst Checkpoints ausschalten oder die Wartezeit in den Einstellungen verlängern.", "checkpoint_failed": "Fehler beim Wiederherstellen des Checkpoints.", "git_not_installed": "Git ist für die Checkpoint-Funktion erforderlich. Bitte installiere Git, um Checkpoints zu aktivieren.", "nested_git_repos_warning": "Checkpoints sind deaktiviert, da ein verschachteltes Git-Repository erkannt wurde unter: {{path}}. Um Checkpoints zu verwenden, entferne oder verschiebe bitte dieses verschachtelte Git-Repository.", diff --git a/src/i18n/locales/en/common.json b/src/i18n/locales/en/common.json index 1e1e890a03..e8c264ba68 100644 --- a/src/i18n/locales/en/common.json +++ b/src/i18n/locales/en/common.json @@ -30,8 +30,6 @@ "checkpoint_failed": "Failed to restore checkpoint.", "git_not_installed": "Git is required for the checkpoints feature. Please install Git to enable checkpoints.", "nested_git_repos_warning": "Checkpoints are disabled because a nested git repository was detected at: {{path}}. To use checkpoints, please remove or relocate this nested git repository.", - "wait_checkpoint_long_time": "Waited {{timeout}} seconds for checkpoint initialization. If you don't need the checkpoint feature, please turn it off in the settings.", - "init_checkpoint_fail_long_time": "Checkpoint initialization has taken more than {{timeout}} seconds. Checkpoint function is disabled for this task. You can disable checkpoint or extend the waiting time in settings.", "no_workspace": "Please open a project folder first", "update_support_prompt": "Failed to update support prompt", "reset_support_prompt": "Failed to reset support prompt", diff --git a/src/i18n/locales/es/common.json b/src/i18n/locales/es/common.json index ec17f14494..5cfa3c5749 100644 --- a/src/i18n/locales/es/common.json +++ b/src/i18n/locales/es/common.json @@ -27,8 +27,6 @@ "could_not_open_file": "No se pudo abrir el archivo: {{errorMessage}}", "could_not_open_file_generic": "¡No se pudo abrir el archivo!", "checkpoint_timeout": "Se agotó el tiempo al intentar restaurar el punto de control.", - "wait_checkpoint_long_time": "Has esperado {{timeout}} segundos para la inicialización del punto de control. Si no necesitas esta función, desactívala en la configuración.", - "init_checkpoint_fail_long_time": "La inicialización del punto de control ha tardado más de {{timeout}} segundos. La función de punto de control está desactivada para esta tarea. Puedes desactivarla o aumentar el tiempo de espera en la configuración.", "checkpoint_failed": "Error al restaurar el punto de control.", "git_not_installed": "Git es necesario para la función de puntos de control. Por favor, instala Git para activar los puntos de control.", "nested_git_repos_warning": "Los puntos de control están deshabilitados porque se detectó un repositorio git anidado en: {{path}}. Para usar puntos de control, por favor elimina o reubica este repositorio git anidado.", diff --git a/src/i18n/locales/fr/common.json b/src/i18n/locales/fr/common.json index ca5d2ee9a8..5a11c874a7 100644 --- a/src/i18n/locales/fr/common.json +++ b/src/i18n/locales/fr/common.json @@ -27,8 +27,6 @@ "could_not_open_file": "Impossible d'ouvrir le fichier : {{errorMessage}}", "could_not_open_file_generic": "Impossible d'ouvrir le fichier !", "checkpoint_timeout": "Expiration du délai lors de la tentative de rétablissement du checkpoint.", - "wait_checkpoint_long_time": "Tu as attendu {{timeout}} secondes pour l'initialisation du checkpoint. Si tu n'as pas besoin de cette fonction, désactive-la dans les paramètres.", - "init_checkpoint_fail_long_time": "L'initialisation du checkpoint a pris plus de {{timeout}} secondes. La fonction checkpoint est désactivée pour cette tâche. Tu peux la désactiver ou prolonger le délai dans les paramètres.", "checkpoint_failed": "Échec du rétablissement du checkpoint.", "git_not_installed": "Git est requis pour la fonctionnalité des points de contrôle. Veuillez installer Git pour activer les points de contrôle.", "nested_git_repos_warning": "Les points de contrôle sont désactivés car un dépôt git imbriqué a été détecté à : {{path}}. Pour utiliser les points de contrôle, veuillez supprimer ou déplacer ce dépôt git imbriqué.", diff --git a/src/i18n/locales/hi/common.json b/src/i18n/locales/hi/common.json index 6c28c66a8c..e89c16cbd0 100644 --- a/src/i18n/locales/hi/common.json +++ b/src/i18n/locales/hi/common.json @@ -27,8 +27,6 @@ "could_not_open_file": "फ़ाइल नहीं खोली जा सकी: {{errorMessage}}", "could_not_open_file_generic": "फ़ाइल नहीं खोली जा सकी!", "checkpoint_timeout": "चेकपॉइंट को पुनर्स्थापित करने का प्रयास करते समय टाइमआउट हो गया।", - "wait_checkpoint_long_time": "तुमने {{timeout}} सेकंड तक चेकपॉइंट इनिशियलाइज़ेशन का इंतजार किया। अगर तुम्हें यह फ़ीचर नहीं चाहिए, तो सेटिंग्स में बंद कर दो।", - "init_checkpoint_fail_long_time": "चेकपॉइंट इनिशियलाइज़ेशन {{timeout}} सेकंड से ज़्यादा समय ले रहा है। इस कार्य के लिए चेकपॉइंट फ़ीचर बंद कर दिया गया है। तुम इसे बंद कर सकते हो या सेटिंग्स में इंतजार का समय बढ़ा सकते हो।", "checkpoint_failed": "चेकपॉइंट पुनर्स्थापित करने में विफल।", "git_not_installed": "चेकपॉइंट सुविधा के लिए Git आवश्यक है। कृपया चेकपॉइंट সক্ষম करने के लिए Git इंस्टॉल करें।", "nested_git_repos_warning": "चेकपॉइंट अक्षम हैं क्योंकि {{path}} पर नेस्टेड git रिपॉजिटरी का पता चला है। चेकपॉइंट का उपयोग करने के लिए, कृपया इस नेस्टेड git रिपॉजिटरी को हटाएं या स्थानांतरित करें।", diff --git a/src/i18n/locales/id/common.json b/src/i18n/locales/id/common.json index 766494fbb3..ae1662eb37 100644 --- a/src/i18n/locales/id/common.json +++ b/src/i18n/locales/id/common.json @@ -27,8 +27,6 @@ "could_not_open_file": "Tidak dapat membuka file: {{errorMessage}}", "could_not_open_file_generic": "Tidak dapat membuka file!", "checkpoint_timeout": "Timeout saat mencoba memulihkan checkpoint.", - "wait_checkpoint_long_time": "Kamu sudah menunggu {{timeout}} detik untuk inisialisasi checkpoint. Kalau tidak butuh fitur ini, matikan saja di pengaturan.", - "init_checkpoint_fail_long_time": "Inisialisasi checkpoint sudah lebih dari {{timeout}} detik. Fitur checkpoint dinonaktifkan untuk tugas ini. Kamu bisa mematikan atau menambah waktu tunggu di pengaturan.", "checkpoint_failed": "Gagal memulihkan checkpoint.", "git_not_installed": "Git diperlukan untuk fitur checkpoint. Silakan instal Git untuk mengaktifkan checkpoint.", "nested_git_repos_warning": "Checkpoint dinonaktifkan karena repositori git bersarang terdeteksi di: {{path}}. Untuk menggunakan checkpoint, silakan hapus atau pindahkan repositori git bersarang ini.", diff --git a/src/i18n/locales/it/common.json b/src/i18n/locales/it/common.json index b599f6417e..aeaec11d0d 100644 --- a/src/i18n/locales/it/common.json +++ b/src/i18n/locales/it/common.json @@ -27,8 +27,6 @@ "could_not_open_file": "Impossibile aprire il file: {{errorMessage}}", "could_not_open_file_generic": "Impossibile aprire il file!", "checkpoint_timeout": "Timeout durante il tentativo di ripristinare il checkpoint.", - "wait_checkpoint_long_time": "Hai aspettato {{timeout}} secondi per l'inizializzazione del checkpoint. Se non ti serve questa funzione, disattivala nelle impostazioni.", - "init_checkpoint_fail_long_time": "L'inizializzazione del checkpoint ha impiegato più di {{timeout}} secondi. La funzione checkpoint è disabilitata per questa attività. Puoi disattivarla o aumentare il tempo di attesa nelle impostazioni.", "checkpoint_failed": "Impossibile ripristinare il checkpoint.", "git_not_installed": "Git è richiesto per la funzione di checkpoint. Per favore, installa Git per abilitare i checkpoint.", "nested_git_repos_warning": "I checkpoint sono disabilitati perché è stato rilevato un repository git annidato in: {{path}}. Per utilizzare i checkpoint, rimuovi o sposta questo repository git annidato.", diff --git a/src/i18n/locales/ja/common.json b/src/i18n/locales/ja/common.json index d0f371adbb..a607dbffd5 100644 --- a/src/i18n/locales/ja/common.json +++ b/src/i18n/locales/ja/common.json @@ -27,8 +27,6 @@ "could_not_open_file": "ファイルを開けませんでした:{{errorMessage}}", "could_not_open_file_generic": "ファイルを開けませんでした!", "checkpoint_timeout": "チェックポイントの復元を試みる際にタイムアウトしました。", - "wait_checkpoint_long_time": "{{timeout}} 秒間チェックポイントの初期化を待機しました。チェックポイント機能が不要な場合は、設定でオフにしてください。", - "init_checkpoint_fail_long_time": "チェックポイントの初期化が {{timeout}} 秒以上かかりました。このタスクではチェックポイント機能が無効化されました。チェックポイントをオフにするか、設定で待機時間を延長できます。", "checkpoint_failed": "チェックポイントの復元に失敗しました。", "git_not_installed": "チェックポイント機能にはGitが必要です。チェックポイントを有効にするにはGitをインストールしてください。", "nested_git_repos_warning": "{{path}} でネストされたgitリポジトリが検出されたため、チェックポイントが無効になっています。チェックポイントを使用するには、このネストされたgitリポジトリを削除または移動してください。", diff --git a/src/i18n/locales/ko/common.json b/src/i18n/locales/ko/common.json index 6f7802f3b4..e48b84fe20 100644 --- a/src/i18n/locales/ko/common.json +++ b/src/i18n/locales/ko/common.json @@ -27,8 +27,6 @@ "could_not_open_file": "파일을 열 수 없습니다: {{errorMessage}}", "could_not_open_file_generic": "파일을 열 수 없습니다!", "checkpoint_timeout": "체크포인트 복원을 시도하는 중 시간 초과되었습니다.", - "wait_checkpoint_long_time": "{{timeout}}초 동안 체크포인트 초기화를 기다렸어. 체크포인트 기능이 필요 없다면 설정에서 꺼 줘.", - "init_checkpoint_fail_long_time": "체크포인트 초기화가 {{timeout}}초 이상 걸렸어. 이 작업에 대해 체크포인트 기능이 꺼졌어. 체크포인트를 끄거나 설정에서 대기 시간을 늘릴 수 있어.", "checkpoint_failed": "체크포인트 복원에 실패했습니다.", "git_not_installed": "체크포인트 기능을 사용하려면 Git이 필요합니다. 체크포인트를 활성화하려면 Git을 설치하세요.", "nested_git_repos_warning": "{{path}}에서 중첩된 git 저장소가 감지되어 체크포인트가 비활성화되었습니다. 체크포인트를 사용하려면 이 중첩된 git 저장소를 제거하거나 이동해주세요.", diff --git a/src/i18n/locales/nl/common.json b/src/i18n/locales/nl/common.json index 8221c8772f..0e3e2459a0 100644 --- a/src/i18n/locales/nl/common.json +++ b/src/i18n/locales/nl/common.json @@ -27,8 +27,6 @@ "could_not_open_file": "Kon bestand niet openen: {{errorMessage}}", "could_not_open_file_generic": "Kon bestand niet openen!", "checkpoint_timeout": "Time-out bij het herstellen van checkpoint.", - "wait_checkpoint_long_time": "Je hebt {{timeout}} seconden gewacht op de initialisatie van de checkpoint. Als je deze functie niet nodig hebt, schakel hem dan uit in de instellingen.", - "init_checkpoint_fail_long_time": "De initialisatie van de checkpoint duurde meer dan {{timeout}} seconden. De checkpointfunctie is uitgeschakeld voor deze taak. Je kunt hem uitschakelen of de wachttijd in de instellingen verhogen.", "checkpoint_failed": "Herstellen van checkpoint mislukt.", "git_not_installed": "Git is vereist voor de checkpoint-functie. Installeer Git om checkpoints in te schakelen.", "nested_git_repos_warning": "Checkpoints zijn uitgeschakeld omdat een geneste git-repository is gedetecteerd op: {{path}}. Om checkpoints te gebruiken, verwijder of verplaats deze geneste git-repository.", diff --git a/src/i18n/locales/pl/common.json b/src/i18n/locales/pl/common.json index d2e99c8171..1d48b0f9cc 100644 --- a/src/i18n/locales/pl/common.json +++ b/src/i18n/locales/pl/common.json @@ -27,8 +27,6 @@ "could_not_open_file": "Nie można otworzyć pliku: {{errorMessage}}", "could_not_open_file_generic": "Nie można otworzyć pliku!", "checkpoint_timeout": "Upłynął limit czasu podczas próby przywrócenia punktu kontrolnego.", - "wait_checkpoint_long_time": "Czekałeś {{timeout}} sekund na inicjalizację punktu kontrolnego. Jeśli nie potrzebujesz tej funkcji, wyłącz ją w ustawieniach.", - "init_checkpoint_fail_long_time": "Inicjalizacja punktu kontrolnego trwała ponad {{timeout}} sekund. Funkcja punktu kontrolnego została wyłączona dla tego zadania. Możesz ją wyłączyć lub wydłużyć czas oczekiwania w ustawieniach.", "checkpoint_failed": "Nie udało się przywrócić punktu kontrolnego.", "git_not_installed": "Funkcja punktów kontrolnych wymaga oprogramowania Git. Zainstaluj Git, aby włączyć punkty kontrolne.", "nested_git_repos_warning": "Punkty kontrolne są wyłączone, ponieważ wykryto zagnieżdżone repozytorium git w: {{path}}. Aby używać punktów kontrolnych, usuń lub przenieś to zagnieżdżone repozytorium git.", diff --git a/src/i18n/locales/pt-BR/common.json b/src/i18n/locales/pt-BR/common.json index 4206df8890..093ef7b0bf 100644 --- a/src/i18n/locales/pt-BR/common.json +++ b/src/i18n/locales/pt-BR/common.json @@ -31,8 +31,6 @@ "could_not_open_file": "Não foi possível abrir o arquivo: {{errorMessage}}", "could_not_open_file_generic": "Não foi possível abrir o arquivo!", "checkpoint_timeout": "Tempo esgotado ao tentar restaurar o ponto de verificação.", - "wait_checkpoint_long_time": "Você esperou {{timeout}} segundos para inicializar o checkpoint. Se não precisa dessa função, desative nas configurações.", - "init_checkpoint_fail_long_time": "A inicialização do checkpoint levou mais de {{timeout}} segundos. A função de checkpoint foi desativada para esta tarefa. Você pode desativar ou aumentar o tempo de espera nas configurações.", "checkpoint_failed": "Falha ao restaurar o ponto de verificação.", "git_not_installed": "O Git é necessário para o recurso de checkpoints. Por favor, instale o Git para habilitar os checkpoints.", "nested_git_repos_warning": "Os checkpoints estão desabilitados porque um repositório git aninhado foi detectado em: {{path}}. Para usar checkpoints, por favor remova ou realoque este repositório git aninhado.", diff --git a/src/i18n/locales/ru/common.json b/src/i18n/locales/ru/common.json index 373fb0177d..7edd656d8c 100644 --- a/src/i18n/locales/ru/common.json +++ b/src/i18n/locales/ru/common.json @@ -27,8 +27,6 @@ "could_not_open_file": "Не удалось открыть файл: {{errorMessage}}", "could_not_open_file_generic": "Не удалось открыть файл!", "checkpoint_timeout": "Превышено время ожидания при попытке восстановления контрольной точки.", - "wait_checkpoint_long_time": "Ожидание инициализации контрольной точки заняло {{timeout}} секунд. Если тебе не нужна эта функция, отключи её в настройках.", - "init_checkpoint_fail_long_time": "Инициализация контрольной точки заняла более {{timeout}} секунд. Функция контрольных точек отключена для этой задачи. Ты можешь отключить её или увеличить время ожидания в настройках.", "checkpoint_failed": "Не удалось восстановить контрольную точку.", "git_not_installed": "Для функции контрольных точек требуется Git. Пожалуйста, установите Git, чтобы включить контрольные точки.", "nested_git_repos_warning": "Контрольные точки отключены, поскольку обнаружен вложенный git-репозиторий в: {{path}}. Чтобы использовать контрольные точки, пожалуйста, удалите или переместите этот вложенный git-репозиторий.", diff --git a/src/i18n/locales/tr/common.json b/src/i18n/locales/tr/common.json index ae55796684..20b2824b98 100644 --- a/src/i18n/locales/tr/common.json +++ b/src/i18n/locales/tr/common.json @@ -27,8 +27,6 @@ "could_not_open_file": "Dosya açılamadı: {{errorMessage}}", "could_not_open_file_generic": "Dosya açılamadı!", "checkpoint_timeout": "Kontrol noktasını geri yüklemeye çalışırken zaman aşımına uğradı.", - "wait_checkpoint_long_time": "{{timeout}} saniye boyunca kontrol noktası başlatılması beklendi. Bu özelliğe ihtiyacın yoksa ayarlardan kapatabilirsin.", - "init_checkpoint_fail_long_time": "Kontrol noktası başlatılması {{timeout}} saniyeden fazla sürdü. Bu görev için kontrol noktası özelliği devre dışı bırakıldı. Özelliği kapatabilir veya ayarlardan bekleme süresini artırabilirsin.", "checkpoint_failed": "Kontrol noktası geri yüklenemedi.", "git_not_installed": "Kontrol noktaları özelliği için Git gereklidir. Kontrol noktalarını etkinleştirmek için lütfen Git'i yükleyin.", "nested_git_repos_warning": "{{path}} konumunda iç içe git deposu tespit edildiği için kontrol noktaları devre dışı bırakıldı. Kontrol noktalarını kullanmak için lütfen bu iç içe git deposunu kaldırın veya taşıyın.", diff --git a/src/i18n/locales/vi/common.json b/src/i18n/locales/vi/common.json index 27fa9ce78b..f4755162fe 100644 --- a/src/i18n/locales/vi/common.json +++ b/src/i18n/locales/vi/common.json @@ -27,8 +27,6 @@ "could_not_open_file": "Không thể mở tệp: {{errorMessage}}", "could_not_open_file_generic": "Không thể mở tệp!", "checkpoint_timeout": "Đã hết thời gian khi cố gắng khôi phục điểm kiểm tra.", - "wait_checkpoint_long_time": "Bạn đã chờ {{timeout}} giây để khởi tạo điểm kiểm tra. Nếu không cần chức năng này, hãy tắt nó trong cài đặt.", - "init_checkpoint_fail_long_time": "Khởi tạo điểm kiểm tra mất hơn {{timeout}} giây. Chức năng điểm kiểm tra đã bị vô hiệu hóa cho tác vụ này. Bạn có thể tắt nó hoặc tăng thời gian chờ trong cài đặt.", "checkpoint_failed": "Không thể khôi phục điểm kiểm tra.", "git_not_installed": "Yêu cầu Git cho tính năng điểm kiểm tra. Vui lòng cài đặt Git để bật điểm kiểm tra.", "nested_git_repos_warning": "Điểm kiểm tra bị vô hiệu hóa vì phát hiện kho git lồng nhau tại: {{path}}. Để sử dụng điểm kiểm tra, vui lòng xóa hoặc di chuyển kho git lồng nhau này.", diff --git a/src/i18n/locales/zh-CN/common.json b/src/i18n/locales/zh-CN/common.json index c9836e2c6b..787c5c8ae9 100644 --- a/src/i18n/locales/zh-CN/common.json +++ b/src/i18n/locales/zh-CN/common.json @@ -32,8 +32,6 @@ "could_not_open_file": "无法打开文件:{{errorMessage}}", "could_not_open_file_generic": "无法打开文件!", "checkpoint_timeout": "尝试恢复检查点时超时。", - "wait_checkpoint_long_time": "初始化存档点已等待 {{timeout}} 秒。如果你不需要存档点功能,请在设置中关闭。", - "init_checkpoint_fail_long_time": "存档点初始化已超过 {{timeout}} 秒。本任务已禁用存档点功能。你可以关闭存档点或在设置中延长等待时间。", "checkpoint_failed": "恢复检查点失败。", "git_not_installed": "存档点功能需要 Git。请安装 Git 以启用存档点。", "nested_git_repos_warning": "存档点已禁用,因为在 {{path}} 检测到嵌套的 git 仓库。要使用存档点,请移除或重新定位此嵌套的 git 仓库。", diff --git a/src/i18n/locales/zh-TW/common.json b/src/i18n/locales/zh-TW/common.json index a89967fc1a..0ae3549d3e 100644 --- a/src/i18n/locales/zh-TW/common.json +++ b/src/i18n/locales/zh-TW/common.json @@ -27,8 +27,6 @@ "could_not_open_file": "無法開啟檔案:{{errorMessage}}", "could_not_open_file_generic": "無法開啟檔案!", "checkpoint_timeout": "嘗試恢復檢查點時超時。", - "wait_checkpoint_long_time": "初始化存檔點已等待 {{timeout}} 秒。如果你不需要存檔點功能,請在設定中關閉。", - "init_checkpoint_fail_long_time": "存檔點初始化已超過 {{timeout}} 秒。此工作已停用存檔點功能。你可以關閉存檔點或在設定中延長等待時間。", "checkpoint_failed": "恢復檢查點失敗。", "git_not_installed": "存檔點功能需要 Git。請安裝 Git 以啟用存檔點。", "nested_git_repos_warning": "存檔點已停用,因為在 {{path}} 偵測到巢狀的 git 儲存庫。要使用存檔點,請移除或重新配置此巢狀的 git 儲存庫。", diff --git a/src/shared/ExtensionMessage.ts b/src/shared/ExtensionMessage.ts index 1a3ea0c834..b438c47c04 100644 --- a/src/shared/ExtensionMessage.ts +++ b/src/shared/ExtensionMessage.ts @@ -128,7 +128,10 @@ export interface ExtensionMessage { text?: string payload?: any // Add a generic payload for now, can refine later // Checkpoint warning message - checkpointWarning?: string + checkpointWarning?: { + type: "WAIT_TIMEOUT" | "INIT_TIMEOUT" + timeout: number + } action?: | "chatButtonClicked" | "mcpButtonClicked" diff --git a/webview-ui/src/components/chat/ChatView.tsx b/webview-ui/src/components/chat/ChatView.tsx index bf0ae92640..79c288b598 100644 --- a/webview-ui/src/components/chat/ChatView.tsx +++ b/webview-ui/src/components/chat/ChatView.tsx @@ -192,7 +192,9 @@ const ChatViewComponent: React.ForwardRefRenderFunction("") const [wasStreaming, setWasStreaming] = useState(false) - const [checkpointWarningText, setCheckpointWarningText] = useState("") + const [checkpointWarning, setCheckpointWarning] = useState< + { type: "WAIT_TIMEOUT" | "INIT_TIMEOUT"; timeout: number } | undefined + >(undefined) const [isCondensing, setIsCondensing] = useState(false) const [showAnnouncementModal, setShowAnnouncementModal] = useState(false) const everVisibleMessagesTsRef = useRef>( @@ -830,7 +832,7 @@ const ChatViewComponent: React.ForwardRefRenderFunction { if (isHidden || !task) { - setCheckpointWarningText("") + setCheckpointWarning(undefined) } }, [modifiedMessages.length, isStreaming, isHidden, task]) @@ -1800,11 +1802,10 @@ const ChatViewComponent: React.ForwardRefRenderFunction )} - {checkpointWarningText && ( -
- -
- )} + {/* TEMPORARY: Always show warning for testing */} +
+ +
) : (
diff --git a/webview-ui/src/components/chat/CheckpointWarning.tsx b/webview-ui/src/components/chat/CheckpointWarning.tsx index cd04a2769e..81675f4993 100644 --- a/webview-ui/src/components/chat/CheckpointWarning.tsx +++ b/webview-ui/src/components/chat/CheckpointWarning.tsx @@ -2,10 +2,13 @@ import { VSCodeLink } from "@vscode/webview-ui-toolkit/react" import { Trans } from "react-i18next" interface CheckpointWarningProps { - text?: string + warning: { + type: "WAIT_TIMEOUT" | "INIT_TIMEOUT" + timeout: number + } } -export const CheckpointWarning = ({ text }: CheckpointWarningProps) => { +export const CheckpointWarning = ({ warning }: CheckpointWarningProps) => { const settingsLink = ( { "*", ) }} - className="inline px-0.5" + className="inline" /> ) + // Map warning type to i18n key + const i18nKey = + warning.type === "WAIT_TIMEOUT" ? "errors.wait_checkpoint_long_time" : "errors.init_checkpoint_fail_long_time" + return (
- {text ? text : } +
) diff --git a/webview-ui/src/i18n/locales/ca/common.json b/webview-ui/src/i18n/locales/ca/common.json index 69f18d9411..238ae05e78 100644 --- a/webview-ui/src/i18n/locales/ca/common.json +++ b/webview-ui/src/i18n/locales/ca/common.json @@ -95,5 +95,9 @@ "months_ago": "fa {{count}} mesos", "year_ago": "fa un any", "years_ago": "fa {{count}} anys" + }, + "errors": { + "wait_checkpoint_long_time": "Has esperat {{timeout}} segons per inicialitzar el punt de control. Si no necessites aquesta funció, desactiva-la a la configuració.", + "init_checkpoint_fail_long_time": "La inicialització del punt de control ha trigat més de {{timeout}} segons. La funció de punt de control s'ha desactivat per a aquesta tasca. Pots desactivar-la o augmentar el temps d'espera a la configuració." } } diff --git a/webview-ui/src/i18n/locales/de/common.json b/webview-ui/src/i18n/locales/de/common.json index b21dba3b34..3e7ce508ff 100644 --- a/webview-ui/src/i18n/locales/de/common.json +++ b/webview-ui/src/i18n/locales/de/common.json @@ -95,5 +95,9 @@ "months_ago": "vor {{count}} Monaten", "year_ago": "vor einem Jahr", "years_ago": "vor {{count}} Jahren" + }, + "errors": { + "wait_checkpoint_long_time": "Du hast {{timeout}} Sekunden auf die Initialisierung des Checkpoints gewartet. Wenn du die Checkpoint-Funktion nicht brauchst, kannst du sie in den Einstellungen. ausschalten", + "init_checkpoint_fail_long_time": "Die Initialisierung des Checkpoints dauert länger als {{timeout}} Sekunden. Die Checkpoint-Funktion ist für diese Aufgabe deaktiviert. Du kannst Checkpoints ausschalten oder die Wartezeit in den Einstellungen. verlängern" } } diff --git a/webview-ui/src/i18n/locales/en/common.json b/webview-ui/src/i18n/locales/en/common.json index 2f72988265..73220b4024 100644 --- a/webview-ui/src/i18n/locales/en/common.json +++ b/webview-ui/src/i18n/locales/en/common.json @@ -95,5 +95,9 @@ "months_ago": "{{count}} months ago", "year_ago": "a year ago", "years_ago": "{{count}} years ago" + }, + "errors": { + "wait_checkpoint_long_time": "Waited {{timeout}} seconds for checkpoint initialization. If you don't need the checkpoint feature, please turn it off in settings.", + "init_checkpoint_fail_long_time": "Checkpoint initialization has taken more than {{timeout}} seconds. Checkpoint function is disabled for this task. You can disable checkpoint or extend the waiting time in settings." } } diff --git a/webview-ui/src/i18n/locales/es/common.json b/webview-ui/src/i18n/locales/es/common.json index 7e0994e81c..a6ab982b03 100644 --- a/webview-ui/src/i18n/locales/es/common.json +++ b/webview-ui/src/i18n/locales/es/common.json @@ -95,5 +95,9 @@ "months_ago": "hace {{count}} meses", "year_ago": "hace un año", "years_ago": "hace {{count}} años" + }, + "errors": { + "wait_checkpoint_long_time": "Has esperado {{timeout}} segundos para la inicialización del punto de control. Si no necesitas esta función, desactívala en la configuración.", + "init_checkpoint_fail_long_time": "La inicialización del punto de control ha tardado más de {{timeout}} segundos. La función de punto de control está desactivada para esta tarea. Puedes desactivarla o aumentar el tiempo de espera en la configuración." } } diff --git a/webview-ui/src/i18n/locales/fr/common.json b/webview-ui/src/i18n/locales/fr/common.json index 488ec4935a..7610b4a01c 100644 --- a/webview-ui/src/i18n/locales/fr/common.json +++ b/webview-ui/src/i18n/locales/fr/common.json @@ -95,5 +95,9 @@ "months_ago": "il y a {{count}} mois", "year_ago": "il y a un an", "years_ago": "il y a {{count}} ans" + }, + "errors": { + "wait_checkpoint_long_time": "Tu as attendu {{timeout}} secondes pour l'initialisation du checkpoint. Si tu n'as pas besoin de cette fonction, désactive-la dans les paramètres.", + "init_checkpoint_fail_long_time": "L'initialisation du checkpoint a pris plus de {{timeout}} secondes. La fonction checkpoint est désactivée pour cette tâche. Tu peux la désactiver ou prolonger le délai dans les paramètres." } } diff --git a/webview-ui/src/i18n/locales/hi/common.json b/webview-ui/src/i18n/locales/hi/common.json index 00b46dbb09..7083186fe2 100644 --- a/webview-ui/src/i18n/locales/hi/common.json +++ b/webview-ui/src/i18n/locales/hi/common.json @@ -95,5 +95,9 @@ "months_ago": "{{count}} महीने पहले", "year_ago": "एक साल पहले", "years_ago": "{{count}} साल पहले" + }, + "errors": { + "wait_checkpoint_long_time": "तुमने {{timeout}} सेकंड तक चेकपॉइंट इनिशियलाइज़ेशन का इंतजार किया। अगर तुम्हें यह फ़ीचर नहीं चाहिए, तो सेटिंग्स. में बंद कर दो", + "init_checkpoint_fail_long_time": "चेकपॉइंट इनिशियलाइज़ेशन {{timeout}} सेकंड से ज़्यादा समय ले रहा है। इस कार्य के लिए चेकपॉइंट फ़ीचर बंद कर दिया गया है। तुम इसे बंद कर सकते हो या सेटिंग्स. में इंतजार का समय बढ़ा सकते हो" } } diff --git a/webview-ui/src/i18n/locales/id/common.json b/webview-ui/src/i18n/locales/id/common.json index 697765e1c3..ec49a3951f 100644 --- a/webview-ui/src/i18n/locales/id/common.json +++ b/webview-ui/src/i18n/locales/id/common.json @@ -95,5 +95,9 @@ "months_ago": "{{count}} bulan yang lalu", "year_ago": "satu tahun yang lalu", "years_ago": "{{count}} tahun yang lalu" + }, + "errors": { + "wait_checkpoint_long_time": "Kamu sudah menunggu {{timeout}} detik untuk inisialisasi checkpoint. Kalau tidak butuh fitur ini, matikan saja di pengaturan.", + "init_checkpoint_fail_long_time": "Inisialisasi checkpoint sudah lebih dari {{timeout}} detik. Fitur checkpoint dinonaktifkan untuk tugas ini. Kamu bisa mematikan atau menambah waktu tunggu di pengaturan." } } diff --git a/webview-ui/src/i18n/locales/it/common.json b/webview-ui/src/i18n/locales/it/common.json index e7fbed4d85..b89fec08cd 100644 --- a/webview-ui/src/i18n/locales/it/common.json +++ b/webview-ui/src/i18n/locales/it/common.json @@ -95,5 +95,9 @@ "months_ago": "{{count}} mesi fa", "year_ago": "un anno fa", "years_ago": "{{count}} anni fa" + }, + "errors": { + "wait_checkpoint_long_time": "Hai aspettato {{timeout}} secondi per l'inizializzazione del checkpoint. Se non ti serve questa funzione, disattivala nelle impostazioni.", + "init_checkpoint_fail_long_time": "L'inizializzazione del checkpoint ha impiegato più di {{timeout}} secondi. La funzione checkpoint è disabilitata per questa attività. Puoi disattivarla o aumentare il tempo di attesa nelle impostazioni." } } diff --git a/webview-ui/src/i18n/locales/ja/common.json b/webview-ui/src/i18n/locales/ja/common.json index 815da42952..5dccbce701 100644 --- a/webview-ui/src/i18n/locales/ja/common.json +++ b/webview-ui/src/i18n/locales/ja/common.json @@ -95,5 +95,9 @@ "months_ago": "{{count}}ヶ月前", "year_ago": "1年前", "years_ago": "{{count}}年前" + }, + "errors": { + "wait_checkpoint_long_time": "{{timeout}} 秒間チェックポイントの初期化を待機しました。チェックポイント機能が不要な場合は、設定。でオフにしてください", + "init_checkpoint_fail_long_time": "チェックポイントの初期化が {{timeout}} 秒以上かかりました。このタスクではチェックポイント機能が無効化されました。チェックポイントをオフにするか、設定。で待機時間を延長できます" } } diff --git a/webview-ui/src/i18n/locales/ko/common.json b/webview-ui/src/i18n/locales/ko/common.json index da90bf11b9..7398b2f4da 100644 --- a/webview-ui/src/i18n/locales/ko/common.json +++ b/webview-ui/src/i18n/locales/ko/common.json @@ -95,5 +95,9 @@ "months_ago": "{{count}}개월 전", "year_ago": "1년 전", "years_ago": "{{count}}년 전" + }, + "errors": { + "wait_checkpoint_long_time": "{{timeout}}초 동안 체크포인트 초기화를 기다렸어. 체크포인트 기능이 필요 없다면 설정.에서 꺼 줘", + "init_checkpoint_fail_long_time": "체크포인트 초기화가 {{timeout}}초 이상 걸렸어. 이 작업에 대해 체크포인트 기능이 꺼졌어. 체크포인트를 끄거나 설정.에서 대기 시간을 늘릴 수 있어" } } diff --git a/webview-ui/src/i18n/locales/nl/common.json b/webview-ui/src/i18n/locales/nl/common.json index 1fb09ee41a..2a69ffe288 100644 --- a/webview-ui/src/i18n/locales/nl/common.json +++ b/webview-ui/src/i18n/locales/nl/common.json @@ -95,5 +95,9 @@ "months_ago": "{{count}} maanden geleden", "year_ago": "een jaar geleden", "years_ago": "{{count}} jaar geleden" + }, + "errors": { + "wait_checkpoint_long_time": "Je hebt {{timeout}} seconden gewacht op de initialisatie van de checkpoint. Als je deze functie niet nodig hebt, schakel hem dan uit in de instellingen.", + "init_checkpoint_fail_long_time": "De initialisatie van de checkpoint duurde meer dan {{timeout}} seconden. De checkpointfunctie is uitgeschakeld voor deze taak. Je kunt hem uitschakelen of de wachttijd in de instellingen. verhogen" } } diff --git a/webview-ui/src/i18n/locales/pl/common.json b/webview-ui/src/i18n/locales/pl/common.json index ea6ada357d..c856a6306f 100644 --- a/webview-ui/src/i18n/locales/pl/common.json +++ b/webview-ui/src/i18n/locales/pl/common.json @@ -95,5 +95,9 @@ "months_ago": "{{count}} miesięcy temu", "year_ago": "rok temu", "years_ago": "{{count}} lat temu" + }, + "errors": { + "wait_checkpoint_long_time": "Czekałeś {{timeout}} sekund na inicjalizację punktu kontrolnego. Jeśli nie potrzebujesz tej funkcji, wyłącz ją w ustawieniach.", + "init_checkpoint_fail_long_time": "Inicjalizacja punktu kontrolnego trwała ponad {{timeout}} sekund. Funkcja punktu kontrolnego została wyłączona dla tego zadania. Możesz ją wyłączyć lub wydłużyć czas oczekiwania w ustawieniach." } } diff --git a/webview-ui/src/i18n/locales/pt-BR/common.json b/webview-ui/src/i18n/locales/pt-BR/common.json index 1528567c9a..01e9213411 100644 --- a/webview-ui/src/i18n/locales/pt-BR/common.json +++ b/webview-ui/src/i18n/locales/pt-BR/common.json @@ -95,5 +95,9 @@ "months_ago": "há {{count}} meses", "year_ago": "há um ano", "years_ago": "há {{count}} anos" + }, + "errors": { + "wait_checkpoint_long_time": "Você esperou {{timeout}} segundos para inicializar o checkpoint. Se não precisa dessa função, desative nas configurações.", + "init_checkpoint_fail_long_time": "A inicialização do checkpoint levou mais de {{timeout}} segundos. A função de checkpoint foi desativada para esta tarefa. Você pode desativar ou aumentar o tempo de espera nas configurações." } } diff --git a/webview-ui/src/i18n/locales/ru/common.json b/webview-ui/src/i18n/locales/ru/common.json index cd5ba42c01..754641416f 100644 --- a/webview-ui/src/i18n/locales/ru/common.json +++ b/webview-ui/src/i18n/locales/ru/common.json @@ -95,5 +95,9 @@ "months_ago": "{{count}} месяцев назад", "year_ago": "год назад", "years_ago": "{{count}} лет назад" + }, + "errors": { + "wait_checkpoint_long_time": "Ожидание инициализации контрольной точки заняло {{timeout}} секунд. Если тебе не нужна эта функция, отключи её в настройках.", + "init_checkpoint_fail_long_time": "Инициализация контрольной точки заняла более {{timeout}} секунд. Функция контрольных точек отключена для этой задачи. Ты можешь отключить её или увеличить время ожидания в настройках." } } diff --git a/webview-ui/src/i18n/locales/tr/common.json b/webview-ui/src/i18n/locales/tr/common.json index aa049fc35d..3394caa5a2 100644 --- a/webview-ui/src/i18n/locales/tr/common.json +++ b/webview-ui/src/i18n/locales/tr/common.json @@ -95,5 +95,9 @@ "months_ago": "{{count}} ay önce", "year_ago": "bir yıl önce", "years_ago": "{{count}} yıl önce" + }, + "errors": { + "wait_checkpoint_long_time": "{{timeout}} saniye boyunca kontrol noktası başlatılması beklendi. Bu özelliğe ihtiyacın yoksa ayarlardan. kapatabilirsin", + "init_checkpoint_fail_long_time": "Kontrol noktası başlatılması {{timeout}} saniyeden fazla sürdü. Bu görev için kontrol noktası özelliği devre dışı bırakıldı. Özelliği kapatabilir veya ayarlardan. bekleme süresini artırabilirsin" } } diff --git a/webview-ui/src/i18n/locales/vi/common.json b/webview-ui/src/i18n/locales/vi/common.json index f9fad7dbc3..e658aad475 100644 --- a/webview-ui/src/i18n/locales/vi/common.json +++ b/webview-ui/src/i18n/locales/vi/common.json @@ -95,5 +95,9 @@ "months_ago": "{{count}} tháng trước", "year_ago": "một năm trước", "years_ago": "{{count}} năm trước" + }, + "errors": { + "wait_checkpoint_long_time": "Bạn đã chờ {{timeout}} giây để khởi tạo điểm kiểm tra. Nếu không cần chức năng này, hãy tắt nó trong cài đặt.", + "init_checkpoint_fail_long_time": "Khởi tạo điểm kiểm tra mất hơn {{timeout}} giây. Chức năng điểm kiểm tra đã bị vô hiệu hóa cho tác vụ này. Bạn có thể tắt nó hoặc tăng thời gian chờ trong cài đặt." } } diff --git a/webview-ui/src/i18n/locales/zh-CN/common.json b/webview-ui/src/i18n/locales/zh-CN/common.json index 8b422be060..616ae01805 100644 --- a/webview-ui/src/i18n/locales/zh-CN/common.json +++ b/webview-ui/src/i18n/locales/zh-CN/common.json @@ -95,5 +95,9 @@ "months_ago": "{{count}}个月前", "year_ago": "1年前", "years_ago": "{{count}}年前" + }, + "errors": { + "wait_checkpoint_long_time": "初始化存档点已等待 {{timeout}} 秒。如果你不需要存档点功能,请在设置。中关闭", + "init_checkpoint_fail_long_time": "存档点初始化已超过 {{timeout}} 秒。本任务已禁用存档点功能。你可以关闭存档点或在设置。中延长等待时间" } } diff --git a/webview-ui/src/i18n/locales/zh-TW/common.json b/webview-ui/src/i18n/locales/zh-TW/common.json index 85e4ce53cc..2babcc00d4 100644 --- a/webview-ui/src/i18n/locales/zh-TW/common.json +++ b/webview-ui/src/i18n/locales/zh-TW/common.json @@ -95,5 +95,9 @@ "months_ago": "{{count}} 個月前", "year_ago": "1 年前", "years_ago": "{{count}} 年前" + }, + "errors": { + "wait_checkpoint_long_time": "初始化存檔點已等待 {{timeout}} 秒。如果你不需要存檔點功能,請在設定。中關閉", + "init_checkpoint_fail_long_time": "存檔點初始化已超過 {{timeout}} 秒。此工作已停用存檔點功能。你可以關閉存檔點或在設定。中延長等待時間" } }