Skip to content

Commit 3c5d290

Browse files
chore: only add agent tools for chat tools
1 parent f602040 commit 3c5d290

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

pkg/types/tool.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -660,10 +660,12 @@ func (t Tool) addContextExportedTools(prg Program, result *toolRefSet) error {
660660
func (t Tool) getCompletionToolRefs(prg Program, agentGroup []ToolReference) ([]ToolReference, error) {
661661
result := toolRefSet{}
662662

663-
for _, agent := range agentGroup {
664-
// don't add yourself
665-
if agent.ToolID != t.ID {
666-
result.Add(agent)
663+
if t.Chat {
664+
for _, agent := range agentGroup {
665+
// don't add yourself
666+
if agent.ToolID != t.ID {
667+
result.Add(agent)
668+
}
667669
}
668670
}
669671

0 commit comments

Comments
 (0)