@jiezhengj/dsh-dyslexia 0.1.0 → 0.1.2
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 +53 -0
- package/README.en.md +53 -0
- package/README.es.md +53 -0
- package/README.fr.md +53 -0
- package/README.ja.md +53 -0
- package/README.md +20 -45
- package/README.pt.md +53 -0
- package/README.ru.md +53 -0
- package/README.zh.md +53 -0
- package/client.js +102 -12
- package/docs/DETAIL.de.md +1 -0
- package/docs/DETAIL.es.md +1 -0
- package/docs/DETAIL.fr.md +1 -0
- package/docs/DETAIL.ja.md +1 -0
- package/docs/DETAIL.md +1 -0
- package/docs/DETAIL.pt.md +1 -0
- package/docs/DETAIL.ru.md +1 -0
- package/docs/DETAIL.zh.md +1 -0
- package/docs/preview.svg +39 -0
- package/icon.svg +10 -7
- package/locale/de.json +7 -0
- package/locale/en.json +2 -1
- package/locale/es.json +7 -0
- package/locale/fr.json +7 -0
- package/locale/ja.json +7 -0
- package/locale/pt.json +7 -0
- package/locale/ru.json +7 -0
- package/locale/zh.json +3 -2
- package/package.json +14 -4
package/README.de.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# DSH Lesbare Diagramme
|
|
2
|
+
|
|
3
|
+
> Ein Diagramm statt einer Textwand – gezeichnet, wo der Text stand.
|
|
4
|
+
|
|
5
|
+
## Was es tut
|
|
6
|
+
|
|
7
|
+
DeepSeek Harness stellt Markdown im Chat bereits dar. Dieses Plugin fügt genau eines hinzu: Enthält eine Antwort einen `mermaid`-Codeblock, zeichnet der Chat ihn an genau dieser Stelle als Diagramm – in der Nachricht, im Lauf der Unterhaltung. Daneben öffnet sich kein Fenster, nichts wechselt in eine Seitenleiste.
|
|
8
|
+
|
|
9
|
+
Der Codeblock wird nie verbraucht. Er bleibt der Text der Nachricht: kopierbar, durchsuchbar, weitergebbar und auch dann noch lesbar, wenn dieses Plugin entfernt ist.
|
|
10
|
+
|
|
11
|
+
## Warum es so gebaut ist
|
|
12
|
+
|
|
13
|
+
- **Der Text ist die Aufzeichnung.** Jedes Diagramm wird beim Anzeigen aus dem Codeblock neu erzeugt; nichts existiert nur als Pixel. Plugin aus – die Unterhaltung bleibt vollständig.
|
|
14
|
+
- **In der Nachricht, nicht daneben.** Ein Vorschaufenster zerreißt den Lesefaden: Man verliert die Zeile, bei der man war.
|
|
15
|
+
- **Können gehört zum Plugin, Vorliebe zu dir.** Das Plugin sagt nur, dass hier Diagramme erscheinen. Ob der Assistent zeichnen soll, ist deine Anweisung in deiner eigenen `AGENTS.md`.
|
|
16
|
+
- **Über deinen Rechner wird nichts angenommen.** Die Zeichen-Engine ist mitgeliefert, das Plugin arbeitet offline und verlangt nichts vom Host.
|
|
17
|
+
|
|
18
|
+
## Was du bekommst
|
|
19
|
+
|
|
20
|
+
- Diagramme an Ort und Stelle für `mermaid`-Codeblöcke: Flussdiagramm, Sequenz, Klasse, Zustand, ER, Mindmap, Zeitachse und die übrigen Diagrammtypen von Mermaid 12.1.
|
|
21
|
+
- **Quelle anzeigen** und **Quelle kopieren** unter jedem Diagramm – der Text hinter dem Bild ist einen Klick entfernt.
|
|
22
|
+
- Während eine Antwort noch streamt, bleibt der Block ein Codeblock; das Diagramm erscheint, sobald der Block vollständig ist.
|
|
23
|
+
- Ein nicht auswertbarer Block zeigt den ursprünglichen Codeblock plus eine Zeile mit dem Grund – nie einen leeren Rahmen.
|
|
24
|
+
- Farben und Schriften folgen dem Oberflächenthema; ein Themenwechsel wird ohne Neuladen übernommen.
|
|
25
|
+
- Auf dem Telefon oder in einem schmalen Fenster passt sich das Diagramm der Spaltenbreite an, und der Zoom bleibt im Diagramm – die Seite scrollt nie seitwärts.
|
|
26
|
+
- Acht Oberflächensprachen, dieselben, die DeepSeek Harness mitbringt.
|
|
27
|
+
- Zur Laufzeit wird nichts geladen: Die Engine steckt im Plugin.
|
|
28
|
+
|
|
29
|
+
## Installation
|
|
30
|
+
|
|
31
|
+
Installiere das Paket `@jiezhengj/dsh-dyslexia` in deinem DeepSeek-Harness-Profil (Plugin-Seite) und starte die App neu. Auf npm: https://www.npmjs.com/package/@jiezhengj/dsh-dyslexia
|
|
32
|
+
|
|
33
|
+
## Beispiel
|
|
34
|
+
|
|
35
|
+
Eine Antwort enthält diesen Block, und der Chat zeigt ihn als Bild:
|
|
36
|
+
|
|
37
|
+
```mermaid
|
|
38
|
+
flowchart LR
|
|
39
|
+
A[Text] --> B[Diagram]
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Deinstallation und Kompatibilität
|
|
43
|
+
|
|
44
|
+
- Eine Deinstallation lässt jede frühere Unterhaltung unversehrt: Frühere Diagramme werden wieder zu den Codeblöcken, aus denen sie entstanden, lesbar und durchsuchbar.
|
|
45
|
+
- Das Plugin deklariert keine Versionsschwelle und kein erforderliches Host-Paket; ein Host-Update kann den Start der App daher nicht verhindern. Ändert sich die Form des Hosts, tritt das Plugin zurück und der ursprüngliche Codeblock wird gezeigt.
|
|
46
|
+
|
|
47
|
+
## Lizenz
|
|
48
|
+
|
|
49
|
+
MIT. Die mitgelieferte Zeichen-Engine Pele 1.13.0 steht ebenfalls unter MIT; siehe `THIRD-PARTY-NOTICES.md`.
|
|
50
|
+
|
|
51
|
+
Quellcode: https://github.com/jiezhengj/DSH-Dyslexia
|
|
52
|
+
|
|
53
|
+
Andere Sprachen: [English](README.en.md) · [简体中文](README.zh.md) · [日本語](README.ja.md) · [Español](README.es.md) · [Français](README.fr.md) · [Русский](README.ru.md) · [Português](README.pt.md)
|
package/README.en.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# DSH Dyslexia
|
|
2
|
+
|
|
3
|
+
> A diagram instead of a wall of text — drawn where the text is.
|
|
4
|
+
|
|
5
|
+
## What it does
|
|
6
|
+
|
|
7
|
+
DeepSeek Harness already renders Markdown in a chat. This plugin adds one thing: when a reply contains a `mermaid` code block, the chat draws it as a diagram right there — inside the message, in the flow of the conversation. No window opens beside it, nothing switches to a side panel.
|
|
8
|
+
|
|
9
|
+
The code block is never consumed. It stays in the message as text: it can be copied, searched, sent on, and read after this plugin is gone.
|
|
10
|
+
|
|
11
|
+
## Why it is built this way
|
|
12
|
+
|
|
13
|
+
- **The text is the record.** Every drawing is made from the code block when it is shown, so nothing lives only as pixels. Turn the plugin off and the conversation is still complete.
|
|
14
|
+
- **Inside the message, not beside it.** A preview window breaks the thread of reading: you lose the line you were on.
|
|
15
|
+
- **Capability belongs to the plugin, preference to you.** The plugin only says that drawings appear here. Whether the assistant should draw is your own instruction, in your own `AGENTS.md`.
|
|
16
|
+
- **Nothing about your machine is assumed.** The drawing engine is bundled, the plugin works offline, and it asks nothing of the host.
|
|
17
|
+
|
|
18
|
+
## What you get
|
|
19
|
+
|
|
20
|
+
- Diagrams in place for `mermaid` code blocks: flowcharts, sequence, class, state, ER, mind map, timeline and the other Mermaid 12.1 diagram types.
|
|
21
|
+
- **Show source** and **Copy source** under every drawing, so the text behind the picture is one click away.
|
|
22
|
+
- While a reply is streaming, the block stays a code block; the drawing appears when the block is complete.
|
|
23
|
+
- A block that cannot be parsed shows the plain code block plus one line saying why — never an empty frame.
|
|
24
|
+
- Colours and fonts follow the interface theme, and a theme switch is picked up without a reload.
|
|
25
|
+
- On a phone or a narrow window the drawing reflows to the column width and zoom stays inside the drawing, so the page never scrolls sideways.
|
|
26
|
+
- Eight interface languages, the same set DeepSeek Harness ships.
|
|
27
|
+
- Nothing is fetched at runtime: the engine is inside the plugin.
|
|
28
|
+
|
|
29
|
+
## Install
|
|
30
|
+
|
|
31
|
+
Install the package `@jiezhengj/dsh-dyslexia` in your DeepSeek Harness profile (the Plugins page), then restart the app. The package is on npm: https://www.npmjs.com/package/@jiezhengj/dsh-dyslexia.
|
|
32
|
+
|
|
33
|
+
## Example
|
|
34
|
+
|
|
35
|
+
A reply contains this code block, and the chat shows it as a picture:
|
|
36
|
+
|
|
37
|
+
```mermaid
|
|
38
|
+
flowchart LR
|
|
39
|
+
A[Text] --> B[Diagram]
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Uninstalling and compatibility
|
|
43
|
+
|
|
44
|
+
- Uninstalling keeps every past conversation intact: earlier drawings turn back into the code blocks they came from, still readable and still searchable.
|
|
45
|
+
- The plugin declares no version gate and no required host package, so a host upgrade cannot stop the app from starting; if the host changes shape, the plugin steps aside and the plain code block is shown.
|
|
46
|
+
|
|
47
|
+
## License
|
|
48
|
+
|
|
49
|
+
MIT. The bundled drawing engine Pele 1.13.0 is MIT as well; see `THIRD-PARTY-NOTICES.md`.
|
|
50
|
+
|
|
51
|
+
Source: https://github.com/jiezhengj/DSH-Dyslexia
|
|
52
|
+
|
|
53
|
+
Other languages: [简体中文](README.zh.md) · [日本語](README.ja.md) · [Español](README.es.md) · [Français](README.fr.md) · [Deutsch](README.de.md) · [Русский](README.ru.md) · [Português](README.pt.md)
|
package/README.es.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# DSH Diagramas legibles
|
|
2
|
+
|
|
3
|
+
> Un diagrama en lugar de un muro de texto, dibujado donde estaba el texto.
|
|
4
|
+
|
|
5
|
+
## Qué hace
|
|
6
|
+
|
|
7
|
+
DeepSeek Harness ya dibuja Markdown en el chat. Este complemento añade una sola cosa: cuando una respuesta trae un bloque de código `mermaid`, el chat lo dibuja como diagrama ahí mismo, dentro del mensaje y en el hilo de la conversación. No se abre una ventana al lado ni se cambia a un panel lateral.
|
|
8
|
+
|
|
9
|
+
El bloque de código no se consume: sigue en el mensaje como texto, de modo que se puede copiar, buscar, reenviar y leer cuando este complemento ya no esté.
|
|
10
|
+
|
|
11
|
+
## Por qué está construido así
|
|
12
|
+
|
|
13
|
+
- **El texto es el registro.** Cada dibujo se hace desde el bloque de código al mostrarlo, así que nada vive solo como píxeles. Desactiva el complemento y la conversación sigue completa.
|
|
14
|
+
- **Dentro del mensaje, no al lado.** Una ventana de vista previa corta el hilo de lectura: pierdes la línea en la que estabas.
|
|
15
|
+
- **La capacidad es del complemento, la preferencia es tuya.** El complemento solo dice que aquí aparecen dibujos. Si el asistente debe dibujar es instrucción tuya, en tu propio `AGENTS.md`.
|
|
16
|
+
- **No se da nada por supuesto de tu equipo.** El motor de dibujo viene incluido, el complemento funciona sin conexión y no exige nada al anfitrión.
|
|
17
|
+
|
|
18
|
+
## Qué obtienes
|
|
19
|
+
|
|
20
|
+
- Diagramas en su sitio para bloques `mermaid`: flujo, secuencia, clases, estados, ER, mapas mentales, líneas de tiempo y los demás tipos de Mermaid 12.1.
|
|
21
|
+
- **Mostrar el código** y **Copiar el código** bajo cada dibujo: el texto detrás de la imagen queda a un clic.
|
|
22
|
+
- Mientras una respuesta se está generando, el bloque sigue siendo un bloque; el dibujo aparece cuando el bloque está completo.
|
|
23
|
+
- Un bloque que no se puede analizar muestra el código original y una línea con el motivo; nunca un marco vacío.
|
|
24
|
+
- Los colores y las fuentes siguen el tema de la interfaz, y el cambio de tema se recoge sin recargar.
|
|
25
|
+
- En un teléfono o una ventana estrecha el dibujo se recompone al ancho de la columna y el zoom ocurre dentro del dibujo, así que la página nunca se desplaza en horizontal.
|
|
26
|
+
- Ocho idiomas de interfaz, los mismos que incluye DeepSeek Harness.
|
|
27
|
+
- Nada se descarga en tiempo de ejecución: el motor está dentro del complemento.
|
|
28
|
+
|
|
29
|
+
## Instalación
|
|
30
|
+
|
|
31
|
+
Instala el paquete `@jiezhengj/dsh-dyslexia` en tu perfil de DeepSeek Harness (página de complementos) y reinicia la aplicación. En npm: https://www.npmjs.com/package/@jiezhengj/dsh-dyslexia
|
|
32
|
+
|
|
33
|
+
## Ejemplo
|
|
34
|
+
|
|
35
|
+
Una respuesta contiene este bloque y el chat lo muestra como dibujo:
|
|
36
|
+
|
|
37
|
+
```mermaid
|
|
38
|
+
flowchart LR
|
|
39
|
+
A[Text] --> B[Diagram]
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Desinstalación y compatibilidad
|
|
43
|
+
|
|
44
|
+
- Desinstalar mantiene intactas las conversaciones anteriores: los dibujos vuelven a ser los bloques de código de los que salieron, legibles y buscables.
|
|
45
|
+
- El complemento no declara puerta de versión ni paquete anfitrión obligatorio, así que una actualización del anfitrión no puede impedir que la aplicación arranque; si el anfitrión cambia de forma, el complemento se aparta y se muestra el bloque de código original.
|
|
46
|
+
|
|
47
|
+
## Licencia
|
|
48
|
+
|
|
49
|
+
MIT. El motor de dibujo incluido, Pele 1.13.0, también es MIT; véase `THIRD-PARTY-NOTICES.md`.
|
|
50
|
+
|
|
51
|
+
Código fuente: https://github.com/jiezhengj/DSH-Dyslexia
|
|
52
|
+
|
|
53
|
+
Otros idiomas: [English](README.en.md) · [简体中文](README.zh.md) · [日本語](README.ja.md) · [Français](README.fr.md) · [Deutsch](README.de.md) · [Русский](README.ru.md) · [Português](README.pt.md)
|
package/README.fr.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# DSH Schémas lisibles
|
|
2
|
+
|
|
3
|
+
> Un schéma au lieu d’un mur de texte, dessiné là où était le texte.
|
|
4
|
+
|
|
5
|
+
## Ce qu’il fait
|
|
6
|
+
|
|
7
|
+
DeepSeek Harness affiche déjà le Markdown dans la discussion. Ce greffon n’ajoute qu’une chose : quand une réponse contient un bloc de code `mermaid`, la discussion le dessine en schéma à cet endroit, dans le message et dans le fil de la conversation. Aucune fenêtre ne s’ouvre à côté, aucun panneau latéral ne s’affiche.
|
|
8
|
+
|
|
9
|
+
Le bloc de code n’est jamais consommé. Il reste le texte du message : on peut le copier, le rechercher, le transmettre et le lire une fois ce greffon retiré.
|
|
10
|
+
|
|
11
|
+
## Pourquoi cette construction
|
|
12
|
+
|
|
13
|
+
- **Le texte est la trace.** Chaque schéma est refait à partir du bloc de code au moment de l’afficher : rien n’existe uniquement en pixels. Désactivez le greffon, la conversation reste complète.
|
|
14
|
+
- **Dans le message, pas à côté.** Une fenêtre d’aperçu coupe le fil de lecture : on perd la ligne où l’on était.
|
|
15
|
+
- **La capacité au greffon, la préférence à vous.** Le greffon dit seulement que des schémas apparaissent ici. Que l’assistant doive dessiner relève de votre propre consigne, dans votre `AGENTS.md`.
|
|
16
|
+
- **Rien n’est supposé de votre machine.** Le moteur de dessin est embarqué, le greffon fonctionne hors ligne et n’exige rien de l’hôte.
|
|
17
|
+
|
|
18
|
+
## Ce que vous obtenez
|
|
19
|
+
|
|
20
|
+
- Des schémas à leur place pour les blocs `mermaid` : organigramme, séquence, classes, états, ER, carte mentale, chronologie et les autres types de Mermaid 12.1.
|
|
21
|
+
- **Afficher la source** et **Copier la source** sous chaque schéma : le texte derrière l’image est à un clic.
|
|
22
|
+
- Pendant la génération d’une réponse, le bloc reste un bloc ; le schéma apparaît quand le bloc est complet.
|
|
23
|
+
- Un bloc illisible affiche le code d’origine et une ligne indiquant la raison, jamais un cadre vide.
|
|
24
|
+
- Couleurs et polices suivent le thème de l’interface, et un changement de thème est pris en compte sans rechargement.
|
|
25
|
+
- Sur un téléphone ou dans une fenêtre étroite, le schéma se recompose à la largeur de la colonne et le zoom reste à l’intérieur du schéma : la page ne défile jamais horizontalement.
|
|
26
|
+
- Huit langues d’interface, les mêmes que celles livrées avec DeepSeek Harness.
|
|
27
|
+
- Aucun téléchargement à l’exécution : le moteur est dans le greffon.
|
|
28
|
+
|
|
29
|
+
## Installation
|
|
30
|
+
|
|
31
|
+
Installez le paquet `@jiezhengj/dsh-dyslexia` dans votre profil DeepSeek Harness (page des greffons), puis redémarrez l’application. Sur npm : https://www.npmjs.com/package/@jiezhengj/dsh-dyslexia
|
|
32
|
+
|
|
33
|
+
## Exemple
|
|
34
|
+
|
|
35
|
+
Une réponse contient ce bloc, et la discussion l’affiche en schéma :
|
|
36
|
+
|
|
37
|
+
```mermaid
|
|
38
|
+
flowchart LR
|
|
39
|
+
A[Text] --> B[Diagram]
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Désinstallation et compatibilité
|
|
43
|
+
|
|
44
|
+
- La désinstallation laisse intactes toutes les conversations passées : les anciens schémas redeviennent les blocs de code dont ils venaient, lisibles et recherchables.
|
|
45
|
+
- Le greffon ne déclare ni seuil de version ni paquet hôte obligatoire : une mise à jour de l’hôte ne peut donc pas empêcher l’application de démarrer ; si l’hôte change de forme, le greffon s’efface et le bloc de code d’origine est affiché.
|
|
46
|
+
|
|
47
|
+
## Licence
|
|
48
|
+
|
|
49
|
+
MIT. Le moteur de dessin embarqué Pele 1.13.0 est aussi sous MIT ; voir `THIRD-PARTY-NOTICES.md`.
|
|
50
|
+
|
|
51
|
+
Code source: https://github.com/jiezhengj/DSH-Dyslexia
|
|
52
|
+
|
|
53
|
+
Autres langues: [English](README.en.md) · [简体中文](README.zh.md) · [日本語](README.ja.md) · [Español](README.es.md) · [Deutsch](README.de.md) · [Русский](README.ru.md) · [Português](README.pt.md)
|
package/README.ja.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# DSH 図で読む
|
|
2
|
+
|
|
3
|
+
> 長い文章の代わりに一枚の図を——文章があった場所に描きます。
|
|
4
|
+
|
|
5
|
+
## できること
|
|
6
|
+
|
|
7
|
+
DeepSeek Harness はもともとチャットで Markdown を描画します。このプラグインが足すのは一点だけです。返信に `mermaid` コードブロックがあると、チャットはその場で図として描きます。メッセージの中、会話の流れの中に描かれ、横にウィンドウも開かず、サイドパネルにも切り替わりません。
|
|
8
|
+
|
|
9
|
+
コードブロックは消費されません。メッセージのテキストとして残るので、コピーでき、検索でき、転送でき、このプラグインを外した後でも読めます。
|
|
10
|
+
|
|
11
|
+
## この作りにした理由
|
|
12
|
+
|
|
13
|
+
- **テキストこそが記録です。** 図は表示のたびにコードブロックから作られるので、ピクセルにしか存在しない内容はありません。プラグインを切っても会話は完全なままです。
|
|
14
|
+
- **図はメッセージの中に。** 別のプレビューウィンドウは読む流れを切ります。どこまで読んだかを見失います。
|
|
15
|
+
- **能力はプラグイン、好みはあなたに。** プラグインは「ここに図が出る」と述べるだけです。図で表すかどうかは、あなたの `AGENTS.md` に書く好みです。
|
|
16
|
+
- **あなたの環境を仮定しません。** 描画エンジンは同梱され、実行時にネットワークを使わず、ホストに何も要求しません。
|
|
17
|
+
|
|
18
|
+
## 得られるもの
|
|
19
|
+
|
|
20
|
+
- `mermaid` コードブロックがその場で図に:フローチャート、シーケンス、クラス、状態、ER、マインドマップ、タイムライン、その他 Mermaid 12.1 の図種。
|
|
21
|
+
- 図の下に**ソースを表示**と**ソースをコピー**。図の背景にあるテキストは常にワンクリック先です。
|
|
22
|
+
- 返信がストリーミング中はコードブロックのまま。書き終わってから図になります。
|
|
23
|
+
- 解析できないブロックは、元のコードブロックと理由の一行を表示します。空の枠にはなりません。
|
|
24
|
+
- 色とフォントは画面テーマに従い、テーマ切り替えは再読み込みなしで反映されます。
|
|
25
|
+
- スマートフォンや狭いウィンドウでは列幅に合わせて組み替わり、拡大は図の中だけで起こるので、ページが横に流れません。
|
|
26
|
+
- インターフェース言語は 8 種類。DeepSeek Harness が同梱するものと同じです。
|
|
27
|
+
- 実行時の取得はありません。エンジンはプラグインの中にあります。
|
|
28
|
+
|
|
29
|
+
## インストール
|
|
30
|
+
|
|
31
|
+
DeepSeek Harness のプロファイル(プラグイン画面)に `@jiezhengj/dsh-dyslexia` をインストールし、アプリを再起動してください。npm: https://www.npmjs.com/package/@jiezhengj/dsh-dyslexia
|
|
32
|
+
|
|
33
|
+
## 例
|
|
34
|
+
|
|
35
|
+
返信に次のコードブロックがあると、チャットはそれを図として表示します。
|
|
36
|
+
|
|
37
|
+
```mermaid
|
|
38
|
+
flowchart LR
|
|
39
|
+
A[Text] --> B[Diagram]
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## アンインストールと互換性
|
|
43
|
+
|
|
44
|
+
- アンインストールしても過去の会話はそのまま残ります。以前の図は元のコードブロックに戻り、読めて、検索できます。
|
|
45
|
+
- バージョンゲートも必須のホストパッケージも宣言していないため、ホストの更新でアプリが起動しなくなることはありません。ホストの形が変わった場合は、プラグインが身を引き、元のコードブロックを表示します。
|
|
46
|
+
|
|
47
|
+
## ライセンス
|
|
48
|
+
|
|
49
|
+
MIT。同梱の描画エンジン Pele 1.13.0 も MIT です(`THIRD-PARTY-NOTICES.md` を参照)。
|
|
50
|
+
|
|
51
|
+
ソース: https://github.com/jiezhengj/DSH-Dyslexia
|
|
52
|
+
|
|
53
|
+
他の言語: [English](README.en.md) · [简体中文](README.zh.md) · [Español](README.es.md) · [Français](README.fr.md) · [Deutsch](README.de.md) · [Русский](README.ru.md) · [Português](README.pt.md)
|
package/README.md
CHANGED
|
@@ -1,55 +1,30 @@
|
|
|
1
1
|
# DSH Dyslexia
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Draws `mermaid` code blocks in a DeepSeek Harness conversation as diagrams, in place in the message — no side panel, no second window.
|
|
4
|
+
把 DeepSeek Harness 会话里的 `mermaid` 代码块就地画成图——不开侧栏,也不弹第二个窗口。
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
[English](README.en.md) · [简体中文](README.zh.md) · [日本語](README.ja.md) · [Español](README.es.md) · [Français](README.fr.md) · [Deutsch](README.de.md) · [Русский](README.ru.md) · [Português](README.pt.md)
|
|
6
7
|
|
|
7
|
-
##
|
|
8
|
+
## About
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
- 配色、字号跟着宿主主题和正文走,浅色深色都正常。
|
|
12
|
-
- 每张图都有"查看源码"。画不出来的图(语法错误、太大)显示一行原因,并把原代码块放回原处,信息不丢。
|
|
13
|
-
- 模型那头只加一句能力说明,让模型知道这里会把 `mermaid` 画出来;它不规定什么内容该画什么图。
|
|
10
|
+
A reply often explains a structure in words a diagram would show in a glance. This plugin lets the chat draw `mermaid` blocks where they stand, so the picture sits in the conversation and the code block stays its text: copyable, searchable, and readable after the plugin is removed.
|
|
11
|
+
回复里经常用一段文字去讲一个结构,而一张图一眼就能看清。这个插件让聊天就地画出 `mermaid` 代码块:图留在会话里,代码块仍是消息的文本——可复制、可检索,插件卸掉之后也仍可读。
|
|
14
12
|
|
|
15
|
-
##
|
|
13
|
+
## Install
|
|
16
14
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
```
|
|
15
|
+
Install `@jiezhengj/dsh-dyslexia` in the DeepSeek Harness Plugins page, then restart the app.
|
|
16
|
+
在 DeepSeek Harness 的插件页安装 `@jiezhengj/dsh-dyslexia`,然后重启应用。
|
|
20
17
|
|
|
21
|
-
|
|
18
|
+
- npm: https://www.npmjs.com/package/@jiezhengj/dsh-dyslexia
|
|
19
|
+
- Source: https://github.com/jiezhengj/DSH-Dyslexia
|
|
22
20
|
|
|
23
|
-
##
|
|
21
|
+
## Documentation
|
|
24
22
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
这个包只提供能力,不代替使用者表达偏好。想让 Agent 平时多说图、少说长段落,把偏好写进自己的 `AGENTS.md`,例如仓库里的 [`visual-first-agents-snippet.md`](visual-first-agents-snippet.md)。
|
|
34
|
-
|
|
35
|
-
## 与 DSH 版本的兼容性
|
|
36
|
-
|
|
37
|
-
DSH 还在早期,这个包按"尽力而为、失败退让"写,不跟任何版本绑定:
|
|
38
|
-
|
|
39
|
-
- 不写 `engines.dsh`,也不写 dsh 的 peer 依赖。DSH 会在启动前用这些字段判断插件兼容性,不满足就让整个 profile 起不来;本包干脆不参与这个判断,任何版本的 DSH 都不会因为它拒绝启动。
|
|
40
|
-
- 客户端模块不声明 `inject` 的宿主包名,只取用到时才使用的 `slots` 服务;`locale` 服务缺失或签名变了,就退回包内自带的中英文案。
|
|
41
|
-
- 宿主接口变化、槽注册失败、引擎加载失败、组件渲染出错,都各自兜住:最坏的结果是这一张图不画、退回原来的代码块,绝不影响会话其余部分,也不会让同一批脚本里的别的插件一起挂掉。
|
|
42
|
-
- 构建时对生成的 `client.js` 做一次语法编译检查;语法错误在发布前就报错,不会让宿主那一批脚本因它而整体失效。
|
|
43
|
-
|
|
44
|
-
已知限制:如果 DSH 将来换掉 `conversation.chat.markdown.fence` 这个槽,本包不会再画图,但也不会报错,会话照常。
|
|
45
|
-
|
|
46
|
-
## 限制
|
|
47
|
-
|
|
48
|
-
- 只认 `mermaid` 一种语言的代码块;别的绘图语法不处理。
|
|
49
|
-
- 语法跟随引擎支持的 Mermaid 12.1 范围;不支持的写法会回退成源码加一行原因。
|
|
50
|
-
- 流式输出中的半截代码块不画,等这一块输出完再画。
|
|
51
|
-
- 单个代码块超过约 24 KB、或连边超过 400 条时不画,回退源码,避免卡住界面。
|
|
52
|
-
|
|
53
|
-
## 许可
|
|
54
|
-
|
|
55
|
-
本包 MIT。内置的 pele 1.13.0 也是 MIT,原文见 [`THIRD-PARTY-NOTICES.md`](THIRD-PARTY-NOTICES.md)。
|
|
23
|
+
- English: [README.en.md](README.en.md)
|
|
24
|
+
- 简体中文: [README.zh.md](README.zh.md)
|
|
25
|
+
- 日本語: [README.ja.md](README.ja.md)
|
|
26
|
+
- Español: [README.es.md](README.es.md)
|
|
27
|
+
- Français: [README.fr.md](README.fr.md)
|
|
28
|
+
- Deutsch: [README.de.md](README.de.md)
|
|
29
|
+
- Русский: [README.ru.md](README.ru.md)
|
|
30
|
+
- Português: [README.pt.md](README.pt.md)
|
package/README.pt.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# DSH Diagramas legíveis
|
|
2
|
+
|
|
3
|
+
> Um diagrama no lugar de uma parede de texto — desenhado onde o texto estava.
|
|
4
|
+
|
|
5
|
+
## O que ele faz
|
|
6
|
+
|
|
7
|
+
O DeepSeek Harness já desenha Markdown no chat. Este plugin acrescenta uma coisa: quando uma resposta traz um bloco de código `mermaid`, o chat o desenha como diagrama ali mesmo, dentro da mensagem e no fluxo da conversa. Nenhuma janela abre ao lado, nada muda para um painel lateral.
|
|
8
|
+
|
|
9
|
+
O bloco de código nunca é consumido. Continua sendo o texto da mensagem: pode ser copiado, pesquisado, reenviado e lido depois que este plugin for removido.
|
|
10
|
+
|
|
11
|
+
## Por que foi feito assim
|
|
12
|
+
|
|
13
|
+
- **O texto é o registro.** Cada desenho é refeito a partir do bloco de código na hora de mostrar, então nada vive só como pixels. Desligue o plugin e a conversa continua completa.
|
|
14
|
+
- **Dentro da mensagem, não ao lado.** Uma janela de prévia quebra o fio da leitura: perde-se a linha em que se estava.
|
|
15
|
+
- **A capacidade é do plugin, a preferência é sua.** O plugin apenas diz que aqui aparecem desenhos. Se o assistente deve desenhar é instrução sua, no seu `AGENTS.md`.
|
|
16
|
+
- **Nada é presumido sobre a sua máquina.** O motor de desenho vem incluído, o plugin funciona sem rede e não exige nada do anfitrião.
|
|
17
|
+
|
|
18
|
+
## O que você recebe
|
|
19
|
+
|
|
20
|
+
- Diagramas no lugar para blocos `mermaid`: fluxo, sequência, classes, estados, ER, mapa mental, linha do tempo e os demais tipos do Mermaid 12.1.
|
|
21
|
+
- **Mostrar o código** e **Copiar o código** sob cada desenho: o texto por trás da imagem a um clique.
|
|
22
|
+
- Enquanto uma resposta é gerada, o bloco continua bloco; o desenho aparece quando o bloco está completo.
|
|
23
|
+
- Um bloco que não pode ser interpretado mostra o código original e uma linha com o motivo — nunca um quadro vazio.
|
|
24
|
+
- Cores e fontes seguem o tema da interface, e a troca de tema é captada sem recarregar.
|
|
25
|
+
- No celular ou numa janela estreita o desenho se reorganiza na largura da coluna e o zoom acontece dentro do desenho, então a página nunca rola na horizontal.
|
|
26
|
+
- Oito idiomas de interface, os mesmos que o DeepSeek Harness traz.
|
|
27
|
+
- Nada é buscado em tempo de execução: o motor está dentro do plugin.
|
|
28
|
+
|
|
29
|
+
## Instalação
|
|
30
|
+
|
|
31
|
+
Instale o pacote `@jiezhengj/dsh-dyslexia` no seu perfil do DeepSeek Harness (página de plugins) e reinicie o aplicativo. No npm: https://www.npmjs.com/package/@jiezhengj/dsh-dyslexia
|
|
32
|
+
|
|
33
|
+
## Exemplo
|
|
34
|
+
|
|
35
|
+
Uma resposta contém este bloco e o chat o mostra como desenho:
|
|
36
|
+
|
|
37
|
+
```mermaid
|
|
38
|
+
flowchart LR
|
|
39
|
+
A[Text] --> B[Diagram]
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Desinstalação e compatibilidade
|
|
43
|
+
|
|
44
|
+
- Desinstalar mantém intactas as conversas anteriores: os desenhos antigos voltam a ser os blocos de código de onde vieram, legíveis e pesquisáveis.
|
|
45
|
+
- O plugin não declara limite de versão nem pacote de anfitrião obrigatório, então uma atualização do anfitrião não pode impedir o aplicativo de iniciar; se a forma do anfitrião mudar, o plugin se retira e o bloco de código original é mostrado.
|
|
46
|
+
|
|
47
|
+
## Licença
|
|
48
|
+
|
|
49
|
+
MIT. O motor de desenho incluído, Pele 1.13.0, também é MIT; veja `THIRD-PARTY-NOTICES.md`.
|
|
50
|
+
|
|
51
|
+
Código-fonte: https://github.com/jiezhengj/DSH-Dyslexia
|
|
52
|
+
|
|
53
|
+
Outros idiomas: [English](README.en.md) · [简体中文](README.zh.md) · [日本語](README.ja.md) · [Español](README.es.md) · [Français](README.fr.md) · [Deutsch](README.de.md) · [Русский](README.ru.md)
|
package/README.ru.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# DSH Читаемые диаграммы
|
|
2
|
+
|
|
3
|
+
> Диаграмма вместо стены текста — там, где был текст.
|
|
4
|
+
|
|
5
|
+
## Что он делает
|
|
6
|
+
|
|
7
|
+
DeepSeek Harness и так отображает Markdown в чате. Этот плагин добавляет одно: если в ответе есть блок кода `mermaid`, чат рисует его как диаграмму прямо здесь — внутри сообщения, в ходе разговора. Рядом не открывается окно и ничего не уезжает в боковую панель.
|
|
8
|
+
|
|
9
|
+
Блок кода не расходуется. Он остаётся текстом сообщения: его можно скопировать, найти поиском, переслать и прочитать после удаления плагина.
|
|
10
|
+
|
|
11
|
+
## Почему сделано именно так
|
|
12
|
+
|
|
13
|
+
- **Текст — это запись.** Каждая диаграмма строится из блока кода в момент показа, поэтому ничего не существует только в пикселях. Отключите плагин — разговор останется полным.
|
|
14
|
+
- **Внутри сообщения, а не рядом.** Окно предпросмотра рвёт нить чтения: теряется строка, на которой вы были.
|
|
15
|
+
- **Возможность — плагину, предпочтение — вам.** Плагин лишь сообщает, что здесь появляются диаграммы. Рисовать ли ассистенту — это ваша инструкция в вашем `AGENTS.md`.
|
|
16
|
+
- **О вашей машине ничего не предполагается.** Движок рисования вложен в пакет, плагин работает без сети и ничего не требует от хоста.
|
|
17
|
+
|
|
18
|
+
## Что вы получаете
|
|
19
|
+
|
|
20
|
+
- Диаграммы на месте блоков `mermaid`: блок-схема, последовательность, классы, состояния, ER, карта мыслей, шкала времени и остальные типы Mermaid 12.1.
|
|
21
|
+
- **Показать код** и **Копировать код** под каждой диаграммой: текст за картинкой в одном клике.
|
|
22
|
+
- Пока ответ печатается, блок остаётся блоком кода; диаграмма появляется, когда блок завершён.
|
|
23
|
+
- Блок, который не разбирается, показывает исходный код и одну строку с причиной — никогда пустую рамку.
|
|
24
|
+
- Цвета и шрифты следуют теме интерфейса, смена темы подхватывается без перезагрузки.
|
|
25
|
+
- На телефоне и в узком окне диаграмма перестраивается по ширине колонки, а масштаб меняется внутри диаграммы — страница не прокручивается вбок.
|
|
26
|
+
- Восемь языков интерфейса — те же, что поставляются с DeepSeek Harness.
|
|
27
|
+
- Во время работы ничего не загружается: движок внутри плагина.
|
|
28
|
+
|
|
29
|
+
## Установка
|
|
30
|
+
|
|
31
|
+
Установите пакет `@jiezhengj/dsh-dyslexia` в профиль DeepSeek Harness (страница плагинов) и перезапустите приложение. В npm: https://www.npmjs.com/package/@jiezhengj/dsh-dyslexia
|
|
32
|
+
|
|
33
|
+
## Пример
|
|
34
|
+
|
|
35
|
+
В ответе есть такой блок, и чат показывает его как картинку:
|
|
36
|
+
|
|
37
|
+
```mermaid
|
|
38
|
+
flowchart LR
|
|
39
|
+
A[Text] --> B[Diagram]
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Удаление и совместимость
|
|
43
|
+
|
|
44
|
+
- Удаление не ломает прошлые разговоры: прежние диаграммы снова становятся блоками кода, из которых появились, — читаемыми и доступными поиску.
|
|
45
|
+
- Плагин не объявляет ни порога версии, ни обязательного пакета хоста, поэтому обновление хоста не может помешать запуску приложения; если облик хоста изменится, плагин отступит и покажется исходный блок кода.
|
|
46
|
+
|
|
47
|
+
## Лицензия
|
|
48
|
+
|
|
49
|
+
MIT. Вложенный движок рисования Pele 1.13.0 также под MIT; см. `THIRD-PARTY-NOTICES.md`.
|
|
50
|
+
|
|
51
|
+
Исходный код: https://github.com/jiezhengj/DSH-Dyslexia
|
|
52
|
+
|
|
53
|
+
Другие языки: [English](README.en.md) · [简体中文](README.zh.md) · [日本語](README.ja.md) · [Español](README.es.md) · [Français](README.fr.md) · [Deutsch](README.de.md) · [Português](README.pt.md)
|
package/README.zh.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# DSH 图示阅读
|
|
2
|
+
|
|
3
|
+
> 用一张图代替一整段文字——就画在文字的位置上。
|
|
4
|
+
|
|
5
|
+
## 它做什么
|
|
6
|
+
|
|
7
|
+
DeepSeek Harness 本来就在聊天里渲染 Markdown。这个插件只加一件事:回复里出现 `mermaid` 代码块时,聊天就地把它画成图——就在消息里、在会话的行文里。不会在旁边开窗口,也不会切到侧栏。
|
|
8
|
+
|
|
9
|
+
代码块本身不会被消耗掉。它仍然是消息里的文本:可以复制、可以检索、可以转发,插件卸掉之后也照样能读。
|
|
10
|
+
|
|
11
|
+
## 为什么这样设计
|
|
12
|
+
|
|
13
|
+
- **文本才是记录。** 每张图显示时都从代码块重新生成,不存在只活在像素里的内容。关掉插件,会话依然完整。
|
|
14
|
+
- **画在图内,不画在图外。** 另开预览窗口会打断阅读线索:你会丢掉刚才读到哪一行。
|
|
15
|
+
- **能力归插件,偏好归你。** 插件只声明"这里会画图";要不要用图表达,是你写在自己 `AGENTS.md` 里的偏好。
|
|
16
|
+
- **不假设你的机器。** 绘制引擎随插件打包,运行时不联网,也不要求宿主提供任何前置依赖。
|
|
17
|
+
|
|
18
|
+
## 你会得到什么
|
|
19
|
+
|
|
20
|
+
- `mermaid` 代码块就地成图:流程图、时序图、类图、状态图、ER 图、思维导图、时间线,以及 Mermaid 12.1 的其他图形类型。
|
|
21
|
+
- 每张图下方都有**查看源码**与**复制源码**,图背后的文本永远只差一次点击。
|
|
22
|
+
- 回复还在流式输出时,代码块保持原样;代码块写完了,图才出现。
|
|
23
|
+
- 语法有问题的代码块,显示原代码块加一行原因——不会留一个空框。
|
|
24
|
+
- 颜色与字体跟随界面主题,切换主题无需刷新。
|
|
25
|
+
- 手机上或窗口很窄时,图按栏宽重排,缩放只发生在图内,页面不会横向滚动。
|
|
26
|
+
- 八种界面语言,与 DeepSeek Harness 自带的语言一一对应。
|
|
27
|
+
- 运行时不抓取任何东西:引擎就在插件里。
|
|
28
|
+
|
|
29
|
+
## 安装
|
|
30
|
+
|
|
31
|
+
在 DeepSeek Harness 的插件页安装 `@jiezhengj/dsh-dyslexia`,然后重启应用。npm 上的包:https://www.npmjs.com/package/@jiezhengj/dsh-dyslexia。
|
|
32
|
+
|
|
33
|
+
## 示例
|
|
34
|
+
|
|
35
|
+
回复里有这样一个代码块,聊天会把它显示成图:
|
|
36
|
+
|
|
37
|
+
```mermaid
|
|
38
|
+
flowchart LR
|
|
39
|
+
A[Text] --> B[Diagram]
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## 卸载与兼容性
|
|
43
|
+
|
|
44
|
+
- 卸载不会破坏任何历史会话:之前的图会变回它们来自的代码块,仍然可读、仍然可检索。
|
|
45
|
+
- 插件没有声明版本门,也没有要求任何宿主包,所以宿主升级不会让它开不了机;万一宿主接口变了,插件会主动退让,显示原本的代码块。
|
|
46
|
+
|
|
47
|
+
## 许可
|
|
48
|
+
|
|
49
|
+
MIT。随包内联的绘制引擎 Pele 1.13.0 同样是 MIT,见 `THIRD-PARTY-NOTICES.md`。
|
|
50
|
+
|
|
51
|
+
源码: https://github.com/jiezhengj/DSH-Dyslexia
|
|
52
|
+
|
|
53
|
+
其他语言: [English](README.en.md) · [日本語](README.ja.md) · [Español](README.es.md) · [Français](README.fr.md) · [Deutsch](README.de.md) · [Русский](README.ru.md) · [Português](README.pt.md)
|
package/client.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @jiezhengj/dsh-dyslexia 0.1.
|
|
1
|
+
/*! @jiezhengj/dsh-dyslexia 0.1.2 | MIT | bundles Pele 1.13.0 (MIT, see THIRD-PARTY-NOTICES.md) */
|
|
2
2
|
;(function () {
|
|
3
3
|
function reportLoadFailure(scope, error) {
|
|
4
4
|
try { console.error('dsh-dyslexia: ' + scope, error) } catch (_error) {}
|
|
@@ -265,9 +265,10 @@ function ensureFigureStyles(doc) {
|
|
|
265
265
|
}
|
|
266
266
|
|
|
267
267
|
/**
|
|
268
|
-
* Visible strings of the figure
|
|
269
|
-
*
|
|
270
|
-
*
|
|
268
|
+
* Visible strings of the figure, in every language the DeepSeek Harness interface
|
|
269
|
+
* ships (zh, en, ja, es, fr, de, ru, pt). The host serves the dictionary this
|
|
270
|
+
* module exports; the copy here is also the fallback used before the host locale
|
|
271
|
+
* service answers, so a figure never shows a bare key.
|
|
271
272
|
*/
|
|
272
273
|
|
|
273
274
|
const LOCALE_NAMESPACE = 'dyslexia'
|
|
@@ -297,9 +298,84 @@ const DICTIONARY = {
|
|
|
297
298
|
zoomIn: '放大',
|
|
298
299
|
zoomOut: '缩小',
|
|
299
300
|
},
|
|
301
|
+
ja: {
|
|
302
|
+
copied: 'コピーしました',
|
|
303
|
+
copySource: 'ソースをコピー',
|
|
304
|
+
figureLabel: '図:{{type}}',
|
|
305
|
+
hideSource: 'ソースを隠す',
|
|
306
|
+
renderFailed: 'この図は描画できないため、ソースを表示しています:{{reason}}',
|
|
307
|
+
resetZoom: '倍率をリセット',
|
|
308
|
+
showSource: 'ソースを表示',
|
|
309
|
+
syntaxError: '図の構文が正しくありません',
|
|
310
|
+
zoomIn: '拡大',
|
|
311
|
+
zoomOut: '縮小',
|
|
312
|
+
},
|
|
313
|
+
es: {
|
|
314
|
+
copied: 'Copiado',
|
|
315
|
+
copySource: 'Copiar el código',
|
|
316
|
+
figureLabel: 'Diagrama: {{type}}',
|
|
317
|
+
hideSource: 'Ocultar el código',
|
|
318
|
+
renderFailed: 'No se puede dibujar este diagrama, así que se muestra su código: {{reason}}',
|
|
319
|
+
resetZoom: 'Restablecer el zoom',
|
|
320
|
+
showSource: 'Mostrar el código',
|
|
321
|
+
syntaxError: 'la sintaxis del diagrama no es válida',
|
|
322
|
+
zoomIn: 'Acercar',
|
|
323
|
+
zoomOut: 'Alejar',
|
|
324
|
+
},
|
|
325
|
+
fr: {
|
|
326
|
+
copied: 'Copié',
|
|
327
|
+
copySource: 'Copier la source',
|
|
328
|
+
figureLabel: 'Schéma : {{type}}',
|
|
329
|
+
hideSource: 'Masquer la source',
|
|
330
|
+
renderFailed: 'Impossible de dessiner ce schéma ; sa source est affichée : {{reason}}',
|
|
331
|
+
resetZoom: 'Réinitialiser le zoom',
|
|
332
|
+
showSource: 'Afficher la source',
|
|
333
|
+
syntaxError: "la syntaxe du schéma n'est pas valide",
|
|
334
|
+
zoomIn: 'Zoomer',
|
|
335
|
+
zoomOut: 'Dézoomer',
|
|
336
|
+
},
|
|
337
|
+
de: {
|
|
338
|
+
copied: 'Kopiert',
|
|
339
|
+
copySource: 'Quelle kopieren',
|
|
340
|
+
figureLabel: 'Diagramm: {{type}}',
|
|
341
|
+
hideSource: 'Quelle ausblenden',
|
|
342
|
+
renderFailed: 'Dieses Diagramm lässt sich nicht zeichnen, daher wird seine Quelle angezeigt: {{reason}}',
|
|
343
|
+
resetZoom: 'Zoom zurücksetzen',
|
|
344
|
+
showSource: 'Quelle anzeigen',
|
|
345
|
+
syntaxError: 'die Diagrammsyntax ist ungültig',
|
|
346
|
+
zoomIn: 'Vergrößern',
|
|
347
|
+
zoomOut: 'Verkleinern',
|
|
348
|
+
},
|
|
349
|
+
ru: {
|
|
350
|
+
copied: 'Скопировано',
|
|
351
|
+
copySource: 'Копировать код',
|
|
352
|
+
figureLabel: 'Диаграмма: {{type}}',
|
|
353
|
+
hideSource: 'Скрыть код',
|
|
354
|
+
renderFailed: 'Эту диаграмму не удалось нарисовать, поэтому показан её код: {{reason}}',
|
|
355
|
+
resetZoom: 'Сбросить масштаб',
|
|
356
|
+
showSource: 'Показать код',
|
|
357
|
+
syntaxError: 'синтаксис диаграммы неверен',
|
|
358
|
+
zoomIn: 'Увеличить',
|
|
359
|
+
zoomOut: 'Уменьшить',
|
|
360
|
+
},
|
|
361
|
+
pt: {
|
|
362
|
+
copied: 'Copiado',
|
|
363
|
+
copySource: 'Copiar o código',
|
|
364
|
+
figureLabel: 'Diagrama: {{type}}',
|
|
365
|
+
hideSource: 'Ocultar o código',
|
|
366
|
+
renderFailed: 'Não foi possível desenhar este diagrama, então o código é exibido: {{reason}}',
|
|
367
|
+
resetZoom: 'Redefinir o zoom',
|
|
368
|
+
showSource: 'Mostrar o código',
|
|
369
|
+
syntaxError: 'a sintaxe do diagrama não é válida',
|
|
370
|
+
zoomIn: 'Ampliar',
|
|
371
|
+
zoomOut: 'Reduzir',
|
|
372
|
+
},
|
|
300
373
|
}
|
|
301
374
|
|
|
302
|
-
|
|
375
|
+
const LANGUAGE_CODES = Object.keys(DICTIONARY)
|
|
376
|
+
|
|
377
|
+
/** The page's language when the interface ships it, otherwise English. */
|
|
378
|
+
function fallbackLanguage(doc) {
|
|
303
379
|
let language = ''
|
|
304
380
|
try {
|
|
305
381
|
language = String((doc && doc.documentElement && doc.documentElement.lang) || '')
|
|
@@ -309,7 +385,8 @@ function prefersChinese(doc) {
|
|
|
309
385
|
if (!language && typeof navigator !== 'undefined' && navigator && navigator.language) {
|
|
310
386
|
language = String(navigator.language)
|
|
311
387
|
}
|
|
312
|
-
|
|
388
|
+
const base = language.toLowerCase().split('-')[0]
|
|
389
|
+
return LANGUAGE_CODES.indexOf(base) === -1 ? 'en' : base
|
|
313
390
|
}
|
|
314
391
|
|
|
315
392
|
/**
|
|
@@ -317,7 +394,7 @@ function prefersChinese(doc) {
|
|
|
317
394
|
* a bare key.
|
|
318
395
|
*/
|
|
319
396
|
function makeFallbackTranslate(doc) {
|
|
320
|
-
const table =
|
|
397
|
+
const table = DICTIONARY[fallbackLanguage(doc)]
|
|
321
398
|
return function translate(key, values) {
|
|
322
399
|
const template = Object.prototype.hasOwnProperty.call(table, key)
|
|
323
400
|
? table[key]
|
|
@@ -330,10 +407,23 @@ function makeFallbackTranslate(doc) {
|
|
|
330
407
|
}
|
|
331
408
|
|
|
332
409
|
/**
|
|
333
|
-
* A host
|
|
334
|
-
*
|
|
335
|
-
*
|
|
336
|
-
*
|
|
410
|
+
* A host answer counts only when it is a real translation: a non-empty string
|
|
411
|
+
* that is not the key echoed back and that no longer carries an unfilled
|
|
412
|
+
* placeholder. A host that has not registered this plugin's namespace answers
|
|
413
|
+
* with the key itself, which is how a bare `copySource` once reached a screen.
|
|
414
|
+
*/
|
|
415
|
+
function isResolved(value, key) {
|
|
416
|
+
if (typeof value !== 'string' || value.length === 0) return false
|
|
417
|
+
if (value.indexOf(key) !== -1) return false
|
|
418
|
+
return value.indexOf('{{') === -1
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
/**
|
|
422
|
+
* A host `t` is used when it answers with a real translation and its signature
|
|
423
|
+
* still matches; anything else — a changed signature, a throw, an empty answer,
|
|
424
|
+
* the key echoed back, an unfilled placeholder — falls back to the strings
|
|
425
|
+
* shipped here, so a picture is never lost over a label and no internal key is
|
|
426
|
+
* ever shown.
|
|
337
427
|
*/
|
|
338
428
|
function translateFor(props, doc) {
|
|
339
429
|
const fallback = makeFallbackTranslate(doc)
|
|
@@ -342,7 +432,7 @@ function translateFor(props, doc) {
|
|
|
342
432
|
return function translate(key, values) {
|
|
343
433
|
try {
|
|
344
434
|
const value = hostTranslate(key, values)
|
|
345
|
-
if (
|
|
435
|
+
if (isResolved(value, key)) return value
|
|
346
436
|
} catch (error) {
|
|
347
437
|
void error
|
|
348
438
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+

|
|
@@ -0,0 +1 @@
|
|
|
1
|
+

|
|
@@ -0,0 +1 @@
|
|
|
1
|
+

|
|
@@ -0,0 +1 @@
|
|
|
1
|
+

|
package/docs/DETAIL.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+

|
|
@@ -0,0 +1 @@
|
|
|
1
|
+

|
|
@@ -0,0 +1 @@
|
|
|
1
|
+

|
|
@@ -0,0 +1 @@
|
|
|
1
|
+

|
package/docs/preview.svg
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="640" height="300" viewBox="0 0 640 300">
|
|
2
|
+
<rect width="640" height="300" fill="#F5F6FC"/>
|
|
3
|
+
<g id="source">
|
|
4
|
+
<rect x="36" y="62" width="176" height="176" rx="16" fill="#FFFFFF" stroke="#E4E8F6" stroke-width="2"/>
|
|
5
|
+
<path d="M36 78a16 16 0 0 1 16-16h144a16 16 0 0 1 16 16v18H36z" fill="#E4E8F6" fill-opacity="0.6"/>
|
|
6
|
+
<circle cx="56" cy="79" r="4" fill="#658EFF"/>
|
|
7
|
+
<circle cx="70" cy="79" r="4" fill="#B9C1D9"/>
|
|
8
|
+
<circle cx="84" cy="79" r="4" fill="#B9C1D9"/>
|
|
9
|
+
<rect x="60" y="108" width="30" height="9" rx="4.5" fill="#658EFF"/>
|
|
10
|
+
<rect x="96" y="128" width="60" height="9" rx="4.5" fill="#B9C1D9"/>
|
|
11
|
+
<rect x="60" y="148" width="40" height="9" rx="4.5" fill="#B9C1D9"/>
|
|
12
|
+
<rect x="104" y="168" width="48" height="9" rx="4.5" fill="#B9C1D9"/>
|
|
13
|
+
<rect x="84" y="188" width="64" height="9" rx="4.5" fill="#41E1AC"/>
|
|
14
|
+
<rect x="112" y="208" width="36" height="9" rx="4.5" fill="#B9C1D9"/>
|
|
15
|
+
</g>
|
|
16
|
+
<g id="arrow">
|
|
17
|
+
<path d="M220 150h16" stroke="#658EFF" stroke-width="3.5" stroke-linecap="round" fill="none"/>
|
|
18
|
+
<path d="M233 143.5 244 150l-11 6.5z" fill="#658EFF"/>
|
|
19
|
+
</g>
|
|
20
|
+
<g id="figure">
|
|
21
|
+
<rect x="260" y="52" width="344" height="196" rx="14" fill="#FFFFFF" stroke="#E4E8F6" stroke-width="2"/>
|
|
22
|
+
<g style="--pele-bg:#ffffff;--pele-fg:#1f2430;--pele-muted:#6b7387;--pele-line:#4a5a86;--pele-surface:#eef2fb;--pele-surface-alt:#e2e9f8;--pele-border:#b9cbef;--pele-accent:#658eff;--pele-font:system-ui, sans-serif;--pele-font-mono:ui-monospace, monospace" transform="translate(321.64 72.00) scale(0.8026)">
|
|
23
|
+
<svg xmlns="http://www.w3.org/2000/svg" class="pele pele-flowchart" viewBox="0 0 275 152" width="275" height="152" style="max-width:100%;height:auto;--_bg:var(--pele-bg,#fff);--_fg:var(--pele-fg,#1f1f1f);--_m:var(--pele-muted,#6e6e6e);--_l:var(--pele-line,#1f1f1f);--_s:var(--pele-surface,#f3f3f3);--_a:var(--pele-surface-alt,#e6e6e6);--_b:var(--pele-border,#8a8a8a);--_c:var(--pele-accent,#5b7bd5);color:var(--_fg);--_r:var(--pele-radius,4px);--_fm:var(--pele-font-mono,monospace);font:13px sans-serif;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;font-family:var(--pele-font,sans-serif)" fill="var(--_fg)" role="graphics-document document" aria-roledescription="flowchart"><g class="pele-edges" fill="none" stroke="var(--_l)" stroke-linecap="round"><g class="pele-edge" data-id="L_A_B_0"><path d="M113.03,68C130.53,68 130.53,34 148.03,34L154.03,34"/><path class="pele-marker" d="M161.03,34L153.03,37.36L153.03,30.64Z" fill="var(--_l)" stroke="none"/></g><g class="pele-edge" data-id="L_A_C_0"><path d="M113.03,84C130.53,84 130.53,118 148.03,118L154.03,118"/><path class="pele-marker" d="M161.03,118L153.03,121.36L153.03,114.64Z" fill="var(--_l)" stroke="none"/></g></g><g class="pele-nodes"><g class="pele-node pele-shape-rect" data-id="A" transform="translate(62.51,76)"><rect x="-50.51" y="-22" width="101.03" height="44" fill="var(--_s)" stroke="var(--_b)" style="rx:var(--_r)"/><text class="pele-label" x="0" y="4.55" text-anchor="middle">Code block</text></g><g class="pele-node pele-shape-rect" data-id="B" transform="translate(203.58,34)"><rect x="-42.56" y="-22" width="85.11" height="44" fill="var(--_s)" stroke="var(--_b)" style="rx:var(--_r)"/><text class="pele-label" x="0" y="4.55" text-anchor="middle">Diagram</text></g><g class="pele-node pele-shape-rect" data-id="C" transform="translate(211.9,118)"><rect x="-50.88" y="-22" width="101.75" height="44" fill="var(--_s)" stroke="var(--_b)" style="rx:var(--_r)"/><text class="pele-label" x="0" y="4.55" text-anchor="middle">Source text</text></g></g></svg>
|
|
24
|
+
</g>
|
|
25
|
+
<path d="M278 202h308" stroke="#E4E8F6" stroke-width="2" stroke-linecap="round"/>
|
|
26
|
+
</g>
|
|
27
|
+
<g id="buttons">
|
|
28
|
+
<rect x="278" y="214" width="32" height="26" rx="13" fill="#E4E8F6" fill-opacity="0.8"/>
|
|
29
|
+
<rect x="318" y="214" width="32" height="26" rx="13" fill="#E4E8F6" fill-opacity="0.8"/>
|
|
30
|
+
<g stroke="#1F2430" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round" fill="none" opacity="0.7">
|
|
31
|
+
<rect x="288" y="221" width="9" height="11" rx="2.5"/>
|
|
32
|
+
<path d="M294 218.5h5.5a2.5 2.5 0 0 1 2.5 2.5v8.5"/>
|
|
33
|
+
</g>
|
|
34
|
+
<g stroke="#1F2430" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round" fill="none" opacity="0.7">
|
|
35
|
+
<path d="M331 221.5 326.5 226l4.5 4.5"/>
|
|
36
|
+
<path d="M337 221.5 341.5 226l-4.5 4.5"/>
|
|
37
|
+
</g>
|
|
38
|
+
</g>
|
|
39
|
+
</svg>
|
package/icon.svg
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
<svg
|
|
2
|
-
<rect x="
|
|
3
|
-
<
|
|
4
|
-
<rect x="
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect x="5.5" y="6.5" width="13" height="10" rx="3.2" fill="url(#dyslexia-node)"/>
|
|
3
|
+
<path d="M18.5 11.5h4.6c1.9 0 3.2 1.4 3.2 3.2v5.6" stroke="#679EFE" stroke-width="3" stroke-linecap="round"/>
|
|
4
|
+
<rect x="19.4" y="20.4" width="12.2" height="10.2" rx="3.4" stroke="#41E1AC" stroke-width="3.4"/>
|
|
5
|
+
<defs>
|
|
6
|
+
<linearGradient id="dyslexia-node" x1="5.5" y1="6" x2="20" y2="21" gradientUnits="userSpaceOnUse">
|
|
7
|
+
<stop stop-color="#7CB7FF"/>
|
|
8
|
+
<stop offset="1" stop-color="#145AF3"/>
|
|
9
|
+
</linearGradient>
|
|
10
|
+
</defs>
|
|
8
11
|
</svg>
|
package/locale/de.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"title": "DSH Lesbare Diagramme",
|
|
4
|
+
"description": "Zeichnet jeden mermaid-Codeblock einer Unterhaltung direkt in der Nachricht als Diagramm – ohne Seitenleiste und ohne zweites Fenster. Der Codeblock bleibt der Text der Nachricht und lässt sich daher kopieren, durchsuchen und auch nach dem Ausschalten dieses Plugins noch lesen. Unter jedem Diagramm: Quelle anzeigen und Quelle kopieren; auf einem Telefon passt sich das Diagramm der Spaltenbreite an, und der Zoom bleibt in seinem Rahmen.",
|
|
5
|
+
"detail": "docs/DETAIL.de.md"
|
|
6
|
+
}
|
|
7
|
+
}
|
package/locale/en.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"meta": {
|
|
3
3
|
"title": "DSH Dyslexia",
|
|
4
|
-
"description": "
|
|
4
|
+
"description": "Draws each mermaid code block in a conversation as a diagram, in place in the message — no side panel, no second window. The code block stays the message’s own text, so it can be copied, searched, and still read after this plugin is turned off. Under every drawing: Show source and Copy source; on a phone the drawing reflows to the column width and zooms inside its own frame.",
|
|
5
|
+
"detail": "docs/DETAIL.md"
|
|
5
6
|
}
|
|
6
7
|
}
|
package/locale/es.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"title": "DSH Diagramas legibles",
|
|
4
|
+
"description": "Dibuja cada bloque de código mermaid de una conversación como un diagrama, dentro del propio mensaje: sin panel lateral y sin una segunda ventana. El bloque de código sigue siendo el texto del mensaje, así que se puede copiar, buscar y seguir leyendo aunque desactives este complemento. Bajo cada dibujo: Mostrar el código y Copiar el código; en un teléfono el dibujo se recompone al ancho de la columna y el zoom ocurre dentro de su marco.",
|
|
5
|
+
"detail": "docs/DETAIL.es.md"
|
|
6
|
+
}
|
|
7
|
+
}
|
package/locale/fr.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"title": "DSH Schémas lisibles",
|
|
4
|
+
"description": "Dessine chaque bloc de code mermaid d’une conversation sous forme de schéma, à sa place dans le message : ni panneau latéral, ni seconde fenêtre. Le bloc de code reste le texte du message, donc il peut être copié, recherché et lu même après la désactivation de ce greffon. Sous chaque schéma : Afficher la source et Copier la source ; sur un téléphone, le schéma se recompose à la largeur de la colonne et le zoom reste dans son cadre.",
|
|
5
|
+
"detail": "docs/DETAIL.fr.md"
|
|
6
|
+
}
|
|
7
|
+
}
|
package/locale/ja.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"title": "DSH 図で読む",
|
|
4
|
+
"description": "会話内の mermaid コードブロックを、その場で図に描き直します。図はメッセージの中に表示され、サイドパネルも別ウィンドウも開きません。コードブロックはメッセージ本文のまま残るため、コピーや検索ができ、このプラグインをオフにしても読めます。図の下には「ソースを表示」と「ソースをコピー」。スマートフォンでは列の幅に合わせて組み替わり、拡大縮小は図の中だけで行います。",
|
|
5
|
+
"detail": "docs/DETAIL.ja.md"
|
|
6
|
+
}
|
|
7
|
+
}
|
package/locale/pt.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"title": "DSH Diagramas legíveis",
|
|
4
|
+
"description": "Desenha cada bloco de código mermaid de uma conversa como um diagrama, no próprio lugar da mensagem: sem painel lateral e sem uma segunda janela. O bloco de código continua sendo o texto da mensagem, então pode ser copiado, pesquisado e lido mesmo depois de desativar este plugin. Sob cada desenho: Mostrar o código e Copiar o código; no celular o desenho se reorganiza na largura da coluna e o zoom acontece dentro da própria moldura.",
|
|
5
|
+
"detail": "docs/DETAIL.pt.md"
|
|
6
|
+
}
|
|
7
|
+
}
|
package/locale/ru.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"title": "DSH Читаемые диаграммы",
|
|
4
|
+
"description": "Рисует каждый блок кода mermaid в переписке как диаграмму прямо в сообщении: без боковой панели и второго окна. Блок кода остаётся текстом сообщения, поэтому его можно скопировать, найти поиском и прочитать даже после отключения этого плагина. Под каждой диаграммой: «Показать код» и «Копировать код»; на телефоне диаграмма перестраивается по ширине колонки, а масштаб меняется внутри её рамки.",
|
|
5
|
+
"detail": "docs/DETAIL.ru.md"
|
|
6
|
+
}
|
|
7
|
+
}
|
package/locale/zh.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"meta": {
|
|
3
|
-
"title": "DSH
|
|
4
|
-
"description": "把会话里的
|
|
3
|
+
"title": "DSH 图示阅读",
|
|
4
|
+
"description": "把会话里的 mermaid 代码块就地画成图——图就在消息里,不开侧栏、不弹第二个窗口。代码块仍然是消息原文的一部分,可复制、可检索,插件关掉以后也照样能读。每张图下方有「查看源码」与「复制源码」;手机上按栏宽重排,缩放只在图内进行。",
|
|
5
|
+
"detail": "docs/DETAIL.zh.md"
|
|
5
6
|
}
|
|
6
7
|
}
|
package/package.json
CHANGED
|
@@ -1,16 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jiezhengj/dsh-dyslexia",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "Draws mermaid code blocks in DeepSeek Harness conversations as diagrams, in place in the message.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dsh",
|
|
7
7
|
"dsh-plugin",
|
|
8
8
|
"mermaid",
|
|
9
9
|
"diagram",
|
|
10
|
-
"dyslexia"
|
|
10
|
+
"dyslexia",
|
|
11
|
+
"accessibility"
|
|
11
12
|
],
|
|
12
13
|
"type": "module",
|
|
13
14
|
"main": "index.js",
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "git+https://github.com/jiezhengj/DSH-Dyslexia.git"
|
|
18
|
+
},
|
|
19
|
+
"homepage": "https://github.com/jiezhengj/DSH-Dyslexia#readme",
|
|
20
|
+
"bugs": {
|
|
21
|
+
"url": "https://github.com/jiezhengj/DSH-Dyslexia/issues"
|
|
22
|
+
},
|
|
14
23
|
"exports": {
|
|
15
24
|
".": "./index.js",
|
|
16
25
|
"./client": "./client.js",
|
|
@@ -31,10 +40,11 @@
|
|
|
31
40
|
"client.js",
|
|
32
41
|
"cordis.patch.yml",
|
|
33
42
|
"locale/*.json",
|
|
43
|
+
"docs",
|
|
34
44
|
"icon.svg",
|
|
35
45
|
"LICENSE",
|
|
36
46
|
"THIRD-PARTY-NOTICES.md",
|
|
37
|
-
"README
|
|
47
|
+
"README*.md"
|
|
38
48
|
],
|
|
39
49
|
"license": "MIT",
|
|
40
50
|
"publishConfig": {
|