Skip to content

feat(vscode): add setting to toggle token/cost counter visibility - #1128

Open
awhite0030 wants to merge 1 commit into
Nano-Collective:mainfrom
awhite0030:feature/toggle-token-counter-4051822223044640502
Open

feat(vscode): add setting to toggle token/cost counter visibility#1128
awhite0030 wants to merge 1 commit into
Nano-Collective:mainfrom
awhite0030:feature/toggle-token-counter-4051822223044640502

Conversation

@awhite0030

Copy link
Copy Markdown
Contributor

Description

Brief description of what this PR does

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Changeset

  • Added a changeset (pnpm changeset) describing this change for the changelog

Docs-only or internal chores need no changeset (or run pnpm changeset --empty to note that intentionally).

Testing

Automated Tests

  • New features include passing tests in .spec.ts/tsx files
  • All existing tests pass (pnpm test:all completes successfully)
  • Tests cover both success and error scenarios

Manual Testing

  • Tested with Ollama
  • Tested with OpenRouter
  • Tested with OpenAI-compatible API
  • Tested MCP integration (if applicable)

Checklist

  • If this was for an open issue, I was assigned to it
  • Code follows project style guidelines
  • Self-review completed
  • Documentation updated (if needed)
  • No breaking changes (or clearly documented)
  • Appropriate logging added using structured logging (see CONTRIBUTING.md)

Root cause: The token and cost counter is shown unconditionally, which creates visual noise for some users.
Fix: Added a VS Code setting nanocoder.showTokenUsage (defaulting to false) and plumbed it into the webview payload so that the UI only renders the counter when enabled. Created a changeset.
Validation: Ran pnpm run build, pnpm test:format, pnpm test:lint, pnpm test:types, pnpm test:knip, and targeted tests pnpm test:ava plugins/vscode/src/. All passed. Validated changeset logic with node scripts/validate-changesets.js.
Fixes #1096

Fixes #1096

Added the `nanocoder.showTokenUsage` setting to toggle visibility of
the token usage and cost estimator in the VS Code chat panel.
@github-actions github-actions Bot added the area:vscode VS Code extension and host integration label Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:vscode VS Code extension and host integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Add setting to toggle Token/Cost counter visibility (default to off)

1 participant