add image-viewer card + clide image show verb

Drives an image inline into the Claude conversation log over the same
bus-publish path as ui.toast/ui.open, keeping the dispatcher handler
Flutter-free. The card is display-only per D-78; the verb registers a
CommandSchema so it surfaces in clide capabilities for T-248 discovery.

Closes T-249.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-06 10:22:38 +02:00
co-authored by Claude Opus 4.8
parent 3cf77f40ed
commit b446bd024d
13 changed files with 515 additions and 2 deletions
@@ -141,6 +141,30 @@ final class AssistantToolUse extends ConversationItem {
String toString() => 'AssistantToolUse(name=$name, id=$toolUseId)';
}
/// A locally-injected image card (T-249). Not parsed from the transcript —
/// driven into the conversation by `clide image show <path>` (D-6 parity) and
/// rendered display-only per D-78. [path] is an absolute, on-disk file the
/// driver has already resolved (workspace-relative paths are resolved before
/// injection); [caption] is an optional one-line label.
final class ImageMessage extends ConversationItem {
const ImageMessage({
required super.uuid,
required super.timestamp,
required super.isSidechain,
required this.path,
this.caption,
});
/// Absolute path to the image file on disk.
final String path;
/// Optional caption shown under the image.
final String? caption;
@override
String toString() => 'ImageMessage($path${caption != null ? ', "$caption"' : ''})';
}
// ---------------------------------------------------------------------------
// Internal helpers
// ---------------------------------------------------------------------------