@deep-eye/core 1.3.87 → 1.3.91
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.
- package/CHANGELOG.md +45 -0
- package/README.md +1 -1
- package/dist/{ChartRenderer-lJ5Zz8gr.js → ChartRenderer-CKsUJhbc.js} +1 -1
- package/dist/{ChartRenderer-D5smoPbl.cjs → ChartRenderer-TzsnqnyV.cjs} +1 -1
- package/dist/ChatMyFilesArtifacts-BeQHLrUE.cjs +1 -0
- package/dist/ChatMyFilesArtifacts-qD7q7u2u.js +795 -0
- package/dist/components/chat/ChatApp.vue.d.ts +11 -0
- package/dist/components/chat/ChatApp.vue.d.ts.map +1 -1
- package/dist/components/chat/ChatBot.vue.d.ts.map +1 -1
- package/dist/components/chat/chatAppScheduledTasks.d.ts +42 -0
- package/dist/components/chat/chatAppScheduledTasks.d.ts.map +1 -0
- package/dist/components/chat/chatConfirm.d.ts +37 -0
- package/dist/components/chat/chatConfirm.d.ts.map +1 -0
- package/dist/components/chat/chatFilePicker.d.ts +10 -0
- package/dist/components/chat/chatFilePicker.d.ts.map +1 -1
- package/dist/components/chat/chatQuota.d.ts +5 -5
- package/dist/components/chat/chatQuota.d.ts.map +1 -1
- package/dist/components/chat/chatSessionSidebarAssets.d.ts +7 -0
- package/dist/components/chat/chatSessionSidebarAssets.d.ts.map +1 -1
- package/dist/components/chat/chatToast.d.ts +8 -0
- package/dist/components/chat/chatToast.d.ts.map +1 -0
- package/dist/components/chat/components/ChatConfirmHost.vue.d.ts +4 -0
- package/dist/components/chat/components/ChatConfirmHost.vue.d.ts.map +1 -0
- package/dist/components/chat/components/ChatQuotaDialog.vue.d.ts.map +1 -1
- package/dist/components/chat/components/ChatQuotaEntry.vue.d.ts.map +1 -1
- package/dist/components/chat/components/ChatQuotaRefreshButton.vue.d.ts +12 -0
- package/dist/components/chat/components/ChatQuotaRefreshButton.vue.d.ts.map +1 -0
- package/dist/components/chat/components/ChatSender.vue.d.ts +7 -1
- package/dist/components/chat/components/ChatSender.vue.d.ts.map +1 -1
- package/dist/components/chat/components/ChatSessionSidebar.vue.d.ts.map +1 -1
- package/dist/components/chat/components/ChatToastStack.vue.d.ts +17 -0
- package/dist/components/chat/components/ChatToastStack.vue.d.ts.map +1 -0
- package/dist/components/chat/components/files/ChatMyFilesDirectory.vue.d.ts.map +1 -1
- package/dist/components/chat/components/files/ChatMyFilesViewer.vue.d.ts.map +1 -1
- package/dist/components/chat/components/files/chatFileTransferSources.d.ts +10 -3
- package/dist/components/chat/components/files/chatFileTransferSources.d.ts.map +1 -1
- package/dist/components/chat/components/files/chatReviewApi.d.ts +4 -0
- package/dist/components/chat/components/files/chatReviewApi.d.ts.map +1 -1
- package/dist/components/chat/components/files/index.d.ts +3 -1
- package/dist/components/chat/components/files/index.d.ts.map +1 -1
- package/dist/components/chat/components/files/myFilesShareSchool.d.ts +10 -3
- package/dist/components/chat/components/files/myFilesShareSchool.d.ts.map +1 -1
- package/dist/components/chat/components/index.d.ts +1 -0
- package/dist/components/chat/components/index.d.ts.map +1 -1
- package/dist/components/chat/components/schedule/ChatScheduleRecords.vue.d.ts +21 -0
- package/dist/components/chat/components/schedule/ChatScheduleRecords.vue.d.ts.map +1 -0
- package/dist/components/chat/components/schedule/ChatScheduleSelect.vue.d.ts +29 -0
- package/dist/components/chat/components/schedule/ChatScheduleSelect.vue.d.ts.map +1 -0
- package/dist/components/chat/components/schedule/ChatScheduleSwitch.vue.d.ts +19 -0
- package/dist/components/chat/components/schedule/ChatScheduleSwitch.vue.d.ts.map +1 -0
- package/dist/components/chat/components/schedule/ChatScheduleTaskCard.vue.d.ts +33 -0
- package/dist/components/chat/components/schedule/ChatScheduleTaskCard.vue.d.ts.map +1 -0
- package/dist/components/chat/components/schedule/ChatScheduleTaskDialog.vue.d.ts +42 -0
- package/dist/components/chat/components/schedule/ChatScheduleTaskDialog.vue.d.ts.map +1 -0
- package/dist/components/chat/components/schedule/ChatScheduleTime.vue.d.ts +15 -0
- package/dist/components/chat/components/schedule/ChatScheduleTime.vue.d.ts.map +1 -0
- package/dist/components/chat/components/schedule/ChatScheduledTasks.vue.d.ts +41 -0
- package/dist/components/chat/components/schedule/ChatScheduledTasks.vue.d.ts.map +1 -0
- package/dist/components/chat/components/schedule/chatScheduledTasksApi.d.ts +35 -0
- package/dist/components/chat/components/schedule/chatScheduledTasksApi.d.ts.map +1 -0
- package/dist/components/chat/components/schedule/index.d.ts +10 -0
- package/dist/components/chat/components/schedule/index.d.ts.map +1 -0
- package/dist/components/chat/components/schedule/scheduledTaskWire.d.ts +60 -0
- package/dist/components/chat/components/schedule/scheduledTaskWire.d.ts.map +1 -0
- package/dist/components/chat/components/schedule/scheduledTasksModel.d.ts +116 -0
- package/dist/components/chat/components/schedule/scheduledTasksModel.d.ts.map +1 -0
- package/dist/components/chat/components/schedule/scheduledTasksRemoteApi.d.ts +18 -0
- package/dist/components/chat/components/schedule/scheduledTasksRemoteApi.d.ts.map +1 -0
- package/dist/components/chat/composables/chatApiRequest.d.ts +7 -1
- package/dist/components/chat/composables/chatApiRequest.d.ts.map +1 -1
- package/dist/components/chat/composables/useChatSessionHistory.d.ts.map +1 -1
- package/dist/components/chat/composer/composerExtensions.d.ts +31 -0
- package/dist/components/chat/composer/composerExtensions.d.ts.map +1 -1
- package/dist/components/chat/composerBannerNotice.d.ts +14 -0
- package/dist/components/chat/composerBannerNotice.d.ts.map +1 -0
- package/dist/components/chat/index.d.ts +6 -1
- package/dist/components/chat/index.d.ts.map +1 -1
- package/dist/components/chat/types.d.ts +26 -0
- package/dist/components/chat/types.d.ts.map +1 -1
- package/dist/{docx-preview-DnSEXqsD.cjs → docx-preview-CC8jDFyo.cjs} +1 -1
- package/dist/{docx-preview-DGy9Ky36.js → docx-preview-Ddq2Rd5j.js} +1 -1
- package/dist/index-47_t1k1t.cjs +1467 -0
- package/dist/{index-QH1oDPuS.js → index-B5TwLeqQ.js} +1 -1
- package/dist/{index-BjoCM559.js → index-BXOcelf2.js} +30524 -27911
- package/dist/{index-BqQ5eE7K.cjs → index-G1cUXwuV.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +645 -610
- package/dist/{papaparse.min-V_TidkCa.cjs → papaparse.min-Bi9-MNQC.cjs} +1 -1
- package/dist/{papaparse.min-DXbU8MEz.js → papaparse.min-CABieqyR.js} +15 -15
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/ChatMyFilesArtifacts-83kaOC7E.js +0 -1013
- package/dist/ChatMyFilesArtifacts-BhflVsJl.cjs +0 -1
- package/dist/index-B-jsC3Gu.cjs +0 -1443
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,50 @@
|
|
|
2
2
|
|
|
3
3
|
`@deep-eye/core` 的用户可见变更(语义化版本)。
|
|
4
4
|
|
|
5
|
+
## [Unreleased]
|
|
6
|
+
|
|
7
|
+
## [1.3.91] - 2026-11-26
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- **输入框正文上限 99999 字**:`ChatSender`(以及 `ChatApp` / `ChatBot` 里的输入框)超过上限就直接截掉尾部,并在输入框上方的 banner 里说明「最多输入 99999 个字符,多出的内容已截断」——和「正在生成…」「排队消息最多 N 条」共用同一条 banner,2.5 秒后收起、右侧可关闭。单独使用 `ChatSender`(没有 banner)时不提示,截断照常生效。手打、粘贴、插入内容都走同一条 `appendTransaction` 闸门;mention 按 `@` + 名称计字数。「已粘贴」卡片里的文字和文档摘录引文也计入上限。截断时编辑器会抛 `composer-overflow` 事件(带 `limit`)。导出 `COMPOSER_MAX_TEXT_LENGTH`。
|
|
12
|
+
|
|
13
|
+
- **`ChatApp` 可开「定时任务」**:`scheduledTasks` 不传时侧栏没有这一项。传 `true` 或配置对象后,侧栏增加「定时任务」(默认 key `scheduled-tasks`),点进去是任务列表和运行记录。新建、编辑用对话同款输入框,可带文件、`@` 和技能,并选择重复和时间。登录后走对话网关同一前缀下的 `/schedule/*`:列表、新建、修改、删除、暂停、重新打开、马上运行。运行记录用返回的会话编号再查状态。工作日和每月这个接口还表达不了,保存时会提示改选每天或每周。没登录,或宿主传入 `api` 时,用传入的数据;两者都没有时用内存数据。`#page` 槽仍优先于内置页。导出 `ChatScheduledTasks`、`createRemoteScheduledTasksApi`、`showChatToast`、`confirmChatAction`。
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- **我的文件里打开文本不再闪一下转圈**:小文件几十毫秒就读完时,先等一小段;还在读才淡入骨架,读完后再留住片刻再出正文。读得很快时直接出内容。
|
|
18
|
+
|
|
19
|
+
本包同时带上 1.3.90 的「共享校内可以带学科」。1.3.90 当时只写了更新日志,没有改包版本,也没有单独构建。
|
|
20
|
+
|
|
21
|
+
## [1.3.90] - 2026-11-25
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
|
|
25
|
+
- **「我的文件」共享校内可以带学科**:`pickShareCategory` 返回值从「分类 id」放宽为 `string | MyFilesShareSchoolPick | null`(`{ categoryId, subject? }`),只回 id 的旧宿主不受影响。宿主把学科(中文名,如「语文」)一起回时,`submitMyFilesShare` 会把 `subject` 带进 `myFiles/check/share` 请求体,审核通过后作品按学科上架。导出 `MyFilesShareSchoolPick`。当时包版本仍是 1.3.89,这一条随 1.3.91 一起进包。
|
|
26
|
+
|
|
27
|
+
## [1.3.89] - 2026-11-23
|
|
28
|
+
|
|
29
|
+
### Changed
|
|
30
|
+
|
|
31
|
+
- **积分明细弹层不再放刷新按钮**:刷新图标和关闭按钮叠在一起。刷新只留在积分卡片标题行。打开弹层时仍会重新拉概览和明细;加载失败时的「重新加载」仍在。
|
|
32
|
+
|
|
33
|
+
## [1.3.88] - 2026-11-23
|
|
34
|
+
|
|
35
|
+
### Fixed
|
|
36
|
+
|
|
37
|
+
- **消耗明细补上本周时间**:`listPointsDetails` 的「本周」原先不传时间,拿不到本周记录。现在本周传本周一到本周日,本月仍传当月 1 日到最后一天,格式都是 `yyyy-MM-dd`。
|
|
38
|
+
|
|
39
|
+
### Changed
|
|
40
|
+
|
|
41
|
+
- **积分用量不再变色**:底栏数字和卡片里的用量条保持原色,不再在将尽时变橙、用完时变红。用完或停用仍用「已用完」/「额度不足」文字提示。
|
|
42
|
+
|
|
43
|
+
### Added
|
|
44
|
+
|
|
45
|
+
- **积分可以手动刷新,对话结束后也会自动刷新**:积分卡片和明细弹层头部有刷新图标,点击重新拉最新用量。底栏那一行只显示用量。一轮对话结束(成功、失败或中断)后自动再拉一次;生成过程中不刷。1.3.89 起明细弹层不再放这枚按钮。
|
|
46
|
+
|
|
47
|
+
- **「上传到」落点可以只声明黑名单**:`ChatFilePickerSource` 新增 `transferBlockExtensions`(带不带前导点、大小写都不影响)。与 `transferExtensions` 二选一,**同时声明时黑名单优先**:命中即拒,未命中再按白名单判断;两张名单都不声明则不限制。用于「只排除某几类、其余全收」的落点 —— 这类语义用白名单得反向枚举全部允许的格式,每加一种格式都要回来改,必然漏,知识库只排除视频就是典型场景。生效范围与白名单一致:只在作为 `ChatFileTransferSources` 落点来源时被消费,「上传到」菜单里出不出这个落点、提交前拦不拦都按同一套判断;「+ → 添加文件」复用同一来源时不受影响。
|
|
48
|
+
|
|
5
49
|
## [1.3.87] - 2026-11-20
|
|
6
50
|
|
|
7
51
|
### Added
|
|
@@ -61,6 +105,7 @@
|
|
|
61
105
|
|
|
62
106
|
- **「+ → 添加文件 → 我的文件」的图标换成侧栏入口那张切图**:此前是一枚 lucide 文件夹,与侧栏「我的文件」入口(`assets/chat/sidebar/nav/files.svg`,带横线的文件夹)不是同一个图形。现直接复用同一份资源,换图只改侧栏资产。`size` 的归一化(`number` / CSS 长度字符串 → 数字)保持不变。
|
|
63
107
|
- **「添加文件」子菜单三枚图标视觉尺寸与笔画对齐**:三枚图标的盒子一向都是 20px,但蓝湖切图在 24 视框里带内缩,实际画出来的图形各不一样大(实测 `files.svg` 15×13.3、`book.svg` 15.8×15.8、lucide `Upload` 16.7×16.7),笔画粗细也不一致(归一化到 24 视框分别是 1.8 / 2 / 1.75)。现以知识库切图 `book.svg` 为基准做光学补偿:`files.svg` 放大 1.12 倍(图形对角线 20.1 → 22.2,笔画 1.8 → 2.02)、lucide `Upload` 缩小 0.95 倍并把 `stroke-width` 补到 `2 / 0.95 ≈ 2.1`(对角线 23.6 → 22.1,笔画 2.1 × 0.95 ≈ 2.0),三者对角线约 22.2–22.4、笔画统一在 2.0 左右。补偿系数写在各图标组件里(`ChatTipMenuAssetIcon` 新增可选 `scale`),盒子尺寸仍由菜单的 `--ui-menu-item-icon-size` 统一控制,不改菜单结构与布局。
|
|
108
|
+
- **「更多」浮层不再画选中勾**:当前项已有浅灰背景,右侧勾选和背景说的是同一件事。浮层条目只保留背景高亮。
|
|
64
109
|
- **「上传到知识库」改成选文件夹:左库 + 右目录,不再是两个页签**:`mode="target"` + `layout: 'library'` 此前直接复用「+ → 添加文件」那套视图(页签「选择知识库 / 选择文件」+ 该库的文件列表 + 勾选框 + 「已选择 N 项」),于是「选个存放位置」变成了「选文件」,页签还得先切一次才能看见库。现该组合换一套视图:去掉页签,左栏知识库列表(分组、点行即切换)、右栏该库的**文件夹树**(首行「根目录」,单选,默认全展开,双击直接确认),底栏只报落点「上传到「库 / 目录」」。契约上 `ChatFileLibraryPickerSource` 新增可选 `loadFolders`(`{ libraryId, keyword, signal } → 文件夹树`,不传时退化为把 `loadFiles` 结果里的文件夹筛出来);新增导出 `CHAT_FILE_PICKER_TARGET_ROOT_ID`(「根目录」行的身份),`FileTransferChoice` 新增 `targetDirectoryId` 并透传到 `copyToKnowledge`。**这也修掉了「上传到知识库」永远落库根目录的老问题**:原先只回抛库 id,`targetDirectoryId` 恒为 `undefined`。选文件模式(「+ → 添加文件 → 知识库」)完全不变。宿主侧需在 knowledge 来源上补 `loadFolders`。
|
|
65
110
|
- **「上传到我的资料」在资料库没有任何文件夹时不再弹选择框**:一个文件夹都没有时,根目录是唯一落点,原先仍会弹出那个只有一行「我的资料(根目录)」的位置选择框,等于让用户空按一次「确定」。现 `useFileTransfer` 在打开弹框前先预检目录树(`hasMyFilesFolder`:`home` + `tree`,与弹框同两个接口):没有文件夹就直接提交到根目录,反馈与弹框确认走同一条链路——目录页 / 产物页进右下角任务面板(分组名「我的资料 · 根目录」),对话产物卡片走一次请求 + toast。只对组件库自带的「我的资料」落点生效(宿主自定义 `transferSources.myFiles` 时照旧弹框);预检失败不拦路,照常开弹框(错误态与重试由弹框自己呈现)。有文件夹时行为不变,代价是目录树会拉两遍(预检一遍、弹框一遍)。
|
|
66
111
|
- **落点选择框的根目录行去掉「(根目录)」后缀**:直接叫「我的资料」。该行是资料库顶层本身,再标(根目录)是把实现细节写给用户看;左侧仍可展开,子目录与顶层的层级关系不变。
|
package/README.md
CHANGED
|
@@ -150,7 +150,7 @@ const data = {
|
|
|
150
150
|
</template>
|
|
151
151
|
```
|
|
152
152
|
|
|
153
|
-
assistant `content` 原生支持 GFM、代码高亮、KaTeX 公式、图片/视频/音频,以及组件库定义的 mdoc 标签(工件卡片、Chart、Action Bar)。≥ 1.3.79 起,引用悬浮 tip 和文本目录里的公式与正文一样渲染,PDF 页图文字层仍是纯文本;「产出文件」列表固定宽 480px,单文件预览仍默认 55%,文件名溢出时悬停才显示全文;侧栏任务历史把带前导零的 Java 日期按本地时间计算。≥ 1.3.80 起,满 5 轮的对话在左侧显示会话索引;模型列表与详情卡宽 300px,消耗速度读 `ratio`;独立成段且已闭合、能通过图表校验的 ` ```json ` / ` ```echarts ` 直接画成图。≥ 1.3.81 起,`responses` 的 JSON 带回 `session_id` 时先抛 `responses-ack` 再拉流;图片灯箱按一条消息翻页,计数器显示消息内位置。≥ 1.3.82 起,刷新后提问前的「已完成」显示自己的用时;续写结束后整轮用时从提问开始算到续写结束。≥ 1.3.83 起,`ChatApp` 可开「我的文件」;「+ → 添加文件」展开为本地文件 / 我的文件 / 知识库;大文件默认分片上传并可在刷新后续传;选文件弹框在窄容器里收列;纯文本侧栏改为阅读页;我的资料里的 Markdown 只读预览会画出表格和公式;产物卡片的「更多」一直显示。知识库写入落点需宿主传 `transferSources.knowledge`。≥ 1.3.84 起,文件操作结果走宿主 toast(`ChatApp` 的 `files-toast`,或 `ChatMyFiles` 的 `toast`;不接时「我的文件」页静默,对话产物卡片仍用卡片上的小条,`notice` 已移除);「上传到」与本地上传共用右下角任务面板,超过 20 个按趟排队,单条失败可单独重试;空文件夹不再显示展开箭头。≥ 1.3.85 起,`ChatApp` 可在积分卡片里切换外观(`show-appearance`;只有 `sync-document-color-mode` 才写 `<html>`);输入 `@` 默认引用最近文件(`mentionFiles: false` 仍是知识库 `@`);「我的文件」选文件弹框含「AI产物」页签;资料库与「我的文件」左栏可拖宽;「上传到知识库」改为选目录,宿主需补 `loadFolders`;没有文件夹时「上传到我的资料」直接落根目录;产物转入知识库或备课走单文件直投。≥ 1.3.86 起,`ChatMyFiles` 传 `pickShareCategory` 后,文件和文件夹菜单才出现「共享校内」:宿主返回灵感广场分类 id 才提交审核,不传时菜单与之前一致。≥ 1.3.87 起,传入 `cloud` 后侧栏左下角显示真实积分(本月已用 / 月限额,另配的个人积分单独一行);学校积分默认不显示,校长身份传 `show-school-quota`;明细按本周 / 本月分页。没有文件时,「我的资料」空页是插画和三张入口(上传资料、新建文件夹、AI
|
|
153
|
+
assistant `content` 原生支持 GFM、代码高亮、KaTeX 公式、图片/视频/音频,以及组件库定义的 mdoc 标签(工件卡片、Chart、Action Bar)。≥ 1.3.79 起,引用悬浮 tip 和文本目录里的公式与正文一样渲染,PDF 页图文字层仍是纯文本;「产出文件」列表固定宽 480px,单文件预览仍默认 55%,文件名溢出时悬停才显示全文;侧栏任务历史把带前导零的 Java 日期按本地时间计算。≥ 1.3.80 起,满 5 轮的对话在左侧显示会话索引;模型列表与详情卡宽 300px,消耗速度读 `ratio`;独立成段且已闭合、能通过图表校验的 ` ```json ` / ` ```echarts ` 直接画成图。≥ 1.3.81 起,`responses` 的 JSON 带回 `session_id` 时先抛 `responses-ack` 再拉流;图片灯箱按一条消息翻页,计数器显示消息内位置。≥ 1.3.82 起,刷新后提问前的「已完成」显示自己的用时;续写结束后整轮用时从提问开始算到续写结束。≥ 1.3.83 起,`ChatApp` 可开「我的文件」;「+ → 添加文件」展开为本地文件 / 我的文件 / 知识库;大文件默认分片上传并可在刷新后续传;选文件弹框在窄容器里收列;纯文本侧栏改为阅读页;我的资料里的 Markdown 只读预览会画出表格和公式;产物卡片的「更多」一直显示。知识库写入落点需宿主传 `transferSources.knowledge`。≥ 1.3.84 起,文件操作结果走宿主 toast(`ChatApp` 的 `files-toast`,或 `ChatMyFiles` 的 `toast`;不接时「我的文件」页静默,对话产物卡片仍用卡片上的小条,`notice` 已移除);「上传到」与本地上传共用右下角任务面板,超过 20 个按趟排队,单条失败可单独重试;空文件夹不再显示展开箭头。≥ 1.3.85 起,`ChatApp` 可在积分卡片里切换外观(`show-appearance`;只有 `sync-document-color-mode` 才写 `<html>`);输入 `@` 默认引用最近文件(`mentionFiles: false` 仍是知识库 `@`);「我的文件」选文件弹框含「AI产物」页签;资料库与「我的文件」左栏可拖宽;「上传到知识库」改为选目录,宿主需补 `loadFolders`;没有文件夹时「上传到我的资料」直接落根目录;产物转入知识库或备课走单文件直投。≥ 1.3.86 起,`ChatMyFiles` 传 `pickShareCategory` 后,文件和文件夹菜单才出现「共享校内」:宿主返回灵感广场分类 id 才提交审核,不传时菜单与之前一致。≥ 1.3.87 起,传入 `cloud` 后侧栏左下角显示真实积分(本月已用 / 月限额,另配的个人积分单独一行);学校积分默认不显示,校长身份传 `show-school-quota`;明细按本周 / 本月分页。没有文件时,「我的资料」空页是插画和三张入口(上传资料、新建文件夹、AI 产物)。≥ 1.3.88 起,积分卡片和明细弹层可以手动刷新,一轮对话结束后底栏用量自动更新;用量数字和用量条不再随将尽、用完变色;消耗明细的「本周」传本周一到本周日。「上传到」落点可只声明 `transferBlockExtensions`,与白名单同时声明时黑名单优先。≥ 1.3.89 起,明细弹层不再放刷新按钮(它和关闭按钮叠在一起),刷新留在积分卡片上,打开弹层时仍会重新拉取。≥ 1.3.91 起,输入框正文上限 99999 字,超出直接截掉尾部,对话里在输入框上方提示;`ChatApp` 可开「定时任务」(`scheduled-tasks`,默认关),登录后走对话网关下的定时任务接口,工作日和每月还不能保存;我的文件打开文本时,读得很快直接出内容,不再闪一下转圈。`pickShareCategory` 除了分类编号,也可以回 `{ categoryId, subject }`,学科用中文名。更新日志里的 1.3.90 只记了带学科这一条,没有单独发包,随 1.3.91 一起提供。询问用户优先走 `ask_user` tool(`arguments: { desc, questions }`);正文仍可写 `{% ask-form %}` 作兼容。将 `ARTIFACT_BLOCK_SYSTEM_PROMPT`、`ASK_USER_FORM_SYSTEM_PROMPT`、`CHART_BLOCK_SYSTEM_PROMPT` 或 `ACTION_BAR_SYSTEM_PROMPT` 加入 system prompt 可引导模型;`ChatBot` 会自动 dock Ask Form。带 `toolCallId` 的提交显示在「向用户提问」工具回复里(题干 + 加粗选项),不再另起用户气泡。宿主只需用 `buildAskUserFunctionCallOutput(toolCallId, answers)` 续接 `function_call_output`——**不要**用 `answers[].selected` 拼文案。没有 `toolCallId` 的正文 `{% ask-form %}` 仍写入用户气泡(`action.label`)。点击工件卡片按类型分流(可预览进侧栏 / 图片灯箱 / 新标签 / 直接下载),消息内渲染 `{% chart %}` 与 `{% action-bar %}`。
|
|
154
154
|
|
|
155
155
|
## 进阶能力
|
|
156
156
|
|
|
@@ -2,7 +2,7 @@ var Ex = Object.defineProperty;
|
|
|
2
2
|
var Mx = (r, e, t) => e in r ? Ex(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
3
3
|
var bp = (r, e, t) => Mx(r, typeof e != "symbol" ? e + "" : e, t);
|
|
4
4
|
import { defineComponent as Xu, shallowRef as wh, inject as xl, toRefs as Ax, computed as tr, toValue as Tl, watch as Cl, watchEffect as l_, onMounted as u_, onBeforeUnmount as Ix, h as xh, shallowReactive as Of, onUpdated as Lx, onUnmounted as Ox, warn as Px, nextTick as Rx, Teleport as Nx, openBlock as it, createElementBlock as Ct, createElementVNode as si, toDisplayString as kx, Fragment as xs, renderList as Pf, createStaticVNode as Vx, ref as Bx, createVNode as zx, Transition as Fx, withCtx as Hx, unref as Wa, createBlock as Rf } from "vue";
|
|
5
|
-
import { _ as qv,
|
|
5
|
+
import { _ as qv, R as Gx, S as Ux } from "./index-BXOcelf2.js";
|
|
6
6
|
/*! *****************************************************************************
|
|
7
7
|
Copyright (c) Microsoft Corporation.
|
|
8
8
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var fx=Object.defineProperty;var cx=(r,e,t)=>e in r?fx(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var sp=(r,e,t)=>cx(r,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const z=require("vue"),os=require("./index-
|
|
1
|
+
"use strict";var fx=Object.defineProperty;var cx=(r,e,t)=>e in r?fx(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var sp=(r,e,t)=>cx(r,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const z=require("vue"),os=require("./index-47_t1k1t.cjs");/*! *****************************************************************************
|
|
2
2
|
Copyright (c) Microsoft Corporation.
|
|
3
3
|
|
|
4
4
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue");require("@vueuse/core");const l=require("./index-47_t1k1t.cjs"),Qe="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20version='1.1'%20viewBox='0%200%2024.0%2024.0'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cdefs%3e%3cclipPath%20id='i0'%3e%3cpath%20d='M2000,0%20L2000,4212%20L0,4212%20L0,0%20L2000,0%20Z'%3e%3c/path%3e%3c/clipPath%3e%3c/defs%3e%3cg%20transform='translate(-157.0%20-2549.0)'%3e%3cg%20clip-path='url(%23i0)'%3e%3cg%20transform='translate(145.0%202545.0)'%3e%3cg%20transform='translate(12.0%204.0)'%3e%3cg%20transform='translate(24.0%2024.0)%20rotate(90.0)%20scale(-1.0%201.0)'%3e%3cg%20transform='translate(17.5%209.5)%20rotate(90.00000000000001)'%3e%3cpath%20d='M0,0%20L5,5%20L0,10'%20stroke='currentColor'%20stroke-width='1.8'%20fill='none'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Je={class:"chat-artifact-row__lead"},Xe={class:"chat-artifact-row__name"},et=["title"],tt={class:"chat-artifact-row__meta"},at={class:"chat-artifact-row__cell chat-artifact-row__cell--kind"},nt=["title"],lt={class:"chat-artifact-row__cell chat-artifact-row__cell--time"},ot={class:"chat-artifact-row__cell chat-artifact-row__cell--size"},st=e.defineComponent({name:"ChatArtifactFileRow",__name:"ChatArtifactFileRow",props:{file:{},selected:{type:Boolean},actionsDisabled:{type:Boolean,default:!1},showOwner:{type:Boolean,default:!1}},emits:["toggle","open","action"],setup(c,{emit:N}){const r=c,h=N,p=l.useTransferTargetFilter(),d=e.computed(()=>l.createArtifactFileMenuItems({disabled:r.actionsDisabled},{canUploadTo:p(r.file)})),{Menu:u}=l.useUiDropdown({items:d,placement:l.ARTIFACT_FILE_MENU_PLACEMENT,width:l.ARTIFACT_FILE_MENU_WIDTH,panelClass:l.ARTIFACT_FILE_MENU_PANEL_CLASS,submenuPanelClass:l.ARTIFACT_FILE_SUBMENU_PANEL_CLASS,onItemClick:({id:f})=>{if(f.split(":").at(-1)==="download"){if(r.actionsDisabled)return;r.file.url&&l.downloadFromSrc(r.file.url,r.file.name);return}h("action",f)}}),_=e.computed(()=>[r.file.kind,r.file.updatedLabel,r.file.sizeLabel].filter(Boolean).join(" · "));return(f,m)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["chat-artifact-row",{"is-selected":c.selected,"has-owner":c.showOwner}]),onClick:m[3]||(m[3]=S=>h("toggle"))},[e.createElementVNode("span",Je,[e.createVNode(l.ChatFileCheckbox,{class:"chat-artifact-row__check",checked:c.selected,label:c.selected?"取消选择":"选择文件",onToggle:m[0]||(m[0]=S=>h("toggle"))},null,8,["checked","label"]),e.createVNode(l.ChatMyFilesTypeMark,{ext:c.file.ext,name:c.file.name},null,8,["ext","name"])]),e.createElementVNode("span",Xe,[e.createElementVNode("button",{class:"chat-artifact-row__title",type:"button",title:c.file.name,onClick:m[1]||(m[1]=e.withModifiers(S=>h("open"),["stop"]))},e.toDisplayString(c.file.name),9,et),e.createElementVNode("span",tt,e.toDisplayString(_.value),1)]),e.createElementVNode("span",at,e.toDisplayString(c.file.kind),1),c.showOwner?(e.openBlock(),e.createElementBlock("span",{key:0,class:"chat-artifact-row__cell chat-artifact-row__cell--owner",title:c.file.owner||""},e.toDisplayString(c.file.owner||"—"),9,nt)):e.createCommentVNode("",!0),e.createElementVNode("span",lt,e.toDisplayString(c.file.updatedLabel),1),e.createElementVNode("span",ot,e.toDisplayString(c.file.sizeLabel),1),e.createVNode(e.unref(u),null,{default:e.withCtx(()=>[e.createVNode(l.ArtifactFileMoreButton,{class:"chat-artifact-row__more","data-testid":"artifact-row-more",loading:"lazy",decoding:"async",onClick:m[2]||(m[2]=e.withModifiers(()=>{},["stop"]))})]),_:1})],2))}}),rt=l._export_sfc(st,[["__scopeId","data-v-c9c7f7c8"]]),ct={class:"art-skeleton","aria-hidden":"true"},it={key:0,class:"art-skeleton__group"},ut={class:"art-skeleton__task"},dt={class:"art-skeleton__name"},ft=e.defineComponent({name:"ChatArtifactsSkeleton",__name:"ChatArtifactsSkeleton",props:{blocks:{default:2},rows:{default:2},groupHead:{type:Boolean,default:!1}},setup(c){const N=["42%","54%","34%","48%"],r=["58%","44%","66%","50%"],h=d=>N[d%N.length],p=d=>r[d%r.length];return(d,u)=>(e.openBlock(),e.createElementBlock("div",ct,[c.groupHead?(e.openBlock(),e.createElementBlock("div",it,[...u[0]||(u[0]=[e.createElementVNode("span",{class:"mf-skeleton-row art-skeleton__chevron"},null,-1),e.createElementVNode("span",{class:"mf-skeleton-row art-skeleton__group-name"},null,-1),e.createElementVNode("span",{class:"mf-skeleton-row art-skeleton__group-count"},null,-1)])])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.blocks,_=>(e.openBlock(),e.createElementBlock("div",{key:_,class:"art-skeleton__block"},[e.createElementVNode("div",ut,[u[1]||(u[1]=e.createElementVNode("span",{class:"mf-skeleton-row art-skeleton__spark"},null,-1)),e.createElementVNode("span",{class:"mf-skeleton-row art-skeleton__task-name",style:e.normalizeStyle({width:N[(_+1)%N.length]})},null,4)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.rows,f=>(e.openBlock(),e.createElementBlock("div",{key:f,class:"art-skeleton__row"},[u[3]||(u[3]=e.createElementVNode("span",{class:"art-skeleton__lead"},[e.createElementVNode("span",{class:"mf-skeleton-row art-skeleton__icon"})],-1)),e.createElementVNode("span",dt,[e.createElementVNode("span",{class:"mf-skeleton-row art-skeleton__bar art-skeleton__bar--name",style:e.normalizeStyle({width:h(f-1)})},null,4),u[2]||(u[2]=e.createElementVNode("span",{class:"mf-skeleton-row art-skeleton__bar art-skeleton__bar--meta"},null,-1))]),e.createElementVNode("span",{class:"mf-skeleton-row art-skeleton__cell art-skeleton__cell--kind",style:e.normalizeStyle({width:p(f)})},null,4),e.createElementVNode("span",{class:"mf-skeleton-row art-skeleton__cell art-skeleton__cell--time",style:e.normalizeStyle({width:p(f+1)})},null,4),u[4]||(u[4]=e.createElementVNode("span",{class:"mf-skeleton-row art-skeleton__cell art-skeleton__cell--size"},null,-1)),u[5]||(u[5]=e.createElementVNode("span",{class:"art-skeleton__cell--action"},null,-1))]))),128))]))),128))]))}}),pe=l._export_sfc(ft,[["__scopeId","data-v-6ca80140"]]),mt={class:"chat-my-files-artifacts__frame"},vt={class:"chat-my-files-artifacts__toolbar"},pt=["src"],_t={class:"chat-my-files-artifacts__filter",type:"button"},ht=["src"],kt={class:"chat-my-files-artifacts__search"},yt=["src"],gt={key:0,class:"chat-my-files-artifacts__progress",role:"status","aria-label":"正在加载 AI 产物"},wt={class:"chat-my-files-artifacts__table"},Et={key:0,class:"chat-my-files-artifacts__col chat-my-files-artifacts__col--owner"},Nt={key:0,class:"chat-my-files-artifacts__skeleton","data-testid":"artifact-first-load","aria-busy":"true"},bt=["aria-expanded","onClick"],Ct=["src"],At={class:"chat-my-files-artifacts__group-name"},Tt={class:"chat-my-files-artifacts__group-count"},Bt=["inert"],Vt={class:"chat-my-files-artifacts__group-clip"},St={class:"chat-my-files-artifacts__task-head"},Ft=["src"],It=["title"],Mt=["disabled","aria-busy","onClick"],xt={class:"chat-my-files-artifacts__sentinel-sheet"},Lt={class:"chat-my-files-artifacts__sr-only",role:"status"},Dt=["disabled","aria-busy"],L=6,Rt=3,_e=400,$t=e.defineComponent({name:"ChatMyFilesArtifacts",__name:"ChatMyFilesArtifacts",props:{cloud:{},actionsDisabled:{type:Boolean}},emits:["back","add-to-task"],setup(c,{emit:N}){const r=c,h=N,p=e.ref(""),d=e.ref("全部类型"),u=e.ref("updatedAt"),_=e.ref("desc"),f=e.ref(new Set),m=e.ref(new Set),S=l.useMyFilesToast();function k(t,a="info"){S==null||S(t,a)}const he=l.useChatContext(),{source:ke,open:ye,busy:ge,title:we,request:ne,confirm:Ee,close:Ne}=l.useFileTransfer({getCloud:()=>r.cloud,flash:k,sources:()=>he.transferSources.value,board:l.getMyFilesTransferQueue()}),q=l.injectChatAddToTask(),g=e.ref([]),w=e.ref(!1),D=e.ref(""),b=e.ref(!1),F=e.ref(new Set),le=e.ref(1),R=e.ref(!1),z=e.ref(!1),O=e.ref({});let I=0,W=0;const $=new Map,B=e.computed(()=>w.value&&g.value.length===0);function oe(){return r.cloud?g.value:l.artifactGroups}function se(t,a){const n=new Set(F.value);a?n.add(t):n.delete(t),F.value=n}function be(t){const a=(t.productCount??0)-t.files.length;return a>0?`还有 ${a} 个`:"加载更多"}async function M(t="replace"){const a=r.cloud;if(!a||t==="append"&&w.value)return;const n=++I,o=t==="append"?le.value+1:1;t==="replace"&&A&&(y.value=L,U.clear()),w.value=!0,D.value="",b.value=t==="append";try{const s=await l.fetchArtifactLibrary(a,{page:o,pageSize:l.ARTIFACT_SESSION_PAGE_SIZE,search:p.value.trim()});if(n!==I)return;const i=l.countArtifactSessions(g.value);g.value=t==="append"?l.mergeArtifactGroups(g.value,s):s;const v=l.countArtifactSessions(g.value)-i;le.value=o,t==="replace"&&(O.value={}),z.value=!1;const T=l.countArtifactSessions(s)>=l.ARTIFACT_SESSION_PAGE_SIZE;R.value=T&&(t==="replace"||v>0)}catch(s){if(n!==I)return;const i=s instanceof Error?s.message:"产物加载失败";g.value.length?t==="append"&&(z.value=!0):D.value=i,k(i,"error")}finally{n===I&&(w.value=!1,b.value=!1,X())}}function Ce(){M("replace")}async function Ae(t){const a=r.cloud;if(!a||w.value||F.value.has(t))return;const n=($.get(t)??0)+1;$.set(t,n);const o=I;se(t,!0);try{let s=O.value[t]??1,i=0;for(;i<5;){i+=1;const v=await l.fetchArtifactPage(a,t,s,l.ARTIFACT_FILE_PAGE_SIZE);if($.get(t)!==n||I!==o)return;const T=l.appendArtifactPage(g.value,t,v);if(g.value=T.groups,s+=1,O.value={...O.value,[t]:s},T.added>0||!T.hasMore)break}}catch(s){if($.get(t)!==n)return;k(s instanceof Error?s.message:"产物加载失败","error")}finally{$.get(t)===n&&se(t,!1)}}const Te=l.buildKindMenuItems(l.ARTIFACT_KIND_OPTIONS),{Menu:Be}=l.useUiDropdown({items:Te,placement:"bottom-start",width:140,selectedId:d,panelClass:l.KIND_MENU_PANEL_CLASS,onItemClick:({id:t})=>{Ve(t)&&(d.value=t)}});function Ve(t){return l.ARTIFACT_KIND_OPTIONS.includes(t)}function Se(t){if(!u.value)return t;const a=_.value==="asc"?1:-1;return[...t].sort((n,o)=>u.value==="name"?n.name.localeCompare(o.name,"zh")*a:(n.updatedAt-o.updatedAt)*a)}const C=e.computed(()=>{const t=r.cloud?"":p.value.trim().toLowerCase();return oe().map(a=>{const n=!!t&&a.name.toLowerCase().includes(t),o=a.sessions.map(s=>{const i=!!t&&s.title.toLowerCase().includes(t),v=Se(s.files.filter(T=>{const je=d.value==="全部类型"||T.kind===d.value,Ye=!t||T.name.toLowerCase().includes(t);return je&&(n||i||Ye)}));return{...s,files:v}}).filter(s=>s.files.length>0||s.hasMore===!0);return{...a,taskCount:a.taskCount??a.sessions.length,sessions:o}}).filter(a=>a.sessions.length>0)}),Fe=e.computed(()=>C.value.flatMap(t=>t.sessions.flatMap(a=>a.files.map(n=>l.artifactRowKey(a.id,n.id))))),j=e.computed(()=>Fe.value.filter(t=>m.value.has(t)).length),U=new Map,A=typeof IntersectionObserver<"u",H=e.ref(null),K=e.ref(null),y=e.ref(A?L:Number.POSITIVE_INFINITY);let E=null,Y=!1,G=0;const re=e.computed(()=>C.value.reduce((t,a)=>t+a.sessions.length,0)),V=e.computed(()=>re.value>y.value),ce=e.computed(()=>{if(!V.value)return C.value;let t=y.value;const a=[];for(const n of C.value){if(t<=0)break;const o=n.sessions.slice(0,t);t-=o.length,a.push({...n,sessions:o})}return a});function ie(){!r.cloud||!A||!R.value||w.value||B.value||re.value-y.value>Rt||M("append")}let Z=1;function Ie(){if(Z>0)return Z-=1,!0;const t=H.value,a=K.value;if(!t||!a)return!1;const n=a.getBoundingClientRect(),o=t.getBoundingClientRect();return n.top<o.bottom&&n.bottom>o.top}function ue(){if(A){if(V.value){y.value+=L;return}R.value&&!w.value&&!B.value&&Ie()&&M("append")}}function Me(){if(V.value){y.value+=L;return}M("append")}const xe=e.computed(()=>!A||z.value),Q=e.computed(()=>V.value||R.value);let J=0;function X(){!A||Y||(Y=!0,window.requestAnimationFrame(()=>{if(Y=!1,performance.now()<J)return;const t=K.value,a=H.value;if(!t||!a)return;const n=t.getBoundingClientRect(),o=a.getBoundingClientRect();n.top<o.bottom+240&&n.bottom>o.top-240&&ue()}))}function de(){window.clearTimeout(G),G=window.setTimeout(()=>{G=0,Q.value&&(Z=1,X())},_e+40)}function fe(){if(!A)return;E==null||E.disconnect();const t=K.value;t&&(E=new IntersectionObserver(a=>{if(a.some(n=>n.isIntersecting)){if(performance.now()<J){de();return}Z=1,ue(),ie()}},{root:H.value,rootMargin:"240px 0px"}),E.observe(t))}e.watch([p,d,u,_],()=>{A&&(y.value=L)}),e.watch([V,R,y],()=>{fe(),X(),ie()},{flush:"post"});const P=e.computed(()=>!!p.value.trim()||d.value!=="全部类型"),Le=e.computed(()=>P.value?"没有匹配的文件":"暂无 AI 产物"),De=e.computed(()=>P.value?"换个关键词或切换到「全部类型」试试,也可以清空筛选查看全部产物":"对话里生成的文件会收在这里,可以再加回任务继续使用"),Re=e.computed(()=>P.value?"清空筛选":"返回我的文件"),$e=e.computed(()=>!D.value&&(B.value||C.value.length>0)),ee=e.computed(()=>C.value.some(t=>t.sessions.some(a=>a.files.some(n=>!!n.owner))));function Pe(){if(!P.value){h("back");return}p.value="",d.value="全部类型"}function me(t){if(u.value!==t){u.value=t,_.value=t==="name"?"asc":"desc";return}_.value=_.value==="asc"?"desc":"asc"}function ve(t){return u.value!==t?"idle":_.value==="asc"?"asc":"desc"}function ze(t){var s;J=performance.now()+_e;const a=new Set(f.value),n=!a.has(t);n?a.add(t):a.delete(t);const o=n?((s=ce.value.find(i=>i.id===t))==null?void 0:s.sessions.length)??0:U.get(t)??0;n?U.set(t,o):U.delete(t),y.value=Math.max(L,y.value+(n?o:-o)),f.value=a,de()}function Oe(t){const a=new Set(m.value);a.has(t)?a.delete(t):a.add(t),m.value=a}const x=e.ref(null),Ue=e.ref("");function He(t,a){Ue.value=t,x.value=a}function Ke(t){const a=l.normalizeArtifactFileActionId(t);if(!a)return;const n=x.value;if(a==="add-task"){if(r.actionsDisabled===!0)return;n&&ae([l.artifactToResource(n)]);return}const o=l.fileTransferTargetOfAction(a);if(o){if(r.actionsDisabled===!0||!n)return;ne(o,[l.artifactToTransferItem(n)]);return}const s=l.resolveArtifactFileAction(t,{unavailable:!!r.cloud,disabled:r.actionsDisabled===!0});if(s){if(s.kind==="unavailable"){k(s.notice,"warning");return}s.kind==="notice"&&k(s.notice,"warning")}}function te(){m.value=new Set}function Ge(t){for(const a of oe())for(const n of a.sessions){const o=n.files.findIndex(s=>l.artifactRowKey(n.id,s.id)===t);if(o>=0)return{groupId:a.id,session:n,index:o}}}function Ze(t,a){const n=Ge(t);if(!n)return;const o=l.normalizeArtifactFileActionId(a);if(!o)return;const s=n.session.files[n.index];if(!s)return;if(o==="add-task"){if(r.actionsDisabled===!0)return;ae([l.artifactToResource(s)]);return}const i=l.fileTransferTargetOfAction(o);if(i){if(r.actionsDisabled===!0)return;ne(i,[l.artifactToTransferItem(s,n.session)]);return}const v=l.resolveArtifactFileAction(a,{unavailable:!!r.cloud,disabled:r.actionsDisabled===!0});if(v){if(v.kind==="unavailable"){k(v.notice,"warning");return}v.kind==="notice"&&k(v.notice,"warning")}}function ae(t){if(t.length!==0){if(q){q(t);return}h("add-to-task",t),k(l.ARTIFACT_FILE_ACTION_NOTICES["add-task"],"success")}}function qe(){return C.value.flatMap(t=>t.sessions.flatMap(a=>a.files.filter(n=>m.value.has(l.artifactRowKey(a.id,n.id))).map(n=>l.artifactToResource(n))))}function We(){if(r.actionsDisabled===!0)return;const t=qe();if(t.length!==0){if(!q){if(r.cloud){k(l.ARTIFACT_FILE_ACTIONS_UNAVAILABLE_NOTICE,"warning");return}k(`已添加 ${j.value} 个文件到任务`,"success"),te();return}ae(t),te()}}return e.watch(p,()=>{r.cloud&&(window.clearTimeout(W),W=window.setTimeout(()=>{M("replace")},300))}),e.onMounted(()=>{fe(),r.cloud&&M()}),e.onUnmounted(()=>{E==null||E.disconnect(),E=null,window.clearTimeout(W),window.clearTimeout(G)}),(t,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["chat-my-files-artifacts",{"has-selection":j.value>0}])},[e.createElementVNode("div",mt,[e.createElementVNode("header",vt,[e.createElementVNode("button",{class:"chat-my-files-artifacts__back",type:"button",onClick:a[0]||(a[0]=n=>h("back"))},[e.createElementVNode("img",{loading:"eager",decoding:"async",class:"chat-my-files-artifacts__back-glyph",src:e.unref(Qe),alt:""},null,8,pt),a[5]||(a[5]=e.createElementVNode("span",null,"返回我的文件",-1))]),e.createVNode(e.unref(Be),null,{"item-icon":e.withCtx(({item:n})=>[e.createVNode(l._sfc_main,{kind:n.id},null,8,["kind"])]),default:e.withCtx(()=>[e.createElementVNode("button",_t,[e.createElementVNode("span",null,e.toDisplayString(d.value),1),e.createElementVNode("img",{loading:"eager",decoding:"async",class:"chat-my-files-artifacts__filter-glyph",src:e.unref(l.chevronDownIcon),alt:""},null,8,ht)])]),_:1}),e.createElementVNode("label",kt,[e.createElementVNode("img",{loading:"eager",decoding:"async",class:"chat-my-files-artifacts__search-glyph",src:e.unref(l.searchIcon),alt:""},null,8,yt),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":a[1]||(a[1]=n=>p.value=n),type:"search",placeholder:"搜索文件、任务或工作空间",title:"搜索文件、任务或工作空间"},null,512),[[e.vModelText,p.value]])])]),w.value&&!b.value&&!B.value?(e.openBlock(),e.createElementBlock("div",gt)):e.createCommentVNode("",!0),e.createElementVNode("div",wt,[$e.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["chat-my-files-artifacts__head",{"has-owner":ee.value}])},[e.createElementVNode("button",{class:"chat-my-files-artifacts__sort chat-my-files-artifacts__sort--name",type:"button",onClick:a[2]||(a[2]=n=>me("name"))},[a[7]||(a[7]=e.createTextVNode(" 名称 ",-1)),(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["chat-my-files-artifacts__sort-glyph",`is-${ve("name")}`]),viewBox:"0 0 20 20","aria-hidden":"true"},[...a[6]||(a[6]=[e.createElementVNode("path",{class:"up",d:"M10 3.5 13.5 8H6.5Z"},null,-1),e.createElementVNode("path",{class:"down",d:"M10 16.5 6.5 12h7Z"},null,-1)])],2))]),a[10]||(a[10]=e.createElementVNode("span",{class:"chat-my-files-artifacts__col chat-my-files-artifacts__col--kind"},"类型",-1)),ee.value?(e.openBlock(),e.createElementBlock("span",Et,"更新人")):e.createCommentVNode("",!0),e.createElementVNode("button",{class:"chat-my-files-artifacts__sort chat-my-files-artifacts__sort--time",type:"button",onClick:a[3]||(a[3]=n=>me("updatedAt"))},[a[9]||(a[9]=e.createTextVNode(" 更新时间 ",-1)),(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["chat-my-files-artifacts__sort-glyph",`is-${ve("updatedAt")}`]),viewBox:"0 0 20 20","aria-hidden":"true"},[...a[8]||(a[8]=[e.createElementVNode("path",{class:"up",d:"M10 3.5 13.5 8H6.5Z"},null,-1),e.createElementVNode("path",{class:"down",d:"M10 16.5 6.5 12h7Z"},null,-1)])],2))]),a[11]||(a[11]=e.createElementVNode("span",{class:"chat-my-files-artifacts__col chat-my-files-artifacts__col--size"},"大小",-1)),a[12]||(a[12]=e.createElementVNode("span",{class:"chat-my-files-artifacts__col chat-my-files-artifacts__col--action"},"操作",-1))],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"bodyRef",ref:H,class:"chat-my-files-artifacts__body"},[B.value?(e.openBlock(),e.createElementBlock("div",Nt,[e.createVNode(pe,{"group-head":"",blocks:2,rows:3}),a[13]||(a[13]=e.createElementVNode("p",{class:"chat-my-files-artifacts__sr-only",role:"status"},"正在加载 AI 产物",-1))])):D.value?(e.openBlock(),e.createBlock(l.ChatMyFilesState,{key:1,class:"chat-my-files-artifacts__state",tone:"error",variant:"error",title:"产物加载失败",description:D.value,"action-text":"重新加载",onAction:Ce},null,8,["description"])):C.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(l.ChatMyFilesState,{key:2,class:"chat-my-files-artifacts__state",variant:P.value?"search":"files",title:Le.value,description:De.value,"action-text":Re.value,onAction:Pe},null,8,["variant","title","description","action-text"])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ce.value,n=>(e.openBlock(),e.createElementBlock("section",{key:n.id,class:"chat-my-files-artifacts__group"},[e.createElementVNode("button",{class:"chat-my-files-artifacts__group-head",type:"button","aria-expanded":!f.value.has(n.id),onClick:o=>ze(n.id)},[e.createElementVNode("img",{loading:"lazy",decoding:"async",class:e.normalizeClass(["chat-my-files-artifacts__chevron",{"is-open":!f.value.has(n.id)}]),src:e.unref(l.chevronDownIcon),alt:""},null,10,Ct),e.createElementVNode("span",At,e.toDisplayString(n.name),1),e.createElementVNode("em",Tt,e.toDisplayString(n.taskCount)+"个任务",1)],8,bt),e.createElementVNode("div",{class:e.normalizeClass(["chat-my-files-artifacts__group-body",{"is-collapsed":f.value.has(n.id)}]),inert:f.value.has(n.id)||void 0},[e.createElementVNode("div",Vt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.sessions,(o,s)=>(e.openBlock(),e.createElementBlock("div",{key:o.id,class:"chat-my-files-artifacts__task",style:e.normalizeStyle({"--mf-stagger":s})},[e.createElementVNode("div",St,[e.createElementVNode("img",{loading:"lazy",decoding:"async",class:"chat-my-files-artifacts__spark",src:e.unref(l.sparkIcon),alt:""},null,8,Ft),e.createElementVNode("span",{title:o.title},e.toDisplayString(o.title),9,It)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.files,i=>(e.openBlock(),e.createBlock(rt,{key:e.unref(l.artifactRowKey)(o.id,i.id),file:i,selected:m.value.has(e.unref(l.artifactRowKey)(o.id,i.id)),"show-owner":ee.value,"actions-disabled":c.actionsDisabled,onToggle:v=>Oe(e.unref(l.artifactRowKey)(o.id,i.id)),onOpen:v=>He(e.unref(l.artifactRowKey)(o.id,i.id),i),onAction:v=>Ze(e.unref(l.artifactRowKey)(o.id,i.id),v)},null,8,["file","selected","show-owner","actions-disabled","onToggle","onOpen","onAction"]))),128)),c.cloud&&o.hasMore?(e.openBlock(),e.createElementBlock("button",{key:0,class:"chat-my-files-artifacts__more",type:"button","data-testid":"artifact-file-more",disabled:F.value.has(o.id),"aria-busy":F.value.has(o.id),onClick:i=>Ae(o.id)},e.toDisplayString(F.value.has(o.id)?"加载中":be(o)),9,Mt)):e.createCommentVNode("",!0)],4))),128))])],10,Bt)]))),128)),c.cloud&&Q.value&&!B.value?(e.openBlock(),e.createElementBlock("div",{key:3,ref_key:"sentinelRef",ref:K,class:e.normalizeClass(["chat-my-files-artifacts__sentinel",{"is-loading":b.value}])},[e.createElementVNode("div",xt,[b.value?(e.openBlock(),e.createBlock(pe,{key:0,blocks:1,rows:1})):e.createCommentVNode("",!0)])],2)):e.createCommentVNode("",!0),e.createElementVNode("p",Lt,e.toDisplayString(b.value?"正在加载更多 AI 产物":""),1),c.cloud&&Q.value&&!B.value&&xe.value?(e.openBlock(),e.createElementBlock("button",{key:4,class:"chat-my-files-artifacts__sessions-more",type:"button","data-testid":"artifact-session-more",disabled:w.value&&!V.value,"aria-busy":b.value,onClick:Me},e.toDisplayString(b.value?"加载中":z.value?"重新加载":V.value?"显示更多任务":"加载更多会话"),9,Dt)):e.createCommentVNode("",!0)],512)]),e.createVNode(l._sfc_main$1,{count:j.value,onClear:te,onAddTask:We},null,8,["count"]),x.value?(e.openBlock(),e.createBlock(l.ChatArtifactPreview,{key:x.value.id,file:x.value,cloud:c.cloud,"actions-disabled":c.actionsDisabled,onClose:a[4]||(a[4]=n=>x.value=null),onAction:Ke},null,8,["file","cloud","actions-disabled"])):e.createCommentVNode("",!0),e.createVNode(l.ChatFilePickerDialog,{source:e.unref(ke),open:e.unref(ye),mode:"target",title:e.unref(we),busy:e.unref(ge),"onUpdate:open":e.unref(Ne),onConfirm:e.unref(Ee)},null,8,["source","open","title","busy","onUpdate:open","onConfirm"])])],2))}}),Pt=l._export_sfc($t,[["__scopeId","data-v-13517c8c"]]);exports.default=Pt;
|