save conversation button

This commit is contained in:
josc146
2023-06-16 00:12:13 +08:00
parent 7f85a08508
commit 2beddab114
6 changed files with 112 additions and 60 deletions

View File

@@ -3,7 +3,7 @@ import { getUserLanguage, isSystemLightMode, saveConfigs } from '../utils';
import { WindowSetDarkTheme, WindowSetLightTheme } from '../../wailsjs/runtime';
import manifest from '../../../manifest.json';
import { ModelConfig } from '../pages/Configs';
import { Conversations } from '../pages/Chat';
import { Conversation } from '../pages/Chat';
import { ModelSourceItem } from '../pages/Models';
import { DownloadStatus } from '../pages/Downloads';
import { SettingsType } from '../pages/Settings';
@@ -42,8 +42,8 @@ class CommonStore {
introduction: IntroductionContent = manifest.introduction;
// chat
currentInput: string = '';
conversations: Conversations = {};
conversationsOrder: string[] = [];
conversation: Conversation = {};
conversationOrder: string[] = [];
// completion
completionPreset: CompletionPreset | null = null;
completionGenerating: boolean = false;
@@ -164,12 +164,12 @@ class CommonStore {
this.downloadList = value;
};
setConversations = (value: Conversations) => {
this.conversations = value;
setConversation = (value: Conversation) => {
this.conversation = value;
};
setConversationsOrder = (value: string[]) => {
this.conversationsOrder = value;
setConversationOrder = (value: string[]) => {
this.conversationOrder = value;
};
setCompletionPreset(value: CompletionPreset) {