dsh-at-file
FSMargoo/dsh-at-fileCodex 风格的 `@file` 文件引用,输入框里直接搜索并引用工作区文件。
dsh web GUI 右侧面板系统:像素级还原 AionUi 的资源树 + 预览(文件树、差异视图、预览)。
English | 中文
A pixel-faithful re-implementation of AionUi's right-panel system (Apache-2.0 licensed reference implementation, not a copy): Explorer project panel (file tree / filename search / Git changes) + Preview panel (multi-tab preview of 10+ formats) + a unified draggable layout system, with per-project preference persistence.
Install the family aggregate package @linxin666/dsh-web-ui-all (all plugins and skins in one) or this plugin alone:
# Recommended: install directly from npm
dsh plugin --profile web add @linxin666/dsh-client-ui-aionui-panel
# Or from the repository (development loop)
git clone https://github.com/zhu1090093659/dsh-web-ui.git
cd dsh-web-ui
pnpm install && pnpm -r build
dsh plugin --profile web add link:$(pwd)/packages/dsh-aionui-panel
After installing, restart dsh web and open a project session to see the "预览" (Preview) and "文件/变更" (Files/Changes) panels to the right of the chat area.
When a project session (the current session has a working directory) is open, two panels appear to the right of the chat area:
File / Changes two tabs; clicking a row in the file tree expands/collapses a folder, clicking a file opens it in the preview panel, and the top filename search (150ms debounce, clicking a result locates it in the tree without interrupting flow); the Changes tab reads the real git status and supports stage / unstage / discard (untracked via delete, tracked via restore, bulk discard asks for confirmation).deploy/base/deployment.yaml) at the cursor of the current draft, and the agent reads the file itself once the message arrives — no need to type the path by hand; a highlighted hint bar shows above the input while dragging.Interaction details:
body[data-ds-dark-theme]), and prefers-reduced-motion globally disables animations.chat-workspace-width-px / chat-preview-width-px / preview-panel-split-ratio / project-panel-collapse:<root> / explorer-ui:<root> / scm-ui:<root> / preview-ui:<root> (LRU capped at 12 scopes). Reads are always range-checked; invalid values fall back to defaults.The real filesystem and the real git repository, no mocks:
src/index.ts + src/host/) serves directory listing, file reads (text capped at 80k chars / image data URLs), writes (mtime conflict detection), filename search (skipping .git / node_modules), git status (porcelain v1 -z) / stage / unstage / discard, and an SSE change stream (fs watching + git polling) over the /aionui-panel/* HTTP routes./aionui-panel/* route (JSON operations, raw reads, and the SSE events stream) is loopback-only: non-loopback clients get 403 forbidden: loopback-only before any workspace access, matching the dsh-ssh fence.node_modules / .git; the SCM poll runs every 30s per workspace (each probe bounded by a 15s deadline), and roots that are not git repositories stop being re-probed thanks to a TTL cache. File edits surface via the watcher immediately; .git-only changes (commits/checkouts from other tools) appear within one poll interval or on window focus (throttled to once per 5s).src/client/) treats the current session cwd as the project root; switching sessions switches projects.src/index.ts — host half entry (cordis plugin: route registration + systemPrompt announcement).src/host/ — fs/git data services and the route layer (workspace gate).src/core/types.ts — shared wire types across both halves.src/client/ — browser half: framework-agnostic state core (store.ts), drag engine (drag.ts + hooks/useResizableSplit.ts), DOM layout controller (layout.ts, appending panel tracks to the shell's three-column grid), React components (explorer / scm / preview).tests/ — pure-logic tests for the clamp formula, porcelain parsing, persistence validation, markdown/csv rendering, store behavior, etc. (vitest, 37 tests).export NPM_TOKEN='<token>' # only if private scope auth is still required
pnpm install
pnpm -r build
This project is a re-implementation of the AionUi (iOfficeAI/AionUi, Apache-2.0) right-panel system: sizes, colors, motions and interaction parameters come from measured research against v2.1.53 (research report and screenshots live in the aionui-research repository), the implementation is entirely new code and does not copy the source in bulk. Upstream copyright belongs to the AionUi project; this project preserves attribution under the Apache-2.0 convention.