pub struct ThreadConfig<M: InputSender, H: HttpClient> {
pub tools: Vec<Rc<dyn Tool<M>>>,
pub extra_system_prompt: Option<String>,
pub rap_notifier: Option<RapNotifier<H>>,
}Expand description
The configuration a thread runs with. Resolved by a
ThreadConfigSource each time a thread is loaded, so
different threads of one system can see different toolsets (e.g. one
daemon session per working directory, each with its own RAP servers).
Tools are reference-counted so an embedding can hand the same tool instances to every thread of a session while retaining its own handles (e.g. to shut down the server behind a tool when the session idles).
Fields§
§tools: Vec<Rc<dyn Tool<M>>>§extra_system_prompt: Option<String>Appended to the built-in system prompt.
rap_notifier: Option<RapNotifier<H>>Best-effort lifecycle notifications (tool cancellation, thread closure) to this thread’s RAP tool servers.
Auto Trait Implementations§
impl<M, H> !RefUnwindSafe for ThreadConfig<M, H>
impl<M, H> !Send for ThreadConfig<M, H>
impl<M, H> !Sync for ThreadConfig<M, H>
impl<M, H> !UnwindSafe for ThreadConfig<M, H>
impl<M, H> Freeze for ThreadConfig<M, H>
impl<M, H> Unpin for ThreadConfig<M, H>
impl<M, H> UnsafeUnpin for ThreadConfig<M, H>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more