feat(app): SearchResponse.trace + opts.trace threading (fb-37)
Adds the `trace: Option<SearchTrace>` field to `SearchResponse` and threads `SearchOpts.trace` through `App::search_with_opts`. When the caller sets `opts.trace = true` the path bypasses the LRU search cache and runs through `HybridRetriever::search_with_trace`, which dispatches all 3 SearchModes internally; this means `--trace` requires embeddings (same constraint as `--mode hybrid`). The non-trace path keeps its exact prior behavior with `trace: None` stamped on the response. Picked up Task 1 / Task 3 follow-ups in the same commit so the workspace compiles: SearchOpts struct-literals in kebab-cli/main.rs + kebab-mcp/tools/search.rs default the new `trace` field to false, and the schema-wrapper test in kebab-cli/wire.rs fills the new media_breakdown / lang_breakdown / index_bytes / stale_doc_count fields on Stats with `Default::default()`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -118,6 +118,7 @@ pub fn handle(state: &KebabAppState, input: SearchInput) -> CallToolResult {
|
||||
max_tokens: input.max_tokens,
|
||||
snippet_chars: input.snippet_chars,
|
||||
cursor: input.cursor,
|
||||
trace: false,
|
||||
};
|
||||
let cfg_clone = (*state.config).clone();
|
||||
match kebab_app::search_with_opts_with_config(cfg_clone, query, opts) {
|
||||
|
||||
Reference in New Issue
Block a user