Skip to content

chat/tools refactor #8#9

Merged
x2d7 merged 13 commits intodevfrom
8-refactoring-tools
Feb 14, 2026
Merged

chat/tools refactor #8#9
x2d7 merged 13 commits intodevfrom
8-refactoring-tools

Conversation

@x2d7
Copy link
Copy Markdown
Owner

@x2d7 x2d7 commented Feb 13, 2026

Pull request for #8

Changes

Data Control changes:

  • Unexported fields and types that should not be used externally (ToolFunction, Func, Tool.Schema access controlled via GetSchema).

Tools changes:

  • Replaced slice-based storage in Tools with a map to allow efficient Add/Remove operations and to prevent duplicate Tool IDs.
  • Added support for functional options in Tools.Add to customize Tool IDs.
  • Enhanced snapshot logic to correctly populate Tool IDs and skip duplicate checks when auto-increment is enabled.

Tool Schema changes:

  • Introduced support for primitive input types in tools in addition to struct types.
  • Extracted schema generation logic into a separate schema.go for better separation of concerns.

Minor changes:

  • Renamed Tool.Name field to Id for clarity and consistency.

Testing

No tests included, since the testing workflow will be added after issue #3 will be merged into dev.

@x2d7 x2d7 merged commit be1c308 into dev Feb 14, 2026
@x2d7 x2d7 deleted the 8-refactoring-tools branch February 14, 2026 16:54
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