fix(tui): sorted tool arg maps

This commit is contained in:
adamdottv 2025-06-19 14:07:33 -05:00
parent 193718034b
commit 5540503bee
No known key found for this signature in database
GPG key ID: 9CB48779AF150E75

View file

@ -308,10 +308,15 @@ func renderToolInvocation(
if m, ok := value.(map[string]any); ok {
toolArgsMap = m
firstKey := ""
keys := make([]string, 0, len(toolArgsMap))
for key := range toolArgsMap {
firstKey = key
break
keys = append(keys, key)
}
slices.Sort(keys)
firstKey := ""
if len(keys) > 0 {
firstKey = keys[0]
}
toolArgs = renderArgs(&toolArgsMap, firstKey)