Interface: PromptContext
Defined in: packages/aiui-oracle/src/types.ts:50
What a prompt resolver is told about the session it is composing for.
Everything here is a fact only the SESSION can know. Anything about the human — have they been here before, what is their name, did they finish the tour — belongs to the app, which closes over its own cookie or storage: the package deliberately learns nothing about persistence.
Properties
reason
reason:
"start"|"reconnect"|"refresh"
Defined in: packages/aiui-oracle/src/types.ts:55
Why we are composing. start is a first open, reconnect a later one on the same session object, refresh an explicit ../session.OracleSession.refreshPrompt (or an each-turn recompose).
starts
starts:
number
Defined in: packages/aiui-oracle/src/types.ts:70
How many times this session object has been started. 1 on a first open; a page that has never reloaded keeps counting up.
turns
turns:
number
Defined in: packages/aiui-oracle/src/types.ts:67
User turns OPENED so far in this session — the same count the viewer's turn grouping shows, since both come from opensTurn.
Reset to 0 on every start: a reconnect is a new vendor session with no memory of the last one, so carrying the count over would describe a conversation the model cannot remember having.
0 while composing for start, which is why a turn-sensitive prompt needs a recompose to mean anything (see OracleConfig.recompose).
usage
usage:
UsageTotals
Defined in: packages/aiui-oracle/src/types.ts:72
Spend so far this session.