Feat ContextProxy to improve state management#1235
Conversation
|
c12aea5 to
fc11d96
Compare
fc11d96 to
fbb5a19
Compare
|
I'm having trouble making this work - when I open two windows they still seem to be clobber each other's state when I use the mode selector in the chat textarea. Am I doing something wrong? |
|
I just pushed a PR to add per-window isolation - seems to work better now, I think? |
cf48c83 to
d68794c
Compare
|
https://drive.google.com/file/d/1S3LANpNB2ve6srseGP9KIitD-10SmUkR/view?usp=sharing my test with 2 instance vscode with 2 workspace at time :D |
- Add ContextProxy class as a wrapper around VSCode's ExtensionContext - Implement batched state updates for performance optimization - Update ClineProvider to use ContextProxy instead of direct context access - Add comprehensive test coverage for ContextProxy - Extract SECRET_KEYS and GLOBAL_STATE_KEYS constants for better maintainability
ec1f1b7 to
f9a65ce
Compare
0407bd6 to
956e1b1
Compare
956e1b1 to
9bbd902
Compare
|
@samhvw8 can you fix tests? Then I think we’re good 🚀 |
7e550f0 to
c3da5b0
Compare
Description
This feature will we can open multiple window (which can have different config (mode / api config))
Type of change
How Has This Been Tested?
Checklist:
Additional context
Related Issues
Reviewers
Important
Introduces
ContextProxyfor efficient state management inClineProvider, with batched updates and comprehensive testing.ContextProxyclass incontextProxy.tsto buffer state changes and secrets, committing them on request or disposal.ClineProvider.tswithContextProxyfor efficient state management.SECRET_KEYSandGLOBAL_STATE_KEYSconstants inglobalState.tsfor maintainability.ContextProxyincontextProxy.test.ts.ClineProvider.test.tsto mock and testContextProxyintegration.ClineProviderto useContextProxyfor state and secret management, ensuring proper disposal and state handling.This description was created by
for dec624cb2f425f59f1d3cd2b07603fa0c7e7c3ab. It will automatically update as commits are pushed.