Skip to content

Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.

592 B
Raw Blame
import { uuidv4 } from "./uuid";

export interface TurnCommandMetadata {
  readonly commandId: string;
  readonly messageId: string;
  readonly threadId: string;
  readonly createdAt: string;
}

export function createTurnCommandMetadata(): TurnCommandMetadata {
  return {
    commandId: uuidv4(),
    messageId: uuidv4(),
    threadId: uuidv4(),
    createdAt: new Date().toISOString(),
  };
}

export function createQueuedMessageMetadata(): Omit<TurnCommandMetadata, "threadId"> {
  return {
    commandId: uuidv4(),
    messageId: uuidv4(),
    createdAt: new Date().toISOString(),
  };
}