Skip to content

refactor(examples): extract fake tools into separate module#218

Merged
chaliy merged 2 commits intomainfrom
claude/refactor-tool-example-3iy9f
Feb 18, 2026
Merged

refactor(examples): extract fake tools into separate module#218
chaliy merged 2 commits intomainfrom
claude/refactor-tool-example-3iy9f

Conversation

@chaliy
Copy link
Contributor

@chaliy chaliy commented Feb 18, 2026

Summary

  • Extract inline tool definitions and callbacks from scripted_tool example into a fakes module
  • Keeps main() focused on the ScriptedTool builder API and demo scenarios
  • No behavior change — same tools, same demo output

Test plan

  • cargo build --example scripted_tool passes
  • Example runs successfully with same output
  • CI green

…ed_tool example

Move fake e-commerce tool definitions and handler implementations
from main() into a `fakes` module. The builder chain and demo
scenarios are now the visual focus of the example.

https://claude.ai/code/session_014mgFgGCqgWPopvPpjKYGWh
@chaliy chaliy merged commit 55d5ad6 into main Feb 18, 2026
15 checks passed
@chaliy chaliy deleted the claude/refactor-tool-example-3iy9f branch February 18, 2026 03:35
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.

2 participants