pub struct QueryEnhancer { /* private fields */ }Expand description
Handles query enhancement (@ file injection) and message preparation.
Implementations§
Source§impl QueryEnhancer
impl QueryEnhancer
Sourcepub fn enhance_query(&self, query: &str) -> (String, Vec<ImageBlock>)
pub fn enhance_query(&self, query: &str) -> (String, Vec<ImageBlock>)
Enhance a query by injecting @-referenced file contents.
Returns (enhanced_query, image_blocks) where:
enhanced_queryhas@markers stripped and file content appendedimage_blockscontains base64-encoded images for multimodal calls
Sourcepub fn prepare_messages(
&self,
query: &str,
enhanced_query: &str,
system_prompt: &str,
session_messages: Option<&[Value]>,
image_blocks: &[ImageBlock],
thinking_visible: bool,
playbook_context: Option<&str>,
) -> Vec<Value>
pub fn prepare_messages( &self, query: &str, enhanced_query: &str, system_prompt: &str, session_messages: Option<&[Value]>, image_blocks: &[ImageBlock], thinking_visible: bool, playbook_context: Option<&str>, ) -> Vec<Value>
Prepare the full message list for an LLM API call.
§Arguments
query- Original user query (before enhancement)enhanced_query- Query after@processingsystem_prompt- Base system prompt textsession_messages- Existing conversation messages (if any)image_blocks- Multimodal image blocks from enhancementthinking_visible- Whether thinking mode is visible to the userplaybook_context- Optional learned-strategies text to append
§Returns
A Vec<Value> of message objects ready for the LLM API.
Sourcepub fn format_messages_summary(messages: &[Value], max_preview: usize) -> String
pub fn format_messages_summary(messages: &[Value], max_preview: usize) -> String
Format a debug summary of a message list.
Auto Trait Implementations§
impl Freeze for QueryEnhancer
impl RefUnwindSafe for QueryEnhancer
impl Send for QueryEnhancer
impl Sync for QueryEnhancer
impl Unpin for QueryEnhancer
impl UnsafeUnpin for QueryEnhancer
impl UnwindSafe for QueryEnhancer
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