Skip to content

feat: added clone to FunctionCall and FunctionResponse structs#32

Merged
EggerMarc merged 1 commit intomainfrom
feat-derives
Oct 18, 2025
Merged

feat: added clone to FunctionCall and FunctionResponse structs#32
EggerMarc merged 1 commit intomainfrom
feat-derives

Conversation

@EggerMarc
Copy link
Copy Markdown
Owner

@EggerMarc EggerMarc commented Oct 18, 2025

Summary by CodeRabbit

  • Refactor
    • Enhanced core data structures to support cloning operations, enabling greater flexibility for applications utilizing these types.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Oct 18, 2025

Walkthrough

The FunctionCall and FunctionResponse structs in tools_core/src/lib.rs now derive the Clone trait. These existing public types remain compatible with their serialization and deserialization behavior while enabling direct cloning operations.

Changes

Cohort / File(s) Summary
Derive macro additions
tools_core/src/lib.rs
Added Clone derive to FunctionCall struct, enabling instances to be cloned while retaining existing behavior of Debug, Deserialize, Serialize, and PartialEq. Added Clone derive to FunctionResponse struct with identical rationale.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A rabbit hops through code so neat,
Where structs now clone with paws so fleet!
Two types duplicated with grace and care,
Clone derive blooms everywhere!
Thump thump—changes light as air! 🎉

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The PR title "feat: added clone to FunctionCall and FunctionResponse structs" directly and accurately reflects the main change in the changeset. The title specifically identifies both the action (adding Clone derive) and the affected structs (FunctionCall and FunctionResponse), which aligns with the actual code modifications. The title is concise, specific, and provides clear information about the primary change without being vague or overly broad. A reviewer scanning the repository history would immediately understand the purpose and scope of this changeset.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat-derives

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 05590be and 0d8c65f.

📒 Files selected for processing (1)
  • tools_core/src/lib.rs (2 hunks)
🔇 Additional comments (2)
tools_core/src/lib.rs (2)

210-210: LGTM! Clean addition of Clone trait.

The Clone derive is correctly added. All fields (Option<CallId>, String, Value) already implement Clone, making this a safe and useful enhancement to the public API.


269-269: LGTM! Clone trait correctly added.

The Clone derive is properly added to FunctionResponse. All fields implement Clone, making this a safe enhancement that maintains consistency with FunctionCall.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@EggerMarc EggerMarc merged commit 0d3c080 into main Oct 18, 2025
3 checks passed
@EggerMarc EggerMarc deleted the feat-derives branch October 18, 2025 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant