pub struct Context {
pub database_url: String,
pub project_root: PathBuf,
pub project_id: String,
pub quiet: bool,
pub falkordb: Option<FalkorConfig>,
pub qdrant: Option<QdrantConfig>,
pub embedding: Option<EmbeddingConfig>,
pub code_vectors: CodeVectorSettings,
pub daemon_url: Option<String>,
pub index_scope: ProjectIndexScope,
}Expand description
Resolved runtime context for gcode commands.
Fields§
§database_url: StringPostgreSQL hub DSN
project_root: PathBufProject root directory
project_id: StringProject ID (from .gobby/project.json or DB lookup)
quiet: boolSuppress warnings
falkordb: Option<FalkorConfig>FalkorDB config (None if unavailable)
qdrant: Option<QdrantConfig>Qdrant config (None if unavailable)
embedding: Option<EmbeddingConfig>Embedding API config (None if unavailable → no semantic search)
code_vectors: CodeVectorSettingsCode-symbol vector projection settings owned by gcode.
daemon_url: Option<String>Gobby daemon base URL (e.g. http://localhost:60887)
index_scope: ProjectIndexScopeProject read/index scope.
Implementations§
Source§impl Context
impl Context
Sourcepub fn resolve(project_override: Option<&str>, quiet: bool) -> Result<Self>
pub fn resolve(project_override: Option<&str>, quiet: bool) -> Result<Self>
Resolve context from CLI args and filesystem state.
Sourcepub fn resolve_for_project_id(project_id: &str, quiet: bool) -> Result<Self>
pub fn resolve_for_project_id(project_id: &str, quiet: bool) -> Result<Self>
Resolve service config for a caller-supplied project id without touching cwd identity.
This is for daemon-style calls that already know the target project id and must not
discover a project root from cwd. The returned context therefore has an empty
project_root, default code-vector settings, and None for services that are not
needed by project-id-only graph operations.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Context
impl RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnsafeUnpin for Context
impl UnwindSafe for Context
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more