import { useStreamContext } from "@/providers/Stream"; import { Message } from "@langchain/langgraph-sdk"; import { useState } from "react"; import { getContentString } from "../utils"; import { cn } from "@/lib/utils"; import { Textarea } from "@/components/ui/textarea"; import { BranchSwitcher, CommandBar } from "./shared"; function EditableContent({ value, setValue, onSubmit, }: { value: string; setValue: React.Dispatch>; onSubmit: () => void; }) { const handleKeyDown = (e: React.KeyboardEvent) => { if ((e.metaKey || e.ctrlKey) && e.key === "Enter") { e.preventDefault(); onSubmit(); } }; return (