wip: refactoring tui

This commit is contained in:
adamdottv
2025-06-12 16:00:20 -05:00
parent ca0ea3f94d
commit 653965ef59
14 changed files with 502 additions and 1402 deletions

View File

@@ -292,8 +292,8 @@ func renderToolInvocation(
toolArgs = renderArgs(&toolArgsMap, "filePath")
title = fmt.Sprintf("Read: %s %s", toolArgs, elapsed)
body = ""
filename := toolArgsMap["filePath"].(string)
if metadata["preview"] != nil {
if metadata["preview"] != nil && toolArgsMap["filePath"] != nil {
filename := toolArgsMap["filePath"].(string)
body = metadata["preview"].(string)
body = renderFile(filename, body, WithTruncate(6))
}