remove redundant obsidian naming

This commit is contained in:
ransurf 2023-12-04 22:35:42 -08:00
parent a478baa855
commit 6513249156
4 changed files with 14 additions and 14 deletions

View File

@ -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:

12
main.ts
View File

@ -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;
}

View File

@ -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",

View File

@ -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<App | undefined>(undefined);
export const PluginContext = React.createContext<
ObsidianIntelligence | undefined
Intelligence | undefined
>(undefined);
export const OpenAIContext = React.createContext<OpenAI | undefined>(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;