-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.ts
42 lines (35 loc) · 904 Bytes
/
main.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import {Plugin} from "obsidian";
import {
DEFAULT_SETTINGS,
ProfMatchIaPluginSettings,
ProfMatchIaSettingTab,
} from "src/plugin-settings";
import Orchestrator from "src/orchestrator";
export default class ProfMatchIaPlugin extends Plugin {
settings: ProfMatchIaPluginSettings;
private orchestrator: Orchestrator;
template_folder: string;
async onload() {
await this.loadSettings();
this.orchestrator = new Orchestrator(this.app, this.settings);
this.addCommand({
id: "generate-job-experiences",
name: "Generate job experiences",
callback: async () => {
this.orchestrator.summarize();
},
});
this.addSettingTab(new ProfMatchIaSettingTab(this.app, this));
}
async onunload() {}
async loadSettings() {
this.settings = Object.assign(
{},
DEFAULT_SETTINGS,
await this.loadData()
);
}
async saveSettings() {
await this.saveData(this.settings);
}
}