Skip to main content

next_prompt_id

Function next_prompt_id 

Source
pub fn next_prompt_id() -> String
Expand description

Generate a new prompt id in the shape forge_prompt_<counter>_<hex8>.

Stamped as the uuid on every user frame forge writes. The CLI echoes it back on each of that prompt’s command_lifecycle frames, which is what lets a view key a queued card to its own send; the distinct prefix keeps prompt ids apart from control request ids in a stream-json log.

Never reuse one: the CLI treats a repeated id as a duplicate and drops the prompt silently (measured, no frames and no delivery).