926
/** Serializes the current session's metadata + open link as the `get_current_session` result. */
927
export function serializeCurrentSession(currentSession: URI, sessions: readonly IAgentSessionMetadata[]): string {
928
>
const meta = sessions.find(s => s.session.toString() === currentSession.toString());
sessionServerTools.ts
929
>
return JSON.stringify({
930
>
session: currentSession.toString(),
931
>
openLink: buildOpenSessionLinkUri(currentSession),
932
>
...(meta ? serializeSession(meta) : {}),
933
>
});
934
>
}
935
936
function parseListedSessionCount(resultText: string | undefined): number | undefined {