Files
ThothII/frontend/src/widgets/ArtifactWidget.tsx
T

20 lines
645 B
TypeScript

import type { WidgetProps } from "./types";
/**
* ArtifactWidget: view-only renderer. Never calls onRespond.
* Invariant no-limbo: this widget intentionally produces no response;
* it is used only as a passive display, never as a decision point.
*/
export function ArtifactWidget({ descriptor }: WidgetProps) {
return (
<div className="space-y-2">
{descriptor.title && <p className="font-medium">{descriptor.title}</p>}
{descriptor.artifact?.content && (
<pre className="overflow-auto max-h-64 bg-muted p-3 text-sm rounded border">
{descriptor.artifact.content}
</pre>
)}
</div>
);
}