goose
goose copied to clipboard
feat: session management
This is a big one - adds session management as per design so far:
Update: even more refinement
https://github.com/user-attachments/assets/a50796f2-7226-467e-9a0e-ce6def8380f2
Sessions are matched up with directory goose window is currently in (so it is a shorter list) - unless you go to the menu. Clicking on it will open the session. Sessions are saved automatically.
There is a bit of a refactor of ChatWindow.tsx as part of this to make it simpler so it could do this.
Session Management:
- Added functions to save, load, and clear chat sessions in
sessionManager.ts. - Integrated session management in
main.tswith IPC handlers for saving, loading, and listing sessions. - Updated
preload.jsto expose session management functions to the renderer process. - Modified
LauncherWindow.tsxto include new session-related methods in thewindow.electroninterface.
Error: ENOENT: no such file or directory, mkdir '/Users/runner/.config/goose/sessions'
at Object.mkdirSync (node:fs:1371:26)
at Object.<anonymous> (/Users/runner/work/goose/goose/ui/desktop/.vite/build/main.js:3413:8)
at Module._compile (node:internal/modules/cjs/loader:1484:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1564:10)
at Module.load (node:internal/modules/cjs/loader:1295:32)
at Module._load (node:internal/modules/cjs/loader:[11](https://github.com/block/goose/actions/runs/12248205568/job/34167398970?pr=402#step:5:12)11:12)
at c._load (node:electron/js2c/node_init:2:16955)
at cjsLoader (node:internal/modules/esm/translators:350:17)
at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:286:7)
at ModuleJob.run (node:internal/modules/esm/module_job:234:25)
New version of this in progress from @alexhancock