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

Function nextSession

app/store/chat.ts:330–335  ·  view source on GitHub ↗
(delta: number)

Source from the content-addressed store, hash-verified

328 },
329
330 nextSession(delta: number) {
331 const n = get().sessions.length;
332 const limit = (x: number) => (x + n) % n;
333 const i = get().currentSessionIndex;
334 get().selectSession(limit(i + delta));
335 },
336
337 deleteSession(index: number) {
338 const deletingLastSession = get().sessions.length === 1;

Callers

nothing calls this directly

Calls 2

getFunction · 0.70
limitFunction · 0.70

Tested by

no test coverage detected