• Queue consumer handler for processing prompt update and delete messages.

    This function is designed to be used as a Cloudflare Queue consumer handler. It processes batches of prompt update and delete operations, writing them to the KV namespace for fast edge access.

    Parameters

    • batch: MessageBatch<PromptUpdate | PromptDelete>

      The message batch from the queue

    • env: ENV

      Environment bindings containing the PROMPTS KV namespace

    • ctx: ExecutionContext

      Execution context for the worker

    Returns Promise<void>

    Promise that resolves when all messages in the batch are processed

    export default {
    async queue(batch, env, ctx) {
    await Teleprompter.HandleUpdates(batch, env, ctx);
    }
    }