Skip to content

Commit

Permalink
new load/save/import/embed queue
Browse files Browse the repository at this point in the history
  • Loading branch information
brianpetro committed Aug 25, 2024
1 parent 668b10c commit 74c36eb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { ScSettingsTab } from "./sc_settings_tab.js";
import embed_models from 'smart-embed-model/models.json';
import { ScActionsUx } from "./sc_actions_ux.js";
import { open_note } from "./open_note.js";
import { MultiFileSmartCollectionsAdapter } from "smart-collections/adapters/multi_file";
import { MultiFileSmartCollectionDataAdapter } from "smart-collections/adapters/multi_file";
import { SmartChatGPTView } from "./sc_chatgpt_view.js";
import { SmartPrivateChatView } from "./sc_private_chat_view.js";
import { SmartFs } from 'smart-file-system/smart_fs.js';
Expand Down Expand Up @@ -106,7 +106,7 @@ export default class SmartConnectionsPlugin extends Plugin {
this.env = new this.smart_env_class(this, this.smart_env_opts); // TODO: change to static create for re-use of same env
ScAppConnector.create(this.env, 37042); // Smart Connect
await this.env.init();
await this.env.smart_sources.import();
// await this.env.smart_sources.import();
}
new_user() {
if(!this.settings.new_user) return;
Expand Down Expand Up @@ -434,7 +434,7 @@ export default class SmartConnectionsPlugin extends Plugin {
},
// smart modules
smart_chunks_class: SmartChunks,
smart_collection_adapter_class: MultiFileSmartCollectionsAdapter,
smart_collection_adapter_class: MultiFileSmartCollectionDataAdapter,
smart_embed_model_class: SmartEmbedModel,
smart_fs_class: SmartFs,
smart_fs_adapter_class: ObsidianSmartFsAdapter,
Expand Down
4 changes: 3 additions & 1 deletion src/sc_settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ export class ScSettings extends SmartSettings {
async force_refresh() {
this.env.smart_blocks.clear();
this.env.smart_sources.clear();
this.env.smart_sources.import(); // trigger making new connections
await this.env.smart_sources.init(); // trigger making new connections
Object.values(this.env.smart_sources.items).forEach(item => item.queue_import());
await this.env.smart_sources.process_import_queue(); // trigger making new connections
}
update_smart_connections_folder() { this.plugin.update_smart_connections_folder(); }
refresh_smart_view() { this.embed_settings.refresh_smart_view(); }
Expand Down

0 comments on commit 74c36eb

Please sign in to comment.