Skip to content

Commit b7d374d

Browse files
Darth-Hidiousclaude
andcommitted
chore: fix clippy warnings, rewrite README, remove agent artifact docs
- Fix clippy too_many_arguments, type_complexity, div_ceil, identical blocks - Rewrite README to show every real CLI subcommand - Remove 22 agent-generated doc stubs from docs/ Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent e520ef5 commit b7d374d

26 files changed

Lines changed: 188 additions & 7561 deletions

README.md

Lines changed: 179 additions & 162 deletions
Large diffs are not rendered by default.

crates/agent/src/protocol.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
//! Reads JSON-RPC requests from stdin, dispatches them, and emits
44
//! `ui.*` notifications on stdout. Stdout is the protocol channel
55
//! so all logging MUST go through `tracing`, never `println!`.
6+
#![allow(clippy::too_many_arguments, clippy::type_complexity)]
67

78
use std::collections::BTreeMap;
89
use std::fs;
@@ -1633,7 +1634,7 @@ fn project_api_history(history: &[ChatMessage]) -> &[ChatMessage] {
16331634
fn estimate_token_count(text: &str) -> usize {
16341635
let chars = text.chars().count();
16351636
let words = text.split_whitespace().count();
1636-
std::cmp::max(words, (chars + 3) / 4)
1637+
std::cmp::max(words, chars.div_ceil(4))
16371638
}
16381639

16391640
fn preview_text(text: &str, max_chars: usize) -> String {
@@ -4426,6 +4427,7 @@ fn spawn_agent_turn(
44264427
// ── Command handlers ──────────────────────────────────────────────
44274428

44284429
/// Handle built-in slash commands. Returns `true` if the command was handled.
4430+
#[allow(clippy::too_many_arguments)]
44294431
async fn handle_command(
44304432
command: &str,
44314433
silent: bool,

crates/cli/src/main.rs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1621,7 +1621,7 @@ async fn main() -> Result<()> {
16211621
anyhow!("`prism ingest --watch` requires a path or directory.")
16221622
})?;
16231623
handle_ingest_watch(
1624-
&path,
1624+
path,
16251625
&project_root,
16261626
model.as_deref(),
16271627
llm_url.as_deref(),
@@ -1642,7 +1642,7 @@ async fn main() -> Result<()> {
16421642
anyhow!("`prism ingest` requires a file or directory unless `--status` is set.")
16431643
})?;
16441644
handle_ingest(
1645-
&path,
1645+
path,
16461646
&project_root,
16471647
model.as_deref(),
16481648
llm_url.as_deref(),
@@ -2702,6 +2702,7 @@ async fn submit_platform_ingest_chunk(
27022702
Ok(response.json().await?)
27032703
}
27042704

2705+
#[allow(clippy::too_many_arguments)]
27052706
async fn run_local_ingest_file(
27062707
path: &Path,
27072708
project_root: &Path,
@@ -3946,7 +3947,7 @@ async fn handle_models_command(paths: &PrismPaths, command: ModelsCommands) -> R
39463947
print_models_summary(&models);
39473948
}
39483949
}
3949-
ModelsCommands::Info { model_id, json } => {
3950+
ModelsCommands::Info { model_id, json: _ } => {
39503951
let model = models
39513952
.into_iter()
39523953
.find(|model| {
@@ -3956,11 +3957,7 @@ async fn handle_models_command(paths: &PrismPaths, command: ModelsCommands) -> R
39563957
})
39573958
.ok_or_else(|| anyhow!("Model not found in project catalog: {model_id}"))?;
39583959

3959-
if json {
3960-
println!("{}", serde_json::to_string_pretty(&model)?);
3961-
} else {
3962-
println!("{}", serde_json::to_string_pretty(&model)?);
3963-
}
3960+
println!("{}", serde_json::to_string_pretty(&model)?)
39643961
}
39653962
}
39663963

crates/node/src/daemon.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1821,6 +1821,7 @@ mod tests {
18211821
assert_eq!(endpoint, "https://node.example.com:9001");
18221822
}
18231823

1824+
#[allow(clippy::type_complexity)]
18241825
fn spawn_stub_http_server(
18251826
max_requests: usize,
18261827
responder: Arc<dyn Fn(&str) -> (u16, String, &'static str) + Send + Sync>,

0 commit comments

Comments
 (0)