@deep-eye/core 1.2.99 → 1.3.1

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 (139) hide show
  1. package/CHANGELOG.md +53 -0
  2. package/dist/chat-token.css +226 -0
  3. package/dist/components/chat/ChatApp.vue.d.ts +142 -0
  4. package/dist/components/chat/ChatApp.vue.d.ts.map +1 -0
  5. package/dist/components/chat/ChatBot.vue.d.ts +7 -0
  6. package/dist/components/chat/ChatBot.vue.d.ts.map +1 -1
  7. package/dist/components/chat/chatContext.d.ts +3 -2
  8. package/dist/components/chat/chatContext.d.ts.map +1 -1
  9. package/dist/components/chat/chatSessionSidebarAssets.d.ts +21 -0
  10. package/dist/components/chat/chatSessionSidebarAssets.d.ts.map +1 -0
  11. package/dist/components/chat/chatSessionSidebarTypes.d.ts +59 -0
  12. package/dist/components/chat/chatSessionSidebarTypes.d.ts.map +1 -0
  13. package/dist/components/chat/cloudConfig.d.ts +84 -0
  14. package/dist/components/chat/cloudConfig.d.ts.map +1 -0
  15. package/dist/components/chat/components/ArtifactList.vue.d.ts +14 -0
  16. package/dist/components/chat/components/ArtifactList.vue.d.ts.map +1 -0
  17. package/dist/components/chat/components/ChatHistorySearchDialog.vue.d.ts +33 -0
  18. package/dist/components/chat/components/ChatHistorySearchDialog.vue.d.ts.map +1 -0
  19. package/dist/components/chat/components/ChatProvider.vue.d.ts +10 -7
  20. package/dist/components/chat/components/ChatProvider.vue.d.ts.map +1 -1
  21. package/dist/components/chat/components/ChatSender.vue.d.ts +3 -3
  22. package/dist/components/chat/components/ChatSender.vue.d.ts.map +1 -1
  23. package/dist/components/chat/components/ChatSessionExpandHistoryCard.vue.d.ts +30 -0
  24. package/dist/components/chat/components/ChatSessionExpandHistoryCard.vue.d.ts.map +1 -0
  25. package/dist/components/chat/components/ChatSessionLoadingDots.vue.d.ts +11 -0
  26. package/dist/components/chat/components/ChatSessionLoadingDots.vue.d.ts.map +1 -0
  27. package/dist/components/chat/components/ChatSessionOverflowTooltip.vue.d.ts +22 -0
  28. package/dist/components/chat/components/ChatSessionOverflowTooltip.vue.d.ts.map +1 -0
  29. package/dist/components/chat/components/ChatSessionSidebar.vue.d.ts +76 -0
  30. package/dist/components/chat/components/ChatSessionSidebar.vue.d.ts.map +1 -0
  31. package/dist/components/chat/components/ChatSessionSkeleton.vue.d.ts +6 -0
  32. package/dist/components/chat/components/ChatSessionSkeleton.vue.d.ts.map +1 -0
  33. package/dist/components/chat/components/ChatSessionStatusMark.vue.d.ts +15 -0
  34. package/dist/components/chat/components/ChatSessionStatusMark.vue.d.ts.map +1 -0
  35. package/dist/components/chat/components/ChatSkillPanel.vue.d.ts +4 -3
  36. package/dist/components/chat/components/ChatSkillPanel.vue.d.ts.map +1 -1
  37. package/dist/components/chat/components/ChatTipMenu.vue.d.ts +15 -2
  38. package/dist/components/chat/components/ChatTipMenu.vue.d.ts.map +1 -1
  39. package/dist/components/chat/components/ConversationList.vue.d.ts.map +1 -1
  40. package/dist/components/chat/components/document-viewer/html/HtmlRenderer.vue.d.ts.map +1 -1
  41. package/dist/components/chat/components/document-viewer/screenshotCapture.d.ts +3 -2
  42. package/dist/components/chat/components/document-viewer/screenshotCapture.d.ts.map +1 -1
  43. package/dist/components/chat/components/index.d.ts +3 -0
  44. package/dist/components/chat/components/index.d.ts.map +1 -1
  45. package/dist/components/chat/composables/chatApiRequest.d.ts +39 -0
  46. package/dist/components/chat/composables/chatApiRequest.d.ts.map +1 -0
  47. package/dist/components/chat/composables/chatHistoryApi.d.ts +41 -0
  48. package/dist/components/chat/composables/chatHistoryApi.d.ts.map +1 -0
  49. package/dist/components/chat/composables/chatSessionId.d.ts +8 -0
  50. package/dist/components/chat/composables/chatSessionId.d.ts.map +1 -0
  51. package/dist/components/chat/composables/useChatNewSessionEpoch.d.ts +3 -0
  52. package/dist/components/chat/composables/useChatNewSessionEpoch.d.ts.map +1 -0
  53. package/dist/components/chat/composables/useChatSessionHistory.d.ts +56 -0
  54. package/dist/components/chat/composables/useChatSessionHistory.d.ts.map +1 -0
  55. package/dist/components/chat/composables/useChatSessionSwitch.d.ts +22 -0
  56. package/dist/components/chat/composables/useChatSessionSwitch.d.ts.map +1 -0
  57. package/dist/components/chat/composables/useChatSkillTipMenu.d.ts.map +1 -1
  58. package/dist/components/chat/composables/useChatTipMenu.d.ts +14 -9
  59. package/dist/components/chat/composables/useChatTipMenu.d.ts.map +1 -1
  60. package/dist/components/chat/composables/useHistoryGroupExpand.d.ts +14 -0
  61. package/dist/components/chat/composables/useHistoryGroupExpand.d.ts.map +1 -0
  62. package/dist/components/chat/harness/Tooltip.vue.d.ts +1 -1
  63. package/dist/components/chat/harness/Tooltip.vue.d.ts.map +1 -1
  64. package/dist/components/chat/htmlPreview.d.ts +9 -0
  65. package/dist/components/chat/htmlPreview.d.ts.map +1 -1
  66. package/dist/components/chat/icons/ChatArtifactFilesIcon.vue.d.ts +9 -0
  67. package/dist/components/chat/icons/ChatArtifactFilesIcon.vue.d.ts.map +1 -0
  68. package/dist/components/chat/icons/ChatTipMenuExpertIcon.vue.d.ts +9 -0
  69. package/dist/components/chat/icons/ChatTipMenuExpertIcon.vue.d.ts.map +1 -0
  70. package/dist/components/chat/icons/ChatTipMenuKnowledgeIcon.vue.d.ts +7 -0
  71. package/dist/components/chat/icons/ChatTipMenuKnowledgeIcon.vue.d.ts.map +1 -0
  72. package/dist/components/chat/icons/ChatTipMenuLucideIcon.vue.d.ts +11 -0
  73. package/dist/components/chat/icons/ChatTipMenuLucideIcon.vue.d.ts.map +1 -0
  74. package/dist/components/chat/icons/ChatTipMenuSkillIcon.vue.d.ts +7 -0
  75. package/dist/components/chat/icons/ChatTipMenuSkillIcon.vue.d.ts.map +1 -0
  76. package/dist/components/chat/icons/index.d.ts +5 -0
  77. package/dist/components/chat/icons/index.d.ts.map +1 -1
  78. package/dist/components/chat/icons/tipMenuItemIcons.d.ts +27 -0
  79. package/dist/components/chat/icons/tipMenuItemIcons.d.ts.map +1 -0
  80. package/dist/components/chat/index.d.ts +16 -4
  81. package/dist/components/chat/index.d.ts.map +1 -1
  82. package/dist/components/chat/mdoc/ArtifactBlock.vue.d.ts +4 -1
  83. package/dist/components/chat/mdoc/ArtifactBlock.vue.d.ts.map +1 -1
  84. package/dist/components/chat/mdoc/ArtifactStack.vue.d.ts +13 -0
  85. package/dist/components/chat/mdoc/ArtifactStack.vue.d.ts.map +1 -0
  86. package/dist/components/chat/mdoc/ContentNodes.vue.d.ts.map +1 -1
  87. package/dist/components/chat/mdoc/artifactOpenStrategy.d.ts +1 -1
  88. package/dist/components/chat/mdoc/artifactOpenStrategy.d.ts.map +1 -1
  89. package/dist/components/chat/mdoc/artifactStack.d.ts +17 -0
  90. package/dist/components/chat/mdoc/artifactStack.d.ts.map +1 -0
  91. package/dist/components/chat/mdoc/index.d.ts +2 -0
  92. package/dist/components/chat/mdoc/index.d.ts.map +1 -1
  93. package/dist/components/chat/mdoc/sessionArtifacts.d.ts +20 -0
  94. package/dist/components/chat/mdoc/sessionArtifacts.d.ts.map +1 -0
  95. package/dist/components/chat/sidebarMotion.d.ts +5 -0
  96. package/dist/components/chat/sidebarMotion.d.ts.map +1 -1
  97. package/dist/components/chat/types.d.ts +91 -7
  98. package/dist/components/chat/types.d.ts.map +1 -1
  99. package/dist/components/skill/avatarThumb.d.ts +14 -0
  100. package/dist/components/skill/avatarThumb.d.ts.map +1 -0
  101. package/dist/components/skill/components/ChatSkillCard.vue.d.ts +2 -1
  102. package/dist/components/skill/components/ChatSkillCard.vue.d.ts.map +1 -1
  103. package/dist/components/skill/components/ChatSkillCardSkeleton.vue.d.ts.map +1 -1
  104. package/dist/components/skill/components/ChatSkillDetailDialog.vue.d.ts +2 -1
  105. package/dist/components/skill/components/ChatSkillDetailDialog.vue.d.ts.map +1 -1
  106. package/dist/components/skill/formatSkillUsageCount.d.ts +3 -0
  107. package/dist/components/skill/formatSkillUsageCount.d.ts.map +1 -0
  108. package/dist/components/skill/index.d.ts +1 -0
  109. package/dist/components/skill/index.d.ts.map +1 -1
  110. package/dist/components/skill/quickActionAvatarIcon.d.ts +25 -0
  111. package/dist/components/skill/quickActionAvatarIcon.d.ts.map +1 -0
  112. package/dist/components/skill/skillCardModel.d.ts.map +1 -1
  113. package/dist/components/skill/types.d.ts +22 -0
  114. package/dist/components/skill/types.d.ts.map +1 -1
  115. package/dist/components/ui/components/UiDialog.vue.d.ts +14 -1
  116. package/dist/components/ui/components/UiDialog.vue.d.ts.map +1 -1
  117. package/dist/components/ui/components/UiImage.vue.d.ts.map +1 -1
  118. package/dist/components/ui/components/UiMenu.vue.d.ts +7 -0
  119. package/dist/components/ui/components/UiMenu.vue.d.ts.map +1 -1
  120. package/dist/components/ui/components/UiMenuColumn.vue.d.ts.map +1 -1
  121. package/dist/components/ui/components/UiSearchInput.vue.d.ts +5 -1
  122. package/dist/components/ui/components/UiSearchInput.vue.d.ts.map +1 -1
  123. package/dist/components/ui/components/UiSkeleton.vue.d.ts.map +1 -1
  124. package/dist/components/ui/composables/floatingPosition.d.ts +19 -0
  125. package/dist/components/ui/composables/floatingPosition.d.ts.map +1 -0
  126. package/dist/components/ui/composables/index.d.ts +3 -1
  127. package/dist/components/ui/composables/index.d.ts.map +1 -1
  128. package/dist/components/ui/composables/useUiMenuFloating.d.ts +21 -0
  129. package/dist/components/ui/composables/useUiMenuFloating.d.ts.map +1 -0
  130. package/dist/{index-xHxkbtlb.cjs → index-B6ipa11F.cjs} +1 -1
  131. package/dist/{index-D-sSuThI.cjs → index-CQAo2jP4.cjs} +228 -214
  132. package/dist/{index-BMtOprb0.js → index-CU9fl-AE.js} +1 -1
  133. package/dist/{index-Cfa1rWQg.js → index-D5HjpyfA.js} +32687 -29872
  134. package/dist/{index-DBs0MjQj.cjs → index-DIqXNj0-.cjs} +1 -1
  135. package/dist/{index-BdKHWE9q.js → index-Fh8kY_oA.js} +1 -1
  136. package/dist/index.cjs +1 -1
  137. package/dist/index.js +311 -271
  138. package/dist/style.css +2 -2
  139. package/package.json +3 -2
package/CHANGELOG.md CHANGED
@@ -4,6 +4,59 @@
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [1.3.1] - 2026-09-01
8
+
9
+ ### Added
10
+
11
+ - `ChatBot` 对话区右上角新增「产出文件」按钮:打开当前会话全部产出文件列表(没有产出时不显示该按钮),再点列表里的卡片才进入预览侧栏。
12
+ - 同一条消息里连续多个 `{% artifact %}` 收成一张「产出文件」汇总卡(左侧叠纸预览、不展示单个文件名),点击整张打开侧栏列表。
13
+
14
+ ### Fixed
15
+
16
+ - `ChatSender`:TipMenu / 技能面板插入 `@mention` 时不再依赖「先敲 @」链路;编辑器未聚焦或宿主未配 `triggers` 时也能插入 chip。
17
+ - `lastSession` 正确解包云端 `{ status, result }` 信封,断线续传不再把有会话当成无会话。
18
+ - 当前打开的会话从 `running` 结束后自动 `markViewed`,未读蓝点无需再点一次历史项才消失。
19
+ - `cloud.upload.cloudBaseUrl` 走与 chat/skills 相同的运行时前缀改写(本地相对路径 `/cloud` → `/cloud-prod`)。
20
+
21
+ ## [1.3.0] - 2026-08-31
22
+
23
+ ### Breaking
24
+
25
+ - 移除 `ChatSkillFetchConfig` / `ChatSender.skillFetchConfig` / 独立 `uploadConfig`:统一改为 `ChatProvider`/`ChatApp` 的 `cloud`(`ChatCloudConfig`),一份配置覆盖鉴权、对话、历史、技能、上传。
26
+ - 会话侧栏(`ChatSessionSidebar`)、输入框(`ChatSender`/`ChatBot`)、消息区(`ConversationList`/`MessageBubble`)与欢迎态(`ChatApp`)的默认样式全面对齐参考设计:颜色、圆角、间距、阴影、消息区最大宽度(`768px → 944px`)等数值变化会影响所有未显式覆盖 token 的现有宿主。
27
+ - `ChatActionbar` 的 `showFeedback` / `showBranch` 默认值由 `true` 改为 `false`:内置操作栏默认只显示复制按钮,需要点赞/点踩/分支的宿主需显式传入。
28
+ - `ChatApp` 默认欢迎态移除了副标题「有什么可以帮你?」;`ChatBot` 空会话布局(`centeredEmptyState`)改为将欢迎语 + 输入框作为一个整体在主区域垂直居中显示。
29
+ - `ChatSessionSidebar` 品牌区(logo + 标题)不再响应点击、不再触发 `go-home`;新增独立的「返回首页」按钮作为 `back` 插槽默认内容,点击它才会触发 `go-home`。原先监听品牌区点击来实现返回首页的宿主,需要改为监听 `go-home` 事件(事件本身未变,只是触发来源变了)。
30
+
31
+ ### Added
32
+
33
+ - `ChatBot` 内置对话发送:配置 `cloud.chat` 后自动完成 agentChatKeep 请求、`session_id` 管理(`v-model:session-id`)、ask_user 自动续接,无需宿主手写 `@send`。
34
+ - 内置断线自动续传(`lastSession` + `resume`)与停止时的 `abort_session`。
35
+ - 新增历史会话 API 客户端:`findByUserId` / `findBySessionId` / `updateViewed`。
36
+ - 新增 `ChatSessionSidebar`:品牌 + 导航 + 统一任务历史(可单用)。
37
+ - 新增 `ChatApp`:Sidebar + ChatBot 完整壳,默认对齐 agentHome 开箱体验。
38
+ - 新增独立可换肤的 `chat-token.css`。
39
+ - `ChatBotExpose` 之外新增导出 `ChatAppExpose` / `ChatSessionSidebarExpose` 类型,`ref` 拿到的实例类型更准确。
40
+ - `ChatBotProps.senderDisclaimer`:输入框下方新增可配置的 AI 免责声明文案,默认展示「内容由 AI 生成,仅供参考」;该文案现在始终固定在 `ChatBot` 主区域底部(不随空状态/已有消息的输入框位置变化而移动),支持自定义文案或 `false` 隐藏。
41
+ - `ChatSessionSidebar` 历史分组新增展开/收起交互与新增历史项的入场动画;历史状态标记移至标题右侧。
42
+ - `ChatSessionSidebar` 新增内置的「返回首页」图标按钮(`back` 插槽默认内容),对齐 basic-agent-web 首页;折叠态下仅保留图标 + tooltip,展开态下图标 + 文案。
43
+ - `ChatSender` 新增 `--chat-sender-min-height` token(默认 `120px`),输入框缺省高度对齐 basic-agent-web 首页的输入框高度。
44
+
45
+ ### Fixed
46
+
47
+ - `useChatSessionHistory`(`ChatSessionSidebar` 自取数模式)在 SSR(VitePress 构建等 Node 环境)下会因相对 URL 传给 Node `fetch` 而抛错,现跳过服务端请求,与既有的 `ChatSender` 模型列表 SSR 处理保持一致。
48
+ - `UiDialog`(`ChatHistorySearchDialog` 使用)在 SSR 下直接引用全局 `document` 会抛 `ReferenceError`,现已判空跳过。
49
+ - `ChatSessionSidebar` 收起(`collapsed`)状态下,历史列表区域(`chat-session-sidebar__history`)现在会完全隐藏,不再残留一份仅靠 CSS 隐藏的历史列表;改为在收起态下鼠标悬浮/聚焦顶部展开按钮时,以浮层形式展示最近历史,并为收起/展开按钮、返回首页按钮、搜索历史按钮补上统一样式的悬浮提示(tooltip)。
50
+ - 修复 `ChatSessionSidebar` 与 `ChatHistorySearchDialog` 中「任务历史」标题重复显示两次的问题:最近(≤7 天)分组不再复用侧栏顶部已有的 `historyTitle` 作为分组标签。
51
+ - `ChatSkillPanel` 的默认空状态(未提供 `#empty` 插槽时)现在会正确显示 `ChatSkillEmpty` 的默认提示文案,而不是只显示图标、文案区域空白。
52
+ - `ChatSessionSidebar` 顶部行(`chat-session-sidebar__top`)改为始终 `justify-content: space-between`(折叠/展开态一致),修复缺少返回首页入口的问题。
53
+ - `ChatSessionSidebar` 「任务历史」标题与搜索图标现在显式使用 `justify-content: space-between` 两端对齐(此前依赖 `margin-left: auto` 的重复 CSS 声明),并补齐 `min-height: 36px`、`line-height: 1`,对齐 basic-agent-web。
54
+ - `ChatApp` 空状态下,欢迎区(或技能面板)与输入框之间的多余留白已去除(输入框 `margin-top`、消息列表容器的 `padding-block`、空状态容器的底部 `padding` 均归零),间距对齐 basic-agent-web 首页。
55
+ - `ChatSessionSidebar` 折叠态历史悬浮层(`chat-session-sidebar__flyout`)改为与 basic-agent-web 一致的 JS 驱动悬浮交互:鼠标悬浮展开按钮 300ms 后才弹出、移出 120ms 后才收起(键盘聚焦则立即展开、失焦立即收起),彻底修复此前依赖纯 CSS `:hover`/`:focus-within` 导致「点击展开按钮后浮层因按钮保留焦点而一直显示、并非真正悬浮触发」的问题;展示/隐藏动画改用 Vue `<Transition>`(`opacity` + `translateX`),效果与 basic-agent-web 完全对齐。
56
+ - `ChatSessionSidebar` 折叠态悬浮层的结构与样式完整对齐 `AgentHomeExpandHistoryCard`:`padding: 0 4px 16px 16px`、顶栏 `min-height: 56px` 含「返回首页」文案 + 搜索图标(22px / 36×36 热区)、任务历史分组头、列表项与滚动条细节均一致。
57
+ - `ChatApp` / `ChatBot` 空态布局对齐 basic-agent-web:由 flex 垂直居中改为顶部偏移(`--chat-empty-welcome-top`);欢迎标题 `margin-bottom: 20px` 是与输入框之间的唯一间距;`empty-extra`(默认技能面板)改到输入框下方渲染,不再夹在欢迎区与输入框之间。
58
+ - `ChatApp` 空态技能面板默认在有 `cloud.auth.token` 时自动展示(改用完整 `ChatSkillPanel`,含分类 Tab / 骨架屏 / 详情弹窗),不再要求显式配置 `cloud.skills`。
59
+
7
60
  ## [1.2.99] - 2026-08-28
8
61
 
9
62
  ### Changed
@@ -0,0 +1,226 @@
1
+ /**
2
+ * Chat Design Token — single source of truth for the `--chat-*` / `--ai-conversation-*`
3
+ * CSS custom properties consumed by the chat components (`ChatBot`, `ChatSender`,
4
+ * `ConversationList`/`MessageBubble`, `ChatSessionSidebar`, `ChatApp`, …).
5
+ *
6
+ * - `style.css` `@import`s this file, so importing only `@deep-eye/core/style.css`
7
+ * already gets correct defaults.
8
+ * - It is also published standalone as `@deep-eye/core/chat-token.css` so a host can
9
+ * copy this file, edit values, and `import` it *after* `style.css` to override the
10
+ * whole token set in one go (see docs/guide/theming.md).
11
+ * - Variable names are never renamed/removed here — only additive. Components keep
12
+ * their own `var(--chat-xxx, fallback)` safety net for when this file isn't loaded
13
+ * at all; the fallback values must stay in sync with the defaults below.
14
+ * - Dark values live under the existing `[data-chat-color-mode='dark']` attribute
15
+ * (already toggled by `ChatProvider`/`ChatBot`) — no new theming mechanism.
16
+ */
17
+
18
+ :root {
19
+ /* ---------------------------------------------------------------------- */
20
+ /* ChatSender */
21
+ /* ---------------------------------------------------------------------- */
22
+ --chat-sender-bg: #ffffff;
23
+ --chat-sender-border: #e6e6e6;
24
+ --chat-sender-focus-border: #3964fe;
25
+ --chat-sender-focus-ring: #cee6ff;
26
+ --chat-sender-shadow: 0 8px 24px rgba(57, 100, 254, 0.08);
27
+ --chat-sender-focus-shadow: 0 10px 28px rgba(57, 100, 254, 0.14);
28
+ --chat-sender-radius: 24px;
29
+ --chat-sender-min-height: 120px;
30
+ --chat-sender-text: #1f2329;
31
+ --chat-sender-text-secondary: #52525b;
32
+ --chat-sender-text-muted: #71717a;
33
+ --chat-sender-placeholder: #b5bac1;
34
+ --chat-sender-icon-color: #333333;
35
+ --chat-sender-icon-hover-color: #333333;
36
+ --chat-sender-btn-hover-bg: #f5f6f8;
37
+ --chat-sender-file-bg: #ffffff;
38
+ --chat-sender-file-border: #e4e4e7;
39
+ --chat-sender-file-border-hover: #a1a1aa;
40
+ --chat-sender-file-remove-bg: #52525b;
41
+ --chat-sender-file-remove-bg-hover: #3f3f46;
42
+ --chat-sender-menu-bg: #ffffff;
43
+ --chat-sender-menu-item-hover: #f4f4f5;
44
+ --chat-sender-mention-color: #2d6af3;
45
+ --chat-sender-mention-hover-color: #2d6af3;
46
+ --chat-sender-selection-bg: #b3d4fc;
47
+ --chat-sender-selection-fg: #0b1f33;
48
+ --chat-sender-trigger-menu-min-width: 200px;
49
+ --chat-sender-trigger-menu-max-width: 320px;
50
+ --chat-sender-trigger-menu-max-height: 320px;
51
+ --chat-sender-quick-active-bg: #f0f5ff;
52
+ --chat-sender-accent: #508ffb;
53
+ --chat-sender-send-active-bg: #3964fe;
54
+ --chat-sender-send-hover-bg: #2952e6;
55
+ --chat-sender-stop-bg: #ff584f;
56
+ --chat-sender-stop-hover-bg: #e64e46;
57
+ --chat-sender-progress-track: #e4e4e7;
58
+ --chat-sender-level-bg: #e5e7eb;
59
+ --chat-sender-switch-bg: #d1d5db;
60
+ --chat-sender-model-label: rgb(97, 102, 107);
61
+ --chat-sender-model-caption: rgb(129, 133, 140);
62
+ --chat-sender-model-hover-bg: rgba(38, 49, 72, 0.06);
63
+ --chat-sender-model-menu-border: rgba(0, 0, 0, 0);
64
+
65
+ /* ---------------------------------------------------------------------- */
66
+ /* ChatBot shell */
67
+ /* ---------------------------------------------------------------------- */
68
+ --chat-bot-border: transparent;
69
+ --chat-bot-sidebar-bg: var(--bg-surface, #f7f7f5);
70
+ --chat-bot-sender-bg: transparent;
71
+ --chat-bot-sidebar-width: 320px;
72
+
73
+ /* ---------------------------------------------------------------------- */
74
+ /* ai-conversation (ConversationList / MessageBubble / tool renderers) */
75
+ /* ---------------------------------------------------------------------- */
76
+ --ai-conversation-user-bg: var(--accent-subtle, #eff4ff);
77
+ --ai-conversation-user-color: var(--text-primary, #1a1a1a);
78
+ --ai-conversation-user-border: transparent;
79
+ --ai-conversation-assistant-bg: transparent;
80
+ --ai-conversation-assistant-color: var(--text-primary, #1a1a1a);
81
+ --ai-conversation-assistant-border: transparent;
82
+ --ai-conversation-tool-bg: var(--bg-surface, #f7f7f5);
83
+ --ai-conversation-tool-border: var(--border-subtle, #e8e8e5);
84
+ --ai-conversation-tool-pending: var(--accent, #2563eb);
85
+ --ai-conversation-tool-running: var(--accent, #2563eb);
86
+ --ai-conversation-tool-success: var(--success, #16a34a);
87
+ --ai-conversation-tool-error: var(--error, #dc2626);
88
+ --ai-conversation-muted-color: var(--text-secondary, #6b6b68);
89
+ --ai-conversation-code-bg: var(--bg-code, #f4f4f5);
90
+ --ai-conversation-chart-blue: var(--color-chart-blue, var(--ai-conversation-tool-running));
91
+ --ai-conversation-chart-purple: var(--color-chart-purple, var(--ai-conversation-tool-running));
92
+ --ai-conversation-chart-pink: var(--color-chart-pink, var(--ai-conversation-tool-error));
93
+ --ai-conversation-chart-amber: var(--color-chart-amber, var(--ai-conversation-tool-pending));
94
+ --ai-conversation-chart-green: var(--color-chart-green, var(--ai-conversation-tool-success));
95
+ --ai-conversation-chart-cyan: var(--color-chart-cyan, var(--ai-conversation-tool-running));
96
+ --ai-conversation-chart-orange: var(--color-chart-orange, var(--ai-conversation-tool-error));
97
+ --ai-conversation-radius-sm: var(--radius-tool, var(--radius-sm, 6px));
98
+ --ai-conversation-radius-md: var(--radius-md, 10px);
99
+ --ai-conversation-radius-lg: var(--radius-lg, 16px);
100
+ --ai-conversation-radius: 0.75rem;
101
+ --ai-conversation-bubble-radius: 12px;
102
+ --ai-conversation-spacing: 0.75rem;
103
+ --ai-conversation-content-max: 944px;
104
+ --ai-conversation-user-max: min(85%, 36rem);
105
+ --ai-conversation-assistant-max: 944px;
106
+ --ai-conversation-avatar-size: 1.375rem;
107
+ --ai-conversation-assistant-avatar-size: 2rem;
108
+ --ai-conversation-assistant-avatar-radius: 0.5rem;
109
+ --ai-conversation-avatar-radius: 0.375rem;
110
+ --ai-conversation-avatar-gap: 0.625rem;
111
+ /* 内置助手标识采用品牌色;自定义头像仍完整覆盖标识。 */
112
+ --ai-conversation-avatar-assistant-bg: transparent;
113
+ --ai-conversation-avatar-assistant-color: var(--color-accent-brand, #c96546);
114
+ --ai-conversation-avatar-user-bg: var(--bg-surface, #f7f7f5);
115
+ --ai-conversation-avatar-user-color: var(--text-secondary, #6b6b68);
116
+ --ai-conversation-ease: var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1));
117
+ --ai-conversation-prose-size: 0.875rem;
118
+ --ai-conversation-prose-leading: 1.6;
119
+ --ai-conversation-shadow-sm: var(--shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.04));
120
+ --ai-conversation-return-shadow: var(--shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.04));
121
+
122
+ /* ---------------------------------------------------------------------- */
123
+ /* Shell (ChatApp) */
124
+ /* ---------------------------------------------------------------------- */
125
+ --chat-app-bg: #f2f4f9;
126
+ --chat-app-content-bg: #ffffff;
127
+
128
+ /* ---------------------------------------------------------------------- */
129
+ /* Sidebar (ChatSessionSidebar) */
130
+ /* ---------------------------------------------------------------------- */
131
+ --chat-sidebar-width: 280px;
132
+ --chat-sidebar-collapsed-width: 65px;
133
+ --chat-sidebar-bg: #ffffff;
134
+ --chat-sidebar-inner-bg: #fafafa;
135
+ --chat-sidebar-border: #eef0f4;
136
+ --chat-sidebar-text: #1f2329;
137
+ --chat-sidebar-text-muted: #999999;
138
+ --chat-sidebar-accent: #1677ff;
139
+ --chat-sidebar-item-hover-bg: #f5f6f8;
140
+ --chat-sidebar-item-active-bg: #ffffff;
141
+ --chat-sidebar-logo-size: 40px;
142
+ --chat-sidebar-nav-icon-size: 20px;
143
+ --chat-sidebar-nav-item-min-height: 40px;
144
+ --chat-sidebar-top-min-height: 40px;
145
+ --chat-sidebar-transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
146
+
147
+ /* ---------------------------------------------------------------------- */
148
+ /* History list */
149
+ /* ---------------------------------------------------------------------- */
150
+ --chat-history-status-running: #1677ff;
151
+ --chat-history-status-error: #f87171;
152
+ --chat-history-unread-dot: #1677ff;
153
+ --chat-history-item-height: 40px;
154
+ --chat-history-item-radius: 6px;
155
+ --chat-history-item-color: #999999;
156
+ --chat-history-item-hover-bg: #ebecef;
157
+ --chat-history-item-hover-color: #333333;
158
+ --chat-history-item-active-bg: #f0f2f5;
159
+ --chat-history-item-active-color: #333333;
160
+ --chat-history-empty-color: #bbbbbb;
161
+ --chat-history-footer-color: #8f959e;
162
+ --chat-history-scrollbar-thumb: #e1e5e9;
163
+
164
+ /* Empty / welcome state (ChatApp / ChatBot empty layout)
165
+ * Robot bottom aligns with composer top; --chat-empty-welcome-chat-gap is the
166
+ * title's bottom inset inside the welcome row, not a gap below the row. */
167
+ --chat-empty-welcome-top: clamp(48px, 7cqi + 2vh, 105px);
168
+ --chat-empty-welcome-chat-gap: 20px;
169
+ --chat-empty-welcome-gap: var(--chat-empty-welcome-chat-gap);
170
+ --chat-empty-robot-height: clamp(92px, 9cqi, 109px);
171
+ --chat-empty-welcome-min-height: var(--chat-empty-robot-height);
172
+ --chat-empty-sender-max-width: 944px;
173
+ --chat-empty-welcome-max-width: 944px;
174
+ --chat-empty-title-color: #1f2329;
175
+ --chat-empty-title-size: clamp(20px, calc(1.6cqi + 16px), 32px);
176
+ --chat-empty-skill-gap: clamp(16px, 2.5cqi, 32px);
177
+ }
178
+
179
+ [data-chat-color-mode='dark'] {
180
+ /* ChatSender */
181
+ --chat-sender-bg: #202023;
182
+ --chat-sender-border: #3f3f46;
183
+ --chat-sender-focus-border: #71717a;
184
+ --chat-sender-text: #f4f4f5;
185
+ --chat-sender-text-secondary: #a1a1aa;
186
+ --chat-sender-text-muted: #71717a;
187
+ --chat-sender-placeholder: #71717a;
188
+ --chat-sender-icon-color: #a1a1aa;
189
+ --chat-sender-icon-hover-color: #f4f4f5;
190
+ --chat-sender-btn-hover-bg: #27272a;
191
+ --chat-sender-file-bg: #27272a;
192
+ --chat-sender-file-border: #3f3f46;
193
+ --chat-sender-file-border-hover: #52525b;
194
+ --chat-sender-menu-bg: #202023;
195
+ --chat-sender-menu-item-hover: #27272a;
196
+ --chat-sender-level-bg: #3f3f46;
197
+ --chat-sender-switch-bg: #3f3f46;
198
+
199
+ /* ChatBot shell */
200
+ --chat-bot-border: #3a3a3a;
201
+ --chat-bot-sidebar-bg: #1a1a1a;
202
+ --chat-bot-sender-bg: #0f0f0f;
203
+
204
+ /* Shell (ChatApp) */
205
+ --chat-app-bg: #0f0f11;
206
+ --chat-app-content-bg: #18181b;
207
+
208
+ /* Sidebar (ChatSessionSidebar) */
209
+ --chat-sidebar-bg: #1c1c1f;
210
+ --chat-sidebar-inner-bg: #1c1c1f;
211
+ --chat-sidebar-border: #2c2c30;
212
+ --chat-sidebar-text: #f4f4f5;
213
+ --chat-sidebar-text-muted: #a1a1aa;
214
+ --chat-sidebar-item-hover-bg: rgba(255, 255, 255, 0.06);
215
+ --chat-sidebar-item-active-bg: rgba(255, 255, 255, 0.1);
216
+
217
+ /* History list */
218
+ --chat-history-item-color: #a1a1aa;
219
+ --chat-history-item-hover-bg: rgba(255, 255, 255, 0.06);
220
+ --chat-history-item-hover-color: #f4f4f5;
221
+ --chat-history-item-active-bg: rgba(255, 255, 255, 0.1);
222
+ --chat-history-item-active-color: #f4f4f5;
223
+ --chat-history-empty-color: #52525b;
224
+ --chat-history-footer-color: #71717a;
225
+ --chat-history-scrollbar-thumb: #3f3f46;
226
+ }
@@ -0,0 +1,142 @@
1
+ import type { ChatSkillCardModel } from '../skill/types';
2
+ import { type ChatCloudConfig } from './cloudConfig';
3
+ import { type ChatSessionNavItem, type ChatSidebarTexts } from './chatSessionSidebarTypes';
4
+ import type { ChatAppExpose, ChatAttachmentInput, ChatAttachmentLimits, ChatColorMode, ChatPreviewRendererMap, ChatSenderProps, ChatSendPayload, ChatToolRendererMap, ChatToolStates, ConversationListConfig, ConversationMessage, ConversationStreamStatus, ChatTheme } from './types';
5
+ import type { AskUserPayload } from './askUser';
6
+ type __VLS_Props = {
7
+ cloud: ChatCloudConfig;
8
+ brand?: {
9
+ title?: string;
10
+ logo?: string;
11
+ logoAlt?: string;
12
+ };
13
+ navItems?: ChatSessionNavItem[];
14
+ sidebarTexts?: Partial<ChatSidebarTexts>;
15
+ /** `v-model:session-id`. */
16
+ sessionId?: string | null;
17
+ /** Two-way syncs `?sessionId=` via `History.replaceState`. Default `true`. */
18
+ syncSessionQuery?: boolean;
19
+ /** Explicit override; omit to let the sidebar own its own (persisted) collapse state, auto-forced on narrow screens. */
20
+ collapsed?: boolean;
21
+ model?: string;
22
+ senderConfig?: Partial<ChatSenderProps>;
23
+ colorMode?: ChatColorMode;
24
+ theme?: ChatTheme;
25
+ attachmentInput?: ChatAttachmentInput;
26
+ attachmentLimits?: Partial<ChatAttachmentLimits>;
27
+ conversationConfig?: ConversationListConfig;
28
+ previewRenderers?: ChatPreviewRendererMap;
29
+ toolRenderers?: ChatToolRendererMap;
30
+ toolStates?: ChatToolStates;
31
+ followUps?: string[];
32
+ pendingAskUser?: AskUserPayload | null;
33
+ enableQueue?: boolean;
34
+ showSidebar?: boolean;
35
+ sidebarWidth?: string | number;
36
+ /** Forwarded to `ChatBot`; see `ChatBotProps.centeredEmptyState`. Default `true`. */
37
+ centeredEmptyState?: boolean;
38
+ };
39
+ type __VLS_ModelProps = {
40
+ 'sessionId'?: string | null;
41
+ };
42
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
43
+ declare var __VLS_18: {}, __VLS_21: {}, __VLS_62: {}, __VLS_65: {
44
+ message: ConversationMessage;
45
+ index: number;
46
+ isLast: boolean;
47
+ messageProps: import("./types").ChatMessageProps;
48
+ onAction: (action: import("./types").ConversationUiAction) => void;
49
+ onCopy: (payload: import("./types").ChatActionbarCopyPayload) => void;
50
+ onAttachmentPreview: (file: import("./types").ChatResourceFile) => void;
51
+ onToolAction: (payload: import("./types").ChatToolActionPayload) => void;
52
+ }, __VLS_68: {}, __VLS_71: {}, __VLS_81: {};
53
+ type __VLS_Slots = {} & {
54
+ 'sidebar-brand'?: (props: typeof __VLS_18) => any;
55
+ } & {
56
+ nav?: (props: typeof __VLS_21) => any;
57
+ } & {
58
+ sender?: (props: typeof __VLS_62) => any;
59
+ } & {
60
+ message?: (props: typeof __VLS_65) => any;
61
+ } & {
62
+ empty?: (props: typeof __VLS_68) => any;
63
+ } & {
64
+ 'empty-extra'?: (props: typeof __VLS_71) => any;
65
+ } & {
66
+ footer?: (props: typeof __VLS_81) => any;
67
+ };
68
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, ChatAppExpose, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
69
+ stop: () => any;
70
+ action: (payload: unknown) => any;
71
+ send: (payload: ChatSendPayload) => any;
72
+ "attachment-error": (error: unknown, file?: File | undefined) => any;
73
+ "update:sessionId": (value: string | null) => any;
74
+ "artifact-open": (payload: unknown) => any;
75
+ "file-preview": (payload: unknown) => any;
76
+ "response-error": (error: Error, info: unknown) => any;
77
+ "nav-select": (key: string) => any;
78
+ "session-created": (payload: {
79
+ id: string;
80
+ title: string;
81
+ }) => any;
82
+ "session-status-change": (payload: {
83
+ id: string;
84
+ status: ConversationStreamStatus;
85
+ }) => any;
86
+ "skill-use": (skill: ChatSkillCardModel) => any;
87
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
88
+ onStop?: (() => any) | undefined;
89
+ onAction?: ((payload: unknown) => any) | undefined;
90
+ onSend?: ((payload: ChatSendPayload) => any) | undefined;
91
+ "onAttachment-error"?: ((error: unknown, file?: File | undefined) => any) | undefined;
92
+ "onUpdate:sessionId"?: ((value: string | null) => any) | undefined;
93
+ "onArtifact-open"?: ((payload: unknown) => any) | undefined;
94
+ "onFile-preview"?: ((payload: unknown) => any) | undefined;
95
+ "onResponse-error"?: ((error: Error, info: unknown) => any) | undefined;
96
+ "onNav-select"?: ((key: string) => any) | undefined;
97
+ "onSession-created"?: ((payload: {
98
+ id: string;
99
+ title: string;
100
+ }) => any) | undefined;
101
+ "onSession-status-change"?: ((payload: {
102
+ id: string;
103
+ status: ConversationStreamStatus;
104
+ }) => any) | undefined;
105
+ "onSkill-use"?: ((skill: ChatSkillCardModel) => any) | undefined;
106
+ }>, {
107
+ theme: ChatTheme;
108
+ model: string;
109
+ sessionId: string | null;
110
+ toolStates: ChatToolStates;
111
+ collapsed: boolean;
112
+ followUps: string[];
113
+ attachmentLimits: Partial<ChatAttachmentLimits>;
114
+ attachmentInput: ChatAttachmentInput;
115
+ pendingAskUser: AskUserPayload | null;
116
+ showSidebar: boolean;
117
+ sidebarWidth: string | number;
118
+ enableQueue: boolean;
119
+ senderConfig: Partial<ChatSenderProps>;
120
+ conversationConfig: ConversationListConfig;
121
+ colorMode: ChatColorMode;
122
+ previewRenderers: ChatPreviewRendererMap;
123
+ toolRenderers: ChatToolRendererMap;
124
+ centeredEmptyState: boolean;
125
+ navItems: ChatSessionNavItem[];
126
+ brand: {
127
+ title?: string;
128
+ logo?: string;
129
+ logoAlt?: string;
130
+ };
131
+ sidebarTexts: Partial<ChatSidebarTexts>;
132
+ syncSessionQuery: boolean;
133
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
134
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
135
+ declare const _default: typeof __VLS_export;
136
+ export default _default;
137
+ type __VLS_WithSlots<T, S> = T & {
138
+ new (): {
139
+ $slots: S;
140
+ };
141
+ };
142
+ //# sourceMappingURL=ChatApp.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChatApp.vue.d.ts","sourceRoot":"","sources":["../../../src/components/chat/ChatApp.vue"],"names":[],"mappings":"AAwxBA,OAAO,KAAK,EAAE,kBAAkB,EAAwB,MAAM,gBAAgB,CAAA;AAC9E,OAAO,EAAsB,KAAK,eAAe,EAAE,MAAM,eAAe,CAAA;AACxE,OAAO,EAGL,KAAK,kBAAkB,EAEvB,KAAK,gBAAgB,EACtB,MAAM,2BAA2B,CAAA;AAGlC,OAAO,KAAK,EACV,aAAa,EACb,mBAAmB,EACnB,oBAAoB,EAEpB,aAAa,EACb,sBAAsB,EACtB,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,cAAc,EACd,sBAAsB,EACtB,mBAAmB,EACnB,wBAAwB,EACxB,SAAS,EACV,MAAM,SAAS,CAAA;AAChB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAI/C,KAAK,WAAW,GAAG;IACf,KAAK,EAAE,eAAe,CAAA;IACtB,KAAK,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;IAC3D,QAAQ,CAAC,EAAE,kBAAkB,EAAE,CAAA;IAC/B,YAAY,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAA;IACxC,4BAA4B;IAC5B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,8EAA8E;IAC9E,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,wHAAwH;IACxH,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB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,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { type ClassifiedChatError } from './chatErrors';
2
+ import type { SessionArtifact } from './mdoc/sessionArtifacts';
2
3
  import type { ChatActionbarCopyPayload, ChatAttachmentError, ChatBotExpose, ChatBotProps, ChatMessageProps, ChatComposerAttachment, ChatQueueItem, ChatResourceFile, ChatSendPayload, ChatSenderModelOption, ChatSenderQuickAction, ChatToolActionPayload, ConversationMessage, ConversationStreamStatus, ConversationToolCall, ConversationUiAction, ResponseStreamEvent, ResponseSseFrame } from './types';
3
4
  interface ChatBotTriggerMenuSlotProps {
4
5
  triggerId: string;
@@ -21,6 +22,7 @@ type __VLS_Slots = {
21
22
  sidebar?: (props: {
22
23
  artifact: ConversationUiAction | null;
23
24
  file: ChatResourceFile | null;
25
+ artifacts: SessionArtifact[];
24
26
  }) => unknown;
25
27
  sender?: () => unknown;
26
28
  'sender-prepend'?: () => unknown;
@@ -113,6 +115,7 @@ declare const __VLS_base: import("vue").DefineComponent<ChatBotProps, ChatBotExp
113
115
  "update:model": (model: string) => any;
114
116
  "model-select": (option: ChatSenderModelOption) => any;
115
117
  "update:messages": (messages: ConversationMessage[]) => any;
118
+ "update:sessionId": (sessionId: string | null) => any;
116
119
  "update:queue": (queue: readonly ChatQueueItem[]) => any;
117
120
  "artifact-open": (payload: ConversationUiAction) => any;
118
121
  "file-preview": (resource: ChatResourceFile) => any;
@@ -168,6 +171,7 @@ declare const __VLS_base: import("vue").DefineComponent<ChatBotProps, ChatBotExp
168
171
  "onUpdate:model"?: ((model: string) => any) | undefined;
169
172
  "onModel-select"?: ((option: ChatSenderModelOption) => any) | undefined;
170
173
  "onUpdate:messages"?: ((messages: ConversationMessage[]) => any) | undefined;
174
+ "onUpdate:sessionId"?: ((sessionId: string | null) => any) | undefined;
171
175
  "onUpdate:queue"?: ((queue: readonly ChatQueueItem[]) => any) | undefined;
172
176
  "onArtifact-open"?: ((payload: ConversationUiAction) => any) | undefined;
173
177
  "onFile-preview"?: ((resource: ChatResourceFile) => any) | undefined;
@@ -181,6 +185,9 @@ declare const __VLS_base: import("vue").DefineComponent<ChatBotProps, ChatBotExp
181
185
  enableQueue: boolean;
182
186
  senderConfig: Partial<import("./types").ChatSenderProps>;
183
187
  conversationConfig: import("./types").ConversationListConfig;
188
+ centeredEmptyState: boolean;
189
+ isLoadingSession: boolean;
190
+ senderDisclaimer: boolean | string;
184
191
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
185
192
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
186
193
  declare const _default: typeof __VLS_export;
@@ -1 +1 @@
1
- {"version":3,"file":"ChatBot.vue.d.ts","sourceRoot":"","sources":["../../../src/components/chat/ChatBot.vue"],"names":[],"mappings":"AAizCA,OAAO,EAAqB,KAAK,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAe1E,OAAO,KAAK,EACV,wBAAwB,EACxB,mBAAmB,EAEnB,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,sBAAsB,EACtB,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EAErB,mBAAmB,EACnB,wBAAwB,EACxB,oBAAoB,EACpB,oBAAoB,EAEpB,mBAAmB,EACnB,gBAAgB,EACjB,MAAM,SAAS,CAAA;AAEhB,UAAU,2BAA2B;IACnC,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,CAAC,OAAO,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAA;IACxD,KAAK,EAAE,MAAM,IAAI,CAAA;IACjB,UAAU,EAAE,OAAO,GAAG,IAAI,CAAA;CAC3B;AAED,UAAU,u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;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -1,8 +1,9 @@
1
1
  import { type ComputedRef } from 'vue';
2
- import type { ChatAttachmentLimits, ChatColorMode, ChatPreviewRendererMap, ChatTheme, ChatToolRendererMap, ChatUploadConfig } from './types';
2
+ import type { ChatCloudConfig } from './cloudConfig';
3
+ import type { ChatAttachmentLimits, ChatColorMode, ChatPreviewRendererMap, ChatTheme, ChatToolRendererMap } from './types';
3
4
  export interface ChatContext {
4
5
  colorMode: ComputedRef<ChatColorMode>;
5
- uploadConfig: ComputedRef<ChatUploadConfig | undefined>;
6
+ cloud: ComputedRef<ChatCloudConfig | undefined>;
6
7
  limits: ComputedRef<ChatAttachmentLimits>;
7
8
  theme: ComputedRef<ChatTheme>;
8
9
  previewRenderers: ComputedRef<ChatPreviewRendererMap>;
@@ -1 +1 @@
1
- {"version":3,"file":"chatContext.d.ts","sourceRoot":"","sources":["../../../src/components/chat/chatContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,WAAW,EAAqB,MAAM,KAAK,CAAA;AAEpF,OAAO,KAAK,EACV,oBAAoB,EACpB,aAAa,EACb,sBAAsB,EACtB,SAAS,EACT,mBAAmB,EACnB,gBAAgB,EACjB,MAAM,SAAS,CAAA;AAEhB,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,WAAW,CAAC,aAAa,CAAC,CAAA;IACrC,YAAY,EAAE,WAAW,CAAC,gBAAgB,GAAG,SAAS,CAAC,CAAA;IACvD,MAAM,EAAE,WAAW,CAAC,oBAAoB,CAAC,CAAA;IACzC,KAAK,EAAE,WAAW,CAAC,SAAS,CAAC,CAAA;IAC7B,gBAAgB,EAAE,WAAW,CAAC,sBAAsB,CAAC,CAAA;IACrD,aAAa,EAAE,WAAW,CAAC,mBAAmB,CAAC,CAAA;CAChD;AAaD,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,CAE7D;AAED,wBAAgB,cAAc,IAAI,WAAW,CAE5C;AAED,wBAAgB,2BAA2B,CACzC,GAAG,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,oBAAoB,CAAC,GAAG,SAAS,CAAC,GAC7D,oBAAoB,CAYtB"}
1
+ {"version":3,"file":"chatContext.d.ts","sourceRoot":"","sources":["../../../src/components/chat/chatContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,WAAW,EAAqB,MAAM,KAAK,CAAA;AAEpF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AACpD,OAAO,KAAK,EACV,oBAAoB,EACpB,aAAa,EACb,sBAAsB,EACtB,SAAS,EACT,mBAAmB,EACpB,MAAM,SAAS,CAAA;AAEhB,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,WAAW,CAAC,aAAa,CAAC,CAAA;IACrC,KAAK,EAAE,WAAW,CAAC,eAAe,GAAG,SAAS,CAAC,CAAA;IAC/C,MAAM,EAAE,WAAW,CAAC,oBAAoB,CAAC,CAAA;IACzC,KAAK,EAAE,WAAW,CAAC,SAAS,CAAC,CAAA;IAC7B,gBAAgB,EAAE,WAAW,CAAC,sBAAsB,CAAC,CAAA;IACrD,aAAa,EAAE,WAAW,CAAC,mBAAmB,CAAC,CAAA;CAChD;AAaD,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,CAE7D;AAED,wBAAgB,cAAc,IAAI,WAAW,CAE5C;AAED,wBAAgB,2BAA2B,CACzC,GAAG,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,oBAAoB,CAAC,GAAG,SAAS,CAAC,GAC7D,oBAAoB,CAYtB"}
@@ -0,0 +1,21 @@
1
+ import type { ChatSidebarTexts } from './chatSessionSidebarTypes';
2
+ export interface ChatSessionSidebarAssets {
3
+ logo: string;
4
+ back: string;
5
+ collapse: string;
6
+ search: string;
7
+ historyGroupExpand: string;
8
+ newSession: string;
9
+ newSessionActive: string;
10
+ }
11
+ export declare const DEFAULT_SIDEBAR_ASSETS: ChatSessionSidebarAssets;
12
+ export declare function resolveNavIcon(assets: ChatSessionSidebarAssets, item: {
13
+ key: string;
14
+ icon?: string;
15
+ activeIcon?: string;
16
+ }, active: boolean): string;
17
+ export declare function resolveBrandLogo(brand?: {
18
+ logo?: string;
19
+ }): string;
20
+ export declare function resolveSidebarTexts(texts?: Partial<ChatSidebarTexts>): ChatSidebarTexts;
21
+ //# sourceMappingURL=chatSessionSidebarAssets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chatSessionSidebarAssets.d.ts","sourceRoot":"","sources":["../../../src/components/chat/chatSessionSidebarAssets.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAGjE,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,kBAAkB,EAAE,MAAM,CAAA;IAC1B,UAAU,EAAE,MAAM,CAAA;IAClB,gBAAgB,EAAE,MAAM,CAAA;CACzB;AAED,eAAO,MAAM,sBAAsB,EAAE,wBAQpC,CAAA;AAED,wBAAgB,cAAc,CAC5B,MAAM,EAAE,wBAAwB,EAChC,IAAI,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,EACzD,MAAM,EAAE,OAAO,GACd,MAAM,CAOR;AAED,wBAAgB,gBAAgB,CAAC,KAAK,CAAC,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAElE;AAED,wBAAgB,mBAAmB,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,GAAG,gBAAgB,CAEvF"}
@@ -0,0 +1,59 @@
1
+ import type { ChatHistoryItem } from './composables/chatHistoryApi';
2
+ /** Aligned with basic-agent-web's `AgentHomeSessionRunStatus` (UI-domain, lowercase). */
3
+ export type ChatSessionRunStatus = 'running' | 'success' | 'error' | 'interrupted';
4
+ export interface ChatSessionListItem {
5
+ id: string;
6
+ title: string;
7
+ /** Sort/group key — epoch ms, usually `updateDate`/`createDate`. */
8
+ time: number;
9
+ status: ChatSessionRunStatus;
10
+ viewed: boolean;
11
+ /** Optimistic insert only — plays the list appear animation once. */
12
+ animateIn?: boolean;
13
+ }
14
+ export interface ChatSessionNavItem {
15
+ key: string;
16
+ label: string;
17
+ /** Image URL rendered next to the label; `key: 'new'` falls back to the built-in PNG. */
18
+ icon?: string;
19
+ /** Image URL shown when this nav item is active. */
20
+ activeIcon?: string;
21
+ }
22
+ export interface ChatSidebarTexts {
23
+ brandTitle: string;
24
+ logoAlt: string;
25
+ navAriaLabel: string;
26
+ goHome: string;
27
+ collapse: string;
28
+ expand: string;
29
+ historyTitle: string;
30
+ emptyHistory: string;
31
+ loading: string;
32
+ noMoreHistory: string;
33
+ search: string;
34
+ closeSearch: string;
35
+ quickCreate: string;
36
+ newSession: string;
37
+ noMatches: string;
38
+ }
39
+ export declare const DEFAULT_SIDEBAR_TEXTS: ChatSidebarTexts;
40
+ export declare const DEFAULT_SIDEBAR_NAV_ITEMS: ChatSessionNavItem[];
41
+ export declare const DEFAULT_SIDEBAR_PERSIST_KEY = "deep-eye-chat-sidebar-collapsed";
42
+ /** Tolerates arbitrary backend casing (`RUNNING`, `running`, …); unrecognized/missing → `success`. */
43
+ export declare function parseSessionRunStatus(raw: unknown): ChatSessionRunStatus;
44
+ /** `ChatHistoryItem` (T06 raw API shape) → the sidebar's own UI-domain `ChatSessionListItem`. */
45
+ export declare function mapHistoryItemToSession(item: ChatHistoryItem, defaultTitle: string): ChatSessionListItem;
46
+ export interface ChatSessionHistoryGroup {
47
+ id: string;
48
+ label: string;
49
+ sessions: ChatSessionListItem[];
50
+ }
51
+ /**
52
+ * The sidebar/search dialog show a single flat "任务历史" list — no "7 天前到 30 天前" /
53
+ * "30 天前以上" time-range buckets (matching basic-agent-web's actual UI: the day-range
54
+ * buckets only exist as an internal data shape there too, never rendered as separate
55
+ * sections). `texts`/`now` are kept for signature stability; the sidebar already renders
56
+ * the "任务历史" header above the list, so the single group carries no label of its own.
57
+ */
58
+ export declare function groupSessionsByTime(sessions: readonly ChatSessionListItem[], _texts?: ChatSidebarTexts, _now?: number): ChatSessionHistoryGroup[];
59
+ //# sourceMappingURL=chatSessionSidebarTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chatSessionSidebarTypes.d.ts","sourceRoot":"","sources":["../../../src/components/chat/chatSessionSidebarTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AAEnE,yFAAyF;AACzF,MAAM,MAAM,oBAAoB,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,aAAa,CAAA;AAIlF,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,oEAAoE;IACpE,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,oBAAoB,CAAA;IAC5B,MAAM,EAAE,OAAO,CAAA;IACf,qEAAqE;IACrE,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAED,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,yFAAyF;IACzF,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,oDAAoD;IACpD,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,EAAE,MAAM,CAAA;IACpB,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM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