Wave 2 prep: LedgerEvent.ref, demo bridge protocol, artifact stubs, sendText in ChatActionsContext
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import type { ArtifactPartProps } from "@/src/core/contracts";
|
||||
|
||||
/**
|
||||
* Demo artifact card (W6): sandboxed iframe rendering DemoResult.html with
|
||||
* the auto-injected resize/error bridge (contracts.ts "Demo iframe bridge").
|
||||
* While input-available: job activity card (poll /api/jobs).
|
||||
*/
|
||||
export function DemoCard(_props: ArtifactPartProps) {
|
||||
return null;
|
||||
}
|
||||
@@ -1,6 +1,9 @@
|
||||
import type { ComponentType } from "react";
|
||||
import type { ArtifactPartProps } from "@/src/core/contracts";
|
||||
import { DemoCard } from "@/components/artifacts/demo-card";
|
||||
import { JobCard } from "@/components/artifacts/job-card";
|
||||
import { PlanDivider } from "@/components/artifacts/plan-divider";
|
||||
import { VisualCard } from "@/components/artifacts/visual-card";
|
||||
|
||||
/**
|
||||
* Artifact renderer registry — the extension point for tool-part UI.
|
||||
@@ -16,5 +19,9 @@ import { JobCard } from "@/components/artifacts/job-card";
|
||||
*/
|
||||
export const artifactRenderers: Record<string, ComponentType<ArtifactPartProps>> = {
|
||||
research: JobCard,
|
||||
// W6: "demo" → sandboxed iframe card, "visual" → svg card
|
||||
// Phase divider where the plan lands (W5 fills in the component):
|
||||
plan_init: PlanDivider,
|
||||
// Artifacts (W6 fills in the components):
|
||||
demo: DemoCard,
|
||||
visual: VisualCard,
|
||||
};
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
import type { ArtifactPartProps } from "@/src/core/contracts";
|
||||
|
||||
/**
|
||||
* Phase divider rendered where plan_init lands in the transcript (W5).
|
||||
* Probe → teach transition marker per vision §2 "Two phases".
|
||||
*/
|
||||
export function PlanDivider(_props: ArtifactPartProps) {
|
||||
return null;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import type { ArtifactPartProps } from "@/src/core/contracts";
|
||||
|
||||
/**
|
||||
* Visual artifact card (W6): renders VisualResult.svg inline.
|
||||
* While input-available: job activity card (poll /api/jobs).
|
||||
*/
|
||||
export function VisualCard(_props: ArtifactPartProps) {
|
||||
return null;
|
||||
}
|
||||
Reference in New Issue
Block a user