- remote-access 新增 whenAccess / whenResourceAccess,ui-session、ui-workspace 各自提供 whenAccess - schedule、plugin-manager、settings-general、settings-account、directory-picker-native 的入口包进 global whenAccess;消息反馈按钮按会话 useAccess 渲染 - webserver/index-inject 带 Peer,renderIndex / collectIndexInjections 需要 Peer,remote-access 注入 snapshotFor(peer.principal) - client-test-runtime 新增 StaticRemoteAccess、staticAccessPlugin 与 TestClientOptions.access - implemented Agent Note 2026-10-21-when-access 与升级指南 webserver-index-peer Refs #2940
2.4 KiB
description, kind
| description | kind |
|---|---|
| 面向 Session Controller 列表、交互状态与逐会话上下文的 React 与 Slot 适配器。 | package-reference |
@deepseek-ai/dsh-client-ui-session
English | 中文
概述
使用本包可通过标准 Slot 钩子公开 Session catalog、retain 信息与统一 UI 状态。它按 SessionBinding 物化钩子和 prop,而 SessionProvider 可以继承外围 binding 或绑定显式 SessionReference。它拥有进程本地的 pending-interaction 与完成提醒策略,但不拥有 Controller transport、历史或 reference。
运行状态来自 Host 列表基线或状态事件。Subagent 目录行和已保留子会话的 fallback 行不会建立运行状态;主视图引用仍会确认完成提醒。
目录
访问 Hook
本包注入 Client remoteAccess 服务,并在其 source() 之上发布会话访问 Hook:根作用域的 useSessionAccess(sessionId, action) 回答某一个 Session 资源上的访问,Session 作用域的 useAccess(action) 回答所绑定 Session 资源上的访问;global 资源上的答案是另一个 Hook useRemoteAccess(action),两者互不遮蔽。ctx.uiSession.whenAccess(sessionId, action, callback) 是 useSessionAccess 在 JS 侧的对应:当前 Peer 能在该 Session 上调用 action 期间保持回调的效果,语义同 ctx.remoteAccess.whenAccess。SessionMaybe 作用域的 useAccess(action) 在未绑定 Session 时返回 undefined,调用方将其视为不允许;需要 global 资源上的判断时读 useRemoteAccess。快照语义归 dsh-api-remote-access。
模型体验
无,因为本包适配浏览器侧 Session 状态,不注册任何面向模型的内容。
KV Cache 影响
无;Session selector 与 Slot scope 不会组装模型请求。
已知限制与暂缓事项
- Pending interaction 是进程本地投影——浏览器重连后,所属 Remote waterfall(瀑布式事件)必须重放仍未完成的请求。
开发备注
维护者工作上下文——点击展开
无。