pub struct ContextInjector { /* private fields */ }Expand description
Context injector for runtime context
Implementations§
Source§impl ContextInjector
impl ContextInjector
Sourcepub fn invalidate(&mut self)
pub fn invalidate(&mut self)
Mark cache as dirty (need refresh)
Sourcepub fn set_lsp_servers(&mut self, servers: Vec<LspServerInfo>)
pub fn set_lsp_servers(&mut self, servers: Vec<LspServerInfo>)
Set LSP servers info (for dynamic injection) This updates the cached system context with LSP server information
Sourcepub fn get_user_context(&mut self) -> &UserContext
pub fn get_user_context(&mut self) -> &UserContext
Get user context
Sourcepub fn get_system_context(&mut self) -> &SystemContext
pub fn get_system_context(&mut self) -> &SystemContext
Get system context
Sourcepub fn render_user_context(&mut self) -> String
pub fn render_user_context(&mut self) -> String
Render user context as prompt section
Sourcepub fn render_system_context(&mut self) -> String
pub fn render_system_context(&mut self) -> String
Render system context as prompt section
Sourcepub fn render_full_context(&mut self) -> String
pub fn render_full_context(&mut self) -> String
Render full context (for injection into prompt)
Auto Trait Implementations§
impl Freeze for ContextInjector
impl RefUnwindSafe for ContextInjector
impl Send for ContextInjector
impl Sync for ContextInjector
impl Unpin for ContextInjector
impl UnsafeUnpin for ContextInjector
impl UnwindSafe for ContextInjector
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