Item logo image for VSCode Chatgpt Easy Copy

VSCode Chatgpt Easy Copy

1.0(

1 rating

)
Item media 2 (screenshot) for VSCode Chatgpt Easy Copy
Item media 1 (screenshot) for VSCode Chatgpt Easy Copy
Item media 2 (screenshot) for VSCode Chatgpt Easy Copy
Item media 1 (screenshot) for VSCode Chatgpt Easy Copy
Item media 1 (screenshot) for VSCode Chatgpt Easy Copy
Item media 2 (screenshot) for VSCode Chatgpt Easy Copy

Overview

Directly copy selected code or files from vscode to a chatgpt tab in browser

VSCode Chatgpt Easy Copy is a simple utility to make it slightly convenient to copy code/text and files from vscode into chatgpt's textarea using commands. There are two components in the utility - this chrome extension and a vscode extension. Both must be installed and running for it to work. The vscode counterpart can be installed from the extension marketplace or manually following the instructions at https://github.com/nikhils98/vscode-chatgpt-easy-copy/tree/main - How it works? The vscode extension initializes a websocket server at port 8765 on startup which the chrome extension connects to. On execution of a command, the selected text or contents of file(s) are sent to the chrome extension, via websocket, which manipulates chatgpt's DOM to input in the prompt textarea and send. More information about the vscode extension can be found at https://github.com/nikhils98/vscode-chatgpt-easy-copy/tree/main/vscode -- Service Worker This is where the crux of the logic resides for the chrome extension. It's a background script managing the websocket connection to the vscode extension and responsible for injecting a function to manipulate chatgpt's DOM when a command is received. It uses chrome's scripting api (https://developer.chrome.com/docs/extensions/reference/api/scripting#description) to inject the function in runtime and requires host permissions for chatgpt to do so. A service worker can become inactive after 30s of idle time so to prevent that a keepalive message is sent to the websocket server every 20s. In most circumstances, the service worker should be active as long as chatgpt or vscode is running but if it gets inactive at some point, you can try one of the following: 1. Refresh chatgpt tab. 2. Reload the extension from Extensions page. After reload, chatgpt tab must be refreshed as well. -- Content Script: Ping Server Worker This runs only when chatgpt is open. It sends a ping message to the service worker every 20s to keep it active when vscode isn't open. Essentially if you open vscode after the service worker had become inactive, opening a tab of chatgpt will make it active again. - Note: 1. At least one tab of chatgpt must be open. If multiple tabs are open, command is sent to only one. 2. You may see an error related to Websocket connection failure in extension console especially if installed manually. This will be the case when vscode is not running. It can be ignored as the service worker retries connection every second so when you run vscode it should connect.

Details

  • Version
    0.0.1
  • Updated
    March 14, 2024
  • Offered by
    Nikhil Satiani
  • Size
    14.67KiB
  • Languages
    English
  • Developer
    Email
    nikhil.satiani@gmail.com
  • Non-trader
    This developer has not identified itself as a trader. For consumers in the European Union, please note that consumer rights do not apply to contracts between you and this developer.

Privacy

Manage extensions and learn how they're being used in your organization
The developer has disclosed that it will not collect or use your data. To learn more, see the developer’s privacy policy.

This developer declares that your data is

  • Not being sold to third parties, outside of the approved use cases
  • Not being used or transferred for purposes that are unrelated to the item's core functionality
  • Not being used or transferred to determine creditworthiness or for lending purposes

Related

Claude Usage Tracker

4.7

Helps you track your claude.ai usage caps based on tokens sent.

GPT Search: Chat History

4.6

Search your ChatGPT conversation history.

Github to vscode

3.7

Quickly open github repos with vscode.dev or clone a repo directly to vscode.

Quick Open in VSCode

0.0

Quickly and easily open file links in VSCode

ChatGPT Organizer

3.9

Chrome extension To organize chats in ChatGPT

Open in VSCode

0.0

Open VSCode directly from GitHub

Clone in VS Code

5.0

Clone any GitHub, GitLab or Bitbucket repository in Visual Studio Code

BringYourAI: Connect VSCode to ChatGPT

0.0

Instant codebase context on any AI chat website.

VSCode Extensions Installer

0.0

A browser extension to install VSCode extensions directly from the marketplace.

Cleanest AI - organize into folders

5.0

Tame the Chat Chaos: Organize ChatGPT Conversations and LinkedIn Posts

ChatGPT Folder to Text

0.0

Adds a button for converting the folder contents into one .txt file and adding this to the ChatGPT chat.

Searchable ChatGPT: search GPT conversation history

4.0

Search ChatGPT conversation history instantly. Fully local and private. Press sidebar button or hotkey

Claude Usage Tracker

4.7

Helps you track your claude.ai usage caps based on tokens sent.

GPT Search: Chat History

4.6

Search your ChatGPT conversation history.

Github to vscode

3.7

Quickly open github repos with vscode.dev or clone a repo directly to vscode.

Quick Open in VSCode

0.0

Quickly and easily open file links in VSCode

ChatGPT Organizer

3.9

Chrome extension To organize chats in ChatGPT

Open in VSCode

0.0

Open VSCode directly from GitHub

Clone in VS Code

5.0

Clone any GitHub, GitLab or Bitbucket repository in Visual Studio Code

BringYourAI: Connect VSCode to ChatGPT

0.0

Instant codebase context on any AI chat website.

Google apps