assistant2: Add a way to quickly configure tools for the current profile (#27714)
This PR adds a new entry to the profile selector to quickly access tool customization for the current profile: <img width="228" alt="Screenshot 2025-03-28 at 7 08 51 PM" src="https://github.com/user-attachments/assets/929ae5e7-5a16-4bf2-8043-6c09b621fc61" /> Release Notes: - N/A
This commit is contained in:
parent
e171d16ae3
commit
8ecf553279
5 changed files with 43 additions and 6 deletions
|
@ -28,8 +28,10 @@ use client::Client;
|
|||
use command_palette_hooks::CommandPaletteFilter;
|
||||
use feature_flags::{Assistant2FeatureFlag, FeatureFlagAppExt};
|
||||
use fs::Fs;
|
||||
use gpui::{actions, App};
|
||||
use gpui::{actions, impl_actions, App};
|
||||
use prompt_store::PromptBuilder;
|
||||
use schemars::JsonSchema;
|
||||
use serde::Deserialize;
|
||||
use settings::Settings as _;
|
||||
|
||||
pub use crate::active_thread::ActiveThread;
|
||||
|
@ -50,7 +52,6 @@ actions!(
|
|||
RemoveAllContext,
|
||||
OpenHistory,
|
||||
OpenConfiguration,
|
||||
ManageProfiles,
|
||||
AddContextServer,
|
||||
RemoveSelectedThread,
|
||||
Chat,
|
||||
|
@ -69,6 +70,22 @@ actions!(
|
|||
]
|
||||
);
|
||||
|
||||
#[derive(PartialEq, Clone, Default, Debug, Deserialize, JsonSchema)]
|
||||
pub struct ManageProfiles {
|
||||
#[serde(default)]
|
||||
pub customize_tools: Option<Arc<str>>,
|
||||
}
|
||||
|
||||
impl ManageProfiles {
|
||||
pub fn customize_tools(profile_id: Arc<str>) -> Self {
|
||||
Self {
|
||||
customize_tools: Some(profile_id),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl_actions!(assistant, [ManageProfiles]);
|
||||
|
||||
const NAMESPACE: &str = "assistant2";
|
||||
|
||||
/// Initializes the `assistant2` crate.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue