feat(draw): wire the drawing card into the conversation — end to end (T-318)
The last wire: a DrawingMessage conversation item + the Claude-extension subscriber on the `draw` channel (buildSvgDocument → inject), the conversation renderer (DrawingCard), the fold/summary switches, the i18n `drawing` label, and registering `clide draw` at boot (empty template registry for now — primitive SVG works; d2/icon/compare/image handlers plug in as they land). `clide draw --file doc.json` now renders a card in the conversation. Render widget-tested; analyze + format clean across the repo. Templates + per-object overlay remain; the CHANGELOG entry lands with the user-complete feature. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -190,6 +190,24 @@ final class ImageMessage extends ConversationItem {
|
||||
String toString() => 'ImageMessage($path${caption != null ? ', "$caption"' : ''})';
|
||||
}
|
||||
|
||||
/// A locally-injected drawing card (T-318). Not parsed from the transcript —
|
||||
/// driven into the conversation by `clide draw --file <doc>` (D-6 parity) and
|
||||
/// rendered display-only per D-78. [svg] is the SVG substrate the renderer
|
||||
/// paints (already lowered from the doc's template / primitive source);
|
||||
/// [label] / [description] are the optional card caption.
|
||||
final class DrawingMessage extends ConversationItem {
|
||||
const DrawingMessage({required super.uuid, required super.timestamp, required super.isSidechain, required this.svg, this.label, this.description});
|
||||
|
||||
/// The SVG document source the renderer paints.
|
||||
final String svg;
|
||||
|
||||
/// Optional card-level caption (label + supporting description).
|
||||
final String? label, description;
|
||||
|
||||
@override
|
||||
String toString() => 'DrawingMessage(${label ?? '<svg>'})';
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Internal helpers
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user