feat(cli): add pipeline progress spinners to timeline and search
Adds numbered stage spinners ([1/3], [2/3], [3/3]) to the timeline pipeline stages (seed, expand, collect) so users see activity during longer queries. TimelineParams gains a robot_mode field to suppress spinners in JSON output mode. Adds a [1/1] spinner to the search command for consistency, using the shared stage_spinner from cli/progress. Also refactors wrap_snippet() to delegate to wrap_text() with a 4-line cap, eliminating the duplicated word-wrapping logic. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1784,6 +1784,7 @@ async fn handle_timeline(
|
||||
max_seeds: args.max_seeds,
|
||||
max_entities: args.max_entities,
|
||||
max_evidence: args.max_evidence,
|
||||
robot_mode,
|
||||
};
|
||||
|
||||
let result = run_timeline(&config, ¶ms).await?;
|
||||
@@ -1828,6 +1829,12 @@ async fn handle_search(
|
||||
limit: args.limit,
|
||||
};
|
||||
|
||||
let spinner = lore::cli::progress::stage_spinner(
|
||||
1,
|
||||
1,
|
||||
&format!("Searching ({})...", args.mode),
|
||||
robot_mode,
|
||||
);
|
||||
let start = std::time::Instant::now();
|
||||
let response = run_search(
|
||||
&config,
|
||||
@@ -1839,6 +1846,7 @@ async fn handle_search(
|
||||
)
|
||||
.await?;
|
||||
let elapsed_ms = start.elapsed().as_millis() as u64;
|
||||
spinner.finish_and_clear();
|
||||
|
||||
if robot_mode {
|
||||
print_search_results_json(&response, elapsed_ms, args.fields.as_deref());
|
||||
|
||||
Reference in New Issue
Block a user