mirror of
https://github.com/zed-industries/zed.git
synced 2026-05-31 19:05:00 +07:00
agent_ui: Fix collapsing bug with thinking blocks in auto-mode (#52916)
Quick follow up to https://github.com/zed-industries/zed/pull/52874 where expanded thinking blocks, when in auto-mode, wouldn't collapse again. Release Notes: - N/A
This commit is contained in:
parent
2a15bf630d
commit
ed97a043a1
1 changed files with 5 additions and 2 deletions
|
|
@ -5207,9 +5207,12 @@ impl ThreadView {
|
||||||
|
|
||||||
match thinking_display {
|
match thinking_display {
|
||||||
ThinkingBlockDisplay::Auto => {
|
ThinkingBlockDisplay::Auto => {
|
||||||
if self.expanded_thinking_blocks.contains(&key) {
|
let is_open = self.expanded_thinking_blocks.contains(&key)
|
||||||
|
|| self.user_toggled_thinking_blocks.contains(&key);
|
||||||
|
|
||||||
|
if is_open {
|
||||||
self.expanded_thinking_blocks.remove(&key);
|
self.expanded_thinking_blocks.remove(&key);
|
||||||
self.user_toggled_thinking_blocks.insert(key);
|
self.user_toggled_thinking_blocks.remove(&key);
|
||||||
} else {
|
} else {
|
||||||
self.expanded_thinking_blocks.insert(key);
|
self.expanded_thinking_blocks.insert(key);
|
||||||
self.user_toggled_thinking_blocks.insert(key);
|
self.user_toggled_thinking_blocks.insert(key);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue