Agent panel message editing checkpoint
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
This commit is contained in:
parent
2658b2801e
commit
5ac874ab31
6 changed files with 765 additions and 100 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
@ -249,6 +249,7 @@ dependencies = [
|
||||||
"prompt_store",
|
"prompt_store",
|
||||||
"proto",
|
"proto",
|
||||||
"rand 0.8.5",
|
"rand 0.8.5",
|
||||||
|
"regex",
|
||||||
"release_channel",
|
"release_channel",
|
||||||
"rope",
|
"rope",
|
||||||
"rules_library",
|
"rules_library",
|
||||||
|
|
|
@ -68,6 +68,7 @@ picker.workspace = true
|
||||||
project.workspace = true
|
project.workspace = true
|
||||||
prompt_store.workspace = true
|
prompt_store.workspace = true
|
||||||
proto.workspace = true
|
proto.workspace = true
|
||||||
|
regex.workspace = true
|
||||||
release_channel.workspace = true
|
release_channel.workspace = true
|
||||||
rope.workspace = true
|
rope.workspace = true
|
||||||
rules_library.workspace = true
|
rules_library.workspace = true
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -9,7 +9,6 @@ use agent_servers::AgentServer;
|
||||||
use db::kvp::{Dismissable, KEY_VALUE_STORE};
|
use db::kvp::{Dismissable, KEY_VALUE_STORE};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use crate::NewExternalAgentThread;
|
|
||||||
use crate::agent_diff::AgentDiffThread;
|
use crate::agent_diff::AgentDiffThread;
|
||||||
use crate::message_editor::{MAX_EDITOR_LINES, MIN_EDITOR_LINES};
|
use crate::message_editor::{MAX_EDITOR_LINES, MIN_EDITOR_LINES};
|
||||||
use crate::ui::NewThreadButton;
|
use crate::ui::NewThreadButton;
|
||||||
|
@ -31,6 +30,7 @@ use crate::{
|
||||||
thread_history::{HistoryEntryElement, ThreadHistory},
|
thread_history::{HistoryEntryElement, ThreadHistory},
|
||||||
ui::{AgentOnboardingModal, EndTrialUpsell},
|
ui::{AgentOnboardingModal, EndTrialUpsell},
|
||||||
};
|
};
|
||||||
|
use crate::{EditAssistantMessage, EditUserMessage, NewExternalAgentThread};
|
||||||
use agent::{
|
use agent::{
|
||||||
Thread, ThreadError, ThreadEvent, ThreadId, ThreadSummary, TokenUsageRatio,
|
Thread, ThreadError, ThreadEvent, ThreadId, ThreadSummary, TokenUsageRatio,
|
||||||
context_store::ContextStore,
|
context_store::ContextStore,
|
||||||
|
@ -3222,6 +3222,20 @@ impl Render for AgentPanel {
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
.on_action(cx.listener(Self::toggle_burn_mode))
|
.on_action(cx.listener(Self::toggle_burn_mode))
|
||||||
|
// .on_action(cx.listener(|this, _: &EditAssistantMessage, window, cx| {
|
||||||
|
// if let ActiveView::Thread { thread, .. } = &this.active_view {
|
||||||
|
// thread.update(cx, |this, cx| {
|
||||||
|
// this.edit_last_message(Role::Assistant, window, cx);
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// }))
|
||||||
|
// .on_action(cx.listener(|this, _: &EditUserMessage, window, cx| {
|
||||||
|
// if let ActiveView::Thread { thread, .. } = &this.active_view {
|
||||||
|
// thread.update(cx, |this, cx| {
|
||||||
|
// this.edit_last_message(Role::User, window, cx);
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// }))
|
||||||
.child(self.render_toolbar(window, cx))
|
.child(self.render_toolbar(window, cx))
|
||||||
.children(self.render_onboarding(window, cx))
|
.children(self.render_onboarding(window, cx))
|
||||||
.children(self.render_trial_end_upsell(window, cx))
|
.children(self.render_trial_end_upsell(window, cx))
|
||||||
|
|
|
@ -123,6 +123,8 @@ actions!(
|
||||||
ContinueWithBurnMode,
|
ContinueWithBurnMode,
|
||||||
/// Toggles burn mode for faster responses.
|
/// Toggles burn mode for faster responses.
|
||||||
ToggleBurnMode,
|
ToggleBurnMode,
|
||||||
|
EditAssistantMessage,
|
||||||
|
EditUserMessage,
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@ actions!(
|
||||||
Cancel,
|
Cancel,
|
||||||
/// Confirms the selected menu item.
|
/// Confirms the selected menu item.
|
||||||
Confirm,
|
Confirm,
|
||||||
|
SaveEdit,
|
||||||
/// Performs secondary confirmation action.
|
/// Performs secondary confirmation action.
|
||||||
SecondaryConfirm,
|
SecondaryConfirm,
|
||||||
/// Selects the previous item in the menu.
|
/// Selects the previous item in the menu.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue