MCPcopy Create free account
hub / github.com/continuedev/continue / isValidExportedSession

Function isValidExportedSession

extensions/cli/src/slashCommands.ts:167–181  ·  view source on GitHub ↗
(data: unknown)

Source from the content-addressed store, hash-verified

165}
166
167function isValidExportedSession(data: unknown): data is ExportedSession {
168 if (typeof data !== "object" || data === null) {
169 return false;
170 }
171 const obj = data as Record<string, unknown>;
172 return (
173 obj.version === EXPORTED_SESSION_VERSION &&
174 typeof obj.exportedAt === "string" &&
175 typeof obj.session === "object" &&
176 obj.session !== null &&
177 typeof (obj.session as Record<string, unknown>).sessionId === "string" &&
178 typeof (obj.session as Record<string, unknown>).title === "string" &&
179 Array.isArray((obj.session as Record<string, unknown>).history)
180 );
181}
182
183function handleExport(_args: string[]): SlashCommandResult {
184 return {

Callers 1

handleImportFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected