mirror of
https://github.com/aljazceru/opencode.git
synced 2026-01-08 02:14:53 +01:00
fix: add type checking for MCP tool path parameters (#2073)
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
This commit is contained in:
@@ -903,7 +903,9 @@ func renderArgs(args *map[string]any, titleKey string) string {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if key == "filePath" || key == "path" {
|
if key == "filePath" || key == "path" {
|
||||||
value = util.Relative(value.(string))
|
if strValue, ok := value.(string); ok {
|
||||||
|
value = util.Relative(strValue)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if key == titleKey {
|
if key == titleKey {
|
||||||
title = fmt.Sprintf("%s", value)
|
title = fmt.Sprintf("%s", value)
|
||||||
|
|||||||
Reference in New Issue
Block a user