fix(coding-agent): use native clipboard text copy on desktop closes #2347

This commit is contained in:
Mario Zechner
2026-03-18 22:41:43 +01:00
parent fd385ecf06
commit ce15f40769
3 changed files with 15 additions and 4 deletions

View File

@@ -1988,7 +1988,7 @@ export class InteractiveMode {
return;
}
if (text === "/copy") {
this.handleCopyCommand();
await this.handleCopyCommand();
this.editor.setText("");
return;
}
@@ -4064,7 +4064,7 @@ export class InteractiveMode {
}
}
private handleCopyCommand(): void {
private async handleCopyCommand(): Promise<void> {
const text = this.session.getLastAssistantText();
if (!text) {
this.showError("No agent messages to copy yet.");
@@ -4072,7 +4072,7 @@ export class InteractiveMode {
}
try {
copyToClipboard(text);
await copyToClipboard(text);
this.showStatus("Copied last agent message to clipboard");
} catch (error) {
this.showError(error instanceof Error ? error.message : String(error));