Skip to content

Help Claude know about your library by giving it the main APIs in a prompt and integrate it into VS Code

Notifications You must be signed in to change notification settings

msaroufim/llm_coder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ThunderKittens Assistant

NOTE: There are more serious projects like docs.github.com/en/copilot/customizing-copilot/adding-custom-instructions-for-github-copilot and cursor101.com/article/cursor-rules-customizing-ai-behavior that do the same thing but better

This extension provides an AI-powered code assistant, what it basically does right now is it lets you select a piece of code and ask questions about it. The nice thing is you can provide a long prompt of your library is intentended to be used at the top of extension.ts and then will just use Claude to provide suggestions.

Whilee this code can work with any arbitrary library, for this repo I'm showing how it's meant to be used with the ThunderKittens CUDA library.

Setup

npm install
npm run compile

Then with extensions.ts open, type F5 to open a new VSCode window with this extension loaded. I can look into publishing something like this if it becomes of interest.

Usage

Command palette is typically Ctrl+Shift+P or Cmd+Shift+P

  • Set your anthropic API key just once using Command Palette: ThunderKittens: Set API Key
  • Get examples of how to use the ThunderKittens API using Command Palette: ThunderKittens: Get API Help

Example

Ask about how to run an elementwise addition of two vectors:

Example

Next steps

  • Publish the extension so people can install it without having to compile it themselves
  • Add code suggestions in the editor directly
  • Play around with the prompt a bit more

About

Help Claude know about your library by giving it the main APIs in a prompt and integrate it into VS Code

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published