agentscope-ai / agentscope-ai/QwenPaw
[Feature]: 网页控台发送文件后自动折叠误导用户
- Dominant language
- TypeScript
- Stars
- 35k
- Forks
- 3.1k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 228
Description
## QwenPaw Version
QwenPaw 2.2.1。
## Description
Agent 使用 `send_file_to_user` 成功发送文件后,文件结果目前只显示在思考/工具步骤中。会话结束后工具步骤默认折叠,用户需要手动展开才能找到文件。
希望将成功发送的文件直接展示在助手回复正文区域,提供清晰的文件卡片,让用户可以直接预览和下载,不需要展开工具调用详情。
**Related PR(s):** 暂无
**Security considerations:** 文件预览和下载应继续遵守现有认证、Runtime 隔离及文件访问权限。
## Component(s) Affected
- [ ] Core / Backend (app, agents, config, providers, utils, local_models)
- [x] Console (frontend web UI)
- [ ] Channels (DingTalk, Feishu, QQ, Discord, iMessage, etc.)
- [ ] Skills
- [ ] CLI
- [ ] Documentation (website)
- [x] Tests
- [ ] CI/CD
- [ ] Scripts / Deploy
## Environment
- **QwenPaw version:** 2.2.1
- **OS:** Ubuntu Linux 6.8,x86_64
- **Install method:** pip 安装 Hub,个人 Runtime 使用 Docker
- **Python version (if applicable):** Python 3.12
## Steps to Reproduce
1. 打开 Web Console,并保持默认的助手消息折叠设置。
2. 让 Agent 调用 `send_file_to_user` 发送一个文件。
3. 等待本轮会话结束。
4. 文件入口只存在于默认折叠的“已完成 N 个步骤”中,正文区域没有可见附件。
## Actual vs Expected
- **Actual:** 用户必须展开思考/工具步骤,才能找到 Agent 发送的文件并进行预览或下载。
- **Expected:** `send_file_to_user` 成功后,文件卡片直接显示在助手回复正文区域,用户可以立即预览和下载;工具调用参数和执行详情仍可保留在折叠步骤中。
## Logs / Screenshots
该问题主要是前端展示问题,没有相关后端错误日志。
```text
当前:助手正文 → 已完成 N 个步骤(展开后才能看到文件)
期望:助手正文 → 可见的文件卡片(预览 / 下载)
```
## Additional Notes
建议成功附件卡片至少包含:
- 文件名和文件类型。
- 预览按钮。
- 下载按钮。
- 发送失败或取消时不显示成功附件。
附件卡片应独立于思考/工具步骤的展开状态,并覆盖文本、图片、音频、视频及普通文件。
Contributor guide
Research direction
Start at the Web Console entry point that renders successful send_file_to_user results, then trace the existing preview, download, authentication, Runtime isolation, and file-access permission behavior. Run the relevant frontend tests for assistant messages and file attachments. Done means successful text, image, audio, video, and ordinary-file sends render independent cards with preview and download actions, while failed or cancelled sends do not.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend, testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100