Skip to content

Add quickpic extension#27309

Open
antkuznetsov wants to merge 3 commits intoraycast:mainfrom
antkuznetsov:ext/quickpic
Open

Add quickpic extension#27309
antkuznetsov wants to merge 3 commits intoraycast:mainfrom
antkuznetsov:ext/quickpic

Conversation

@antkuznetsov
Copy link
Copy Markdown

@antkuznetsov antkuznetsov commented Apr 20, 2026

Description

QuickPic is a Raycast extension that lets you save images under keywords and later paste them as files into any app.

Commands

  • QuickPic Library: search your saved images and paste or copy them as files
  • Add Image: import an image from a local path
  • Add Selected Finder Image: import the currently selected Finder image using command arguments

How it works

  • Imported image files are copied into the extension support directory (environment.supportPath)
  • Metadata is stored in Raycast Local Storage as a JSON index
  • Pasting uses Raycast's Clipboard API with { file: ... }, so target apps receive an actual file attachment

Screencast

CleanShot.2026-04-20.at.23.09.54.mov

Checklist

- Add Raycast metadata screenshots
- Remove unused icon asset
@raycastbot raycastbot added new extension Label for PRs with new extensions platform: macOS labels Apr 20, 2026
@raycastbot
Copy link
Copy Markdown
Collaborator

Congratulations on your new Raycast extension! 🚀

We're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 10-15 business days.

Once the PR is approved and merged, the extension will be available on our Store.

@antkuznetsov antkuznetsov marked this pull request as ready for review April 20, 2026 20:53
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 20, 2026

Greptile Summary

This PR adds the QuickPic extension, which allows users to save images under keywords and later paste them as files into any app, using Raycast's LocalStorage for metadata and the extension support directory for file storage. The implementation is well-structured and the three commands (library view, add image form, and no-view Finder import) are all solid. A few small housekeeping items need addressing before merge.

Confidence Score: 5/5

Safe to merge; all findings are P2 style/convention issues

All remaining findings are P2: a non-standard printWidth, missing $schema, a manually-defined Arguments type, and a missing defineConfig wrapper. No P0/P1 issues were found. The orphaned-file risk on storage failure is unlikely in practice and does not affect happy-path behavior.

extensions/quickpic/.prettierrc, extensions/quickpic/eslint.config.js, extensions/quickpic/package.json

Important Files Changed

Filename Overview
extensions/quickpic/src/lib/quickpic.ts Core library logic for import/read/remove; orphaned file risk if writeLibrary fails after copyFile succeeds
extensions/quickpic/src/library.tsx List view for saved images with paste, copy, delete, and refresh actions; clean and correct implementation
extensions/quickpic/src/add-image.tsx Form command for importing images via file picker, Finder selection, or clipboard; solid implementation
extensions/quickpic/src/add-selected-image.ts No-view command that imports the selected Finder item; manually defines Arguments type that should use auto-generated raycast-env.d.ts types
extensions/quickpic/package.json Extension manifest is well-structured but missing the required $schema field
extensions/quickpic/.prettierrc printWidth is set to 100; Raycast standard requires 120
extensions/quickpic/eslint.config.js ESLint config skips the recommended defineConfig wrapper required for ESLint v9+
extensions/quickpic/src/types.ts Clean type definitions for library items and import input; no issues
Prompt To Fix All With AI
This is a comment left during a code review.
Path: extensions/quickpic/.prettierrc
Line: 4

Comment:
**`printWidth` should be 120**

The standard Raycast Prettier configuration requires `printWidth: 120`. Using `100` deviates from the required style across all extensions.

```suggestion
  "printWidth": 120
```

**Rule Used:** What: All extensions must use the standard Raycast... ([source](https://app.greptile.com/review/custom-context?memory=7be27780-7fcb-4602-9122-17c47fdd52ee))

How can I resolve this? If you propose a fix, please make it concise.

---

This is a comment left during a code review.
Path: extensions/quickpic/eslint.config.js
Line: 1

Comment:
**Use `defineConfig` from `eslint/config`**

ESLint v9+ recommends wrapping the config in `defineConfig` from `eslint/config` to correctly handle nested arrays from presets.

```suggestion
const { defineConfig } = require("eslint/config");
const raycastConfig = require("@raycast/eslint-config");

module.exports = defineConfig([...raycastConfig.flat()]);
```

**Rule Used:** What: Enforce importing `defineConfig` from `"esli... ([source](https://app.greptile.com/review/custom-context?memory=645a7150-4078-490e-a70c-d6aad94e0cf5))

How can I resolve this? If you propose a fix, please make it concise.

---

This is a comment left during a code review.
Path: extensions/quickpic/package.json
Line: 1-3

Comment:
**Missing `$schema` field**

Adding the Raycast schema reference enables editor autocomplete, validation, and IntelliSense for all Raycast-specific fields.

```suggestion
{
  "$schema": "https://www.raycast.com/schemas/extension.json",
  "name": "quickpic",
```

**Rule Used:** What: Require Raycast extension projects to includ... ([source](https://app.greptile.com/review/custom-context?memory=9c275ba8-ead2-4952-b909-12275352b16b))

How can I resolve this? If you propose a fix, please make it concise.

---

This is a comment left during a code review.
Path: extensions/quickpic/src/add-selected-image.ts
Line: 5-8

Comment:
**Manually defined `Arguments` interface**

The `AddSelectedImageArguments` type mirrors what Raycast auto-generates in `raycast-env.d.ts` when the extension runs. Defining it manually can silently drift out of sync with the actual `package.json` argument schema. Remove the manual interface and use the auto-generated `Arguments.AddSelectedImage` type instead:

```typescript
export default async function Command(
  props: LaunchProps<{ arguments: Arguments.AddSelectedImage }>,
) {
```

**Rule Used:** What: Don't manually define `Preferences` for `get... ([source](https://app.greptile.com/review/custom-context?memory=d93fc9fb-a45d-4479-a6a4-b1b4af98ebc8))

How can I resolve this? If you propose a fix, please make it concise.

---

This is a comment left during a code review.
Path: extensions/quickpic/src/lib/quickpic.ts
Line: 79-99

Comment:
**Orphaned file on library write failure**

`fs.copyFile` at line 81 writes the image to disk before `writeLibrary` updates `LocalStorage`. If `writeLibrary` throws (e.g. storage quota exceeded), the copied file is left on disk with no metadata entry to track or clean it up. Consider wrapping in a try/catch that removes the file on failure:

```typescript
await fs.mkdir(path.dirname(targetPath), { recursive: true });
await fs.copyFile(sourcePath, targetPath);

try {
  const items = await readLibrary();
  items.unshift({ ...item, filePath: targetPath });
  await writeLibrary(items);
} catch (err) {
  await fs.rm(targetPath, { force: true });
  throw err;
}
```

How can I resolve this? If you propose a fix, please make it concise.

Reviews (1): Last reviewed commit: "Add quickpic extension" | Re-trigger Greptile

Comment thread extensions/quickpic/.prettierrc Outdated
Comment thread extensions/quickpic/eslint.config.js Outdated
Comment thread extensions/quickpic/package.json
Comment thread extensions/quickpic/src/add-selected-image.ts Outdated
Comment thread extensions/quickpic/src/lib/quickpic.ts Outdated
- Create LICENSE
- Clean up copied image on library write failure
- Ignore Raycast generated env typings
- Use generated Raycast argument types
- Add the Raycast schema reference
- Wrap ESLint config with defineConfig
- Fix Prettier printWidth
- Fix Prettier printWidth
- Add Raycast metadata screenshots
- Add Raycast metadata screenshots
- Remove unused icon asset
- Remove unused icon asset
@raycastbot
Copy link
Copy Markdown
Collaborator

This pull request has been automatically marked as stale because it did not have any recent activity.

It will be closed if no further activity occurs in the next 7 days to keep our backlog clean 😊

@raycastbot raycastbot added the status: stalled Stalled due inactivity label May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new extension Label for PRs with new extensions platform: macOS status: stalled Stalled due inactivity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants