feat(usage): add structured Ask Usage results#4270
Conversation
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
|
|
||
| const input = toolPart.state.input; | ||
| return ( | ||
| input.server_name === ASK_USAGE_MCP_SERVER_NAME && input.tool_name === ASK_USAGE_MCP_TOOL_NAME |
There was a problem hiding this comment.
WARNING: Streaming MCP updates can crash Ask Usage rendering
renderToolPart now runs before hasRequiredInput(), but this helper assumes toolPart.state.input is already an object. Early mcp updates can arrive before the full input envelope is present, so input.server_name throws here and takes down the whole message bubble instead of falling back to the loading placeholder. Guard input with isRecord() and return false until the server/tool identity fields exist.
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (2 files)
Previous Review Summaries (2 snapshots, latest commit 37a3fac)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 37a3fac)Status: No Issues Found | Recommendation: Merge Files Reviewed (4 files)
Previous review (commit ea29b49)Status: 1 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Reviewed by gpt-5.4-20260305 · Input: 83.4K · Output: 10.1K · Cached: 989.2K Review guidance: REVIEW.md from base branch |
Summary
Verification
No manual browser verification performed; local UI services were not started for this branch.
Visual Changes
Not captured.
Reviewer Notes
feat/kilo-usage-ai-mvpand intentionally excludes local-only dev routing work plus dirty local worktree edits.