Skip to content

A team of long-lived bots for DeepSeek Harness, with main bots, bot-to-bot messages and group chats.

Draw the desktop app's window with the plugin's Bot views

Fei24114fd3bec6badb
diff --git a/app/README.md b/app/README.md
index f9b2d4d6..a02ce4dd 100644
--- a/app/README.md
+++ b/app/README.md
@@ -42,7 +42,7 @@ Never point `DS_BOT_HOME` at `~/.dsh` or at the data of an app that you use.
| `src/host-process.mjs` | Starts the Host in Electron's Node mode and owns its exit |
| `src/host.mjs` | The Host: creates the profile `ds-bot` (`dsh-base`, `dsh-web-app`, `ds-bot`), boots it with `runProfile()` on a loopback port and reports the launch URL |
| `src/web.mjs` | The window's files, the launch-token cookie exchange and the request forwarding |
-| `ui/` | The window: React, built with Vite (`vite.config.js`) into `ui/dist`. It uses ds-bot's `api/bot` channel and its live feed `api/bot/feed`, and takes the Bot marks, themes and copy from `../ds-bot/src/client/` |
+| `ui/` | The window: React, built with Vite (`vite.config.js`) into `ui/dist`. It draws the plugin's own Bot views from `../ds-bot/src/client/` (sidebar, chat rows, docks, dialogs and their stylesheets) and puts its own Markdown in place of DSH's. It uses ds-bot's `api/bot` channel and its live feed `api/bot/feed` |
The Host installs plugins with the app's own pnpm (`node_modules/pnpm`).
diff --git a/app/package-lock.json b/app/package-lock.json
index e400142f..25da976b 100644
--- a/app/package-lock.json
+++ b/app/package-lock.json
@@ -20,6 +20,8 @@
"electron": "44.7.0",
"react": "19.3.0",
"react-dom": "19.3.0",
+ "react-markdown": "10.1.0",
+ "remark-gfm": "4.0.1",
"vite": "8.3.4"
}
},
@@ -7101,12 +7103,66 @@
"tslib": "^2.8.0"
}
},
+ "node_modules/@types/debug": {
+ "version": "4.1.13",
+ "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.13.tgz",
+ "integrity": "sha512-KSVgmQmzMwPlmtljOomayoR89W4FynCAi3E8PPs7vmDVPe84hT+vGPKkJfThkmXs0x0jAaa9U8uW8bbfyS2fWw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/ms": "*"
+ }
+ },
+ "node_modules/@types/estree": {
+ "version": "1.0.9",
+ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz",
+ "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@types/estree-jsx": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/@types/estree-jsx/-/estree-jsx-1.0.5.tgz",
+ "integrity": "sha512-52CcUVNFyfb1A2ALocQw/Dd1BQFNmSdkuC3BkZ6iqhdMfQz7JWOFRuJFloOzjk+6WijU56m9oKXFAXc7o3Towg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/estree": "*"
+ }
+ },
+ "node_modules/@types/hast": {
+ "version": "3.0.5",
+ "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.5.tgz",
+ "integrity": "sha512-rp/ezSWaD1m44dPKICGhiskI13nVr7qTloFwDa/IYkhhf5nzwP+zIQcIJh3WIFSBOy/H1PzB40jPjMDksN4F+g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "*"
+ }
+ },
"node_modules/@types/http-cache-semantics": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.2.0.tgz",
"integrity": "sha512-L3LgimLHXtGkWikKnsPg0/VFx9OGZaC+eN1u4r+OB1XRqH3meBIAVC2zr1WdMH+RHmnRkqliQAOHNJ/E0j/e0Q==",
"license": "MIT"
},
+ "node_modules/@types/mdast": {
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz",
+ "integrity": "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "*"
+ }
+ },
+ "node_modules/@types/ms": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/@types/ms/-/ms-2.1.0.tgz",
+ "integrity": "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==",
+ "dev": true,
+ "license": "MIT"
+ },
"node_modules/@types/node": {
"version": "24.19.2",
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.19.2.tgz",
@@ -7116,12 +7172,37 @@
"undici-types": ">=7.24.0 <7.24.7"
}
},
+ "node_modules/@types/react": {
+ "version": "19.3.0",
+ "resolved": "https://registry.npmjs.org/@types/react/-/react-19.3.0.tgz",
+ "integrity": "sha512-N0rFCuH9YoxG9/m61l9MfpJKfmLOVU0em7ipIz6TRgSSkvReLB9vL85GB+yr8Bs5leqpvg96JSwF4ZS1s4viQg==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "csstype": "^3.2.2"
+ }
+ },
"node_modules/@types/retry": {
"version": "0.12.0",
"resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.0.tgz",
"integrity": "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==",
"license": "MIT"
},
+ "node_modules/@types/unist": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz",
+ "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@ungap/structured-clone": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.4.0.tgz",
+ "integrity": "sha512-1mEZtMKPM09vDmQt5y7YvmN2+DFTP7Tg0EWXdic8/C6VRnpb33e4ghisCIE3WZjsE2N8mf+QV1Zqh7ZFYLWInQ==",
+ "dev": true,
+ "license": "ISC"
+ },
"node_modules/@vscode/ripgrep": {
"version": "1.18.0",
"resolved": "https://registry.npmjs.org/@vscode/ripgrep/-/ripgrep-1.18.0.tgz",
@@ -7344,6 +7425,17 @@
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
"license": "Python-2.0"
},
+ "node_modules/bail": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/bail/-/bail-2.0.2.tgz",
+ "integrity": "sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==",
+ "dev": true,
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
"node_modules/base64-js": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
@@ -7457,6 +7549,61 @@
"node": ">=18"
}
},
+ "node_modules/ccount": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/ccount/-/ccount-2.0.1.tgz",
+ "integrity": "sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==",
+ "dev": true,
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/character-entities": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-2.0.2.tgz",
+ "integrity": "sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==",
+ "dev": true,
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/character-entities-html4": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/character-entities-html4/-/character-entities-html4-2.1.0.tgz",
+ "integrity": "sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==",
+ "dev": true,
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/character-entities-legacy": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-3.0.0.tgz",
+ "integrity": "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==",
+ "dev": true,
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/character-reference-invalid": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-2.0.1.tgz",
+ "integrity": "sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw==",
+ "dev": true,
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
"node_modules/chokidar": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz",
@@ -7481,6 +7628,17 @@
"node": ">=0.8"
}
},
+ "node_modules/comma-separated-tokens": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz",
+ "integrity": "sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==",
+ "dev": true,
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
"node_modules/commander": {
"version": "15.0.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-15.0.0.tgz",
@@ -7561,6 +7719,14 @@
"node": ">= 8"
}
},
+ "node_modules/csstype": {
+ "version": "3.2.3",
+ "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz",
+ "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true
+ },
"node_modules/data-uri-to-buffer": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz",
@@ -7579,6 +7745,20 @@
"ms": "2.0.0"
}
},
+ "node_modules/decode-named-character-reference": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/decode-named-character-reference/-/decode-named-character-reference-1.3.0.tgz",
+ "integrity": "sha512-GtpQYB283KrPp6nRw50q3U9/VfOutZOe103qlN7BPP6Ad27xYnOIWv4lPzo8HCAL+mMZofJ9KEy30fq6MfaK6Q==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "character-entities": "^2.0.0"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
"node_modules/decompress-response": {
"version": "10.0.0",
"resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-10.0.0.tgz",
@@ -7634,6 +7814,16 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/dequal": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz",
+ "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
"node_modules/destroy": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
@@ -7653,6 +7843,20 @@
"node": ">=8"
}
},
+ "node_modules/devlop": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/devlop/-/devlop-1.1.0.tgz",
+ "integrity": "sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "dequal": "^2.0.0"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
"node_modules/dfa": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/dfa/-/dfa-1.2.0.tgz",
@@ -7720,6 +7924,30 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/escape-string-regexp": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz",
+ "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/estree-util-is-identifier-name": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/estree-util-is-identifier-name/-/estree-util-is-identifier-name-3.0.0.tgz",
+ "integrity": "sha512-hFtqIDZTIUZ9BXLb8y4pYGyk6+wekIivNVTcmvk8NoOh+VeRn5y6cEHzbURrWbfp1fIqdVipilzj+lfaadNZmg==",
+ "dev": true,
+ "license": "MIT",
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
"node_modules/eventsource": {
"version": "3.0.7",
"resolved": "https://registry.npmjs.org/eventsource/-/eventsource-3.0.7.tgz",
@@ -8064,6 +8292,59 @@
"dev": true,
"license": "ISC"
},
+ "node_modules/hast-util-to-jsx-runtime": {
+ "version": "2.3.6",
+ "resolved": "https://registry.npmjs.org/hast-util-to-jsx-runtime/-/hast-util-to-jsx-runtime-2.3.6.tgz",
+ "integrity": "sha512-zl6s8LwNyo1P9uw+XJGvZtdFF1GdAkOg8ujOw+4Pyb76874fLps4ueHXDhXWdk6YHQ6OgUtinliG7RsYvCbbBg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/estree": "^1.0.0",
+ "@types/hast": "^3.0.0",
+ "@types/unist": "^3.0.0",
+ "comma-separated-tokens": "^2.0.0",
+ "devlop": "^1.0.0",
+ "estree-util-is-identifier-name": "^3.0.0",
+ "hast-util-whitespace": "^3.0.0",
+ "mdast-util-mdx-expression": "^2.0.0",
+ "mdast-util-mdx-jsx": "^3.0.0",
+ "mdast-util-mdxjs-esm": "^2.0.0",
+ "property-information": "^7.0.0",
+ "space-separated-tokens": "^2.0.0",
+ "style-to-js": "^1.0.0",
+ "unist-util-position": "^5.0.0",
+ "vfile-message": "^4.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/hast-util-whitespace": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/hast-util-whitespace/-/hast-util-whitespace-3.0.0.tgz",
+ "integrity": "sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/hast": "^3.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/html-url-attributes": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/html-url-attributes/-/html-url-attributes-3.0.1.tgz",
+ "integrity": "sha512-ol6UPyBWqsrO6EJySPz2O7ZSr856WDrEzM5zMqp+FJJLGMW35cLYmmZnl0vztAZxRUoNZJFTCohfjuIJ8I4QBQ==",
+ "dev": true,
+ "license": "MIT",
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
"node_modules/http-cache-semantics": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.3.0.tgz",
@@ -8166,6 +8447,13 @@
"node": ">=18.18.0"
}
},
+ "node_modules/inline-style-parser": {
+ "version": "0.2.7",
+ "resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.2.7.tgz",
+ "integrity": "sha512-Nb2ctOyNR8DqQoR0OwRG95uNWIC0C1lCgf5Naz5H6Ji72KZ8OcFZLz2P5sNgwlyoJ8Yif11oMuYs5pBQa86csA==",
+ "dev": true,
+ "license": "MIT"
+ },
"node_modules/ipaddr.js": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.5.0.tgz",
@@ -8175,6 +8463,43 @@
"node": ">= 10"
}
},
+ "node_modules/is-alphabetical": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-2.0.1.tgz",
+ "integrity": "sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ==",
+ "dev": true,
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/is-alphanumerical": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-2.0.1.tgz",
+ "integrity": "sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "is-alphabetical": "^2.0.0",
+ "is-decimal": "^2.0.0"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/is-decimal": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-2.0.1.tgz",
+ "integrity": "sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A==",
+ "dev": true,
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
"node_modules/is-docker": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz",
@@ -8190,6 +8515,17 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/is-hexadecimal": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-2.0.1.tgz",
+ "integrity": "sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg==",
+ "dev": true,
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
"node_modules/is-in-ssh": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-in-ssh/-/is-in-ssh-1.0.0.tgz",
@@ -8684,6 +9020,17 @@
"integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==",
"license": "Apache-2.0"
},
+ "node_modules/longest-streak": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-3.1.0.tgz",
+ "integrity": "sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==",
+ "dev": true,
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
"node_modules/lowercase-keys": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-3.0.0.tgz",
@@ -8696,72 +9043,1008 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/mime-db": {
- "version": "1.54.0",
- "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz",
- "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==",
+ "node_modules/markdown-table": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-3.0.4.tgz",
+ "integrity": "sha512-wiYz4+JrLyb/DqW2hkFJxP7Vd7JuTDm77fvbM8VfEQdmSMqcImWeeRbHwZjBjIFki/VaMK2BhFi7oUUZeM5bqw==",
+ "dev": true,
"license": "MIT",
- "engines": {
- "node": ">= 0.6"
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
}
},
- "node_modules/mime-types": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz",
- "integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==",
+ "node_modules/mdast-util-find-and-replace": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/mdast-util-find-and-replace/-/mdast-util-find-and-replace-3.0.3.tgz",
+ "integrity": "sha512-xPgpDNl0/OXHsI7TlaIs22lWnH3KlpvZdXG1ET/m/YT2Hhdkx8lJV4kLphE6l9simyM4KPDFBwas08BgEob6Jw==",
+ "dev": true,
"license": "MIT",
"dependencies": {
- "mime-db": "^1.54.0"
- },
- "engines": {
- "node": ">=18"
+ "@types/mdast": "^4.0.0",
+ "escape-string-regexp": "^5.0.0",
+ "unist-util-is": "^6.0.0",
+ "unist-util-visit-parents": "^6.0.0"
},
"funding": {
"type": "opencollective",
- "url": "https://opencollective.com/express"
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/mimic-response": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-4.0.0.tgz",
- "integrity": "sha512-e5ISH9xMYU0DzrT+jl8q2ze9D6eWBto+I8CNpe+VI+K2J/F/k3PdkdTdz4wvGVH4NTpo+NRYTVIuMQEMMcsLqg==",
+ "node_modules/mdast-util-from-markdown": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-2.1.0.tgz",
+ "integrity": "sha512-KRLgmPaP2H1ul2bpoJkOS+9pAcDAAj9Nu1mqLnh8NLeJG5tlvj42TH80PIGBpROWlRXLk0lDrWNuZCFy/tsB4A==",
+ "dev": true,
"license": "MIT",
- "engines": {
- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ "dependencies": {
+ "@types/mdast": "^4.0.0",
+ "@types/unist": "^3.0.0",
+ "decode-named-character-reference": "^1.0.0",
+ "devlop": "^1.0.0",
+ "mdast-util-to-string": "^4.0.0",
+ "micromark": "^4.0.0",
+ "micromark-util-decode-numeric-character-reference": "^2.0.0",
+ "micromark-util-decode-string": "^2.0.0",
+ "micromark-util-normalize-identifier": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0",
+ "unist-util-stringify-position": "^4.0.0"
},
"funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/ms": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
- "license": "MIT"
- },
- "node_modules/nanoid": {
- "version": "3.3.20",
- "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.20.tgz",
- "integrity": "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==",
+ "node_modules/mdast-util-gfm": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/mdast-util-gfm/-/mdast-util-gfm-3.1.0.tgz",
+ "integrity": "sha512-0ulfdQOM3ysHhCJ1p06l0b0VKlhU0wuQs3thxZQagjcjPrlFRqY215uZGHHJan9GEAXd9MbfPjFJz+qMkVR6zQ==",
"dev": true,
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/ai"
- }
- ],
"license": "MIT",
- "bin": {
- "nanoid": "bin/nanoid.cjs"
+ "dependencies": {
+ "mdast-util-from-markdown": "^2.0.0",
+ "mdast-util-gfm-autolink-literal": "^2.0.0",
+ "mdast-util-gfm-footnote": "^2.0.0",
+ "mdast-util-gfm-strikethrough": "^2.0.0",
+ "mdast-util-gfm-table": "^2.0.0",
+ "mdast-util-gfm-task-list-item": "^2.0.0",
+ "mdast-util-to-markdown": "^2.0.0"
},
- "engines": {
- "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/negotiator": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.1.0.tgz",
- "integrity": "sha512-NMPBRMJgiQHjbd8phG3Vebdx4kZ1H121rbl5IkMqeOsahptB9BKo/d7oJ3zTXqTgagn2bWlNSXkh0QUGM31RYg==",
+ "node_modules/mdast-util-gfm-autolink-literal": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/mdast-util-gfm-autolink-literal/-/mdast-util-gfm-autolink-literal-2.0.1.tgz",
+ "integrity": "sha512-5HVP2MKaP6L+G6YaxPNjuL0BPrq9orG3TsrZ9YXbA3vDw/ACI4MEsnoDpn6ZNm7GnZgtAcONJyPhOP8tNJQavQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/mdast": "^4.0.0",
+ "ccount": "^2.0.0",
+ "devlop": "^1.0.0",
+ "mdast-util-find-and-replace": "^3.0.0",
+ "micromark-util-character": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/mdast-util-gfm-footnote": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/mdast-util-gfm-footnote/-/mdast-util-gfm-footnote-2.1.0.tgz",
+ "integrity": "sha512-sqpDWlsHn7Ac9GNZQMeUzPQSMzR6Wv0WKRNvQRg0KqHh02fpTz69Qc1QSseNX29bhz1ROIyNyxExfawVKTm1GQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/mdast": "^4.0.0",
+ "devlop": "^1.1.0",
+ "mdast-util-from-markdown": "^2.0.0",
+ "mdast-util-to-markdown": "^2.0.0",
+ "micromark-util-normalize-identifier": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/mdast-util-gfm-strikethrough": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/mdast-util-gfm-strikethrough/-/mdast-util-gfm-strikethrough-2.0.1.tgz",
+ "integrity": "sha512-OuJHqvr455pwu2OaOrir7dbzqs4jlWKOtlu9L6GjcIjjQwNyw02VntQsr/Ek6/A13vgnXfUhBekWRUP1OkNivw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/mdast": "^4.0.0",
+ "mdast-util-from-markdown": "^2.0.0",
+ "mdast-util-to-markdown": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/mdast-util-gfm-table": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/mdast-util-gfm-table/-/mdast-util-gfm-table-2.0.0.tgz",
+ "integrity": "sha512-78UEvebzz/rJIxLvE7ZtDd/vIQ0RHv+3Mh5DR96p7cS7HsBhYIICDBCu8csTNWNO6tBWfqXPWekRuj2FNOGOZg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/mdast": "^4.0.0",
+ "devlop": "^1.0.0",
+ "markdown-table": "^3.0.0",
+ "mdast-util-from-markdown": "^2.0.0",
+ "mdast-util-to-markdown": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/mdast-util-gfm-task-list-item": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/mdast-util-gfm-task-list-item/-/mdast-util-gfm-task-list-item-2.0.0.tgz",
+ "integrity": "sha512-IrtvNvjxC1o06taBAVJznEnkiHxLFTzgonUdy8hzFVeDun0uTjxxrRGVaNFqkU1wJR3RBPEfsxmU6jDWPofrTQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/mdast": "^4.0.0",
+ "devlop": "^1.0.0",
+ "mdast-util-from-markdown": "^2.0.0",
+ "mdast-util-to-markdown": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/mdast-util-mdx-expression": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/mdast-util-mdx-expression/-/mdast-util-mdx-expression-2.0.1.tgz",
+ "integrity": "sha512-J6f+9hUp+ldTZqKRSg7Vw5V6MqjATc+3E4gf3CFNcuZNWD8XdyI6zQ8GqH7f8169MM6P7hMBRDVGnn7oHB9kXQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/estree-jsx": "^1.0.0",
+ "@types/hast": "^3.0.0",
+ "@types/mdast": "^4.0.0",
+ "devlop": "^1.0.0",
+ "mdast-util-from-markdown": "^2.0.0",
+ "mdast-util-to-markdown": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/mdast-util-mdx-jsx": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/mdast-util-mdx-jsx/-/mdast-util-mdx-jsx-3.2.0.tgz",
+ "integrity": "sha512-lj/z8v0r6ZtsN/cGNNtemmmfoLAFZnjMbNyLzBafjzikOM+glrjNHPlf6lQDOTccj9n5b0PPihEBbhneMyGs1Q==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/estree-jsx": "^1.0.0",
+ "@types/hast": "^3.0.0",
+ "@types/mdast": "^4.0.0",
+ "@types/unist": "^3.0.0",
+ "ccount": "^2.0.0",
+ "devlop": "^1.1.0",
+ "mdast-util-from-markdown": "^2.0.0",
+ "mdast-util-to-markdown": "^2.0.0",
+ "parse-entities": "^4.0.0",
+ "stringify-entities": "^4.0.0",
+ "unist-util-stringify-position": "^4.0.0",
+ "vfile-message": "^4.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/mdast-util-mdxjs-esm": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/mdast-util-mdxjs-esm/-/mdast-util-mdxjs-esm-2.0.1.tgz",
+ "integrity": "sha512-EcmOpxsZ96CvlP03NghtH1EsLtr0n9Tm4lPUJUBccV9RwUOneqSycg19n5HGzCf+10LozMRSObtVr3ee1WoHtg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/estree-jsx": "^1.0.0",
+ "@types/hast": "^3.0.0",
+ "@types/mdast": "^4.0.0",
+ "devlop": "^1.0.0",
+ "mdast-util-from-markdown": "^2.0.0",
+ "mdast-util-to-markdown": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/mdast-util-phrasing": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/mdast-util-phrasing/-/mdast-util-phrasing-4.1.0.tgz",
+ "integrity": "sha512-TqICwyvJJpBwvGAMZjj4J2n0X8QWp21b9l0o7eXyVJ25YNWYbJDVIyD1bZXE6WtV6RmKJVYmQAKWa0zWOABz2w==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/mdast": "^4.0.0",
+ "unist-util-is": "^6.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/mdast-util-to-hast": {
+ "version": "13.2.1",
+ "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-13.2.1.tgz",
+ "integrity": "sha512-cctsq2wp5vTsLIcaymblUriiTcZd0CwWtCbLvrOzYCDZoWyMNV8sZ7krj09FSnsiJi3WVsHLM4k6Dq/yaPyCXA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/hast": "^3.0.0",
+ "@types/mdast": "^4.0.0",
+ "@ungap/structured-clone": "^1.0.0",
+ "devlop": "^1.0.0",
+ "micromark-util-sanitize-uri": "^2.0.0",
+ "trim-lines": "^3.0.0",
+ "unist-util-position": "^5.0.0",
+ "unist-util-visit": "^5.0.0",
+ "vfile": "^6.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/mdast-util-to-markdown": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-2.2.0.tgz",
+ "integrity": "sha512-2Jn/ADrHFFyyniBMi0bncTbJqU78K3/TEYvzvwrWWzD9MYPUa/Gm4r3nOeKFQg/PDM5BsbDYdc8ackW4NTY6NA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/mdast": "^4.0.0",
+ "@types/unist": "^3.0.0",
+ "longest-streak": "^3.0.0",
+ "mdast-util-phrasing": "^4.0.0",
+ "mdast-util-to-string": "^4.0.0",
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-classify-character": "^2.0.0",
+ "micromark-util-decode-string": "^2.0.0",
+ "micromark-util-html-tag-name": "^2.0.0",
+ "unist-util-visit": "^5.0.0",
+ "zwitch": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/mdast-util-to-string": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-4.0.0.tgz",
+ "integrity": "sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/mdast": "^4.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/micromark": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/micromark/-/micromark-4.0.3.tgz",
+ "integrity": "sha512-oGYfQzHSG5dOMovQcJ3fyTmZlWAWpi0XA0sJwJs+i6OT88o1+Jtw/8z0CmdowSLxGhhFK89rQ/oXph/wN02PNw==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "@types/debug": "^4.0.0",
+ "debug": "^4.0.0",
+ "decode-named-character-reference": "^1.0.0",
+ "devlop": "^1.0.0",
+ "micromark-core-commonmark": "^2.0.0",
+ "micromark-factory-space": "^2.0.0",
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-chunked": "^2.0.0",
+ "micromark-util-combine-extensions": "^2.0.0",
+ "micromark-util-decode-numeric-character-reference": "^2.0.0",
+ "micromark-util-edit-map": "^1.0.0",
+ "micromark-util-encode": "^2.0.0",
+ "micromark-util-normalize-identifier": "^2.0.0",
+ "micromark-util-resolve-all": "^2.0.0",
+ "micromark-util-sanitize-uri": "^2.0.0",
+ "micromark-util-subtokenize": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-core-commonmark": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/micromark-core-commonmark/-/micromark-core-commonmark-2.0.4.tgz",
+ "integrity": "sha512-wxEeE8v8XVvOrxn1TZj74qYhAtTQsSqufHVS3uNVyT1MupXxhyaHk8/9xDNPh9BmL77QNDgWTkZ3RsYHB2ry7w==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "decode-named-character-reference": "^1.0.0",
+ "devlop": "^1.0.0",
+ "micromark-factory-destination": "^2.0.0",
+ "micromark-factory-label": "^2.0.0",
+ "micromark-factory-space": "^2.1.0",
+ "micromark-factory-title": "^2.0.0",
+ "micromark-factory-whitespace": "^2.0.0",
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-chunked": "^2.0.0",
+ "micromark-util-classify-character": "^2.0.0",
+ "micromark-util-edit-map": "^1.0.0",
+ "micromark-util-html-tag-name": "^2.0.0",
+ "micromark-util-normalize-identifier": "^2.0.0",
+ "micromark-util-resolve-all": "^2.0.0",
+ "micromark-util-subtokenize": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.3"
+ }
+ },
+ "node_modules/micromark-extension-gfm": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/micromark-extension-gfm/-/micromark-extension-gfm-3.0.0.tgz",
+ "integrity": "sha512-vsKArQsicm7t0z2GugkCKtZehqUm31oeGBV/KVSorWSy8ZlNAv7ytjFhvaryUiCUJYqs+NoE6AFhpQvBTM6Q4w==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "micromark-extension-gfm-autolink-literal": "^2.0.0",
+ "micromark-extension-gfm-footnote": "^2.0.0",
+ "micromark-extension-gfm-strikethrough": "^2.0.0",
+ "micromark-extension-gfm-table": "^2.0.0",
+ "micromark-extension-gfm-tagfilter": "^2.0.0",
+ "micromark-extension-gfm-task-list-item": "^2.0.0",
+ "micromark-util-combine-extensions": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/micromark-extension-gfm-autolink-literal": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/micromark-extension-gfm-autolink-literal/-/micromark-extension-gfm-autolink-literal-2.1.0.tgz",
+ "integrity": "sha512-oOg7knzhicgQ3t4QCjCWgTmfNhvQbDDnJeVu9v81r7NltNCVmhPy1fJRX27pISafdjL+SVc4d3l48Gb6pbRypw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-sanitize-uri": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/micromark-extension-gfm-footnote": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/micromark-extension-gfm-footnote/-/micromark-extension-gfm-footnote-2.1.0.tgz",
+ "integrity": "sha512-/yPhxI1ntnDNsiHtzLKYnE3vf9JZ6cAisqVDauhp4CEHxlb4uoOTxOCJ+9s51bIB8U1N1FJ1RXOKTIlD5B/gqw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "devlop": "^1.0.0",
+ "micromark-core-commonmark": "^2.0.0",
+ "micromark-factory-space": "^2.0.0",
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-normalize-identifier": "^2.0.0",
+ "micromark-util-sanitize-uri": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/micromark-extension-gfm-strikethrough": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/micromark-extension-gfm-strikethrough/-/micromark-extension-gfm-strikethrough-2.1.0.tgz",
+ "integrity": "sha512-ADVjpOOkjz1hhkZLlBiYA9cR2Anf8F4HqZUO6e5eDcPQd0Txw5fxLzzxnEkSkfnD0wziSGiv7sYhk/ktvbf1uw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "devlop": "^1.0.0",
+ "micromark-util-chunked": "^2.0.0",
+ "micromark-util-classify-character": "^2.0.0",
+ "micromark-util-resolve-all": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/micromark-extension-gfm-table": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/micromark-extension-gfm-table/-/micromark-extension-gfm-table-2.1.2.tgz",
+ "integrity": "sha512-pRzm4kDTu0MjlmBkxmS9yYhw60nncfcEwu9NNdPFSQEFXS95ZKyIIyTSHu/o3ReBUrLKYEq+7YaXCRn/bPB4MA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "devlop": "^1.0.0",
+ "micromark-factory-space": "^2.0.0",
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/micromark-extension-gfm-tagfilter": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/micromark-extension-gfm-tagfilter/-/micromark-extension-gfm-tagfilter-2.0.0.tgz",
+ "integrity": "sha512-xHlTOmuCSotIA8TW1mDIM6X2O1SiX5P9IuDtqGonFhEK0qgRI4yeC6vMxEV2dgyr2TiD+2PQ10o+cOhdVAcwfg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-types": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/micromark-extension-gfm-task-list-item": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/micromark-extension-gfm-task-list-item/-/micromark-extension-gfm-task-list-item-2.1.0.tgz",
+ "integrity": "sha512-qIBZhqxqI6fjLDYFTBIa4eivDMnP+OZqsNwmQ3xNLE4Cxwc+zfQEfbs6tzAo2Hjq+bh6q5F+Z8/cksrLFYWQQw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "devlop": "^1.0.0",
+ "micromark-factory-space": "^2.0.0",
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/micromark-factory-destination": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-factory-destination/-/micromark-factory-destination-2.0.1.tgz",
+ "integrity": "sha512-Xe6rDdJlkmbFRExpTOmRj9N3MaWmbAgdpSrBQvCFqhezUn4AHqJHbaEnfbVYYiexVSs//tqOdY/DxhjdCiJnIA==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-factory-label": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-factory-label/-/micromark-factory-label-2.0.1.tgz",
+ "integrity": "sha512-VFMekyQExqIW7xIChcXn4ok29YE3rnuyveW3wZQWWqF4Nv9Wk5rgJ99KzPvHjkmPXF93FXIbBp6YdW3t71/7Vg==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "devlop": "^1.0.0",
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-factory-space": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.1.0.tgz",
+ "integrity": "sha512-fS8hnLIjnjvdQIj39Geug8wWsR0HrYZ43KShKxNfwT7t2LOHo/LbWZEzEaSOjwtjdCsjoE6syHhonEzW0zv0+Q==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-factory-title": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-factory-title/-/micromark-factory-title-2.0.1.tgz",
+ "integrity": "sha512-5bZ+3CjhAd9eChYTHsjy6TGxpOFSKgKKJPJxr293jTbfry2KDoWkhBb6TcPVB4NmzaPhMs1Frm9AZH7OD4Cjzw==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-factory-space": "^2.0.0",
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-factory-whitespace": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-factory-whitespace/-/micromark-factory-whitespace-2.0.1.tgz",
+ "integrity": "sha512-Ob0nuZ3PKt/n0hORHyvoD9uZhr+Za8sFoP+OnMcnWK5lngSzALgQYKMr9RJVOWLqQYuyn6ulqGWSXdwf6F80lQ==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-factory-space": "^2.0.0",
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-util-character": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.1.tgz",
+ "integrity": "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-util-chunked": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-chunked/-/micromark-util-chunked-2.0.1.tgz",
+ "integrity": "sha512-QUNFEOPELfmvv+4xiNg2sRYeS/P84pTW0TCgP5zc9FpXetHY0ab7SxKyAQCNCc1eK0459uoLI1y5oO5Vc1dbhA==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-symbol": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-util-classify-character": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-classify-character/-/micromark-util-classify-character-2.0.1.tgz",
+ "integrity": "sha512-K0kHzM6afW/MbeWYWLjoHQv1sgg2Q9EccHEDzSkxiP/EaagNzCm7T/WMKZ3rjMbvIpvBiZgwR3dKMygtA4mG1Q==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-util-combine-extensions": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-combine-extensions/-/micromark-util-combine-extensions-2.0.1.tgz",
+ "integrity": "sha512-OnAnH8Ujmy59JcyZw8JSbK9cGpdVY44NKgSM7E9Eh7DiLS2E9RNQf0dONaGDzEG9yjEl5hcqeIsj4hfRkLH/Bg==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-chunked": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-util-decode-numeric-character-reference": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/micromark-util-decode-numeric-character-reference/-/micromark-util-decode-numeric-character-reference-2.0.2.tgz",
+ "integrity": "sha512-ccUbYk6CwVdkmCQMyr64dXz42EfHGkPQlBj5p7YVGzq8I7CtjXZJrubAYezf7Rp+bjPseiROqe7G6foFd+lEuw==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-symbol": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-util-decode-string": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-decode-string/-/micromark-util-decode-string-2.0.1.tgz",
+ "integrity": "sha512-nDV/77Fj6eH1ynwscYTOsbK7rR//Uj0bZXBwJZRfaLEJ1iGBR6kIfNmlNqaqJf649EP0F3NWNdeJi03elllNUQ==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "decode-named-character-reference": "^1.0.0",
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-decode-numeric-character-reference": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-util-edit-map": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/micromark-util-edit-map/-/micromark-util-edit-map-1.0.0.tgz",
+ "integrity": "sha512-Pa2ljlsEL6sVwFaYeyrOLSYbQt73JvGbPOYFq+9AElXiSnfI5Q4465RRZ1sHv7lDjDOnGRDDaqPXqClqWK/q1Q==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-util-encode": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-2.0.1.tgz",
+ "integrity": "sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT"
+ },
+ "node_modules/micromark-util-html-tag-name": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-html-tag-name/-/micromark-util-html-tag-name-2.0.1.tgz",
+ "integrity": "sha512-2cNEiYDhCWKI+Gs9T0Tiysk136SnR13hhO8yW6BGNyhOC4qYFnwF1nKfD3HFAIXA5c45RrIG1ub11GiXeYd1xA==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT"
+ },
+ "node_modules/micromark-util-normalize-identifier": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-normalize-identifier/-/micromark-util-normalize-identifier-2.0.1.tgz",
+ "integrity": "sha512-sxPqmo70LyARJs0w2UclACPUUEqltCkJ6PhKdMIDuJ3gSf/Q+/GIe3WKl0Ijb/GyH9lOpUkRAO2wp0GVkLvS9Q==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-symbol": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-util-resolve-all": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-resolve-all/-/micromark-util-resolve-all-2.0.1.tgz",
+ "integrity": "sha512-VdQyxFWFT2/FGJgwQnJYbe1jjQoNTS4RjglmSjTUlpUMa95Htx9NHeYW4rGDJzbjvCsl9eLjMQwGeElsqmzcHg==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-util-sanitize-uri": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-2.0.1.tgz",
+ "integrity": "sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-encode": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-util-subtokenize": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/micromark-util-subtokenize/-/micromark-util-subtokenize-2.1.0.tgz",
+ "integrity": "sha512-XQLu552iSctvnEcgXw6+Sx75GflAPNED1qx7eBJ+wydBb2KCbRZe+NwvIEEMM83uml1+2WSXpBAcp9IUCgCYWA==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "devlop": "^1.0.0",
+ "micromark-util-chunked": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-util-symbol": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz",
+ "integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT"
+ },
+ "node_modules/micromark-util-types": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.3.tgz",
+ "integrity": "sha512-oxB2Ik03hI0gv+VNn9tnh1t1YEe9MDPptViAEgfdf3YQHsn0pzGTgCdlSCJXcwhqm8phaEuM7zeEu3QQzVBrPg==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT"
+ },
+ "node_modules/micromark/node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/micromark/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/mime-db": {
+ "version": "1.54.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz",
+ "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/mime-types": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz",
+ "integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==",
+ "license": "MIT",
+ "dependencies": {
+ "mime-db": "^1.54.0"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/mimic-response": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-4.0.0.tgz",
+ "integrity": "sha512-e5ISH9xMYU0DzrT+jl8q2ze9D6eWBto+I8CNpe+VI+K2J/F/k3PdkdTdz4wvGVH4NTpo+NRYTVIuMQEMMcsLqg==",
+ "license": "MIT",
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/ms": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
+ "license": "MIT"
+ },
+ "node_modules/nanoid": {
+ "version": "3.3.20",
+ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.20.tgz",
+ "integrity": "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "bin": {
+ "nanoid": "bin/nanoid.cjs"
+ },
+ "engines": {
+ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
+ }
+ },
+ "node_modules/negotiator": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.1.0.tgz",
+ "integrity": "sha512-NMPBRMJgiQHjbd8phG3Vebdx4kZ1H121rbl5IkMqeOsahptB9BKo/d7oJ3zTXqTgagn2bWlNSXkh0QUGM31RYg==",
"license": "MIT",
"dependencies": {
"content-type": "^2.1.0"
@@ -9158,6 +10441,33 @@
"integrity": "sha512-NUcwaKxUxWrZLpDG+z/xZaCgQITkA/Dv4V/T6bw7VON6l1Xz/VnrBqrYjZQ12TamKHzITTfOEIYUj48y2KXImA==",
"license": "MIT"
},
+ "node_modules/parse-entities": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-4.0.2.tgz",
+ "integrity": "sha512-GG2AQYWoLgL877gQIKeRPGO1xF9+eG1ujIb5soS5gPvLQ1y2o8FL90w2QWNdf9I361Mpp7726c+lj3U0qK1uGw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "^2.0.0",
+ "character-entities-legacy": "^3.0.0",
+ "character-reference-invalid": "^2.0.0",
+ "decode-named-character-reference": "^1.0.0",
+ "is-alphanumerical": "^2.0.0",
+ "is-decimal": "^2.0.0",
+ "is-hexadecimal": "^2.0.0"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/parse-entities/node_modules/@types/unist": {
+ "version": "2.0.11",
+ "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz",
+ "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==",
+ "dev": true,
+ "license": "MIT"
+ },
"node_modules/parse-ms": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-4.0.0.tgz",
@@ -9296,6 +10606,17 @@
"node": ">=0.4.0"
}
},
+ "node_modules/property-information": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/property-information/-/property-information-7.2.0.tgz",
+ "integrity": "sha512-IAtzIB6sUiWaJYrX9smp3V46pBGbBeLFRGdh25kg1334VcBlD8HzhPeNIWQH9zhGmo2itIe25EHt9dQP7G5hmg==",
+ "dev": true,
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
"node_modules/protobufjs": {
"version": "7.6.6",
"resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.6.6.tgz",
@@ -9371,6 +10692,34 @@
"react": "^19.3.0"
}
},
+ "node_modules/react-markdown": {
+ "version": "10.1.0",
+ "resolved": "https://registry.npmjs.org/react-markdown/-/react-markdown-10.1.0.tgz",
+ "integrity": "sha512-qKxVopLT/TyA6BX3Ue5NwabOsAzm0Q7kAPwq6L+wWDwisYs7R8vZ0nRXqq6rkueboxpkjvLGU9fWifiX/ZZFxQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/hast": "^3.0.0",
+ "@types/mdast": "^4.0.0",
+ "devlop": "^1.0.0",
+ "hast-util-to-jsx-runtime": "^2.0.0",
+ "html-url-attributes": "^3.0.0",
+ "mdast-util-to-hast": "^13.0.0",
+ "remark-parse": "^11.0.0",
+ "remark-rehype": "^11.0.0",
+ "unified": "^11.0.0",
+ "unist-util-visit": "^5.0.0",
+ "vfile": "^6.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ },
+ "peerDependencies": {
+ "@types/react": ">=18",
+ "react": ">=18"
+ }
+ },
"node_modules/readdirp": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz",
@@ -9384,6 +10733,76 @@
"url": "https://paulmillr.com/funding/"
}
},
+ "node_modules/remark-gfm": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/remark-gfm/-/remark-gfm-4.0.1.tgz",
+ "integrity": "sha512-1quofZ2RQ9EWdeN34S79+KExV1764+wCUGop5CPL1WGdD0ocPpu91lzPGbwWMECpEpd42kJGQwzRfyov9j4yNg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/mdast": "^4.0.0",
+ "mdast-util-gfm": "^3.0.0",
+ "micromark-extension-gfm": "^3.0.0",
+ "remark-parse": "^11.0.0",
+ "remark-stringify": "^11.0.0",
+ "unified": "^11.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/remark-parse": {
+ "version": "11.0.0",
+ "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-11.0.0.tgz",
+ "integrity": "sha512-FCxlKLNGknS5ba/1lmpYijMUzX2esxW5xQqjWxw2eHFfS2MSdaHVINFmhjo+qN1WhZhNimq0dZATN9pH0IDrpA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/mdast": "^4.0.0",
+ "mdast-util-from-markdown": "^2.0.0",
+ "micromark-util-types": "^2.0.0",
+ "unified": "^11.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/remark-rehype": {
+ "version": "11.1.2",
+ "resolved": "https://registry.npmjs.org/remark-rehype/-/remark-rehype-11.1.2.tgz",
+ "integrity": "sha512-Dh7l57ianaEoIpzbp0PC9UKAdCSVklD8E5Rpw7ETfbTl3FqcOOgq5q2LVDhgGCkaBv7p24JXikPdvhhmHvKMsw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/hast": "^3.0.0",
+ "@types/mdast": "^4.0.0",
+ "mdast-util-to-hast": "^13.0.0",
+ "unified": "^11.0.0",
+ "vfile": "^6.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/remark-stringify": {
+ "version": "11.0.0",
+ "resolved": "https://registry.npmjs.org/remark-stringify/-/remark-stringify-11.0.0.tgz",
+ "integrity": "sha512-1OSmLd3awB/t8qdoEOMazZkNsfVTeY4fTsgzcQFdXNq8ToTN4ZGwrMnlda4K6smTFKD+GRV6O48i6Z4iKgPPpw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/mdast": "^4.0.0",
+ "mdast-util-to-markdown": "^2.0.0",
+ "unified": "^11.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
"node_modules/require-from-string": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz",
@@ -9719,6 +11138,17 @@
"node": ">=0.10.0"
}
},
+ "node_modules/space-separated-tokens": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-2.0.2.tgz",
+ "integrity": "sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==",
+ "dev": true,
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
"node_modules/standardwebhooks": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/standardwebhooks/-/standardwebhooks-1.1.1.tgz",
@@ -9729,6 +11159,21 @@
"fast-sha256": "^1.3.0"
}
},
+ "node_modules/stringify-entities": {
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-4.0.4.tgz",
+ "integrity": "sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "character-entities-html4": "^2.0.0",
+ "character-entities-legacy": "^3.0.0"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
"node_modules/strip-final-newline": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-4.0.0.tgz",
@@ -9741,6 +11186,26 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/style-to-js": {
+ "version": "1.1.21",
+ "resolved": "https://registry.npmjs.org/style-to-js/-/style-to-js-1.1.21.tgz",
+ "integrity": "sha512-RjQetxJrrUJLQPHbLku6U/ocGtzyjbJMP9lCNK7Ag0CNh690nSH8woqWH9u16nMjYBAok+i7JO1NP2pOy8IsPQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "style-to-object": "1.0.14"
+ }
+ },
+ "node_modules/style-to-object": {
+ "version": "1.0.14",
+ "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-1.0.14.tgz",
+ "integrity": "sha512-LIN7rULI0jBscWQYaSswptyderlarFkjQ+t79nzty8tcIAceVomEVlLzH5VP4Cmsv6MtKhs7qaAiwlcp+Mgaxw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "inline-style-parser": "0.2.7"
+ }
+ },
"node_modules/sumchecker": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/sumchecker/-/sumchecker-3.0.1.tgz",
@@ -9802,6 +11267,28 @@
"url": "https://github.com/sponsors/SuperchupuDev"
}
},
+ "node_modules/trim-lines": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/trim-lines/-/trim-lines-3.0.1.tgz",
+ "integrity": "sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==",
+ "dev": true,
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/trough": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/trough/-/trough-2.2.0.tgz",
+ "integrity": "sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw==",
+ "dev": true,
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
"node_modules/ts-algebra": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ts-algebra/-/ts-algebra-2.0.0.tgz",
@@ -9892,6 +11379,99 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/unified": {
+ "version": "11.0.5",
+ "resolved": "https://registry.npmjs.org/unified/-/unified-11.0.5.tgz",
+ "integrity": "sha512-xKvGhPWw3k84Qjh8bI3ZeJjqnyadK+GEFtazSfZv/rKeTkTjOJho6mFqh2SM96iIcZokxiOpg78GazTSg8+KHA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "^3.0.0",
+ "bail": "^2.0.0",
+ "devlop": "^1.0.0",
+ "extend": "^3.0.0",
+ "is-plain-obj": "^4.0.0",
+ "trough": "^2.0.0",
+ "vfile": "^6.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/unist-util-is": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-6.0.1.tgz",
+ "integrity": "sha512-LsiILbtBETkDz8I9p1dQ0uyRUWuaQzd/cuEeS1hoRSyW5E5XGmTzlwY1OrNzzakGowI9Dr/I8HVaw4hTtnxy8g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "^3.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/unist-util-position": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/unist-util-position/-/unist-util-position-5.0.0.tgz",
+ "integrity": "sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "^3.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/unist-util-stringify-position": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz",
+ "integrity": "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "^3.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/unist-util-visit": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-5.1.0.tgz",
+ "integrity": "sha512-m+vIdyeCOpdr/QeQCu2EzxX/ohgS8KbnPDgFni4dQsfSCtpz8UqDyY5GjRru8PDKuYn7Fq19j1CQ+nJSsGKOzg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "^3.0.0",
+ "unist-util-is": "^6.0.0",
+ "unist-util-visit-parents": "^6.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/unist-util-visit-parents": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-6.0.2.tgz",
+ "integrity": "sha512-goh1s1TBrqSqukSc8wrjwWhL0hiJxgA8m4kFxGlQ+8FYQ3C/m11FcTs4YYem7V664AhHVvgoQLk890Ssdsr2IQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "^3.0.0",
+ "unist-util-is": "^6.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
"node_modules/vary": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
@@ -9901,6 +11481,36 @@
"node": ">= 0.8"
}
},
+ "node_modules/vfile": {
+ "version": "6.0.3",
+ "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.3.tgz",
+ "integrity": "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "^3.0.0",
+ "vfile-message": "^4.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/vfile-message": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-4.0.3.tgz",
+ "integrity": "sha512-QTHzsGd1EhbZs4AsQ20JX1rC3cOlt/IWJruk893DfLRr57lcnOeMaWG4K0JrRta4mIJZKth2Au3mM3u03/JWKw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "^3.0.0",
+ "unist-util-stringify-position": "^4.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
"node_modules/vite": {
"version": "8.3.4",
"resolved": "https://registry.npmjs.org/vite/-/vite-8.3.4.tgz",
@@ -10096,6 +11706,17 @@
"funding": {
"url": "https://github.com/sponsors/colinhacks"
}
+ },
+ "node_modules/zwitch": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-2.0.4.tgz",
+ "integrity": "sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==",
+ "dev": true,
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
}
}
}
diff --git a/app/package.json b/app/package.json
index 5f03c1c4..72625d7c 100644
--- a/app/package.json
+++ b/app/package.json
@@ -24,6 +24,8 @@
"electron": "44.7.0",
"react": "19.3.0",
"react-dom": "19.3.0",
+ "react-markdown": "10.1.0",
+ "remark-gfm": "4.0.1",
"vite": "8.3.4"
},
"overrides": {
diff --git a/app/ui/src/api.js b/app/ui/src/api.js
index eb750c9f..ddd92971 100644
--- a/app/ui/src/api.js
+++ b/app/ui/src/api.js
@@ -1,24 +1,5 @@
// The window talks only to ds-bot's own channel in the engine: POST api/bot for reads and
-// actions, and the live feed api/bot/feed for what changes.
-import { hostText, t } from '../../../ds-bot/src/client/i18n.js'
-
-export async function call(endpoint, payload) {
- let response
- try {
- response = await fetch('api/bot', {
- method: 'POST',
- headers: { 'content-type': 'application/json' },
- body: JSON.stringify({ endpoint, payload: payload ?? null }),
- })
- } catch (error) {
- throw Object.assign(new Error(t('Could not reach DSH. Check that it is still running.')), { code: 'NETWORK', cause: error })
- }
- if (!response.ok) throw Object.assign(new Error(`HTTP ${response.status}`), { code: `HTTP_${response.status}` })
- const result = await response.json()
- if (!result.ok) throw Object.assign(new Error(hostText(result.error?.message ?? 'Request failed')), { code: result.error?.code ?? 'bot/error' })
- return result.value
-}
-
+// actions (the Bot views' own `call`), and the live feed api/bot/feed for what changes.
const RETRY_MS = [500, 1000, 2000, 5000]
function parseEvent(block) {
diff --git a/app/ui/src/app.css b/app/ui/src/app.css
index bc7e3ecc..e55af0fd 100644
--- a/app/ui/src/app.css
+++ b/app/ui/src/app.css
@@ -1,82 +1,80 @@
-/* Colors come from the plugin's --bt-* variables (themes.js and MARK_CSS); sizes follow
- the plugin's sidebar and chat. */
-*,*::before,*::after{box-sizing:border-box}
+/* The frame around the Bot views. The views bring their own stylesheets (main.js); these
+ rules give the frame the sizes the views have in DSH. Colors come from the --bt-* variables. */
html,body,#root{height:100%;margin:0}
-body{color-scheme:light}
+body{color-scheme:light;background:var(--bt-main);color:var(--bt-ink);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei","Helvetica Neue",Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased}
body[data-ds-dark-theme]{color-scheme:dark}
::-webkit-scrollbar{width:12px;height:12px}
::-webkit-scrollbar-thumb{border:3px solid transparent;border-radius:12px;background:var(--bt-line-2) content-box}
::-webkit-scrollbar-thumb:hover{background-color:var(--bt-ink-3)}
::-webkit-scrollbar-track,::-webkit-scrollbar-corner{background:transparent}
-body{background:var(--bt-main);color:var(--bt-ink);font:14px/20px -apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,"PingFang SC","Microsoft YaHei",sans-serif;-webkit-font-smoothing:antialiased}
-button,textarea{font:inherit;color:inherit}
-:focus-visible{outline:2px solid var(--bt-accent);outline-offset:2px}
-.app{display:grid;grid-template-columns:280px minmax(0,1fr);height:100%}
-.app-blank{height:100%;display:grid;place-items:center;color:var(--bt-ink-3)}
-.app-error{color:var(--bt-danger);max-width:480px;text-align:center}
-.app-main{position:relative;display:flex;min-width:0;min-height:0}
-.app-toast{position:absolute;left:50%;bottom:84px;translate:-50% 0;max-width:min(480px,90%);padding:6px 12px;border-radius:10px;background:var(--bt-card);border:.5px solid var(--bt-line-2);color:var(--bt-danger);font-size:12px;line-height:16px}
+.dsb-frame{display:grid;grid-template-columns:280px minmax(0,1fr);height:100%}
+.dsb-frame[data-rail]{grid-template-columns:56px minmax(0,1fr)}
-.side{display:flex;flex-direction:column;gap:4px;min-height:0;padding:8px;background:var(--bt-sidebar)}
-.side-top{display:flex;align-items:center;height:40px;padding:0 8px;flex:none}
-.side-brand{font-size:15px;line-height:20px;font-weight:600;letter-spacing:-.01em}
-.side-list{display:flex;flex-direction:column;gap:3px;min-height:0;overflow-y:auto}
-.side-row{position:relative;display:flex;align-items:center;gap:8px;width:100%;min-height:54px;padding:8px;border:0;border-radius:10px;background:transparent;text-align:left;cursor:pointer;transition:background-color .12s ease}
-.side-row:hover{background:var(--bt-hover)}
-.side-row[aria-current=page]{background:var(--bt-active)}
-.side-text{display:flex;flex-direction:column;min-width:0}
-.side-name,.side-role{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
-.side-name{font-size:14px;line-height:20px}
-.side-role{font-size:12px;line-height:16px;color:var(--bt-ink-2)}
+/* Sidebar; collapsed, a rail of marks under the brand, which expands it again. */
+.dsb-side{display:flex;flex-direction:column;min-width:0;min-height:0;padding:6px 12px;background:var(--bt-sidebar);border-right:1px solid color-mix(in srgb,var(--bt-ink) 12%,transparent);box-sizing:border-box}
+.dsb-side-list{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;margin:0 -12px 0 -4px;padding-left:4px}
+.dsb-side .bt-list{overflow-x:hidden}
+.dsb-frame[data-rail] .dsb-side{padding:6px 10px}
+.dsb-frame[data-rail] .dsb-side-list{margin:0;padding:0;align-items:center}
+.dsb-expand{flex:none;width:36px;height:36px;margin:12px 0;padding:0;border:0;border-radius:50%;background:none;display:inline-grid;place-items:center;cursor:pointer;transition:background-color .12s ease}
+.dsb-expand:hover{background:color-mix(in srgb,var(--bt-ink) 6%,transparent)}
+.dsb-side-foot{display:flex;align-items:center;gap:9px;padding:8px 6px 6px}
+.dsb-frame[data-rail] .dsb-side-foot{margin:0 -5px;padding:8px 0 6px}
+.dsb-settings{padding:0;border:0;background:none;border-radius:50%;cursor:pointer}
+.dsb-settings:hover .bt-you{background:color-mix(in srgb,var(--bt-ink) 9%,var(--bt-sidebar))}
-.chat{flex:1;display:flex;flex-direction:column;min-width:0;min-height:0}
-.chat-head{display:flex;align-items:center;gap:8px;flex:none;height:52px;padding:0 16px;border-bottom:1px solid var(--bt-line)}
-.chat-title{font-size:15px;line-height:20px;font-weight:600}
-.chat-role{font-size:12px;line-height:16px;color:var(--bt-ink-2)}
-.chat-scroll{flex:1;min-height:0;overflow-y:auto}
-.chat-column{display:flex;flex-direction:column;max-width:992px;margin:0 auto;padding:8px 16px 16px}
-.chat-top{display:flex;justify-content:center;min-height:28px;padding:4px 0}
-.chat-soft{padding:4px 12px;border:0;border-radius:999px;background:var(--bt-hover);color:var(--bt-ink-2);font-size:12px;line-height:16px;cursor:pointer}
-.chat-muted{color:var(--bt-ink-2);font-size:12px;line-height:16px}
+/* Conversation: a floating header pill over the transcript, and the composer below. */
+.dsb-main{position:relative;display:flex;flex-direction:column;min-width:0;min-height:0;background:var(--bt-main);--dsh-chat-content-width:min(960px,100%)}
+.dsb-head{position:absolute;top:0;left:0;right:0;z-index:8;display:flex;justify-content:center;padding:10px 0 0;pointer-events:none}
+.dsb-head::before{content:"";position:absolute;inset:0 0 auto;height:60px;background:linear-gradient(to bottom,var(--bt-main),color-mix(in srgb,var(--bt-main) 0%,transparent));pointer-events:none;z-index:-1}
+.dsb-head .bt-head{flex:1 1 auto;width:100%}
+.dsb-chat{display:flex;flex-direction:column;flex:1 1 auto;min-height:0}
+/* A thin gutter kept for the scrollbar, so the column does not move when one appears. */
+.dsb-scroll{flex:1 1 auto;min-height:0;overflow-y:auto;scrollbar-gutter:stable;margin-right:2px;padding:60px 11px 16px 16px}
+.dsb-scroll::-webkit-scrollbar{width:5px}
+.dsb-scroll::-webkit-scrollbar-thumb{border:0;border-radius:5px;background:var(--bt-line-2)}
+.dsb-column{max-width:min(960px,100%);margin:0 auto}
+.dsb-flow{display:flex;flex-direction:column;gap:6px}
+/* The first separator sits where DSH puts a transcript's opening time. */
+.dsb-flow>.bt-time-sep{margin:8px 0 2px}
+.dsb-flow>.bt-time-sep:first-child{margin:17px 0 6px}
+.dsb-flow>.bt-urow+.bt-astack,.dsb-flow>.bt-urow+.bt-time-sep+.bt-astack{margin-top:10px}
+.dsb-pending{display:contents}
+.dsb-pending .bt-ububble{opacity:.6}
-.chat-row{display:flex;padding-block:2px}
-.chat-row:not([data-prev]){margin-top:10px}
-.chat-user{justify-content:flex-end}
-.chat-bubble{max-width:min(80%,560px,calc(100% - 82px));padding:7px 12px;border-radius:18px;white-space:pre-wrap;overflow-wrap:anywhere}
-.chat-bot .chat-bubble{background:var(--bt-bubble)}
-.chat-user .chat-bubble{background:var(--bt-user);color:var(--bt-user-ink)}
-.chat-bot[data-prev] .chat-bubble{border-top-left-radius:6px}
-.chat-bot[data-next] .chat-bubble{border-bottom-left-radius:6px}
-.chat-user[data-prev] .chat-bubble{border-top-right-radius:6px}
-.chat-user[data-next] .chat-bubble{border-bottom-right-radius:6px}
-.chat-row[data-pending] .chat-bubble{opacity:.55}
-.chat-note{display:block;font-size:12px;line-height:16px;opacity:.7}
-.chat-event{align-self:center;margin:10px 0 4px;color:var(--bt-ink-3);font-size:12px;line-height:16px}
-.chat-divider{display:flex;align-items:center;gap:8px;margin:14px 0 6px;color:var(--bt-ink-3);font-size:12px;line-height:16px}
-.chat-divider::before,.chat-divider::after{content:'';flex:1;height:1px;background:var(--bt-line)}
-.chat-typing{display:inline-flex;align-items:center;gap:4px;height:34px}
-.chat-typing i{width:6px;height:6px;border-radius:50%;background:var(--bt-ink-3);animation:chat-dot 1.2s ease-in-out infinite}
-.chat-typing i:nth-child(2){animation-delay:.15s}
-.chat-typing i:nth-child(3){animation-delay:.3s}
-@keyframes chat-dot{0%,60%,100%{opacity:.35;transform:none}30%{opacity:1;transform:translateY(-2px)}}
-@media (prefers-reduced-motion:reduce){.chat-typing i{animation:none}}
+.dsb-composer-root{display:flex;flex-direction:column;align-items:center;padding:0 11px 13px 16px}
+.dsb-composer-wrap{width:100%;max-width:min(992px,100%)}
+.dsb-composer{position:relative}
+.dsb-composer[data-multiline]{border-radius:18px!important}
+.dsb-composer-tools{order:1;display:flex;flex:none;align-self:flex-end}
+.dsb-composer-input{display:flex;flex:1 1 0;min-width:0;padding:0 8px}
+.dsb-composer-input textarea{flex:1;width:100%;max-height:168px;margin:0;border:0;outline:0;resize:none;background:none;color:var(--bt-ink);font:inherit;font-size:14px;line-height:24px;overflow-y:auto}
+.dsb-composer-input textarea::placeholder{color:color-mix(in srgb,var(--bt-ink) 36%,transparent)}
+.dsb-composer-trailing{order:3;display:flex;flex:none;align-self:flex-end;align-items:center;gap:8px}
+.dsb-send{flex:none;width:28px;height:28px;padding:0;border:0;border-radius:50%;display:inline-grid;place-items:center;background:var(--bt-accent);color:var(--bt-accent-ink,#fff);cursor:pointer;transition:opacity .15s ease}
+.dsb-send:hover{opacity:.9}
+.dsb-send svg{width:14px;height:14px}
+.dsb-send:disabled{display:none}
+/* An empty composer offers voice chat where the send button goes; a group chat, dictation. */
+[data-composer-card]:has(.dsb-send:disabled) .bt-voice{display:inline-grid}
+body[data-bt-room] [data-composer-card]:has(.dsb-send:disabled) .bt-mic:not([aria-pressed=true]){background:var(--bt-accent);color:var(--bt-accent-ink,#fff)}
+.dsb-composer-error{margin:0 0 6px 4px;font-size:12px;line-height:16px;color:var(--bt-danger)}
-.chat-card{display:flex;flex-direction:column;gap:10px;max-width:560px;margin:12px 0 4px;padding:14px 16px;border:1px solid var(--bt-line);border-radius:14px;background:var(--bt-card)}
-.chat-card p{margin:0}
-.chat-question{font-weight:600}
-.chat-choices{display:flex;flex-direction:column;gap:6px}
-.chat-choice{display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:8px 12px;border:1px solid var(--bt-line);border-radius:10px;background:transparent;text-align:left;cursor:pointer;transition:background-color .12s ease}
-.chat-choice:hover:not(:disabled){background:var(--bt-hover)}
-.chat-choice:disabled{opacity:.6;cursor:default}
-.chat-error{margin:0 0 6px;color:var(--bt-danger);font-size:12px;line-height:16px}
-
-.composer-wrap{flex:none;width:100%;max-width:992px;margin:0 auto;padding:8px 16px 16px}
-.composer{display:flex;align-items:flex-end;gap:8px;min-height:44px;padding:8px 8px 8px 16px;border:.5px solid var(--bt-line-2);border-radius:22px;background:var(--bt-card);box-shadow:0 2px 8px -1px color-mix(in srgb,var(--bt-ink) 6%,transparent),0 1px 2px color-mix(in srgb,var(--bt-ink) 4%,transparent);transition:border-color .15s ease,border-radius .3s ease}
-.composer:focus-within{border-color:color-mix(in srgb,var(--bt-ink) 30%,transparent)}
-.composer[data-multiline]{border-radius:18px}
-.composer textarea{flex:1;min-height:28px;max-height:120px;padding:4px 0;border:0;outline:0;background:transparent;line-height:20px;resize:none}
-.composer textarea::placeholder{color:var(--bt-ink-3)}
-.composer textarea:disabled{cursor:not-allowed}
-.composer-send{display:grid;place-items:center;flex:none;width:28px;height:28px;padding:0;border:0;border-radius:50%;background:var(--bt-user);color:var(--bt-user-ink);cursor:pointer;transition:opacity .12s ease}
-.composer-send:disabled{opacity:.3;cursor:default}
+/* Markdown in the bubbles (primitives.js). */
+.md_markdown{overflow-wrap:anywhere}
+.md_markdown h1,.md_markdown h2,.md_markdown h3,.md_markdown h4,.md_markdown h5,.md_markdown h6{margin:0;font-size:inherit;font-weight:600}
+.md_markdown h1,.md_markdown h2{font-size:1.15em}
+.md_markdown a{color:var(--bt-accent);text-decoration:none}
+.md_markdown a:hover{text-decoration:underline}
+.md_markdown blockquote{margin:0;padding-left:10px;border-left:2px solid var(--bt-line-2);color:var(--bt-ink-2)}
+.md_markdown hr{border:0;border-top:1px solid var(--bt-line-2)}
+.md_markdown img{max-width:100%}
+.md_markdown code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.9em}
+.md_markdown :not(pre)>code{padding:1px 5px;border-radius:6px;background:color-mix(in srgb,var(--bt-ink) 6%,transparent)}
+.md_markdown table{border-collapse:collapse;display:block;max-width:100%;overflow-x:auto}
+.md_markdown th,.md_markdown td{padding:4px 8px;border:1px solid var(--bt-line-2);text-align:left}
+.md-code{position:relative}
+.md-code pre{margin:0;padding:10px 12px;border-radius:10px;background:color-mix(in srgb,var(--bt-ink) 5%,transparent);overflow-x:auto;font-size:13px;line-height:20px}
+.md-copy{position:absolute;top:6px;right:6px;padding:2px 8px;border:0;border-radius:6px;background:var(--bt-main);color:var(--bt-ink-2);font:inherit;font-size:12px;line-height:18px;cursor:pointer;opacity:0;transition:opacity .12s ease}
+.md-code:hover .md-copy,.md-copy:focus-visible{opacity:1}
diff --git a/app/ui/src/app.js b/app/ui/src/app.js
index c9796814..2d71c821 100644
--- a/app/ui/src/app.js
+++ b/app/ui/src/app.js
@@ -1,54 +1,12 @@
-import { createElement as h, useCallback, useEffect, useMemo, useRef, useState } from 'react'
+import { Component, createElement as h, Fragment, useEffect, useMemo } from 'react'
+import { ErrorToast } from '../../../ds-bot/src/client/feedback.js'
+import { HeaderPill } from '../../../ds-bot/src/client/header.js'
import { t } from '../../../ds-bot/src/client/i18n.js'
+import { Overlays } from '../../../ds-bot/src/client/overlays.js'
+import { BrandMark, TeamSidebar, YouAvatar } from '../../../ds-bot/src/client/sidebar.js'
import { allThemes, themeCss } from '../../../ds-bot/src/client/themes.js'
-import { call, openFeed } from './api.js'
import { Chat } from './chat.js'
-import { Sidebar } from './sidebar.js'
-
-const LIVE_KEYS = ['activity', 'work', 'memoryNews', 'memoryReviews', 'connectors', 'capabilityStatuses']
-// Some live facts (memory news, connector status) change without a feed notice.
-const CATCH_UP_MS = 15_000
-
-// The team as the `state` endpoint gives it: `view` changes with a new revision, `live`
-// with every answer. Requests do not overlap; one asked for while another runs follows it.
-function useTeam() {
- const [team, setTeam] = useState({ view: null, live: {}, error: null })
- const known = useRef({ since: undefined, models: undefined })
- const running = useRef(false)
- const again = useRef(false)
- const refresh = useCallback(async () => {
- if (running.current) { again.current = true; return }
- running.current = true
- do {
- again.current = false
- try {
- const value = await call('state', { since: known.current.since, models: known.current.models, locale: navigator.language })
- const live = Object.fromEntries(LIVE_KEYS.map(key => [key, value[key]]))
- if (value.unchanged) setTeam(current => ({ ...current, live, error: null }))
- else {
- known.current = { since: value.revision, models: value.modelsKey }
- setTeam({ view: value, live, error: null })
- }
- } catch (error) {
- setTeam(current => ({ ...current, error }))
- }
- } while (again.current)
- running.current = false
- }, [])
- return [team, refresh]
-}
-
-// Feed events for the open chat.
-function createBus() {
- const listeners = new Set()
- return {
- on(listener) {
- listeners.add(listener)
- return () => { listeners.delete(listener) }
- },
- emit(event, data) { for (const listener of listeners) listener(event, data) },
- }
-}
+import { createTeam } from './team.js'
// The team's theme and accent, as the plugin paints them.
function useTheme(prefs) {
@@ -63,39 +21,56 @@ function useTheme(prefs) {
}, [prefs?.theme, prefs?.accent, prefs?.motion])
}
-export function App() {
- const [team, refresh] = useTeam()
- const bus = useMemo(createBus, [])
- const [selected, setSelected] = useState(null)
- const view = team.view
- useTheme(view?.prefs)
+// A dialog or panel that fails closes, and the failure shows as a toast; the window stays.
+// One that fails again at once stays closed.
+class Contain extends Component {
+ constructor(props) {
+ super(props)
+ this.state = { failed: false }
+ this.failedAt = 0
+ }
- useEffect(() => {
- void refresh()
- const close = openFeed((event, data) => {
- if (event === 'hello' || event === 'revision' || event === 'live') void refresh()
- bus.emit(event, data)
- })
- const timer = setInterval(() => { void refresh() }, CATCH_UP_MS)
- return () => {
- close()
- clearInterval(timer)
- }
- }, [refresh, bus])
+ static getDerivedStateFromError() { return { failed: true } }
+
+ componentDidCatch(error) {
+ this.props.onError(error)
+ if (Date.now() - this.failedAt > 1000) this.setState({ failed: false })
+ this.failedAt = Date.now()
+ }
- const bots = useMemo(() => {
- const list = view?.bots ?? []
- const mains = view?.mainBotIds ?? []
- return [...list].sort((a, b) => (mains.includes(b.id) - mains.includes(a.id)) || (a.createdAt ?? 0) - (b.createdAt ?? 0))
- }, [view])
- const current = bots.find(bot => bot.id === selected) ?? bots.find(bot => bot.id === view?.mainBotId) ?? bots[0]
+ render() { return this.state.failed ? null : this.props.children }
+}
- if (view === null) {
- return h('div', { className: 'app-blank' }, team.error ? h('p', { className: 'app-error' }, team.error.message) : h('p', { className: 'app-wait' }, t('Loading…')))
+export function App() {
+ const team = useMemo(createTeam, [])
+ useEffect(() => team.start(), [team])
+ const { hooks, actions } = team
+ const views = { ...hooks, actions }
+ const wide = hooks.useLayout(state => state.wide)
+ const shown = hooks.useShown(id => id)
+ useTheme(hooks.useRoster(value => value.prefs))
+ const closeOverlays = (error) => {
+ actions.closeSettings()
+ actions.closeMemory()
+ actions.closeMenu()
+ actions.closePanel()
+ actions.closePalette()
+ actions.closeVoice()
+ actions.closeOverlay()
+ actions.reportError(error, 'overlay')
}
- return h('div', { className: 'app' },
- h(Sidebar, { bots, mainBotIds: view.mainBotIds ?? [], live: team.live, questions: view.questions ?? {}, current: current?.id, onOpen: setSelected }),
- h('main', { className: 'app-main' },
- current ? h(Chat, { key: current.id, bot: current, team: view, live: team.live, bus }) : null,
- team.error ? h('div', { className: 'app-toast', role: 'alert' }, team.error.message) : null))
+ return h('div', { className: 'dsb-frame', 'data-rail': wide ? undefined : '' },
+ h('aside', { className: 'dsb-side' },
+ h('div', { className: 'dsb-side-list' },
+ wide ? null : h('button', { type: 'button', className: 'dsb-expand', 'aria-label': t('Expand sidebar'), title: t('Expand sidebar'), onClick: () => actions.toggleSidebar() }, h(BrandMark, { size: 22 })),
+ h(TeamSidebar, { ...views, wide })),
+ h('div', { className: 'dsb-side-foot' },
+ h('button', { type: 'button', className: 'dsb-settings', title: t('Settings'), onClick: () => actions.openSettings() }, h(YouAvatar)))),
+ // The details panel makes room by giving the shell's `_centerCol` column a right margin.
+ h('main', { className: 'dsb-main dsb_centerCol' },
+ shown ? h(Fragment, { key: shown },
+ h('div', { className: 'dsb-head' }, h(HeaderPill, { ...views, sessionId: shown, useSession: team.sessionHook(shown) })),
+ h(Chat, { sessionId: shown, team })) : null),
+ h(Contain, { onError: closeOverlays }, h(Overlays, views)),
+ h(ErrorToast, views))
}
diff --git a/app/ui/src/chat.js b/app/ui/src/chat.js
index 0f3fc68a..b72afc1f 100644
--- a/app/ui/src/chat.js
+++ b/app/ui/src/chat.js
@@ -1,9 +1,11 @@
-import { createElement as h, useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react'
-import { dateLocale, t } from '../../../ds-bot/src/client/i18n.js'
+import { createElement as h, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react'
+import { call } from '../../../ds-bot/src/client/api.js'
+import { Bubbles, ChatRows, Shimmer } from '../../../ds-bot/src/client/cells.js'
+import { ComposerPlus, ComposerVoice } from '../../../ds-bot/src/client/composer.js'
+import { t } from '../../../ds-bot/src/client/i18n.js'
import { ArrowUpIcon } from '../../../ds-bot/src/client/icons.js'
-import { BotAvatar } from '../../../ds-bot/src/client/mark.js'
-import { call } from './api.js'
-import { stateOf } from './sidebar.js'
+import { ModelChoiceDock } from '../../../ds-bot/src/client/model-menu.js'
+import { PendingQuestion } from '../../../ds-bot/src/client/questions.js'
// The chat follows its end while the user is this close to it.
const FOLLOW_PX = 80
@@ -11,8 +13,8 @@ const sameItem = (a, b) => a.kind === b.kind && a.time === b.time && a.text ===
// A Bot's own chat: pages from the `chat` endpoint, new entries and the reply being
// written from the feed. Entries that arrive while the first page loads wait for it.
-function useChat(bot, bus) {
- const [view, setView] = useState({ sessionId: null, items: [], cursor: null, loading: true, failed: false })
+function useChat(botId, part, feed) {
+ const [view, setView] = useState({ sessionId: null, items: [], cursor: null, loading: botId !== undefined, failed: false })
const [stream, setStream] = useState(null)
const [pending, setPending] = useState([])
const ready = useRef(false)
@@ -21,12 +23,12 @@ function useChat(bot, bus) {
const keep = useRef(null)
const load = useCallback(async (cursor, scroller) => {
- if (busy.current) return
+ if (busy.current || botId === undefined) return
busy.current = true
if (cursor === undefined) ready.current = false
setView(current => ({ ...current, loading: true, failed: false }))
try {
- const page = await call('chat', { botId: bot.id, ...(cursor ? { cursor } : {}) })
+ const page = await call('chat', { botId, ...(cursor ? { cursor } : {}) })
if (cursor === undefined) {
const later = early.current.filter(entry => entry.sessionId === page.sessionId && !page.items.some(item => sameItem(item, entry.item)))
early.current = []
@@ -43,15 +45,15 @@ function useChat(bot, bus) {
} finally {
busy.current = false
}
- }, [bot.id])
+ }, [botId])
- // A new part (bot.sessionId) starts the chat over.
- useEffect(() => { void load(undefined) }, [load, bot.sessionId])
+ // A new part starts the chat over.
+ useEffect(() => { void load(undefined) }, [load, part])
- useEffect(() => bus.on((event, data) => {
+ useEffect(() => feed.on((event, data) => {
// The feed came back after a break: entries may have been missed.
if (event === 'hello') { if (ready.current) void load(undefined); return }
- if (data?.botId !== bot.id) return
+ if (botId === undefined || data?.botId !== botId) return
if (event === 'message') {
if (!ready.current) { early.current.push(data); return }
setView(current => (data.sessionId !== current.sessionId || current.items.some(item => sameItem(item, data.item)) ? current : { ...current, items: [...current.items, data.item] }))
@@ -67,14 +69,15 @@ function useChat(bot, bus) {
else if (data.phase === 'end') setStream(current => (current?.attemptId === data.attemptId ? null : current))
else setStream(current => (current?.attemptId === data.attemptId ? { ...current, text: current.text + data.text } : current))
}
- }), [bus, bot.id, load])
+ }), [feed, botId, load])
// Shown at once: the message can come back on the feed before the request returns.
- const send = async (text) => {
- const entry = { text, time: Date.now() }
+ const send = async (text, actions, sessionId) => {
+ const entry = { kind: 'user', text, time: Date.now() }
setPending(list => [...list, entry])
+ actions.noteSent(sessionId)
try {
- await call('send', { sessionId: bot.id, text })
+ await actions.send(sessionId, text)
} catch (error) {
setPending(list => list.filter(item => item !== entry))
throw error
@@ -83,91 +86,32 @@ function useChat(bot, bus) {
return { view, stream, pending, load, send, keep }
}
-const timeText = time => (Number.isFinite(time) ? new Date(time).toLocaleString(dateLocale(), { month: 'short', day: 'numeric', hour: '2-digit', minute: '2-digit' }) : '')
-
-function answerText(item) {
- return (item.answers ?? []).map(answer => [...(answer.selected ?? []), ...(answer.custom ? [answer.custom] : [])].join(', ')).filter(Boolean).join('\n')
-}
-
-function EventLine({ item, team }) {
- if (item.role === 'report') return h('div', { className: 'chat-event' }, `${t('Replies from')} ${team.rooms?.find(room => room.id === item.roomId)?.name ?? t('a group chat')}`)
- const other = team.bots.find(bot => bot.id === item.botId)
- const prefix = { stopped: t('Stopped by'), reply: t('Reply from') }[item.role] ?? t('Message from')
- return h('div', { className: 'chat-event' }, `${prefix} ${other?.name ?? item.name ?? t('a Bot')}`)
-}
-
-// Consecutive bubbles from one side share their inner corners.
-function Rows({ items, team }) {
- return items.map((item, index) => {
- const key = `${index}:${item.kind}:${item.time ?? ''}`
- if (item.kind === 'divider') return h('div', { key, className: 'chat-divider' }, h('span', null, timeText(item.time)))
- if (item.kind === 'event') return h(EventLine, { key, item, team })
- const side = item.kind === 'bot' ? 'bot' : 'user'
- const sideOf = other => (other?.kind === 'bot' ? 'bot' : other?.kind === 'user' || other?.kind === 'answer' || other?.pending ? 'user' : null)
- const text = item.kind === 'answer' ? answerText(item) : item.text
- return h('div', {
- key,
- className: `chat-row chat-${side}`,
- 'data-prev': sideOf(items[index - 1]) === side || undefined,
- 'data-next': sideOf(items[index + 1]) === side || undefined,
- 'data-pending': item.pending || undefined,
- },
- h('div', { className: 'chat-bubble' }, text,
- item.images ? h('span', { className: 'chat-note' }, item.images === 1 ? t('1 image') : t('{count} images', { count: item.images })) : null))
- })
+// What the Bot views' voice button asks of a composer (DSH's composer in the plugin):
+// where the caret is, and text put in there.
+function useInput(field, setText) {
+ return useMemo(() => ({
+ captureInsertion: () => (field.current ? { start: field.current.selectionStart, end: field.current.selectionEnd } : null),
+ insertText: (value, at) => setText((current) => {
+ const start = Math.min(at?.start ?? current.length, current.length)
+ return current.slice(0, start) + value + current.slice(Math.max(start, at?.end ?? start))
+ }),
+ }), [field, setText])
}
-function ModelChoice({ bot, models }) {
- const [busy, setBusy] = useState(null)
- const [error, setError] = useState(null)
- const pick = async (ref) => {
- setBusy(ref)
- setError(null)
- try { await call('update-bot', { id: bot.id, model: ref }) } catch (failure) { setError(failure.message); setBusy(null) }
- }
- return h('div', { className: 'chat-card' },
- h('p', null, t("Hi, I'm {name}. Pick a model for me first. You can change it later in my details.", { name: bot.name })),
- models.length === 0
- ? h('p', { className: 'chat-muted' }, t("Add a provider and a model in DeepSeek Harness first, or pick one in the Bot's chat later."))
- : h('div', { className: 'chat-choices' }, models.map(model => h('button', {
- key: model.ref, type: 'button', className: 'chat-choice', disabled: busy !== null, 'aria-busy': busy === model.ref || undefined, onClick: () => pick(model.ref),
- }, h('span', null, model.name ?? model.ref), model.providerName ? h('span', { className: 'chat-muted' }, model.providerName) : null))),
- error ? h('p', { className: 'chat-error', role: 'alert' }, error) : null)
-}
-
-function QuestionCard({ bot, question }) {
- const [busy, setBusy] = useState(false)
- const [error, setError] = useState(null)
- const answer = async (label) => {
- setBusy(true)
- setError(null)
- try { await call('answer-question', { sessionId: bot.id, questionId: question.id, answer: { selected: [label], custom: '' } }) } catch (failure) { setError(failure.message) } finally { setBusy(false) }
- }
- return h('div', { className: 'chat-card' },
- h('p', { className: 'chat-question' }, question.question),
- question.detail ? h('p', { className: 'chat-muted' }, question.detail) : null,
- h('div', { className: 'chat-choices' }, (question.options ?? []).map(option => h('button', {
- key: option.label, type: 'button', className: 'chat-choice', disabled: busy, onClick: () => answer(option.label),
- }, h('span', null, option.label), option.description ? h('span', { className: 'chat-muted' }, option.description) : null))),
- error ? h('p', { className: 'chat-error', role: 'alert' }, error) : null)
-}
-
-function Composer({ bot, disabled, placeholder, onSend }) {
+function Composer({ sessionId, placeholder, disabled, onSend, actions, useUi, useRoster }) {
const [text, setText] = useState('')
const [error, setError] = useState(null)
- const [sending, setSending] = useState(false)
const field = useRef(null)
+ const inputActions = useInput(field, setText)
useLayoutEffect(() => {
const node = field.current
- if (!node) return
node.style.height = 'auto'
- node.style.height = `${Math.min(node.scrollHeight, 120)}px`
+ node.style.height = `${node.scrollHeight}px`
}, [text])
- useEffect(() => { if (!disabled) field.current?.focus() }, [bot.id, disabled])
+ useEffect(() => { if (!disabled) field.current?.focus() }, [sessionId, disabled])
const submit = async () => {
const value = text.trim()
- if (value === '' || sending || disabled) return
- setSending(true)
+ if (value === '' || disabled) return
setError(null)
setText('')
try {
@@ -175,73 +119,83 @@ function Composer({ bot, disabled, placeholder, onSend }) {
} catch (failure) {
setText(current => (current === '' ? value : current))
setError(failure.message)
- } finally {
- setSending(false)
}
}
- return h('div', { className: 'composer-wrap' },
- error ? h('p', { className: 'chat-error', role: 'alert' }, error) : null,
- h('form', { className: 'composer', 'data-multiline': text.includes('\n') || undefined, onSubmit: (event) => { event.preventDefault(); void submit() } },
- h('textarea', {
- ref: field,
- rows: 1,
- value: text,
- disabled,
- placeholder,
- 'aria-label': placeholder,
- onChange: event => setText(event.target.value),
- onKeyDown: (event) => {
- if (event.key === 'Enter' && !event.shiftKey && !event.nativeEvent.isComposing) {
- event.preventDefault()
- void submit()
- }
- },
- }),
- h('button', { type: 'submit', className: 'composer-send', disabled: disabled || sending || text.trim() === '', 'aria-label': t('Send message') }, h(ArrowUpIcon))))
+ return h('div', { className: 'dsb-composer-wrap' },
+ error ? h('p', { className: 'dsb-composer-error', role: 'alert' }, error) : null,
+ h('div', { className: 'dsb-composer', 'data-composer-card': '', 'data-multiline': text.includes('\n') || undefined },
+ h('div', { className: 'dsb-composer-tools' }, h(ComposerPlus, { sessionId, inputActions, useRoster, actions })),
+ h('div', { className: 'dsb-composer-input', 'data-input-scroll': '' },
+ h('textarea', {
+ ref: field,
+ rows: 1,
+ value: text,
+ disabled,
+ placeholder,
+ 'aria-label': placeholder,
+ 'data-composer-input': '',
+ onChange: event => setText(event.target.value),
+ onKeyDown: (event) => {
+ if (event.key === 'Enter' && !event.shiftKey && !event.nativeEvent.isComposing) {
+ event.preventDefault()
+ void submit()
+ }
+ },
+ })),
+ h('div', { className: 'dsb-composer-trailing' },
+ h(ComposerVoice, { sessionId, inputActions, actions, useUi }),
+ h('button', { type: 'button', className: 'dsb-send', disabled: disabled || text.trim() === '', 'aria-label': t('Send message'), title: t('Send message'), onClick: () => { void submit() } }, h(ArrowUpIcon)))))
}
-export function Chat({ bot, team, live, bus }) {
- const { view, stream, pending, load, send, keep } = useChat(bot, bus)
+// One conversation in the main view, drawn with the Bot views' own rows, cards and docks.
+export function Chat({ sessionId, team }) {
+ const { actions, hooks, chat: feed } = team
+ const roster = hooks.useRoster(value => value)
+ const bot = roster.byId[sessionId]
+ const name = bot?.name ?? roster.roomsById[sessionId]?.name ?? ''
+ const { view, stream, pending, load, send, keep } = useChat(bot?.id, sessionId, feed)
const scroller = useRef(null)
const follow = useRef(true)
- const question = team.questions?.[bot.sessionId]
- const working = live.work?.bots?.[bot.id] !== undefined
- const items = [...view.items, ...pending.map(entry => ({ kind: 'user', text: entry.text, time: entry.time, pending: true }))]
+ const question = roster.questions?.[sessionId]
+ const running = hooks.useSessionStatus(map => map.get(sessionId)?.running === true)
useLayoutEffect(() => {
const node = scroller.current
- if (!node) return
if (keep.current !== null) {
node.scrollTop = node.scrollHeight - keep.current
keep.current = null
} else if (follow.current) node.scrollTop = node.scrollHeight
- }, [view.items, stream, pending, working, question])
+ }, [view.items, stream, pending, running, question])
const onScroll = () => {
const node = scroller.current
follow.current = node.scrollHeight - node.scrollTop - node.clientHeight < FOLLOW_PX
}
-
- return h('section', { className: 'chat', 'aria-label': bot.name },
- h('header', { className: 'chat-head' },
- h(BotAvatar, { bot, size: 28, state: stateOf(bot, live, team.questions ?? {}), main: (team.mainBotIds ?? []).includes(bot.id), badge: false }),
- h('span', { className: 'chat-title' }, bot.name),
- bot.role ? h('span', { className: 'chat-role' }, bot.role) : null),
- h('div', { ref: scroller, className: 'chat-scroll', onScroll },
- h('div', { className: 'chat-column', role: 'feed', 'aria-busy': view.loading },
- h('div', { className: 'chat-top' },
- view.loading ? h('span', { className: 'chat-muted' }, t('Loading earlier messages…'))
- : view.failed ? h('button', { type: 'button', className: 'chat-soft', onClick: () => load(view.cursor ?? undefined, scroller.current) }, t('Couldn’t load earlier messages · Retry'))
- : view.cursor ? h('button', { type: 'button', className: 'chat-soft', onClick: () => load(view.cursor, scroller.current) }, t('Load earlier')) : null),
- h(Rows, { items, team }),
- stream?.text ? h('div', { className: 'chat-row chat-bot' }, h('div', { className: 'chat-bubble' }, stream.text)) : null,
- working && !stream?.text ? h('div', { className: 'chat-row chat-bot' }, h('div', { className: 'chat-bubble chat-typing', 'aria-label': t('Working') }, h('i'), h('i'), h('i'))) : null,
- bot.waiting ? h(ModelChoice, { bot, models: team.models ?? [] }) : null,
- question ? h(QuestionCard, { bot, question }) : null)),
- h(Composer, {
- bot,
- disabled: bot.waiting === true,
- placeholder: bot.waiting ? t('Pick a model and {name} can start.', { name: bot.name }) : t('Message {name}', { name: bot.name }),
- onSend: send,
- }))
+ const earlier = view.loading && view.sessionId !== null ? h(Shimmer, null, t('Loading earlier messages…'))
+ : view.failed ? h('button', { type: 'button', className: 'bt-soft', onClick: () => load(view.cursor ?? undefined, scroller.current) }, t('Couldn’t load earlier messages · Retry'))
+ : view.cursor ? h('button', { type: 'button', className: 'bt-soft', onClick: () => load(view.cursor, scroller.current) }, t('Load earlier')) : null
+ const waiting = bot?.waiting === true
+
+ return h('div', { className: 'dsb-chat' },
+ h('div', { ref: scroller, className: 'dsb-scroll', 'data-conversation-scroll': '', onScroll },
+ h('div', { className: 'dsb-column' },
+ earlier ? h('div', { className: 'bt-earlier-top' }, earlier) : null,
+ h('div', { className: 'dsb-flow', 'data-chat-flow': '', role: 'feed', 'aria-label': name, 'aria-busy': view.loading },
+ h(ChatRows, { items: view.items, sessionId, roster, actions, useUi: hooks.useUi, clock: true }),
+ pending.length ? h('div', { className: 'dsb-pending' }, h(ChatRows, { items: pending, sessionId, roster, actions })) : null,
+ stream?.text ? h(Bubbles, { texts: [stream.text], roster, selfId: bot?.id, actions, streaming: true, sessionId }) : null,
+ // The Bot views' activity row (from the header pill) draws itself in here.
+ h('div', { 'data-chat-running': '' }),
+ question ? h(PendingQuestion, { sessionId, question, actions, inline: true }) : null))),
+ h('div', { className: 'dsb-composer-root' },
+ h(ModelChoiceDock, { sessionId, useRoster: hooks.useRoster, actions }),
+ h(Composer, {
+ sessionId,
+ disabled: waiting,
+ placeholder: waiting ? t('Pick a model and {name} can start.', { name }) : name ? t('Message {name}', { name }) : t('Message'),
+ onSend: text => send(text, actions, sessionId),
+ actions,
+ useUi: hooks.useUi,
+ useRoster: hooks.useRoster,
+ })))
}
diff --git a/app/ui/src/main.js b/app/ui/src/main.js
index 27a4595b..c2159b97 100644
--- a/app/ui/src/main.js
+++ b/app/ui/src/main.js
@@ -1,7 +1,18 @@
import { createElement as h } from 'react'
import { createRoot } from 'react-dom/client'
+import { ABOUT_CSS } from '../../../ds-bot/src/client/about.js'
+import { BOT_SETTINGS_CSS } from '../../../ds-bot/src/client/bot-settings.js'
+import { FEEDBACK_CSS } from '../../../ds-bot/src/client/feedback.js'
+import { FOLDER_CSS } from '../../../ds-bot/src/client/folder-menu.js'
+import { GROUP_SETTINGS_CSS } from '../../../ds-bot/src/client/group-settings.js'
import { installLocale } from '../../../ds-bot/src/client/i18n.js'
-import { MARK_CSS } from '../../../ds-bot/src/client/styles.js'
+import { MEMBER_CSS } from '../../../ds-bot/src/client/member-status.js'
+import { MODEL_CSS } from '../../../ds-bot/src/client/model-menu.js'
+import { SCHEDULE_CSS } from '../../../ds-bot/src/client/schedules.js'
+import { SECRET_CSS } from '../../../ds-bot/src/client/secret-card.js'
+import { SIDEBAR_CSS } from '../../../ds-bot/src/client/sidebar.js'
+import { CONVERSATION_CSS, SHELL_CSS, installStyles } from '../../../ds-bot/src/client/styles.js'
+import { USAGE_CSS } from '../../../ds-bot/src/client/usage-page.js'
import { createLocale } from './locale.js'
import { App } from './app.js'
import './app.css'
@@ -9,9 +20,12 @@ import './app.css'
installLocale(createLocale(navigator.language))
document.documentElement.lang = navigator.language
-const marks = document.createElement('style')
-marks.textContent = MARK_CSS
-document.head.append(marks)
+// The Bot views' own stylesheets, the same ones the plugin puts in DSH.
+for (const [tag, text] of [
+ ['shell', SHELL_CSS], ['sidebar', SIDEBAR_CSS], ['conversation', CONVERSATION_CSS], ['secrets', SECRET_CSS],
+ ['models', MODEL_CSS + FOLDER_CSS + BOT_SETTINGS_CSS + GROUP_SETTINGS_CSS], ['usage', USAGE_CSS], ['schedules', SCHEDULE_CSS],
+ ['feedback', FEEDBACK_CSS], ['about', ABOUT_CSS], ['members', MEMBER_CSS],
+]) installStyles(text, tag)
// The plugin's colors switch on body[data-ds-dark-theme], which DSH sets; here the system's
// light or dark mode sets it.
diff --git a/app/ui/src/primitives.js b/app/ui/src/primitives.js
new file mode 100644
index 00000000..0e006c00
--- /dev/null
+++ b/app/ui/src/primitives.js
@@ -0,0 +1,39 @@
+// The window's own versions of the DSH interface primitives the Bot views draw with (see
+// ds-bot/src/client/dsh-primitives.js and vite.config.js).
+import { createElement as h, useMemo, useRef, useState } from 'react'
+import Markdown from 'react-markdown'
+import remarkGfm from 'remark-gfm'
+import { MENTION_ORIGIN } from '../../../ds-bot/src/client/text.js'
+
+// The DSH Agent's mark. The app has no DSH Agent, so nothing asks for it.
+export const FishLogo = () => null
+
+const plugins = [remarkGfm]
+
+function CodeBlock({ children, labels }) {
+ const [copied, setCopied] = useState(false)
+ const block = useRef(null)
+ const copy = () => {
+ void navigator.clipboard?.writeText(block.current?.innerText ?? '').then(() => {
+ setCopied(true)
+ setTimeout(() => setCopied(false), 1000)
+ })
+ }
+ return h('div', { className: 'md-code' },
+ h('button', { type: 'button', className: 'md-copy', onClick: copy }, copied ? labels?.code?.copiedLabel : labels?.code?.copyLabel),
+ h('pre', { ref: block }, children))
+}
+
+// Links open outside the window; mention links stay for the chat's own click handler.
+const elements = labels => ({
+ a: ({ node: _node, ...props }) => h('a', props.href?.startsWith(MENTION_ORIGIN) ? props : { ...props, target: '_blank', rel: 'noreferrer' }),
+ pre: ({ children }) => h(CodeBlock, { labels }, children),
+})
+
+// The class keeps the `_markdown` stem that the Bot views' styles give DSH's Markdown.
+export function MarkdownText({ text, labels, variant }) {
+ // New element types on every render would remount each code block as a reply streams in.
+ const components = useMemo(() => elements(labels), [labels?.code?.copyLabel, labels?.code?.copiedLabel])
+ return h('div', { className: variant === 'compact' ? 'md_markdown md-compact' : 'md_markdown' },
+ h(Markdown, { remarkPlugins: plugins, components }, text ?? ''))
+}
diff --git a/app/ui/src/sidebar.js b/app/ui/src/sidebar.js
deleted file mode 100644
index 18e2e355..00000000
--- a/app/ui/src/sidebar.js
+++ /dev/null
@@ -1,30 +0,0 @@
-import { createElement as h } from 'react'
-import { t } from '../../../ds-bot/src/client/i18n.js'
-import { BotAvatar, botState } from '../../../ds-bot/src/client/mark.js'
-
-export function stateOf(bot, live, questions) {
- return botState(live.work?.bots?.[bot.id] !== undefined, live.activity?.[bot.id], questions[bot.sessionId] !== undefined)
-}
-
-// `bt-row` lets the plugin's mark styles pet the avatar under the pointer.
-function BotRow({ bot, main, state, current, onOpen }) {
- return h('button', { type: 'button', className: 'side-row bt-row', 'aria-current': current ? 'page' : undefined, onClick: () => onOpen(bot.id) },
- h(BotAvatar, { bot, size: 36, state, main }),
- h('span', { className: 'side-text' },
- h('span', { className: 'side-name' }, bot.name),
- bot.role ? h('span', { className: 'side-role' }, bot.role) : null))
-}
-
-export function Sidebar({ bots, mainBotIds, live, questions, current, onOpen }) {
- return h('aside', { className: 'side' },
- h('div', { className: 'side-top' }, h('span', { className: 'side-brand' }, 'DS Bot')),
- h('nav', { className: 'side-list', 'aria-label': t('Bots') },
- bots.map(bot => h(BotRow, {
- key: bot.id,
- bot,
- main: mainBotIds.includes(bot.id),
- state: stateOf(bot, live, questions),
- current: bot.id === current,
- onOpen,
- }))))
-}
diff --git a/app/ui/src/team.js b/app/ui/src/team.js
new file mode 100644
index 00000000..cf78ebf3
--- /dev/null
+++ b/app/ui/src/team.js
@@ -0,0 +1,261 @@
+// The team as the window keeps it: the Bot views' own sources and actions, fed by the
+// engine's `state` endpoint and live feed. The views also read a few Session facts that
+// DSH keeps for them in the plugin; here the window keeps those as well.
+import { useRef, useSyncExternalStore } from 'react'
+import { call } from '../../../ds-bot/src/client/api.js'
+import { workPhrase } from '../../../ds-bot/src/client/cells.js'
+import { language } from '../../../ds-bot/src/client/i18n.js'
+import { toolState } from '../../../ds-bot/src/client/mark.js'
+import { noteLeft, setUnread, sharedMap, toggleReaction } from '../../../ds-bot/src/client/shared-map.js'
+import { createSource, EMPTY_ROSTER, indexRoster } from '../../../ds-bot/src/client/sources.js'
+import { STORAGE, migrateStorage } from '../../../ds-bot/src/client/storage.js'
+import { teamActions } from '../../../ds-bot/src/client/team-actions.js'
+import { currentPart } from '../../../ds-bot/src/client/text.js'
+import { registry } from '../../../ds-bot/src/client/themes.js'
+import { openFeed } from './api.js'
+
+// Memory news and connector states change without a notice on the feed.
+const CATCH_UP_MS = 15_000
+const READ_AGAIN = new Set(['hello', 'revision', 'live'])
+const NO_WORK = { bots: {}, approvals: [] }
+
+// A selection from a source. The value is kept per snapshot and selector, so React reads
+// one value until the source changes.
+function useSelect(source, selector) {
+ const kept = useRef(null)
+ const read = () => {
+ const snapshot = source.getSnapshot()
+ const last = kept.current
+ if (last?.snapshot === snapshot && last.selector === selector) return last.value
+ const value = selector(snapshot)
+ kept.current = { snapshot, selector, value: last && Object.is(last.value, value) ? last.value : value }
+ return kept.current.value
+ }
+ return useSyncExternalStore(source.subscribe, read)
+}
+
+function createBus() {
+ const listeners = new Set()
+ return {
+ on(listener) {
+ listeners.add(listener)
+ return () => { listeners.delete(listener) }
+ },
+ emit(event, data) { for (const listener of listeners) listener(event, data) },
+ }
+}
+
+const setChanged = (source, value) => { if (JSON.stringify(source.getSnapshot()) !== JSON.stringify(value)) source.set(value) }
+
+export function createTeam() {
+ migrateStorage()
+ const unreadStore = sharedMap(STORAGE.unread)
+ const reactionStore = sharedMap(STORAGE.reactions)
+ // When each conversation was last left; a visit compares new entries against it.
+ const seenStore = sharedMap(STORAGE.seen)
+ let seenAt = seenStore.read()
+ const roster = createSource(EMPTY_ROSTER)
+ const ui = createSource({ details: null, view: 'details', renaming: false, tab: null, newChat: null, exchange: null, menu: null, voice: null, palette: null, quote: null, settings: null, memory: null, toast: null, signIn: null, renameAgent: null, unread: unreadStore.read(), reactions: reactionStore.read(), visits: {} })
+ const activity = createSource({})
+ const work = createSource(NO_WORK)
+ const memoryNews = createSource({})
+ const live = createSource({})
+ const cards = createSource({})
+ const turnClock = createSource({})
+ const update = createSource({ available: false, phase: 'idle' })
+ const browserPages = createSource({})
+ const browserTabs = createSource({})
+ const layout = createSource({ wide: true })
+ // The Session facts: the list (each one's latest entry and change, and which one fills
+ // the main view), the status (running, a reply not yet seen) and what was just sent.
+ const sessions = createSource({ ids: [], byId: {} })
+ const status = createSource(new Map())
+ const sent = createSource({})
+ const shown = createSource(null)
+ const chat = createBus()
+
+ const editRow = (id, edit) => sessions.set((list) => {
+ const row = list.byId[id] ?? { id }
+ return { ids: list.ids.includes(id) ? list.ids : [...list.ids, id], byId: { ...list.byId, [id]: edit(row) } }
+ })
+ const setStatus = (id, patch) => status.set((map) => {
+ const entry = map.get(id) ?? {}
+ if (Object.entries(patch).every(([key, value]) => (entry[key] ?? false) === value)) return map
+ return new Map(map).set(id, { ...entry, ...patch })
+ })
+ const show = (id) => {
+ if (shown.getSnapshot() === id) return
+ const before = shown.getSnapshot()
+ shown.set(id)
+ if (before) editRow(before, row => ({ ...row, retainedBy: { mainView: 0 } }))
+ editRow(id, row => ({ ...row, retainedBy: { mainView: 1 } }))
+ setStatus(id, { completionUnread: false })
+ }
+
+ let newsKey
+ const noteNews = (next) => {
+ const key = JSON.stringify(next)
+ if (key === newsKey) return
+ const opening = newsKey === undefined
+ newsKey = key
+ memoryNews.set(state => Object.fromEntries(Object.entries(next).map(([id, entry]) => [id,
+ state[id]?.at === entry.at ? state[id] : { ...entry, seen: opening ? 0 : Date.now() }])))
+ }
+ const seenKey = id => roster.getSnapshot().byId?.[id]?.id ?? id
+ const leaveVisits = (ids) => {
+ seenAt = seenStore.update(seen => noteLeft(seen, ids.map(seenKey), Date.now()), seenAt)
+ }
+ const writeUnread = (id, value) => {
+ const unread = unreadStore.update(marks => setUnread(marks, id, value), ui.getSnapshot().unread)
+ ui.set(state => (JSON.stringify(state.unread) === JSON.stringify(unread) ? state : { ...state, unread }))
+ }
+
+ // Reads can overlap (the feed and a finished action); an older answer never wins.
+ let pulls = 0
+ let applied = 0
+ const pull = async () => {
+ const order = ++pulls
+ const known = roster.getSnapshot()
+ const value = await call('state', { since: known.revision, models: known.modelsKey ?? '', locale: language() })
+ if (order < applied) return
+ applied = order
+ setChanged(activity, value.activity ?? {})
+ setChanged(work, value.work ?? NO_WORK)
+ noteNews(value.memoryNews ?? {})
+ const current = roster.getSnapshot()
+ const changed = {}
+ if (value.connectors !== undefined && JSON.stringify(value.connectors) !== JSON.stringify(current.connectors ?? [])) changed.connectors = value.connectors
+ if (value.capabilityStatuses !== undefined && JSON.stringify(value.capabilityStatuses) !== JSON.stringify(current.capabilityStatuses ?? {})) changed.capabilityStatuses = value.capabilityStatuses
+ if (Object.keys(changed).length > 0 && current.ready) roster.set({ ...current, ...changed })
+ if (value.unchanged || (value.revision === current.revision && value.modelsKey === current.modelsKey)) return
+ // In a window with no visit record yet, everything already there counts as seen.
+ if (Object.keys(seenAt).length === 0) leaveVisits([...value.bots, ...value.rooms].map(entry => entry.id))
+ roster.set(indexRoster(value))
+ }
+ const after = promise => promise.then(async (value) => { await pull().catch(() => {}); return value })
+ const partFor = (id) => {
+ const bot = roster.getSnapshot().byId[id]
+ return bot ? currentPart(bot) : id
+ }
+
+ const actions = {
+ ...teamActions({ call, after, partFor, roster, ui, live, cards, turnClock }),
+ // The full-pane overlays sit above the conversation, so opening one dismisses them.
+ openSession: (id) => {
+ ui.set(state => (state.newChat || state.exchange || state.menu || state.palette ? { ...state, newChat: null, exchange: null, menu: null, palette: null } : state))
+ show(partFor(id))
+ },
+ landOn: id => show(partFor(id)),
+ toggleSidebar: () => layout.set(state => ({ ...state, wide: !state.wide })),
+ markUnread: id => writeUnread(id, true),
+ clearUnread: id => writeUnread(id, false),
+ beginVisit: (id) => {
+ // A conversation a Bot started, never opened here, is unread from its start.
+ const made = roster.getSnapshot().byId[id] ?? roster.getSnapshot().roomsById[id]
+ const seen = seenAt[seenKey(id)] ?? (made?.createdBy && Number.isFinite(made.createdAt) ? made.createdAt : null)
+ ui.set(state => ({ ...state, visits: { ...state.visits, [id]: { seen, entered: Date.now() } } }))
+ },
+ endVisit: (id) => {
+ leaveVisits([id])
+ ui.set((state) => {
+ if (!(id in (state.visits ?? {}))) return state
+ const visits = { ...state.visits }
+ delete visits[id]
+ return { ...state, visits }
+ })
+ },
+ toggleReaction: (key, index, emoji) => {
+ const reactions = reactionStore.update(saved => toggleReaction(saved, key, index, emoji), ui.getSnapshot().reactions)
+ ui.set(state => ({ ...state, reactions }))
+ },
+ // Nothing else draws in the window: no shell panels, right sidebar, "@" menu or voice plugin.
+ hasRightSidebar: () => false,
+ canReferenceChat: () => false,
+ speech: () => undefined,
+ voiceSetup: () => null,
+ noteSent: (sessionId) => {
+ sent.set(state => ({ ...state, [sessionId]: [...(state[sessionId] ?? []), { placement: 'direct', time: Date.now() }] }))
+ },
+ }
+
+ // Running and the tool at work come with the team's state; the plugin reads them from
+ // DSH's Session status and its own tool cells.
+ const followWork = () => {
+ const bots = work.getSnapshot().bots ?? {}
+ for (const bot of roster.getSnapshot().bots) {
+ const part = currentPart(bot)
+ const doing = bots[bot.id]?.roomId === undefined ? bots[bot.id] : undefined
+ setStatus(part, { running: doing !== undefined })
+ actions.noteLive(part, 'tool', doing?.tool ? { label: workPhrase(doing), state: toolState(doing.tool) } : null)
+ }
+ }
+ roster.subscribe(followWork)
+ work.subscribe(followWork)
+
+ const onFeed = (event, data) => {
+ if (event === 'message' && data?.sessionId && data.item) {
+ const { sessionId, item } = data
+ const text = item.kind === 'bot' || item.kind === 'user' ? item.text : ''
+ editRow(sessionId, row => ({
+ ...row,
+ updatedAt: Math.max(row.updatedAt ?? 0, item.time ?? 0),
+ // The sidebar's preview line; turn -1 is never a hidden exchange turn.
+ projectionValues: text ? { turnOutline: [{ turn: -1, [item.kind === 'bot' ? 'response' : 'prompt']: text }] } : row.projectionValues,
+ }))
+ if (item.kind === 'bot' && shown.getSnapshot() !== sessionId) setStatus(sessionId, { completionUnread: true })
+ if (item.kind === 'user') sent.set(state => (state[sessionId]?.length ? { ...state, [sessionId]: state[sessionId].slice(1) } : state))
+ }
+ // While a reply streams in, it stands in for the activity row.
+ if (event === 'stream' && data?.sessionId) actions.noteLive(data.sessionId, 'reply', data.phase === undefined && data.text ? { text: true } : null)
+ chat.emit(event, data)
+ }
+
+ const start = () => {
+ let stopped = false
+ const read = () => {
+ void pull().catch((error) => {
+ if (stopped) return
+ console.warn('[ds-bot] state', error)
+ if (!roster.getSnapshot().ready) actions.reportError(error, 'state')
+ })
+ }
+ read()
+ const closeFeed = openFeed((event, data) => {
+ if (READ_AGAIN.has(event)) read()
+ onFeed(event, data)
+ })
+ const timer = setInterval(read, CATCH_UP_MS)
+ const onPageHide = () => leaveVisits(Object.keys(ui.getSnapshot().visits ?? {}))
+ window.addEventListener('pagehide', onPageHide)
+ return () => {
+ stopped = true
+ closeFeed()
+ clearInterval(timer)
+ window.removeEventListener('pagehide', onPageHide)
+ }
+ }
+
+ const use = source => selector => useSelect(source, selector)
+ const hooks = {
+ useRoster: use(roster),
+ useUi: use(ui),
+ useActivity: use(activity),
+ useWork: use(work),
+ useMemoryNews: use(memoryNews),
+ useLive: use(live),
+ useCards: use(cards),
+ useTurnClock: use(turnClock),
+ useUpdate: use(update),
+ useRegistry: use(registry),
+ useBrowserPages: use(browserPages),
+ useBrowserTabs: use(browserTabs),
+ useSessions: use(sessions),
+ useSessionStatus: use(status),
+ useSessionRetainInfo: (id, selector) => useSelect(sessions, list => selector(list.byId[id])),
+ useLayout: use(layout),
+ useShown: use(shown),
+ }
+ // The Session one view shows, as DSH hands it to a view: what was just sent there.
+ const sessionHook = sessionId => selector => useSelect(sent, state => selector({ pendingSubmissions: state[sessionId] ?? [] }))
+ return { actions, hooks, sessionHook, chat, start }
+}
diff --git a/app/vite.config.js b/app/vite.config.js
index 432deca0..88755e05 100644
--- a/app/vite.config.js
+++ b/app/vite.config.js
@@ -1,12 +1,26 @@
import { fileURLToPath } from 'node:url'
import { defineConfig } from 'vite'
+const primitives = fileURLToPath(new URL('./ui/src/primitives.js', import.meta.url))
+
+// The plugin's Bot views take DSH's interface primitives from one module; the window does
+// not load DSH's interface, so its own module stands in for that one.
+const ownPrimitives = {
+ name: 'ds-bot-primitives',
+ enforce: 'pre',
+ resolveId(source, importer) {
+ return source === './dsh-primitives.js' && importer?.replaceAll('\\', '/').includes('/ds-bot/src/client/') ? primitives : null
+ },
+}
+
// The window loads the build from the app's own scheme, so asset paths stay relative.
export default defineConfig({
root: fileURLToPath(new URL('./ui', import.meta.url)),
base: './',
- // The marks, themes and copy come from the plugin's interface code in ../ds-bot, which
- // has no React of its own.
+ plugins: [ownPrimitives],
+ // The Bot views come from the plugin's interface code in ../ds-bot, which has no React
+ // of its own.
resolve: { dedupe: ['react', 'react-dom'] },
- build: { outDir: 'dist', emptyOutDir: true },
+ // One bundle: the window loads it from disk, not over a network.
+ build: { outDir: 'dist', emptyOutDir: true, chunkSizeWarningLimit: 2048 },
})
diff --git a/docs/plans/2026-10-16-desktop-app.md b/docs/plans/2026-10-16-desktop-app.md
index ec60cc02..bb5e018e 100644
--- a/docs/plans/2026-10-16-desktop-app.md
+++ b/docs/plans/2026-10-16-desktop-app.md
@@ -20,7 +20,7 @@
|---|---|
| 壳 | Electron 主进程。只开一个实例;窗口用 `dsh-app://app` 加载页面,把请求转发给引擎;管引擎进程的启动和退出 |
| 引擎 | 子进程,用 Electron 自带的 Node 运行。通过 `@deepseek-ai/dsh/profile-boot` 的 `runProfile()` 启动 profile `ds-bot`,只监听 `127.0.0.1` 上系统分配的端口。环境变量 `DS_BOT_APP=1` 告诉 ds-bot 它跑在桌面应用里 |
-| 界面 | DS Bot 自己写的网页(React + Vite)。只认 DS Bot 自己的接口:引擎里的 ds-bot 用 HTTP 和事件流提供团队、对话和设置的数据,界面不直接调 DSH 的接口,也不引用 `@deepseek-ai/*` 的包。DSH 只出现在引擎这一层 |
+| 界面 | DS Bot 自己写的网页(React + Vite)。只认 DS Bot 自己的接口:引擎里的 ds-bot 用 HTTP 和事件流提供团队、对话和设置的数据,界面不直接调 DSH 的接口,也不引用 `@deepseek-ai/*` 的包。DSH 只出现在引擎这一层。Bot 界面(侧栏、对话、详情、弹窗和它们的样式)和插件版是同一套代码,两边长得一样;插件版里由 DSH 画的部分(Markdown 排版、会话框架),窗口自己画 |
- 插件版和桌面应用用同一份 `ds-bot`,插件版不变。
- 安装包和 `ds-bot` 用同一个版本号。
@@ -74,4 +74,4 @@
## 变更
- 2026-10-17:电脑操作和浏览器操作的提供方由用户选,PR #278。
-- 2026-10-17:窗口换成自己的界面(团队列表和 Bot 的私聊),PR #279。
+- 2026-10-17:窗口换成自己的界面,用插件版的 Bot 界面画:团队侧栏、Bot 的私聊、详情、搜索、新建和设置,PR #279。