diff --git a/static/src/components/chat/actions/ToolAction.vue b/static/src/components/chat/actions/ToolAction.vue index 0c86a32..2a12b3b 100644 --- a/static/src/components/chat/actions/ToolAction.vue +++ b/static/src/components/chat/actions/ToolAction.vue @@ -306,8 +306,8 @@ function renderWriteFile(result: any, args: any): string { if (result.success && content) { html += '
'; const lines = content.split('\n'); - lines.forEach((line: string) => { - html += `
+ ${escapeHtml(line)}
`; + lines.forEach((line: string, idx: number) => { + html += `
${idx + 1}+${escapeHtml(line)}
`; }); html += '
'; } diff --git a/static/src/components/chat/actions/toolRenderers.ts b/static/src/components/chat/actions/toolRenderers.ts index 9a21dbb..9f374ce 100644 --- a/static/src/components/chat/actions/toolRenderers.ts +++ b/static/src/components/chat/actions/toolRenderers.ts @@ -246,8 +246,8 @@ function renderWriteFile(result: any, args: any): string { if (result.success && content) { html += '
'; const lines = content.split('\n'); - lines.forEach((line: string) => { - html += `
+ ${escapeHtml(line)}
`; + lines.forEach((line: string, idx: number) => { + html += `
${idx + 1}+${escapeHtml(line)}
`; }); html += '
'; }