3e237e177a
* feat: add code-walkthrough backend (MCP tool, service, persistence, WS events) * feat: render agent code walkthroughs as line-anchored cards + editor window * test: add code-walkthrough re-emit mock-agent scenario * fix: rework code-walkthrough UX (floating card, line reveal, minimize, clickable file) * fix: improve code walkthrough editor UX * fix: backfill walkthrough launcher after websocket connect * fix: improve walkthrough requests and editor anchors * fix: clear walkthrough highlights on close * feat: add walkthrough discard and prompt customization * fix: send walkthrough requests through saved prompt * fix: support postgres built-in prompt seeding * fix: address walkthrough review feedback * fix: address walkthrough review follow-ups * fix: harden walkthrough lifecycle races * fix: reuse walkthrough notification cleanup * fix: guard stale walkthrough file opens * fix: abort stale file opens before paint * fix: stabilize github settings e2e readiness * fix: use stable github settings e2e selector
42 lines
1.3 KiB
TypeScript
42 lines
1.3 KiB
TypeScript
"use client";
|
|
|
|
import type { ContextItem } from "@/lib/types/context";
|
|
import { PlanItem } from "./plan-item";
|
|
import { FileItem } from "./file-item";
|
|
import { PromptItem } from "./prompt-item";
|
|
import { CommentItem } from "./comment-item";
|
|
import { PlanCommentItem } from "./plan-comment-item";
|
|
import { ImageItem } from "./image-item";
|
|
import { FileAttachmentItem } from "./file-attachment-item";
|
|
import { PRFeedbackItem } from "./pr-feedback-item";
|
|
import { WalkthroughCommentItem } from "./walkthrough-comment-item";
|
|
|
|
export function ContextItemRenderer({
|
|
item,
|
|
sessionId,
|
|
}: {
|
|
item: ContextItem;
|
|
sessionId?: string | null;
|
|
}) {
|
|
switch (item.kind) {
|
|
case "plan":
|
|
return <PlanItem item={item} />;
|
|
case "file":
|
|
return <FileItem item={item} sessionId={sessionId} />;
|
|
case "prompt":
|
|
return <PromptItem item={item} />;
|
|
case "comment":
|
|
return <CommentItem item={item} />;
|
|
case "plan-comment":
|
|
return <PlanCommentItem item={item} />;
|
|
case "image":
|
|
return <ImageItem item={item} />;
|
|
case "file-attachment":
|
|
return <FileAttachmentItem item={item} />;
|
|
case "pr-feedback":
|
|
return <PRFeedbackItem item={item} />;
|
|
case "walkthrough-comment":
|
|
return <WalkthroughCommentItem item={item} />;
|
|
}
|
|
}
|