dsh-think-translate 1.0.0 → 1.0.1

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 ADDED
@@ -0,0 +1,77 @@
1
+ # 🐋 dsh-think-translate
2
+
3
+ **Sprachen:** [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)
4
+
5
+ ---
6
+
7
+ Übersetzung auf Anzeigeebene für die Web-Oberfläche von [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness): Die **Gedankenkette (Think-Zeile), Aufgabenkarten und der Antworttext** werden in der gewählten Zielsprache angezeigt, während die Originale im Verlauf unverändert bleiben.
8
+
9
+ [![npm version](https://img.shields.io/npm/v/dsh-think-translate?color=4D6BFE&label=npm)](https://www.npmjs.com/package/dsh-think-translate)
10
+ [![license](https://img.shields.io/npm/l/dsh-think-translate?color=4D6BFE)](LICENSE)
11
+ [![dsh](https://img.shields.io/badge/powered_by-dsh-4D6BFE?style=flat-square&logo=deepseek&logoColor=white)](https://github.com/deepseek-ai/deepseek-harness)
12
+
13
+ ## ✨ Funktionen
14
+
15
+ - **8 Zielsprachen** — 中文 / English / 日本語 / 한국어 / Español / Français / Deutsch / Русский
16
+ - **Einsprachige Oberfläche** — Einstellungsbereich, Denkzeilen und Aufgabenkarten folgen der Zielsprache (kein zh/en-Gemisch); die Auswahl bleibt erhalten
17
+ - **Lokales Modell zuerst** — nutzt Ihr lokales Ollama-Modell (qwen usw.): privat, offline, kostenlos. Die erste Auswahl **startet den Download automatisch** mit Fortschrittsbalken; das Modell wird danach automatisch konfiguriert und aktiviert
18
+ - **Google / Bing-Fallback** — automatische Umschaltung, wenn das lokale Modell nicht verfügbar ist (google nutzt einen Node-CONNECT-Tunnel über den Systemproxy)
19
+ - **Code-Artefakte übersprungen** — Pfade, Befehle, URLs, Regexes und reine Codezeilen werden nie übersetzt
20
+ - **Satzweise Batch-Übersetzung** — lange Denkketten werden in kleinen Sätzen übersetzt, damit lokale kleine Modelle Qualität behalten
21
+ - **Streaming-Ausgabe** — Übersetzungen erscheinen während des Denkens batchweise; Think-Zeile aufklappen zum Vergleich mit dem Original
22
+ - **Robust** — Host-Anfragen mit Backoff (3×), Browser-Direkt-Fallback, Fehlschläge werden nie gecacht
23
+
24
+ ## 📦 Installation
25
+
26
+ ```bash
27
+ # Option 1: npm (empfohlen)
28
+ dsh plugin --profile web add dsh-think-translate
29
+ # dann web neu starten
30
+
31
+ # Option 2: GitHub
32
+ dsh plugin --profile web add github:UncleK/dsh-think-translate
33
+
34
+ # Option 3: manuell (Junction + Patch)
35
+ # 1. Paket in das node_modules des Profils verlinken
36
+ New-Item -ItemType Junction -Path "$HOME\.dsh\profiles\node_modules\dsh-think-translate" `
37
+ -Target "<Repository-Pfad>"
38
+ # 2. zu "$HOME\.dsh\profiles\web\cordis.patch.yml" hinzufügen:
39
+ # - insert:
40
+ # - id: dsh-think-translate
41
+ # name: dsh-think-translate
42
+ # 3. web neu starten
43
+ ```
44
+
45
+ ## 🚀 Verwendung
46
+
47
+ 1. **Einstellungen → Übersetzung der Gedankenkette** öffnen
48
+ 2. Die **Zielsprache** wählen (z. B. Deutsch) — Einstellungen, Denkzeilen und Karten wechseln in diese Sprache
49
+ 3. Den **bevorzugten Anbieter** wählen:
50
+ - **Lokales Modell (Ollama)** — bei der ersten Auswahl erscheint ein Download-Button (qwen2.5:7b / 14b oder benutzerdefiniert); es aktiviert sich automatisch am Ende. Der "+"-Button neben der Auswahl lädt weitere Modelle
51
+ - **google gtx / bing** — funktioniert sofort (Systemproxy / VPN automatisch)
52
+ 4. Nachricht senden und die Think-Zeile aufklappen, um die Übersetzung zu sehen
53
+
54
+ ## ⚙️ Funktionsweise
55
+
56
+ ```
57
+ Browser → POST /_xlate/translate (gleicher Ursprung, kein CORS)
58
+ → Host-Anbieterkette (fail-open):
59
+ OpenAI-kompatibel (lokales Ollama, Node fetch zum Loopback)
60
+ → google gtx (Node https + CONNECT-Tunnel über den Systemproxy)
61
+ → bing (curl form)
62
+ → Browser-Direkt-Fallback
63
+ ```
64
+
65
+ - **Host-Hälfte** (`lib/index.js`): Anbieteradapter, LRU-Cache (600), `/_xlate/models`, `/_xlate/model/pull` + `pull-status` (automatische Konfiguration am Ende)
66
+ - **Client-Hälfte** (`lib/client.js`): 8-sprachige UI, satzweise Batch-Übersetzung, Streaming-Think-Zeilen, localStorage-Persistenz
67
+ - Reine Anzeigeschicht: Originale bleiben im Verlauf und im Modellkontext erhalten
68
+
69
+ ## 🛠 Entwicklung
70
+
71
+ - Kein Build-Schritt: `lib/client.js` ist das Browser-Bundle (Quelle = Artefakt); `lib/index.js` ist das Host-ESM
72
+ - Client-Änderungen greifen nach dem Aktualisieren; Host-Änderungen erfordern einen Web-Neustart
73
+ - Die 8-sprachigen Texte stehen im `UI_TEXT`-Wörterbuch in `lib/client.js`
74
+
75
+ ## 📄 Lizenz
76
+
77
+ MIT
package/README.es.md ADDED
@@ -0,0 +1,77 @@
1
+ # 🐋 dsh-think-translate
2
+
3
+ **Idiomas:** [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)
4
+
5
+ ---
6
+
7
+ Traducción en la capa de visualización para la interfaz web de [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness): la **cadena de pensamiento (fila Think), las tarjetas de tareas y el texto de respuesta** se muestran en el idioma de destino elegido, mientras los originales permanecen intactos en la transcripción.
8
+
9
+ [![npm version](https://img.shields.io/npm/v/dsh-think-translate?color=4D6BFE&label=npm)](https://www.npmjs.com/package/dsh-think-translate)
10
+ [![license](https://img.shields.io/npm/l/dsh-think-translate?color=4D6BFE)](LICENSE)
11
+ [![dsh](https://img.shields.io/badge/powered_by-dsh-4D6BFE?style=flat-square&logo=deepseek&logoColor=white)](https://github.com/deepseek-ai/deepseek-harness)
12
+
13
+ ## ✨ Características
14
+
15
+ - **8 idiomas de destino** — 中文 / English / 日本語 / 한국어 / Español / Français / Deutsch / Русский
16
+ - **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
17
+ - **Modelo local primero** — usa tu modelo local de Ollama (qwen, etc.): privado, sin conexión, gratis. La primera selección **activa la descarga automática** con barra de progreso; el modelo se configura y habilita al terminar
18
+ - **Respaldo Google / Bing** — cambio automático si el modelo local no está disponible (google usa un túnel CONNECT de Node con el proxy del sistema)
19
+ - **Artefactos de código omitidos** — rutas, comandos, URL, regex y líneas de código puro nunca se traducen
20
+ - **Traducción por lotes de frases** — las cadenas largas se traducen en lotes pequeños para mantener la calidad en modelos locales pequeños
21
+ - **Salida en streaming** — las traducciones aparecen lote a lote mientras piensa; expande la fila Think para comparar con el original
22
+ - **Resistente** — reintentos con backoff (3×), respaldo directo del navegador, los fallos nunca se cachean
23
+
24
+ ## 📦 Instalación
25
+
26
+ ```bash
27
+ # Opción 1: npm (recomendado)
28
+ dsh plugin --profile web add dsh-think-translate
29
+ # luego reinicia web
30
+
31
+ # Opción 2: GitHub
32
+ dsh plugin --profile web add github:UncleK/dsh-think-translate
33
+
34
+ # Opción 3: manual (junction + patch)
35
+ # 1. enlaza el paquete en el node_modules del perfil
36
+ New-Item -ItemType Junction -Path "$HOME\.dsh\profiles\node_modules\dsh-think-translate" `
37
+ -Target "<ruta del repositorio>"
38
+ # 2. añade a "$HOME\.dsh\profiles\web\cordis.patch.yml":
39
+ # - insert:
40
+ # - id: dsh-think-translate
41
+ # name: dsh-think-translate
42
+ # 3. reinicia web
43
+ ```
44
+
45
+ ## 🚀 Uso
46
+
47
+ 1. Abre **Ajustes → Traducción de cadena de pensamiento**
48
+ 2. Elige el **idioma de destino** (p. ej. Español) — el panel, las filas y las tarjetas cambian a ese idioma
49
+ 3. Elige el **proveedor preferido**:
50
+ - **Modelo local (Ollama)** — al elegirlo por primera vez aparece el botón de descarga (qwen2.5:7b / 14b o personalizado); se habilita solo al terminar. El botón "+" junto al selector descarga más modelos
51
+ - **google gtx / bing** — funciona directamente (proxy del sistema / VPN automáticos)
52
+ 4. Envía un mensaje y expande la fila Think para ver la traducción
53
+
54
+ ## ⚙️ Cómo funciona
55
+
56
+ ```
57
+ navegador → POST /_xlate/translate (mismo origen, sin CORS)
58
+ → cadena de proveedores host (fail-open):
59
+ compatible con OpenAI (Ollama local, Node fetch al loopback)
60
+ → google gtx (Node https + túnel CONNECT por el proxy del sistema)
61
+ → bing (curl form)
62
+ → respaldo directo del navegador
63
+ ```
64
+
65
+ - **Mitad host** (`lib/index.js`): adaptadores de proveedor, caché LRU (600), `/_xlate/models`, `/_xlate/model/pull` + `pull-status` (configura automáticamente al terminar)
66
+ - **Mitad cliente** (`lib/client.js`): UI en 8 idiomas, traducción por lotes, filas Think en streaming, persistencia en localStorage
67
+ - Capa de visualización pura: los originales permanecen en la transcripción y el contexto del modelo
68
+
69
+ ## 🛠 Desarrollo
70
+
71
+ - Sin paso de compilación: `lib/client.js` es el bundle del navegador (fuente = artefacto); `lib/index.js` es el ESM del host
72
+ - Cambios en el cliente se aplican al refrescar; cambios en el host requieren reiniciar web
73
+ - Las cadenas de 8 idiomas viven en el diccionario `UI_TEXT` de `lib/client.js`
74
+
75
+ ## 📄 Licencia
76
+
77
+ MIT
package/README.fr.md ADDED
@@ -0,0 +1,77 @@
1
+ # 🐋 dsh-think-translate
2
+
3
+ **Langues :** [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)
4
+
5
+ ---
6
+
7
+ Traduction au niveau de l'affichage pour l'interface web de [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) : la **chaîne de réflexion (ligne Think), les cartes de tâches et le texte de réponse** s'affichent dans la langue cible choisie, tandis que les originaux restent intacts dans la transcription.
8
+
9
+ [![npm version](https://img.shields.io/npm/v/dsh-think-translate?color=4D6BFE&label=npm)](https://www.npmjs.com/package/dsh-think-translate)
10
+ [![license](https://img.shields.io/npm/l/dsh-think-translate?color=4D6BFE)](LICENSE)
11
+ [![dsh](https://img.shields.io/badge/powered_by-dsh-4D6BFE?style=flat-square&logo=deepseek&logoColor=white)](https://github.com/deepseek-ai/deepseek-harness)
12
+
13
+ ## ✨ Fonctionnalités
14
+
15
+ - **8 langues cibles** — 中文 / English / 日本語 / 한국어 / Español / Français / Deutsch / Русский
16
+ - **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
17
+ - **Modèle local d'abord** — utilise votre modèle Ollama local (qwen, etc.) : privé, hors ligne, gratuit. La première sélection **déclenche le téléchargement automatique** avec barre de progression ; le modèle est configuré et activé à la fin
18
+ - **Repli Google / Bing** — bascule automatique si le modèle local est indisponible (google passe par un tunnel CONNECT Node avec le proxy système)
19
+ - **Artefacts de code ignorés** — chemins, commandes, URL, regex et lignes de code pur ne sont jamais traduits
20
+ - **Traduction par lots de phrases** — les chaînes longues sont traduites en petits lots pour garder la qualité sur les petits modèles locaux
21
+ - **Sortie en streaming** — les traductions apparaissent lot par lot pendant la réflexion ; dépliez la ligne Think pour comparer avec l'original
22
+ - **Résilient** — nouvelles tentatives avec backoff (3×), repli direct navigateur, échecs jamais mis en cache
23
+
24
+ ## 📦 Installation
25
+
26
+ ```bash
27
+ # Option 1 : npm (recommandé)
28
+ dsh plugin --profile web add dsh-think-translate
29
+ # puis redémarrez web
30
+
31
+ # Option 2 : GitHub
32
+ dsh plugin --profile web add github:UncleK/dsh-think-translate
33
+
34
+ # Option 3 : manuel (junction + patch)
35
+ # 1. liez le paquet dans le node_modules du profil
36
+ New-Item -ItemType Junction -Path "$HOME\.dsh\profiles\node_modules\dsh-think-translate" `
37
+ -Target "<chemin du dépôt>"
38
+ # 2. ajoutez à "$HOME\.dsh\profiles\web\cordis.patch.yml" :
39
+ # - insert:
40
+ # - id: dsh-think-translate
41
+ # name: dsh-think-translate
42
+ # 3. redémarrez web
43
+ ```
44
+
45
+ ## 🚀 Utilisation
46
+
47
+ 1. Ouvrez **Réglages → Traduction de chaîne de réflexion**
48
+ 2. Choisissez la **langue cible** (p. ex. Français) — le panneau, les lignes et les cartes basculent dans cette langue
49
+ 3. Choisissez le **fournisseur préféré** :
50
+ - **Modèle local (Ollama)** — au premier choix, un bouton de téléchargement apparaît (qwen2.5:7b / 14b ou personnalisé) ; il s'active automatiquement à la fin. Le bouton "+" à côté du sélecteur télécharge d'autres modèles
51
+ - **google gtx / bing** — fonctionne directement (proxy système / VPN automatiques)
52
+ 4. Envoyez un message et dépliez la ligne Think pour voir la traduction
53
+
54
+ ## ⚙️ Fonctionnement
55
+
56
+ ```
57
+ navigateur → POST /_xlate/translate (même origine, sans CORS)
58
+ → chaîne de fournisseurs host (fail-open) :
59
+ compatible OpenAI (Ollama local, Node fetch vers loopback)
60
+ → google gtx (Node https + tunnel CONNECT via le proxy système)
61
+ → bing (curl form)
62
+ → repli direct navigateur
63
+ ```
64
+
65
+ - **Moitié host** (`lib/index.js`) : adaptateurs de fournisseurs, cache LRU (600), `/_xlate/models`, `/_xlate/model/pull` + `pull-status` (configuration automatique à la fin)
66
+ - **Moitié client** (`lib/client.js`) : UI en 8 langues, traduction par lots, lignes Think en streaming, persistance localStorage
67
+ - Couche d'affichage pure : les originaux restent dans la transcription et le contexte du modèle
68
+
69
+ ## 🛠 Développement
70
+
71
+ - Pas d'étape de compilation : `lib/client.js` est le bundle navigateur (source = artefact) ; `lib/index.js` est l'ESM host
72
+ - Les changements client s'appliquent au rafraîchissement ; les changements host nécessitent un redémarrage de web
73
+ - Les chaînes en 8 langues vivent dans le dictionnaire `UI_TEXT` de `lib/client.js`
74
+
75
+ ## 📄 Licence
76
+
77
+ MIT
package/README.ja.md ADDED
@@ -0,0 +1,77 @@
1
+ # 🐋 dsh-think-translate
2
+
3
+ **言語:** [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)
4
+
5
+ ---
6
+
7
+ [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) Web UI の**表示層翻訳**プラグイン:**思考チェーン(Think 行)、タスクカード、回答本文**を選択した対象言語で表示します。原文は会話履歴に完全に残ります。
8
+
9
+ [![npm version](https://img.shields.io/npm/v/dsh-think-translate?color=4D6BFE&label=npm)](https://www.npmjs.com/package/dsh-think-translate)
10
+ [![license](https://img.shields.io/npm/l/dsh-think-translate?color=4D6BFE)](LICENSE)
11
+ [![dsh](https://img.shields.io/badge/powered_by-dsh-4D6BFE?style=flat-square&logo=deepseek&logoColor=white)](https://github.com/deepseek-ai/deepseek-harness)
12
+
13
+ ## ✨ 特徴
14
+
15
+ - **8 つの対象言語** — 中文 / English / 日本語 / 한국어 / Español / Français / Deutsch / Русский
16
+ - **単一言語 UI** — 設定パネル・思考行・タスクカードがすべて対象言語に追従(中英混在なし)、選択は永続化
17
+ - **ローカルモデル優先** — ローカル Ollama モデル(qwen など)を優先:プライベート・オフライン・無料。初回選択時に**自動ダウンロード**(リアルタイム進捗バー)、完了後自動で設定・有効化
18
+ - **Google / Bing フォールバック** — ローカルモデルが使えないとき自動切替(google は Node CONNECT トンネルでシステムプロキシ経由、アンチボット回避)
19
+ - **コード類は自動スキップ** — ファイルパス・コマンド・URL・正規表現・純コード行は翻訳しない
20
+ - **文単位バッチ翻訳** — 長い思考チェーンを短文バッチで逐次翻訳し、ローカル小モデルでも品質を維持
21
+ - **ストリーミング出力** — 思考中に訳文がバッチ単位で表示され、Think 行を開いて原文と比較可能
22
+ - **耐障害性** — host リクエストはバックオフ付き 3 回リトライ、ブラウザ直接フォールバック、失敗結果はキャッシュしない
23
+
24
+ ## 📦 インストール
25
+
26
+ ```bash
27
+ # 方法1:npm(推奨)
28
+ dsh plugin --profile web add dsh-think-translate
29
+ # その後 web を再起動
30
+
31
+ # 方法2:GitHub
32
+ dsh plugin --profile web add github:UncleK/dsh-think-translate
33
+
34
+ # 方法3:手動(junction + patch)
35
+ # 1. パッケージを profile の node_modules にリンク
36
+ New-Item -ItemType Junction -Path "$HOME\.dsh\profiles\node_modules\dsh-think-translate" `
37
+ -Target "<リポジトリパス>"
38
+ # 2. "$HOME\.dsh\profiles\web\cordis.patch.yml" に追加:
39
+ # - insert:
40
+ # - id: dsh-think-translate
41
+ # name: dsh-think-translate
42
+ # 3. web を再起動
43
+ ```
44
+
45
+ ## 🚀 使い方
46
+
47
+ 1. **設定 → 思考チェーン翻訳** を開く
48
+ 2. **対象言語**を選択(例:日本語)— 設定パネル・思考行・タスクカードがすべてその言語に切替
49
+ 3. **優先プロバイダー**を選択:
50
+ - **ローカルモデル(Ollama)**:初回選択時にダウンロードボタンが表示(qwen2.5:7b / 14b またはカスタム)、完了後自動有効化。モデル選択の横の「+」でいつでも追加ダウンロード
51
+ - **google gtx / bing**:そのまま使える(システムプロキシ / VPN を自動利用)
52
+ 4. メッセージを送信し、Think 行を展開して訳文を確認
53
+
54
+ ## ⚙️ 仕組み
55
+
56
+ ```
57
+ ブラウザ → POST /_xlate/translate(同一オリジン、CORS なし)
58
+ → host プロバイダーチェーン(fail-open):
59
+ openai 互換(ローカル Ollama、Node fetch でループバック直結)
60
+ → google gtx(Node https + CONNECT トンネルでシステムプロキシ経由)
61
+ → bing(curl form)
62
+ → 失敗時はブラウザ直接へフォールバック
63
+ ```
64
+
65
+ - **host 側**(`lib/index.js`):プロバイダーアダプタ、LRU キャッシュ(600)、`/_xlate/models` モデル一覧、`/_xlate/model/pull` + `pull-status` モデルダウンロード管理(完了時自動設定)
66
+ - **client 側**(`lib/client.js`):8 言語 UI、文単位バッチ翻訳、ストリーミング Think 行、localStorage 永続化
67
+ - 純表示層:原文は会話履歴とモデルコンテキストに完全保持
68
+
69
+ ## 🛠 開発
70
+
71
+ - ビルド不要:`lib/client.js` はブラウザバンドル(ソース=成果物)、`lib/index.js` は host ESM
72
+ - client 変更はページ更新で反映、host 変更は web 再起動が必要
73
+ - 8 言語の文言は `lib/client.js` の `UI_TEXT` ディクショナリにあり
74
+
75
+ ## 📄 License
76
+
77
+ MIT
package/README.ko.md ADDED
@@ -0,0 +1,77 @@
1
+ # 🐋 dsh-think-translate
2
+
3
+ **언어:** [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)
4
+
5
+ ---
6
+
7
+ [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) Web UI용 **표시 계층 번역** 플러그인: **사고 체인(Think 행), 작업 카드, 답변 본문**을 선택한 대상 언어로 표시합니다. 원문은 대화 기록에 완전히 보존됩니다.
8
+
9
+ [![npm version](https://img.shields.io/npm/v/dsh-think-translate?color=4D6BFE&label=npm)](https://www.npmjs.com/package/dsh-think-translate)
10
+ [![license](https://img.shields.io/npm/l/dsh-think-translate?color=4D6BFE)](LICENSE)
11
+ [![dsh](https://img.shields.io/badge/powered_by-dsh-4D6BFE?style=flat-square&logo=deepseek&logoColor=white)](https://github.com/deepseek-ai/deepseek-harness)
12
+
13
+ ## ✨ 기능
14
+
15
+ - **8개 대상 언어** — 中文 / English / 日本語 / 한국어 / Español / Français / Deutsch / Русский
16
+ - **단일 언어 UI** — 설정 패널, 사고 행, 작업 카드가 모두 대상 언어를 따름(중·영 혼용 없음), 선택 영구 저장
17
+ - **로컬 모델 우선** — 로컬 Ollama 모델(qwen 등) 우선: 프라이빗·오프라인·무료. 첫 선택 시 **자동 다운로드**(실시간 진행률 표시), 완료 후 자동 설정·활성화
18
+ - **Google / Bing 폴백** — 로컬 모델 사용 불가 시 자동 전환(google은 Node CONNECT 터널로 시스템 프록시 경유, 안티봇 우회)
19
+ - **코드류 자동 스킵** — 파일 경로, 명령어, URL, 정규식, 순수 코드 줄은 번역하지 않음
20
+ - **문장 배치 번역** — 긴 사고 체인을 짧은 문장 배치로 순차 번역하여 로컬 소형 모델도 품질 유지
21
+ - **스트리밍 출력** — 사고 중 번역이 배치 단위로 표시, Think 행을 펼쳐 원문과 비교
22
+ - **내구성** — host 요청 백오프 3회 재시도, 브라우저 직접 폴백, 실패 결과는 캐시하지 않음
23
+
24
+ ## 📦 설치
25
+
26
+ ```bash
27
+ # 방법 1: npm (권장)
28
+ dsh plugin --profile web add dsh-think-translate
29
+ # 그 후 web 재시작
30
+
31
+ # 방법 2: GitHub
32
+ dsh plugin --profile web add github:UncleK/dsh-think-translate
33
+
34
+ # 방법 3: 수동 (junction + patch)
35
+ # 1. 패키지를 profile의 node_modules에 링크
36
+ New-Item -ItemType Junction -Path "$HOME\.dsh\profiles\node_modules\dsh-think-translate" `
37
+ -Target "<저장소 경로>"
38
+ # 2. "$HOME\.dsh\profiles\web\cordis.patch.yml"에 추가:
39
+ # - insert:
40
+ # - id: dsh-think-translate
41
+ # name: dsh-think-translate
42
+ # 3. web 재시작
43
+ ```
44
+
45
+ ## 🚀 사용법
46
+
47
+ 1. **설정 → 사고 체인 번역** 열기
48
+ 2. **대상 언어** 선택(예: 한국어) — 설정 패널, 사고 행, 작업 카드가 모두 전환
49
+ 3. **기본 제공자** 선택:
50
+ - **로컬 모델(Ollama)** — 첫 선택 시 다운로드 버튼 표시(qwen2.5:7b / 14b 또는 커스텀), 완료 후 자동 활성화. 모델 선택 옆 "+"로 언제든 추가 다운로드
51
+ - **google gtx / bing** — 바로 사용 가능(시스템 프록시/VPN 자동 이용)
52
+ 4. 메시지를 보내고 Think 행을 펼쳐 번역 확인
53
+
54
+ ## ⚙️ 작동 원리
55
+
56
+ ```
57
+ 브라우저 → POST /_xlate/translate(동일 출처, CORS 없음)
58
+ → host 제공자 체인(fail-open):
59
+ openai 호환(로컬 Ollama, Node fetch로 루프백 직결)
60
+ → google gtx(Node https + CONNECT 터널로 시스템 프록시 경유)
61
+ → bing(curl form)
62
+ → 실패 시 브라우저 직접 폴백
63
+ ```
64
+
65
+ - **host 측**(`lib/index.js`): 제공자 어댑터, LRU 캐시(600), `/_xlate/models` 모델 목록, `/_xlate/model/pull` + `pull-status` 모델 다운로드 관리(완료 시 자동 설정)
66
+ - **client 측**(`lib/client.js`): 8개 언어 UI, 문장 배치 번역, 스트리밍 Think 행, localStorage 영구 저장
67
+ - 순수 표시 계층: 원문은 대화 기록과 모델 컨텍스트에 완전 보존
68
+
69
+ ## 🛠 개발
70
+
71
+ - 빌드 불필요: `lib/client.js`는 브라우저 번들(소스=결과물), `lib/index.js`는 host ESM
72
+ - client 변경은 페이지 새로고침으로 반영, host 변경은 web 재시작 필요
73
+ - 8개 언어 문구는 `lib/client.js`의 `UI_TEXT` 사전에 있음
74
+
75
+ ## 📄 License
76
+
77
+ MIT
package/README.md CHANGED
@@ -1,66 +1,77 @@
1
- # dsh-think-translate
1
+ # 🐋 dsh-think-translate
2
2
 
3
- **思考链翻译** — 为 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) Web UI 提供显示层翻译:把界面上的**思考链(Think 行)、任务卡片、回答正文**翻译为你选择的目标语言,原文完整保留在会话记录中。
3
+ **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)
4
4
 
5
- ## 特性
5
+ ---
6
6
 
7
- - **8 种目标语言**:中文 / English / 日本語 / 한국어 / Español / Français / Deutsch / Русский
8
- - **单一语言 UI**:设置面板、思考行、任务卡片全部跟随目标语言(不混中英),语言选择持久化
9
- - **本地模型为主力**:优先使用本地 Ollama 模型(qwen 等),隐私离线免费;**首次选择本地模型时自动触发下载**,带实时进度条,完成后自动配置启用
10
- - **Google / Bing 兜底**:本地模型不可用时自动切换(google 通过 Node CONNECT 隧道走系统代理,绕过反爬)
11
- - **代码工件自动跳过**:文件路径、命令、URL、正则、纯代码行不翻译
12
- - **句子分批翻译**:长思考链按句子分批串行翻译,本地小模型也能保持质量
13
- - **流式输出**:思考过程中译文逐批出现,展开 Think 行可对照原文
14
- - **失败韧性**:host 请求 3 次退避重试 + 浏览器直连兜底,失败结果不缓存
7
+ Display-layer translation for the [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) Web UI. The **thinking chain (Think row), task cards and answer text** are displayed in your chosen target language — while the originals stay intact in the transcript.
15
8
 
16
- ## 安装
9
+ [![npm version](https://img.shields.io/npm/v/dsh-think-translate?color=4D6BFE&label=npm)](https://www.npmjs.com/package/dsh-think-translate)
10
+ [![license](https://img.shields.io/npm/l/dsh-think-translate?color=4D6BFE)](LICENSE)
11
+ [![dsh](https://img.shields.io/badge/powered_by-dsh-4D6BFE?style=flat-square&logo=deepseek&logoColor=white)](https://github.com/deepseek-ai/deepseek-harness)
12
+
13
+ ## ✨ Features
14
+
15
+ - **8 target languages** — 中文 / English / 日本語 / 한국어 / Español / Français / Deutsch / Русский
16
+ - **Single-language UI** — settings panel, thinking rows and task cards all follow the target language (no mixed zh/en); your choice persists across reloads
17
+ - **Local model first** — uses your local Ollama model (qwen, etc.): private, offline, free. First local-model selection **auto-triggers the download** with a live progress bar; the model is configured and enabled automatically when done
18
+ - **Google / Bing fallback** — automatic switch when the local model is unavailable (google goes through a Node CONNECT tunnel using the system proxy, bypassing anti-bot blocks)
19
+ - **Code artifacts skipped** — file paths, commands, URLs, regexes and pure-code lines are never translated
20
+ - **Sentence-batched translation** — long thinking chains are translated in small sentence batches so local small models keep quality
21
+ - **Streaming output** — translations appear batch by batch while thinking; expand the Think row to compare with the original
22
+ - **Resilient** — host requests retry with backoff (3×), browser-direct fallback, failed results are never cached
23
+
24
+ ## 📦 Installation
17
25
 
18
26
  ```bash
19
- # 方式一:从 GitHub 安装(推荐)
20
- dsh plugin --profile web add https://github.com/<your-name>/dsh-think-translate
21
- # 然后重启 web
27
+ # Option 1: npm (recommended)
28
+ dsh plugin --profile web add dsh-think-translate
29
+ # then restart web
30
+
31
+ # Option 2: GitHub
32
+ dsh plugin --profile web add github:UncleK/dsh-think-translate
22
33
 
23
- # 方式二:手动(junction + patch)
24
- # 1. 链接包到 profile 的 node_modules
34
+ # Option 3: manual (junction + patch)
35
+ # 1. link the package into the profile's node_modules
25
36
  New-Item -ItemType Junction -Path "$HOME\.dsh\profiles\node_modules\dsh-think-translate" `
26
- -Target "<此仓库路径>"
27
- # 2. 在 "$HOME\.dsh\profiles\web\cordis.patch.yml" 加入:
37
+ -Target "<repo path>"
38
+ # 2. add to "$HOME\.dsh\profiles\web\cordis.patch.yml":
28
39
  # - insert:
29
40
  # - id: dsh-think-translate
30
41
  # name: dsh-think-translate
31
- # 3. 重启 web
42
+ # 3. restart web
32
43
  ```
33
44
 
34
- ## 使用
45
+ ## 🚀 Usage
35
46
 
36
- 1. 打开 **设置 → 思考链翻译**
37
- 2. 选择**目标语言**(比如日本語)——设置面板/思考链/任务卡片全部切换为该语言
38
- 3. 选择**首选提供方**:
39
- - **本地部署模型(Ollama)**:首次选择时显示下载按钮(qwen2.5:7b / 14b 或自定义),下载完成后自动启用;模型下拉旁 "+" 可随时下载更多
40
- - **google gtx / bing**:开箱即用(自动走系统代理/VPN)
41
- 4. 发消息让模型思考,展开 Think 行查看译文
47
+ 1. Open **Settings → Think Translation**
48
+ 2. Pick the **target language** (e.g. 日本語) — the settings panel, thinking rows and task cards all switch to it
49
+ 3. Pick the **preferred provider**:
50
+ - **Local model (Ollama)** — on first selection a download prompt appears (qwen2.5:7b / 14b or custom); it auto-enables when finished. The "+" button next to the model picker downloads more models anytime
51
+ - **google gtx / bing** — works out of the box (auto system proxy / VPN)
52
+ 4. Send a message and expand the Think row to see the translation
42
53
 
43
- ## 工作原理
54
+ ## ⚙️ How it works
44
55
 
45
56
  ```
46
- 浏览器 → POST /_xlate/translate(同源,无 CORS)
47
- → host 供应商链(fail-open):
48
- openai 兼容(本地 Ollama,Node fetch 直连回环)
49
- → google gtx(Node https + CONNECT 隧道走系统代理)
50
- → bing(curl form)
51
- → 失败回退浏览器直连
57
+ browser → POST /_xlate/translate (same-origin, no CORS)
58
+ → host provider chain (fail-open):
59
+ openai-compatible (local Ollama, Node fetch to loopback)
60
+ → google gtx (Node https + CONNECT tunnel through system proxy)
61
+ → bing (curl form)
62
+ → browser-direct fallback
52
63
  ```
53
64
 
54
- - **host 半边**(`lib/index.js`):供应商适配器、API Key、缓存(LRU 600)、`/_xlate/models` 模型列表、`/_xlate/model/pull` + `pull-status` 模型下载管理(完成后自动配置启用)
55
- - **client 半边**(`lib/client.js`):8 语言 UI、句子分批翻译、流式 Think 行、localStorage 持久化
56
- - 纯显示层:原文完整保留在会话日志与模型上下文中
65
+ - **Host half** (`lib/index.js`): provider adapters, LRU cache (600), `/_xlate/models` listing, `/_xlate/model/pull` + `pull-status` model download management (auto-configures on completion)
66
+ - **Client half** (`lib/client.js`): 8-language UI, sentence-batched translation, streaming Think rows, localStorage persistence
67
+ - Pure display layer: originals remain in the transcript and model context
57
68
 
58
- ## 开发
69
+ ## 🛠 Development
59
70
 
60
- - 无需构建:`lib/client.js` 是浏览器 bundle(源码即产物),`lib/index.js` 是 host ESM
61
- - 修改 client 后刷新页面即生效;修改 host 后需重启 web
62
- - 更新 8 语言文案:编辑 `lib/client.js` 中的 `UI_TEXT` 字典
71
+ - No build step: `lib/client.js` is the browser bundle (source = artifact), `lib/index.js` is the host ESM
72
+ - Client changes apply on page refresh; host changes need a web restart
73
+ - The 8-language strings live in the `UI_TEXT` dictionary in `lib/client.js`
63
74
 
64
- ## License
75
+ ## 📄 License
65
76
 
66
77
  MIT
package/README.ru.md ADDED
@@ -0,0 +1,77 @@
1
+ # 🐋 dsh-think-translate
2
+
3
+ **Языки:** [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)
4
+
5
+ ---
6
+
7
+ Перевод на уровне отображения для веб-интерфейса [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness): **цепочка размышлений (строка Think), карточки задач и текст ответа** отображаются на выбранном целевом языке, а оригиналы полностью сохраняются в истории.
8
+
9
+ [![npm version](https://img.shields.io/npm/v/dsh-think-translate?color=4D6BFE&label=npm)](https://www.npmjs.com/package/dsh-think-translate)
10
+ [![license](https://img.shields.io/npm/l/dsh-think-translate?color=4D6BFE)](LICENSE)
11
+ [![dsh](https://img.shields.io/badge/powered_by-dsh-4D6BFE?style=flat-square&logo=deepseek&logoColor=white)](https://github.com/deepseek-ai/deepseek-harness)
12
+
13
+ ## ✨ Возможности
14
+
15
+ - **8 целевых языков** — 中文 / English / 日本語 / 한국어 / Español / Français / Deutsch / Русский
16
+ - **Одноязычный интерфейс** — панель настроек, строки размышлений и карточки задач следуют целевому языку (без смешения zh/en); выбор сохраняется
17
+ - **Локальная модель в приоритете** — использует вашу локальную модель Ollama (qwen и др.): приватно, офлайн, бесплатно. При первом выборе **автоматически запускается загрузка** с индикатором прогресса; модель настраивается и активируется по завершении
18
+ - **Запасной вариант Google / Bing** — автоматическое переключение, если локальная модель недоступна (google идёт через Node CONNECT-туннель с системным прокси)
19
+ - **Кодовые артефакты пропускаются** — пути, команды, URL, регулярные выражения и чистые строки кода не переводятся
20
+ - **Пакетный перевод по предложениям** — длинные цепочки переводятся небольшими пакетами, чтобы локальные малые модели сохраняли качество
21
+ - **Потоковый вывод** — переводы появляются пакет за пакетом во время размышления; разверните строку Think для сравнения с оригиналом
22
+ - **Устойчивость** — повторные попытки с backoff (3×), прямой запасной вариант из браузера, неудачи не кэшируются
23
+
24
+ ## 📦 Установка
25
+
26
+ ```bash
27
+ # Способ 1: npm (рекомендуется)
28
+ dsh plugin --profile web add dsh-think-translate
29
+ # затем перезапустите web
30
+
31
+ # Способ 2: GitHub
32
+ dsh plugin --profile web add github:UncleK/dsh-think-translate
33
+
34
+ # Способ 3: вручную (junction + patch)
35
+ # 1. свяжите пакет с node_modules профиля
36
+ New-Item -ItemType Junction -Path "$HOME\.dsh\profiles\node_modules\dsh-think-translate" `
37
+ -Target "<путь к репозиторию>"
38
+ # 2. добавьте в "$HOME\.dsh\profiles\web\cordis.patch.yml":
39
+ # - insert:
40
+ # - id: dsh-think-translate
41
+ # name: dsh-think-translate
42
+ # 3. перезапустите web
43
+ ```
44
+
45
+ ## 🚀 Использование
46
+
47
+ 1. Откройте **Настройки → Перевод цепочки размышлений**
48
+ 2. Выберите **целевой язык** (например, Русский) — панель, строки и карточки переключатся на этот язык
49
+ 3. Выберите **предпочтительного провайдера**:
50
+ - **Локальная модель (Ollama)** — при первом выборе появится кнопка загрузки (qwen2.5:7b / 14b или своя); активируется автоматически по завершении. Кнопка "+" рядом с выбором скачивает другие модели
51
+ - **google gtx / bing** — работает сразу (автоматический системный прокси / VPN)
52
+ 4. Отправьте сообщение и разверните строку Think, чтобы увидеть перевод
53
+
54
+ ## ⚙️ Как это работает
55
+
56
+ ```
57
+ браузер → POST /_xlate/translate (тот же источник, без CORS)
58
+ → цепочка провайдеров host (fail-open):
59
+ совместимо с OpenAI (локальная Ollama, Node fetch к loopback)
60
+ → google gtx (Node https + CONNECT-туннель через системный прокси)
61
+ → bing (curl form)
62
+ → прямой запасной вариант из браузера
63
+ ```
64
+
65
+ - **Host-часть** (`lib/index.js`): адаптеры провайдеров, LRU-кэш (600), `/_xlate/models`, `/_xlate/model/pull` + `pull-status` (автонастройка по завершении)
66
+ - **Client-часть** (`lib/client.js`): интерфейс на 8 языках, пакетный перевод, потоковые строки Think, localStorage
67
+ - Чистый слой отображения: оригиналы остаются в истории и контексте модели
68
+
69
+ ## 🛠 Разработка
70
+
71
+ - Без сборки: `lib/client.js` — это браузерный бандл (исходник = артефакт); `lib/index.js` — host ESM
72
+ - Изменения клиента применяются при обновлении страницы; изменения host требуют перезапуска web
73
+ - Строки на 8 языках находятся в словаре `UI_TEXT` в `lib/client.js`
74
+
75
+ ## 📄 Лицензия
76
+
77
+ MIT
@@ -0,0 +1,77 @@
1
+ # 🐋 dsh-think-translate
2
+
3
+ **语言:** [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)
4
+
5
+ ---
6
+
7
+ 为 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) Web UI 提供**显示层翻译**:把界面上的**思考链(Think 行)、任务卡片、回答正文**翻译为你选择的目标语言,原文完整保留在会话记录中。
8
+
9
+ [![npm version](https://img.shields.io/npm/v/dsh-think-translate?color=4D6BFE&label=npm)](https://www.npmjs.com/package/dsh-think-translate)
10
+ [![license](https://img.shields.io/npm/l/dsh-think-translate?color=4D6BFE)](LICENSE)
11
+ [![dsh](https://img.shields.io/badge/powered_by-dsh-4D6BFE?style=flat-square&logo=deepseek&logoColor=white)](https://github.com/deepseek-ai/deepseek-harness)
12
+
13
+ ## ✨ 特性
14
+
15
+ - **8 种目标语言** — 中文 / English / 日本語 / 한국어 / Español / Français / Deutsch / Русский
16
+ - **单一语言界面** — 设置面板、思考行、任务卡片全部跟随目标语言(不混中英),选择持久化
17
+ - **本地模型为主力** — 优先使用本地 Ollama 模型(qwen 等),隐私离线免费;首次选择本地模型时**自动触发下载**(实时进度条),完成后自动配置启用
18
+ - **Google / Bing 兜底** — 本地模型不可用时自动切换(google 通过 Node CONNECT 隧道走系统代理,绕过反爬)
19
+ - **代码工件自动跳过** — 文件路径、命令、URL、正则、纯代码行不翻译
20
+ - **句子分批翻译** — 长思考链按句子分批串行翻译,本地小模型也能保持质量
21
+ - **流式输出** — 思考过程中译文逐批出现,展开 Think 行可对照原文
22
+ - **失败韧性** — host 请求 3 次退避重试 + 浏览器直连兜底,失败结果不缓存
23
+
24
+ ## 📦 安装
25
+
26
+ ```bash
27
+ # 方式一:npm(推荐)
28
+ dsh plugin --profile web add dsh-think-translate
29
+ # 然后重启 web
30
+
31
+ # 方式二:GitHub
32
+ dsh plugin --profile web add github:UncleK/dsh-think-translate
33
+
34
+ # 方式三:手动(junction + patch)
35
+ # 1. 链接包到 profile 的 node_modules
36
+ New-Item -ItemType Junction -Path "$HOME\.dsh\profiles\node_modules\dsh-think-translate" `
37
+ -Target "<仓库路径>"
38
+ # 2. 在 "$HOME\.dsh\profiles\web\cordis.patch.yml" 加入:
39
+ # - insert:
40
+ # - id: dsh-think-translate
41
+ # name: dsh-think-translate
42
+ # 3. 重启 web
43
+ ```
44
+
45
+ ## 🚀 使用
46
+
47
+ 1. 打开 **设置 → 思考链翻译**
48
+ 2. 选择**目标语言**(比如日本語)——设置面板、思考行、任务卡片全部切换为该语言
49
+ 3. 选择**首选提供方**:
50
+ - **本地部署模型(Ollama)**:首次选择时显示下载按钮(qwen2.5:7b / 14b 或自定义),下载完成后自动启用;模型下拉旁 "+" 可随时下载更多
51
+ - **google gtx / bing**:开箱即用(自动走系统代理/VPN)
52
+ 4. 发消息让模型思考,展开 Think 行查看译文
53
+
54
+ ## ⚙️ 工作原理
55
+
56
+ ```
57
+ 浏览器 → POST /_xlate/translate(同源,无 CORS)
58
+ → host 供应商链(fail-open):
59
+ openai 兼容(本地 Ollama,Node fetch 直连回环)
60
+ → google gtx(Node https + CONNECT 隧道走系统代理)
61
+ → bing(curl form)
62
+ → 失败回退浏览器直连
63
+ ```
64
+
65
+ - **host 半边**(`lib/index.js`):供应商适配器、LRU 缓存(600)、`/_xlate/models` 模型列表、`/_xlate/model/pull` + `pull-status` 模型下载管理(完成后自动配置启用)
66
+ - **client 半边**(`lib/client.js`):8 语言 UI、句子分批翻译、流式 Think 行、localStorage 持久化
67
+ - 纯显示层:原文完整保留在会话日志与模型上下文中
68
+
69
+ ## 🛠 开发
70
+
71
+ - 无需构建:`lib/client.js` 是浏览器 bundle(源码即产物),`lib/index.js` 是 host ESM
72
+ - 修改 client 后刷新页面即生效;修改 host 后需重启 web
73
+ - 8 语言文案在 `lib/client.js` 的 `UI_TEXT` 字典中
74
+
75
+ ## 📄 License
76
+
77
+ MIT
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-think-translate",
3
3
  "description": "Display-layer translation for the DSH web app: thinking chain, task cards, and optional answer text, in 8 target languages (local Ollama / Google / Bing, fail-open)",
4
- "version": "1.0.0",
4
+ "version": "1.0.1",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
7
7
  "exports": {