dsh-think-translate 1.1.0 → 1.2.0
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 +19 -12
- package/README.es.md +18 -11
- package/README.fr.md +18 -11
- package/README.ja.md +18 -11
- package/README.ko.md +18 -11
- package/README.md +11 -11
- package/README.ru.md +19 -12
- package/README.zh-CN.md +18 -11
- package/demo/demo.gif +0 -0
- package/demo/demo2.gif +0 -0
- package/lib/client.js +878 -458
- package/lib/index.js +126 -28
- package/package.json +70 -52
package/README.de.md
CHANGED
|
@@ -8,8 +8,7 @@
|
|
|
8
8
|
[](LICENSE)
|
|
9
9
|
[](https://github.com/deepseek-ai/deepseek-harness)
|
|
10
10
|
|
|
11
|
-
<img src="demo/demo.gif" width="46%" alt="dsh-think-translate demo" style="border:1px solid #4D6BFE;border-radius:8px;margin:4px" />
|
|
12
|
-
<img src="demo/demo2.gif" width="46%" alt="dsh-think-translate demo 2" style="border:1px solid #4D6BFE;border-radius:8px;margin:4px" />
|
|
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" /> <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" />
|
|
13
12
|
|
|
14
13
|
</div>
|
|
15
14
|
|
|
@@ -21,6 +20,7 @@
|
|
|
21
20
|
|
|
22
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.
|
|
23
22
|
|
|
23
|
+
- **🕵️ Jede Gedankenkette lesbar** — Reasoning, Gedankenkette, Aufgabenkarten und Antworten in Echtzeit übersetzt, in Stapeln gestreamt
|
|
24
24
|
- **8 Zielsprachen** — 中文 / English / 日本語 / 한국어 / Español / Français / Deutsch / Русский
|
|
25
25
|
- **Einsprachige Oberfläche** — Einstellungsbereich, Denkzeilen und Aufgabenkarten folgen der Zielsprache (kein zh/en-Gemisch); die Auswahl bleibt erhalten
|
|
26
26
|
- **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
|
|
@@ -30,8 +30,11 @@ Modelle der DeepSeek-Familie denken oft auf Chinesisch — oder in der Sprache,
|
|
|
30
30
|
- **Satzweise Batch-Übersetzung** — lange Denkketten werden in kleinen Sätzen übersetzt, damit lokale kleine Modelle Qualität behalten
|
|
31
31
|
- **🧩 Absatz- und satzweise Zerlegung** — lange Denkketten werden an Leerzeilen geteilt (Absatzstruktur bleibt erhalten) und zusätzlich satzweise gebündelt, damit kleine lokale Modelle Qualität behalten
|
|
32
32
|
- **Streaming-Ausgabe** — Übersetzungen erscheinen während des Denkens batchweise; Think-Zeile aufklappen zum Vergleich mit dem Original
|
|
33
|
-
- **Robust** — Host-Anfragen mit Backoff (3×), Browser-Direkt-Fallback, Fehlschläge werden nie gecacht
|
|
34
33
|
- **🎚️ Einstellbarer Übersetzungszeitpunkt** — alles vorübersetzen / alte Ketten lazy laden (Standard) / nur beim Aufklappen
|
|
34
|
+
- **🔗 Dynamische Anbieter-Kette** — die Listenreihenfolge ist die Ausführungsreihenfolge: ziehen zum Sortieren, jede Zeile einzeln ein-/ausschalten. Integriert google gtx / bing / lokales Ollama plus beliebige eigene Endpunkte
|
|
35
|
+
- **🔌 Eigene Anbieter (OpenAI & Anthropic)** — im Panel jeden OpenAI-kompatiblen Endpunkt (`/v1/chat/completions`) oder die **Anthropic Messages API** (Claude) hinzufügen: Typ, Vorlage, Basis-URL, API-Schlüssel, Modell
|
|
36
|
+
- **🪄 DSH-konfigurierte Anbieter übernehmen** — liest schreibgeschützte DSH-Zeilen aus `settings.yaml` (`llm-pi-ai.providers`); eine Schaltfläche liest neu ein und fügt alle der Kette hinzu. Der Schlüssel wird pro Anfrage aus `.credentials.yaml` aufgelöst und nie in der Plugin-Konfiguration gespeichert
|
|
37
|
+
- **⏱️ Robust** — 3 Wiederholungen mit Backoff + direkter Browser-Fallback, Test-Schaltfläche pro Zeile, Fehlschläge werden nie zwischengespeichert
|
|
35
38
|
|
|
36
39
|
## 📦 Installation
|
|
37
40
|
|
|
@@ -68,22 +71,26 @@ Am Plugin ist nichts zu konfigurieren: Es deklariert keine Reihenfolge-Abhängig
|
|
|
68
71
|
|
|
69
72
|
1. **Einstellungen → Übersetzung der Gedankenkette** öffnen
|
|
70
73
|
2. Die **Zielsprache** wählen (z. B. Deutsch) — Einstellungen, Denkzeilen und Karten wechseln in diese Sprache
|
|
71
|
-
3.
|
|
72
|
-
- **
|
|
73
|
-
- **
|
|
74
|
+
3. Die **Anbieterkette** verwalten (ziehen zum Sortieren, ankreuzen zum Aktivieren):
|
|
75
|
+
- Integriert: **google gtx / bing** (kostenlos, sofort nutzbar, Systemproxy) und **lokales Modell (Ollama)** (bei der ersten Auswahl werden 7b/14b oder ein eigenes Modell geladen)
|
|
76
|
+
- **DSH-Anbieter**: in `settings.yaml` konfigurierte Endpunkte erscheinen automatisch (schreibgeschützt; ankreuzen fügt sie der Kette hinzu). Die Schaltfläche **Aus DSH-Konfiguration übernehmen** direkt unter der Liste liest die Konfiguration neu ein und fügt alle auf einmal hinzu – keine baseURL und kein Schlüssel zum Neutippen, denn der Schlüssel wird aus den DSH-Credentials aufgelöst
|
|
77
|
+
- Der Schlüssel wird eingetippt oder kommt als **`apiKeyEnv`** aus einer Vorlage bzw. einer DSH-Zeile: diese Zeile zeigt das `env:NAME`-Abzeichen, und der Schlüssel wird pro Anfrage aufgelöst und nie in `config.json` geschrieben. Das Bearbeitungsformular hat kein Feld für die Umgebungsvariable (der Wert bleibt erhalten), aber ein geleertes Feld wird wirklich gelöscht (als explizite Löschung gesendet)
|
|
78
|
+
- Abgewählte Anbieter werden übersprungen. Details stehen in [README.md](README.md)
|
|
74
79
|
4. Nachricht senden und die Think-Zeile aufklappen, um die Übersetzung zu sehen
|
|
75
80
|
|
|
76
81
|
## ⚙️ Funktionsweise
|
|
77
82
|
|
|
78
83
|
```
|
|
79
|
-
Browser → POST /_xlate/translate (
|
|
80
|
-
→
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
→ Browser-
|
|
84
|
+
Browser → POST /_xlate/translate (gleiche Origin, kein CORS)
|
|
85
|
+
→ Anbieterkette im Host (fail-open, umsortierbar):
|
|
86
|
+
chain: [provider1, provider2, ...] ← Reihenfolge per Drag in den Einstellungen
|
|
87
|
+
google / bing / OpenAI-kompatibel / Anthropic
|
|
88
|
+
Fallback-Kette (optional, standardmäßig aus, in der Config aktivierbar)
|
|
89
|
+
→ direkter Browser-Fallback
|
|
85
90
|
```
|
|
86
91
|
|
|
92
|
+
- 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
|
|
93
|
+
- Die **DSH-Erkennung** liest beim Laden `settings.yaml` (`llm-pi-ai.providers`) und `.credentials.yaml` (`refs`) des Harness; erkannte Anbieter tragen `source: "dsh"`, aufgelöste Schlüssel bleiben im Speicher (nie in `config.json`), und die Route `/_xlate/dsh-scan` liest sie bei Bedarf neu ein
|
|
87
94
|
- **Host-Hälfte** (`lib/index.js`): Anbieteradapter, LRU-Cache (600), `/_xlate/models`, `/_xlate/model/pull` + `pull-status` (automatische Konfiguration am Ende)
|
|
88
95
|
- **Client-Hälfte** (`lib/client.js`): 8-sprachige UI, satzweise Batch-Übersetzung, Streaming-Think-Zeilen, localStorage-Persistenz
|
|
89
96
|
- Reine Anzeigeschicht: Originale bleiben im Verlauf und im Modellkontext erhalten
|
package/README.es.md
CHANGED
|
@@ -8,8 +8,7 @@
|
|
|
8
8
|
[](LICENSE)
|
|
9
9
|
[](https://github.com/deepseek-ai/deepseek-harness)
|
|
10
10
|
|
|
11
|
-
<img src="demo/demo.gif" width="46%" alt="dsh-think-translate demo" style="border:1px solid #4D6BFE;border-radius:8px;margin:4px" />
|
|
12
|
-
<img src="demo/demo2.gif" width="46%" alt="dsh-think-translate demo 2" style="border:1px solid #4D6BFE;border-radius:8px;margin:4px" />
|
|
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" /> <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" />
|
|
13
12
|
|
|
14
13
|
</div>
|
|
15
14
|
|
|
@@ -21,6 +20,7 @@ Traducción en la capa de visualización para la interfaz web de [DeepSeek Harne
|
|
|
21
20
|
|
|
22
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.
|
|
23
22
|
|
|
23
|
+
- **🕵️ Lee cualquier cadena de pensamiento** — razonamiento, cadena de pensamiento, tarjetas de tareas y respuestas traducidos en tiempo real, por lotes
|
|
24
24
|
- **8 idiomas de destino** — 中文 / English / 日本語 / 한국어 / Español / Français / Deutsch / Русский
|
|
25
25
|
- **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
|
|
26
26
|
- **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
|
|
@@ -30,8 +30,11 @@ Los modelos de la familia DeepSeek suelen razonar en chino — o en el idioma en
|
|
|
30
30
|
- **Traducción por lotes de frases** — las cadenas largas se traducen en lotes pequeños para mantener la calidad en modelos locales pequeños
|
|
31
31
|
- **🧩 Fragmentación por párrafos y frases** — las cadenas largas se dividen por líneas en blanco (se conserva la estructura de párrafos) y luego por frases, para que un modelo local pequeño mantenga la calidad
|
|
32
32
|
- **Salida en streaming** — las traducciones aparecen lote a lote mientras piensa; expande la fila Think para comparar con el original
|
|
33
|
-
- **Resistente** — reintentos con backoff (3×), respaldo directo del navegador, los fallos nunca se cachean
|
|
34
33
|
- **🎚️ Momento de traducción ajustable** — pre-traducir todo / carga diferida de cadenas antiguas (por defecto) / solo al expandir
|
|
34
|
+
- **🔗 Cadena de proveedores dinámica** — el orden de la lista es el orden de uso: arrastra para reordenar y activa o desactiva cada fila. Integrados google gtx / bing / Ollama local más cualquier endpoint personalizado
|
|
35
|
+
- **🔌 Proveedores personalizados (OpenAI y Anthropic)** — añade desde el panel cualquier endpoint compatible con OpenAI (`/v1/chat/completions`) o la **Anthropic Messages API** (Claude): tipo, preajuste, URL base, clave de API y modelo
|
|
36
|
+
- **🪄 Hereda los proveedores configurados en DSH** — detecta filas DSH de solo lectura desde `settings.yaml` (`llm-pi-ai.providers`) y un botón reescanea y las añade todas a la cadena; la clave se resuelve en cada petición desde `.credentials.yaml` y nunca se guarda en la config del plugin
|
|
37
|
+
- **⏱️ Resistente** — 3 reintentos con backoff + respaldo directo del navegador, botón de prueba por fila, los fallos nunca se almacenan en caché
|
|
35
38
|
|
|
36
39
|
## 📦 Instalación
|
|
37
40
|
|
|
@@ -68,22 +71,26 @@ No hay nada que configurar en el plugin: no declara dependencia de orden con los
|
|
|
68
71
|
|
|
69
72
|
1. Abre **Ajustes → Traducción de cadena de pensamiento**
|
|
70
73
|
2. Elige el **idioma de destino** (p. ej. Español) — el panel, las filas y las tarjetas cambian a ese idioma
|
|
71
|
-
3.
|
|
72
|
-
- **
|
|
73
|
-
- **
|
|
74
|
+
3. Gestiona la **cadena de proveedores** (arrastra para ordenar, marca para activar):
|
|
75
|
+
- Integrados: **google gtx / bing** (gratis, listos para usar, proxy del sistema) y **modelo local (Ollama)** (al elegirlo por primera vez se descarga 7b/14b o uno personalizado)
|
|
76
|
+
- **Proveedores DSH**: los endpoints ya configurados en `settings.yaml` aparecen solos (solo lectura; márcalos para añadirlos a la cadena). El botón **Importar desde la config de DSH**, justo debajo de la lista, vuelve a escanear y los añade todos de una vez: ni baseURL ni clave que reescribir, porque la clave se resuelve desde las credenciales de DSH
|
|
77
|
+
- La clave se escribe a mano o llega como **`apiKeyEnv`** desde un preajuste o una fila DSH: esa fila muestra la insignia `env:NAME`, y la clave se resuelve en cada petición sin escribirse nunca en `config.json`. El formulario de edición no tiene campo de variable de entorno (el valor se conserva intacto), pero vaciar un campo lo elimina de verdad (se envía como borrado explícito)
|
|
78
|
+
- Si desmarcas uno, se omite. Los detalles están en [README.md](README.md)
|
|
74
79
|
4. Envía un mensaje y expande la fila Think para ver la traducción
|
|
75
80
|
|
|
76
81
|
## ⚙️ Cómo funciona
|
|
77
82
|
|
|
78
83
|
```
|
|
79
84
|
navegador → POST /_xlate/translate (mismo origen, sin CORS)
|
|
80
|
-
→ cadena de proveedores host (fail-open):
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
→ respaldo directo
|
|
85
|
+
→ cadena de proveedores en el host (fail-open, reordenable):
|
|
86
|
+
chain: [provider1, provider2, ...] ← orden arrastrando en Ajustes
|
|
87
|
+
google / bing / compatible con OpenAI / Anthropic
|
|
88
|
+
cadena fallback (opcional, desactivada por defecto, se activa en el config)
|
|
89
|
+
→ respaldo directo desde el navegador
|
|
85
90
|
```
|
|
86
91
|
|
|
92
|
+
- 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
|
|
93
|
+
- El **descubrimiento DSH** lee `settings.yaml` (`llm-pi-ai.providers`) y `.credentials.yaml` (`refs`) del harness al cargar; los proveedores detectados se marcan con `source: "dsh"`, las claves resueltas se quedan en memoria (nunca en `config.json`) y la ruta `/_xlate/dsh-scan` los relee cuando hace falta
|
|
87
94
|
- **Mitad host** (`lib/index.js`): adaptadores de proveedor, caché LRU (600), `/_xlate/models`, `/_xlate/model/pull` + `pull-status` (configura automáticamente al terminar)
|
|
88
95
|
- **Mitad cliente** (`lib/client.js`): UI en 8 idiomas, traducción por lotes, filas Think en streaming, persistencia en localStorage
|
|
89
96
|
- Capa de visualización pura: los originales permanecen en la transcripción y el contexto del modelo
|
package/README.fr.md
CHANGED
|
@@ -8,8 +8,7 @@
|
|
|
8
8
|
[](LICENSE)
|
|
9
9
|
[](https://github.com/deepseek-ai/deepseek-harness)
|
|
10
10
|
|
|
11
|
-
<img src="demo/demo.gif" width="46%" alt="dsh-think-translate demo" style="border:1px solid #4D6BFE;border-radius:8px;margin:4px" />
|
|
12
|
-
<img src="demo/demo2.gif" width="46%" alt="dsh-think-translate demo 2" style="border:1px solid #4D6BFE;border-radius:8px;margin:4px" />
|
|
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" /> <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" />
|
|
13
12
|
|
|
14
13
|
</div>
|
|
15
14
|
|
|
@@ -21,6 +20,7 @@ Traduction au niveau de l'affichage pour l'interface web de [DeepSeek Harness](h
|
|
|
21
20
|
|
|
22
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.
|
|
23
22
|
|
|
23
|
+
- **🕵️ 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
24
|
- **8 langues cibles** — 中文 / English / 日本語 / 한국어 / Español / Français / Deutsch / Русский
|
|
25
25
|
- **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
|
|
26
26
|
- **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
|
|
@@ -30,8 +30,11 @@ Les modèles de la famille DeepSeek raisonnent souvent en chinois — ou dans la
|
|
|
30
30
|
- **Traduction par lots de phrases** — les chaînes longues sont traduites en petits lots pour garder la qualité sur les petits modèles locaux
|
|
31
31
|
- **🧩 Découpage par paragraphes et phrases** — les longues chaînes sont découpées sur les lignes vides (structure de paragraphes préservée) puis par phrases, pour garder la qualité sur un petit modèle local
|
|
32
32
|
- **Sortie en streaming** — les traductions apparaissent lot par lot pendant la réflexion ; dépliez la ligne Think pour comparer avec l'original
|
|
33
|
-
- **Résilient** — nouvelles tentatives avec backoff (3×), repli direct navigateur, échecs jamais mis en cache
|
|
34
33
|
- **🎚️ Moment de traduction réglable** — tout pré-traduire / chargement différé des anciennes chaînes (défaut) / uniquement à l'ouverture
|
|
34
|
+
- **🔗 Chaîne de fournisseurs dynamique** — l'ordre de la liste est l'ordre d'exécution : glissez pour réordonner, activez ou désactivez chaque ligne. Intégrés google gtx / bing / Ollama local, plus tout endpoint personnalisé
|
|
35
|
+
- **🔌 Fournisseurs personnalisés (OpenAI et Anthropic)** — ajoutez depuis le panneau tout endpoint compatible OpenAI (`/v1/chat/completions`) ou l'**Anthropic Messages API** (Claude) : type, préréglage, URL de base, clé API et modèle
|
|
36
|
+
- **🪄 Hérite des fournisseurs configurés dans DSH** — détecte les lignes DSH en lecture seule depuis `settings.yaml` (`llm-pi-ai.providers`), et un bouton relance l'analyse et les ajoute toutes à la chaîne ; la clé est résolue à chaque requête depuis `.credentials.yaml` et n'est jamais écrite dans la config du plugin
|
|
37
|
+
- **⏱️ Résilient** — 3 tentatives avec backoff + secours direct du navigateur, bouton de test par ligne, les échecs ne sont jamais mis en cache
|
|
35
38
|
|
|
36
39
|
## 📦 Installation
|
|
37
40
|
|
|
@@ -68,22 +71,26 @@ Rien à configurer côté plugin : il ne déclare aucune dépendance d'ordre vis
|
|
|
68
71
|
|
|
69
72
|
1. Ouvrez **Réglages → Traduction de chaîne de réflexion**
|
|
70
73
|
2. Choisissez la **langue cible** (p. ex. Français) — le panneau, les lignes et les cartes basculent dans cette langue
|
|
71
|
-
3.
|
|
72
|
-
-
|
|
73
|
-
- **
|
|
74
|
+
3. Gérez la **chaîne de fournisseurs** (glisser pour ordonner, cocher pour activer) :
|
|
75
|
+
- Intégrés : **google gtx / bing** (gratuits, prêts à l'emploi, proxy système) et **modèle local (Ollama)** (au premier choix, téléchargement de 7b/14b ou d'un modèle personnalisé)
|
|
76
|
+
- **Fournisseurs DSH** : les endpoints déjà configurés dans `settings.yaml` apparaissent seuls (lecture seule ; cochez pour les ajouter à la chaîne). Le bouton **Importer depuis la config DSH**, juste sous la liste, relance l'analyse et les ajoute tous d'un coup : ni baseURL ni clé à ressaisir, la clé étant résolue depuis les identifiants de DSH
|
|
77
|
+
- La clé se saisit à la main ou arrive via **`apiKeyEnv`** depuis un préréglage ou une ligne DSH : cette ligne affiche le badge `env:NAME`, et la clé est résolue à chaque requête sans jamais être écrite dans `config.json`. Le formulaire d'édition n'a pas de champ de variable d'environnement (la valeur est conservée telle quelle), mais vider un champ le supprime réellement (envoyé comme suppression explicite)
|
|
78
|
+
- Décocher un fournisseur l'ignore. Détails dans [README.md](README.md)
|
|
74
79
|
4. Envoyez un message et dépliez la ligne Think pour voir la traduction
|
|
75
80
|
|
|
76
81
|
## ⚙️ Fonctionnement
|
|
77
82
|
|
|
78
83
|
```
|
|
79
84
|
navigateur → POST /_xlate/translate (même origine, sans CORS)
|
|
80
|
-
→ chaîne de fournisseurs host (fail-open) :
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
→ repli direct navigateur
|
|
85
|
+
→ chaîne de fournisseurs côté host (fail-open, réordonnable) :
|
|
86
|
+
chain: [provider1, provider2, ...] ← ordre par glisser dans les Réglages
|
|
87
|
+
google / bing / compatible OpenAI / Anthropic
|
|
88
|
+
chaîne fallback (facultative, désactivée par défaut, activable dans la config)
|
|
89
|
+
→ repli direct depuis le navigateur
|
|
85
90
|
```
|
|
86
91
|
|
|
92
|
+
- 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
|
|
93
|
+
- La **découverte DSH** lit `settings.yaml` (`llm-pi-ai.providers`) et `.credentials.yaml` (`refs`) du harness au chargement ; les fournisseurs détectés portent `source: "dsh"`, les clés résolues restent en mémoire (jamais dans `config.json`), et la route `/_xlate/dsh-scan` les relit à la demande
|
|
87
94
|
- **Moitié host** (`lib/index.js`) : adaptateurs de fournisseurs, cache LRU (600), `/_xlate/models`, `/_xlate/model/pull` + `pull-status` (configuration automatique à la fin)
|
|
88
95
|
- **Moitié client** (`lib/client.js`) : UI en 8 langues, traduction par lots, lignes Think en streaming, persistance localStorage
|
|
89
96
|
- Couche d'affichage pure : les originaux restent dans la transcription et le contexte du modèle
|
package/README.ja.md
CHANGED
|
@@ -8,8 +8,7 @@
|
|
|
8
8
|
[](LICENSE)
|
|
9
9
|
[](https://github.com/deepseek-ai/deepseek-harness)
|
|
10
10
|
|
|
11
|
-
<img src="demo/demo.gif" width="46%" alt="dsh-think-translate demo" style="border:1px solid #4D6BFE;border-radius:8px;margin:4px" />
|
|
12
|
-
<img src="demo/demo2.gif" width="46%" alt="dsh-think-translate demo 2" style="border:1px solid #4D6BFE;border-radius:8px;margin:4px" />
|
|
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" /> <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" />
|
|
13
12
|
|
|
14
13
|
</div>
|
|
15
14
|
|
|
@@ -21,6 +20,7 @@
|
|
|
21
20
|
|
|
22
21
|
DeepSeek 系モデルは中国語で考えることが多く、あるいはたまたま思考に使う言語で考えます。dsh-think-translate は、モデルの思考に字幕を付けるように、Think 行・タスクカード・回答を*あなたの*言語でリアルタイム表示します。
|
|
23
22
|
|
|
23
|
+
- **🕵️ どんな思考チェーンも読める** — 推論・思考チェーン・タスクカード・回答をリアルタイムに翻訳し、バッチ単位でストリーミング表示
|
|
24
24
|
- **8 つの対象言語** — 中文 / English / 日本語 / 한국어 / Español / Français / Deutsch / Русский
|
|
25
25
|
- **単一言語 UI** — 設定パネル・思考行・タスクカードがすべて対象言語に追従(中英混在なし)、選択は永続化
|
|
26
26
|
- **ローカルモデル優先** — ローカル Ollama モデル(qwen など)を優先:プライベート・オフライン・無料。初回選択時に**自動ダウンロード**(リアルタイム進捗バー)、完了後自動で設定・有効化
|
|
@@ -30,8 +30,11 @@ DeepSeek 系モデルは中国語で考えることが多く、あるいはた
|
|
|
30
30
|
- **文単位バッチ翻訳** — 長い思考チェーンを短文バッチで逐次翻訳し、ローカル小モデルでも品質を維持
|
|
31
31
|
- **🧩 段落・文単位のチャンク分割** — 長い思考チェーンを空行で分割(段落構造を保持)し、さらに文単位でバッチ化。ローカル小モデルでも品質を維持
|
|
32
32
|
- **ストリーミング出力** — 思考中に訳文がバッチ単位で表示され、Think 行を開いて原文と比較可能
|
|
33
|
-
- **耐障害性** — host リクエストはバックオフ付き 3 回リトライ、ブラウザ直接フォールバック、失敗結果はキャッシュしない
|
|
34
33
|
- **🎚️ 翻訳タイミングを調整可能** — すべて事前翻訳 / 履歴を遅延ロード(既定)/ 展開時のみ翻訳
|
|
34
|
+
- **🔗 動的プロバイダーチェーン** — 一覧の順序がそのまま実行順。ドラッグで並べ替え、行ごとにオン/オフ。組み込みの google gtx / bing / ローカル Ollama に加えて任意のカスタム端点
|
|
35
|
+
- **🔌 カスタムプロバイダー(OpenAI / Anthropic)** — 設定パネルから任意の OpenAI 互換端点(`/v1/chat/completions`)や **Anthropic Messages API**(Claude)を追加:種類・プリセット・ベース URL・API キー・モデル
|
|
36
|
+
- **🪄 DSH 設定のプロバイダーを引き継ぐ** — `settings.yaml`(`llm-pi-ai.providers`)から読み取り専用の DSH 行を自動検出し、ボタン1つで再スキャンしてまとめてチェーンに追加。キーは `.credentials.yaml` からリクエスト時に解決され、プラグインの設定には保存されません
|
|
37
|
+
- **⏱️ 失敗に強い** — host は3回バックオフ再試行 + ブラウザ直接フォールバック、行ごとのテストボタン、失敗結果はキャッシュしない
|
|
35
38
|
|
|
36
39
|
## 📦 インストール
|
|
37
40
|
|
|
@@ -68,22 +71,26 @@ New-Item -ItemType Junction -Path "$HOME\.dsh\profiles\node_modules\dsh-think-tr
|
|
|
68
71
|
|
|
69
72
|
1. **設定 → 思考チェーン翻訳** を開く
|
|
70
73
|
2. **対象言語**を選択(例:日本語)— 設定パネル・思考行・タスクカードがすべてその言語に切替
|
|
71
|
-
3.
|
|
72
|
-
-
|
|
73
|
-
- **
|
|
74
|
+
3. **プロバイダーチェーン**を管理(ドラッグで並べ替え、チェックで有効化):
|
|
75
|
+
- 組み込み:**google gtx / bing**(無料・すぐ使える・システムプロキシ経由)と**ローカルモデル(Ollama)**(初回選択で 7b/14b または任意のモデルをダウンロード)
|
|
76
|
+
- **DSH プロバイダー**:`settings.yaml` に設定済みのエンドポイントが自動表示(読み取り専用、チェックでチェーンに追加)。リスト下の **DSH の設定から取り込む** は再スキャンしてまとめて追加します(baseURL もキーも入力不要。キーは DSH 側の資格情報から解決されます)
|
|
77
|
+
- キーは直接入力するほか、プリセットや DSH 行が持つ **`apiKeyEnv`** でも指定できます。その行には `env:NAME` バッジが付き、キーはリクエスト時に解決されて `config.json` には保存されません。編集フォームに環境変数の入力欄はありません(値はそのまま保持されます)が、フィールドを空にすると本当に削除されます(明示的な削除として送信)
|
|
78
|
+
- チェックを外すとそのプロバイダーは使われません。詳細は [README.md](README.md)
|
|
74
79
|
4. メッセージを送信し、Think 行を展開して訳文を確認
|
|
75
80
|
|
|
76
81
|
## ⚙️ 仕組み
|
|
77
82
|
|
|
78
83
|
```
|
|
79
84
|
ブラウザ → POST /_xlate/translate(同一オリジン、CORS なし)
|
|
80
|
-
→ host プロバイダーチェーン(fail-open
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
→
|
|
85
|
+
→ host プロバイダーチェーン(fail-open、並べ替え可能):
|
|
86
|
+
chain: [provider1, provider2, ...] ← 設定でドラッグして並べ替え
|
|
87
|
+
google / bing / OpenAI 互換 / Anthropic から選択
|
|
88
|
+
fallback チェーン(任意、既定は無効、設定で有効化)
|
|
89
|
+
→ ブラウザ直結のフォールバック
|
|
85
90
|
```
|
|
86
91
|
|
|
92
|
+
- **プロバイダー設定** は `config.json`(実行時生成・gitignore 対象)にあります:`chain`(順序付き ID)、`fallback`(enabled と chain、設定ファイル専用)、`providers`(各項目の `type`/`enabled`/`baseURL`/`apiKey`/`apiKeyEnv`/`model`)。旧 `priority` 形式は自動移行されます。`apiKeyEnv` を宣言した提供元はリクエスト時にその環境変数からキーを解決し(リテラル `apiKey` はフォールバック)、解決したキーを `config.json` に書き戻すことはありません。パッチ内の `null` はそのフィールドの削除を意味し、UI のクリアはこれを使っています
|
|
93
|
+
- **DSH の自動検出** は読み込み時に harness の `settings.yaml`(`llm-pi-ai.providers`)と `.credentials.yaml`(`refs`)を読みます。検出された提供元は `source: "dsh"` が付き、解決済みのキーはメモリ内のみ(`config.json` には書き込まれません)。`/_xlate/dsh-scan` でいつでも再読み込みできます
|
|
87
94
|
- **host 側**(`lib/index.js`):プロバイダーアダプタ、LRU キャッシュ(600)、`/_xlate/models` モデル一覧、`/_xlate/model/pull` + `pull-status` モデルダウンロード管理(完了時自動設定)
|
|
88
95
|
- **client 側**(`lib/client.js`):8 言語 UI、文単位バッチ翻訳、ストリーミング Think 行、localStorage 永続化
|
|
89
96
|
- 純表示層:原文は会話履歴とモデルコンテキストに完全保持
|
package/README.ko.md
CHANGED
|
@@ -8,8 +8,7 @@
|
|
|
8
8
|
[](LICENSE)
|
|
9
9
|
[](https://github.com/deepseek-ai/deepseek-harness)
|
|
10
10
|
|
|
11
|
-
<img src="demo/demo.gif" width="46%" alt="dsh-think-translate demo" style="border:1px solid #4D6BFE;border-radius:8px;margin:4px" />
|
|
12
|
-
<img src="demo/demo2.gif" width="46%" alt="dsh-think-translate demo 2" style="border:1px solid #4D6BFE;border-radius:8px;margin:4px" />
|
|
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" /> <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" />
|
|
13
12
|
|
|
14
13
|
</div>
|
|
15
14
|
|
|
@@ -21,6 +20,7 @@
|
|
|
21
20
|
|
|
22
21
|
DeepSeek 계열 모델은 중국어로, 또는 우연히 생각에 쓰는 언어로 추론하는 경우가 많습니다. dsh-think-translate는 모델의 사고에 자막을 다는 것처럼 Think 행·작업 카드·답변을 *여러분의* 언어로 실시간 표시합니다.
|
|
23
22
|
|
|
23
|
+
- **🕵️ 어떤 사고 체인도 읽기** — 추론, 사고 체인, 작업 카드, 답변을 실시간으로 번역해 배치 단위로 스트리밍
|
|
24
24
|
- **8개 대상 언어** — 中文 / English / 日本語 / 한국어 / Español / Français / Deutsch / Русский
|
|
25
25
|
- **단일 언어 UI** — 설정 패널, 사고 행, 작업 카드가 모두 대상 언어를 따름(중·영 혼용 없음), 선택 영구 저장
|
|
26
26
|
- **로컬 모델 우선** — 로컬 Ollama 모델(qwen 등) 우선: 프라이빗·오프라인·무료. 첫 선택 시 **자동 다운로드**(실시간 진행률 표시), 완료 후 자동 설정·활성화
|
|
@@ -30,8 +30,11 @@ DeepSeek 계열 모델은 중국어로, 또는 우연히 생각에 쓰는 언어
|
|
|
30
30
|
- **문장 배치 번역** — 긴 사고 체인을 짧은 문장 배치로 순차 번역하여 로컬 소형 모델도 품질 유지
|
|
31
31
|
- **🧩 문단·문장 인식 분할** — 긴 사고 체인을 빈 줄로 분할(문단 구조 유지)하고 다시 문장 단위로 배치 처리해 로컬 소형 모델도 품질 유지
|
|
32
32
|
- **스트리밍 출력** — 사고 중 번역이 배치 단위로 표시, Think 행을 펼쳐 원문과 비교
|
|
33
|
-
- **내구성** — host 요청 백오프 3회 재시도, 브라우저 직접 폴백, 실패 결과는 캐시하지 않음
|
|
34
33
|
- **🎚️ 번역 시점 조절** — 모두 사전 번역 / 이전 체인 지연 로딩(기본)/ 펼친 체인만 번역
|
|
34
|
+
- **🔗 동적 제공자 체인** — 목록 순서가 곧 실행 순서. 끌어서 정렬하고 행마다 켜고 끄기. 내장 google gtx / bing / 로컬 Ollama에 더해 임의의 사용자 지정 엔드포인트
|
|
35
|
+
- **🔌 사용자 지정 제공자(OpenAI / Anthropic)** — 설정 패널에서 OpenAI 호환 엔드포인트(`/v1/chat/completions`)나 **Anthropic Messages API**(Claude)를 추가: 유형, 프리셋, 베이스 URL, API 키, 모델
|
|
36
|
+
- **🪄 DSH 설정의 제공자 상속** — `settings.yaml`(`llm-pi-ai.providers`)에서 읽기 전용 DSH 행을 자동 발견하고, 버튼 한 번으로 다시 검사해 모두 체인에 추가. 키는 요청 시 `.credentials.yaml`에서 해석되며 플러그인 설정에 저장되지 않음
|
|
37
|
+
- **⏱️ 실패에 강함** — host 3회 백오프 재시도 + 브라우저 직접 폴백, 행별 테스트 버튼, 실패 결과는 캐시하지 않음
|
|
35
38
|
|
|
36
39
|
## 📦 설치
|
|
37
40
|
|
|
@@ -68,22 +71,26 @@ New-Item -ItemType Junction -Path "$HOME\.dsh\profiles\node_modules\dsh-think-tr
|
|
|
68
71
|
|
|
69
72
|
1. **설정 → 사고 체인 번역** 열기
|
|
70
73
|
2. **대상 언어** 선택(예: 한국어) — 설정 패널, 사고 행, 작업 카드가 모두 전환
|
|
71
|
-
3.
|
|
72
|
-
-
|
|
73
|
-
- **
|
|
74
|
+
3. **제공자 체인** 관리(드래그로 순서 변경, 체크로 사용):
|
|
75
|
+
- 내장: **google gtx / bing**(무료, 즉시 사용, 시스템 프록시)과 **로컬 모델(Ollama)**(처음 선택 시 7b/14b 또는 사용자 지정 다운로드)
|
|
76
|
+
- **DSH 제공자**: `settings.yaml`에 설정된 엔드포인트가 자동 표시(읽기 전용, 체크하면 체인에 추가). 목록 아래의 **DSH 설정에서 가져오기**는 다시 검사해 한 번에 모두 추가합니다(baseURL과 키를 다시 입력할 필요가 없고, 키는 DSH 자체 자격 증명에서 해석됩니다)
|
|
77
|
+
- 키는 직접 입력하거나 프리셋·DSH 행이 가진 **`apiKeyEnv`** 로 지정할 수 있습니다. 그런 행에는 `env:NAME` 배지가 붙고 키는 요청 시 해석되며 `config.json`에 저장되지 않습니다. 편집 폼에는 환경 변수 입력란이 없지만(값은 그대로 유지) 필드를 비우면 실제로 삭제됩니다(명시적 삭제로 전송)
|
|
78
|
+
- 체크를 해제하면 해당 제공자는 건너뜁니다. 자세한 내용은 [README.md](README.md)
|
|
74
79
|
4. 메시지를 보내고 Think 행을 펼쳐 번역 확인
|
|
75
80
|
|
|
76
81
|
## ⚙️ 작동 원리
|
|
77
82
|
|
|
78
83
|
```
|
|
79
84
|
브라우저 → POST /_xlate/translate(동일 출처, CORS 없음)
|
|
80
|
-
→ host 제공자 체인(fail-open):
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
→
|
|
85
|
+
→ host 제공자 체인(fail-open, 순서 변경 가능):
|
|
86
|
+
chain: [provider1, provider2, ...] ← 설정에서 드래그로 정렬
|
|
87
|
+
google / bing / OpenAI 호환 / Anthropic 중 선택
|
|
88
|
+
fallback 체인(선택, 기본 비활성, 설정에서 활성화)
|
|
89
|
+
→ 브라우저 직접 연결 폴백
|
|
85
90
|
```
|
|
86
91
|
|
|
92
|
+
- **제공자 설정**은 `config.json`(런타임 생성, gitignore 대상)에 있습니다: `chain`(순서 있는 id), `fallback`(enabled + chain, 설정 파일 전용), `providers`(각 항목의 `type`/`enabled`/`baseURL`/`apiKey`/`apiKeyEnv`/`model`). 예전 `priority` 형식은 자동 마이그레이션됩니다. `apiKeyEnv`를 선언한 제공자는 요청 시 해당 환경 변수에서 키를 해석하며(리터럴 `apiKey`는 폴백), 해석된 키를 `config.json`에 다시 쓰지 않습니다. 패치의 `null`은 해당 필드 삭제를 뜻하며 UI가 그렇게 비웁니다
|
|
93
|
+
- **DSH 자동 발견**은 로드 시 harness의 `settings.yaml`(`llm-pi-ai.providers`)과 `.credentials.yaml`(`refs`)을 읽습니다. 발견된 제공자는 `source: "dsh"`로 표시되고 해석된 키는 메모리에만 남으며(`config.json`에 기록되지 않음), `/_xlate/dsh-scan`으로 필요할 때 다시 읽습니다
|
|
87
94
|
- **host 측**(`lib/index.js`): 제공자 어댑터, LRU 캐시(600), `/_xlate/models` 모델 목록, `/_xlate/model/pull` + `pull-status` 모델 다운로드 관리(완료 시 자동 설정)
|
|
88
95
|
- **client 측**(`lib/client.js`): 8개 언어 UI, 문장 배치 번역, 스트리밍 Think 행, localStorage 영구 저장
|
|
89
96
|
- 순수 표시 계층: 원문은 대화 기록과 모델 컨텍스트에 완전 보존
|
package/README.md
CHANGED
|
@@ -8,8 +8,7 @@
|
|
|
8
8
|
[](LICENSE)
|
|
9
9
|
[](https://github.com/deepseek-ai/deepseek-harness)
|
|
10
10
|
|
|
11
|
-
<img src="demo/demo.gif" width="46%" alt="dsh-think-translate demo" style="border:1px solid #4D6BFE;border-radius:8px;margin:4px" />
|
|
12
|
-
<img src="demo/demo2.gif" width="46%" alt="dsh-think-translate demo 2" style="border:1px solid #4D6BFE;border-radius:8px;margin:4px" />
|
|
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" /> <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" />
|
|
13
12
|
|
|
14
13
|
</div>
|
|
15
14
|
|
|
@@ -23,9 +22,9 @@ DeepSeek-class models often reason in Chinese — or in whatever language they h
|
|
|
23
22
|
|
|
24
23
|
- **🕵️ Read any thinking chain** — reasoning, chain-of-thought, task cards and answers translated in real time, streamed batch by batch
|
|
25
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
|
|
26
|
-
- **🔗 Dynamic provider chain** — order providers by drag-and-drop
|
|
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
|
|
27
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
|
|
28
|
-
- **🪄 DSH provider discovery** — providers already configured in DSH's `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
|
|
27
|
+
- **🪄 DSH provider discovery** — providers already configured in DSH's `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
|
|
29
28
|
- **🔒 Private & offline-first** — local Ollama (qwen2.5:7b / 14b or custom) is a first-class provider: free, unlimited, nothing leaves your machine. First local-model selection **auto-downloads** the model with a live progress bar and enables it when done
|
|
30
29
|
- **🧠 Zero context cost** — pure display layer: the model still sees the original text, and translated text never consumes the context window
|
|
31
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)
|
|
@@ -69,11 +68,12 @@ Nothing to configure on the plugin side: it declares no ordering dependency on D
|
|
|
69
68
|
|
|
70
69
|
1. Open **Settings → Think Translation**
|
|
71
70
|
2. Pick the **target language** (e.g. 日本語) — the settings panel, thinking rows and task cards all switch to it
|
|
72
|
-
3. **Manage the provider chain**
|
|
73
|
-
- Built-ins: **google gtx / bing** (free, works out of the box via system proxy) and **local Ollama** — on first local-model selection a download prompt appears (qwen2.5:7b / 14b or custom); it auto-enables when finished
|
|
74
|
-
- **DSH providers**: endpoints already configured in DSH (`llm-pi-ai.providers`) appear automatically as read-only entries (badge "DSH");
|
|
75
|
-
- **Custom providers**:
|
|
76
|
-
-
|
|
71
|
+
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:
|
|
72
|
+
- Built-ins: **google gtx / bing** (free, works out of the box via system proxy) and **local Ollama** — on first local-model selection a download prompt appears (qwen2.5:7b / 14b or custom); it auto-enables when finished. Built-ins are permanent: uncheck one to stop using it, there is nothing to delete
|
|
73
|
+
- **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
|
|
74
|
+
- **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)
|
|
75
|
+
- 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
|
|
76
|
+
- 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)
|
|
77
77
|
4. Send a message that makes the model think, then expand the **Think row** to read the translation and compare with the original
|
|
78
78
|
|
|
79
79
|
## ⚙️ How it works
|
|
@@ -87,11 +87,11 @@ browser → POST /_xlate/translate (same-origin, no CORS)
|
|
|
87
87
|
bing (ttranslatev3 via curl)
|
|
88
88
|
openai (OpenAI-compatible /chat/completions — Ollama local or any gateway)
|
|
89
89
|
anthropic(Anthropic Messages API /v1/messages)
|
|
90
|
-
fallback chain (
|
|
90
|
+
fallback chain (config-only, off by default) tried when the primary chain fails entirely
|
|
91
91
|
→ browser-direct fallback
|
|
92
92
|
```
|
|
93
93
|
|
|
94
|
-
- **Provider config** lives in `config.json` (runtime, gitignored): `chain` (ordered ids), `fallback` (enabled + chain), `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`.
|
|
94
|
+
- **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.
|
|
95
95
|
- **DSH discovery** reads the harness `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.
|
|
96
96
|
- **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)
|
|
97
97
|
- **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)
|
package/README.ru.md
CHANGED
|
@@ -8,8 +8,7 @@
|
|
|
8
8
|
[](LICENSE)
|
|
9
9
|
[](https://github.com/deepseek-ai/deepseek-harness)
|
|
10
10
|
|
|
11
|
-
<img src="demo/demo.gif" width="46%" alt="dsh-think-translate demo" style="border:1px solid #4D6BFE;border-radius:8px;margin:4px" />
|
|
12
|
-
<img src="demo/demo2.gif" width="46%" alt="dsh-think-translate demo 2" style="border:1px solid #4D6BFE;border-radius:8px;margin:4px" />
|
|
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" /> <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" />
|
|
13
12
|
|
|
14
13
|
</div>
|
|
15
14
|
|
|
@@ -21,6 +20,7 @@
|
|
|
21
20
|
|
|
22
21
|
Модели семейства DeepSeek часто рассуждают на китайском — или на том языке, на котором им случилось думать. dsh-think-translate показывает строку Think, карточки задач и ответ на *вашем* языке в реальном времени — как субтитры к размышлениям модели.
|
|
23
22
|
|
|
23
|
+
- **🕵️ Читайте любую цепочку рассуждений** — рассуждения, цепочка мыслей, карточки задач и ответы переводятся в реальном времени, потоком по батчам
|
|
24
24
|
- **8 целевых языков** — 中文 / English / 日本語 / 한국어 / Español / Français / Deutsch / Русский
|
|
25
25
|
- **Одноязычный интерфейс** — панель настроек, строки размышлений и карточки задач следуют целевому языку (без смешения zh/en); выбор сохраняется
|
|
26
26
|
- **Локальная модель в приоритете** — использует вашу локальную модель Ollama (qwen и др.): приватно, офлайн, бесплатно. При первом выборе **автоматически запускается загрузка** с индикатором прогресса; модель настраивается и активируется по завершении
|
|
@@ -30,8 +30,11 @@
|
|
|
30
30
|
- **Пакетный перевод по предложениям** — длинные цепочки переводятся небольшими пакетами, чтобы локальные малые модели сохраняли качество
|
|
31
31
|
- **🧩 Разбивка по абзацам и предложениям** — длинные цепочки делятся по пустым строкам (структура абзацев сохраняется) и дополнительно по предложениям, чтобы локальные малые модели сохраняли качество
|
|
32
32
|
- **Потоковый вывод** — переводы появляются пакет за пакетом во время размышления; разверните строку Think для сравнения с оригиналом
|
|
33
|
-
- **Устойчивость** — повторные попытки с backoff (3×), прямой запасной вариант из браузера, неудачи не кэшируются
|
|
34
33
|
- **🎚️ Настраиваемый момент перевода** — переводить всё / ленивая загрузка старых цепочек (по умолчанию) / только при раскрытии
|
|
34
|
+
- **🔗 Динамическая цепочка провайдеров** — порядок списка и есть порядок обращения: перетаскивайте для сортировки, включайте и выключайте каждую строку. Встроенные google gtx / bing / локальный Ollama плюс любые свои эндпоинты
|
|
35
|
+
- **🔌 Свои провайдеры (OpenAI и Anthropic)** — из панели можно добавить любой OpenAI-совместимый эндпоинт (`/v1/chat/completions`) или **Anthropic Messages API** (Claude): тип, шаблон, базовый URL, ключ API, модель
|
|
36
|
+
- **🪄 Наследование провайдеров из DSH** — читает из `settings.yaml` (`llm-pi-ai.providers`) строки DSH только для чтения; одна кнопка заново сканирует и добавляет их все в цепочку. Ключ разрешается на каждый запрос из `.credentials.yaml` и никогда не попадает в конфиг плагина
|
|
37
|
+
- **⏱️ Устойчивость** — 3 повтора с backoff + прямой запрос из браузера, кнопка проверки в каждой строке, ошибки не кэшируются
|
|
35
38
|
|
|
36
39
|
## 📦 Установка
|
|
37
40
|
|
|
@@ -68,22 +71,26 @@ New-Item -ItemType Junction -Path "$HOME\.dsh\profiles\node_modules\dsh-think-tr
|
|
|
68
71
|
|
|
69
72
|
1. Откройте **Настройки → Перевод цепочки размышлений**
|
|
70
73
|
2. Выберите **целевой язык** (например, Русский) — панель, строки и карточки переключатся на этот язык
|
|
71
|
-
3.
|
|
72
|
-
-
|
|
73
|
-
-
|
|
74
|
+
3. Управляйте **цепочкой провайдеров** (перетаскивание — порядок, галочка — включение):
|
|
75
|
+
- Встроенные: **google gtx / bing** (бесплатно, сразу работает, системный прокси) и **локальная модель (Ollama)** (при первом выборе скачиваются 7b/14b или своя модель)
|
|
76
|
+
- **Провайдеры DSH**: настроенные в `settings.yaml` эндпоинты появляются сами (только чтение; галочка добавляет их в цепочку). Кнопка **Импортировать из конфигурации DSH** сразу под списком заново сканирует конфигурацию и добавляет их все за один раз — ни baseURL, ни ключ вводить не нужно: ключ берётся из учётных данных DSH
|
|
77
|
+
- Ключ вводится вручную или приходит как **`apiKeyEnv`** из шаблона либо строки DSH: у такой строки появляется значок `env:NAME`, а ключ разрешается на каждый запрос и никогда не пишется в `config.json`. В форме редактирования нет поля переменной окружения (значение сохраняется как есть), но очистка поля действительно его удаляет (отправляется как явное удаление)
|
|
78
|
+
- Снятая галочка означает, что провайдер пропускается. Подробности — в [README.md](README.md)
|
|
74
79
|
4. Отправьте сообщение и разверните строку Think, чтобы увидеть перевод
|
|
75
80
|
|
|
76
81
|
## ⚙️ Как это работает
|
|
77
82
|
|
|
78
83
|
```
|
|
79
|
-
браузер → POST /_xlate/translate (тот же
|
|
80
|
-
→ цепочка провайдеров host (fail-open):
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
→ прямой запасной
|
|
84
|
+
браузер → POST /_xlate/translate (тот же origin, без CORS)
|
|
85
|
+
→ цепочка провайдеров на host (fail-open, с изменяемым порядком):
|
|
86
|
+
chain: [provider1, provider2, ...] ← порядок перетаскиванием в настройках
|
|
87
|
+
google / bing / OpenAI-совместимый / Anthropic
|
|
88
|
+
fallback-цепочка (необязательно, по умолчанию выключена, включается в конфиге)
|
|
89
|
+
→ прямой запасной путь из браузера
|
|
85
90
|
```
|
|
86
91
|
|
|
92
|
+
- **Конфигурация провайдеров** живёт в `config.json` (создаётся во время работы, в gitignore): `chain` (упорядоченные id), `fallback` (enabled + chain, только в файле), `providers` (у каждого `type`/`enabled`/`baseURL`/`apiKey`/`apiKeyEnv`/`model`). Старые конфиги с `priority` мигрируют автоматически; провайдер с `apiKeyEnv` разрешает ключ из этой переменной на каждый запрос (литеральный `apiKey` остаётся запасным), и разрешённый ключ никогда не пишется обратно в `config.json`; `null` в патче удаляет поле — так интерфейс и очищает значения
|
|
93
|
+
- **Обнаружение DSH** при загрузке читает `settings.yaml` (`llm-pi-ai.providers`) и `.credentials.yaml` (`refs`) харнесса; найденные провайдеры помечаются `source: "dsh"`, разрешённые ключи остаются в памяти (никогда в `config.json`), а маршрут `/_xlate/dsh-scan` перечитывает их по запросу
|
|
87
94
|
- **Host-часть** (`lib/index.js`): адаптеры провайдеров, LRU-кэш (600), `/_xlate/models`, `/_xlate/model/pull` + `pull-status` (автонастройка по завершении)
|
|
88
95
|
- **Client-часть** (`lib/client.js`): интерфейс на 8 языках, пакетный перевод, потоковые строки Think, localStorage
|
|
89
96
|
- Чистый слой отображения: оригиналы остаются в истории и контексте модели
|
package/README.zh-CN.md
CHANGED
|
@@ -8,8 +8,7 @@
|
|
|
8
8
|
[](LICENSE)
|
|
9
9
|
[](https://github.com/deepseek-ai/deepseek-harness)
|
|
10
10
|
|
|
11
|
-
<img src="demo/demo.gif" width="46%" alt="dsh-think-translate demo" style="border:1px solid #4D6BFE;border-radius:8px;margin:4px" />
|
|
12
|
-
<img src="demo/demo2.gif" width="46%" alt="dsh-think-translate demo 2" style="border:1px solid #4D6BFE;border-radius:8px;margin:4px" />
|
|
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" /> <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" />
|
|
13
12
|
|
|
14
13
|
</div>
|
|
15
14
|
|
|
@@ -21,6 +20,7 @@
|
|
|
21
20
|
|
|
22
21
|
DeepSeek 系模型经常用中文思考——或者用它们碰巧习惯的语言。dsh-think-translate 在你观看时把 Think 行、任务卡片和回答渲染成*你的*语言,就像给模型的思考配上字幕。
|
|
23
22
|
|
|
23
|
+
- **🕵️ 任意思考链都能读** — 推理、思维链、任务卡片与回答实时翻译,按批流式出现
|
|
24
24
|
- **8 种目标语言** — 中文 / English / 日本語 / 한국어 / Español / Français / Deutsch / Русский
|
|
25
25
|
- **单一语言界面** — 设置面板、思考行、任务卡片全部跟随目标语言(不混中英),选择持久化
|
|
26
26
|
- **本地模型为主力** — 优先使用本地 Ollama 模型(qwen 等),隐私离线免费;首次选择本地模型时**自动触发下载**(实时进度条),完成后自动配置启用
|
|
@@ -30,8 +30,11 @@ DeepSeek 系模型经常用中文思考——或者用它们碰巧习惯的语
|
|
|
30
30
|
- **句子分批翻译** — 长思考链按句子分批串行翻译,本地小模型也能保持质量
|
|
31
31
|
- **🧩 段落与句子感知切分** — 长思考链按空行切分(保留段落结构)再按句分批,本地小模型也能保持质量
|
|
32
32
|
- **流式输出** — 思考过程中译文逐批出现,展开 Think 行可对照原文
|
|
33
|
-
- **失败韧性** — host 请求 3 次退避重试 + 浏览器直连兜底,失败结果不缓存
|
|
34
33
|
- **🎚️ 可调翻译时机** — 三档:全部预翻译 / 懒加载历史(默认)/ 仅展开时翻译
|
|
34
|
+
- **🔗 动态提供方链** — 列表顺序就是投递顺序:拖动排序、逐行开关;内置 google gtx / bing / 本地 Ollama,外加任意数量的自定义端点
|
|
35
|
+
- **🔌 自定义提供方(OpenAI 与 Anthropic)** — 设置面板里可添加任意 OpenAI 兼容端点(任何 `/v1/chat/completions` 网关)或原生 **Anthropic Messages API**(Claude):类型、预设、接口地址、API 密钥、模型
|
|
36
|
+
- **🪄 继承 DSH 已配置的提供方** — 自动发现 `settings.yaml`(`llm-pi-ai.providers`)里的只读 DSH 行,一个按钮重新扫描并全部加入链;密钥在请求时从 `.credentials.yaml` 解析,绝不写入插件配置
|
|
37
|
+
- **⏱️ 失败韧性** — host 请求 3 次退避重试 + 浏览器直连兜底、每行独立的测试按钮、失败结果不缓存
|
|
35
38
|
|
|
36
39
|
## 📦 安装
|
|
37
40
|
|
|
@@ -68,22 +71,26 @@ New-Item -ItemType Junction -Path "$HOME\.dsh\profiles\node_modules\dsh-think-tr
|
|
|
68
71
|
|
|
69
72
|
1. 打开 **设置 → 思考链翻译**
|
|
70
73
|
2. 选择**目标语言**(比如日本語)——设置面板、思考行、任务卡片全部切换为该语言
|
|
71
|
-
3.
|
|
72
|
-
-
|
|
73
|
-
- **
|
|
74
|
+
3. 管理**供应商链**(拖动排序,勾选即启用):
|
|
75
|
+
- 内置:**google gtx / bing**(免费,开箱即用,自动走系统代理)与**本地模型(Ollama)**(首次选中提示下载 7b/14b 或自定义)
|
|
76
|
+
- **DSH 供应商**:`settings.yaml` 里已配置的端点会自动出现(只读,勾选即加入链);列表下方的 **继承 DSH 已配置的 API** 会重新扫描并一键全部加入——不用重填 baseURL 或密钥(密钥在请求时从 DSH 自己的凭据里解析)
|
|
77
|
+
- 密钥可以直接填,也可以由预设或 DSH 行带上 **`apiKeyEnv`**:那类行显示 `env:NAME` 徽标,密钥在请求时解析、绝不写入 `config.json`。编辑表单里没有环境变量输入框(值会原样保留),清空某个字段会真的删除它(以显式删除提交),所以从环境变量名切回字面密钥是可行的
|
|
78
|
+
- 取消勾选即跳过该供应商;更细的说明以 [README.md](README.md) 为准
|
|
74
79
|
4. 发消息让模型思考,展开 Think 行查看译文
|
|
75
80
|
|
|
76
81
|
## ⚙️ 工作原理
|
|
77
82
|
|
|
78
83
|
```
|
|
79
84
|
浏览器 → POST /_xlate/translate(同源,无 CORS)
|
|
80
|
-
→ host 供应商链(fail-open
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
→
|
|
85
|
+
→ host 供应商链(fail-open,可排序):
|
|
86
|
+
chain: [provider1, provider2, ...] ← 设置里拖拽排序
|
|
87
|
+
google / bing / openai 兼容 / anthropic 任选
|
|
88
|
+
fallback 链(可选,默认关闭,配置里开启)
|
|
89
|
+
→ 浏览器直连兜底
|
|
85
90
|
```
|
|
86
91
|
|
|
92
|
+
- **提供方配置** 存在 `config.json`(运行期生成,已 gitignore):`chain`(有序 id)、`fallback`(enabled + chain,仅配置文件)、`providers`(每项的 `type`/`enabled`/`baseURL`/`apiKey`/`apiKeyEnv`/`model`)。旧的 `priority` 配置会自动迁移;声明 `apiKeyEnv` 的提供方在请求时从该环境变量解析密钥(字面 `apiKey` 作为兜底),解析出的密钥绝不写回 `config.json`;patch 里显式的 `null` 表示删除该字段,UI 就是用它清空字段的
|
|
93
|
+
- **DSH 发现** 在加载时读取 harness 的 `settings.yaml`(`llm-pi-ai.providers`)与 `.credentials.yaml`(`refs`);被发现的提供方标记为 `source: "dsh"`,解析出的密钥只留在内存中(绝不写入 `config.json`),`/_xlate/dsh-scan` 路由可按需重新读取
|
|
87
94
|
- **host 半边**(`lib/index.js`):供应商适配器、LRU 缓存(600)、`/_xlate/models` 模型列表、`/_xlate/model/pull` + `pull-status` 模型下载管理(完成后自动配置启用)
|
|
88
95
|
- **client 半边**(`lib/client.js`):8 语言 UI、段落/句子分批翻译、流式 Think 行、设置与译文缓存持久化(localStorage)
|
|
89
96
|
- 纯显示层:原文完整保留在会话日志与模型上下文中
|
package/demo/demo.gif
CHANGED
|
Binary file
|
package/demo/demo2.gif
CHANGED
|
Binary file
|