MCPcopy Create free account
hub / github.com/TraderAlice/OpenAlice / patchSession

Function patchSession

ui/src/contexts/WorkspacesContext.tsx:379–390  ·  view source on GitHub ↗
(
  workspaces: readonly Workspace[],
  wsId: string,
  sessionId: string,
  patch: Partial<SessionRecord>,
)

Source from the content-addressed store, hash-verified

377}
378
379function patchSession(
380 workspaces: readonly Workspace[],
381 wsId: string,
382 sessionId: string,
383 patch: Partial<SessionRecord>,
384): Workspace[] {
385 return workspaces.map((w) =>
386 w.id === wsId
387 ? { ...w, sessions: w.sessions.map((s) => (s.id === sessionId ? { ...s, ...patch } : s)) }
388 : w,
389 )
390}

Callers 1

WorkspacesProviderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected