Skip to content

[6230] 附件菜单过滤已添加文件并新增已添加子菜单 - #4760

Merged
PinkMagicFly merged 2 commits into
mainfrom
pigmagicfly/6230/attach-menu-recents-filter
Oct 26, 2026
Merged

PinkMagicFly merged 2 commits into
mainfrom
pigmagicfly/6230/attach-menu-recents-filter

Conversation

@PinkMagicFly

@PinkMagicFly PinkMagicFly commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

任务

6230:LLM 对话附件菜单需要反映当前会话已添加的附件,并避免失效最近文件造成误操作。

任务文档 PR:LiiiLabs/dev-agent#243

改动

  • 已加入当前会话附件的文件从附件菜单 Recents 中过滤;过滤只发生在 AttachMenuBridge 展示层,不修改 go-menu-meta、全局最近列表或标题栏 Go 菜单。
  • 「选择文件」上方新增「已添加」子按钮,点击展开当前会话附件列表,再次点击收起;无附件时不显示。
  • AttachmentItem 新增 sourcePath,文档转换为临时 PDF 后仍按原文件路径匹配 Recents。
  • 附件菜单过滤磁盘上已不存在的 Recents,避免选中失效的 /tmp 等路径;右上角最近菜单的既有清理逻辑不变。
  • 展开/收起时由 QML 将目标尺寸传给桥接,外层 Popup 同步调整高度并保持底边锚定,修复多项附件被裁切的问题。

验证

  • xmake b stem:通过
  • xmake install --yes stem:通过
  • xmake r attach_menu_bridge_test:6/6 通过
  • xmake r qt_chat_controller_test:41/41 通过
    • 覆盖真实 ChatController + AttachMenuBridge 的 attached 数据
    • 覆盖 4 个附件时 Popup 展开增高、底边不动、收起恢复
  • xmake r qt_chat_tab_widget_test:138/138 通过
  • xmake r qml_load_test:40/40 通过(一次运行中 hover 动画用例偶发失败,随后全量复跑通过)
  • gf fmt --check、git diff --check:通过

手动验证

用户已实际确认「已添加」子按钮与子菜单可以显示,并反馈了展开后列表裁切的问题;该问题已补充修复及真实 Popup 自动化回归。修复后的完整 GUI 复验仍待确认。

🤖 Generated with Claude Code

@MoonL79 MoonL79 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@PinkMagicFly
PinkMagicFly merged commit 6ecb2c0 into main Oct 26, 2026
5 of 6 checks passed
@PinkMagicFly
PinkMagicFly deleted the pigmagicfly/6230/attach-menu-recents-filter branch October 26, 2026 03:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants