Repository navigation
[6212] Chat 标签页附件上传:%chat 协议 v2 字段与附件 UI - #4718
Closed
PinkMagicFly wants to merge 5 commits into
Closed
PinkMagicFly wants to merge 5 commits into
PinkMagicFly wants to merge 5 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
任务
6212:Chat 标签页附件上传。任务文档见 dev-agent PR:https://github.com/LiiiLabs/dev-agent/pull/121
What
<chat-input>记录新增images/attachments两字段;chat-input->json输出两个顶层数组(空表恒输出空数组,字段恒在);chat-tab-tree->plain-text先剥离 image 节点再 LaTeX 序列化;chat-tab-send扩展为 8 参单入口(尾参 images/attachments,二进制与 scheme 插件同包发布,不留旧 arity 兼容入口)。make_toggle_btn样式,非 checkable),点击打开文件多选;附件以 chips 展示在输入框外部上方,左对齐贴合(每行 QHBoxLayout + 行尾 stretch)、一行放不下向上换行叠加,chip 含文件名 + 大小 + ✕ 删除;隐藏态换行宽度取父容器 inputArea 宽度(修复首次多选时 chips 竖向叠加)。onSendRequested经chat-tab-send下发 attachments alist 数组(每项 path/filename/size),发送成功后清空 chips,失败保留;附件状态由面板唯一持有(不持久化到 manifest),Generating 态禁用 📎。验证
xmake r qt_chat_controller_test:37/37 通过(预检白名单/数量/总大小边界)xmake r qt_chat_tab_widget_test:135/135 通过(附件大小格式化等)xmake r chat-protocol-test:21/21 通过(协议 v2 JSON 编码、图片剥离、附件下发)xmake r chat-tree-ops-test/chat-list-test:3/3、91/91 无回归gf fmt --check全仓通过