fix(frontend): refine activity layout and input state
This commit is contained in:
@@ -23,6 +23,8 @@ interface Props {
|
||||
onStop?: () => void;
|
||||
/** Lets the parent focus the composer (e.g. on "New session"). */
|
||||
inputRef?: React.Ref<HTMLTextAreaElement>;
|
||||
/** The workflow is explicitly waiting for text in this composer. */
|
||||
awaitingInput?: boolean;
|
||||
}
|
||||
|
||||
export function SteerInput({
|
||||
@@ -32,6 +34,7 @@ export function SteerInput({
|
||||
onSessionCreateFailed,
|
||||
onStop,
|
||||
inputRef,
|
||||
awaitingInput = false,
|
||||
}: Props) {
|
||||
const [text, setText] = useState("");
|
||||
const [busy, setBusy] = useState(false);
|
||||
@@ -116,8 +119,8 @@ export function SteerInput({
|
||||
onKeyDown={handleKeyDown}
|
||||
placeholder={sessionId ? "Free steering (!)…" : "Ask a question to start a new session…"}
|
||||
aria-label={sessionId ? "Steering" : "New question"}
|
||||
data-awaiting-input={sessionId ? undefined : "true"}
|
||||
className={["max-h-40 flex-1 resize-none rounded-lg px-1 py-1 text-sm leading-relaxed outline-none placeholder:text-muted-foreground", sessionId ? "bg-transparent" : "thot-awaiting-input"].join(" ")}
|
||||
data-awaiting-input={awaitingInput ? "true" : undefined}
|
||||
className={["max-h-40 flex-1 resize-none rounded-lg bg-card px-1 py-1 text-sm leading-relaxed outline-none placeholder:text-muted-foreground", awaitingInput && "thot-awaiting-input"].filter(Boolean).join(" ")}
|
||||
/>
|
||||
<button
|
||||
type="button"
|
||||
|
||||
Reference in New Issue
Block a user