fix: update addSource function to accept parameters and improve butto…#2011
fix: update addSource function to accept parameters and improve butto…#2011deadlyjack merged 1 commit intomainfrom
Conversation
…n onclick handler
Greptile SummaryThis PR refactors the
Confidence Score: 4/5Safe to merge — the onclick fix is correct and important, and the addSource refactor logic is sound; one minor unhandled-promise concern on the retry call. The onclick arrow-wrapper fix is the most important change and is correctly implemented. The addSource parameter refactor is well-designed, enabling pre-filled retry. The only concern is the missing await on the recursive addSource call in the catch block, which could silently swallow unhandled rejections in edge cases but is unlikely to affect normal usage. The tsconfig change is a safe, equivalent cleanup. src/sidebarApps/extensions/index.js — unawaited recursive addSource call on line 400 Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A([Button Click]) --> B["addSource()"]
B --> C{sourceType\nprovided?}
C -->|No| D[Show select dialog\nremote / local]
D --> E{User selected?}
E -->|No| Z([Return])
E -->|Yes| F{sourceType\n=== 'remote'?}
C -->|Yes, skip dialog| F
F -->|Yes| G["prompt('Enter plugin source', value, 'url')"]
F -->|No| H["FileBrowser('file', ...)"]
G --> I{source\nprovided?}
H --> I
I -->|No| Z
I -->|Yes| J[installPlugin(source)]
J --> K{Success?}
K -->|Yes| L[Reload explore / installed lists]
K -->|No| M[toast error message]
M --> N["addSource(sourceType, source)\n⚠️ not awaited"]
N --> F
|
…n onclick handler