feat: add dynamic model fetching from Anthropic API #2

Merged
AlexKucera merged 10 commits from dynamic-models into master 2025-10-24 11:14:13 +02:00
Showing only changes of commit 5c8314a986 - Show all commits
+12 -3
View File
1
@@ -25,14 +25,23 @@ export class FreewritingCleanupSettingTab extends PluginSettingTab {
this.plugin = plugin;
}
async display(): Promise<void> {
display(): void {
const { containerEl } = this;
containerEl.empty();
containerEl.createEl('h2', { text: 'Freewriting Cleanup Settings' });
// Load models asynchronously
await this.loadModels();
// Load models asynchronously in the background
this.loadModels()
.then(() => {
// Update dropdown UI when models are loaded
if (this.modelDropdown) {
this.populateModelDropdown(this.modelDropdown);
}
})
.catch((error) => {
console.error('Error loading models in background:', error);
});
// MARK: - API Configuration
1