# dsh-summary-panel [English](README.md) | 简体中文 面向 DeepSeek Harness Web、可扩展的 Codex 风格会话摘要面板。 会话标题栏中的列表图标用于切换 320px 宽的紧凑浮窗。浮窗高度随内容增长,达到视口可用高度后由内容区滚动;它会贴近会话右侧,并保持在已打开的 Harness 工具详情栏左侧。移动端则使用可关闭的右侧抽屉。开关状态按会话持久化。 ## 内置输出分区 “输出”分区读取 `ui-deliverables` 发布的成功文件修改。它会聚合所有已加载 Turn,以最后一次成功修改的序号为准对精确路径去重,并按最近修改优先排列。默认显示 5 个文件,可明确展开或收起。点击文件行时,插件会按当前会话工作区解析路径,并交给 Harness 打开。 没有产物时显示 **暂无输出**。内置分区不显示创建按钮,因为摘要面板本身不拥有文件创建流程。 ## 安装 将经过审查的提交安装到 DSH profile: ```sh dsh plugin --profile add github:hzthzt/dsh-summary-panel# dsh --profile --dump-config dsh --profile web ``` 仓库已提交 `lib/`,因此从 Git 安装时不需要构建。也可以安装本地 tarball: ```sh pnpm pack dsh plugin --profile add ./dsh-summary-panel-0.1.0.tgz ``` ## 扩展接口 其他 Client 插件可以通过类型化的 `conversation.summary.section` 列表 slot 注册会话分区。贡献插件需将 `dsh-summary-panel` 加入 Client inject 列表和 peer dependencies,然后导入其公开 Client 契约: ```tsx import type { ClientContext } from '@deepseek-ai/dsh-client-runtime/client' import { SummaryEmpty, SummarySection, type SummarySectionComponentProps, } from 'dsh-summary-panel/client' function ReviewSection({ presentation, closePanel }: SummarySectionComponentProps) { return ( {}}> 暂无待审查内容 {presentation} ) } export function apply(ctx: ClientContext): void { ctx.slots.inject('conversation.summary.section', () => ctx.slots.register({ name: 'conversation.summary.section', id: 'review', order: 30, }, ReviewSection)) } ``` 每个分区都会获得标准 Session props,包括 `sessionId`、`useSession`、`useSessions`,以及 `presentation: 'pinned' | 'overlay'` 和 `closePanel()`。 Client 模块还会为 `ctx.summaryPanel` 增加服务接口: ```ts ctx.summaryPanel.open(sessionId) ctx.summaryPanel.close(sessionId) ctx.summaryPanel.toggle(sessionId) ``` 公开样式组件包括 `SummarySection`、`SummaryItem` 和 `SummaryEmpty`。只有同时提供 `actionLabel` 与 `onAction` 时,`SummarySection` 才会显示加号操作。 ## 布局兼容性 版本 `0.1.0` 面向 DeepSeek Harness `dsh-v0.1.1-rc.2`,对应提交 `b150a551b8d465e31e418e1b2eaf5e79bbb7d28e`。 浮窗定位依赖该基线的 AppFrame 顺序:`[data-shell-overlay]` 位于 details 列之后。插件利用 details 宽度将浮窗放在已打开的工具详情栏左侧,但不替换 `conversation`、`details` 或其他单占用 slot,也不修改 center 列。DOM 无法识别或测量时,面板会回退为右对齐浮窗。 ## 开发 使用 Node.js 24 和 `pnpm@11.7.0`: ```sh pnpm install --frozen-lockfile pnpm typecheck pnpm test pnpm build git diff --exit-code -- lib pnpm pack ``` ## 许可证 MIT