Skip to content

The open source coding agent.

TypeScript

fix: add type checking for MCP tool path parameters (#2073)

Aiden Clinead76d7e57d5c
diff --git a/packages/tui/internal/components/chat/message.go b/packages/tui/internal/components/chat/message.go
index 15db3753985..65c476e15b9 100644
--- a/packages/tui/internal/components/chat/message.go
+++ b/packages/tui/internal/components/chat/message.go
@@ -903,7 +903,9 @@ func renderArgs(args *map[string]any, titleKey string) string {
continue
}
if key == "filePath" || key == "path" {
- value = util.Relative(value.(string))
+ if strValue, ok := value.(string); ok {
+ value = util.Relative(strValue)
+ }
}
if key == titleKey {
title = fmt.Sprintf("%s", value)