Skip to content

feat: add tool calling toggle switch in chat input#7

Merged
indulgeback merged 3 commits into
mainfrom
feat/agent-tool-calling
Jan 26, 2026
Merged

feat: add tool calling toggle switch in chat input#7
indulgeback merged 3 commits into
mainfrom
feat/agent-tool-calling

Conversation

@indulgeback

Copy link
Copy Markdown
Owner

Summary

  • Add tool calling toggle switch in chat input that allows users to enable/disable tool invocation
  • Extend ChatInput component with actions slot for future features (deep thinking, file upload, etc.)
  • Add i18n support for the tool toggle across all supported languages
  • Update both Go and TypeScript backends to respect the enable_tools parameter

Key Changes

  • Frontend: Added ChatInputAction component using shadcn/ui Button with toggle variant
  • ChatView: Added enableTools state that is passed to the API
  • ChatInput: Added actions prop slot inside the input border
  • Backend (Go): Added EnableTools parameter handling in chat handler
  • Backend (TS): Added enable_tools parameter handling in chat route/service

Test Plan

  • Toggle switch appears inside the input box border
  • Toggle state changes between checked/unchecked states
  • When unchecked, tools are not invoked during chat
  • When checked, tools work as expected
  • Agent's system prompt is still used even when tools are disabled
  • All languages have proper translation for "Tools" label

🤖 Generated with Claude Code

indulgeback and others added 3 commits January 23, 2026 09:46
Backend (agent-service):
- Add data-driven tool plugin system with PostgreSQL storage
- Implement ReAct Agent integration using Cloudwego Eino
- Support HTTP tools with various auth types (bearer/api_key/basic)
- Add internal test tools (calculator, time) for testing
- Create GenericToolExecutor for tool execution
- Add tool management API endpoints

Frontend:
- Add tools management page with CRUD operations
- Add CreateToolModal and EditToolModal for tool configuration
- Update ChatView to display tool call events in chat
- Add Navbar link for tools management
- Add i18n translations for all supported languages

Documentation:
- Add TOOL_CALLING_SYSTEM.md design document

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add toggle button to enable/disable tool calling from chat interface
- Move actions area inside input box border for better UI
- Use shadcn Button component for ChatInputAction
- Add i18n translation keys for tool toggle
- Backend: respect enable_tools parameter in both Go and TypeScript services
- When tools disabled, still use agent's system prompt but skip tool execution

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add GetToolDisplayName method to ToolService interface
- Query tool display names from builtin tools and database
- Update ChatHandler to use dynamic tool display names
- Add getBuiltinToolDisplayName method to TypeScript ToolService

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@indulgeback indulgeback merged commit b36ddc6 into main Jan 26, 2026
1 of 2 checks passed
@indulgeback indulgeback deleted the feat/agent-tool-calling branch March 20, 2026 02:52
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