Skip to content

barakadax/SpinTheWheelVSCodeExtension

Repository files navigation

Spin the Wheel

A lightweight VS Code extension that adds an interactive "Spin the Wheel" to the Activity Bar for making quick random decisions, selecting people for standups, or just having fun.

Features

  • Activity Bar View: Open the wheel from the side bar without leaving your editor.
  • Customizable Options: Enter comma-separated items; duplicates are filtered automatically.
  • Smart Validation: Minimum 2 options, maximum 20 distinct options; duplicates removed.
  • Colors & Visuals: Each segment gets an autogenerated distinct HSL color and the wheel uses a smooth conic-gradient spin animation.
  • AI Integration: After a spin, the winning option is sent to the built-in VS Code AI chat (Copilot/chat) and — if installed — to the Claude Dev extension (saoudrizwan.claude-dev).

How to Use

  1. Click the Spin the Wheel icon in the Activity Bar.
  2. In the options field, enter items separated by commas (e.g. Alice, Bob, Charlie). Duplicates are removed automatically.
  3. Optionally enter an AI sentence in the top input and use {{res}} as a placeholder — it will be replaced with the winner before sending to the Copilot, Claude or Cline.
  4. Click the SPIN button. The wheel spins, the winner is shown, and a message is posted to the editor view which will:
    • Open the built-in AI chat with the query.
    • Add the query to the Claude Dev extension chat if that extension is installed.

Notes

  • The result display uses an accessible live region so screen readers receive the winner announcement.
  • If you supply a command template containing {{res}}, that placeholder will be replaced with the winning option before sending.

Extension Settings

This extension contributes the following settings:

  • spinTheWheel.enableConfetti: Toggle the big celebration screen with falling canvas confetti in the center of the editor (default: true).
  • spinTheWheel.confettiScreenCloseTimeout: Timeout in seconds before the confetti celebration window is closed automatically. If set to null, 0, or not defined, the window will remain open (default: null).
  • spinTheWheel.targetAI: Select which AI chat assistant to send the spin results to. Options: "copilot", "cline", "claude", "all", or "no" (default: "copilot").

Development & Packaging

  • Build/compile TypeScript for publishing or local testing:
npm run compile
  • Package for the VS Code Marketplace:
vsce package

Or for Windows users:

npx vsce package
  • Run the extension in the Extension Development Host from VS Code (press F5).

Requirements

  • VS Code 1.108.1 or higher.

About

Usage of SpinTheWheel repo as Visual Studio Code extension, take result of spin and inject into copilot/cline prompt

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors