8 lines
342 B
TypeScript
8 lines
342 B
TypeScript
import type { StartStep } from "@uncaged/nerve-core";
|
|
|
|
/** Runtime may include threadId before types catch up in published nerve-core. */
|
|
export function threadIdFromStart(start: StartStep): string {
|
|
const m = start.meta as { threadId?: string };
|
|
return typeof m.threadId === "string" && m.threadId.length > 0 ? m.threadId : "unknown";
|
|
}
|