Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: static settings page #570

Merged
merged 22 commits into from
Jan 13, 2025
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
263 changes: 214 additions & 49 deletions ui/desktop/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion ui/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"@ai-sdk/openai": "^0.0.72",
"@ai-sdk/ui-utils": "^1.0.2",
"@radix-ui/react-avatar": "^1.1.1",
"@radix-ui/react-dialog": "^1.1.4",
"@radix-ui/react-icons": "^1.3.1",
"@radix-ui/react-scroll-area": "^1.2.0",
"@radix-ui/react-slot": "^1.1.1",
Expand Down Expand Up @@ -77,4 +78,4 @@
"tailwind-merge": "^2.5.4",
"tailwindcss-animate": "^1.0.7"
}
}
}
2 changes: 2 additions & 0 deletions ui/desktop/src/ChatWindow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import Input from './components/Input';
import LoadingGoose from './components/LoadingGoose';
import MoreMenu from './components/MoreMenu';
import Settings from './components/settings/Settings';
import Splash from './components/Splash';
import { Card } from './components/ui/card';
import { ScrollArea } from './components/ui/scroll-area';
Expand Down Expand Up @@ -41,7 +42,7 @@
chats,
setChats,
selectedChatId,
setSelectedChatId,

Check warning on line 45 in ui/desktop/src/ChatWindow.tsx

View workflow job for this annotation

GitHub Actions / build

'setSelectedChatId' is defined but never used. Allowed unused args must match /^_/u
initialQuery,
setProgressMessage,
setWorking,
Expand Down Expand Up @@ -122,7 +123,7 @@
c.id === selectedChatId ? { ...c, messages } : c
);
setChats(updatedChats);
}, [messages, selectedChatId]);

Check warning on line 126 in ui/desktop/src/ChatWindow.tsx

View workflow job for this annotation

GitHub Actions / build

React Hook useEffect has missing dependencies: 'chats' and 'setChats'. Either include them or remove the dependency array. If 'setChats' changes too often, find the parent component that defines it and wrap that definition in useCallback

const initialQueryAppended = useRef(false);
useEffect(() => {
Expand All @@ -130,7 +131,7 @@
append({ role: 'user', content: initialQuery });
initialQueryAppended.current = true;
}
}, [initialQuery]);

Check warning on line 134 in ui/desktop/src/ChatWindow.tsx

View workflow job for this annotation

GitHub Actions / build

React Hook useEffect has a missing dependency: 'append'. Either include it or remove the dependency array

useEffect(() => {
if (messages.length > 0) {
Expand Down Expand Up @@ -322,7 +323,7 @@
const addSystemConfig = async (system: string) => {
console.log("calling add system")
// Get the app instance from electron
const app = window.electron.app;

Check warning on line 326 in ui/desktop/src/ChatWindow.tsx

View workflow job for this annotation

GitHub Actions / build

'app' is assigned a value but never used. Allowed unused vars must match /^_/u

const systemConfig = {
type: "Stdio",
Expand Down Expand Up @@ -453,6 +454,7 @@
/>
}
/>
<Route path="/settings" element={<Settings />} />
<Route path="*" element={<Navigate to="/chat/1" replace />} />
</Routes>
</div>
Expand Down
Loading
Loading