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",
|
||||
"proto",
|
||||
"rand 0.8.5",
|
||||
"regex",
|
||||
"release_channel",
|
||||
"rope",
|
||||
"rules_library",
|
||||
|
|
|
@ -68,6 +68,7 @@ picker.workspace = true
|
|||
project.workspace = true
|
||||
prompt_store.workspace = true
|
||||
proto.workspace = true
|
||||
regex.workspace = true
|
||||
release_channel.workspace = true
|
||||
rope.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 serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::NewExternalAgentThread;
|
||||
use crate::agent_diff::AgentDiffThread;
|
||||
use crate::message_editor::{MAX_EDITOR_LINES, MIN_EDITOR_LINES};
|
||||
use crate::ui::NewThreadButton;
|
||||
|
@ -31,6 +30,7 @@ use crate::{
|
|||
thread_history::{HistoryEntryElement, ThreadHistory},
|
||||
ui::{AgentOnboardingModal, EndTrialUpsell},
|
||||
};
|
||||
use crate::{EditAssistantMessage, EditUserMessage, NewExternalAgentThread};
|
||||
use agent::{
|
||||
Thread, ThreadError, ThreadEvent, ThreadId, ThreadSummary, TokenUsageRatio,
|
||||
context_store::ContextStore,
|
||||
|
@ -3222,6 +3222,20 @@ impl Render for AgentPanel {
|
|||
}
|
||||
}))
|
||||
.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))
|
||||
.children(self.render_onboarding(window, cx))
|
||||
.children(self.render_trial_end_upsell(window, cx))
|
||||
|
|
|
@ -123,6 +123,8 @@ actions!(
|
|||
ContinueWithBurnMode,
|
||||
/// Toggles burn mode for faster responses.
|
||||
ToggleBurnMode,
|
||||
EditAssistantMessage,
|
||||
EditUserMessage,
|
||||
]
|
||||
);
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ actions!(
|
|||
Cancel,
|
||||
/// Confirms the selected menu item.
|
||||
Confirm,
|
||||
SaveEdit,
|
||||
/// Performs secondary confirmation action.
|
||||
SecondaryConfirm,
|
||||
/// Selects the previous item in the menu.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue