(name, status, detail)
| 1028 | } |
| 1029 | |
| 1030 | addTool(name, status, detail) { |
| 1031 | let icon = '⚙'; |
| 1032 | let iconColor = this.theme.accent; |
| 1033 | if (status === 'ok') { |
| 1034 | icon = '✓'; |
| 1035 | iconColor = this.theme.success; |
| 1036 | } else if (status === 'err') { |
| 1037 | icon = '✗'; |
| 1038 | iconColor = this.theme.error; |
| 1039 | } |
| 1040 | |
| 1041 | const prefix = iconColor + ' TOOL ' + icon + ' ' + this.theme.border + '│ ' + ANSI.reset; |
| 1042 | const nameStr = name ? this.theme.accent + name + ANSI.reset + ': ' : ''; |
| 1043 | const detailStr = detail ? this.theme.muted + detail + ANSI.reset : ''; |
| 1044 | |
| 1045 | const line = prefix + nameStr + detailStr; |
| 1046 | const toolPanelLine = ` ${iconColor}${icon}${ANSI.reset} ${nameStr}${detailStr}`; |
| 1047 | |
| 1048 | // Add to both chat and tool panel |
| 1049 | this.chatLines.push(line); |
| 1050 | this.toolLines.push(toolPanelLine); |
| 1051 | this.chatScroll = 0; |
| 1052 | this.render(); |
| 1053 | } |
| 1054 | |
| 1055 | // Show a diff in the chat panel (non-blocking, inline) |
| 1056 | addDiff(filePath, oldStr, newStr, lineNum) { |
no test coverage detected