mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-08-09 01:08:41 +08:00
feat: close #1478 new chat use global config as default
This commit is contained in:
@@ -5,9 +5,9 @@ import { trimTopic } from "../utils";
|
||||
|
||||
import Locale from "../locales";
|
||||
import { showToast } from "../components/ui-lib";
|
||||
import { ModelType } from "./config";
|
||||
import { ModelType, useAppConfig } from "./config";
|
||||
import { createEmptyMask, Mask } from "./mask";
|
||||
import { REQUEST_TIMEOUT_MS, StoreKey } from "../constant";
|
||||
import { StoreKey } from "../constant";
|
||||
import { api, RequestMessage } from "../client/api";
|
||||
import { ChatControllerPool } from "../client/controller";
|
||||
import { prettyObject } from "../utils/format";
|
||||
@@ -38,7 +38,6 @@ export interface ChatStat {
|
||||
|
||||
export interface ChatSession {
|
||||
id: number;
|
||||
|
||||
topic: string;
|
||||
|
||||
memoryPrompt: string;
|
||||
@@ -69,6 +68,7 @@ function createEmptySession(): ChatSession {
|
||||
},
|
||||
lastUpdate: Date.now(),
|
||||
lastSummarizeIndex: 0,
|
||||
|
||||
mask: createEmptyMask(),
|
||||
};
|
||||
}
|
||||
@@ -463,7 +463,7 @@ export const useChatStore = create<ChatStore>()(
|
||||
|
||||
if (
|
||||
historyMsgLength > modelConfig.compressMessageLengthThreshold &&
|
||||
session.mask.modelConfig.sendMemory
|
||||
modelConfig.sendMemory
|
||||
) {
|
||||
api.llm.chat({
|
||||
messages: toBeSummarizedMsgs.concat({
|
||||
|
Reference in New Issue
Block a user