Introduce a system prompt for the new assistant (#26536)
This should be less eager in terms of invoking tools. But we should keep iterating on it as we add more tools. Also, this disables the Lua interpreter by default (it can still be enabled manually from the tools icon). Release Notes: - N/A --------- Co-authored-by: Richard Feldman <oss@rtfeldman.com>
This commit is contained in:
co-authored by
Richard Feldman
parent
47a89ad243
commit
6bcfc4014b
@@ -15,7 +15,6 @@ pub struct ToolWorkingSet {
|
||||
state: Mutex<WorkingSetState>,
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
struct WorkingSetState {
|
||||
context_server_tools_by_id: HashMap<ToolId, Arc<dyn Tool>>,
|
||||
context_server_tools_by_name: HashMap<String, Arc<dyn Tool>>,
|
||||
@@ -24,6 +23,18 @@ struct WorkingSetState {
|
||||
next_tool_id: ToolId,
|
||||
}
|
||||
|
||||
impl Default for WorkingSetState {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
context_server_tools_by_id: Default::default(),
|
||||
context_server_tools_by_name: Default::default(),
|
||||
disabled_tools_by_source: Default::default(),
|
||||
is_scripting_tool_disabled: true,
|
||||
next_tool_id: Default::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl ToolWorkingSet {
|
||||
pub fn tool(&self, name: &str, cx: &App) -> Option<Arc<dyn Tool>> {
|
||||
self.state
|
||||
|
||||
Reference in New Issue
Block a user