Skip to content

An AI-powered search engine with a generative UI

feat: UI refinements for search mode selector and chat panel

Yoshiki Miura0c99c5b680a4
diff --git a/components/chat-panel.tsx b/components/chat-panel.tsx
index 34edf102..86293fc0 100644
--- a/components/chat-panel.tsx
+++ b/components/chat-panel.tsx
@@ -202,24 +202,6 @@ export function ChatPanel({
{/* Bottom menu area */}
<div className="flex items-center justify-between p-3">
<div className="flex items-center gap-2">
- <SearchModeSelector />
- {process.env.NEXT_PUBLIC_SHOW_MODEL_SELECTOR === 'true' && (
- <ModelSelector models={models || []} />
- )}
- </div>
- <div className="flex items-center gap-2">
- {messages.length > 0 && (
- <Button
- variant="outline"
- size="icon"
- onClick={handleNewChat}
- className="shrink-0 rounded-full group"
- type="button"
- disabled={isLoading || isToolInvocationInProgress()}
- >
- <MessageCirclePlus className="size-4 group-hover:rotate-12 transition-all" />
- </Button>
- )}
<FileUploadButton
onFileSelect={async files => {
const newFiles: UploadedFile[] = files.map(file => ({
@@ -268,6 +250,24 @@ export function ChatPanel({
)
}}
/>
+ <SearchModeSelector />
+ {process.env.NEXT_PUBLIC_SHOW_MODEL_SELECTOR === 'true' && (
+ <ModelSelector models={models || []} />
+ )}
+ </div>
+ <div className="flex items-center gap-2">
+ {messages.length > 0 && (
+ <Button
+ variant="outline"
+ size="icon"
+ onClick={handleNewChat}
+ className="shrink-0 rounded-full group"
+ type="button"
+ disabled={isLoading || isToolInvocationInProgress()}
+ >
+ <MessageCirclePlus className="size-4 group-hover:rotate-12 transition-all" />
+ </Button>
+ )}
<Button
type={isLoading ? 'button' : 'submit'}
size={'icon'}
diff --git a/components/search-mode-selector.tsx b/components/search-mode-selector.tsx
index 41808620..c4e9e9a8 100644
--- a/components/search-mode-selector.tsx
+++ b/components/search-mode-selector.tsx
@@ -52,7 +52,7 @@ export function SearchModeSelector() {
}
return (
- <div className="relative inline-flex items-center rounded-full bg-background p-1">
+ <div className="relative inline-flex items-center rounded-full bg-background border p-1">
{/* Animated background indicator */}
<div
className="absolute inset-y-1 rounded-full bg-muted transition-all duration-200 ease-out"