feat(chat): add delete action to dock file list rows - #309
Open
chujieHong wants to merge 1 commit into
Open
Conversation
Each file row in the chat dock "modified files" panel now has a delete
button (Trash2 icon, danger hover) to the left of the download button,
with a Popconfirm guard since deletion is irreversible.
- Calls the existing DELETE /agents/{id}/workspace/file endpoint
- Deleted paths are hidden via a canonical-key set (the list itself is
message-derived and would otherwise keep showing them)
- The file's open viewer tab is closed after deletion (same tab id
function as openFileAt, so no mismatch)
- 404 during delete treats the file as already gone and hides the row
- Button styles shared with the download button; hover-reveal behavior
extended to both actions
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.
Each file row in the chat dock "modified files" panel now has a delete button (Trash2 icon, danger hover) to the left of the download button, with a Popconfirm guard since deletion is irreversible.
Summary
在专家聊天「已修改文件」面板的每行文件上,下载按钮左侧新增删除按钮(Trash2 图标、危险色 hover),点击弹 Popconfirm 二次确认后调用既有 DELETE /workspace/file 接口真实删除文件
删除后文件从列表消失(通过 canonical-key 集合过滤)、自动关闭该文件打开的查看器标签页;404 视为已删除并提示
改动 5 个前端文件:ChatDockFileList.tsx、ChatDockPanel.tsx、chatBrowserPanel.partial.less、中英文 locale
Target branch
develop(feature / fix — default)main(release/*orhotfix/*only)Type of change
Test plan
make allpasses locallyChecklist
CHANGELOG.md(if user-facing)