读取会话内容
piweb_get_sessionRead a pi coding agent session transcript by ID, prefix, name, or message snippet, with paging, tool-call summaries, and optional thinking previews.
Instructions
读取一个会话的对话内容(默认最后 30 条消息,含工具调用摘要)。session 可传完整 id、id 前缀、会话名称或名称/首条消息片段。要读更早的历史用 offset 往前翻;思考内容默认只给预览,include_thinking="full" 会去取完整思考链。默认会把该会话在本地标记为已读。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tail | No | 读取最后 N 条消息,默认 30;要全量就传大值 | |
| format | No | markdown(默认)或 json(原始消息结构) | |
| offset | No | 从末尾往前跳过 N 条,用于分页读更早的历史,默认 0 | |
| session | Yes | 会话 id / id 前缀 / 名称 / 名称或首条消息片段 | |
| mark_read | No | 读完后标记已读,默认 true | |
| max_chars | No | 正文总字数预算,默认 60000 | |
| include_tools | No | 是否包含工具调用与结果,默认 true | |
| include_thinking | No | 思考内容:none(默认)/preview(预览)/full(取全文,较慢) | |
| tool_result_chars | No | 单条工具结果截断长度,默认 800 |