UI: add copy button to user messages
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@
|
||||
"name": "g1nation",
|
||||
"displayName": "G1nation",
|
||||
"description": "100% local AI coding agent for VS Code. Create files, edit code, run commands, and work offline with Ollama or LM Studio.",
|
||||
"version": "2.2.60",
|
||||
"version": "2.2.61",
|
||||
"publisher": "connectailab",
|
||||
"license": "MIT",
|
||||
"icon": "assets/icon.png",
|
||||
|
||||
@@ -1108,12 +1108,13 @@ export class SidebarChatProvider implements vscode.WebviewViewProvider, BridgeIn
|
||||
body.innerText = text;
|
||||
} else {
|
||||
body.innerHTML = fmt(text);
|
||||
const copyBtn = document.createElement('button');
|
||||
copyBtn.className = 'copy-btn'; copyBtn.innerText = '📋 Copy';
|
||||
copyBtn.onclick = (e) => { e.stopPropagation(); copyToClipboard(msgEl._raw, copyBtn); };
|
||||
msgEl.appendChild(copyBtn);
|
||||
}
|
||||
|
||||
const copyBtn = document.createElement('button');
|
||||
copyBtn.className = 'copy-btn'; copyBtn.innerText = '📋 Copy';
|
||||
copyBtn.onclick = (e) => { e.stopPropagation(); copyToClipboard(msgEl._raw, copyBtn); };
|
||||
msgEl.appendChild(copyBtn);
|
||||
|
||||
msgEl.appendChild(head); msgEl.appendChild(body);
|
||||
chat.appendChild(msgEl); chat.scrollTop = chat.scrollHeight;
|
||||
return { body, msgEl };
|
||||
|
||||
Reference in New Issue
Block a user