From 07b3c234920f2cfc42d8f2dd4ac6dd77019779f5 Mon Sep 17 00:00:00 2001 From: DaKheera47 Date: Sun, 15 Feb 2026 20:49:46 +0000 Subject: [PATCH] better UX --- .../components/ghostwriter/Composer.tsx | 57 +++++++++++++++---- .../ghostwriter/GhostwriterDrawer.tsx | 28 +++++---- .../ghostwriter/GhostwriterPanel.tsx | 13 ++--- 3 files changed, 66 insertions(+), 32 deletions(-) diff --git a/orchestrator/src/client/components/ghostwriter/Composer.tsx b/orchestrator/src/client/components/ghostwriter/Composer.tsx index 167744d..31fa1a1 100644 --- a/orchestrator/src/client/components/ghostwriter/Composer.tsx +++ b/orchestrator/src/client/components/ghostwriter/Composer.tsx @@ -1,4 +1,4 @@ -import { Send } from "lucide-react"; +import { RefreshCcw, Send, Square } from "lucide-react"; import type React from "react"; import { useState } from "react"; import { Button } from "@/components/ui/button"; @@ -6,10 +6,21 @@ import { Textarea } from "@/components/ui/textarea"; type ComposerProps = { disabled?: boolean; + isStreaming: boolean; + canRegenerate: boolean; + onRegenerate: () => Promise; + onStop: () => Promise; onSend: (content: string) => Promise; }; -export const Composer: React.FC = ({ disabled, onSend }) => { +export const Composer: React.FC = ({ + disabled, + isStreaming, + canRegenerate, + onRegenerate, + onStop, + onSend, +}) => { const [value, setValue] = useState(""); const submit = async () => { @@ -38,14 +49,40 @@ export const Composer: React.FC = ({ disabled, onSend }) => {
Cmd/Ctrl+Enter to send
- +
+ {isStreaming ? ( + + ) : ( + + )} + + +
); diff --git a/orchestrator/src/client/components/ghostwriter/GhostwriterDrawer.tsx b/orchestrator/src/client/components/ghostwriter/GhostwriterDrawer.tsx index 0fb406f..e7b8610 100644 --- a/orchestrator/src/client/components/ghostwriter/GhostwriterDrawer.tsx +++ b/orchestrator/src/client/components/ghostwriter/GhostwriterDrawer.tsx @@ -26,28 +26,25 @@ export const GhostwriterDrawer: React.FC = ({ const [open, setOpen] = useState(false); return ( - + -
- +
+ Ghostwriter The Ghostwriter will use the context of this job and your resume, @@ -55,12 +52,13 @@ export const GhostwriterDrawer: React.FC = ({ message. - {job && ( -
- -
- )}
+ + {job && ( +
+ +
+ )} ); diff --git a/orchestrator/src/client/components/ghostwriter/GhostwriterPanel.tsx b/orchestrator/src/client/components/ghostwriter/GhostwriterPanel.tsx index be8cbc3..4fa0167 100644 --- a/orchestrator/src/client/components/ghostwriter/GhostwriterPanel.tsx +++ b/orchestrator/src/client/components/ghostwriter/GhostwriterPanel.tsx @@ -5,7 +5,6 @@ import { toast } from "sonner"; import * as api from "../../api"; import { Composer } from "./Composer"; import { MessageList } from "./MessageList"; -import { RunControls } from "./RunControls"; type GhostwriterPanelProps = { job: Job; @@ -237,7 +236,7 @@ export const GhostwriterPanel: React.FC = ({ job }) => { }, [isStreaming, job.id, loadMessages, messages, onStreamEvent]); return ( -
+
= ({ job }) => { />
-
- + - -
);