fix(agent): robust tool-call parsing for noisy model outputs
Improve tool-call parsing to handle noisy local-model outputs (markdown fenced JSON, conversational wrappers, and raw JSON tool objects) and add regression coverage for these cases. Also sync rustfmt-required formatting and align crate-level clippy allow-list with Rust 1.92 CI pedantic checks so required lint gates pass consistently. Co-authored-by: chumyin <chumyin@users.noreply.github.com> Co-authored-by: argenis de la rosa <theonlyhennygod@gmail.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
28
src/lib.rs
28
src/lib.rs
@@ -1,13 +1,37 @@
|
||||
#![warn(clippy::all, clippy::pedantic)]
|
||||
#![allow(
|
||||
clippy::assigning_clones,
|
||||
clippy::bool_to_int_with_if,
|
||||
clippy::case_sensitive_file_extension_comparisons,
|
||||
clippy::cast_possible_wrap,
|
||||
clippy::doc_markdown,
|
||||
clippy::field_reassign_with_default,
|
||||
clippy::float_cmp,
|
||||
clippy::implicit_clone,
|
||||
clippy::items_after_statements,
|
||||
clippy::map_unwrap_or,
|
||||
clippy::manual_let_else,
|
||||
clippy::missing_errors_doc,
|
||||
clippy::missing_panics_doc,
|
||||
clippy::unnecessary_literal_bound,
|
||||
clippy::module_name_repetitions,
|
||||
clippy::struct_field_names,
|
||||
clippy::must_use_candidate,
|
||||
clippy::new_without_default,
|
||||
clippy::needless_pass_by_value,
|
||||
clippy::needless_raw_string_hashes,
|
||||
clippy::redundant_closure_for_method_calls,
|
||||
clippy::return_self_not_must_use,
|
||||
clippy::similar_names,
|
||||
clippy::single_match_else,
|
||||
clippy::struct_field_names,
|
||||
clippy::too_many_lines,
|
||||
clippy::uninlined_format_args,
|
||||
clippy::unnecessary_cast,
|
||||
clippy::unnecessary_lazy_evaluations,
|
||||
clippy::unnecessary_literal_bound,
|
||||
clippy::unnecessary_map_or,
|
||||
clippy::unused_self,
|
||||
clippy::cast_precision_loss,
|
||||
clippy::unnecessary_wraps,
|
||||
dead_code
|
||||
)]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user