Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,30 @@ View your app in AI Studio: https://ai.studio/apps/drive/12_bAVgqXJhSXFdrGuAlohv
2. Set the `GEMINI_API_KEY` in [.env.local](.env.local) to your Gemini API key
3. Run the app:
`npm run dev`

## Run as a VS Code Extension Locally

To test the extension locally:

1. **Install Dependencies:**
- Run `npm install` in the root directory.
- Run `npm install` in the `vscode-extension` directory.

2. **Build the React App:**
- Run `npm run build` from the root directory. This will build the webview and place it in `vscode-extension/webview-dist`.

3. **Compile the Extension:**
- In the `vscode-extension` directory, run `npm run compile`.

4. **Package the Extension:**
- In the `vscode-extension` directory, run `npm install -g vsce`.
- Run `vsce package`. This will create a `.vsix` file.

5. **Install the Extension:**
- In VS Code, go to the Extensions view.
- Click the "..." menu and select "Install from VSIX...".
- Select the `.vsix` file you just created.

6. **Run the Extension:**
- Open the Command Palette (`Cmd+Shift+P` or `Ctrl+Shift+P`).
- Run the "Annotate Image from Clipboard" command.
17 changes: 17 additions & 0 deletions vscode-extension/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Extension Tests",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/dist/test/suite"
],
"outFiles": [
"${workspaceFolder}/dist/test/**/*.js"
]
}
]
}
1 change: 1 addition & 0 deletions vscode-extension/.vscodeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.vscode-test/
Loading