agent: Fix opening configuration view from the model selector (#28154)
This PR fixes an issue where opening the configuration view from the model selector in the Agent (or inline assist) was not working properly. Fixes https://github.com/zed-industries/zed/issues/28078. Release Notes: - Agent Beta: Fixed an issue where selecting "Configure" in the model selector would not bring up the configuration view.
This commit is contained in:
parent
525755c28e
commit
caf0d6c5fa
11 changed files with 46 additions and 20 deletions
|
@ -51,7 +51,6 @@ actions!(
|
|||
ToggleProfileSelector,
|
||||
RemoveAllContext,
|
||||
OpenHistory,
|
||||
OpenConfiguration,
|
||||
AddContextServer,
|
||||
RemoveSelectedThread,
|
||||
Chat,
|
||||
|
|
|
@ -33,6 +33,7 @@ use ui::{
|
|||
use util::ResultExt as _;
|
||||
use workspace::Workspace;
|
||||
use workspace::dock::{DockPosition, Panel, PanelEvent};
|
||||
use zed_actions::agent::OpenConfiguration;
|
||||
use zed_actions::assistant::ToggleFocus;
|
||||
|
||||
use crate::active_thread::ActiveThread;
|
||||
|
@ -44,7 +45,7 @@ use crate::thread_history::{PastContext, PastThread, ThreadHistory};
|
|||
use crate::thread_store::ThreadStore;
|
||||
use crate::{
|
||||
AgentDiff, InlineAssistant, NewPromptEditor, NewThread, OpenActiveThreadAsMarkdown,
|
||||
OpenAgentDiff, OpenConfiguration, OpenHistory, ThreadEvent, ToggleContextPicker,
|
||||
OpenAgentDiff, OpenHistory, ThreadEvent, ToggleContextPicker,
|
||||
};
|
||||
|
||||
action_with_deprecated_aliases!(
|
||||
|
|
|
@ -37,8 +37,8 @@ use text::{OffsetRangeExt, ToPoint as _};
|
|||
use ui::prelude::*;
|
||||
use util::RangeExt;
|
||||
use util::ResultExt;
|
||||
use workspace::{ItemHandle, Toast, Workspace, notifications::NotificationId};
|
||||
use workspace::{ShowConfiguration, dock::Panel};
|
||||
use workspace::{ItemHandle, Toast, Workspace, dock::Panel, notifications::NotificationId};
|
||||
use zed_actions::agent::OpenConfiguration;
|
||||
|
||||
use crate::AssistantPanel;
|
||||
use crate::buffer_codegen::{BufferCodegen, CodegenAlternative, CodegenEvent};
|
||||
|
@ -295,7 +295,7 @@ impl InlineAssistant {
|
|||
if let Some(answer) = answer {
|
||||
if answer == 0 {
|
||||
cx.update(|window, cx| {
|
||||
window.dispatch_action(Box::new(ShowConfiguration), cx)
|
||||
window.dispatch_action(Box::new(OpenConfiguration), cx)
|
||||
})
|
||||
.ok();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue