Refactor: Restructure collab main function to prepare for new subcommand: serve llm
(#15824)
This is just a refactor that we're landing ahead of any functional changes to make sure we haven't broken anything. Release Notes: - N/A Co-authored-by: Marshall <marshall@zed.dev> Co-authored-by: Jason <jason@zed.dev>
This commit is contained in:
parent
705f7e7a03
commit
27779e33fb
5 changed files with 142 additions and 85 deletions
16
crates/collab/src/llm.rs
Normal file
16
crates/collab/src/llm.rs
Normal file
|
@ -0,0 +1,16 @@
|
|||
use std::sync::Arc;
|
||||
|
||||
use crate::{executor::Executor, Config, Result};
|
||||
|
||||
pub struct LlmState {
|
||||
pub config: Config,
|
||||
pub executor: Executor,
|
||||
}
|
||||
|
||||
impl LlmState {
|
||||
pub async fn new(config: Config, executor: Executor) -> Result<Arc<Self>> {
|
||||
let this = Self { config, executor };
|
||||
|
||||
Ok(Arc::new(this))
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue