add hyperlinks and resources in settings
This commit is contained in:
parent
a9074e4c89
commit
7c2e37c972
39
main.ts
39
main.ts
|
@ -39,7 +39,7 @@ export default class Intelligence extends Plugin {
|
||||||
this.addSettingTab(new OISettingTab(this.app, this));
|
this.addSettingTab(new OISettingTab(this.app, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
onunload() {}
|
onunload() { }
|
||||||
|
|
||||||
async loadSettings() {
|
async loadSettings() {
|
||||||
this.settings = Object.assign(
|
this.settings = Object.assign(
|
||||||
|
@ -86,9 +86,44 @@ class OISettingTab extends PluginSettingTab {
|
||||||
|
|
||||||
containerEl.empty();
|
containerEl.empty();
|
||||||
|
|
||||||
|
const settingPageHeader = containerEl.createEl('div', { cls: 'setting-item setting-item-heading' });
|
||||||
|
const extraSectionInfo = settingPageHeader.createEl('div', { cls: 'setting-item-info' });
|
||||||
|
|
||||||
|
extraSectionInfo.createEl('div', { text: 'Intelligence', cls: 'setting-item-name' });
|
||||||
|
|
||||||
|
const colorDesc = extraSectionInfo.createEl('div', { cls: 'setting-item-description' });
|
||||||
|
|
||||||
|
colorDesc.appendChild(
|
||||||
|
createEl('span', {
|
||||||
|
text: 'You can also view and modify assistants/threads online from the '
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
colorDesc.appendChild(
|
||||||
|
createEl('a', {
|
||||||
|
text: "OpenAI Developer Playground",
|
||||||
|
href: "https://platform.openai.com/assistants",
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
const keyDescription = document.createDocumentFragment();
|
||||||
|
|
||||||
|
keyDescription.appendChild(
|
||||||
|
createEl('span', {
|
||||||
|
text: 'You can find your OpenAI key at ',
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
|
||||||
|
keyDescription.appendChild(
|
||||||
|
createEl('a', {
|
||||||
|
text: 'https://platform.openai.com/api-keys',
|
||||||
|
href: 'https://platform.openai.com/api-keys',
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
|
||||||
new Setting(containerEl)
|
new Setting(containerEl)
|
||||||
.setName('OpenAI Key')
|
.setName('OpenAI Key')
|
||||||
.setDesc('Can find it https://platform.openai.com/api-keys')
|
.setDesc(keyDescription)
|
||||||
.addText((text) =>
|
.addText((text) =>
|
||||||
text
|
text
|
||||||
.setPlaceholder('Enter your API Key')
|
.setPlaceholder('Enter your API Key')
|
||||||
|
|
Loading…
Reference in New Issue