MCPcopy
hub / github.com/garrytan/gstack / updateSession

Function updateSession

design/src/session.ts:67–79  ·  view source on GitHub ↗
(
  session: DesignSession,
  responseId: string,
  feedback: string,
  outputPath: string,
)

Source from the content-addressed store, hash-verified

65 * Update a session with new iteration data.
66 */
67export function updateSession(
68 session: DesignSession,
69 responseId: string,
70 feedback: string,
71 outputPath: string,
72): void {
73 session.lastResponseId = responseId;
74 session.feedbackHistory.push(feedback);
75 session.outputPaths.push(outputPath);
76 session.updatedAt = new Date().toISOString();
77
78 fs.writeFileSync(sessionPath(session.id), JSON.stringify(session, null, 2));
79}

Callers 1

iterateFunction · 0.90

Calls 2

sessionPathFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected