fix: fixed git handling
This commit is contained in:
@@ -441,13 +441,13 @@ impl App {
|
||||
if self.selected_project.is_none() {
|
||||
return;
|
||||
}
|
||||
let prompt = self.composer.trim().to_owned();
|
||||
let prompt = self.composer.text().trim().to_owned();
|
||||
if prompt.is_empty() {
|
||||
return;
|
||||
}
|
||||
#[cfg(target_os = "macos")]
|
||||
if prompt == "/compact" {
|
||||
self.composer.clear();
|
||||
self.composer = text_editor::Content::new();
|
||||
if self.generating {
|
||||
self.manual_compaction_queued = true;
|
||||
self.activity = Some("Compaction queued for the next safe point…".into());
|
||||
@@ -460,7 +460,7 @@ impl App {
|
||||
}
|
||||
if self.generating {
|
||||
self.queued_inputs.push_back(prompt);
|
||||
self.composer.clear();
|
||||
self.composer = text_editor::Content::new();
|
||||
self.activity = Some(format!(
|
||||
"{} queued input{}",
|
||||
self.queued_inputs.len(),
|
||||
@@ -689,7 +689,7 @@ impl App {
|
||||
self.conversation.push(ChatMessage::from(message));
|
||||
}
|
||||
assistant.reasoning_open = assistant_reasoning;
|
||||
self.composer.clear();
|
||||
self.composer = text_editor::Content::new();
|
||||
self.conversation.push(user);
|
||||
self.conversation.push(assistant);
|
||||
self.generating = true;
|
||||
@@ -1167,7 +1167,7 @@ impl App {
|
||||
}
|
||||
if let Some(prompt) = queued_prompt(self.queued_inputs.drain(..)) {
|
||||
self.finish_turn_summary();
|
||||
self.composer = prompt;
|
||||
self.composer = text_editor::Content::with_text(&prompt);
|
||||
self.start_generation();
|
||||
}
|
||||
}
|
||||
@@ -1588,7 +1588,7 @@ impl App {
|
||||
match request.pending {
|
||||
PendingContinuation::None => self.start_next_queued(),
|
||||
PendingContinuation::User(prompt) => {
|
||||
self.composer = prompt;
|
||||
self.composer = text_editor::Content::with_text(&prompt);
|
||||
self.skip_compaction_once = true;
|
||||
self.start_generation();
|
||||
}
|
||||
@@ -1608,8 +1608,8 @@ impl App {
|
||||
Err(error) => {
|
||||
self.generating = false;
|
||||
if let PendingContinuation::User(prompt) = request.pending {
|
||||
if self.composer.trim().is_empty() {
|
||||
self.composer = prompt;
|
||||
if self.composer.text().trim().is_empty() {
|
||||
self.composer = text_editor::Content::with_text(&prompt);
|
||||
} else {
|
||||
self.queued_inputs.push_front(prompt);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user