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:
@@ -201,7 +201,7 @@ impl MessageEditor {
|
||||
}
|
||||
|
||||
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 {
|
||||
|
||||
Reference in New Issue
Block a user