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.
20 lines
674 B
TypeScript
20 lines
674 B
TypeScript
import type { ThreadMessage } from "@rakazo/contracts";
|
|
import { messageProviderLabel } from "./messaging";
|
|
|
|
/** Plain message text for clipboard copy — text/ask/progress only, no chrome. */
|
|
export function copyableMessageText(message: ThreadMessage): string {
|
|
return message.blocks
|
|
.map((block) => {
|
|
if (block.kind === "channel_message") {
|
|
return `${messageProviderLabel(block.provider, block.transport)} · ${block.fromLabel}: ${block.text}`;
|
|
}
|
|
if (block.kind === "text" || block.kind === "progress" || block.kind === "ask") {
|
|
return block.text;
|
|
}
|
|
return "";
|
|
})
|
|
.filter(Boolean)
|
|
.join("\n")
|
|
.trim();
|
|
}
|