wip: refactoring tui
This commit is contained in:
@@ -177,9 +177,7 @@ func renderToolInvocation(toolCall client.MessageToolInvocationToolCall, result
|
|||||||
if toolCall.ToolName == "opencode_edit" {
|
if toolCall.ToolName == "opencode_edit" {
|
||||||
filename := toolMap["filePath"].(string)
|
filename := toolMap["filePath"].(string)
|
||||||
title = styles.Padded().Render(fmt.Sprintf("%s: %s", toolName, filename))
|
title = styles.Padded().Render(fmt.Sprintf("%s: %s", toolName, filename))
|
||||||
// oldString := toolMap["oldString"].(string)
|
if finished && metadata["diff"] != nil {
|
||||||
// newString := toolMap["newString"].(string)
|
|
||||||
if finished {
|
|
||||||
patch := metadata["diff"].(string)
|
patch := metadata["diff"].(string)
|
||||||
formattedDiff, _ := diff.FormatDiff(patch, diff.WithTotalWidth(width))
|
formattedDiff, _ := diff.FormatDiff(patch, diff.WithTotalWidth(width))
|
||||||
body = strings.TrimSpace(formattedDiff)
|
body = strings.TrimSpace(formattedDiff)
|
||||||
|
|||||||
Reference in New Issue
Block a user