fix(plugins): read the marketplace index on first open (#1378)

On a fresh install, Settings › Plugins › Available showed no marketplace plugins until the user refreshed by hand: opening the page asked for the listing without a refresh, which only returned the cached index, and a first run has none. The listing now reads the index when none has been read yet; later opens keep using the index already read, and an explicit refresh reads it again.
Цей коміт міститься в:
l0ng-ai authored and GitHub committed 2026-11-05 10:04:42 +08:00
1 джерело 1248c3231e
коміт 89ffde304b
4 files changed
+35 -3

No files matched your search

+1 -1
Переглянути файл
@@ -999,7 +999,7 @@ export const commands = {
pluginWebReadFile: (path: string) => typedError<string, IdeError>(__TAURI_INVOKE("plugin_web_read_file", { path })),
/** Gutter markers of plugin `line-markers` providers for an open document. */
pluginLineMarkers: (doc: DocId) => typedError<LineMarkerInfo[], IdeError>(__TAURI_INVOKE("plugin_line_markers", { doc })),
/** The marketplace's plugins: read again when `refresh`, else the last index read. */
/** The marketplace's plugins: read again when `refresh` or when none was read yet, else the last index read. */
pluginMarket: (refresh: boolean) => typedError<MarketPlugin[], IdeError>(__TAURI_INVOKE("plugin_market", { refresh })),
pluginMarketUrl: () => __TAURI_INVOKE<string | null>("plugin_market_url"),
/** Sets the marketplace index URL (an `https://…/index.json` or a local path; `None` for the default). */