feat(usage): add ask usage#4206
Conversation
| 'linear', | ||
| 'discord', | ||
| 'app-builder', | ||
| 'kilo-usage-ai', |
There was a problem hiding this comment.
WARNING: Including web-default profiles breaks the Ask Usage isolation
Adding kilo-usage-ai to the implicit profile-resolution allowlist means these sessions now inherit the caller's default profile whenever no explicit profileId is supplied. In this flow that merges default envVars, setupCommands, mcpServers, runtimeSkills, and any additional runtimeAgents on top of the inline usage-analyst config, because profile resolution layers inline overrides instead of replacing earlier layers. A user can therefore bring extra MCP servers or switch to a non-usage agent, which undercuts the intended dataset-only boundary for this feature.
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
Code Review SummaryStatus: 1 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Fix these issues in Kilo Cloud Files Reviewed (8 files)
Previous Review Summaries (7 snapshots, latest commit 1267665)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 1267665)Status: 1 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Fix these issues in Kilo Cloud Files Reviewed (8 files)
Previous review (commit 833c17f)Status: 1 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Fix these issues in Kilo Cloud Files Reviewed (3 files)
Previous review (commit 44c4dc6)Status: 1 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Fix these issues in Kilo Cloud Files Reviewed (14 files)
Previous review (commit ae9e889)Status: 1 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Fix these issues in Kilo Cloud Files Reviewed (16 files)
Previous review (commit 9de5345)Status: 1 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Fix these issues in Kilo Cloud Files Reviewed (15 files)
Previous review (commit 98827c5)Status: 1 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Fix these issues in Kilo Cloud Files Reviewed (12 files)
Previous review (commit 2df5ec6)Status: 1 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Fix these issues in Kilo Cloud Files Reviewed (42 files)
Generated files skipped from issue scanning per review rules: Reviewed by gpt-5.4-20260305 · Input: 101.7K · Output: 11.1K · Cached: 570.4K Review guidance: REVIEW.md from base branch |
Make the usage-cost convenience tool strict-compatible for common total-cost prompts so GPT can complete with one handler call. Route advanced cost shapes through query_kilo_dataset and cover real MCP schema serialization.
…nto feat/kilo-usage-ai-mvp # Conflicts: # apps/web/src/lib/kilo-datasets/contracts.ts
| gitUrl: KILO_USAGE_AI_REPOSITORY_URL, | ||
| mode: 'usage-analyst', | ||
| model: KILO_USAGE_AI_MODEL, | ||
| prompt: blankUsageAnalysisPrompt, |
There was a problem hiding this comment.
WARNING: This still seeds the session with a synthetic first prompt
prepareSession stores prompt as the prepared initial turn, and the later initiateFromPreparedSession step submits that stored turn. With autoInitiate: false, this change does not create a truly blank Ask Usage chat; it just replaces the old overview prompt with "Blank Ask Usage session. Wait for the user to ask a question.", so the first queued message is still bot-authored instead of the admin's actual question.
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
|
|
||
| const input = toolPart.state.input; | ||
| return ( | ||
| input.server_name === KILO_DATASET_MCP_SERVER_NAME && |
There was a problem hiding this comment.
WARNING: Native MCP dataset results still will not render as usage cards
resolveKiloDatasetToolView() now accepts tool === 'mcp', but PartRenderer still only mounts KiloDatasetToolCard for part.tool === KILO_DATASET_TOOL_NAME. In the Ask Usage flow that means the new native MCP query result still falls back to GenericToolCard, so the host never shows the validated cards and charts this branch is trying to restore.
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
| part: Extract<Part, { type: 'text' }>; | ||
| suppressRawToolCallText?: boolean; | ||
| }) { | ||
| const rawUsageRenderResults = suppressRawToolCallText |
There was a problem hiding this comment.
WARNING: This reintroduces model-authored charts as trusted host UI
extractRawUsageRenderResults(part.text) runs on every Ask Usage text part, so any assistant response that emits a <function_result><invoke name="kilo_usage_render_result">... block will render a usage card even though kilo_usage_render_result is not a real tool. A hallucinated or prompt-injected text response can therefore fabricate validated-looking charts without ever calling the MCP dataset tool, which defeats the safety boundary this flow is trying to restore.
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
Summary
Verification
/aks./aksis not available.Visual Changes
N/A
Reviewer Notes
The Ask Usage session uses the public KiloMan repository only because Cloud Agent sessions still require a repository. The runtime agent is locked to the usage dataset tool, and starting a new analysis is the renewal path when the short-lived MCP token expires.