← 教程列表
news

Browser Events Format

📅 2026/6/12 16:30:02⏱ 约 5 分钟阅读👁 8 阅读

When the user clicks options in the browser, their interactions are recorded to `$STATE_DIR/events` (one JSON object per line). The file is cleared automatically when you push a new screen. ```jsonl {"type":"click","choice":"a","text":"Option A - Simple Layout","timestamp":1706000101} {"type":"click","choice":"c","text":"Option C - Complex Grid","timestamp":1706000108} {"type":"click","choice":"b","text":"Option B - Hybrid","timestamp":1706000115} ``` The full event stream shows the user's exploration path — they may click multiple options before settling. The last `choice` event is typically the final selection, but the pattern of clicks can reveal hesitation or preferences worth asking about. If `$STATE_DIR/events` doesn't exist, the user didn't interact with the browser — use only their terminal text.

← 返回教程列表 AI8899 · 内容仅供学习参考