Conversation
…noise, apply cargo fmt
…ed by grep and find Introduces a WalkerConfig trait in common.rs with include_hidden(), respect_gitignore(), and follow_symlinks() methods. Both GrepOptions and FindOptions implement it, eliminating the duplicated WalkBuilder setup in find.rs.
Eliminates lossy &str ↔ PathBuf round-tripping across tool boundaries. The grep, find, and cat functions now accept &Path directly, avoiding to_string_lossy() allocations in server.rs and preserving non-UTF-8 paths correctly. - common::build_parallel_walker: &str → &Path - grep::grep + internal helpers: &str → &Path - find::find: &str → &Path - cat::cat: &str → &Path - server.rs: pass &PathBuf directly (auto-derefs to &Path) - Remove now-unused testutil::path_str helper
…construction in server.rs memories handler now matches the grep/find/cat pattern: spawn_blocking -> map_err(join_error) -> match Ok(r) => r.into_call_tool_result(). Added ToolResponse::text() constructor for opaque-string tool outputs.
…with #[serde(default)] Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Deduplicate default constants: args.rs const fns now delegate to the canonical DEFAULT_MAX_* constants in tools/mod.rs (single source of truth) - OutputMode is now typed end-to-end: derives Deserialize/Default/JsonSchema, GrepArgs.output_mode is OutputMode instead of String, invalid values fail at deserialization rather than handler time; removes from_str_lossy and the default_output_mode fn - into_call_tool_result no longer duplicates the content string in structured_content (content is already in Content::text; structured carries only metadata) - cat.rs EOF-before-offset early return uses ToolResponse::text() instead of a hand-rolled 7-field struct literal Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- server.rs memories handler: replace hand-rolled CallToolResult for the no-memory-dir case with tool_error(AppError::InvalidRequest(...)), matching every other error path in the same handler - memory.rs: eliminate double-syscall on MEMORY.md index path — replace is_file() + read_to_string with a single read_to_string that matches on ErrorKind::NotFound to fall through to the directory listing - args.rs default_max_bytes comment: moot — the // 5 MiB annotation lives on DEFAULT_MAX_BYTES in tools/mod.rs, which default_max_bytes() now delegates to Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes various issues from over eager LLM.