feat: adjust styles

This commit is contained in:
Henry Li
2026-01-22 14:28:10 +08:00
parent 9df56299c1
commit dc9d28018c
3 changed files with 7 additions and 1 deletions

View File

@@ -171,6 +171,7 @@ export default function ChatPage() {
</div> </div>
<InputBox <InputBox
className={cn("bg-background/5 w-full -translate-y-4")} className={cn("bg-background/5 w-full -translate-y-4")}
isNewThread={isNewThread}
autoFocus={isNewThread} autoFocus={isNewThread}
status={thread.isLoading ? "streaming" : "ready"} status={thread.isLoading ? "streaming" : "ready"}
context={settings.context} context={settings.context}

View File

@@ -14,7 +14,7 @@ function InputGroup({ className, ...props }: React.ComponentProps<"div">) {
data-slot="input-group" data-slot="input-group"
role="group" role="group"
className={cn( className={cn(
"group/input-group border-input/50 dark:bg-input/30 relative flex w-full items-center rounded-md border bg-white/80 shadow-xs transition-[color,box-shadow] outline-none", "group/input-group border-input/50 dark:bg-background/80 relative flex w-full items-center rounded-md border bg-white/80 shadow-xs transition-[color,box-shadow] outline-none",
"h-9 min-w-0 has-[>textarea]:h-auto", "h-9 min-w-0 has-[>textarea]:h-auto",
// Variants based on alignment. // Variants based on alignment.

View File

@@ -52,6 +52,7 @@ export function InputBox({
status = "ready", status = "ready",
context, context,
extraHeader, extraHeader,
isNewThread,
onContextChange, onContextChange,
onSubmit, onSubmit,
onStop, onStop,
@@ -61,6 +62,7 @@ export function InputBox({
status?: ChatStatus; status?: ChatStatus;
context: Omit<AgentThreadContext, "thread_id">; context: Omit<AgentThreadContext, "thread_id">;
extraHeader?: React.ReactNode; extraHeader?: React.ReactNode;
isNewThread?: boolean;
onContextChange?: (context: Omit<AgentThreadContext, "thread_id">) => void; onContextChange?: (context: Omit<AgentThreadContext, "thread_id">) => void;
onSubmit?: (message: PromptInputMessage) => void; onSubmit?: (message: PromptInputMessage) => void;
onStop?: () => void; onStop?: () => void;
@@ -306,6 +308,9 @@ export function InputBox({
/> />
</PromptInputTools> </PromptInputTools>
</PromptInputFooter> </PromptInputFooter>
{!isNewThread && (
<div className="bg-background absolute right-0 -bottom-[17px] left-0 z-0 h-4"></div>
)}
</PromptInput> </PromptInput>
); );
} }