Release v6.8.0: /usage slash command, follow-up suggest fixes, and axon image inputs - #125
Merged
Merged
Conversation
Introduces a unified /usage slash command that surfaces current task token usage and Kilocode/AxonCode plan & balance details. Webview: - Adds UsageDialog component that renders current task token usage (input/output, cache reads/writes, total cost, context tokens) and plan/balance details (weekly/monthly usage bars, code reviews remaining, balance, account info). - Wires UsageDialog into ChatView with a new showUsageModal state and passes metric/state props from apiMetrics and currentTaskItem. - Intercepts '/usage' in ChatTextArea (both raw send and slash command paths) so the command opens the dialog instead of being sent as a message. - Registers the 'usage' slash command in slash-commands.ts with a dashboard icon in SlashCommandMenu.tsx, plus matching unit tests. CLI: - Renames costCommand to usageCommand (with cost/limits aliases kept for backwards compatibility) and extends it to print current task token usage alongside plan details. The Kilocode-provider / token / loading checks are now soft warnings scoped to the plan section so the command is useful for any provider when a task is active. - Extends CommandContext with currentTask and exposes it from useCommandContext via currentTaskAtom. - Adds optional token/cost/size fields to HistoryItem in cli messages. - Adds unit tests covering command metadata and output rendering. Bumps extension version 6.7.9 -> 6.8.0.
…wn on cancel Improves the auto-approval UX for follow-up questions: - The countdown timer no longer restarts once the user cancels auto-approval, and it stops cleanly when the question is answered. - The suggestions list now disappears immediately when a suggestion is clicked (clicking previously only fired the callback without unmounting the menu). - The 'copy to input' action cancels auto-approval and dismisses the countdown timer while keeping the suggestions visible so the user can still pick another option. - Renders nothing when the question is answered or a suggestion has been selected, matching the intent that the menu is interactive state for the active follow-up. Updates FollowUpSuggest unit tests to cover the new behaviour: suggestion click removes options, isAnswered hides the menu, and the copy button keeps options visible while cancelling the timer.
…labels Polishes the chat-row rendering for the 'view definitions' tool: - ChatRow.tsx: drops the redundant file-code icon in the header. The tool uses a header icon elsewhere, so rendering one here produced a duplicate icon next to the tool label. - chat.json: title-cases wantsToViewDefinitions and wantsToViewDefinitionsOutsideWorkspace to 'View Definitions' / 'View Definitions (outside workspace)' so the user-facing label matches the casing convention used for the other 'wantsTo' tool actions.
- restore forwarding of tool_result images as a follow-up user message in convertToOpenAiMessages; the block was commented out so chat-attached images were replaced with the placeholder text and silently dropped - force supportsImages: true in KilocodeOpenrouterHandler.getModel() since all axon models accept image inputs, so no downstream gate can strip them - add regression test for tool result image forwarding
Contributor
|
✅ Reviewed the changes: Release v6.8.0 adds /usage command, follow-up suggest fixes, and image input support. Two formatting bugs in cost.ts will cause test failures: missing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Release PR for the
release/v6.8.0branch (5 commits). Adds a unified/usageslash command surfacing token usage and plan/balance details, fixes follow-up suggestion auto-approval UX, polishes the chat-row view-definitions labels, and restores image inputs to axon models. Version bumped to 6.8.0.Implementation
/usageslash command: newUsageDialogcomponent renders current task token usage (input/output, cache reads/writes, total cost, context tokens) and plan/balance details (weekly/monthly usage bars, code reviews remaining, balance, account info). Wired intoChatViewwithshowUsageModalstate;/usageintercepted inChatTextArea(raw send and slash command paths) opens the dialog instead of sending a message. Registered inslash-commands.tswith a dashboard icon inSlashCommandMenu.tsx. CLIcostCommandrenamed tousageCommand(withcost/limitsaliases kept for backwards compatibility) and extended to print current task token usage alongside plan details; Kilocode-provider/token/loading checks are now soft warnings scoped to the plan section.CommandContextextended withcurrentTaskexposed fromuseCommandContextviacurrentTaskAtom. Optional token/cost/size fields added toHistoryItemin CLI messages. Unit tests cover command metadata and output rendering.FollowUpSuggestunit tests cover the new behaviour.wantsToViewDefinitions/wantsToViewDefinitionsOutsideWorkspaceto "View Definitions" / "View Definitions (outside workspace)".tool_resultimages as a follow-up user message inconvertToOpenAiMessages(was commented out so chat-attached images were replaced with placeholder text and silently dropped); forcessupportsImages: trueinKilocodeOpenrouterHandler.getModel()since all axon models accept image inputs; adds a regression test for tool result image forwarding.UsageDialogcomponent.Screenshots
How to Test
/usagein the chat textarea (and via the slash command menu) and confirm the usage dialog opens showing current task token usage and plan/balance details; runaxon usage(oraxon cost/axon limits) in the CLI with an active task and confirm token usage and plan details render.