assistant2: Restructure tools in preparation for adding more (#11213)

This PR does a slight restructuring of how tools are defined in the
`assistant2` crate to make it more amenable to adding more tools in the
near future.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2024-04-30 11:12:44 -04:00 committed by GitHub
parent d743c19fe2
commit e3de440715
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 271 additions and 268 deletions

View file

@ -1,6 +1,6 @@
mod assistant_settings;
mod completion_provider;
pub mod tools;
mod tools;
mod ui;
use ::ui::{div, prelude::*, Color, ViewContext};
@ -23,7 +23,6 @@ use semantic_index::{CloudEmbeddingProvider, SemanticIndex};
use serde::Deserialize;
use settings::Settings;
use std::sync::Arc;
use tools::ProjectIndexTool;
use ui::Composer;
use util::{paths::EMBEDDINGS_DIR, ResultExt};
use workspace::{
@ -33,6 +32,7 @@ use workspace::{
pub use assistant_settings::AssistantSettings;
use crate::tools::ProjectIndexTool;
use crate::ui::UserOrAssistant;
const MAX_COMPLETION_CALLS_PER_SUBMISSION: usize = 5;