fix(coding-agent): use native clipboard text copy on desktop closes #2347
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user