remove obsidian naming + sentence case
This commit is contained in:
parent
76b4c70a79
commit
07a8032c5a
|
@ -1,6 +1,6 @@
|
||||||
import React, { useEffect, useMemo } from 'react';
|
import React, { useEffect, useMemo } from 'react';
|
||||||
import OpenAI from 'openai';
|
import OpenAI from 'openai';
|
||||||
import { OBSIDIAN_INTELLIGENCE_VIEW_TYPE, useApp, useOpenAI, usePlugin } from '../AppView';
|
import { INTELLIGENCE_VIEW_TYPE, useApp, useOpenAI, usePlugin } from '../AppView';
|
||||||
import { IThread } from '../types';
|
import { IThread } from '../types';
|
||||||
import DropdownSelect from './DropdownSelect';
|
import DropdownSelect from './DropdownSelect';
|
||||||
import { MarkdownView } from 'obsidian';
|
import { MarkdownView } from 'obsidian';
|
||||||
|
@ -97,7 +97,7 @@ const AssistantManager = ({
|
||||||
id: 'create-assistant-from-active-note',
|
id: 'create-assistant-from-active-note',
|
||||||
name: 'Create Thread',
|
name: 'Create Thread',
|
||||||
callback: async () => {
|
callback: async () => {
|
||||||
const isViewOpen = app.workspace.getLeavesOfType(OBSIDIAN_INTELLIGENCE_VIEW_TYPE).some((leaf) => {
|
const isViewOpen = app.workspace.getLeavesOfType(INTELLIGENCE_VIEW_TYPE).some((leaf) => {
|
||||||
return leaf.view;
|
return leaf.view;
|
||||||
});
|
});
|
||||||
if (!isViewOpen) {
|
if (!isViewOpen) {
|
||||||
|
@ -110,10 +110,6 @@ const AssistantManager = ({
|
||||||
});
|
});
|
||||||
}, [plugin]);
|
}, [plugin]);
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
console.log('threads update', threads);
|
|
||||||
}, [threads]);
|
|
||||||
|
|
||||||
const createThread = async () => {
|
const createThread = async () => {
|
||||||
if (!openaiInstance || !plugin) {
|
if (!openaiInstance || !plugin) {
|
||||||
return;
|
return;
|
||||||
|
@ -184,7 +180,7 @@ const AssistantManager = ({
|
||||||
|
|
||||||
new ThreadEditModal({
|
new ThreadEditModal({
|
||||||
app,
|
app,
|
||||||
title: 'Edit Thread',
|
title: 'Edit thread',
|
||||||
submitButtonText: 'Edit',
|
submitButtonText: 'Edit',
|
||||||
previousValues,
|
previousValues,
|
||||||
onSubmit: editThread,
|
onSubmit: editThread,
|
||||||
|
@ -265,7 +261,7 @@ const AssistantManager = ({
|
||||||
// setActiveAssistant(assistant);
|
// setActiveAssistant(assistant);
|
||||||
new AssistantEditModal({
|
new AssistantEditModal({
|
||||||
app,
|
app,
|
||||||
title: 'Create New Assistant',
|
title: 'Create new assistant',
|
||||||
submitButtonText: 'Create',
|
submitButtonText: 'Create',
|
||||||
previousValues: assistant,
|
previousValues: assistant,
|
||||||
onSubmit: createAssistant,
|
onSubmit: createAssistant,
|
||||||
|
|
Loading…
Reference in New Issue