Support rename/delete edge function & standardize output

This commit is contained in:
Will Chen
2025-04-23 11:15:52 -07:00
parent 6e1935bbba
commit 55c0190f26
7 changed files with 295 additions and 67 deletions

View File

@@ -11,6 +11,7 @@ import { CodeHighlight } from "./CodeHighlight";
import { useAtomValue } from "jotai";
import { isStreamingAtom } from "@/atoms/chatAtoms";
import { CustomTagState } from "./stateTypes";
import { DyadOutput } from "./DyadOutput";
interface DyadMarkdownParserProps {
content: string;
@@ -77,6 +78,7 @@ function preprocessUnclosedTags(content: string): {
"dyad-add-dependency",
"dyad-execute-sql",
"dyad-add-integration",
"dyad-output",
];
let processedContent = content;
@@ -137,6 +139,7 @@ function parseCustomTags(content: string): ContentPiece[] {
"dyad-add-dependency",
"dyad-execute-sql",
"dyad-add-integration",
"dyad-output",
];
const tagPattern = new RegExp(
@@ -303,6 +306,16 @@ function renderCustomTag(
</DyadAddIntegration>
);
case "dyad-output":
return (
<DyadOutput
type={attributes.type as "warning" | "error"}
message={attributes.message}
>
{content}
</DyadOutput>
);
default:
return null;
}