dtkt.protoui.v1beta1protoui.proto

CodeBlock

Message

Render as a code block with optional syntax highlighting. Maps to Code/CodeBlock in @dtkt/ui/text or syntax highlighter components Supports text, CEL expressions, and templates for generating code content. The message or field is available as this in expression/template context. Example expr: this.code or this.function_body Example template: Use Go templates to format code

FieldTypeNumberDescription
content
Data
1

The code content. Can be plain text, a CEL expression, or a template. Context: this is the message or field being rendered.

languagestring2

Language for syntax highlighting (e.g., "go", "python", "javascript").

filenamestring3

Optional filename to display.

show_line_numbersbool4

Show line numbers.

highlight_linesstring5

Highlight specific lines (e.g., "1-3,5,7-9").