- Notifications
You must be signed in to change notification settings - Fork1
Commit6bb0599
authored
impl: support for Toolbox 2.6.3 (#124)
Toolbox 2.6.3 comes with a couple of new additions in the API which needthe following changes:- finish support for URI handling. The available API up to TBX 2.6.3 wasbuggy in terms of URI handling. It didn't allow plugins toprogrammatically install remote ides and launch them. The launchoperation only worked when the IDE was already installed and a projectwas already opened with the IDE.TBX 2.6.3 adds a new API, _RemoteToolboxHelp_ which provides routinesfor listing the availableIDEs on the remote, what is already installed and a command to installspecific versions of the IDE.Additionally, there were fixes provided to the existing _ClientHelper_which now launches the JBClientif a project was not specified. An additional quirk I've discovered isthat if we provide a project, andthat project was not already opened (present in the Projects tab) theIDE still won't open. And there is no API available to query the available projects. This PR uses the new API to: - query the installed ides - check if the provided ide is in the list of already installed IDEs.- if that's not the case we query the available list of IDEs and theavailable versions- if the provided ide and build no., is in the available list we willschedule it for install- if not, we select the latest available build number for the providedproduct code. - wait for the remote IDE to be installed- and then download and launch the JBClient with a project path if itwas provided.- update the minimum API requirement. Toolbox API is upgraded to1.1.41749 which comes with new API additions and some deprecations.Kotlin stdlib was also increased to a newer patch version- use new environment state API. The _CustomRemoteEnvironmentState_ isdeprecated, and replaced by a new class _CustomRemoteEnvironmentStateV2_which now supports i18n state labels- use the new ssh disconnect callback. Toolbox provides two callbacks,one before an SSH connection is established and another one whichexecutes when the ssh connection is stopped. The latter was deprecatedin the favor of a new callback that also provides hints on whether theuser requested the disconnect.- use the new delete callback API. Toolbox provides a callback forscenarios that involve the env. deletion. This allows plugins to reactand clean the internal state. With the new TBX API, the delete callbackAPI is deprecated in the favor of a mutable state flow, a reactiveapproach that allows consumers to observe and react to state changesover time.1 parent09ecfcf commit6bb0599
File tree
16 files changed
+449
-342
lines changed- gradle
- src
- main
- kotlin/com/coder/toolbox
- models
- sdk
- util
- resources/localization
- test/kotlin/com/coder/toolbox
- cli
- sdk
- util
16 files changed
+449
-342
lines changedLines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2 | 2 |
| |
3 | 3 |
| |
4 | 4 |
| |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
5 | 9 |
| |
6 | 10 |
| |
7 | 11 |
| |
|
Lines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
101 | 101 |
| |
102 | 102 |
| |
103 | 103 |
| |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
104 | 109 |
| |
105 | 110 |
| |
106 | 111 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 |
| - | |
| 1 | + | |
2 | 2 |
| |
3 | 3 |
|
Lines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 |
| - | |
3 |
| - | |
| 2 | + | |
| 3 | + | |
4 | 4 |
| |
5 | 5 |
| |
6 | 6 |
| |
| |||
9 | 9 |
| |
10 | 10 |
| |
11 | 11 |
| |
12 |
| - | |
| 12 | + | |
13 | 13 |
| |
14 | 14 |
| |
15 | 15 |
| |
|
Lines changed: 3 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
27 | 27 |
| |
28 | 28 |
| |
29 | 29 |
| |
| 30 | + | |
30 | 31 |
| |
31 | 32 |
| |
32 | 33 |
| |
| |||
203 | 204 |
| |
204 | 205 |
| |
205 | 206 |
| |
206 |
| - | |
| 207 | + | |
207 | 208 |
| |
208 | 209 |
| |
209 | 210 |
| |
| |||
269 | 270 |
| |
270 | 271 |
| |
271 | 272 |
| |
272 |
| - | |
| 273 | + | |
273 | 274 |
| |
274 | 275 |
| |
275 | 276 |
| |
|
Lines changed: 45 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
| 10 | + | |
10 | 11 |
| |
11 | 12 |
| |
12 | 13 |
| |
13 | 14 |
| |
14 | 15 |
| |
15 | 16 |
| |
| 17 | + | |
16 | 18 |
| |
| 19 | + | |
17 | 20 |
| |
18 | 21 |
| |
19 | 22 |
| |
20 | 23 |
| |
21 |
| - | |
| 24 | + | |
| 25 | + | |
22 | 26 |
| |
23 | 27 |
| |
24 | 28 |
| |
| |||
44 | 48 |
| |
45 | 49 |
| |
46 | 50 |
| |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
47 | 91 |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
13 | 13 |
| |
14 | 14 |
| |
15 | 15 |
| |
| 16 | + | |
16 | 17 |
| |
17 | 18 |
| |
18 | 19 |
| |
| |||
31 | 32 |
| |
32 | 33 |
| |
33 | 34 |
| |
| 35 | + | |
34 | 36 |
| |
35 | 37 |
| |
36 | 38 |
| |
|
Lines changed: 7 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| |||
61 | 61 |
| |
62 | 62 |
| |
63 | 63 |
| |
64 |
| - | |
65 |
| - | |
66 |
| - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
67 | 67 |
| |
68 | 68 |
| |
69 | 69 |
| |
| |||
90 | 90 |
| |
91 | 91 |
| |
92 | 92 |
| |
93 |
| - | |
| 93 | + | |
94 | 94 |
| |
95 |
| - | |
96 |
| - | |
| 95 | + | |
| 96 | + | |
97 | 97 |
| |
98 | 98 |
| |
99 | 99 |
| |
|
Lines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
192 | 192 |
| |
193 | 193 |
| |
194 | 194 |
| |
195 |
| - | |
| 195 | + | |
196 | 196 |
| |
197 |
| - | |
| 197 | + | |
198 | 198 |
| |
199 | 199 |
| |
200 |
| - | |
| 200 | + | |
201 | 201 |
| |
202 | 202 |
| |
203 | 203 |
| |
|
0 commit comments
Comments
(0)