Skip to content

parseConversationRef

parseConversationRef(raw): ConversationRef | null

Defined in: packages/core/src/history/conversationRef.ts:42

Parse what a person typed as a conversation id, or null when it is neither form.

  • A positive whole number in decimal, optionally written #12 the way the listing prints it.
  • A canonical UUID, normalised to lower case, because SQLite compares TEXT case-sensitively and randomUUID() mints lower case — so a UUID pasted in upper case still names its row.

Anything else is null, including 12abc and 1.5: a token that is only partly an id is a typo worth naming, never a lookup worth making on the part that parsed.

string | undefined

ConversationRef | null