mirror of
https://github.com/ashhart/TensorFold.git
synced 2026-12-06 20:43:08 +08:00
Keep captured bot and phone restrictions through forks, child and mission admission, and each model request. Preserve operational worker mailboxes with saved recall off, filter protected source history and isolate automatic phone extension hooks. Add reviewed portable recipes and keep current engine 1.0.10 with accurate historical beta.5 notes.
2.3 KiB
2.3 KiB
Visualization Widgets
TensorFold can render structured visual artifacts directly in Chat and Code timelines. The first renderer is dependency-free and supports four widget kinds:
flow- node and edge diagrams for workflows, architecture, and reasoning maps.bar- quantitative comparisons.stats- compact metric cards.timeline- ordered milestones, incidents, or plan history.
Model Paths
OpenAI-compatible providers with tool calling can use the visualize tool. Chat receives only this
tool; Code receives it alongside filesystem and shell tools.
CLI providers that do not expose TensorFold's tool schema can emit a fenced widget block in normal assistant text:
```vontra-widget
{
"kind": "flow",
"title": "One Model, Three Machines",
"nodes": [
{ "id": "gb10", "title": "GB10", "subtitle": "trains base", "tone": "accent", "column": 0, "row": 0 },
{ "id": "base", "title": "base.pt", "subtitle": "the model", "tone": "accent", "column": 1, "row": 0 }
],
"edges": [{ "from": "gb10", "to": "base" }],
"legend": [{ "label": "the model being built", "tone": "accent" }]
}
```
The renderer removes valid widget fences from markdown and replaces them with the same card used by tool-generated visualizations.
Shared Contract
Common fields:
{
kind: 'flow' | 'bar' | 'stats' | 'timeline'
title: string
subtitle?: string
caption?: string
legend?: { label: string; tone?: Tone }[]
}
Tone values are accent, muted, positive, warning, and danger.
Flow widgets use:
{
nodes: { id: string; title: string; subtitle?: string; tone?: Tone; column?: number; row?: number }[]
edges?: { from: string; to: string; label?: string }[]
}
Bar widgets use:
{
bars: { label: string; value: number; max?: number; detail?: string; tone?: Tone }[]
}
Stats widgets use:
{
metrics: { label: string; value: string; detail?: string; tone?: Tone }[]
}
Timeline widgets use:
{
events: { title: string; time?: string; detail?: string; tone?: Tone }[]
}
Next Renderer Slices
- Mermaid import/export for sequence diagrams and state machines.
- Vega/Recharts-backed quantitative charts behind the same
bar/futurelinecontracts. - Export widget to PNG/SVG.
- Add artifact persistence so a widget can be opened, renamed, and reused outside the transcript.