Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>TokenDockNew to Visual Studio Code? Get it now.
TokenDock

TokenDock

Vishwas Nayak

|
2 installs
| (0) | Free
Context, token, and session advisor for Copilot and Cursor. Helps you trim noise, manage tabs, and send better context.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

TokenDock — AI Context Control Center

Your AI Context Control Center for GitHub Copilot and Cursor. Analyse prompts, trim noisy tabs, track session cost, and send better context — all locally, no data leaves your machine.

What You Get

📋 Context Tab

  • Token status — See how many tokens your open tabs consume (green/yellow/red)
  • Token-Optimized Prompt — Mentions a function like processPayment? TokenDock inlines the exact code so Copilot doesn't load whole files. Shows token savings vs full-file context
  • Uncommitted Changes — Lists files with git changes so you can open them for Copilot to see your latest work
  • Large Open Tabs — Big files eating your token budget. Close the ones you don't need
  • Git History Insights — Scan your repo's commit history to find files that usually change together with what you're working on
  • Mode Recommendation — Suggests Ask vs Agent vs Plan based on prompt complexity (Ask is 25× cheaper than Agent for simple questions)

✏️ Prompt Tips Tab

  • 12+ rule-based checks — Catches vague language, missing #file: refs, filler phrases, multi-task prompts, no stopping condition, missing output format, and more
  • Suggested Prompt — A rewritten version of your prompt that's clearer and more specific. Copy or send to chat with one click
  • Local AI enhancement — Optionally use Qwen via Ollama for smarter prompt rewrites (rule-based works without it)

📊 Session Tab

  • 💰 Session cost — Real $ spent in your current chat session
  • ⚡ Response speed — Tracks how fast Copilot responds. If it's slowing down, start a new chat
  • 🧠 Context window fill — How full your chat memory is. Over 80% = Copilot starts forgetting earlier messages
  • ♻️ Cache reuse — % of tokens reused from cache. Higher = cheaper follow-ups. Stay in one chat to keep this high
  • 🔧 Tool usage — Which Copilot tools (file reads, edits, terminal) are used most in your session
  • 📜 Cross-session history — Aggregate stats across all your past Copilot chats in this workspace

How to Use

  1. Click the 🤖 TokenDock icon in the Activity Bar (left sidebar)
  2. Paste your prompt → click 🔍 Analyse (or Cmd+Shift+J / Ctrl+Shift+J)
  3. Context tab — close noisy tabs, open missing files, review inline code extraction
  4. Prompt Tips tab — expand any tip for details, copy the suggested prompt
  5. Session tab — monitor cost, speed, and cache reuse

Works With

  • VS Code — full support
  • Cursor — works with fallback for Cursor's chat commands

Local AI Setup (Optional)

TokenDock is fully functional without Ollama — rule-based suggestions work out of the box. Enable Ollama only if you want Qwen 2.5 Coder to rewrite your prompts.

One-time install

brew install ollama
ollama pull qwen2.5-coder:7b

Turning Ollama ON

  1. Cmd+Shift+P → TokenDock: Start Ollama (Qwen) (or open a terminal and run ollama serve yourself)
  2. Settings (Cmd+,) → enable copilotAdvisor.enableLocalAiSuggestedPrompt
  3. Suggested prompts now show 🤖 Qwen + rules

Turning Ollama OFF

  1. Disable copilotAdvisor.enableLocalAiSuggestedPrompt (this alone stops all HTTP calls)
  2. Cmd+Shift+P → TokenDock: Stop Ollama to kill the daemon (or run pkill -f "ollama serve" — Ollama has no built-in stop subcommand)
  3. Suggested prompts fall back to 📋 Rule-based

Settings

Setting Default Description
copilotAdvisor.enableLocalAiSuggestedPrompt false Enable Qwen AI enhancement (requires Ollama running)
copilotAdvisor.localAiModel qwen2.5-coder:7b Ollama model name
copilotAdvisor.localAiTimeoutMs 30000 Timeout for AI response (ms)
copilotAdvisor.fileExtensions [php, js, ts, ...] File types to scan
copilotAdvisor.maxFilesToScan 50 Max workspace files to analyse

Keyboard Shortcuts

Shortcut Action
Cmd+Shift+J (Mac) / Ctrl+Shift+J (Win/Linux) Run analysis
Cmd+Enter in sidebar input Run analysis
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft