SurfSense/surfsense_web/components/assistant-ui/edit-composer.tsx
CREDO23 2b5377846d refactor: modularize thread.tsx into focused component modules
- Split 1,089-line thread.tsx into 10 smaller, focused modules
- Created dedicated files for thinking-steps, welcome, composer, messages, etc.
- No breaking changes - all logic preserved exactly as before
- Improved code organization and maintainability
2025-12-30 16:38:57 +02:00

27 lines
1 KiB
TypeScript

import { ComposerPrimitive, MessagePrimitive } from "@assistant-ui/react";
import type { FC } from "react";
import { Button } from "@/components/ui/button";
export const EditComposer: FC = () => {
return (
<MessagePrimitive.Root className="aui-edit-composer-wrapper mx-auto flex w-full max-w-(--thread-max-width) flex-col px-2 py-3">
<ComposerPrimitive.Root className="aui-edit-composer-root ml-auto flex w-full max-w-[85%] flex-col rounded-2xl bg-muted">
<ComposerPrimitive.Input
className="aui-edit-composer-input min-h-14 w-full resize-none bg-transparent p-4 text-foreground text-sm outline-none"
autoFocus
/>
<div className="aui-edit-composer-footer mx-3 mb-3 flex items-center gap-2 self-end">
<ComposerPrimitive.Cancel asChild>
<Button variant="ghost" size="sm">
Cancel
</Button>
</ComposerPrimitive.Cancel>
<ComposerPrimitive.Send asChild>
<Button size="sm">Update</Button>
</ComposerPrimitive.Send>
</div>
</ComposerPrimitive.Root>
</MessagePrimitive.Root>
);
};