Host half (src/index.ts): /sidebar/api JSON API (session cwd, fs tree/read/ write, git status/diff/stage/commit/branch/log/show), /sidebar/file media route, /sidebar/ws/terminal WebSocket over node-pty; routes share the /api trust fence (Host-header loopback or connection.trustedHosts). Client half (src/client): portal-mounted right panel with a per-session split-pane workbench (recursive row/col splits, draggable dividers, tab drag-move), tab bar with max-width 160px + plus-menu (explorer/git/terminal multi-open rules), lazy file explorer rooted at the session cwd, editable text editor (dirty dot, Ctrl/Cmd+S), image + Markdown preview, xterm terminal with reconnect, and a VSCode-style git panel. Per-session state persists to localStorage (dsh-sidebar:v1:<sessionId>). Intercepts the chat turn-tail produced-files row (priority -1 chain entry) to open files in the sidebar. UI styled with the dsh --dsw-* theme tokens and ui-primitives. Build: tsdown emits the host lib plus the __ModuleLoader__ client bundle (externals = module table words; xterm/css inlined). Tests: 19 unit + smoke specs (pure state/tree/git parsers + real git/fs integration).
58 lines
1.8 KiB
JSON
58 lines
1.8 KiB
JSON
{
|
|
"name": "dsh-better-sidebar",
|
|
"version": "0.1.0",
|
|
"description": "DSH web plugin: a VSCode-like right sidebar (explorer / editor / terminal / git), isolated per conversation session.",
|
|
"private": true,
|
|
"type": "module",
|
|
"main": "lib/index.js",
|
|
"exports": {
|
|
".": {
|
|
"default": "./lib/index.js"
|
|
},
|
|
"./client": {
|
|
"default": "./lib/client.js"
|
|
},
|
|
"./package.json": "./package.json"
|
|
},
|
|
"dshClient": {
|
|
"platform": "web"
|
|
},
|
|
"files": [
|
|
"lib"
|
|
],
|
|
"scripts": {
|
|
"build": "tsc --noEmit && tsdown",
|
|
"typecheck": "tsc --noEmit",
|
|
"bundle": "tsdown",
|
|
"watch": "tsdown --watch",
|
|
"test": "vitest run"
|
|
},
|
|
"license": "MIT",
|
|
"dependencies": {
|
|
"@xterm/addon-fit": "^0.10.0",
|
|
"clsx": "^2.1.1",
|
|
"node-pty": "^1.1.0",
|
|
"ws": "^8.18.0",
|
|
"xterm": "^5.3.0"
|
|
},
|
|
"devDependencies": {
|
|
"@deepseek-ai/dsh-client-runtime": "link:/Users/menghuan/.dsh/source/current/packages/client/runtime",
|
|
"@deepseek-ai/dsh-client-ui-conversation": "link:/Users/menghuan/.dsh/source/current/packages/client/ui-conversation",
|
|
"@deepseek-ai/dsh-client-ui-primitives": "link:/Users/menghuan/.dsh/source/current/packages/client/ui-primitives",
|
|
"@deepseek-ai/dsh-client-ui-slots": "link:/Users/menghuan/.dsh/source/current/packages/client/ui-slots",
|
|
"@deepseek-ai/dsh-host-webserver": "link:/Users/menghuan/.dsh/source/current/packages/host/webserver",
|
|
"@deepseek-ai/dsh-session": "link:/Users/menghuan/.dsh/source/current/packages/core/session",
|
|
"@types/node": "^24.0.0",
|
|
"@types/react": "~18.3.1",
|
|
"@types/react-dom": "~18.3.1",
|
|
"@types/ws": "^8.5.10",
|
|
"cordis": "^4.0.0-rc.7",
|
|
"lightningcss": "^1.32.0",
|
|
"react": "^18.2.0",
|
|
"react-dom": "18.2.0",
|
|
"tsdown": "^0.22.2",
|
|
"typescript": "^5.6.0",
|
|
"vitest": "^4.1.8"
|
|
}
|
|
}
|