pub struct GhostResolver { /* private fields */ }Expand description
Ghost Import Resolver
Automatically expands atom context to include necessary dependencies so LLMs don’t hallucinate missing types.
Implementations§
Source§impl GhostResolver
impl GhostResolver
pub fn new(graph: GraphStore) -> Self
pub fn analyzer(&self) -> DependencyAnalyzer<'_>
Sourcepub async fn resolve(
&self,
atom_ids: &[String],
) -> Result<ExpansionResult, Box<dyn Error + Send + Sync>>
pub async fn resolve( &self, atom_ids: &[String], ) -> Result<ExpansionResult, Box<dyn Error + Send + Sync>>
Resolve ghost imports for a set of atoms
Sourcepub async fn resolve_with_policy(
&self,
atom_ids: &[String],
policy: &ExpansionPolicy,
) -> Result<ExpansionResult, Box<dyn Error + Send + Sync>>
pub async fn resolve_with_policy( &self, atom_ids: &[String], policy: &ExpansionPolicy, ) -> Result<ExpansionResult, Box<dyn Error + Send + Sync>>
Resolve with custom policy
Sourcepub async fn suggest_policy(
&self,
atom_ids: &[String],
) -> Result<ExpansionPolicy, Box<dyn Error + Send + Sync>>
pub async fn suggest_policy( &self, atom_ids: &[String], ) -> Result<ExpansionPolicy, Box<dyn Error + Send + Sync>>
Get optimal policy for a set of atoms
Auto Trait Implementations§
impl Freeze for GhostResolver
impl !RefUnwindSafe for GhostResolver
impl Send for GhostResolver
impl Sync for GhostResolver
impl Unpin for GhostResolver
impl !UnwindSafe for GhostResolver
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