diff --git a/README.md b/README.md index d970e30..40ff52b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Obsidian Intelligence +# Intelligence ## DISCLAIMER Educate yourself on the related prices when using large language models like GPT-4 at https://openai.com/pricing. This model uses the Assistants API, which includes the following costs: diff --git a/main.ts b/main.ts index 5cb0564..7333261 100644 --- a/main.ts +++ b/main.ts @@ -3,7 +3,7 @@ import { AppView, OBSIDIAN_INTELLIGENCE_VIEW_TYPE } from './src/ui/AppView'; import OpenAI from 'openai'; import { IThread } from './src/ui/types'; -interface ObsidianIntelligenceSettings { +interface IntelligenceSettings { openaiKey: string; threads: IThread[]; activeThread: IThread | undefined; @@ -11,7 +11,7 @@ interface ObsidianIntelligenceSettings { activeAssistantFiles: OpenAI.Files.FileObject[] | undefined; } -const DEFAULT_SETTINGS: ObsidianIntelligenceSettings = { +const DEFAULT_SETTINGS: IntelligenceSettings = { openaiKey: '', threads: [], activeThread: undefined, @@ -19,8 +19,8 @@ const DEFAULT_SETTINGS: ObsidianIntelligenceSettings = { activeAssistantFiles: undefined, }; -export default class ObsidianIntelligence extends Plugin { - settings: ObsidianIntelligenceSettings; +export default class Intelligence extends Plugin { + settings: IntelligenceSettings; view: AppView; async onload() { @@ -85,9 +85,9 @@ export default class ObsidianIntelligence extends Plugin { } class OISettingTab extends PluginSettingTab { - plugin: ObsidianIntelligence; + plugin: Intelligence; - constructor(app: App, plugin: ObsidianIntelligence) { + constructor(app: App, plugin: Intelligence) { super(app, plugin); this.plugin = plugin; } diff --git a/manifest.json b/manifest.json index e45e838..6d09168 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { - "id": "obsidian-intelligence", - "name": "Obsidian Intelligence", + "id": "intelligence", + "name": "Intelligence", "version": "1.0.0", "minAppVersion": "0.15.0", "description": "OpenAI GPT Assistants functionality inside Obsidian", diff --git a/src/ui/AppView.tsx b/src/ui/AppView.tsx index b13c858..c7775e4 100644 --- a/src/ui/AppView.tsx +++ b/src/ui/AppView.tsx @@ -3,7 +3,7 @@ import * as React from 'react'; import { Root, createRoot } from 'react-dom/client'; import PluginView from './PluginView'; import { App } from 'obsidian'; -import ObsidianIntelligence from '../../main'; +import Intelligence from '../../main'; import OpenAI from 'openai'; export const OBSIDIAN_INTELLIGENCE_VIEW_TYPE = 'obsidian-intelligence-view'; @@ -13,7 +13,7 @@ export const OBSIDIAN_INTELLIGENCE_VIEW_TYPE = 'obsidian-intelligence-view'; export const AppContext = React.createContext(undefined); export const PluginContext = React.createContext< - ObsidianIntelligence | undefined + Intelligence | undefined >(undefined); export const OpenAIContext = React.createContext(undefined); @@ -24,7 +24,7 @@ export const useApp = (): App | undefined => { return React.useContext(AppContext); }; -export const usePlugin = (): ObsidianIntelligence | undefined => { +export const usePlugin = (): Intelligence | undefined => { return React.useContext(PluginContext); }; @@ -38,11 +38,11 @@ export const useOpenAI = (): OpenAI | undefined => { export class AppView extends ItemView { root: Root | null = null; - plugin: ObsidianIntelligence; + plugin: Intelligence; openAI: OpenAI; // commands: ICommandPayload | undefined; - constructor(leaf: WorkspaceLeaf, plugin: ObsidianIntelligence) { + constructor(leaf: WorkspaceLeaf, plugin: Intelligence) { super(leaf); this.plugin = plugin; const openaiKey = plugin.settings.openaiKey;