MCPcopy
hub / github.com/ChatGPTNextWeb/NextChat / createEmptySession

Function createEmptySession

app/store/chat.ts:104–120  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

102});
103
104function createEmptySession(): ChatSession {
105 return {
106 id: nanoid(),
107 topic: DEFAULT_TOPIC,
108 memoryPrompt: "",
109 messages: [],
110 stat: {
111 tokenCount: 0,
112 wordCount: 0,
113 charCount: 0,
114 },
115 lastUpdate: Date.now(),
116 lastSummarizeIndex: 0,
117
118 mask: createEmptyMask(),
119 };
120}
121
122function getSummarizeModel(
123 currentModel: string,

Callers 6

chat.tsFile · 0.85
forkSessionFunction · 0.85
clearSessionsFunction · 0.85
newSessionFunction · 0.85
deleteSessionFunction · 0.85
migrateFunction · 0.85

Calls 2

createEmptyMaskFunction · 0.90
nanoidFunction · 0.85

Tested by

no test coverage detected