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

TOKops

datsyio

|
10 installs
| (0) | Free
A cost optimization middleware on the Token usage over LLMs
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

TokOps for VS Code

TokOps is an AI-powered coding assistant for Visual Studio Code that helps developers generate, explain, refactor, and test code with efficient context handling and cost-aware LLM routing.

TokOps supports both tagged-file workflows and untagged workspace requests. Developers can ask questions or request edits without manually attaching every file, while TokOps identifies likely workspace context before sending the request for analysis.

Features

AI Chat Assistant

Interact with an AI coding assistant directly inside Visual Studio Code.

Ask questions about your codebase, request implementation changes, troubleshoot issues, and receive actionable code suggestions.

Untagged Workspace Requests

Ask questions without manually attaching files.

TokOps can use available workspace context such as:

  • Active editor file
  • Open editor tabs
  • Workspace file paths
  • Symbol index
  • Diagnostics
  • Recent files
  • Project structure

For high-confidence requests, TokOps automatically gathers likely source files before analysis.

For low-confidence requests, TokOps asks for clarification instead of guessing or applying changes to the wrong file.

Context-Aware Analysis

Attach files manually when you want explicit control over context.

For untagged requests, TokOps can identify likely files based on function names, class names, file names, routes, diagnostics, and workspace symbols.

Code Explanation

Explain functions, classes, modules, selected code blocks, and implementation flows.

Example:

explain the get_query function

Code Refactoring

Request safe refactoring for selected code or workspace files.

TokOps supports refactoring tasks such as:

  • Rename functions, classes, and variables
  • Simplify implementations
  • Improve code structure
  • Extract reusable logic
  • Improve readability
  • Update module organization

Safe Code Changes

TokOps validates generated code changes before applying them.

For edits and refactors:

  • File content is verified before patching
  • Existing code blocks must match exactly
  • Changes are applied only to verified locations
  • Multi-file changes are supported
  • Manual review remains available before accepting changes

Test Generation

Generate unit tests for existing functions, classes, modules, and workflows.

TokOps can help create:

  • Unit tests
  • Edge-case tests
  • Error-handling tests
  • Regression tests
  • Mock-based tests

Missing Context Retrieval

When additional files are required, TokOps can request them through the existing job workflow.

The extension retrieves requested files, supplies them to the backend, and continues the same analysis job without requiring the user to restart the request.

Multi-File Analysis

TokOps supports analysis and code changes across multiple files.

When a request affects dependencies, imports, callers, routes, or related modules, TokOps can retrieve and analyze the required files before producing changes.

Cost Optimization

TokOps intelligently routes requests and limits context to relevant files.

This helps reduce unnecessary token usage while preserving useful code context for explanations, edits, refactors, and test generation.

Installation

  1. Install TokOps from the Visual Studio Code Marketplace.
  2. Open the TokOps sidebar in VS Code.
  3. Enter your TokOps API key.
  4. Open a workspace.
  5. Start chatting with the assistant.

You can either attach files manually or ask questions directly from your workspace.

Usage Examples

Explain a Function

explain the get_query function

Rename a Function

change the history function name to mithun

Request a Refactor

refactor the chat service to separate validation logic

Generate Tests

generate unit tests for insert_document

Fix an Error

fix the error in the active file

For vague requests such as:

fix this bug

TokOps may ask for clarification if it cannot safely identify the correct file or error context.

Extension Settings

TokOps contributes the following setting:

Setting Description
tokops.backendUrl Specifies the TokOps backend API URL.

Requirements

  • Visual Studio Code 1.120.0 or later
  • A valid TokOps API key
  • An opened workspace for workspace-aware requests

Supported Workflows

  • AI chat assistance
  • Code explanation
  • Code refactoring
  • Code editing
  • Test generation
  • Tagged file analysis
  • Untagged workspace analysis
  • Active-file analysis
  • Multi-file code changes
  • Missing context retrieval
  • Safe diff validation

Known Issues

  • Large workspaces may take additional time to index and analyze.
  • Untagged requests may require clarification when multiple files match the same symbol or feature name.
  • Some complex multi-file changes may require additional context retrieval before code changes can be generated.
  • Generated code modifications should always be reviewed before acceptance.

Release Notes

0.1.0

First production release of TokOps.

Included features:

  • AI Chat Assistant
  • Code Explanation
  • Code Refactoring
  • Code Editing
  • Test Generation
  • Tagged File Context Support
  • Untagged Workspace Request Routing
  • Active File Context Support
  • Workspace Symbol-Based File Discovery
  • Missing Context Retrieval and Resume Workflow
  • Multi-File Diff Support
  • Safe Patch Validation
  • Cost Optimization Routing

0.0.1

Initial public release.

Included features:

  • AI Chat Assistant
  • Code Explanation
  • Code Refactoring
  • Test Generation
  • Context File Support
  • Cost Optimization Routing
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft