mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-04 10:12:47 +00:00
Add low_tokens_remaining
case to the assistant
This commit is contained in:
parent
d6112e4a59
commit
77b120323b
2 changed files with 3 additions and 0 deletions
|
@ -2060,6 +2060,8 @@ impl ConversationEditor {
|
|||
let remaining_tokens = self.conversation.read(cx).remaining_tokens()?;
|
||||
let remaining_tokens_style = if remaining_tokens <= 0 {
|
||||
&style.no_remaining_tokens
|
||||
} else if remaining_tokens <= 500 {
|
||||
&style.low_remaining_tokens
|
||||
} else {
|
||||
&style.remaining_tokens
|
||||
};
|
||||
|
|
|
@ -1027,6 +1027,7 @@ pub struct AssistantStyle {
|
|||
pub system_sender: Interactive<ContainedText>,
|
||||
pub model: Interactive<ContainedText>,
|
||||
pub remaining_tokens: ContainedText,
|
||||
pub low_remaining_tokens: ContainedText,
|
||||
pub no_remaining_tokens: ContainedText,
|
||||
pub error_icon: Icon,
|
||||
pub api_key_editor: FieldEditor,
|
||||
|
|
Loading…
Reference in a new issue