dsh-think-translate 1.0.7 → 1.0.9
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 +11 -10
- package/README.es.md +11 -10
- package/README.fr.md +11 -10
- package/README.ja.md +11 -10
- package/README.ko.md +11 -10
- package/README.md +11 -10
- package/README.ru.md +11 -10
- package/README.zh-CN.md +11 -10
- package/lib/client.js +85 -1
- package/package.json +1 -1
package/README.de.md
CHANGED
|
@@ -1,15 +1,22 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
1
3
|
# 🐋 dsh-think-translate
|
|
2
4
|
|
|
3
5
|
**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
6
|
|
|
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 und der übersetzte Text **nie in den Modellkontext gelangt**.
|
|
8
|
-
|
|
9
7
|
[](https://www.npmjs.com/package/dsh-think-translate)
|
|
10
8
|
[](LICENSE)
|
|
11
9
|
[](https://github.com/deepseek-ai/deepseek-harness)
|
|
12
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" />
|
|
13
|
+
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
Ü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 und der übersetzte Text **nie in den Modellkontext gelangt**.
|
|
19
|
+
|
|
13
20
|
## ✨ Funktionen
|
|
14
21
|
|
|
15
22
|
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.
|
|
@@ -56,12 +63,6 @@ New-Item -ItemType Junction -Path "$HOME\.dsh\profiles\node_modules\dsh-think-tr
|
|
|
56
63
|
- **google gtx / bing** — funktioniert sofort (Systemproxy / VPN automatisch)
|
|
57
64
|
4. Nachricht senden und die Think-Zeile aufklappen, um die Übersetzung zu sehen
|
|
58
65
|
|
|
59
|
-
## 🎬 Demo
|
|
60
|
-
|
|
61
|
-

|
|
62
|
-
|
|
63
|
-

|
|
64
|
-
|
|
65
66
|
## ⚙️ Funktionsweise
|
|
66
67
|
|
|
67
68
|
```
|
package/README.es.md
CHANGED
|
@@ -1,15 +1,22 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
1
3
|
# 🐋 dsh-think-translate
|
|
2
4
|
|
|
3
5
|
**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
6
|
|
|
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 y el texto traducido **nunca entra en el contexto del modelo**.
|
|
8
|
-
|
|
9
7
|
[](https://www.npmjs.com/package/dsh-think-translate)
|
|
10
8
|
[](LICENSE)
|
|
11
9
|
[](https://github.com/deepseek-ai/deepseek-harness)
|
|
12
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" />
|
|
13
|
+
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
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 y el texto traducido **nunca entra en el contexto del modelo**.
|
|
19
|
+
|
|
13
20
|
## ✨ Características
|
|
14
21
|
|
|
15
22
|
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.
|
|
@@ -56,12 +63,6 @@ New-Item -ItemType Junction -Path "$HOME\.dsh\profiles\node_modules\dsh-think-tr
|
|
|
56
63
|
- **google gtx / bing** — funciona directamente (proxy del sistema / VPN automáticos)
|
|
57
64
|
4. Envía un mensaje y expande la fila Think para ver la traducción
|
|
58
65
|
|
|
59
|
-
## 🎬 Demo
|
|
60
|
-
|
|
61
|
-

|
|
62
|
-
|
|
63
|
-

|
|
64
|
-
|
|
65
66
|
## ⚙️ Cómo funciona
|
|
66
67
|
|
|
67
68
|
```
|
package/README.fr.md
CHANGED
|
@@ -1,15 +1,22 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
1
3
|
# 🐋 dsh-think-translate
|
|
2
4
|
|
|
3
5
|
**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
6
|
|
|
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 et que le texte traduit **n'entre jamais dans le contexte du modèle**.
|
|
8
|
-
|
|
9
7
|
[](https://www.npmjs.com/package/dsh-think-translate)
|
|
10
8
|
[](LICENSE)
|
|
11
9
|
[](https://github.com/deepseek-ai/deepseek-harness)
|
|
12
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" />
|
|
13
|
+
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
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 et que le texte traduit **n'entre jamais dans le contexte du modèle**.
|
|
19
|
+
|
|
13
20
|
## ✨ Fonctionnalités
|
|
14
21
|
|
|
15
22
|
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.
|
|
@@ -56,12 +63,6 @@ New-Item -ItemType Junction -Path "$HOME\.dsh\profiles\node_modules\dsh-think-tr
|
|
|
56
63
|
- **google gtx / bing** — fonctionne directement (proxy système / VPN automatiques)
|
|
57
64
|
4. Envoyez un message et dépliez la ligne Think pour voir la traduction
|
|
58
65
|
|
|
59
|
-
## 🎬 Démo
|
|
60
|
-
|
|
61
|
-

|
|
62
|
-
|
|
63
|
-

|
|
64
|
-
|
|
65
66
|
## ⚙️ Fonctionnement
|
|
66
67
|
|
|
67
68
|
```
|
package/README.ja.md
CHANGED
|
@@ -1,15 +1,22 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
1
3
|
# 🐋 dsh-think-translate
|
|
2
4
|
|
|
3
5
|
**言語:** [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
6
|
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
[DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) Web UI の**表示層翻訳**プラグイン:**思考チェーン(Think 行)、タスクカード、回答本文**を選択した対象言語で表示します。原文は会話履歴に完全に残り、訳文は**モデルコンテキストに一切入りません**。
|
|
8
|
-
|
|
9
7
|
[](https://www.npmjs.com/package/dsh-think-translate)
|
|
10
8
|
[](LICENSE)
|
|
11
9
|
[](https://github.com/deepseek-ai/deepseek-harness)
|
|
12
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" />
|
|
13
|
+
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
[DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) Web UI の**表示層翻訳**プラグイン:**思考チェーン(Think 行)、タスクカード、回答本文**を選択した対象言語で表示します。原文は会話履歴に完全に残り、訳文は**モデルコンテキストに一切入りません**。
|
|
19
|
+
|
|
13
20
|
## ✨ 特徴
|
|
14
21
|
|
|
15
22
|
DeepSeek 系モデルは中国語で考えることが多く、あるいはたまたま思考に使う言語で考えます。dsh-think-translate は、モデルの思考に字幕を付けるように、Think 行・タスクカード・回答を*あなたの*言語でリアルタイム表示します。
|
|
@@ -56,12 +63,6 @@ New-Item -ItemType Junction -Path "$HOME\.dsh\profiles\node_modules\dsh-think-tr
|
|
|
56
63
|
- **google gtx / bing**:そのまま使える(システムプロキシ / VPN を自動利用)
|
|
57
64
|
4. メッセージを送信し、Think 行を展開して訳文を確認
|
|
58
65
|
|
|
59
|
-
## 🎬 デモ
|
|
60
|
-
|
|
61
|
-

|
|
62
|
-
|
|
63
|
-

|
|
64
|
-
|
|
65
66
|
## ⚙️ 仕組み
|
|
66
67
|
|
|
67
68
|
```
|
package/README.ko.md
CHANGED
|
@@ -1,15 +1,22 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
1
3
|
# 🐋 dsh-think-translate
|
|
2
4
|
|
|
3
5
|
**언어:** [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
6
|
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
[DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) Web UI용 **표시 계층 번역** 플러그인: **사고 체인(Think 행), 작업 카드, 답변 본문**을 선택한 대상 언어로 표시합니다. 원문은 대화 기록에 완전히 보존되며, 번역문은 **모델 컨텍스트에 전혀 들어가지 않습니다**.
|
|
8
|
-
|
|
9
7
|
[](https://www.npmjs.com/package/dsh-think-translate)
|
|
10
8
|
[](LICENSE)
|
|
11
9
|
[](https://github.com/deepseek-ai/deepseek-harness)
|
|
12
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" />
|
|
13
|
+
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
[DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) Web UI용 **표시 계층 번역** 플러그인: **사고 체인(Think 행), 작업 카드, 답변 본문**을 선택한 대상 언어로 표시합니다. 원문은 대화 기록에 완전히 보존되며, 번역문은 **모델 컨텍스트에 전혀 들어가지 않습니다**.
|
|
19
|
+
|
|
13
20
|
## ✨ 기능
|
|
14
21
|
|
|
15
22
|
DeepSeek 계열 모델은 중국어로, 또는 우연히 생각에 쓰는 언어로 추론하는 경우가 많습니다. dsh-think-translate는 모델의 사고에 자막을 다는 것처럼 Think 행·작업 카드·답변을 *여러분의* 언어로 실시간 표시합니다.
|
|
@@ -56,12 +63,6 @@ New-Item -ItemType Junction -Path "$HOME\.dsh\profiles\node_modules\dsh-think-tr
|
|
|
56
63
|
- **google gtx / bing** — 바로 사용 가능(시스템 프록시/VPN 자동 이용)
|
|
57
64
|
4. 메시지를 보내고 Think 행을 펼쳐 번역 확인
|
|
58
65
|
|
|
59
|
-
## 🎬 데모
|
|
60
|
-
|
|
61
|
-

|
|
62
|
-
|
|
63
|
-

|
|
64
|
-
|
|
65
66
|
## ⚙️ 작동 원리
|
|
66
67
|
|
|
67
68
|
```
|
package/README.md
CHANGED
|
@@ -1,15 +1,22 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
1
3
|
# 🐋 dsh-think-translate
|
|
2
4
|
|
|
3
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)
|
|
4
6
|
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
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**.
|
|
8
|
-
|
|
9
7
|
[](https://www.npmjs.com/package/dsh-think-translate)
|
|
10
8
|
[](LICENSE)
|
|
11
9
|
[](https://github.com/deepseek-ai/deepseek-harness)
|
|
12
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" />
|
|
13
|
+
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
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**.
|
|
19
|
+
|
|
13
20
|
## ✨ Why dsh-think-translate
|
|
14
21
|
|
|
15
22
|
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.
|
|
@@ -54,12 +61,6 @@ New-Item -ItemType Junction -Path "$HOME\.dsh\profiles\node_modules\dsh-think-tr
|
|
|
54
61
|
- **google gtx / bing** — works out of the box (auto system proxy / VPN)
|
|
55
62
|
4. Send a message that makes the model think, then expand the **Think row** to read the translation and compare with the original
|
|
56
63
|
|
|
57
|
-
## 🎬 Demo
|
|
58
|
-
|
|
59
|
-

|
|
60
|
-
|
|
61
|
-

|
|
62
|
-
|
|
63
64
|
## ⚙️ How it works
|
|
64
65
|
|
|
65
66
|
```
|
package/README.ru.md
CHANGED
|
@@ -1,15 +1,22 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
1
3
|
# 🐋 dsh-think-translate
|
|
2
4
|
|
|
3
5
|
**Языки:** [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
6
|
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
Перевод на уровне отображения для веб-интерфейса [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness): **цепочка размышлений (строка Think), карточки задач и текст ответа** отображаются на выбранном целевом языке, а оригиналы полностью сохраняются в истории; переведённый текст **никогда не попадает в контекст модели**.
|
|
8
|
-
|
|
9
7
|
[](https://www.npmjs.com/package/dsh-think-translate)
|
|
10
8
|
[](LICENSE)
|
|
11
9
|
[](https://github.com/deepseek-ai/deepseek-harness)
|
|
12
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" />
|
|
13
|
+
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
Перевод на уровне отображения для веб-интерфейса [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness): **цепочка размышлений (строка Think), карточки задач и текст ответа** отображаются на выбранном целевом языке, а оригиналы полностью сохраняются в истории; переведённый текст **никогда не попадает в контекст модели**.
|
|
19
|
+
|
|
13
20
|
## ✨ Возможности
|
|
14
21
|
|
|
15
22
|
Модели семейства DeepSeek часто рассуждают на китайском — или на том языке, на котором им случилось думать. dsh-think-translate показывает строку Think, карточки задач и ответ на *вашем* языке в реальном времени — как субтитры к размышлениям модели.
|
|
@@ -56,12 +63,6 @@ New-Item -ItemType Junction -Path "$HOME\.dsh\profiles\node_modules\dsh-think-tr
|
|
|
56
63
|
- **google gtx / bing** — работает сразу (автоматический системный прокси / VPN)
|
|
57
64
|
4. Отправьте сообщение и разверните строку Think, чтобы увидеть перевод
|
|
58
65
|
|
|
59
|
-
## 🎬 Демо
|
|
60
|
-
|
|
61
|
-

|
|
62
|
-
|
|
63
|
-

|
|
64
|
-
|
|
65
66
|
## ⚙️ Как это работает
|
|
66
67
|
|
|
67
68
|
```
|
package/README.zh-CN.md
CHANGED
|
@@ -1,15 +1,22 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
1
3
|
# 🐋 dsh-think-translate
|
|
2
4
|
|
|
3
5
|
**语言:** [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
6
|
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
为 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) Web UI 提供**显示层翻译**:把界面上的**思考链(Think 行)、任务卡片、回答正文**翻译为你选择的目标语言,原文完整保留在会话记录中,译文**绝不进入模型上下文**。
|
|
8
|
-
|
|
9
7
|
[](https://www.npmjs.com/package/dsh-think-translate)
|
|
10
8
|
[](LICENSE)
|
|
11
9
|
[](https://github.com/deepseek-ai/deepseek-harness)
|
|
12
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" />
|
|
13
|
+
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
为 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) Web UI 提供**显示层翻译**:把界面上的**思考链(Think 行)、任务卡片、回答正文**翻译为你选择的目标语言,原文完整保留在会话记录中,译文**绝不进入模型上下文**。
|
|
19
|
+
|
|
13
20
|
## ✨ 特性
|
|
14
21
|
|
|
15
22
|
DeepSeek 系模型经常用中文思考——或者用它们碰巧习惯的语言。dsh-think-translate 在你观看时把 Think 行、任务卡片和回答渲染成*你的*语言,就像给模型的思考配上字幕。
|
|
@@ -56,12 +63,6 @@ New-Item -ItemType Junction -Path "$HOME\.dsh\profiles\node_modules\dsh-think-tr
|
|
|
56
63
|
- **google gtx / bing**:开箱即用(自动走系统代理/VPN)
|
|
57
64
|
4. 发消息让模型思考,展开 Think 行查看译文
|
|
58
65
|
|
|
59
|
-
## 🎬 演示
|
|
60
|
-
|
|
61
|
-

|
|
62
|
-
|
|
63
|
-

|
|
64
|
-
|
|
65
66
|
## ⚙️ 工作原理
|
|
66
67
|
|
|
67
68
|
```
|
package/lib/client.js
CHANGED
|
@@ -85,7 +85,17 @@ window.__ModuleLoader__.load({
|
|
|
85
85
|
".xl-table{border-collapse:collapse;min-width:100%;font-size:13px;line-height:1.5}",
|
|
86
86
|
".xl-table th,.xl-table td{border:1px solid var(--dsw-alias-border-l1,rgba(127,127,127,.35));padding:6px 10px;text-align:left;vertical-align:top}",
|
|
87
87
|
".xl-table th{background:var(--dsw-alias-bg-layer-2,rgba(127,127,127,.1));font-weight:600}",
|
|
88
|
-
".xl-table code{font-family:var(--dsw-font-mono,monospace);font-size:12px}"
|
|
88
|
+
".xl-table code{font-family:var(--dsw-font-mono,monospace);font-size:12px}",
|
|
89
|
+
".xl-dock{box-sizing:border-box;flex:none;overflow:hidden;margin:0 auto 4px;width:100%;border:1px solid var(--dsw-alias-border-l1,rgba(127,127,127,.35));border-radius:12px;background:var(--dsw-specific-tip,var(--dsw-alias-bg-layer-2,rgba(127,127,127,.08)))}",
|
|
90
|
+
".xl-dock-body{display:flex;flex-direction:column;gap:8px;padding:6px 12px}",
|
|
91
|
+
".xl-dock-header{display:flex;align-items:center;gap:10px;width:100%;padding:0;border:none;background:transparent;text-align:left;cursor:pointer;font:inherit;color:inherit}",
|
|
92
|
+
".xl-dock-title{flex:none;font-size:13px;line-height:24px;font-weight:500;color:var(--dsw-alias-label-primary,inherit)}",
|
|
93
|
+
".xl-dock-progress{flex:1 1 auto;min-width:0;overflow:hidden;font-size:13px;line-height:20px;color:var(--dsw-alias-label-tertiary,rgba(127,127,127,.75));text-overflow:ellipsis;white-space:nowrap}",
|
|
94
|
+
".xl-dock-chev{display:grid;flex:none;place-items:center;font-size:11px;color:var(--dsw-alias-label-tertiary,rgba(127,127,127,.75))}",
|
|
95
|
+
".xl-dock-list{display:flex;flex-direction:column;gap:8px;margin:0;padding:0;list-style:none;max-height:180px;overflow-y:auto}",
|
|
96
|
+
".xl-dock-item{display:flex;align-items:center;gap:10px;min-width:0;font-size:13px;line-height:20px;color:var(--dsw-alias-label-secondary,inherit)}",
|
|
97
|
+
".xl-dock-glyph{display:grid;flex:none;place-items:center;width:16px;height:16px;font-size:12px;opacity:.7}",
|
|
98
|
+
".xl-dock-content{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;opacity:.85}"
|
|
89
99
|
].join("\n");
|
|
90
100
|
if (typeof document !== "undefined" && document.querySelector('style[data-plugin-css="dsh-think-translate/styles.css"]') === null) {
|
|
91
101
|
var tag = document.createElement("style");
|
|
@@ -871,6 +881,67 @@ window.__ModuleLoader__.load({
|
|
|
871
881
|
: null);
|
|
872
882
|
}
|
|
873
883
|
|
|
884
|
+
// The plan strip above the composer (official ui-conversation TodoDock,
|
|
885
|
+
// 'conversation.input.dock' id 'todo'). Shadowing that id at a lower
|
|
886
|
+
// priority replaces the shipped panel with a translated one: title and
|
|
887
|
+
// per-status counts stay in the app locale (via the t seat), item
|
|
888
|
+
// contents go through the same useXlate path as the in-flow todo row.
|
|
889
|
+
function XDockTodoItem(props) {
|
|
890
|
+
var s = useStore();
|
|
891
|
+
var content = typeof props.item.content === "string" ? props.item.content : "";
|
|
892
|
+
var tr = useXlate(content, s.todo);
|
|
893
|
+
var hasTr = !!(tr && tr.ok && !tr.skipped && tr.text !== content);
|
|
894
|
+
var glyph = props.item.status === "completed" ? "✓" : props.item.status === "in_progress" ? "◐" : "○";
|
|
895
|
+
return createElement("li", { className: "xl-dock-item", "data-status": props.item.status },
|
|
896
|
+
createElement("span", { className: "xl-dock-glyph", "aria-hidden": true }, glyph),
|
|
897
|
+
createElement("span", {
|
|
898
|
+
className: "xl-dock-content",
|
|
899
|
+
title: hasTr ? content : undefined
|
|
900
|
+
}, hasTr ? tr.text : content));
|
|
901
|
+
}
|
|
902
|
+
function XDockTodo(props) {
|
|
903
|
+
var s = useStore();
|
|
904
|
+
var t = props.t;
|
|
905
|
+
var todos = props.useProjection("todos");
|
|
906
|
+
var list = Array.isArray(todos) ? todos : [];
|
|
907
|
+
var pairOpen = useState(false);
|
|
908
|
+
var open = pairOpen[0], setOpen = pairOpen[1];
|
|
909
|
+
if (list.length === 0) return null;
|
|
910
|
+
var done = 0, active = 0;
|
|
911
|
+
for (var i = 0; i < list.length; i++) {
|
|
912
|
+
var st = list[i] && list[i].status;
|
|
913
|
+
if (st === "completed") done++;
|
|
914
|
+
else if (st === "in_progress") active++;
|
|
915
|
+
}
|
|
916
|
+
var pending = list.length - done - active;
|
|
917
|
+
var segs = [];
|
|
918
|
+
function seg(key, params, count) {
|
|
919
|
+
if (count <= 0) return;
|
|
920
|
+
var label = null;
|
|
921
|
+
try { label = t ? t(key, params) : null; } catch (e) { label = null; }
|
|
922
|
+
if (typeof label === "string" && label) segs.push(label);
|
|
923
|
+
}
|
|
924
|
+
seg("todo.progress.done", { done: done }, done);
|
|
925
|
+
seg("todo.progress.active", { active: active }, active);
|
|
926
|
+
seg("todo.progress.pending", { pending: pending }, pending);
|
|
927
|
+
var title = null;
|
|
928
|
+
try { title = t ? t("todo.title") : null; } catch (e) { title = null; }
|
|
929
|
+
if (typeof title !== "string" || !title) title = "Tasks";
|
|
930
|
+
var progress = segs.join("\u2002·\u2002");
|
|
931
|
+
return createElement("section", { className: "xl-dock", "data-testid": "todo-panel", "aria-label": title },
|
|
932
|
+
createElement("div", { className: "xl-dock-body" },
|
|
933
|
+
createElement("button", {
|
|
934
|
+
type: "button", className: "xl-dock-header", "aria-expanded": open,
|
|
935
|
+
onClick: function () { setOpen(function (v) { return !v; }); }
|
|
936
|
+
},
|
|
937
|
+
createElement("span", { className: "xl-dock-title" }, title),
|
|
938
|
+
createElement("span", { className: "xl-dock-progress" }, progress),
|
|
939
|
+
createElement("span", { className: "xl-dock-chev", "aria-hidden": true }, open ? "▾" : "▸")),
|
|
940
|
+
open ? createElement("ul", { className: "xl-dock-list" }, list.map(function (it, n) {
|
|
941
|
+
return createElement(XDockTodoItem, { key: n, item: it });
|
|
942
|
+
})) : null));
|
|
943
|
+
}
|
|
944
|
+
|
|
874
945
|
function StatusBlock() {
|
|
875
946
|
var s = useStore();
|
|
876
947
|
var t = UI_TEXT[s.lang] || UI_TEXT.en;
|
|
@@ -1194,6 +1265,19 @@ window.__ModuleLoader__.load({
|
|
|
1194
1265
|
});
|
|
1195
1266
|
});
|
|
1196
1267
|
});
|
|
1268
|
+
// Shadow the official plan strip (TodoDock) so the todo list above
|
|
1269
|
+
// the composer is translated too. Same id 'todo' at a lower priority
|
|
1270
|
+
// replaces the shipped entry; empty list renders nothing, matching
|
|
1271
|
+
// the official panel's self-hiding behaviour.
|
|
1272
|
+
recordSlot("todoDock", function () {
|
|
1273
|
+
return ctx.slots.inject("conversation.input.dock", function () {
|
|
1274
|
+
return ctx.slots.register(
|
|
1275
|
+
{ name: "conversation.input.dock", id: "todo", order: 0, locale: "conversation", priority: -1 },
|
|
1276
|
+
function (props) {
|
|
1277
|
+
return createElement(XBoundary, null, createElement(XDockTodo, props));
|
|
1278
|
+
});
|
|
1279
|
+
});
|
|
1280
|
+
});
|
|
1197
1281
|
// Settings section: the label is registrant-localized — the shell
|
|
1198
1282
|
// renders whatever label string the registration carried. Must go
|
|
1199
1283
|
// through slots.inject (declaration-aware: register() directly
|
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.
|
|
4
|
+
"version": "1.0.9",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"exports": {
|