mirror of
https://github.com/mark3labs/kit.git
synced 2026-06-14 03:30:26 +00:00
use consistent naming
This commit is contained in:
+2
-13
@@ -271,11 +271,10 @@ func (r *MessageRenderer) RenderToolCallMessage(toolName, toolArgs string, times
|
||||
|
||||
// Create header with tool icon and name
|
||||
toolIcon := "🔧"
|
||||
toolNameFormatted := r.formatToolName(toolName)
|
||||
header := baseStyle.
|
||||
Foreground(toolColor).
|
||||
Bold(true).
|
||||
Render(fmt.Sprintf("%s Calling %s", toolIcon, toolNameFormatted))
|
||||
Render(fmt.Sprintf("%s Calling %s", toolIcon, toolName))
|
||||
|
||||
// Format arguments in a more readable way
|
||||
var argsContent string
|
||||
@@ -326,7 +325,7 @@ func (r *MessageRenderer) RenderToolMessage(toolName, toolArgs, toolResult strin
|
||||
// Tool name styling
|
||||
toolNameText := baseStyle.
|
||||
Foreground(mutedColor).
|
||||
Render(fmt.Sprintf("%s: ", r.formatToolName(toolName)))
|
||||
Render(fmt.Sprintf("%s: ", toolName))
|
||||
|
||||
// Tool arguments styling
|
||||
argsText := baseStyle.
|
||||
@@ -365,16 +364,6 @@ func (r *MessageRenderer) RenderToolMessage(toolName, toolArgs, toolResult strin
|
||||
}
|
||||
}
|
||||
|
||||
// formatToolName formats tool names for display
|
||||
func (r *MessageRenderer) formatToolName(name string) string {
|
||||
// Remove server prefix if present (server__tool format)
|
||||
parts := strings.Split(name, "__")
|
||||
if len(parts) == 2 {
|
||||
return parts[1]
|
||||
}
|
||||
return name
|
||||
}
|
||||
|
||||
// formatToolArgs formats tool arguments for display
|
||||
func (r *MessageRenderer) formatToolArgs(args string) string {
|
||||
// Remove outer braces and clean up JSON formatting
|
||||
|
||||
Reference in New Issue
Block a user