Skip to content

Conversation

@markijbema
Copy link
Contributor

This PR improves the autocomplete tooltip messaging when a user has no credits in their Kilo Code account.

Changes

When a user has a Kilo Code account with no credits, the autocomplete status bar now shows a helpful message explaining that they need to add credits to use autocomplete, rather than just showing a generic token error.

This follows the messaging improvements made in PR #4784 for the settings UI.

Files Changed

  • src/services/ghost/types.ts: Added hasKilocodeProfileWithNoBalance property to GhostStatusBarStateProps
  • src/services/ghost/GhostServiceManager.ts: Pass the hasKilocodeProfileWithNoBalance flag to GhostStatusBar
  • src/services/ghost/GhostStatusBar.ts: Added renderNoCreditsError() method to show a helpful no-credits message
  • src/i18n/locales/en/kilocode.json: Added noCredits translation key for the tooltip message
  • .changeset/quiet-moons-sell.md: Added changeset for this change

When a user has a Kilo Code account with no credits, the autocomplete
status bar now shows a helpful message explaining that they need to add
credits to use autocomplete, rather than just showing a generic token
error.

This follows the messaging improvements made in PR #4784 for the settings UI.
@changeset-bot
Copy link

changeset-bot bot commented Jan 7, 2026

🦋 Changeset detected

Latest commit: 7d3bc65

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
kilo-code Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@kiloconnect
Copy link
Contributor

kiloconnect bot commented Jan 7, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

This PR improves autocomplete tooltip messaging by replacing the generic tokenError message with two more specific and helpful messages:

  • noCredits - Shows when a Kilo Code account has no credits, with a link to settings
  • noUsableProvider - Shows when no autocomplete model is configured, listing supported providers

Key Changes

  • Replaces tokenError translation key with noCredits and noUsableProvider in all 22 locale files
  • Updates GhostStatusBar.ts to use MarkdownString for clickable links in tooltips
  • Replaces hasValidToken with hasKilocodeProfileWithNoBalance and hasNoUsableProvider flags in the status bar state
  • Adds getSupportedProviderDisplayNames() helper to display supported autocomplete providers

Implementation Notes

  • The render logic correctly prioritizes showing "no credits" error over "no usable provider" error
  • The hasNoUsableProvider() method correctly excludes the case where a kilocode profile exists but has no balance
  • All locale files have been updated with proper translations (not just English)
  • The import from webview-ui follows an established pattern in the codebase (GhostModel.ts already imports from there)
Files Reviewed (27 files)
  • .changeset/quiet-moons-sell.md - Changeset for the PR
  • src/i18n/locales/en/kilocode.json - Added new translation keys
  • src/i18n/locales/ar/kilocode.json - Updated translations
  • src/i18n/locales/ca/kilocode.json - Updated translations
  • src/i18n/locales/cs/kilocode.json - Updated translations
  • src/i18n/locales/de/kilocode.json - Updated translations
  • src/i18n/locales/es/kilocode.json - Updated translations
  • src/i18n/locales/fr/kilocode.json - Updated translations
  • src/i18n/locales/hi/kilocode.json - Updated translations
  • src/i18n/locales/id/kilocode.json - Updated translations
  • src/i18n/locales/it/kilocode.json - Updated translations
  • src/i18n/locales/ja/kilocode.json - Updated translations
  • src/i18n/locales/ko/kilocode.json - Updated translations
  • src/i18n/locales/nl/kilocode.json - Updated translations
  • src/i18n/locales/pl/kilocode.json - Updated translations
  • src/i18n/locales/pt-BR/kilocode.json - Updated translations
  • src/i18n/locales/ru/kilocode.json - Updated translations
  • src/i18n/locales/th/kilocode.json - Updated translations
  • src/i18n/locales/tr/kilocode.json - Updated translations
  • src/i18n/locales/uk/kilocode.json - Updated translations
  • src/i18n/locales/vi/kilocode.json - Updated translations
  • src/i18n/locales/zh-CN/kilocode.json - Updated translations
  • src/i18n/locales/zh-TW/kilocode.json - Updated translations
  • src/services/ghost/GhostServiceManager.ts - Updated status bar state props
  • src/services/ghost/GhostStatusBar.ts - New tooltip rendering logic with MarkdownString
  • src/services/ghost/types.ts - Updated interface

…e tooltip

- Add clickable 'Open Settings' link to tooltip messages using MarkdownString
- Add 'no usable provider' error message when no autocomplete provider is configured
- Add hasNoUsableProvider flag to track when model is loaded but no provider available
- Update all tooltip messages to use MarkdownString for command link support
…essage

Updated the noUsableProvider tooltip message to include the full list of
supported autocomplete providers: Kilo Code, Mistral, OpenRouter, Requesty,
Bedrock, HuggingFace, LiteLLM, LM Studio, and Ollama.
Instead of hardcoding the list of supported autocomplete providers,
now dynamically generates the list from AUTOCOMPLETE_PROVIDER_MODELS
and PROVIDER_DISPLAY_NAMES. This ensures the tooltip stays in sync
with the actual supported providers.
Updated the noCredits and noUsableProvider tooltip messages to match
the formatting and wording used in the webview-ui settings panel.
Added bold titles and better formatting with newlines for improved
readability in the status bar tooltip.
- Remove renderTokenError() method from GhostStatusBar
- Simplify render() to only check hasKilocodeProfileWithNoBalance and hasNoUsableProvider
- Remove hasValidToken property from GhostStatusBarStateProps
- Remove hasValidApiToken() method from GhostServiceManager
- Remove tokenError translation from all 22 locale files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants