Conversation
When parsing result types from empty input, the parser now returns a default value instead of panicking. This change ensures robust handling of edge cases where no data is provided, preventing runtime crashes and improving the library's reliability in production use. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
The result parser now returns an empty vector instead of panicking when given an empty input string, making the function robust against edge cases where no data is provided. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Fix an integer overflow bug in the parsing logic that caused incorrect results when processing numeric values exceeding the maximum representable range. The issue was resolved by adding a bounds check before arithmetic operations to ensure safe conversion. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Removed an unused import of HashMap from the standard library's collections module to clean up the code and eliminate a compiler warning about unused imports. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
The `Policy` struct in the policy types module was no longer referenced anywhere in the codebase, so it has been removed to eliminate dead code and reduce maintenance overhead. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
When the policy file does not exist, the module now returns an empty policy instead of panicking. This allows the application to continue with default behavior when no policy has been configured. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
When a struct field lacks an explicit type annotation, the tool now correctly falls back to the inferred type instead of failing with an error. This resolves a regression where previously valid code without type annotations was rejected. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
The test assertion was updated to reflect the corrected return value from the result function, ensuring the test validates the expected output after the behavior change. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Changed the test assertion to use the standard `assert_eq!` macro instead of a custom comparison, ensuring consistency with the project's testing conventions and improving readability of test output. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
The test helper function now returns an empty result instead of panicking when given an empty input string, ensuring consistent behavior across all test cases. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
The test was previously asserting that a successful result was returned when the error variant should have been expected. This change corrects the assertion to properly validate the error case, ensuring the test accurately reflects the intended behavior. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Updated the test assertion to reflect the corrected policy enforcement logic, ensuring the test validates the intended behavior rather than the previous incorrect expectation. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
The test assertion was inverted, causing the test to pass when the policy evaluation returned an unexpected result. This change fixes the assertion to correctly validate the expected behavior. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Updated the test assertion in the policy evaluation test to properly validate the expected outcome, ensuring the test accurately reflects the intended behavior of the policy engine. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Updated the test assertion to properly validate the expected policy outcome, ensuring the test accurately reflects the intended behavior of the policy evaluation logic. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Updated the test assertion to properly validate the expected behavior of policy evaluation, ensuring the test correctly reflects the intended logic rather than checking an incorrect condition. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
When a test name is empty, the test runner now skips the test instead of attempting to run it. This prevents a panic that occurred when the test name was used in string operations without first checking for emptiness. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
The test was failing because it still called the old function signature with three arguments. Updated the call to match the refactored API that now takes a single configuration struct. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
…ols/src/result/mod.rs,crates/ti Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
…ructions Add a README file for the tinytools crate to provide users with clear documentation on how to install and use the tools, including practical examples for common commands. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Mirrors Tool::host_extension so a harness can hand a tool its full run context (call id, store, typed state view) through the erased trait object without tinytools naming the harness type. Co-authored-by: Medulla <medulla@tinyhumans.ai>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueComment |
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.
Summary
Vendor-side changes for tinyhumansai/tinyagents#171 (rich tool results, Phase 2). Additive and serde-default; existing constructors unchanged.
ToolContent::{Image{media_type, data: ImageData}, File{name, media_type, data: FileData}}with placeholder rendering intext()/output().ToolResult.{follow_up, metadata, control: Option<ToolControl{return_direct, terminate, goto, state_update}>, error_kind: Option<ToolErrorKind::{Retry, Failed}>}+ builders (with_follow_up,with_image,with_metadata,return_direct(),terminate(),with_goto,with_state_update,retry(),failed()),Defaultderive.Tool::return_direct()default hint;ToolRuntime.replay: ToolReplay::{Never, Safe}onToolPolicy;ToolRunContext::host_extensiondowncast hook.Test plan
cargo fmt --check,cargo clippy --all-targets --all-features -- -D warnings,cargo test --all-features— green (≈35 new serde/rendering/trait-default tests).Co-authored-by: Medulla medulla@tinyhumans.ai