agent: Make token indicator not flash if last count tokens request failed (#29628)
Release Notes: - N/A
This commit is contained in:
parent
d7004030b3
commit
1a4d7249f6
@ -1138,14 +1138,14 @@ impl MessageEditor {
|
|||||||
Some(0)
|
Some(0)
|
||||||
};
|
};
|
||||||
|
|
||||||
if let Some(token_count) = token_count {
|
this.update(cx, |this, cx| {
|
||||||
this.update(cx, |this, cx| {
|
if let Some(token_count) = token_count {
|
||||||
this.last_estimated_token_count = Some(token_count);
|
this.last_estimated_token_count = Some(token_count);
|
||||||
cx.emit(MessageEditorEvent::EstimatedTokenCount);
|
cx.emit(MessageEditorEvent::EstimatedTokenCount);
|
||||||
this.update_token_count_task.take();
|
}
|
||||||
})
|
this.update_token_count_task.take();
|
||||||
.ok();
|
})
|
||||||
}
|
.ok();
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user