MCPcopy
hub / github.com/Doorman11991/smallcode / addTool

Method addTool

src/tui/fullscreen.js:1030–1053  ·  view source on GitHub ↗
(name, status, detail)

Source from the content-addressed store, hash-verified

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) {

Callers 7

runTUIFunction · 0.95
verifyAndFixCompiledFunction · 0.80
runAgentLoopFunction · 0.80
initLSPFunction · 0.80
chatCompletionFunction · 0.80
mainFunction · 0.80
executeToolFunction · 0.80

Calls 1

renderMethod · 0.95

Tested by

no test coverage detected