2 Commits

Author SHA1 Message Date
Ruslan Semagin 32c5c4b3a4 refactor: replace bool map with set-style map for internal channels (#472)
* refactor: replace bool map with set-style map for internal channels

Use map[string]struct{} and comma-ok idiom for clearer and more idiomatic membership checks.

* Update pkg/constants/channels.go

Co-authored-by: Harsh Bansal <122075346+harshbansal7@users.noreply.github.com>

---------

Co-authored-by: Harsh Bansal <122075346+harshbansal7@users.noreply.github.com>
2026-02-19 11:48:17 +01:00
yinwm 8851152cbd refactor(tools): extract shared logic for internal channels and tool definitions
- Add constants package with IsInternalChannel helper to centralize internal channel checks across agent, channels, and heartbeat services
- Add ToProviderDefs method to ToolRegistry to consolidate tool definition conversion logic used in agent loop and tool loop
- Refactor SubagentTool.Execute to use RunToolLoop for consistent tool execution with iteration tracking
- Remove duplicate inline map definitions and type assertion code throughout codebase
2026-02-13 15:05:16 +08:00