Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion rust/src/agent/tools/worker/ls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ pub fn ls(ctx: &DocContext, state: &WorkerState) -> ToolResult {
ToolResult::ok(output)
}
None => {
output.push_str("(no navigation data for this node)\nUse cat to read content or cd .. to go back.");
output.push_str(
"(no navigation data for this node)\nUse cat to read content or cd .. to go back.",
);
ToolResult::ok(output)
}
}
Expand Down
6 changes: 5 additions & 1 deletion rust/src/agent/worker/execute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,11 @@ fn truncate_log(s: &str) -> std::borrow::Cow<'_, str> {
if s.len() <= MAX {
std::borrow::Cow::Borrowed(s)
} else {
std::borrow::Cow::Owned(format!("{}...(truncated, {} chars total)", &s[..MAX], s.len()))
std::borrow::Cow::Owned(format!(
"{}...(truncated, {} chars total)",
&s[..MAX],
s.len()
))
}
}

Expand Down
4 changes: 1 addition & 3 deletions rust/src/agent/worker/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,7 @@ impl<'a> Agent for Worker<'a> {
.await
.map_err(|e| Error::LlmReasoning {
stage: "worker/navigation".to_string(),
detail: format!(
"Nav loop LLM call failed (round {round_num}): {e}"
),
detail: format!("Nav loop LLM call failed (round {round_num}): {e}"),
})?;
llm_calls += 1;

Expand Down
15 changes: 11 additions & 4 deletions rust/src/client/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -477,8 +477,8 @@ impl Engine {
/// as the retrieval agent progresses through navigation.
///
/// Supports single-document and multi-document scope.
/// Events are translated from the agent's internal [`AgentEvent`](crate::agent::AgentEvent)
/// into the public [`RetrieveEvent`] stream.
/// Events are translated from the agent's internal event stream
/// into the public `RetrieveEventReceiver` stream.
pub async fn query_stream(&self, ctx: QueryContext) -> Result<RetrieveEventReceiver> {
self.check_cancel()?;
let _guard = self.inc_active();
Expand Down Expand Up @@ -1073,7 +1073,10 @@ impl Engine {

// Load all documents in parallel and extract keyword profiles
let doc_ids = self.workspace.inner().list_documents().await;
info!(doc_count = doc_ids.len(), "Loading documents for graph rebuild");
info!(
doc_count = doc_ids.len(),
"Loading documents for graph rebuild"
);
let concurrency = self.config.llm.throttle.max_concurrent_requests;

let loaded: Vec<Option<PersistedDocument>> = futures::stream::iter(doc_ids.iter().cloned())
Expand Down Expand Up @@ -1101,7 +1104,11 @@ impl Engine {
}

let graph = builder.build();
info!(nodes = graph.node_count(), edges = graph.edge_count(), "Graph built, persisting");
info!(
nodes = graph.node_count(),
edges = graph.edge_count(),
"Graph built, persisting"
);
self.workspace.set_graph(&graph).await?;
Ok(())
}
Expand Down
Loading