File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
pkg/tui/components/messages Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import (
1515 "github.com/docker/cagent/pkg/runtime"
1616 "github.com/docker/cagent/pkg/session"
1717 "github.com/docker/cagent/pkg/tools"
18+ "github.com/docker/cagent/pkg/tools/builtin"
1819 "github.com/docker/cagent/pkg/tui/components/message"
1920 "github.com/docker/cagent/pkg/tui/components/scrollbar"
2021 "github.com/docker/cagent/pkg/tui/components/tool"
@@ -676,6 +677,12 @@ func (m *model) needsSeparator(index int) bool {
676677 }
677678 currentIsToolCall := m .messages [index ].Type == types .MessageTypeToolCall
678679 nextIsToolCall := m .messages [index + 1 ].Type == types .MessageTypeToolCall
680+
681+ // Always add a separator before transfer_task, even between consecutive tool calls
682+ if nextIsToolCall && m .messages [index + 1 ].ToolCall .Function .Name == builtin .ToolNameTransferTask {
683+ return true
684+ }
685+
679686 return ! currentIsToolCall || ! nextIsToolCall
680687}
681688
You can’t perform that action at this time.
0 commit comments