sourcegraph / cody

AI that knows your entire codebase
https://cody.dev
Apache License 2.0
2.22k stars 213 forks source link

Add sync index-db-based storage to cody web package #4719

Closed vovakulikov closed 1 day ago

vovakulikov commented 2 days ago

Part of SRCH-632

History note: This is the second attempt to bring custom storage support for cody web. (The first attempt with async storage support is here)

This is the first PR that comes from the biggest change we did for Cody Web in this main PR https://github.com/sourcegraph/cody/pull/4605

This PR extends the PlatformContext API in order to support newly created IndexDB storage. We have to support index db storage since this is the only storage that can be run within web-worker freely. (web workers don't support standard browser local storage)

Test plan