Commit 7b8ec0f
埃博拉酱
feat: add sidebar panel, i18n, token validation, and UX improvements
- Add sidebar.js: full actionable sidebar panel with 6 GitHub operations
(Open Repo, Open Gist, Delete Gist, Delete Gist File, Update Token, Clear Cache)
- Add Chinese/English i18n based on device locale detection (navigator.languages)
- Token handling: normalize input (strip Bearer/token prefix, trim whitespace),
validate format, and immediately verify against GitHub /user API on save
- Enhanced API error messages: include GitHub's response message and documentation URL
- Fix stale gh:// filesystem handlers from old plugin instances via global registry
pattern (window.__acodeGithubFsTests__) for proper cleanup across plugin reloads
- Prefetch repos/branches before opening palette to avoid misleading empty results
- Show toast after opening repo folder guiding user to check file browser sidebar
- Pass listFiles:false to openFolder to skip 'list all files may crash' prompt
- Localize all user-facing strings: tutorial, commands, dialogs, toasts, settings
- Update .gitignore to exclude pem files, debug server, and package-lock.json1 parent 3430ec6 commit 7b8ec0f
File tree
5 files changed
+422
-55
lines changed- src
- GitHubAPI
5 files changed
+422
-55
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
53 | 60 | | |
54 | 61 | | |
55 | | - | |
| 62 | + | |
56 | 63 | | |
57 | 64 | | |
58 | 65 | | |
59 | 66 | | |
60 | 67 | | |
61 | | - | |
62 | | - | |
| 68 | + | |
| 69 | + | |
63 | 70 | | |
64 | 71 | | |
65 | 72 | | |
| |||
327 | 334 | | |
328 | 335 | | |
329 | 336 | | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
334 | 348 | | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
335 | 353 | | |
336 | 354 | | |
337 | 355 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 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 | + | |
13 | 37 | | |
14 | 38 | | |
15 | | - | |
| 39 | + | |
16 | 40 | | |
17 | 41 | | |
18 | 42 | | |
| |||
41 | 65 | | |
42 | 66 | | |
43 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
44 | 72 | | |
45 | 73 | | |
46 | 74 | | |
| |||
92 | 120 | | |
93 | 121 | | |
94 | 122 | | |
95 | | - | |
| 123 | + | |
96 | 124 | | |
97 | | - | |
| 125 | + | |
98 | 126 | | |
99 | 127 | | |
100 | 128 | | |
| |||
0 commit comments