12 of 33 MCP tools now render as rich inline cards instead of raw JSON: EntityCard, HealthSummary, LXCList, EntityTable, KnowledgeResults, BlastRadius, ChangeLog, FleetSnapshot, MetricChart. Architecture: - Server: annotateJSONResult() wraps queryRows with __renderer hints - Registry: match/dispatch system maps tool names to Svelte components - Chat: inline dispatch with 5-card limit, overflow to collapsed group - ToolCallGroup: unmatched prop, hides when all matched, ARIA labels Tests: 3 new Go tests for annotateJSONResult (wrap, no-op, multi-row).
10 lines
281 B
TypeScript
10 lines
281 B
TypeScript
import { registerToolRenderer } from '$lib/tool-renderers'
|
|
import EntityTable from './EntityTable.svelte'
|
|
|
|
export function init() {
|
|
registerToolRenderer({
|
|
match: (t) => t.name === 'list_entities' || t.result?.__renderer === 'entity_table',
|
|
component: EntityTable,
|
|
})
|
|
}
|