Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/chat-ui/src/components/InputBox.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export default function InputBox() {
};

return (
<div className="p-2 border-t flex items-center space-x-2">
<div className="p-2 border-t flex flex-wrap items-center gap-2 w-full">
<input
ref={fileInputRef}
type="file"
Expand Down
23 changes: 18 additions & 5 deletions frontend/chat-ui/src/components/ModeSelectorDemo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -585,11 +585,24 @@ function ChatComposer() {
dispatch({ type: "SET_RESULTS", results: { text: `You said: ${q}\n\n(Connect your backend to replace this mock.)` } });
} else if (state.mode === "deep") {
dispatch({ type: "DEEP_START" });
const res = await deepResearch(q, (stage, log) => {
dispatch({ type: "DEEP_SET_STAGE", stage, log });
});
dispatch({ type: "SET_RESULTS", results: { text: res.text, citations: res.citations } });
dispatch({ type: "DEEP_STOP" });
try {
const res = await deepResearch(q, (stage, log) => {
dispatch({ type: "DEEP_SET_STAGE", stage, log });
});
dispatch({ type: "SET_RESULTS", results: { text: res.text, citations: res.citations } });
} catch (err) {
dispatch({
type: "ADD_TOAST",
toast: {
id: uid("toast"),
title: "Research failed",
desc: err.message ?? String(err),
kind: "error",
},
});
} finally {
dispatch({ type: "DEEP_STOP" });
}
} else if (state.mode === "image") {
const images = await imageGen(q, state.files);
dispatch({ type: "SET_RESULTS", results: { images } });
Expand Down
21 changes: 15 additions & 6 deletions frontend/chat-ui/src/components/ProfileMenu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,25 @@ export default function ProfileMenu() {

return (
<div
className="fixed bottom-2 right-4 z-10"
className="fixed bottom-2 transition-all"
style={{ left: state.sidebarOpen ? '15.5rem' : '0.5rem' }}
className={`fixed bottom-2 z-10 transition-all ${state.sidebarOpen ? 'left-64' : 'left-2'}`}
>
<button className="p-2 rounded-full" onClick={() => setOpen((o) => !o)} title="Profile">
<button
className="p-2 rounded-full"
onClick={() => setOpen((o) => !o)}
title="Profile"
aria-expanded={open}
aria-controls="profile-menu"
>
⚙️
</button>
{open && (
<div className="mt-2 p-2 border rounded bg-white dark:bg-gray-800 shadow space-y-2">
<button className="block w-full text-left" onClick={toggleTheme}>Toggle Theme</button>
<div
id="profile-menu"
className="mt-2 p-2 border rounded bg-white dark:bg-gray-800 shadow space-y-2"
>
<button className="block w-full text-left" onClick={toggleTheme}>
Toggle Theme
</button>
<button className="block w-full text-left" onClick={toggleMemory}>
Memory: {state.memory ? 'On' : 'Off'}
</button>
Expand Down