- 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
16 lines
503 B
Go
16 lines
503 B
Go
// Package constants provides shared constants across the codebase.
|
|
package constants
|
|
|
|
// InternalChannels defines channels that are used for internal communication
|
|
// and should not be exposed to external users or recorded as last active channel.
|
|
var InternalChannels = map[string]bool{
|
|
"cli": true,
|
|
"system": true,
|
|
"subagent": true,
|
|
}
|
|
|
|
// IsInternalChannel returns true if the channel is an internal channel.
|
|
func IsInternalChannel(channel string) bool {
|
|
return InternalChannels[channel]
|
|
}
|