Skip to content

agent_ui: Add button to delete all threads - #44244

Closed
linuxsoares wants to merge 1 commit into
zed-industries:mainfrom
linuxsoares:gilmar/add-remove-all-chats
Closed

agent_ui: Add button to delete all threads#44244
linuxsoares wants to merge 1 commit into
zed-industries:mainfrom
linuxsoares:gilmar/add-remove-all-chats

Conversation

@linuxsoares

Copy link
Copy Markdown

This pull request introduces a new "Remove All History" feature to the agent UI, allowing users to delete all history threads at once. The most important changes are grouped below:

Feature Implementation:

  • Added a new RemoveHistory action and handler to AcpThreadView, enabling the deletion of all history threads via history_store.delete_threads(cx) [1] [2].
  • Updated the UI to include a "Remove All" button in the recent history section, which dispatches the RemoveHistory action when clicked [1] [2].

Action Handling and Integration:

  • Registered the remove_all_history action handler in the main action dispatch for AcpThreadView to ensure the action is processed correctly.
  • Modified the construction of certain components to use project.clone() instead of project.downgrade() for consistency [1] [2].

Testing:

  • Added extensive tests for the "Remove All History" feature in both thread_view.rs and thread_history.rs, covering scenarios such as empty history, existing threads, button click, session preservation, and confirmation state resets [1] [2].
  • Included necessary test imports and setup helpers to facilitate the new test cases.

These changes collectively provide a robust and user-friendly way to clear all history threads from the agent UI, with thorough validation to ensure reliability.

@cla-bot

cla-bot Bot commented Dec 5, 2025

Copy link
Copy Markdown

We require contributors to sign our Contributor License Agreement, and we don't have @linuxsoares on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@zed-industries-bot

zed-industries-bot commented Dec 5, 2025

Copy link
Copy Markdown
Contributor
Warnings
⚠️

This PR is missing release notes.

Please add a "Release Notes" section that describes the change:

Release Notes:

- Added/Fixed/Improved ...

If your change is not user-facing, you can use "N/A" for the entry:

Release Notes:

- N/A

Generated by 🚫 dangerJS against ad41cca

@maxdeviant maxdeviant changed the title feat(zed): add remove all buttom to delete all llm chats agent_ui: Add button to delete all threads Dec 5, 2025
@danilo-leal

Copy link
Copy Markdown
Member

Hey, thanks for working on this! Curious how is this different from #43370?

@SomeoneToIgnore SomeoneToIgnore added the area:ai Related to Agent Panel, Edit Prediction, Copilot, or other AI features label Dec 6, 2025
@danilo-leal

Copy link
Copy Markdown
Member

I'll close this PR in the meantime; we already support this feature as per the linked PR above. Ping me if I'm missing anything here. Thank you!

@danilo-leal danilo-leal closed this Dec 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ai Related to Agent Panel, Edit Prediction, Copilot, or other AI features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants