Conversation
| import { logger } from "../../util/logger.js"; | ||
|
|
||
| // Helper function to check if clipboard contains an image | ||
| async function checkClipboardForImage(): Promise<boolean> { |
Contributor
There was a problem hiding this comment.
Duplicate clipboard helper implementations; consider extracting shared helpers to a single module and reusing to avoid divergence.
Prompt for AI agents
Address the following comment on extensions/cli/src/ui/hooks/useClipboardMonitor.ts at line 6:
<comment>Duplicate clipboard helper implementations; consider extracting shared helpers to a single module and reusing to avoid divergence.</comment>
<file context>
@@ -0,0 +1,190 @@
+import { logger } from "../../util/logger.js";
+
+// Helper function to check if clipboard contains an image
+async function checkClipboardForImage(): Promise<boolean> {
+ try {
+ const os = await import("os");
</file context>
| } else if (platform === "win32") { | ||
| // Windows: Use PowerShell to save clipboard image | ||
| await execAsync( | ||
| `powershell -command "$image = Get-Clipboard -Format Image; if ($image) { $image.Save('${tempImagePath}') }"`, |
Contributor
There was a problem hiding this comment.
Unescaped single quotes in PowerShell path can break the command; escape single quotes in tempImagePath before embedding.
Prompt for AI agents
Address the following comment on extensions/cli/src/ui/hooks/useClipboardMonitor.ts at line 73:
<comment>Unescaped single quotes in PowerShell path can break the command; escape single quotes in tempImagePath before embedding.</comment>
<file context>
@@ -0,0 +1,190 @@
+ } else if (platform === "win32") {
+ // Windows: Use PowerShell to save clipboard image
+ await execAsync(
+ `powershell -command "$image = Get-Clipboard -Format Image; if ($image) { $image.Save('${tempImagePath}') }"`,
+ );
+ } else if (platform === "linux") {
</file context>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Contributor
Author
|
🎉 This PR is included in version 1.13.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Contributor
Author
|
🎉 This PR is included in version 1.12.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
this is a follow up to the image pasting pr form yesterday. shows users how to paste when a clipboard image is detected, and solves some formatting bugs
Summary by cubic
Adds clipboard image detection to the CLI and shows a clear “Press Ctrl+V to paste image” hint when an image is available. Also refines paste handling and fixes minor status bar formatting.
New Features
Bug Fixes