-
Notifications
You must be signed in to change notification settings - Fork 3.5k
feat: show users how to paste image in cli #7515
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3 issues found across 6 files
React with 👍 or 👎 to teach cubic. You can also tag @cubic-dev-ai
to give feedback, ask questions, or re-run the review.
import { logger } from "../../util/logger.js"; | ||
|
||
// Helper function to check if clipboard contains an image | ||
async function checkClipboardForImage(): Promise<boolean> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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}') }"`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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>
🎉 This PR is included in version 1.13.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 1.12.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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