Add Message Metadata for Visibility Control (#4538)

This commit is contained in:
David Katz
2025-09-10 17:26:16 -04:00
committed by GitHub
parent 63f3669cf7
commit 3f17f4007a
26 changed files with 542 additions and 324 deletions
+13 -8
View File
@@ -98,14 +98,19 @@ export async function fetchSessionDetails(sessionId: string): Promise<SessionDet
path: { session_id: sessionId },
});
// Convert the SessionHistoryResponse to a SessionDetails object
return {
sessionId: response.data.sessionId,
metadata: ensureWorkingDir(response.data.metadata),
messages: response.data.messages.map((message: ApiMessage) =>
convertApiMessageToFrontendMessage(message, true, true)
), // slight diffs between backend and frontend Message obj
};
try {
// Convert the SessionHistoryResponse to a SessionDetails object
return {
sessionId: response.data.sessionId,
metadata: ensureWorkingDir(response.data.metadata),
messages: response.data.messages.map((message: ApiMessage) =>
convertApiMessageToFrontendMessage(message)
), // slight diffs between backend and frontend Message obj
};
} catch (error) {
console.error(`Error fetching session details for ${sessionId}:`, error);
throw error;
}
}
/**