You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR connect the client code (web hosting) to backend APIs via (external) HTTP using standard fetch.
A follow-up PR will existing after #417 is merged, that will implement the unified codebase for the desktop+web client code.
It's also important to note that for this PR the goal was to not change the existing desktop behaviour, implementing if/else checks with import.meta.env.VITE_IS_WEB.
For this PR the main changes where:
remove in-memory implementation of fs.tsand stub code. Now the code throws exception.
adopt the new project API and therefore, save the projectId in the client to use in every HTTP call.
implement web.ts and *API.ts utilities to perform calls to the backend HTTP in a web context.
Adjust the code to flow the projectId to every business logic call in order to support listing, opening, upload files, and also references operations (ingestion, list, delete, edit).
Adopt the new HTTP api for the chat operation. The rewrite is still using the sidecar command.
Notes:
The code/files structure wasn't a priority for this PR. That organisation will be implemented in the follow-up PR.
(web) the open project will open one of the previously created projects (in the web context)
* Send env variables via header "X-..." in the HTTP sidecar interface
* Adds a projectsAPI to create new projects in the Web
* Support creating new projects for the Web
* Fix py lint
* WIP: Adopt fs api
* Fix settings API import
* handle env variable with middleware
* Add web.ts with api calls to backend server
* Remove outdated tests
* Fix `yarn check` issues
* Directly use !!import.meta.env.VITE_IS_WEB
* Configure project name via API
* Adopt HTTP ingestion for web
* Add support to delete references
* remove app startup utility
* Open one of the existing projects instead of open hard-coded
* Allow references to be edited (PATCH)
* Add support to chat with references via HTTP web
* Remove legacy fs.ts and stub
* Fix unit tests
* fix python tests
* Fix tauri-wrapper signature
* Fix yarn:check errors
* Fix test
* Remove unused args
0 commit comments