agent: Prevent sending whitespace only messages (#28409)
Prevent this from happening when sending a prompt with only spaces and newlines:  Release Notes: - agent: Prevent from sending messages containing only white space.
This commit is contained in:
parent
324e4658ba
commit
12212dc329
1 changed files with 1 additions and 1 deletions
|
@ -201,7 +201,7 @@ impl MessageEditor {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn is_editor_empty(&self, cx: &App) -> bool {
|
fn is_editor_empty(&self, cx: &App) -> bool {
|
||||||
self.editor.read(cx).text(cx).is_empty()
|
self.editor.read(cx).text(cx).trim().is_empty()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn is_model_selected(&self, cx: &App) -> bool {
|
fn is_model_selected(&self, cx: &App) -> bool {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue