Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

queued-edit-draft-key.ts

10 lines455 Bytes

1/** Keep edit keys separate to preserve original drafts; the marker cannot contain colons because environment parsing uses the last one. */
2const QUEUED_EDIT_DRAFT_MARKER = "~queued-edit~";
3​
4export function queuedEditDraftKey(threadKey: string, runId: string): string {
5 return `${threadKey}${QUEUED_EDIT_DRAFT_MARKER}${runId}`;
6}
7​
8export function isQueuedEditDraftKey(draftKey: string): boolean {
9 return draftKey.includes(QUEUED_EDIT_DRAFT_MARKER);