dsh-think-translate 1.2.11 → 1.2.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.de.md CHANGED
@@ -20,6 +20,7 @@
20
20
 
21
21
  Modelle der DeepSeek-Familie denken oft auf Chinesisch — oder in der Sprache, in der sie gerade denken. dsh-think-translate zeigt die Think-Zeile, Aufgabenkarten und die Antwort live in *Ihrer* Sprache an, wie Untertitel für das Denken des Modells.
22
22
 
23
+ - **Ablehnungsgründe der automatischen Prüfung** — ergänzt die Genehmigungskarte asynchron um eine Übersetzung, behält das Original und bietet einen eigenen Schalter.
23
24
  - **🕵️ Jede Gedankenkette lesbar** — Reasoning, Gedankenkette, Aufgabenkarten und Antworten in Echtzeit übersetzt, in Stapeln gestreamt
24
25
  - **8 Zielsprachen** — 中文 / English / 日本語 / 한국어 / Español / Français / Deutsch / Русский
25
26
  - **Einsprachige Oberfläche** — Einstellungsbereich, Denkzeilen und Aufgabenkarten folgen der Zielsprache (kein zh/en-Gemisch); die Auswahl bleibt erhalten
@@ -75,6 +76,10 @@ Für DSH **0.2.0-rc.2** verwenden Sie **dsh-think-translate 1.2.5 oder neuer**.
75
76
 
76
77
  **1.2.8 Übertragung und Wiederaufnahme:** Normale HTTP/HTTPS-Übersetzungen nutzen die nativen Netzwerkfunktionen von Node statt eines curl-Prozesses pro Textpaket. SOCKS-Proxys und der Ollama-Installer verwenden weiterhin curl. Fehler bleiben 30 Sekunden im Arbeitsspeicher; danach werden Denk- und Antwortübersetzungen automatisch erneut versucht. Die Zeitlimits berücksichtigen das Laden lokaler Modelle und alternative Anbieter.
77
78
 
79
+ **1.2.13:** Auto-review-Ablehnungskarten behalten den Originaltext und ergänzen asynchron eine Übersetzung; ein eigener Schalter ist standardmäßig aktiviert. Nach Deaktivierung, Sprachwechsel oder Entfernen der Karte werden alte Ergebnisse verworfen. Nicht englische Gründe werden ebenfalls ins Englische übersetzt. Vielen Dank an [llg1634](https://github.com/llg1634) für den Bericht, den ursprünglichen Patch und die Tests in [#13](https://github.com/UncleK/dsh-think-translate/issues/13). DSH Web oder Desktop nach dem Update vollständig neu starten.
80
+
81
+ **1.2.12:** Die Anbieterschalter gelten verbindlich; nach einem Host-Fehler fragt der Browser Google nicht mehr direkt ab. Eingezäunter, eingerückter und Inline-Code wird nicht an Übersetzungsdienste gesendet und exakt wiederhergestellt, auch bei unvollständigem Streaming. Alte Übersetzungs-Caches werden entfernt, Einstellungen bleiben erhalten. Nach dem Update DSH Web oder Desktop vollständig neu starten; bloßes Neuladen kann weiterhin alte Client-Ressourcen verwenden.
82
+
78
83
  **1.2.11 Bing-Korrekturen:** Der kostenlose Bing-Anbieter bleibt erhalten. Übersetzungsanfragen gehen an den endgültigen Origin der Sitzungsseite, damit die Weiterleitung `www.bing.com` → `cn.bing.com` in Festlandchina den POST-Body nicht verwirft. SOCKS/curl verwendet dieselben Browser-Header wie der native Transport und behebt damit HTTP 401; leere Antworten und Antworten ohne JSON melden klare Fehler.
79
84
 
80
85
  **1.2.10 DSH-Profilkompatibilität:** Die Erkennung folgt dem laufenden Desktop/Web-Profil und liest `profiles/<profile>/cordis.patch.yml` (`id` + `config`), danach die Home-Patches und Start-Overlays. Das ältere `settings.yaml` bleibt unterstützt. Die Standardmodell-Zeile heißt `default-model`; Zugangsdaten bleiben in `.credentials.yaml` im DSH-Home und nur im Arbeitsspeicher. Die Diagnose zeigt die tatsächlich gelesene Datei.
@@ -100,7 +105,7 @@ Browser → POST /_xlate/translate (gleiche Origin, kein CORS)
100
105
  chain: [provider1, provider2, ...] ← Reihenfolge per Drag in den Einstellungen
101
106
  google / bing / OpenAI-kompatibel / Anthropic
102
107
  Fallback-Kette (optional, standardmäßig aus, in der Config aktivierbar)
103
- → direkter Browser-Fallback
108
+ → Originaltext, wenn alle aktivierten Anbieter fehlschlagen
104
109
  ```
105
110
 
106
111
  - Die **Anbieter-Konfiguration** liegt in `config.json` (zur Laufzeit erzeugt, gitignoriert): `chain` (geordnete IDs), `fallback` (enabled + chain, nur Datei), `providers` (je Anbieter `type`/`enabled`/`baseURL`/`apiKey`/`apiKeyEnv`/`model`). Alte `priority`-Konfigurationen werden automatisch migriert; ein Anbieter mit `apiKeyEnv` löst seinen Schlüssel pro Anfrage aus dieser Umgebungsvariable auf (der literale `apiKey` bleibt als Rückfall) und kein aufgelöster Schlüssel wird je in `config.json` zurückgeschrieben; ein `null` in einem Patch löscht das Feld — so leert die Oberfläche eines
package/README.es.md CHANGED
@@ -20,6 +20,7 @@ Traducción en la capa de visualización para la interfaz web de [DeepSeek Harne
20
20
 
21
21
  Los modelos de la familia DeepSeek suelen razonar en chino — o en el idioma en que les da por pensar. dsh-think-translate muestra la fila Think, las tarjetas de tareas y la respuesta en *tu* idioma mientras miras, como subtítulos del pensamiento del modelo.
22
22
 
23
+ - **Motivos de rechazo de Auto review** — conserva el original y añade la traducción de forma asíncrona en la tarjeta de aprobación, con un interruptor independiente.
23
24
  - **🕵️ Lee cualquier cadena de pensamiento** — razonamiento, cadena de pensamiento, tarjetas de tareas y respuestas traducidos en tiempo real, por lotes
24
25
  - **8 idiomas de destino** — 中文 / English / 日本語 / 한국어 / Español / Français / Deutsch / Русский
25
26
  - **Interfaz en un solo idioma** — panel de ajustes, filas de pensamiento y tarjetas de tareas siguen el idioma de destino (sin mezclar zh/en); la elección persiste
@@ -75,6 +76,10 @@ Para DSH **0.2.0-rc.2**, usa **dsh-think-translate 1.2.5 o posterior**. La versi
75
76
 
76
77
  **1.2.8 transporte y recuperación:** las traducciones HTTP/HTTPS normales usan la red nativa de Node en lugar de iniciar curl por cada lote de texto. Los proxies SOCKS y el instalador de Ollama conservan la compatibilidad con curl. Los fallos permanecen en memoria durante 30 segundos y después se reintentan automáticamente las traducciones del razonamiento y las respuestas. Los tiempos de espera permiten cargar modelos locales y probar proveedores alternativos.
77
78
 
79
+ **1.2.13:** las tarjetas de rechazo de Auto review conservan el original y añaden la traducción de forma asíncrona, con un interruptor independiente activado por defecto. Se descartan los resultados antiguos al desactivar la función, cambiar el idioma o retirar la tarjeta. Los motivos no ingleses también se traducen al inglés. Gracias a [llg1634](https://github.com/llg1634) por el informe, el parche inicial y las pruebas en [#13](https://github.com/UncleK/dsh-think-translate/issues/13). Reinicia por completo DSH Web o Desktop tras actualizar.
80
+
81
+ **1.2.12:** se respetan los proveedores habilitados; el navegador ya no consulta Google directamente si falla el Host. El código delimitado, con sangría o en línea se excluye de las solicitudes y se conserva exactamente, incluso durante streaming incompleto. Se elimina la caché de traducciones anterior y se conservan las preferencias. Tras actualizar, reinicia por completo DSH Web o Desktop; recargar la página puede seguir usando recursos antiguos del cliente.
82
+
78
83
  **1.2.11 correcciones de Bing:** se mantiene el proveedor gratuito. Las solicitudes de traducción usan el origen final de la página de sesión para evitar que la redirección `www.bing.com` → `cn.bing.com` en China continental elimine el cuerpo POST. SOCKS/curl comparte las cabeceras de navegador del transporte nativo para corregir HTTP 401; las respuestas vacías o no JSON muestran errores claros.
79
84
 
80
85
  **1.2.10 compatibilidad con perfiles DSH:** el descubrimiento sigue el perfil Desktop/Web activo y lee `profiles/<profile>/cordis.patch.yml` (`id` + `config`), después los parches del directorio DSH y las superposiciones de inicio. Se mantiene el formato anterior `settings.yaml`. El modelo predeterminado usa `default-model`; las credenciales siguen en `.credentials.yaml` del directorio DSH y solo en memoria. El diagnóstico muestra el archivo leído.
@@ -100,7 +105,7 @@ navegador → POST /_xlate/translate (mismo origen, sin CORS)
100
105
  chain: [provider1, provider2, ...] ← orden arrastrando en Ajustes
101
106
  google / bing / compatible con OpenAI / Anthropic
102
107
  cadena fallback (opcional, desactivada por defecto, se activa en el config)
103
- → respaldo directo desde el navegador
108
+ → texto original si fallan todos los proveedores habilitados
104
109
  ```
105
110
 
106
111
  - La **configuración de proveedores** vive en `config.json` (generado en tiempo de ejecución, ignorado por git): `chain` (ids ordenados), `fallback` (enabled + chain, solo en el archivo), `providers` (por proveedor `type`/`enabled`/`baseURL`/`apiKey`/`apiKeyEnv`/`model`). Las configuraciones antiguas con `priority` se migran solas; un proveedor que declara `apiKeyEnv` resuelve la clave desde esa variable en cada petición (el `apiKey` literal queda como respaldo) y ninguna clave resuelta se escribe de vuelta en `config.json`; un `null` en un parche borra ese campo, que es como la interfaz vacía uno
package/README.fr.md CHANGED
@@ -20,6 +20,7 @@ Traduction au niveau de l'affichage pour l'interface web de [DeepSeek Harness](h
20
20
 
21
21
  Les modèles de la famille DeepSeek raisonnent souvent en chinois — ou dans la langue qu'ils utilisent pour penser. dsh-think-translate affiche la ligne Think, les cartes de tâches et la réponse dans *votre* langue en direct, comme des sous-titres pour la réflexion du modèle.
22
22
 
23
+ - **Motifs de refus Auto review** — conserve le texte original et ajoute sa traduction de façon asynchrone dans la carte d’approbation, avec un réglage indépendant.
23
24
  - **🕵️ Lisez n'importe quelle chaîne de raisonnement** — raisonnement, chaîne de pensée, cartes de tâches et réponses traduits en temps réel, par lots
24
25
  - **8 langues cibles** — 中文 / English / 日本語 / 한국어 / Español / Français / Deutsch / Русский
25
26
  - **Interface monolingue** — panneau de réglages, lignes de réflexion et cartes de tâches suivent la langue cible (pas de mélange zh/en) ; le choix persiste
@@ -75,6 +76,10 @@ Pour DSH **0.2.0-rc.2**, utilisez **dsh-think-translate 1.2.5 ou une version ult
75
76
 
76
77
  **1.2.8 transport et reprise :** les traductions HTTP/HTTPS ordinaires utilisent le réseau natif de Node au lieu de lancer curl pour chaque lot de texte. Les proxys SOCKS et l’installateur Ollama conservent curl. Les échecs restent en mémoire pendant 30 secondes, puis les traductions du raisonnement et des réponses sont réessayées automatiquement. Les délais tiennent compte du chargement des modèles locaux et du recours à d’autres fournisseurs.
77
78
 
79
+ **1.2.13 :** les cartes de refus Auto review conservent l’original et ajoutent une traduction asynchrone, avec un réglage indépendant activé par défaut. Les anciens résultats sont ignorés après désactivation, changement de langue ou retrait de la carte. Les motifs non anglais sont également traduits en anglais. Merci à [llg1634](https://github.com/llg1634) pour le signalement, le correctif initial et les tests dans [#13](https://github.com/UncleK/dsh-think-translate/issues/13). Redémarrez complètement DSH Web ou Desktop après la mise à jour.
80
+
81
+ **1.2.12 :** les choix de fournisseurs sont respectés ; le navigateur ne contacte plus Google directement après un échec du Host. Le code délimité, indenté ou en ligne est exclu des requêtes et conservé exactement, y compris pendant un flux incomplet. Les anciennes traductions en cache sont supprimées, les préférences conservées. Après la mise à jour, redémarrez entièrement DSH Web ou Desktop ; une simple actualisation peut encore référencer les anciennes ressources du client.
82
+
78
83
  **1.2.11 corrections de Bing :** le fournisseur gratuit est conservé. Les requêtes de traduction utilisent l’origine finale de la page de session pour éviter que la redirection `www.bing.com` → `cn.bing.com` en Chine continentale supprime le corps POST. SOCKS/curl utilise les mêmes en-têtes de navigateur que le transport natif pour corriger HTTP 401 ; les réponses vides ou non JSON signalent des erreurs explicites.
79
84
 
80
85
  **1.2.10 compatibilité des profils DSH :** la détection suit le profil Desktop/Web actif et lit `profiles/<profile>/cordis.patch.yml` (`id` + `config`), puis applique les correctifs du répertoire DSH et les surcharges de lancement. L’ancien `settings.yaml` reste pris en charge. Le modèle par défaut utilise `default-model` ; les identifiants restent dans `.credentials.yaml` du répertoire DSH et en mémoire uniquement. Le diagnostic indique le fichier lu.
@@ -100,7 +105,7 @@ navigateur → POST /_xlate/translate (même origine, sans CORS)
100
105
  chain: [provider1, provider2, ...] ← ordre par glisser dans les Réglages
101
106
  google / bing / compatible OpenAI / Anthropic
102
107
  chaîne fallback (facultative, désactivée par défaut, activable dans la config)
103
- → repli direct depuis le navigateur
108
+ → texte original si tous les fournisseurs activés échouent
104
109
  ```
105
110
 
106
111
  - La **configuration des fournisseurs** vit dans `config.json` (généré à l'exécution, ignoré par git) : `chain` (ids ordonnés), `fallback` (enabled + chain, fichier uniquement), `providers` (par fournisseur `type`/`enabled`/`baseURL`/`apiKey`/`apiKeyEnv`/`model`). Les anciennes configurations `priority` sont migrées automatiquement ; un fournisseur qui déclare `apiKeyEnv` résout sa clé depuis cette variable à chaque requête (le `apiKey` littéral reste en secours) et aucune clé résolue n'est réécrite dans `config.json` ; un `null` dans un patch supprime ce champ, c'est ainsi que l'interface en vide un
package/README.ja.md CHANGED
@@ -20,6 +20,7 @@
20
20
 
21
21
  DeepSeek 系モデルは中国語で考えることが多く、あるいはたまたま思考に使う言語で考えます。dsh-think-translate は、モデルの思考に字幕を付けるように、Think 行・タスクカード・回答を*あなたの*言語でリアルタイム表示します。
22
22
 
23
+ - **自動審査の拒否理由** — 承認カードに原文を残し、翻訳を非同期で追加します。独立した設定で無効にできます。
23
24
  - **🕵️ どんな思考チェーンも読める** — 推論・思考チェーン・タスクカード・回答をリアルタイムに翻訳し、バッチ単位でストリーミング表示
24
25
  - **8 つの対象言語** — 中文 / English / 日本語 / 한국어 / Español / Français / Deutsch / Русский
25
26
  - **単一言語 UI** — 設定パネル・思考行・タスクカードがすべて対象言語に追従(中英混在なし)、選択は永続化
@@ -75,6 +76,10 @@ DSH **0.2.0-rc.2** では **dsh-think-translate 1.2.5 以降**を使用してく
75
76
 
76
77
  **1.2.8 通信と復帰:**通常の HTTP/HTTPS 翻訳は、テキストのバッチごとに curl を起動せず Node の標準ネットワーク機能を使います。SOCKS プロキシと Ollama インストーラーは引き続き curl に対応します。失敗結果をメモリ内に30秒間保持し、その後は思考・回答の翻訳を自動再試行します。タイムアウトはローカルモデルのロードと代替プロバイダーへの切り替えを考慮しています。
77
78
 
79
+ **1.2.13:**自動審査の拒否カードに原文を残し、翻訳を非同期で追加します。独立したスイッチは既定で有効です。無効化、翻訳先の変更、カードの削除後は古い結果を表示しません。英語以外の理由も英語に翻訳できます。[#13](https://github.com/UncleK/dsh-think-translate/issues/13) で報告、初期パッチ、テストを提供してくださった [llg1634](https://github.com/llg1634) に感謝します。更新後は DSH Web または Desktop を完全に再起動してください。
80
+
81
+ **1.2.12:**提供元の設定に従い、Host の失敗後にブラウザーから Google へ直接送信しません。フェンス付き・インデント付き・インラインコードは翻訳対象から除外し、ストリーミング中の未完了コードも原文のまま保持します。古い訳文キャッシュを削除し、設定は保持します。 更新後は DSH Web または Desktop を完全に再起動してください。ページの更新だけでは古いクライアント資源を参照する場合があります。
82
+
78
83
  **1.2.11 Bing 修正:**無料の Bing を引き続き提供します。翻訳リクエストはセッションページの最終オリジンに送信し、中国本土の `www.bing.com` → `cn.bing.com` リダイレクトによる POST 本文の消失を防ぎます。SOCKS/curl はネイティブ通信と同じブラウザーヘッダーを使用して HTTP 401 を修正。空の応答と JSON 以外の応答には明確なエラーを表示します。
79
84
 
80
85
  **1.2.10 DSH プロファイル対応:**実行中の Desktop/Web プロファイルに従い、`profiles/<profile>/cordis.patch.yml`(`id` + `config`)、DSH home のパッチ、起動時のオーバーレイを順に読み込みます。旧形式の `settings.yaml` も対応。既定モデル行は `default-model` に対応し、資格情報は DSH home の `.credentials.yaml` から解決してメモリ内だけに保持します。再スキャン時に実際の設定パスを表示します。
@@ -100,7 +105,7 @@ DSH **0.2.0-rc.2** では **dsh-think-translate 1.2.5 以降**を使用してく
100
105
  chain: [provider1, provider2, ...] ← 設定でドラッグして並べ替え
101
106
  google / bing / OpenAI 互換 / Anthropic から選択
102
107
  fallback チェーン(任意、既定は無効、設定で有効化)
103
- → ブラウザ直結のフォールバック
108
+ → 有効な提供元がすべて失敗した場合は原文を保持
104
109
  ```
105
110
 
106
111
  - **プロバイダー設定** は `config.json`(実行時生成・gitignore 対象)にあります:`chain`(順序付き ID)、`fallback`(enabled と chain、設定ファイル専用)、`providers`(各項目の `type`/`enabled`/`baseURL`/`apiKey`/`apiKeyEnv`/`model`)。旧 `priority` 形式は自動移行されます。`apiKeyEnv` を宣言した提供元はリクエスト時にその環境変数からキーを解決し(リテラル `apiKey` はフォールバック)、解決したキーを `config.json` に書き戻すことはありません。パッチ内の `null` はそのフィールドの削除を意味し、UI のクリアはこれを使っています
package/README.ko.md CHANGED
@@ -20,6 +20,7 @@
20
20
 
21
21
  DeepSeek 계열 모델은 중국어로, 또는 우연히 생각에 쓰는 언어로 추론하는 경우가 많습니다. dsh-think-translate는 모델의 사고에 자막을 다는 것처럼 Think 행·작업 카드·답변을 *여러분의* 언어로 실시간 표시합니다.
22
22
 
23
+ - **자동 검토 거부 사유** — 승인 카드의 원문을 유지하고 번역을 비동기로 추가합니다. 별도 설정으로 끌 수 있습니다.
23
24
  - **🕵️ 어떤 사고 체인도 읽기** — 추론, 사고 체인, 작업 카드, 답변을 실시간으로 번역해 배치 단위로 스트리밍
24
25
  - **8개 대상 언어** — 中文 / English / 日本語 / 한국어 / Español / Français / Deutsch / Русский
25
26
  - **단일 언어 UI** — 설정 패널, 사고 행, 작업 카드가 모두 대상 언어를 따름(중·영 혼용 없음), 선택 영구 저장
@@ -75,6 +76,10 @@ DSH **0.2.0-rc.2**에서는 **dsh-think-translate 1.2.5 이상**을 사용하세
75
76
 
76
77
  **1.2.8 전송 및 복구:** 일반 HTTP/HTTPS 번역은 텍스트 배치마다 curl을 실행하는 대신 Node 기본 네트워크 기능을 사용합니다. SOCKS 프록시와 Ollama 설치 프로그램은 curl 호환 경로를 유지합니다. 실패 결과를 메모리에 30초간 보관한 뒤 사고·답변 번역을 자동 재시도합니다. 타임아웃은 로컬 모델 로드와 다른 제공자로의 전환 시간을 고려합니다.
77
78
 
79
+ **1.2.13:** 자동 검토 거부 카드에 원문을 유지하고 번역을 비동기로 추가합니다. 별도 스위치는 기본으로 켜집니다. 스위치를 끄거나 대상 언어를 바꾸거나 카드를 제거하면 이전 결과를 표시하지 않습니다. 영어가 아닌 사유도 영어로 번역합니다. [#13](https://github.com/UncleK/dsh-think-translate/issues/13)의 제보, 초기 패치와 테스트를 제공한 [llg1634](https://github.com/llg1634) 님께 감사드립니다. 업데이트 후 DSH Web 또는 Desktop을 완전히 다시 시작하세요.
80
+
81
+ **1.2.12:** 제공자 설정을 준수하며 Host 실패 후 브라우저에서 Google로 직접 요청하지 않습니다. 코드 블록, 들여쓰기 코드, 인라인 코드는 번역 서비스에 보내지 않고 원문 그대로 복원합니다. 스트리밍 중 닫히지 않은 코드도 보호하며, 이전 번역 캐시만 삭제하고 설정은 유지합니다. 업데이트 후 DSH Web 또는 Desktop을 완전히 다시 시작하세요. 페이지 새로고침만으로는 이전 클라이언트 리소스가 남을 수 있습니다.
82
+
78
83
  **1.2.11 Bing 수정:** 무료 Bing 제공자를 유지합니다. 세션 페이지의 최종 출처로 번역 요청을 보내 중국 본토의 `www.bing.com` → `cn.bing.com` 리디렉션에서 POST 본문이 사라지는 문제를 방지합니다. SOCKS/curl도 네이티브 통신과 같은 브라우저 헤더를 사용해 HTTP 401을 수정하며, 빈 응답과 JSON이 아닌 응답에 명확한 오류를 표시합니다.
79
84
 
80
85
  **1.2.10 DSH 프로필 호환:** 실행 중인 Desktop/Web 프로필의 `profiles/<profile>/cordis.patch.yml`(`id` + `config`)을 읽고 DSH 홈 패치와 시작 오버레이를 순서대로 적용합니다. 이전 `settings.yaml`도 지원합니다. 기본 모델 행은 `default-model`을 지원하며 자격 증명은 DSH 홈의 `.credentials.yaml`에서 읽어 메모리에만 유지합니다. 다시 검사하면 실제 설정 경로가 표시됩니다.
@@ -100,7 +105,7 @@ DSH **0.2.0-rc.2**에서는 **dsh-think-translate 1.2.5 이상**을 사용하세
100
105
  chain: [provider1, provider2, ...] ← 설정에서 드래그로 정렬
101
106
  google / bing / OpenAI 호환 / Anthropic 중 선택
102
107
  fallback 체인(선택, 기본 비활성, 설정에서 활성화)
103
- → 브라우저 직접 연결 폴백
108
+ → 활성 제공자가 모두 실패하면 원문 유지
104
109
  ```
105
110
 
106
111
  - **제공자 설정**은 `config.json`(런타임 생성, gitignore 대상)에 있습니다: `chain`(순서 있는 id), `fallback`(enabled + chain, 설정 파일 전용), `providers`(각 항목의 `type`/`enabled`/`baseURL`/`apiKey`/`apiKeyEnv`/`model`). 예전 `priority` 형식은 자동 마이그레이션됩니다. `apiKeyEnv`를 선언한 제공자는 요청 시 해당 환경 변수에서 키를 해석하며(리터럴 `apiKey`는 폴백), 해석된 키를 `config.json`에 다시 쓰지 않습니다. 패치의 `null`은 해당 필드 삭제를 뜻하며 UI가 그렇게 비웁니다
package/README.md CHANGED
@@ -1,122 +1,127 @@
1
- <div align="center">
2
-
3
- # 🐋 dsh-think-translate
4
-
5
- **Languages:** [English](README.md) · [中文](README.zh-CN.md) · [日本語](README.ja.md) · [한국어](README.ko.md) · [Español](README.es.md) · [Français](README.fr.md) · [Deutsch](README.de.md) · [Русский](README.ru.md)
6
-
7
- [![npm version](https://img.shields.io/npm/v/dsh-think-translate?color=4D6BFE&label=npm)](https://www.npmjs.com/package/dsh-think-translate)
8
- [![license](https://img.shields.io/npm/l/dsh-think-translate?color=4D6BFE)](LICENSE)
9
- [![dsh](https://img.shields.io/badge/powered_by-dsh-4D6BFE?style=flat-square&logo=deepseek&logoColor=white)](https://github.com/deepseek-ai/deepseek-harness)
10
-
11
- <img src="demo/demo.gif?v=2" width="46%" alt="dsh-think-translate demo" style="border:1px solid #4D6BFE;border-radius:8px;margin:4px" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="demo/demo2.gif?v=2" width="41%" alt="dsh-think-translate demo 2" style="border:1px solid #4D6BFE;border-radius:8px;margin:4px" />
12
-
13
- </div>
14
-
15
- ---
16
-
17
- Translate the **reasoning / thinking chain (chain-of-thought), task cards and answers** of the [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) Web UI into one of **8 target languages** — in real time, on the display layer only. The originals stay untouched in the transcript, and the translated text **never enters the model context**.
18
-
19
- ## ✨ Why dsh-think-translate
20
-
21
- DeepSeek-class models often reason in Chinese — or in whatever language they happen to think in. dsh-think-translate renders the **Think row, task cards and answer** in *your* language while you watch, like subtitles for the model's thinking.
22
-
23
- - **🕵️ Read any thinking chain** — reasoning, chain-of-thought, task cards and answers translated in real time, streamed batch by batch
24
- - **🌍 8 languages, one consistent UI** — 中文 / English / 日本語 / 한국어 / Español / Français / Deutsch / Русский; the settings panel, thinking rows and task cards all follow your choice, and it persists across reloads
25
- - **🔗 Dynamic provider chain** — order providers by drag-and-drop and enable/disable each one. Built-ins (google gtx, bing, local Ollama) plus any number of custom providers; the chain already ends with the free providers, so a second fallback pass is a config-file option, not a UI one
26
- - **🔌 Custom providers (OpenAI & Anthropic)** — add arbitrary OpenAI-compatible endpoints (any `/v1/chat/completions` gateway) or native **Anthropic Messages API** endpoints (Claude) from the settings panel: name, type, base URL, API key, model
27
- - **🪄 DSH provider discovery** — providers already configured in DSH's `profiles/<profile>/cordis.patch.yml` / legacy `settings.yaml` (`llm-pi-ai.providers`, e.g. linuxdo-hub, coding-hub) are auto-discovered and appear in the chain as read-only "DSH" entries, and **one button in settings rescans and adds them all at once**; keys are resolved from `.credentials.yaml` at runtime and never written to the plugin's config. The harness's own default route counts too: when `default-model` / `agent-default-model` points at `deepseek-official`, DeepSeek's API is offered as one more DSH entry
28
- - **🔒 Local Ollama** — reuse an existing installation and model. When enabled Ollama is first in priority, or you click Test, the plugin starts the service and loads the model as needed. Missing software/models require the setup button before installation/download, with live progress
29
- - **🧠 Zero context cost** — pure display layer: the model still sees the original text, and translated text never consumes the context window
30
- - **☁️ Google / Bing fallback** — automatic switch when other providers are unavailable (google goes through a Node CONNECT tunnel using the system proxy, bypassing anti-bot blocks)
31
- - **🛡️ Code-safe** — file paths, commands, URLs, regexes and pure-code lines are never translated
32
- - **🧩 Paragraph & sentence-aware chunking** — long thinking chains are split on blank lines (paragraph structure preserved) and further batched by sentence, so even a small local model keeps quality
33
- - **⏱️ Resilient** — failed translations are cached in memory for 30 seconds to prevent retry storms, then retried automatically; each provider has its own Test button
34
- - **🎚️ Adjustable translation timing** — pre-translate everything, lazy-load historical chains (default), or translate only the expanded chain
35
-
36
- ## 📦 Installation
37
-
38
- ```bash
39
- # Option 1: npm (recommended)
40
- dsh plugin --profile web add dsh-think-translate
41
- # then restart web
42
-
43
- # Option 2: GitHub
44
- dsh plugin --profile web add github:UncleK/dsh-think-translate
45
-
46
- # Option 3: manual (junction + patch)
47
- # 1. link the package into the profile's node_modules
48
- New-Item -ItemType Junction -Path "$HOME\.dsh\profiles\node_modules\dsh-think-translate" `
49
- -Target "<repo path>"
50
- # 2. add to "$HOME\.dsh\profiles\web\cordis.patch.yml":
51
- # - insert:
52
- # - id: dsh-think-translate
53
- # name: dsh-think-translate
54
- # 3. restart web
55
- ```
56
-
57
- ## 🧯 After a DSH upgrade
58
-
59
- Third-party client plugins load through DSH's client module graph, and that graph is composed **once per process** — a composition that failed is remembered in memory until the process restarts. So these three things commonly bite right after an upgrade:
60
-
61
- - **Starting from a source checkout fails with** `client bundles not found; run \`pnpm run build\` before launch` — the new client packages ship unbuilt: run `pnpm run build` in the harness checkout, then start `dsh web` again.
62
- - **The plugin's UI is gone** (no translated Think row, no *Think Translation* section in Settings) — **restart `dsh web`**; refreshing the page alone is sometimes not enough.
63
- - **The local model list is empty** — the `ollama` service is not serving that model directory: check `ollama list` (or `GET /api/tags`) and the `OLLAMA_MODELS` the running service actually uses. When the model files live on another drive, a directory junction can point the service's default directory at them.
64
-
65
- Nothing to configure on the plugin side: it declares no ordering dependency on DSH internals (it binds only to the `slots` service, plus an optional `@deepseek-ai/dsh-client-ui-primitives`), so it runs on both older DSH (≤ 0.1.1-rc) and the current line (≥ 0.1.2-alpha.1, 0.1.5-rc.1 included).
66
-
67
- For DSH **0.2.0-rc.2**, use **dsh-think-translate 1.2.5 or later**. Version 1.2.5 fixes the `todo_write` slot collision and declares the 0.2 peer range. Run `dsh plugin --profile web add dsh-think-translate@latest`, then restart DSH; no version exemption is needed.
68
-
69
- Version **1.2.6** fixes duplicated thinking and answer text in DSH 0.2: the assistant renderer now respects the separate reasoning/response groups, including its original-text error fallback.
70
-
71
- **1.2.7 local setup:** enabled Ollama in first priority, or its Test button, finds an existing installation and starts/loads it automatically. Missing software/models require the labelled setup action, with staged download/install/load progress. Automatic software installation supports Windows; other systems link to the official guide. “In use” follows the first enabled, verified provider in priority order; testing a lower row does not override a verified higher row.
72
-
73
- **1.2.8 transport and recovery:** ordinary HTTP/HTTPS translation requests use native Node networking instead of spawning curl per text batch; SOCKS proxies and the Ollama installer retain curl compatibility. Failures stay in memory for 30 seconds, then reasoning and answer translation resume automatically. Request deadlines allow time for local-model loading and provider fallback.
74
-
75
- **1.2.11 Bing fixes:** the free Bing provider is retained. Translation requests use the session page's final origin, preventing the mainland China `www.bing.com` → `cn.bing.com` redirect from dropping the POST body. SOCKS/curl now shares the native browser headers to fix HTTP 401; empty and non-JSON responses report clear errors.
76
-
77
- **1.2.10 DSH profile compatibility:** discovery follows the running Desktop/Web profile and reads `profiles/<profile>/cordis.patch.yml` (`id` + `config`), with home patches and launcher overlays applied afterward. Legacy `settings.yaml` is still supported. Default model rows use `default-model`; credentials remain in the DSH home `.credentials.yaml` and stay in memory. Rescan diagnostics show the file actually read.
78
-
79
- **1.2.9 language fixes:** Japanese vocabulary hints now apply only to Japanese targets; OpenAI/Anthropic requests include a full language name. Bing uses `auto-detect` and maps Chinese targets to `zh-Hans`/`zh-Hant`. Chinese detection examines prose after removing paths, code and JSON: already-Simplified prose is skipped, common Traditional script cues request conversion, and Japanese/Korean prose is translated. Old persisted translation results are cleared once; settings remain intact.
80
-
81
- ## 🚀 Usage
82
-
83
- 1. Open **Settings → Think Translation**
84
- 2. Pick the **target language** (e.g. 日本語) — the settings panel, thinking rows and task cards all switch to it
85
- 3. **Manage the provider chain** — the list below it *is* the delivery order; drag rows to reorder, and the checkbox is the on/off switch:
86
- - Built-ins: **google gtx / bing** (free, via the system proxy) and **local Ollama** — existing software/models are reused; missing components require the setup button (qwen2.5:7b / 14b or custom), with progress displayed. Built-ins are permanent: uncheck one to stop using it, there is nothing to delete
87
- - **DSH providers**: endpoints already configured in DSH (`llm-pi-ai.providers`) appear automatically as read-only entries (badge "DSH"); their checkbox adds/removes them from the chain. The **Import from DSH config** button right below the list rescans on click and adds all of them in one go — there is no base URL and no key to retype, because the key is resolved from DSH's own credentials at request time
88
- - **Custom providers**: "Add custom provider" registers any **OpenAI-compatible** or **Anthropic Messages** endpoint; the form offers **presets** for common low-cost models (DeepSeek, OpenAI, Qwen, GLM, Kimi, SiliconFlow, OpenRouter, Anthropic) that fill base URL + model + env name, all still editable; the model lists were checked against the vendors' documentation in September 2026 and are suggestions only — any model id can be typed in. Each row has a **test** button, an edit form and a **×** to delete it (a DSH row cannot be deleted — it is managed by the harness)
89
- - A provider can name an **environment variable** (`apiKeyEnv`) instead of carrying the key: presets fill that in, and a DSH row brings its own. The key is resolved per request and never written to `config.json`, and such a row shows an `env:NAME` badge. The edit form has no env field (the value survives an edit untouched), but emptying a field really removes it — the field is sent as an explicit delete
90
- - The former **fallback chain** option is gone: it was redundant once the chain itself ends with the free providers, and unchecking a provider is how you opt out of it. `fallback` still exists in `config.json` for anyone who wants it (off by default)
91
- 4. Send a message that makes the model think, then expand the **Think row** to read the translation and compare with the original
92
-
93
- ## ⚙️ How it works
94
-
95
- ```
96
- browser → POST /_xlate/translate (same-origin, no CORS)
97
- → host provider chain (fail-open, user-ordered):
98
- chain: [provider1, provider2, ...] ← drag-reordered in settings
99
- each provider is one of:
100
- google (gtx via native Node HTTP/HTTPS and the system proxy)
101
- bing (ttranslatev3 via native Node HTTP/HTTPS)
102
- openai (OpenAI-compatible /chat/completions — Ollama local or any gateway)
103
- anthropic(Anthropic Messages API /v1/messages)
104
- fallback chain (config-only, off by default) tried when the primary chain fails entirely
105
- → browser-direct fallback
106
- ```
107
-
108
- - **Provider config** lives in `config.json` (runtime, gitignored): `chain` (ordered ids), `fallback` (enabled + chain, config-only), `providers` (per-provider `type`/`enabled`/`baseURL`/`apiKey`/`apiKeyEnv`/`model`). Old `priority`-based configs auto-migrate. A provider that declares `apiKeyEnv` resolves its key from that environment variable at request time (the literal `apiKey` stays as the fallback), and no env-resolved key is ever written back to `config.json`. A `null` field in a config patch deletes that field, which is how the UI clears one.
109
- - **DSH discovery** reads the harness `profiles/<profile>/cordis.patch.yml` / legacy `settings.yaml` (`llm-pi-ai.providers`) and `.credentials.yaml` (`refs`) on load; discovered providers are marked `source: "dsh"`, resolved keys stay in memory (never written to `config.json`), and a `/_xlate/dsh-scan` route re-reads them on demand.
110
- - **Host half** (`lib/index.js`): provider adapters, ordered chain + fallback execution, LRU cache (600), per-provider override for tests, `/_xlate/models` listing, `/_xlate/model/pull` + `pull-status` model download management (auto-configures on completion)
111
- - **Client half** (`lib/client.js`): 8-language UI, drag-reorderable provider list, add/edit/delete custom providers, per-provider test buttons, sentence/paragraph-batched translation, streaming Think rows, localStorage persistence (settings + translation cache)
112
- - Pure display layer: originals remain in the transcript and model context
113
-
114
- ## 🛠 Development
115
-
116
- - No build step: `lib/client.js` is the browser bundle (source = artifact), `lib/index.js` is the host ESM
117
- - Client changes apply on page refresh; host changes need a web restart
118
- - The 8-language strings live in the `UI_TEXT` dictionary in `lib/client.js`
119
-
120
- ## 📄 License
121
-
122
- MIT
1
+ <div align="center">
2
+
3
+ # 🐋 dsh-think-translate
4
+
5
+ **Languages:** [English](README.md) · [中文](README.zh-CN.md) · [日本語](README.ja.md) · [한국어](README.ko.md) · [Español](README.es.md) · [Français](README.fr.md) · [Deutsch](README.de.md) · [Русский](README.ru.md)
6
+
7
+ [![npm version](https://img.shields.io/npm/v/dsh-think-translate?color=4D6BFE&label=npm)](https://www.npmjs.com/package/dsh-think-translate)
8
+ [![license](https://img.shields.io/npm/l/dsh-think-translate?color=4D6BFE)](LICENSE)
9
+ [![dsh](https://img.shields.io/badge/powered_by-dsh-4D6BFE?style=flat-square&logo=deepseek&logoColor=white)](https://github.com/deepseek-ai/deepseek-harness)
10
+
11
+ <img src="demo/demo.gif?v=2" width="46%" alt="dsh-think-translate demo" style="border:1px solid #4D6BFE;border-radius:8px;margin:4px" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="demo/demo2.gif?v=2" width="41%" alt="dsh-think-translate demo 2" style="border:1px solid #4D6BFE;border-radius:8px;margin:4px" />
12
+
13
+ </div>
14
+
15
+ ---
16
+
17
+ Translate the **reasoning / thinking chain (chain-of-thought), task cards and answers** of the [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) Web UI into one of **8 target languages** — in real time, on the display layer only. The originals stay untouched in the transcript, and the translated text **never enters the model context**.
18
+
19
+ ## ✨ Why dsh-think-translate
20
+
21
+ DeepSeek-class models often reason in Chinese — or in whatever language they happen to think in. dsh-think-translate renders the **Think row, task cards and answer** in *your* language while you watch, like subtitles for the model's thinking.
22
+
23
+ - **🕵️ Read any thinking chain** — reasoning, chain-of-thought, task cards and answers translated in real time, streamed batch by batch
24
+ - **🌍 8 languages, one consistent UI** — 中文 / English / 日本語 / 한국어 / Español / Français / Deutsch / Русский; the settings panel, thinking rows and task cards all follow your choice, and it persists across reloads
25
+ - **🔗 Dynamic provider chain** — order providers by drag-and-drop and enable/disable each one. Built-ins (google gtx, bing, local Ollama) plus any number of custom providers; the chain already ends with the free providers, so a second fallback pass is a config-file option, not a UI one
26
+ - **🔌 Custom providers (OpenAI & Anthropic)** — add arbitrary OpenAI-compatible endpoints (any `/v1/chat/completions` gateway) or native **Anthropic Messages API** endpoints (Claude) from the settings panel: name, type, base URL, API key, model
27
+ - **🪄 DSH provider discovery** — providers already configured in DSH's `profiles/<profile>/cordis.patch.yml` / legacy `settings.yaml` (`llm-pi-ai.providers`, e.g. linuxdo-hub, coding-hub) are auto-discovered and appear in the chain as read-only "DSH" entries, and **one button in settings rescans and adds them all at once**; keys are resolved from `.credentials.yaml` at runtime and never written to the plugin's config. The harness's own default route counts too: when `default-model` / `agent-default-model` points at `deepseek-official`, DeepSeek's API is offered as one more DSH entry
28
+ - **🔒 Local Ollama** — reuse an existing installation and model. When enabled Ollama is first in priority, or you click Test, the plugin starts the service and loads the model as needed. Missing software/models require the setup button before installation/download, with live progress
29
+ - **🧠 Zero context cost** — pure display layer: the model still sees the original text, and translated text never consumes the context window
30
+ - **☁️ Google / Bing fallback** — automatic switch when other providers are unavailable (google goes through a Node CONNECT tunnel using the system proxy, bypassing anti-bot blocks)
31
+ - **🛡️ Code-safe** — file paths, commands, URLs, regexes and pure-code lines are never translated
32
+ - **🚨 Auto-review reasons** — when Auto review denies a tool call, the approval card appends the reviewer's reason in your target language, so the decision prompt is readable before choosing Reject / Allow once
33
+ - **🧩 Paragraph & sentence-aware chunking** — long thinking chains are split on blank lines (paragraph structure preserved) and further batched by sentence, so even a small local model keeps quality
34
+ - **⏱️ Resilient** — failed translations are cached in memory for 30 seconds to prevent retry storms, then retried automatically; each provider has its own Test button
35
+ - **🎚️ Adjustable translation timing** — pre-translate everything, lazy-load historical chains (default), or translate only the expanded chain
36
+
37
+ ## 📦 Installation
38
+
39
+ ```bash
40
+ # Option 1: npm (recommended)
41
+ dsh plugin --profile web add dsh-think-translate
42
+ # then restart web
43
+
44
+ # Option 2: GitHub
45
+ dsh plugin --profile web add github:UncleK/dsh-think-translate
46
+
47
+ # Option 3: manual (junction + patch)
48
+ # 1. link the package into the profile's node_modules
49
+ New-Item -ItemType Junction -Path "$HOME\.dsh\profiles\node_modules\dsh-think-translate" `
50
+ -Target "<repo path>"
51
+ # 2. add to "$HOME\.dsh\profiles\web\cordis.patch.yml":
52
+ # - insert:
53
+ # - id: dsh-think-translate
54
+ # name: dsh-think-translate
55
+ # 3. restart web
56
+ ```
57
+
58
+ ## 🧯 After a DSH upgrade
59
+
60
+ Third-party client plugins load through DSH's client module graph, and that graph is composed **once per process** — a composition that failed is remembered in memory until the process restarts. So these three things commonly bite right after an upgrade:
61
+
62
+ - **Starting from a source checkout fails with** `client bundles not found; run \`pnpm run build\` before launch` — the new client packages ship unbuilt: run `pnpm run build` in the harness checkout, then start `dsh web` again.
63
+ - **The plugin's UI is gone** (no translated Think row, no *Think Translation* section in Settings) — **restart `dsh web`**; refreshing the page alone is sometimes not enough.
64
+ - **The local model list is empty** — the `ollama` service is not serving that model directory: check `ollama list` (or `GET /api/tags`) and the `OLLAMA_MODELS` the running service actually uses. When the model files live on another drive, a directory junction can point the service's default directory at them.
65
+
66
+ Nothing to configure on the plugin side: it declares no ordering dependency on DSH internals (it binds only to the `slots` service, plus an optional `@deepseek-ai/dsh-client-ui-primitives`), so it runs on both older DSH (≤ 0.1.1-rc) and the current line (≥ 0.1.2-alpha.1, 0.1.5-rc.1 included).
67
+
68
+ For DSH **0.2.0-rc.2**, use **dsh-think-translate 1.2.5 or later**. Version 1.2.5 fixes the `todo_write` slot collision and declares the 0.2 peer range. Run `dsh plugin --profile web add dsh-think-translate@latest`, then restart DSH; no version exemption is needed.
69
+
70
+ Version **1.2.6** fixes duplicated thinking and answer text in DSH 0.2: the assistant renderer now respects the separate reasoning/response groups, including its original-text error fallback.
71
+
72
+ **1.2.7 local setup:** enabled Ollama in first priority, or its Test button, finds an existing installation and starts/loads it automatically. Missing software/models require the labelled setup action, with staged download/install/load progress. Automatic software installation supports Windows; other systems link to the official guide. “In use” follows the first enabled, verified provider in priority order; testing a lower row does not override a verified higher row.
73
+
74
+ **1.2.8 transport and recovery:** ordinary HTTP/HTTPS translation requests use native Node networking instead of spawning curl per text batch; SOCKS proxies and the Ollama installer retain curl compatibility. Failures stay in memory for 30 seconds, then reasoning and answer translation resume automatically. Request deadlines allow time for local-model loading and provider fallback.
75
+
76
+ **1.2.13:** Auto review rejection cards retain the original reason and asynchronously append its translation. An independent, default-on switch controls this feature. Disabling it, changing the target language or removing the card discards stale results; non-English reasons translate correctly to English. Thanks to [llg1634](https://github.com/llg1634) for the report, initial patch and tests in [#13](https://github.com/UncleK/dsh-think-translate/issues/13). Fully restart DSH Web or Desktop after upgrading.
77
+
78
+ **1.2.12:** provider switches are authoritative: the browser no longer sends direct Google requests after Host failure. Fenced, indented and inline code is excluded from translation payloads and restored exactly, including unfinished streaming spans. Old translation caches are discarded; preferences are retained. After upgrading, fully restart DSH Web or Desktop; a page refresh alone may still reference old client resources.
79
+
80
+ **1.2.11 Bing fixes:** the free Bing provider is retained. Translation requests use the session page's final origin, preventing the mainland China `www.bing.com` → `cn.bing.com` redirect from dropping the POST body. SOCKS/curl now shares the native browser headers to fix HTTP 401; empty and non-JSON responses report clear errors.
81
+
82
+ **1.2.10 DSH profile compatibility:** discovery follows the running Desktop/Web profile and reads `profiles/<profile>/cordis.patch.yml` (`id` + `config`), with home patches and launcher overlays applied afterward. Legacy `settings.yaml` is still supported. Default model rows use `default-model`; credentials remain in the DSH home `.credentials.yaml` and stay in memory. Rescan diagnostics show the file actually read.
83
+
84
+ **1.2.9 language fixes:** Japanese vocabulary hints now apply only to Japanese targets; OpenAI/Anthropic requests include a full language name. Bing uses `auto-detect` and maps Chinese targets to `zh-Hans`/`zh-Hant`. Chinese detection examines prose after removing paths, code and JSON: already-Simplified prose is skipped, common Traditional script cues request conversion, and Japanese/Korean prose is translated. Old persisted translation results are cleared once; settings remain intact.
85
+
86
+ ## 🚀 Usage
87
+
88
+ 1. Open **Settings → Think Translation**
89
+ 2. Pick the **target language** (e.g. 日本語) — the settings panel, thinking rows and task cards all switch to it
90
+ 3. **Manage the provider chain** — the list below it *is* the delivery order; drag rows to reorder, and the checkbox is the on/off switch:
91
+ - Built-ins: **google gtx / bing** (free, via the system proxy) and **local Ollama** — existing software/models are reused; missing components require the setup button (qwen2.5:7b / 14b or custom), with progress displayed. Built-ins are permanent: uncheck one to stop using it, there is nothing to delete
92
+ - **DSH providers**: endpoints already configured in DSH (`llm-pi-ai.providers`) appear automatically as read-only entries (badge "DSH"); their checkbox adds/removes them from the chain. The **Import from DSH config** button right below the list rescans on click and adds all of them in one go — there is no base URL and no key to retype, because the key is resolved from DSH's own credentials at request time
93
+ - **Custom providers**: "Add custom provider" registers any **OpenAI-compatible** or **Anthropic Messages** endpoint; the form offers **presets** for common low-cost models (DeepSeek, OpenAI, Qwen, GLM, Kimi, SiliconFlow, OpenRouter, Anthropic) that fill base URL + model + env name, all still editable; the model lists were checked against the vendors' documentation in September 2026 and are suggestions only — any model id can be typed in. Each row has a **test** button, an edit form and a **×** to delete it (a DSH row cannot be deleted — it is managed by the harness)
94
+ - A provider can name an **environment variable** (`apiKeyEnv`) instead of carrying the key: presets fill that in, and a DSH row brings its own. The key is resolved per request and never written to `config.json`, and such a row shows an `env:NAME` badge. The edit form has no env field (the value survives an edit untouched), but emptying a field really removes it — the field is sent as an explicit delete
95
+ - The former **fallback chain** option is gone: it was redundant once the chain itself ends with the free providers, and unchecking a provider is how you opt out of it. `fallback` still exists in `config.json` for anyone who wants it (off by default)
96
+ 4. Send a message that makes the model think, then expand the **Think row** to read the translation and compare with the original
97
+
98
+ ## ⚙️ How it works
99
+
100
+ ```
101
+ browser → POST /_xlate/translate (same-origin, no CORS)
102
+ → host provider chain (fail-open, user-ordered):
103
+ chain: [provider1, provider2, ...] ← drag-reordered in settings
104
+ each provider is one of:
105
+ google (gtx via native Node HTTP/HTTPS and the system proxy)
106
+ bing (ttranslatev3 via native Node HTTP/HTTPS)
107
+ openai (OpenAI-compatible /chat/completions — Ollama local or any gateway)
108
+ anthropic(Anthropic Messages API /v1/messages)
109
+ fallback chain (config-only, off by default) tried when the primary chain fails entirely
110
+ → original text if all enabled providers fail
111
+ ```
112
+
113
+ - **Provider config** lives in `config.json` (runtime, gitignored): `chain` (ordered ids), `fallback` (enabled + chain, config-only), `providers` (per-provider `type`/`enabled`/`baseURL`/`apiKey`/`apiKeyEnv`/`model`). Old `priority`-based configs auto-migrate. A provider that declares `apiKeyEnv` resolves its key from that environment variable at request time (the literal `apiKey` stays as the fallback), and no env-resolved key is ever written back to `config.json`. A `null` field in a config patch deletes that field, which is how the UI clears one.
114
+ - **DSH discovery** reads the harness `profiles/<profile>/cordis.patch.yml` / legacy `settings.yaml` (`llm-pi-ai.providers`) and `.credentials.yaml` (`refs`) on load; discovered providers are marked `source: "dsh"`, resolved keys stay in memory (never written to `config.json`), and a `/_xlate/dsh-scan` route re-reads them on demand.
115
+ - **Host half** (`lib/index.js`): provider adapters, ordered chain + fallback execution, LRU cache (600), per-provider override for tests, `/_xlate/models` listing, `/_xlate/model/pull` + `pull-status` model download management (auto-configures on completion)
116
+ - **Client half** (`lib/client.js`): 8-language UI, drag-reorderable provider list, add/edit/delete custom providers, per-provider test buttons, sentence/paragraph-batched translation, streaming Think rows, localStorage persistence (settings + translation cache)
117
+ - Pure display layer: originals remain in the transcript and model context
118
+
119
+ ## 🛠 Development
120
+
121
+ - No build step: `lib/client.js` is the browser bundle (source = artifact), `lib/index.js` is the host ESM
122
+ - Client changes apply on page refresh; host changes need a web restart
123
+ - The 8-language strings live in the `UI_TEXT` dictionary in `lib/client.js`
124
+
125
+ ## 📄 License
126
+
127
+ MIT
package/README.ru.md CHANGED
@@ -20,6 +20,7 @@
20
20
 
21
21
  Модели семейства DeepSeek часто рассуждают на китайском — или на том языке, на котором им случилось думать. dsh-think-translate показывает строку Think, карточки задач и ответ на *вашем* языке в реальном времени — как субтитры к размышлениям модели.
22
22
 
23
+ - **Причины отказа Auto review** — перевод добавляется в карточку подтверждения асинхронно, исходный текст сохраняется; доступен отдельный переключатель.
23
24
  - **🕵️ Читайте любую цепочку рассуждений** — рассуждения, цепочка мыслей, карточки задач и ответы переводятся в реальном времени, потоком по батчам
24
25
  - **8 целевых языков** — 中文 / English / 日本語 / 한국어 / Español / Français / Deutsch / Русский
25
26
  - **Одноязычный интерфейс** — панель настроек, строки размышлений и карточки задач следуют целевому языку (без смешения zh/en); выбор сохраняется
@@ -75,6 +76,10 @@ New-Item -ItemType Junction -Path "$HOME\.dsh\profiles\node_modules\dsh-think-tr
75
76
 
76
77
  **1.2.8 передача запросов и восстановление:** обычные HTTP/HTTPS-запросы перевода используют сетевые средства Node без запуска curl для каждого пакета текста. Для SOCKS-прокси и установщика Ollama сохранён путь через curl. Ошибки хранятся в памяти 30 секунд, после чего перевод рассуждений и ответов автоматически повторяется. Тайм-ауты учитывают загрузку локальной модели и переход к другим провайдерам.
77
78
 
79
+ **1.2.13:** карточки отказа Auto review сохраняют оригинал и асинхронно добавляют перевод; отдельный переключатель включён по умолчанию. После отключения, смены языка или удаления карточки устаревшие результаты игнорируются. Причины не на английском также переводятся на английский. Спасибо [llg1634](https://github.com/llg1634) за сообщение, первоначальный патч и тесты в [#13](https://github.com/UncleK/dsh-think-translate/issues/13). После обновления полностью перезапустите DSH Web или Desktop.
80
+
81
+ **1.2.12:** настройки провайдеров соблюдаются: после ошибки Host браузер больше не обращается к Google напрямую. Блочный код, код с отступом и встроенный код исключаются из запросов и сохраняются точно, включая незавершённые потоковые фрагменты. Старый кеш переводов очищается, настройки сохраняются. После обновления полностью перезапустите DSH Web или Desktop: простое обновление страницы может продолжить использовать старые ресурсы клиента.
82
+
78
83
  **1.2.11 исправления Bing:** бесплатный провайдер сохранён. Запросы перевода отправляются на конечный origin страницы сеанса, чтобы перенаправление `www.bing.com` → `cn.bing.com` в материковом Китае не удаляло тело POST. SOCKS/curl использует те же заголовки браузера, что и нативный транспорт, устраняя HTTP 401; пустые ответы и ответы не в формате JSON дают понятные ошибки.
79
84
 
80
85
  **1.2.10 совместимость с профилями DSH:** обнаружение следует активному профилю Desktop/Web и читает `profiles/<profile>/cordis.patch.yml` (`id` + `config`), затем патчи домашнего каталога DSH и параметры запуска. Прежний `settings.yaml` поддерживается. Модель по умолчанию использует `default-model`; ключи читаются из `.credentials.yaml` домашнего каталога DSH и остаются только в памяти. Диагностика показывает прочитанный файл.
@@ -100,7 +105,7 @@ New-Item -ItemType Junction -Path "$HOME\.dsh\profiles\node_modules\dsh-think-tr
100
105
  chain: [provider1, provider2, ...] ← порядок перетаскиванием в настройках
101
106
  google / bing / OpenAI-совместимый / Anthropic
102
107
  fallback-цепочка (необязательно, по умолчанию выключена, включается в конфиге)
103
- → прямой запасной путь из браузера
108
+ → исходный текст, если все включённые провайдеры недоступны
104
109
  ```
105
110
 
106
111
  - **Конфигурация провайдеров** живёт в `config.json` (создаётся во время работы, в gitignore): `chain` (упорядоченные id), `fallback` (enabled + chain, только в файле), `providers` (у каждого `type`/`enabled`/`baseURL`/`apiKey`/`apiKeyEnv`/`model`). Старые конфиги с `priority` мигрируют автоматически; провайдер с `apiKeyEnv` разрешает ключ из этой переменной на каждый запрос (литеральный `apiKey` остаётся запасным), и разрешённый ключ никогда не пишется обратно в `config.json`; `null` в патче удаляет поле — так интерфейс и очищает значения