style: cargo fmt --all (round 4 ingest log feature follow-up)
Phase C4 executor 의 마지막 `fix(test): clippy + fmt fixes` commit 이 test file 부분만 fmt 적용. workspace 전체 fmt 누락 발견 → cargo fmt --all 적용. 모든 import alphabetical reorder + line wrapping 정합. 추가 untracked artifact 동시 commit: - docs/superpowers/specs/2026-05-28-v0.20-ingest-log-spec.md (491 line, ACCEPT) - docs/superpowers/plans/2026-05-28-v0.20-ingest-log-plan.md (616 line, ACCEPT) workspace test: 1370 passed / 0 failed / 50 ignored, ingest_log_smoke green. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -51,9 +51,7 @@ pub fn handle(state: &KebabAppState, input: AskInput) -> CallToolResult {
|
||||
};
|
||||
let cfg_clone = (*state.config).clone();
|
||||
let result = match input.session_id {
|
||||
Some(sid) => {
|
||||
kebab_app::ask_with_session_with_config(cfg_clone, &sid, &input.query, opts)
|
||||
}
|
||||
Some(sid) => kebab_app::ask_with_session_with_config(cfg_clone, &sid, &input.query, opts),
|
||||
None => kebab_app::ask_with_config(cfg_clone, &input.query, opts),
|
||||
};
|
||||
match result {
|
||||
|
||||
@@ -49,9 +49,7 @@ pub fn handle(state: &KebabAppState, input: FetchInput) -> CallToolResult {
|
||||
_ => return invalid_input("kind=span requires doc_id, line_start, line_end"),
|
||||
},
|
||||
other => {
|
||||
return invalid_input(&format!(
|
||||
"unknown kind '{other}'; expected chunk|doc|span"
|
||||
));
|
||||
return invalid_input(&format!("unknown kind '{other}'; expected chunk|doc|span"));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -24,8 +24,9 @@ pub fn handle(state: &KebabAppState, input: IngestFileInput) -> CallToolResult {
|
||||
Ok(report) => match serde_json::to_value(&report) {
|
||||
Ok(mut v) => {
|
||||
if let serde_json::Value::Object(ref mut map) = v {
|
||||
map.entry("schema_version".to_string())
|
||||
.or_insert_with(|| serde_json::Value::String("ingest_report.v1".to_string()));
|
||||
map.entry("schema_version".to_string()).or_insert_with(|| {
|
||||
serde_json::Value::String("ingest_report.v1".to_string())
|
||||
});
|
||||
}
|
||||
match serde_json::to_string(&v) {
|
||||
Ok(json) => to_tool_success(json),
|
||||
|
||||
@@ -29,8 +29,9 @@ pub fn handle(state: &KebabAppState, input: IngestStdinInput) -> CallToolResult
|
||||
Ok(report) => match serde_json::to_value(&report) {
|
||||
Ok(mut v) => {
|
||||
if let serde_json::Value::Object(ref mut map) = v {
|
||||
map.entry("schema_version".to_string())
|
||||
.or_insert_with(|| serde_json::Value::String("ingest_report.v1".to_string()));
|
||||
map.entry("schema_version".to_string()).or_insert_with(|| {
|
||||
serde_json::Value::String("ingest_report.v1".to_string())
|
||||
});
|
||||
}
|
||||
match serde_json::to_string(&v) {
|
||||
Ok(json) => to_tool_success(json),
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
//! Tool implementations — one module per tool.
|
||||
|
||||
pub mod schema;
|
||||
pub mod doctor;
|
||||
pub mod search;
|
||||
pub mod ask;
|
||||
pub mod bulk_search;
|
||||
pub mod doctor;
|
||||
pub mod fetch;
|
||||
pub mod ingest_file;
|
||||
pub mod ingest_stdin;
|
||||
pub mod fetch;
|
||||
pub mod bulk_search;
|
||||
pub mod schema;
|
||||
pub mod search;
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
//! Input: {} (no args). Output: schema.v1 JSON.
|
||||
|
||||
use rmcp::model::CallToolResult;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use schemars::JsonSchema;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::error::{to_tool_error, to_tool_success};
|
||||
use crate::state::KebabAppState;
|
||||
|
||||
@@ -79,15 +79,10 @@ pub fn handle(state: &KebabAppState, input: SearchInput) -> CallToolResult {
|
||||
|
||||
let ingested_after = match input.ingested_after.as_deref() {
|
||||
Some(s) => {
|
||||
match time::OffsetDateTime::parse(
|
||||
s,
|
||||
&time::format_description::well_known::Rfc3339,
|
||||
) {
|
||||
match time::OffsetDateTime::parse(s, &time::format_description::well_known::Rfc3339) {
|
||||
Ok(ts) => Some(ts),
|
||||
Err(e) => {
|
||||
return invalid_input(&format!(
|
||||
"ingested_after: invalid RFC3339 '{s}': {e}"
|
||||
));
|
||||
return invalid_input(&format!("ingested_after: invalid RFC3339 '{s}': {e}"));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -152,8 +147,7 @@ pub fn handle(state: &KebabAppState, input: SearchInput) -> CallToolResult {
|
||||
"truncated": resp.truncated,
|
||||
});
|
||||
if let Some(trace) = &resp.trace {
|
||||
let trace_v =
|
||||
serde_json::to_value(trace).unwrap_or(serde_json::Value::Null);
|
||||
let trace_v = serde_json::to_value(trace).unwrap_or(serde_json::Value::Null);
|
||||
if let serde_json::Value::Object(ref mut map) = envelope {
|
||||
map.insert("trace".to_string(), trace_v);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user