Skip to content

Commit c3f691f

Browse files
committed
remove old inputfilename hack code (now set in the ToolVerifyInput callbacks)
1 parent 0186cfa commit c3f691f

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

pkg/aiusechat/usechat.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -398,14 +398,6 @@ func processToolCalls(stopReason *uctypes.WaveStopReason, chatOpts uctypes.WaveC
398398
// Send all data-tooluse packets at the beginning
399399
for _, toolCall := range stopReason.ToolCalls {
400400
if toolCall.ToolUseData != nil {
401-
// Extract filename from tool input for UI display before sending
402-
if inputMap, ok := toolCall.Input.(map[string]any); ok {
403-
if filename, ok := inputMap["filename"].(string); ok {
404-
toolCall.ToolUseData.InputFileName = filename
405-
} else if filename, ok := inputMap["file_name"].(string); ok {
406-
toolCall.ToolUseData.InputFileName = filename
407-
}
408-
}
409401
log.Printf("AI data-tooluse %s\n", toolCall.ID)
410402
_ = sseHandler.AiMsgData("data-tooluse", toolCall.ID, *toolCall.ToolUseData)
411403
updateToolUseDataInChat(chatOpts, toolCall.ID, toolCall.ToolUseData)

0 commit comments

Comments
 (0)