Commit 03b6cd1
authored
Introduce type-safe message type for global state updates (#3115)
* feat(shared): add type-safe global state update handling
Introduce type-safe utilities for global state updates across the extension. This includes new types in GlobalStateTypes.ts, updated message handling in webviewMessageHandler.ts and WebviewMessage.ts, and helper functions in globalStateHelpers.ts with comprehensive tests. Ensures compile-time safety for state key-value pairs and prevents runtime errors from invalid state updates.
* Remove lastViewedReleaseVersion for now
* Remove lastViewedReleaseVersion for now1 parent 81bd30f commit 03b6cd1
File tree
4 files changed
+39
-3
lines changed- src
- core/webview
- webview-ui/src/utils
4 files changed
+39
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| 16 | + | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
| |||
85 | 87 | | |
86 | 88 | | |
87 | 89 | | |
88 | | - | |
| 90 | + | |
89 | 91 | | |
90 | 92 | | |
91 | 93 | | |
| |||
3505 | 3507 | | |
3506 | 3508 | | |
3507 | 3509 | | |
| 3510 | + | |
| 3511 | + | |
| 3512 | + | |
| 3513 | + | |
| 3514 | + | |
| 3515 | + | |
| 3516 | + | |
| 3517 | + | |
| 3518 | + | |
| 3519 | + | |
3508 | 3520 | | |
3509 | 3521 | | |
3510 | 3522 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
37 | 47 | | |
38 | 48 | | |
39 | 49 | | |
| |||
268 | 278 | | |
269 | 279 | | |
270 | 280 | | |
| 281 | + | |
271 | 282 | | |
272 | 283 | | |
273 | 284 | | |
| |||
387 | 398 | | |
388 | 399 | | |
389 | 400 | | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
390 | 404 | | |
391 | 405 | | |
392 | 406 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
0 commit comments