@devries-cameron20 / composio Mirror · read-only
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 21, 04:45 UTC

next
ts 12 lines 499 Bytes
Raw
1 import type { SessionExperimental } from '../types/toolRouter.types';
2
3 /**
4 * Reads the saved Session config most recently applied to a session from a
5 * create, retrieve, attach or patch response. Copies only `id`.
6 */
7 export const getSourceSessionConfig = (response: {
8 experimental?: { source_session_config?: { id: string } };
9 }): SessionExperimental['sourceSessionConfig'] => {
10 const source = response.experimental?.source_session_config;
11 return source ? { id: source.id } : undefined;
12 };