Repository navigation
Commit 5c4c371
committed
Add in-app update detection and terminal-based installation while switching install scripts to download tagged source archives
- whenever home opens, should check if there is newer version of the vscode extension. the endpoint: https://api.github.com/repos/robertpiosik/CodeWebChat/tags, example output: [Pasted text]. note all results on the page could be of other extensions, e.g. browser. then should go thorugh page 2, page 3, etc. until *-vscode is found. If there is a newer version, show a new component 'UpdateAvailable' above 'target' buttons. The 'Update Available' should simply say, 'Update is available!' and show button 'Update' that upon click places command from `README.md` (depending on platform) in a new terminal. [Accuracy boost]
- make 'update is available' hoverable and the whole component expandable. hover effect is setting bg to [Fragment]. Once expanded show 3 lines of text: 1) Current version: X 2) Latest version: Y 3) Your version is 5 days old.
- strings in `apps/editor/src/views/prompt/frontend/Home/components/UpdateAvailable/UpdateAvailable.tsx` should be translated
- 'update available' should be UI component with tranlsations passed through props
- in installation scripts, instead of cloning git, we need to find the most recent *-vscode version in tags https://api.github.com/repos/robertpiosik/CodeWebChat/tags and get the zip (example response of this enpoint: [Pasted text]) [Accuracy boost]
- when querying https://api.github.com/repos/robertpiosik/CodeWebChat/tags use the default per page value
- some logs are different between scripts
- rename 'downloading latest version' to 'downloading latest source code'
├── README.md
├── apps
│ └── editor
│ └── src
│ └── views
│ ├── prompt
│ │ ├── backend
│ │ │ ├── message-handlers
│ │ │ │ ├── handle-get-version.ts
│ │ │ │ ├── handle-update-extension.ts
│ │ │ │ └── index.ts
│ │ │ └── prompt-view-provider.ts
│ │ ├── frontend
│ │ │ ├── App.tsx
│ │ │ ├── Home
│ │ │ │ ├── Home.module.scss
│ │ │ │ ├── Home.tsx
│ │ │ │ ├── hooks
│ │ │ │ │ ├── use-has-scrolled-past-mode-button.ts
│ │ │ │ │ ├── use-keyboard-shortcuts.ts
│ │ │ │ │ ├── use-tasks.ts
│ │ │ │ │ └── use-update-check.ts
│ │ │ │ └── index.ts
│ │ │ ├── Prompt.module.scss
│ │ │ ├── Prompt.tsx
│ │ │ ├── hooks
│ │ │ │ └── use-prompt
│ │ │ │ ├── hooks
│ │ │ │ │ └── use-instructions.ts
│ │ │ │ ├── index.ts
│ │ │ │ └── use-prompt.ts
│ │ │ └── i18n
│ │ │ ├── translations
│ │ │ │ ├── home.ts
│ │ │ │ └── index.ts
│ │ │ └── use-translation.tsx
│ │ └── types
│ │ └── messages.ts
│ └── shared
│ └── hooks
│ └── use-translation.tsx
├── install.ps1
├── install.sh
└── packages
└── ui
└── src
├── components
│ └── editor
│ ├── common
│ │ └── Button
│ │ └── Button.tsx
│ └── prompt-view
│ ├── Fieldset
│ │ ├── Fieldset.module.scss
│ │ └── Fieldset.tsx
│ ├── TargetButton
│ │ ├── TargetButton.module.scss
│ │ ├── TargetButton.stories.tsx
│ │ ├── TargetButton.tsx
│ │ └── index.ts
│ └── UpdateAvailable
│ ├── UpdateAvailable.module.scss
│ ├── UpdateAvailable.tsx
│ └── index.ts
└── styles
└── foundation
└── _colors.scss1 parent d15dbf0 commit 5c4c371
14 files changed
Lines changed: 471 additions & 26 deletions
File tree
- apps/editor/src/views/prompt
- backend
- message-handlers
- frontend
- Home
- hooks
- i18n/translations
- types
- packages/ui/src/components/editor
- common/Button
- prompt-view/UpdateAvailable
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
| 104 | + | |
104 | 105 | | |
105 | 106 | | |
106 | 107 | | |
| |||
931 | 932 | | |
932 | 933 | | |
933 | 934 | | |
| 935 | + | |
| 936 | + | |
934 | 937 | | |
935 | 938 | | |
936 | 939 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
142 | 150 | | |
143 | 151 | | |
144 | 152 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| |||
69 | 71 | | |
70 | 72 | | |
71 | 73 | | |
| 74 | + | |
| 75 | + | |
72 | 76 | | |
73 | 77 | | |
74 | 78 | | |
| |||
155 | 159 | | |
156 | 160 | | |
157 | 161 | | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
158 | 199 | | |
159 | 200 | | |
160 | 201 | | |
| |||
292 | 333 | | |
293 | 334 | | |
294 | 335 | | |
| 336 | + | |
295 | 337 | | |
296 | 338 | | |
297 | 339 | | |
| |||
322 | 364 | | |
323 | 365 | | |
324 | 366 | | |
| 367 | + | |
325 | 368 | | |
326 | 369 | | |
327 | 370 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 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 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
181 | 271 | | |
182 | 272 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
636 | 636 | | |
637 | 637 | | |
638 | 638 | | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
639 | 643 | | |
640 | 644 | | |
641 | 645 | | |
| |||
746 | 750 | | |
747 | 751 | | |
748 | 752 | | |
| 753 | + | |
749 | 754 | | |
750 | 755 | | |
751 | 756 | | |
| |||
0 commit comments