MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / decodeConversationCursor

Function decodeConversationCursor

packages/kilo-chat/src/utils.ts:90–99  ·  view source on GitHub ↗
(encoded: string)

Source from the content-addressed store, hash-verified

88}
89
90export function decodeConversationCursor(encoded: string): ConversationCursor | null {
91 try {
92 const json = new TextDecoder().decode(base64urlDecode(encoded));
93 const parsed: unknown = JSON.parse(json);
94 const cursor = conversationCursorSchema.safeParse(parsed);
95 return cursor.success ? cursor.data : null;
96 } catch {
97 return null;
98 }
99}
100
101/**
102 * Extract plain text from an array of content blocks.

Callers 5

utils.test.tsFile · 0.90
decodeFunction · 0.90

Calls 2

base64urlDecodeFunction · 0.85
decodeMethod · 0.45

Tested by 1

decodeFunction · 0.72