Fresh history cut from cynarAI/evoo antigravity-handoff/project-timeline (Voice First + project timeline). Brand docs/titles as evOo; keep @rakazo/* packages as tech debt. Excludes node_modules, caches, secrets, voice blobs.
26 lines
660 B
TypeScript
26 lines
660 B
TypeScript
import { ACTIVE_RUN_STATUSES } from "@rakazo/core";
|
|
|
|
export const activeRunStatuses = [...ACTIVE_RUN_STATUSES];
|
|
|
|
export const activeRunSelection = {
|
|
where: { status: { in: activeRunStatuses } },
|
|
orderBy: { createdAt: "desc" as const },
|
|
take: 1,
|
|
select: { status: true },
|
|
} as const;
|
|
|
|
export function previewFromBlocks(blocks: unknown): string {
|
|
const rows = Array.isArray(blocks) ? blocks : [];
|
|
for (const block of rows) {
|
|
if (
|
|
block &&
|
|
typeof block === "object" &&
|
|
"text" in block &&
|
|
typeof (block as { text?: unknown }).text === "string"
|
|
) {
|
|
return (block as { text: string }).text;
|
|
}
|
|
}
|
|
return "";
|
|
}
|