fix: fixed git handling
This commit is contained in:
22
src/app.rs
22
src/app.rs
@@ -99,7 +99,7 @@ pub(crate) struct App {
|
||||
pending_project_path: Option<PathBuf>,
|
||||
project_name_input: String,
|
||||
model_download: ModelDownload,
|
||||
pub(super) composer: String,
|
||||
pub(super) composer: text_editor::Content,
|
||||
pub(super) queued_inputs: VecDeque<String>,
|
||||
pub(super) conversation: Vec<ChatMessage>,
|
||||
/// Follow appended chat content until the user scrolls away from the tail.
|
||||
@@ -172,7 +172,7 @@ pub(crate) struct App {
|
||||
struct ChatSnapshot {
|
||||
selected_project: Option<i32>,
|
||||
selected_session: Option<i32>,
|
||||
composer: String,
|
||||
composer: text_editor::Content,
|
||||
queued_inputs: VecDeque<String>,
|
||||
conversation: Vec<ChatMessage>,
|
||||
chat_follow_tail: bool,
|
||||
@@ -418,7 +418,7 @@ pub(crate) enum Message {
|
||||
CancelDeleteArtifact,
|
||||
StopModelDownload,
|
||||
DownloadProgressTick,
|
||||
ComposerChanged(String),
|
||||
ComposerAction(text_editor::Action),
|
||||
TranscriptAction(usize, text_editor::Action),
|
||||
ToggleReasoning(usize),
|
||||
OpenLink(markdown::Uri),
|
||||
@@ -554,7 +554,7 @@ impl App {
|
||||
pending_project_path: None,
|
||||
project_name_input: String::new(),
|
||||
model_download: ModelDownload::Idle,
|
||||
composer: String::new(),
|
||||
composer: text_editor::Content::new(),
|
||||
queued_inputs: VecDeque::new(),
|
||||
conversation: Vec::new(),
|
||||
chat_follow_tail: true,
|
||||
@@ -698,7 +698,7 @@ impl App {
|
||||
pending_project_path: None,
|
||||
project_name_input: String::new(),
|
||||
model_download: ModelDownload::Idle,
|
||||
composer: String::new(),
|
||||
composer: text_editor::Content::new(),
|
||||
queued_inputs: VecDeque::new(),
|
||||
conversation: Vec::new(),
|
||||
chat_follow_tail: true,
|
||||
@@ -1466,7 +1466,7 @@ impl App {
|
||||
}
|
||||
}
|
||||
Message::DownloadProgressTick => self.update_download_progress(),
|
||||
Message::ComposerChanged(value) => self.composer = value,
|
||||
Message::ComposerAction(action) => self.composer.perform(action),
|
||||
Message::TranscriptAction(index, action) => {
|
||||
if !action.is_edit()
|
||||
&& let Some(message) = self.conversation.get_mut(index)
|
||||
@@ -1505,11 +1505,11 @@ impl App {
|
||||
.action(&surface_id, &component_id, context_path.as_deref())
|
||||
{
|
||||
Ok(action) => {
|
||||
self.composer = format!(
|
||||
self.composer = text_editor::Content::with_text(&format!(
|
||||
"A2UI client event:\n{}\nA2UI client metadata:\n{}",
|
||||
serde_json::to_string(&action).unwrap_or_default(),
|
||||
self.a2ui.client_metadata()
|
||||
);
|
||||
));
|
||||
self.chat_follow_tail = true;
|
||||
self.start_generation();
|
||||
return scroll_chat_to_end();
|
||||
@@ -1809,7 +1809,7 @@ impl App {
|
||||
self.conversation.clear();
|
||||
self.context_notice = None;
|
||||
self.clear_a2ui();
|
||||
self.composer.clear();
|
||||
self.composer = text_editor::Content::new();
|
||||
self.queued_inputs.clear();
|
||||
self.system_prompt_seen_at = 0;
|
||||
self.context_used = 0;
|
||||
@@ -2036,7 +2036,7 @@ impl App {
|
||||
format!("Could not restore some A2UI history: {}", errors.join("; "))
|
||||
});
|
||||
self.sync_a2ui_renderer_state();
|
||||
self.composer.clear();
|
||||
self.composer = text_editor::Content::new();
|
||||
self.remember_project(project_id);
|
||||
self.selected_session = Some(session_id);
|
||||
self.system_prompt_seen_at = 0;
|
||||
@@ -2110,7 +2110,7 @@ impl App {
|
||||
self.conversation.clear();
|
||||
self.context_notice = None;
|
||||
self.clear_a2ui();
|
||||
self.composer.clear();
|
||||
self.composer = text_editor::Content::new();
|
||||
self.queued_inputs.clear();
|
||||
self.system_prompt_seen_at = 0;
|
||||
self.context_used = 0;
|
||||
|
||||
Reference in New Issue
Block a user