ToolResultBlock 工具结果块
| 126 | |
| 127 | // ToolResultBlock 工具结果块 |
| 128 | type ToolResultBlock struct { |
| 129 | ToolUseID string `json:"tool_use_id"` |
| 130 | Content string `json:"content"` |
| 131 | IsError bool `json:"is_error,omitempty"` |
| 132 | |
| 133 | // 以下字段用于可恢复压缩(Manus Context Engineering) |
| 134 | // Compressed 标记内容是否已被压缩 |
| 135 | Compressed bool `json:"compressed,omitempty"` |
| 136 | // OriginalLength 原始内容长度(用于统计和验证) |
| 137 | OriginalLength int `json:"original_length,omitempty"` |
| 138 | // ContentHash 原始内容哈希(用于验证恢复) |
| 139 | ContentHash string `json:"content_hash,omitempty"` |
| 140 | // References 可恢复的引用列表(文件路径、URL 等) |
| 141 | References []ToolResultReference `json:"references,omitempty"` |
| 142 | } |
| 143 | |
| 144 | // ToolResultReference 工具结果中的引用 |
| 145 | type ToolResultReference struct { |
nothing calls this directly
no outgoing calls
no test coverage detected