打开会话时自动加载全部历史消息,免去反复点击「加载更早」。
安装
# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)
dsh plugin --profile web add github:magicOF2/dsh-autoload-history
装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。
README
打开会话自动加载全部历史消息,免去反复点击「加载更早」。 Automatically load the full conversation history when a session opens — no more clicking “Load earlier”.
DeepSeek Harness(DSH)Web 打开会话时只加载最近 50 条消息,更早的内容要一页页手动点「加载更早」。本插件让打开会话即自动翻页,直到整个会话完整加载——长会话一进来就全部就绪,翻旧消息不再需要任何点击。
When DSH Web opens a session it only loads the latest 50 messages; everything older requires clicking “Load earlier” page by page. This plugin pages through the rest automatically the moment a session opens, until the whole conversation is loaded — no more clicking to reach old messages.
安装 / Install
从 GitHub 源码安装(推荐)/ From source (recommended)
dsh plugin --profile web add github:magicOF2/dsh-autoload-history
首次安装会请求 allowBuilds 构建授权(GitHub 源需要从源码构建),按提示允许后重试一次即可。 / First install asks for the allowBuilds build approval (GitHub sources build from source) — follow the hint and retry once.
从 npm 安装 / From npm
发布后可用: / Once published:
dsh plugin --profile web add dsh-autoload-history
npm 预构建安装会跳过 allowBuilds 步骤。 / Prebuilt npm installs skip the allowBuilds step.
使用 / Usage
零配置。安装后打开任意会话即自动生效: / No configuration. Open any session and it just works:
- 自动逐页加载(每页 50 条)直到整个会话全部就绪; / Pages automatically (50 messages per page) until the entire history is loaded;
- 切换会话自动跟随,互不干扰; / Follows session switches automatically;
- 加载不打断正常聊天(翻页与实时追加互不冲突); / Loading never interrupts an active conversation;
- 全程无 UI 痕迹(隐形挂载在会话底部官方槽位)。 / Fully invisible — mounted in an additive session slot.
可选设置 / Optional settings(localStorage)
| 键 Key | 值 Value | 效果 Effect |
|---|---|---|
dsh-autoload-history.disabled |
'1' |
整体停用自动加载(逃生开关)/ disable the plugin without uninstalling |
dsh-autoload-history.maxPages |
正整数 | 单次打开会话最多自动翻的页数;缺省/'0' = 不限 / cap pages per session open; default unlimited |
// 在 DSH Web 控制台执行 / run in the browser console
localStorage.setItem('dsh-autoload-history.disabled', '1') // 停用
localStorage.removeItem('dsh-autoload-history.disabled') // 恢复
localStorage.setItem('dsh-autoload-history.maxPages', '20') // 只翻 20 页(约 1000 条)
非法值一律回落默认(启用、不限页)。 / Invalid values always fall back to enabled + unlimited.
工作原理 / How it works
- 挂载到官方会话级槽位
conversation.composer.dock(列表槽、零侵入,渲染null); / Mounts in the official session-scopedconversation.composer.docklist slot (additive, renders nothing); - 通过槽位标准 props 拿到会话快照(
useSession选择器)与sessionId; / Reads the conversation snapshot (useSession) andsessionIdfrom the slot's standard props; - 快照
openState === 'open'且hasMore === true且未在翻页时,调用session.loadOlder()翻一页; / Whenever the snapshot is open withhasMoreand no page in flight, callssession.loadOlder(); - 每翻一页快照更新 → 自动触发下一页,直到
hasMore === false; / Each page updates the snapshot, which cascades the next page, untilhasMore === false; - 防呆:连续 3 页无进展自动放弃(故障时绝不死循环)。 / Guard: gives up after 3 consecutive no-progress pages (never hot-loops on a failing host).
详见 docs/DESIGN.md。 / See docs/DESIGN.md.
兼容性 / Compatibility
- DeepSeek Harness
>= 0.1.0-rc.5(Web profile)/ DeepSeek Harness>= 0.1.0-rc.5(Web profile) - 纯浏览器端插件:无宿主行为、无数据上报、无网络请求 / Pure client plugin: no host behavior, no telemetry, no network requests
- 不修改任何官方文件,卸载即完全还原 / Does not modify any official files; uninstalling restores everything
开发 / Development
npm ci
npm run build # 产出 lib/index.mjs(Node half)+ lib/client.js(浏览器 bundle)
npm test # node --test:纯决策核心(翻页判定/守卫/设置解析)
许可证 / License
MIT © magicOF2
相关 / Related
- DeepSeek Harness
- awesome-dsh-plugin — DSH 插件精选列表 / curated DSH plugin list
链接
同类插件
zhu1090093659/dsh-web#packages/dsh-task-board★ 8296
侧边栏多列任务看板:卡片交给真实 DSH 智能体会话执行,支持 cron 定时(Host 侧到点执行,关浏览器也生效)。
zhu1090093659/dsh-web#packages/dsh-web-all★ 8296
DSH Web UI 插件与皮肤合集:任务看板、git 图、右侧面板、远程移动端 UI、桌宠、实时 token 统计与皮肤中心。
omdsh-dev/DSH-better-sidebar★ 3968
侧边栏完整工作台:内置文件渲染编辑、终端、Git 与子代理,支持三方插件注册新 Tab。
ccch1mneyyy/dsh-TUI★ 3948
Claude Code 风格全屏终端 UI:像素鲸鱼顶栏、实时工作状态行、思考流式展开。
MeteorNOX/DeepSeek-Balance-Whale-Widget★ 3877
右下角常驻的小鲸鱼挂件:余额、今日已用与每轮对话消耗(含峰谷价),余额预警与今日预算的泡泡内容都可编辑;泡泡点击序列模块化自定义,支持并列加权 A/B、随机台词与随机图片;内置 30+ 厂商模板(OpenAI / OpenRouter / Kimi / 硅基流动 / 方舟 / 智谱 / MiniMax 等),按模型查余额与订阅额度;另有任务结束音效、导入音频、自定义角色与资源管理。数据全在本机,无遥测。
Devin-AXIS/deepseek-design#deepseek-idesign★ 1413
可视化设计工作室,支持网站、App 原型、海报、信息卡、报告和杂志的模板创建、元素编辑、选区级 AI 草稿衔接与导出。
社区评论
评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。