@meiyukichan/dsh-sandore 0.1.0-rc.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (295) hide show
  1. package/LICENSE +201 -0
  2. package/cordis.patch.yml +39 -0
  3. package/dsh.plugin.json +16 -0
  4. package/lib/client/CommandEditor.d.ts +19 -0
  5. package/lib/client/DagEditor.d.ts +22 -0
  6. package/lib/client/DefinitionDetail.d.ts +13 -0
  7. package/lib/client/DefinitionList.d.ts +19 -0
  8. package/lib/client/DiscussionInput.d.ts +63 -0
  9. package/lib/client/DragHandle.d.ts +16 -0
  10. package/lib/client/EditorPane.d.ts +13 -0
  11. package/lib/client/FlowEditor.d.ts +31 -0
  12. package/lib/client/InstanceList.d.ts +24 -0
  13. package/lib/client/NewInstanceDialog.d.ts +19 -0
  14. package/lib/client/PreviewPanel.d.ts +13 -0
  15. package/lib/client/RunView.d.ts +79 -0
  16. package/lib/client/StepChatPanel.d.ts +34 -0
  17. package/lib/client/TreeNav.d.ts +27 -0
  18. package/lib/client/UnifiedTimeline.d.ts +11 -0
  19. package/lib/client/WorkflowButton.d.ts +11 -0
  20. package/lib/client/WorkflowList.d.ts +18 -0
  21. package/lib/client/WorkflowOverlay.d.ts +6 -0
  22. package/lib/client/chat/AssistantMarkdown.d.ts +22 -0
  23. package/lib/client/chat/CompactionItem.d.ts +24 -0
  24. package/lib/client/chat/ContextBody.d.ts +136 -0
  25. package/lib/client/chat/ContextInjectionRow.d.ts +25 -0
  26. package/lib/client/chat/GenericCommandCard.d.ts +10 -0
  27. package/lib/client/chat/MessageIconActions.d.ts +41 -0
  28. package/lib/client/chat/MessageItem.d.ts +65 -0
  29. package/lib/client/chat/ReasoningRow.d.ts +13 -0
  30. package/lib/client/chat/TurnTailNodeView.d.ts +29 -0
  31. package/lib/client/chat/UserMessageRow.d.ts +18 -0
  32. package/lib/client/chat/attachment/ImageLightbox.d.ts +26 -0
  33. package/lib/client/chat/attachment/MessageImage.d.ts +56 -0
  34. package/lib/client/chat/attachment/image-attachment.d.ts +41 -0
  35. package/lib/client/chat/attachment/image-labels.d.ts +21 -0
  36. package/lib/client/chat/message-chrome.d.ts +51 -0
  37. package/lib/client/chat/reference/ReferenceIcon.d.ts +20 -0
  38. package/lib/client/chat/turn-assistant.d.ts +12 -0
  39. package/lib/client/chat/turn-metrics.d.ts +42 -0
  40. package/lib/client/chat/use-calendar-day.d.ts +5 -0
  41. package/lib/client/chat/use-throttled-visual-update.d.ts +7 -0
  42. package/lib/client/chat-flow.d.ts +110 -0
  43. package/lib/client/composer-selects.d.ts +17 -0
  44. package/lib/client/dag-editor-model.d.ts +141 -0
  45. package/lib/client/describe-error.d.ts +9 -0
  46. package/lib/client/index.d.ts +6 -0
  47. package/lib/client/locales.d.ts +777 -0
  48. package/lib/client/model-faces.d.ts +156 -0
  49. package/lib/client/open-discussion.d.ts +24 -0
  50. package/lib/client/panel-model.d.ts +34 -0
  51. package/lib/client/remote.d.ts +34 -0
  52. package/lib/client/run-view-model.d.ts +304 -0
  53. package/lib/client/sandore-save.d.ts +41 -0
  54. package/lib/client/sandore-sse.d.ts +15 -0
  55. package/lib/client/step-chat-retry.d.ts +44 -0
  56. package/lib/client/tool/GenericToolCard.d.ts +28 -0
  57. package/lib/client/tool/ToolRow.d.ts +95 -0
  58. package/lib/client/tool/diff-card-model.d.ts +63 -0
  59. package/lib/client/tool/read-card-model.d.ts +67 -0
  60. package/lib/client/tool/search-card-model.d.ts +94 -0
  61. package/lib/client/tool/terminal-card-model.d.ts +86 -0
  62. package/lib/client/tool/tool-call-model.d.ts +74 -0
  63. package/lib/client/tool/web-card-model.d.ts +44 -0
  64. package/lib/client/use-focus-refresh.d.ts +1 -0
  65. package/lib/client/workflow-face.d.ts +68 -0
  66. package/lib/client/workflow-store.d.ts +80 -0
  67. package/lib/client/workspace-path.d.ts +15 -0
  68. package/lib/client.js +38389 -0
  69. package/lib/index.js +8854 -0
  70. package/lib/microflow/branch-evaluator.d.ts +290 -0
  71. package/lib/microflow/concurrency-limiter.d.ts +39 -0
  72. package/lib/microflow/errors.d.ts +39 -0
  73. package/lib/microflow/file-utils.d.ts +210 -0
  74. package/lib/microflow/finalize-manager.d.ts +414 -0
  75. package/lib/microflow/fork-session.d.ts +151 -0
  76. package/lib/microflow/index.d.ts +17 -0
  77. package/lib/microflow/internal.d.ts +56 -0
  78. package/lib/microflow/loop-manager.d.ts +127 -0
  79. package/lib/microflow/rules-resolver.d.ts +28 -0
  80. package/lib/microflow/stage-executor.d.ts +362 -0
  81. package/lib/microflow/step-navigator.d.ts +108 -0
  82. package/lib/microflow/step-runner.d.ts +190 -0
  83. package/lib/microflow/subagents.d.ts +380 -0
  84. package/lib/tool/index.d.ts +65 -0
  85. package/lib/typert.host.d.ts +16 -0
  86. package/lib/typert.host.js +25 -0
  87. package/lib/typert.remote-client.d.ts +114 -0
  88. package/lib/typert.remote-client.js +399 -0
  89. package/lib/workflow/ask-tool.d.ts +78 -0
  90. package/lib/workflow/dag-navigator.d.ts +136 -0
  91. package/lib/workflow/domain.d.ts +304 -0
  92. package/lib/workflow/engine-surface.d.ts +70 -0
  93. package/lib/workflow/errors.d.ts +13 -0
  94. package/lib/workflow/host-agent.d.ts +53 -0
  95. package/lib/workflow/index.d.ts +23 -0
  96. package/lib/workflow/interaction-manager.d.ts +170 -0
  97. package/lib/workflow/lifecycle-manager.d.ts +111 -0
  98. package/lib/workflow/persistence.d.ts +35 -0
  99. package/lib/workflow/plugin.d.ts +27 -0
  100. package/lib/workflow/reactive-state.d.ts +27 -0
  101. package/lib/workflow/recovery-manager.d.ts +158 -0
  102. package/lib/workflow/remote.d.ts +139 -0
  103. package/lib/workflow/schema.d.ts +1917 -0
  104. package/lib/workflow/seam.d.ts +254 -0
  105. package/lib/workflow/shell.d.ts +127 -0
  106. package/lib/workflow/sse.d.ts +16 -0
  107. package/lib/workflow/typert/typert.host.d.ts +16 -0
  108. package/lib/workflow/typert/typert.remote-client.d.ts +114 -0
  109. package/lib/workflow/types.d.ts +187 -0
  110. package/lib/workflow/wire.d.ts +256 -0
  111. package/lib/workflow/workflow-engine.d.ts +373 -0
  112. package/lib/workflow/yaml-error.d.ts +22 -0
  113. package/lib/workflow/yaml-parser.d.ts +23 -0
  114. package/package.json +140 -0
  115. package/packages/client/CommandEditor.tsx +73 -0
  116. package/packages/client/DagEditor.module.css +711 -0
  117. package/packages/client/DagEditor.tsx +1203 -0
  118. package/packages/client/DefinitionDetail.module.css +110 -0
  119. package/packages/client/DefinitionDetail.tsx +126 -0
  120. package/packages/client/DefinitionList.tsx +173 -0
  121. package/packages/client/DiscussionInput.tsx +763 -0
  122. package/packages/client/DragHandle.tsx +92 -0
  123. package/packages/client/EditorPane.tsx +70 -0
  124. package/packages/client/FlowEditor.tsx +227 -0
  125. package/packages/client/InstanceList.tsx +250 -0
  126. package/packages/client/NewInstanceDialog.module.css +244 -0
  127. package/packages/client/NewInstanceDialog.tsx +478 -0
  128. package/packages/client/PreviewPanel.tsx +55 -0
  129. package/packages/client/RunView.module.css +246 -0
  130. package/packages/client/RunView.tsx +314 -0
  131. package/packages/client/StepChatPanel.tsx +486 -0
  132. package/packages/client/TreeNav.tsx +294 -0
  133. package/packages/client/UnifiedTimeline.tsx +484 -0
  134. package/packages/client/WorkflowButton.module.css +72 -0
  135. package/packages/client/WorkflowButton.tsx +50 -0
  136. package/packages/client/WorkflowList.tsx +158 -0
  137. package/packages/client/WorkflowOverlay.module.css +390 -0
  138. package/packages/client/WorkflowOverlay.tsx +136 -0
  139. package/packages/client/WorkflowPanel.module.css +247 -0
  140. package/packages/client/chat/AssistantMarkdown.module.css +38 -0
  141. package/packages/client/chat/AssistantMarkdown.tsx +120 -0
  142. package/packages/client/chat/ChatView.module.css +198 -0
  143. package/packages/client/chat/CompactionItem.tsx +85 -0
  144. package/packages/client/chat/ContextBody.module.css +162 -0
  145. package/packages/client/chat/ContextBody.tsx +598 -0
  146. package/packages/client/chat/ContextInjectionRow.module.css +63 -0
  147. package/packages/client/chat/ContextInjectionRow.tsx +78 -0
  148. package/packages/client/chat/GenericCommandCard.module.css +87 -0
  149. package/packages/client/chat/GenericCommandCard.tsx +76 -0
  150. package/packages/client/chat/MessageIconActions.module.css +84 -0
  151. package/packages/client/chat/MessageIconActions.tsx +147 -0
  152. package/packages/client/chat/MessageItem.module.css +293 -0
  153. package/packages/client/chat/MessageItem.tsx +384 -0
  154. package/packages/client/chat/ReasoningRow.module.css +82 -0
  155. package/packages/client/chat/ReasoningRow.tsx +70 -0
  156. package/packages/client/chat/TurnTailNodeView.module.css +10 -0
  157. package/packages/client/chat/TurnTailNodeView.tsx +63 -0
  158. package/packages/client/chat/UserMessageRow.module.css +75 -0
  159. package/packages/client/chat/UserMessageRow.tsx +92 -0
  160. package/packages/client/chat/accessibility.module.css +9 -0
  161. package/packages/client/chat/attachment/ImageLightbox.module.css +45 -0
  162. package/packages/client/chat/attachment/ImageLightbox.tsx +70 -0
  163. package/packages/client/chat/attachment/MessageImage.module.css +70 -0
  164. package/packages/client/chat/attachment/MessageImage.tsx +136 -0
  165. package/packages/client/chat/attachment/image-attachment.ts +98 -0
  166. package/packages/client/chat/attachment/image-labels.ts +34 -0
  167. package/packages/client/chat/message-chrome.ts +96 -0
  168. package/packages/client/chat/reference/ReferenceIcon.tsx +40 -0
  169. package/packages/client/chat/turn-assistant.ts +15 -0
  170. package/packages/client/chat/turn-metrics.ts +102 -0
  171. package/packages/client/chat/use-calendar-day.ts +27 -0
  172. package/packages/client/chat/use-throttled-visual-update.ts +44 -0
  173. package/packages/client/chat-flow.spec.ts +357 -0
  174. package/packages/client/chat-flow.ts +278 -0
  175. package/packages/client/composer-selects.module.css +376 -0
  176. package/packages/client/composer-selects.tsx +531 -0
  177. package/packages/client/dag-editor-model.spec.ts +173 -0
  178. package/packages/client/dag-editor-model.ts +359 -0
  179. package/packages/client/describe-error.spec.ts +18 -0
  180. package/packages/client/describe-error.ts +12 -0
  181. package/packages/client/index.ts +144 -0
  182. package/packages/client/input.module.css +854 -0
  183. package/packages/client/is-conditional-check.spec.ts +34 -0
  184. package/packages/client/locales.ts +789 -0
  185. package/packages/client/model-faces.ts +225 -0
  186. package/packages/client/open-discussion.spec.ts +39 -0
  187. package/packages/client/open-discussion.ts +32 -0
  188. package/packages/client/panel-model.spec.ts +152 -0
  189. package/packages/client/panel-model.ts +72 -0
  190. package/packages/client/preview.module.css +95 -0
  191. package/packages/client/react-dom.d.ts +11 -0
  192. package/packages/client/reactflow-theme.css +91 -0
  193. package/packages/client/remote.spec.ts +41 -0
  194. package/packages/client/remote.ts +46 -0
  195. package/packages/client/run-view-model.spec.ts +641 -0
  196. package/packages/client/run-view-model.ts +636 -0
  197. package/packages/client/sandore-save.spec.ts +146 -0
  198. package/packages/client/sandore-save.ts +97 -0
  199. package/packages/client/sandore-sse.ts +59 -0
  200. package/packages/client/step-chat-retry.spec.ts +70 -0
  201. package/packages/client/step-chat-retry.ts +65 -0
  202. package/packages/client/timeline.module.css +503 -0
  203. package/packages/client/tool/GenericToolCard.tsx +99 -0
  204. package/packages/client/tool/ToolRow.module.css +308 -0
  205. package/packages/client/tool/ToolRow.tsx +328 -0
  206. package/packages/client/tool/diff-card-model.ts +103 -0
  207. package/packages/client/tool/read-card-model.ts +86 -0
  208. package/packages/client/tool/search-card-model.ts +166 -0
  209. package/packages/client/tool/terminal-card-model.ts +225 -0
  210. package/packages/client/tool/tool-call-model.ts +267 -0
  211. package/packages/client/tool/web-card-model.ts +80 -0
  212. package/packages/client/tree-nav.module.css +282 -0
  213. package/packages/client/use-focus-refresh.ts +23 -0
  214. package/packages/client/workflow-face.ts +72 -0
  215. package/packages/client/workflow-store.spec.ts +49 -0
  216. package/packages/client/workflow-store.ts +161 -0
  217. package/packages/client/workspace-path.ts +27 -0
  218. package/packages/css-modules.d.ts +6 -0
  219. package/packages/microflow/branch-evaluator.spec.ts +745 -0
  220. package/packages/microflow/branch-evaluator.ts +1037 -0
  221. package/packages/microflow/concurrency-limiter.ts +70 -0
  222. package/packages/microflow/errors.ts +64 -0
  223. package/packages/microflow/file-utils.spec.ts +604 -0
  224. package/packages/microflow/file-utils.ts +521 -0
  225. package/packages/microflow/finalize-manager.spec.ts +1977 -0
  226. package/packages/microflow/finalize-manager.ts +1464 -0
  227. package/packages/microflow/fork-session.spec.ts +184 -0
  228. package/packages/microflow/fork-session.ts +316 -0
  229. package/packages/microflow/index.ts +17 -0
  230. package/packages/microflow/internal.ts +166 -0
  231. package/packages/microflow/loop-manager.spec.ts +294 -0
  232. package/packages/microflow/loop-manager.ts +255 -0
  233. package/packages/microflow/rules-resolver.spec.ts +147 -0
  234. package/packages/microflow/rules-resolver.ts +58 -0
  235. package/packages/microflow/stage-executor.spec.ts +1577 -0
  236. package/packages/microflow/stage-executor.ts +1478 -0
  237. package/packages/microflow/step-navigator.spec.ts +301 -0
  238. package/packages/microflow/step-navigator.ts +300 -0
  239. package/packages/microflow/step-runner.spec.ts +1132 -0
  240. package/packages/microflow/step-runner.ts +752 -0
  241. package/packages/microflow/subagents.spec.ts +215 -0
  242. package/packages/microflow/subagents.ts +422 -0
  243. package/packages/tests/fixtures/test-workflow.yaml +128 -0
  244. package/packages/tests/mocks/agents.ts +206 -0
  245. package/packages/tests/mocks/llm.ts +46 -0
  246. package/packages/tests/mocks/session-title.ts +31 -0
  247. package/packages/tests/mocks/sessions.ts +131 -0
  248. package/packages/tests/mocks/shell.ts +60 -0
  249. package/packages/tests/mocks/storage-domain.ts +101 -0
  250. package/packages/tests/mocks/subagents.ts +197 -0
  251. package/packages/tests/mocks/subprocess.ts +59 -0
  252. package/packages/tests/mocks/user-questions.ts +33 -0
  253. package/packages/tests/mocks/workspace.ts +52 -0
  254. package/packages/tool/index.spec.ts +287 -0
  255. package/packages/tool/index.ts +348 -0
  256. package/packages/workflow/ask-tool.ts +173 -0
  257. package/packages/workflow/dag-navigator.spec.ts +236 -0
  258. package/packages/workflow/dag-navigator.ts +425 -0
  259. package/packages/workflow/domain.ts +26 -0
  260. package/packages/workflow/engine-surface.ts +71 -0
  261. package/packages/workflow/errors.ts +13 -0
  262. package/packages/workflow/host-agent.spec.ts +92 -0
  263. package/packages/workflow/host-agent.ts +62 -0
  264. package/packages/workflow/index.ts +25 -0
  265. package/packages/workflow/interaction-manager.spec.ts +390 -0
  266. package/packages/workflow/interaction-manager.ts +397 -0
  267. package/packages/workflow/lifecycle-manager.spec.ts +683 -0
  268. package/packages/workflow/lifecycle-manager.ts +288 -0
  269. package/packages/workflow/persistence.spec.ts +109 -0
  270. package/packages/workflow/persistence.ts +64 -0
  271. package/packages/workflow/plugin.ts +39 -0
  272. package/packages/workflow/reactive-state.spec.ts +69 -0
  273. package/packages/workflow/reactive-state.ts +52 -0
  274. package/packages/workflow/recovery-manager.spec.ts +606 -0
  275. package/packages/workflow/recovery-manager.ts +471 -0
  276. package/packages/workflow/remote.spec.ts +1045 -0
  277. package/packages/workflow/remote.ts +479 -0
  278. package/packages/workflow/schema.spec.ts +303 -0
  279. package/packages/workflow/schema.ts +562 -0
  280. package/packages/workflow/seam.ts +293 -0
  281. package/packages/workflow/shell.ts +142 -0
  282. package/packages/workflow/sse.ts +110 -0
  283. package/packages/workflow/typert/typert.host.d.ts +16 -0
  284. package/packages/workflow/typert/typert.host.js +25 -0
  285. package/packages/workflow/typert/typert.remote-client.d.ts +114 -0
  286. package/packages/workflow/typert/typert.remote-client.js +399 -0
  287. package/packages/workflow/types.ts +258 -0
  288. package/packages/workflow/wire.ts +267 -0
  289. package/packages/workflow/workflow-engine-e2e.spec.ts +262 -0
  290. package/packages/workflow/workflow-engine-real-e2e.spec.ts +922 -0
  291. package/packages/workflow/workflow-engine.spec.ts +4389 -0
  292. package/packages/workflow/workflow-engine.ts +2133 -0
  293. package/packages/workflow/yaml-error.ts +29 -0
  294. package/packages/workflow/yaml-parser.spec.ts +757 -0
  295. package/packages/workflow/yaml-parser.ts +287 -0
@@ -0,0 +1,27 @@
1
+ import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
2
+ import type { RunTreeNode } from './run-view-model.ts';
3
+ /** 叶子节点点击载荷(预览目标)。 */
4
+ export interface TreeLeafSelection {
5
+ /** 叶子节点 id(供高亮匹配)。 */
6
+ readonly leafId: string;
7
+ readonly kind: 'result' | 'artifact';
8
+ readonly stepId: string;
9
+ readonly name: string;
10
+ readonly meta?: string | undefined;
11
+ readonly text?: string | undefined;
12
+ }
13
+ /** TreeNav 接收的 props。 */
14
+ export interface TreeNavProps {
15
+ /** 类型化的翻译函数(sandore 命名空间)。 */
16
+ t: TranslateNS<'sandore'>;
17
+ /** 树形导航数据(buildRunTree 派生)。 */
18
+ tree: readonly RunTreeNode[];
19
+ /** 当前预览叶子 id(高亮)。 */
20
+ activePreviewId: string | null;
21
+ /** 点击叶子 → 打开右栏预览。 */
22
+ onSelectLeaf(selection: TreeLeafSelection): void;
23
+ /** 跳子代理会话(Step 行)。 */
24
+ onOpenChild(childId: string): void;
25
+ }
26
+ /** 渲染树形导航(照 DSH WorkflowRunPanel;左上角标题 + 树身顶部留白)。 */
27
+ export declare function TreeNav({ t, tree, activePreviewId, onSelectLeaf, onOpenChild }: TreeNavProps): import("react").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
2
+ import { type TimelineItem } from './run-view-model.ts';
3
+ /** 渲染执行详情对话流。 */
4
+ export declare function UnifiedTimeline({ t, items, openSession }: {
5
+ /** 类型化翻译函数。 */
6
+ t: TranslateNS<'sandore'>;
7
+ /** 时间线条目(buildTimeline 派生)。 */
8
+ items: readonly TimelineItem[];
9
+ /** 跳子代理会话(agent 标题点击)。 */
10
+ openSession: (id: string) => void;
11
+ }): import("react").JSX.Element;
@@ -0,0 +1,11 @@
1
+ /** sidebar.footer.action 工作流入口:点击切换 shell.overlay 全局工作流 UI(设置上方)。 */
2
+ import type { InjectFace, PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
3
+ /** 注册进 slot 的业务 face:切换工作流 overlay 开关的回调。 */
4
+ export interface WorkflowButtonFace {
5
+ /** 点击「工作流」:切换 shell.overlay 全局工作流 UI 开关(开→关、关→开)。 */
6
+ onToggleWorkflow(): void;
7
+ }
8
+ /** sidebar.footer.action 的组件 props(owner + 注入 face + locale)。 */
9
+ export type WorkflowButtonProps = PropsRuntime<'sidebar.footer.action'> & InjectFace<WorkflowButtonFace> & PropsLocale<'sandore'>;
10
+ /** 渲染工作流入口按钮,点击切换全局工作流 overlay 开关;overlay 打开时按钮高亮。 */
11
+ export declare function WorkflowButton({ wide, t, onToggleWorkflow }: WorkflowButtonProps): import("react").JSX.Element;
@@ -0,0 +1,18 @@
1
+ import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
2
+ import type { WorkspaceView } from '@deepseek-ai/dsh-client-runtime/client';
3
+ import type { WorkflowOverlayFace } from './workflow-face.ts';
4
+ /** WorkflowList 接收的 props。 */
5
+ export interface WorkflowListProps {
6
+ /** 类型化翻译函数(sandore 命名空间)。 */
7
+ t: TranslateNS<'sandore'>;
8
+ /** 工作区成员表(供 InstanceList 按工作区分组)。 */
9
+ workspaces: readonly WorkspaceView[];
10
+ /** 业务 face(列表类 RPC 已解包)。 */
11
+ face: WorkflowOverlayFace;
12
+ /** 刷新计数:变化时重挂载列表(保存/删除/手动刷新后)。 */
13
+ refreshKey: number;
14
+ /** 列表列宽(px,拖拽分隔条驱动)。 */
15
+ width: number;
16
+ }
17
+ /** 渲染工作流 overlay 左栏列表。 */
18
+ export declare function WorkflowList({ t, workspaces, face, refreshKey, width }: WorkflowListProps): import("react").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import type { GlobalStandardProps, InjectFace, PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';
2
+ import type { WorkflowOverlayFace } from './workflow-face.ts';
3
+ /** WorkflowOverlay 的组件 props:注入 face + locale + 全局标准 prop(useWorkspaces)。 */
4
+ export type WorkflowOverlayProps = InjectFace<WorkflowOverlayFace> & PropsLocale<'sandore'> & GlobalStandardProps;
5
+ /** 渲染 shell.overlay 全局工作流 UI(关闭时渲染 null)。 */
6
+ export declare function WorkflowOverlay({ useWorkspaces, listInstances, listDefinitions, startInstance, listModelDirectory, pickDirectory, deleteDefinition, deleteInstance, getYaml, save, remote, openSession, modelDirectory, permissions, runCommand, queryPermission, t, }: WorkflowOverlayProps): import("react").JSX.Element | null;
@@ -0,0 +1,22 @@
1
+ import type { AssistantBlock } from '@deepseek-ai/dsh-client-runtime/client';
2
+ import type { MarkdownFileMentions } from '@deepseek-ai/dsh-client-ui-primitives';
3
+ import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
4
+ import type { SandoreRenderMessageImages } from './attachment/MessageImage.tsx';
5
+ export interface AssistantMarkdownProps {
6
+ blocks: readonly AssistantBlock[];
7
+ streaming: boolean;
8
+ /** Frozen partial of an aborted turn: rendered with a stopped marker. */
9
+ interrupted?: boolean | undefined;
10
+ /** Render consecutive image blocks through the attachment renderer. */
11
+ renderMessageImages: SandoreRenderMessageImages;
12
+ /** Resolved prose file mentions for this Assistant's closing turn. */
13
+ mentions?: MarkdownFileMentions | undefined;
14
+ /** The owning view's locale seat, passed down as a plain prop. */
15
+ t: TranslateNS<'sandore'>;
16
+ }
17
+ /**
18
+ * Reasoning block as the Think variant summary row (figma 39:28304).
19
+ * @param props - assistant blocks + streaming + 附件渲染器 + locale。
20
+ * @returns 渲染后的助手消息体(tool-call 块由外层分组渲染,此处跳过)。
21
+ */
22
+ export declare const AssistantMarkdown: import("react").MemoExoticComponent<({ blocks, streaming, interrupted, renderMessageImages, mentions, t, }: AssistantMarkdownProps) => import("react").JSX.Element | null>;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * CompactionItem:抄自 DSH `packages/client/ui-conversation/src/client/chat/CompactionItem.tsx`。
3
+ * 一次落地压缩为流程贡献的一行标记(模型面上被遮蔽的历史留在其上,标记只报告模型
4
+ * 停止看到该历史的边界)。locale 面收窄为 sandore 命名空间,其余逐字保留。
5
+ * @module @deepseek-ai/dsh-client-ui-sandore/src/client/chat/CompactionItem
6
+ */
7
+ import type { CompactionSummaryNode } from '@deepseek-ai/dsh-client-runtime/client';
8
+ import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
9
+ interface CompactionItemProps {
10
+ node: CompactionSummaryNode;
11
+ /** Optional command title for a manual compaction folded into this marker. */
12
+ title?: string;
13
+ /** Command settlement text used when structured compaction counts are unavailable. */
14
+ fallbackSummary?: string | null;
15
+ /** The owning view's locale seat. */
16
+ t: TranslateNS<'sandore'>;
17
+ }
18
+ /**
19
+ * The collapsed-by-default compaction marker.
20
+ * @param props - the marker node off the snapshot cache.
21
+ * @returns the marker row, with the summary disclosure when one is available.
22
+ */
23
+ export declare const CompactionItem: import("react").MemoExoticComponent<({ node, title, fallbackSummary, t, }: CompactionItemProps) => import("react").JSX.Element>;
24
+ export {};
@@ -0,0 +1,136 @@
1
+ /**
2
+ * ContextBody:抄自 DSH `packages/client/ui-conversation/src/client/chat/ContextBody.tsx`。
3
+ * 上下文披露的展开体,每种 durable context form 一个呈现(producer 声明 form,本模块
4
+ * 只为它选呈现;form 缺失/未知/损坏一律回退 OpaqueBody)。locale 面收窄为 sandore
5
+ * 命名空间,其余逐字保留。
6
+ * @module @deepseek-ai/dsh-client-ui-sandore/src/client/chat/ContextBody
7
+ */
8
+ import type { ReactNode } from 'react';
9
+ import type { ContextMessageNode, KnownContextForm } from '@deepseek-ai/dsh-client-runtime/client';
10
+ import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
11
+ type Translate = TranslateNS<'sandore'>;
12
+ /**
13
+ * Default presentation: the model-facing text as text, with its real line
14
+ * breaks, and the remaining source fields beneath it. This is what every form
15
+ * this UI version does not recognize renders as.
16
+ * @param props - Durable content, its source, and the locale seat.
17
+ * @returns The opaque context body.
18
+ */
19
+ export declare function OpaqueBody({ content, source, t }: {
20
+ content: ContextMessageNode['content'];
21
+ source: unknown;
22
+ t: Translate;
23
+ }): ReactNode;
24
+ /**
25
+ * `instructions` form: the files this context reconciled, then their text.
26
+ *
27
+ * The text keeps its `<system-reminder>` framing verbatim — the framing is part
28
+ * of what the model read, so hiding it would misreport the request.
29
+ * @param props - Durable content, its source, and the locale seat.
30
+ * @returns The instructions context body, or the opaque body when the change
31
+ * list is unreadable.
32
+ */
33
+ export declare function InstructionsBody({ content, source, t }: {
34
+ content: ContextMessageNode['content'];
35
+ source: unknown;
36
+ t: Translate;
37
+ }): ReactNode;
38
+ /**
39
+ * `catalog` form: the published entries as a list, read from the source rather
40
+ * than re-parsed out of the model-facing prose.
41
+ *
42
+ * A catalog whose source carries no usable entries falls through to the opaque
43
+ * body, so an older or hand-edited log still shows its text.
44
+ * @param props - Durable content, its source, and the locale seat.
45
+ * @returns The catalog context body, or the opaque body when the entry list is
46
+ * unreadable.
47
+ */
48
+ export declare function CatalogBody({ content, source, t }: {
49
+ content: ContextMessageNode['content'];
50
+ source: unknown;
51
+ t: Translate;
52
+ }): ReactNode;
53
+ /**
54
+ * `snapshot` form: the named contributions this snapshot assembled, in order.
55
+ *
56
+ * The sections are the same bytes the model read, split at the boundaries the
57
+ * producer assembled them on, so a reader sees which subsystem contributed
58
+ * which state instead of one undifferentiated wall.
59
+ *
60
+ * One sentence of the model-facing text is NOT in any section: the producer's
61
+ * framing line declaring that this snapshot supersedes earlier ones. Unlike the
62
+ * `<system-reminder>` wrapper an instruction context carries — which wraps
63
+ * content and cannot be separated from it — that line states the form's own
64
+ * semantics, so the body states them as a caption instead of reprinting the
65
+ * joined prose beside the sections it was split from.
66
+ * @param props - Durable content, its source, and the locale seat.
67
+ * @returns The snapshot context body, or the opaque body when unreadable.
68
+ */
69
+ export declare function SnapshotBody({ content, source, t }: {
70
+ content: ContextMessageNode['content'];
71
+ source: unknown;
72
+ t: Translate;
73
+ }): ReactNode;
74
+ /**
75
+ * `notice` form: what just happened, with the model-facing text beneath it.
76
+ *
77
+ * The one-line account also rides the collapsed row ({@link contextBody}), so a
78
+ * notice is usually readable without expanding at all.
79
+ * @param props - Durable content, its source, and the locale seat.
80
+ * @returns The notice context body.
81
+ */
82
+ export declare function NoticeBody({ content, t }: {
83
+ content: ContextMessageNode['content'];
84
+ source: unknown;
85
+ t: Translate;
86
+ }): ReactNode;
87
+ /**
88
+ * `relay` form: which agent sent this, then what it said.
89
+ *
90
+ * The sender is an opaque session id; it is shown as a field rather than a
91
+ * label, because this client cannot resolve it to a title.
92
+ * @param props - Durable content, its source, and the locale seat.
93
+ * @returns The relay context body.
94
+ */
95
+ export declare function RelayBody({ content, source, t }: {
96
+ content: ContextMessageNode['content'];
97
+ source: unknown;
98
+ t: Translate;
99
+ }): ReactNode;
100
+ /**
101
+ * `recall` form: which sessions this material came from and how much of each
102
+ * survived the read, then the material itself.
103
+ *
104
+ * Completeness is the fact a reader needs first: recalled context is bounded on
105
+ * the way in, so a card that hid the omitted count would overstate what the
106
+ * model received.
107
+ * @param props - Durable content, its source, and the locale seat.
108
+ * @returns The recall context body, or the opaque body when unreadable.
109
+ */
110
+ export declare function RecallBody({ content, source, t }: {
111
+ content: ContextMessageNode['content'];
112
+ source: unknown;
113
+ t: Translate;
114
+ }): ReactNode;
115
+ /**
116
+ * Choose the body for one context node.
117
+ *
118
+ * Returns the form the body actually rendered as, which is not always the
119
+ * declared one: a declared form whose fields are unreadable falls back to
120
+ * opaque, and the caller labels the row with what it really shows.
121
+ * `summary` is the collapsed row's one-line account, which only a `notice`
122
+ * records: its whole point is being readable without expanding.
123
+ * @param form - the producer-declared form projected onto the node.
124
+ * @param props - durable content, its source, and the locale seat.
125
+ * @returns the rendered form (null for opaque), its collapsed summary, and its body.
126
+ */
127
+ export declare function contextBody(form: ContextMessageNode['form'], props: {
128
+ content: ContextMessageNode['content'];
129
+ source: unknown;
130
+ t: Translate;
131
+ }): {
132
+ rendered: KnownContextForm | null;
133
+ summary: string | null;
134
+ body: ReactNode;
135
+ };
136
+ export {};
@@ -0,0 +1,25 @@
1
+ import type { ContextMessageNode } from '@deepseek-ai/dsh-client-runtime/client';
2
+ import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
3
+ /** Props for the logged non-user message presentation. */
4
+ export interface ContextInjectionRowProps {
5
+ content: ContextMessageNode['content'];
6
+ source: ContextMessageNode['source'];
7
+ /** Role and producer name projected from the durable source. */
8
+ provenance: ContextMessageNode['provenance'];
9
+ /** Producer-declared information form; null renders the opaque body. */
10
+ form: ContextMessageNode['form'];
11
+ /** The owning view's locale seat, passed down as a plain prop. */
12
+ t: TranslateNS<'sandore'>;
13
+ }
14
+ /**
15
+ * Render logged context with the Tool calls disclosure chrome from Figma.
16
+ *
17
+ * The header names the role the context plays and, beside it, the producer the
18
+ * durable source identifies, so a reader can tell an injected skill catalog
19
+ * from a workspace instruction file or a recalled session without expanding.
20
+ * The expanded body follows the producer-declared form; an absent or unknown
21
+ * form renders the opaque body.
22
+ * @param props - Durable content, its projected producer role/name and form, and the locale seat.
23
+ * @returns A collapsed context row with a bounded, form-specific body.
24
+ */
25
+ export declare function ContextInjectionRow({ content, source, provenance, form, t }: ContextInjectionRowProps): import("react").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import type { CommandNode } from '@deepseek-ai/dsh-client-runtime/client';
2
+ import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
3
+ /** Card props: the command node plus the render site's locale seat. */
4
+ export interface GenericCommandCardProps {
5
+ node: CommandNode;
6
+ t: TranslateNS<'sandore'>;
7
+ /** Command-specific running copy; absent uses the generic command label. */
8
+ runningSummary?: string | undefined;
9
+ }
10
+ export declare function GenericCommandCard({ node, t, runningSummary }: GenericCommandCardProps): import("react").JSX.Element;
@@ -0,0 +1,41 @@
1
+ /**
2
+ * MessageIconActions:抄自 DSH `packages/client/ui-conversation/src/client/chat/MessageIconActions.tsx`。
3
+ * 用户/agent 消息共用的 IconActions 行:复制 + 可选 branch(会话 fork)+ 可选日期感知
4
+ * 时钟(含运行时长/TTFT/吞吐读数)+ 可选 extraActions(插件注入动作)。
5
+ * locale 面收窄为 sandore 命名空间(key 集抄进 sandore 字典),逻辑逐字保留。
6
+ * @module @deepseek-ai/dsh-client-ui-sandore/src/client/chat/MessageIconActions
7
+ */
8
+ import { type ReactNode } from 'react';
9
+ import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
10
+ export interface MessageIconActionsProps {
11
+ text: string;
12
+ /** Unix epoch ms for the clock label; omitted for transient messages. */
13
+ time?: number | undefined;
14
+ /** Turn wall time in ms, appended to the clock as `· Ran for 15s`; omitted when the turn's start is unknown. */
15
+ runMs?: number | undefined;
16
+ /** Turn first-step TTFT in ms, appended as `· TTFT 1.2s`; omitted when unrecorded. */
17
+ ttftMs?: number | undefined;
18
+ /** Turn decode throughput, appended as `· 34 tok/s`; omitted when unrecorded. */
19
+ tokensPerSecond?: number | undefined;
20
+ /** Clock before icons (user) or after (assistant). */
21
+ clock: 'start' | 'end';
22
+ /** Fork the session at this message; omission hides the branch action. */
23
+ onBranch?: (() => void) | undefined;
24
+ /** The message is not a completed transcript tail, so branch stays visible but unavailable. */
25
+ branchUnavailable?: boolean | undefined;
26
+ /** Parent layout class composed onto the actions row. */
27
+ className?: string | undefined;
28
+ /**
29
+ * Slot-rendered actions owned by independent plugins, placed between the
30
+ * built-in copy and branch controls.
31
+ */
32
+ extraActions?: ReactNode;
33
+ /** The owning view's locale seat, passed down as a plain prop. */
34
+ t: TranslateNS<'sandore'>;
35
+ }
36
+ /**
37
+ * Copy / branch (/ clock) IconActions row shared by user and assistant chrome.
38
+ * @param props - Copy text, event time, clock side, branch callback, className.
39
+ * @returns The actions row element.
40
+ */
41
+ export declare function MessageIconActions({ text, time, runMs, ttftMs, tokensPerSecond, clock, onBranch, branchUnavailable, className, extraActions, t, }: MessageIconActionsProps): import("react").JSX.Element;
@@ -0,0 +1,65 @@
1
+ /**
2
+ * MessageItem:抄自 DSH `packages/client/ui-conversation/src/client/chat/MessageItem.tsx`。
3
+ * 简单聊天节点——用户/consumed-steering 右对齐气泡(时钟 + 复制 + 可选 branch 的
4
+ * IconActions;branch 只在 assistant 回答下)、pending steering(仅复制)、上下文注入、
5
+ * 压缩标记、model-retry 披露、turn-error、turn-max-tokens、未知 surface JSON 行。
6
+ *
7
+ * 适配:props 从内部 `ChatNode`/`ChatViewSlotProps` 收窄为公开节点数据 + sandore 命名
8
+ * 空间 locale;`renderMessageImages` 为 sandore 面板自己的 ImageGallery 渲染器(替代
9
+ * DSH 的 conversation.message.images slot);`referenceLabels` 由 DSH 的
10
+ * ReferenceLabelProjector(UI 计算)提供,runtime 公开节点不带该字段,面板按
11
+ * `UserMessageNodeView` 的缺省路径传空。其余逻辑逐字保留。
12
+ * @module @deepseek-ai/dsh-client-ui-sandore/src/client/chat/MessageItem
13
+ */
14
+ import type { ReactNode } from 'react';
15
+ import type { CompactionSummaryNode, ContextMessageNode, ConversationNode, ModelRetryNode, TurnErrorNode, UnknownSurfaceNode } from '@deepseek-ai/dsh-client-runtime/client';
16
+ import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
17
+ import type { SandoreRenderMessageImages } from './attachment/MessageImage.tsx';
18
+ /**
19
+ * Render one Host-authoritative pending steering item with the same visual
20
+ * language as its eventual durable transcript node.
21
+ * @param props - Pending message content and translator.
22
+ * @returns the pending steering bubble.
23
+ */
24
+ export declare function PendingSteeringBubble({ content, renderMessageImages, t }: {
25
+ content: readonly unknown[];
26
+ renderMessageImages: SandoreRenderMessageImages;
27
+ t: TranslateNS<'sandore'>;
28
+ }): ReactNode;
29
+ /** User and admitted-steering 节点 → 右对齐气泡(公开 `UserMessageNode`/`SteeringMessageNode` 数据)。 */
30
+ export declare const UserMessageNodeView: import("react").MemoExoticComponent<({ node, renderMessageImages, t }: {
31
+ node: Extract<ConversationNode, {
32
+ kind: "user" | "steering";
33
+ }>;
34
+ renderMessageImages: SandoreRenderMessageImages;
35
+ t: TranslateNS<"sandore">;
36
+ }) => import("react").JSX.Element>;
37
+ /** Injected-context 节点 → 上下文注入行(公开 `ContextMessageNode` 数据)。 */
38
+ export declare const ContextMessageNodeView: import("react").MemoExoticComponent<({ node, t }: {
39
+ node: ContextMessageNode;
40
+ t: TranslateNS<"sandore">;
41
+ }) => import("react").JSX.Element>;
42
+ /** Automatic compaction 节点 → 压缩标记行(公开 `CompactionSummaryNode` 数据)。 */
43
+ export declare const CompactionNodeView: import("react").MemoExoticComponent<({ node, t }: {
44
+ node: CompactionSummaryNode;
45
+ t: TranslateNS<"sandore">;
46
+ }) => import("react").JSX.Element>;
47
+ /** model-retry 节点 → 重试披露(公开 `ModelRetryNode` 数据)。 */
48
+ export declare const RetryNodeView: import("react").MemoExoticComponent<({ node, t }: {
49
+ node: ModelRetryNode;
50
+ t: TranslateNS<"sandore">;
51
+ }) => import("react").JSX.Element>;
52
+ /** Terminal turn-error 节点 → 持久失败提示(公开 `TurnErrorNode` 数据)。 */
53
+ export declare const TurnErrorNodeView: import("react").MemoExoticComponent<({ node, t }: {
54
+ node: TurnErrorNode;
55
+ t: TranslateNS<"sandore">;
56
+ }) => import("react").JSX.Element>;
57
+ /** Max-tokens turn-end notice 节点 → 输出上限提示。 */
58
+ export declare const TurnMaxTokensNodeView: import("react").MemoExoticComponent<({ t }: {
59
+ t: TranslateNS<"sandore">;
60
+ }) => import("react").JSX.Element>;
61
+ /** Explicit unknown-surface 节点 → JSON 行(公开 `UnknownSurfaceNode` 数据)。 */
62
+ export declare const UnknownNodeView: import("react").MemoExoticComponent<({ node, t }: {
63
+ node: UnknownSurfaceNode;
64
+ t: TranslateNS<"sandore">;
65
+ }) => import("react").JSX.Element>;
@@ -0,0 +1,13 @@
1
+ import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
2
+ /**
3
+ * Render one assistant reasoning block as the Think disclosure row.
4
+ * @param props.text - complete or streaming reasoning text.
5
+ * @param props.running - whether this block is the streaming tail.
6
+ * @param props.t - sandore locale seat for the running status.
7
+ * @returns the reasoning disclosure.
8
+ */
9
+ export declare function ReasoningRow({ text, running, t }: {
10
+ text: string;
11
+ running: boolean;
12
+ t: TranslateNS<'sandore'>;
13
+ }): import("react").JSX.Element;
@@ -0,0 +1,29 @@
1
+ import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
2
+ /** turn-tail 展示数据(chat-flow 派生;字段对齐 DSH TurnTailChatData 的展示面)。 */
3
+ export interface StepChatTailData {
4
+ /** 已完结 turn 号。 */
5
+ turn: number;
6
+ /** 结算 assistant 节点 seq(分支锚点)。 */
7
+ seq: number;
8
+ /** 结算时间(Unix epoch ms;时钟用)。 */
9
+ time: number;
10
+ /** 结算 assistant 的拼接文本(复制按钮取文本)。 */
11
+ text: string;
12
+ /** Turn 壁钟时长 ms;turn/start|end 均在窗口内时可用。 */
13
+ runMs?: number | undefined;
14
+ /** Turn 首步 TTFT ms;未记录时省略。 */
15
+ ttftMs?: number | undefined;
16
+ /** Turn 解码吞吐;未记录时省略。 */
17
+ tokensPerSecond?: number | undefined;
18
+ /** 分支不可用(结算 assistant 非 turn 尾部等;chat-flow 派生)。 */
19
+ branchUnavailable: boolean;
20
+ }
21
+ /** Turn-local actions and feature tail over the closing Assistant, independent of Assistant placement. */
22
+ export declare const TurnTailNodeView: import("react").MemoExoticComponent<({ data, onBranch, t, }: {
23
+ /** 由 chat-flow 派生的 turn-tail 展示数据。 */
24
+ data: StepChatTailData;
25
+ /** 分支回调:以结算 seq 为锚 fork 会话(`sessions.fork`,与 DSH forkAt 同语义)。 */
26
+ onBranch: (seq: number) => void;
27
+ /** sandore locale seat。 */
28
+ t: TranslateNS<"sandore">;
29
+ }) => import("react").JSX.Element>;
@@ -0,0 +1,18 @@
1
+ import type { ConversationNode } from '@deepseek-ai/dsh-client-runtime/client';
2
+ import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
3
+ import type { SandoreRenderMessageImages } from './attachment/MessageImage.tsx';
4
+ type UserNode = Extract<ConversationNode, {
5
+ kind: 'user' | 'steering';
6
+ }>;
7
+ /**
8
+ * 用户消息行:DisclosureRow 行式(左对齐)——用户图标 + "User Message" 标签 + 分隔点 +
9
+ * 单行省略的用户消息文本 + 尾部时钟;点击整行展开完整用户消息文本框。
10
+ * @param props - 用户/steering 节点、图片画廊渲染器与 locale。
11
+ * @returns 折叠为单行的用户消息披露行。
12
+ */
13
+ export declare const UserMessageRow: import("react").MemoExoticComponent<({ node, renderMessageImages, t }: {
14
+ node: UserNode;
15
+ renderMessageImages: SandoreRenderMessageImages;
16
+ t: TranslateNS<"sandore">;
17
+ }) => import("react").JSX.Element>;
18
+ export {};
@@ -0,0 +1,26 @@
1
+ /** Lightbox strings the owner resolves from its own locale namespace. */
2
+ export interface ImageLightboxLabels {
3
+ /** Accessible name of the preview dialog. */
4
+ dialog: string;
5
+ /** Accessible label of the close control. */
6
+ close: string;
7
+ }
8
+ /**
9
+ * Document-level original-image preview opened by clicking a thumbnail.
10
+ * Closes on Escape, backdrop press, or the close control, and restores focus
11
+ * to the opener on unmount. Rendered through a body portal: an opener inside
12
+ * a transformed or filtered ancestor would otherwise trap the fixed backdrop
13
+ * in that ancestor's box instead of covering the viewport.
14
+ *
15
+ * @param props.src - the original image URL.
16
+ * @param props.alt - the image's alt text.
17
+ * @param props.labels - dialog and close-control strings.
18
+ * @param props.onClose - dismiss callback owned by the opener.
19
+ * @returns the modal preview dialog.
20
+ */
21
+ export declare function ImageLightbox({ src, alt, labels, onClose }: {
22
+ src: string;
23
+ alt: string;
24
+ labels: ImageLightboxLabels;
25
+ onClose: () => void;
26
+ }): import("react").ReactPortal;
@@ -0,0 +1,56 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { ImageLightboxLabels } from './ImageLightbox.tsx';
3
+ import type { SandoreImageAttachmentRef } from './image-attachment.ts';
4
+ /** Loads a session-authorized durable image URL. */
5
+ export type ImageLoader = (attachment: SandoreImageAttachmentRef) => Promise<string>;
6
+ /** 历史图片组渲染器(对齐 DSH slots.ts 的 `RenderMessageImages`,attachment 面本地复刻)。 */
7
+ export type SandoreRenderMessageImages = (owner: {
8
+ /** Consecutive image blocks rendered as one gallery. */
9
+ images: readonly {
10
+ readonly attachment: SandoreImageAttachmentRef;
11
+ }[];
12
+ /** Message-side alignment. */
13
+ align: 'start' | 'end';
14
+ }) => ReactNode;
15
+ /** Message-image strings the owner resolves from its own locale namespace. */
16
+ export interface MessageImageLabels {
17
+ /** Fallback display name for an unnamed image. */
18
+ image: string;
19
+ /** Thumbnail tooltip inviting the original-image preview. */
20
+ open: string;
21
+ /** Accessible thumbnail label; receives the image's display name. */
22
+ openNamed: (label: string) => string;
23
+ /** Loading placeholder shown until bytes resolve. */
24
+ loading: string;
25
+ /** Retry-control label shown when the load fails. */
26
+ loadFailed: string;
27
+ /** Lightbox strings forwarded to the opened preview. */
28
+ lightbox: ImageLightboxLabels;
29
+ }
30
+ /**
31
+ * Compact history renderer with retryable loading and click-to-open original
32
+ * preview. A lone image renders at its `singleFit` size; an image among
33
+ * several renders as a fixed 64px square tile.
34
+ *
35
+ * @param props.attachment - the durable image reference to load and bound.
36
+ * @param props.load - session-authorized URL loader.
37
+ * @param props.variant - `single` for a message's lone image, `tile` otherwise.
38
+ * @param props.labels - resolved strings (tooltip, loading, retry, lightbox).
39
+ * @returns the bounded thumbnail button, or the retry control on failure.
40
+ */
41
+ export declare function MessageImage({ attachment, load, variant, labels }: {
42
+ attachment: SandoreImageAttachmentRef;
43
+ load: ImageLoader;
44
+ variant: 'single' | 'tile';
45
+ labels: MessageImageLabels;
46
+ }): import("react").JSX.Element;
47
+ /** Wrapping image group shared by user and assistant history: a lone image
48
+ * renders large, several render as 64px square tiles (DeepSeek Chat rule). */
49
+ export declare function ImageGallery({ images, load, align, labels }: {
50
+ images: readonly {
51
+ attachment: SandoreImageAttachmentRef;
52
+ }[];
53
+ load: ImageLoader;
54
+ align: 'start' | 'end';
55
+ labels: MessageImageLabels;
56
+ }): import("react").JSX.Element | null;
@@ -0,0 +1,41 @@
1
+ /**
2
+ * image-attachment:沙盒面板的本地图片附件面。
3
+ *
4
+ * DSH 的 `ImageAttachmentRef` 定义在 `@deepseek-ai/dsh-attachment`(runtime 的
5
+ * `ISession.readAttachment` 返回它),sandore 面板不声明该依赖,故按
6
+ * `packages/attachment/attachment/src/types.ts` 的字段结构本地复刻(仅类型,无行为)。
7
+ * `resolveImage` 抄自 DSH `ui-conversation/src/client/service.ts` 的
8
+ * `ConversationController.resolveImage`:经 `session.readAttachment` 取回字节,构建
9
+ * blob URL(不可用时退化为 data URL),按 session+attachmentId 缓存。
10
+ * @module @deepseek-ai/dsh-client-ui-sandore/src/client/chat/attachment/image-attachment
11
+ */
12
+ import type { SessionFace } from '@deepseek-ai/dsh-client-runtime/client';
13
+ /** Raster image formats accepted by the version-one attachment path. */
14
+ export type SandoreImageMediaType = 'image/png' | 'image/jpeg' | 'image/webp' | 'image/gif';
15
+ /** Durable, serializable metadata for one immutable image object(dsh-attachment 的 ImageAttachmentRef 结构复刻)。 */
16
+ export interface SandoreImageAttachmentRef {
17
+ /** Opaque storage identifier; never a filesystem path or bearer URL. */
18
+ attachmentId: string;
19
+ /** Media type verified from the stored bytes. */
20
+ mediaType: SandoreImageMediaType;
21
+ /** Exact encoded byte length. */
22
+ bytes: number;
23
+ /** Intrinsic encoded width in pixels. */
24
+ width: number;
25
+ /** Intrinsic encoded height in pixels. */
26
+ height: number;
27
+ /** Optional display name stripped of local path information. */
28
+ name?: string;
29
+ }
30
+ /**
31
+ * 构建一个会话授权的历史图片 URL 加载器(`(attachment) => Promise<string>`)。
32
+ * 行为与 DSH `ConversationController.resolveImage` 一致:按 session+attachmentId 缓存,
33
+ * 取回字节后优先 blob URL(`URL.createObjectURL` 不可用时退化为 base64 data URL)。
34
+ * 调用方应在卸载时 `dispose()` 释放创建的 blob URL。
35
+ * @param session - 所属会话面(readAttachment 授权源)。
36
+ * @returns `{ load, dispose }`:load 为加载器;dispose 释放缓存与已创建 URL。
37
+ */
38
+ export declare function createImageLoader(session: SessionFace): {
39
+ load(attachment: SandoreImageAttachmentRef): Promise<string>;
40
+ dispose(): void;
41
+ };
@@ -0,0 +1,21 @@
1
+ /**
2
+ * image-labels:抄自 DSH `packages/client/ui-attachment/src/client/labels.ts`(消息图片
3
+ * 部分;drop/rail 标签不属于聊天面板)。把 sandore 命名空间的 image.* 键解析为
4
+ * MessageImage/ImageLightbox 的标签面。逐字保留逻辑。
5
+ * @module @deepseek-ai/dsh-client-ui-sandore/src/client/chat/attachment/image-labels
6
+ */
7
+ import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
8
+ import type { ImageLightboxLabels } from './ImageLightbox.tsx';
9
+ import type { MessageImageLabels } from './MessageImage.tsx';
10
+ /**
11
+ * Resolve original-image lightbox strings from the sandore namespace.
12
+ * @param t - sandore namespace translator.
13
+ * @returns translated lightbox labels.
14
+ */
15
+ export declare function lightboxLabels(t: TranslateNS<'sandore'>): ImageLightboxLabels;
16
+ /**
17
+ * Resolve historical message-image strings from the sandore namespace.
18
+ * @param t - sandore namespace translator.
19
+ * @returns translated message-image labels.
20
+ */
21
+ export declare function messageImageLabels(t: TranslateNS<'sandore'>): MessageImageLabels;