()
| 32 | } |
| 33 | |
| 34 | private async loadData() { |
| 35 | try { |
| 36 | const apiKey = await resolveProviderApiKey(this.app, this.provider); |
| 37 | this.allModels = await discoverProviderModels(this.provider, apiKey); |
| 38 | this.filtered = this.allModels.slice(); |
| 39 | this.loadError = null; |
| 40 | } catch (err) { |
| 41 | this.loadError = `${(err as { message?: string }).message ?? err}`; |
| 42 | new Notice(`Failed to load model directory: ${this.loadError}`); |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | private display() { |
| 47 | this.contentEl.empty(); |
no test coverage detected