Skip to content

VisualBlock

VisualBlock = { id: string; markdown: string; type: "rich-text"; } | { id: string; markdown: string; tone: CalloutTone; type: "callout"; } | { entries: FileTreeEntry[]; id: string; title?: string; type: "file-tree"; } | { annotations?: DiffAnnotation[]; file?: DiffFile; id: string; path: string; summary: string; type: "diff"; } | { code?: string; filename: string; id: string; truncated?: boolean; type: "code"; } | { annotations?: DiffAnnotation[]; code?: string; filename: string; id: string; truncated?: boolean; type: "annotated-code"; } | { entities: object[]; id: string; inferred?: boolean; relations?: object[]; type: "data-model"; } | { change?: string; deprecated?: boolean; id: string; inferred?: boolean; method: string; params?: object[]; path: string; responses?: object[]; summary?: string; type: "api-endpoint"; } | { columns: string[]; id: string; rows: string[][]; type: "table"; } | { id: string; items: object[]; type: "checklist"; } | { caption?: string; id: string; inferred?: boolean; source: string; type: "mermaid"; } | { caption?: string; html: string; id: string; surface: "browser" | "desktop" | "mobile" | "popover" | "panel"; type: "wireframe"; } | { id: string; questions: PlanQuestion[]; type: "question-form"; }

Defined in: src/visual-blocks.ts:25

{ id: string; markdown: string; type: "rich-text"; }


{ id: string; markdown: string; tone: CalloutTone; type: "callout"; }


{ entries: FileTreeEntry[]; id: string; title?: string; type: "file-tree"; }


{ annotations?: DiffAnnotation[]; file?: DiffFile; id: string; path: string; summary: string; type: "diff"; }

optional annotations?: DiffAnnotation[]

optional file?: DiffFile

Server-joined real diff; populated by joinDiffBlocks — never from LLM input.

id: string

path: string

summary: string

type: "diff"


{ code?: string; filename: string; id: string; truncated?: boolean; type: "code"; }

optional code?: string

Server-populated from DiffFile — never from LLM input.

filename: string

id: string

optional truncated?: boolean

type: "code"


{ annotations?: DiffAnnotation[]; code?: string; filename: string; id: string; truncated?: boolean; type: "annotated-code"; }

optional annotations?: DiffAnnotation[]

Prose-only annotations — no line anchors (decision #4).

optional code?: string

Server-populated from DiffFile — never from LLM input.

filename: string

id: string

optional truncated?: boolean

type: "annotated-code"


{ entities: object[]; id: string; inferred?: boolean; relations?: object[]; type: "data-model"; }

entities: object[]

id: string

optional inferred?: boolean

Server-forced to true — never trusted from LLM input.

optional relations?: object[]

type: "data-model"


{ change?: string; deprecated?: boolean; id: string; inferred?: boolean; method: string; params?: object[]; path: string; responses?: object[]; summary?: string; type: "api-endpoint"; }

optional change?: string

optional deprecated?: boolean

id: string

optional inferred?: boolean

Server-forced to true — never trusted from LLM input.

method: string

optional params?: object[]

path: string

optional responses?: object[]

optional summary?: string

type: "api-endpoint"


{ columns: string[]; id: string; rows: string[][]; type: "table"; }


{ id: string; items: object[]; type: "checklist"; }


{ caption?: string; id: string; inferred?: boolean; source: string; type: "mermaid"; }


{ caption?: string; html: string; id: string; surface: "browser" | "desktop" | "mobile" | "popover" | "panel"; type: "wireframe"; }


{ id: string; questions: PlanQuestion[]; type: "question-form"; }