From 1efecaef1f867cb218366e2b4ab4b901fdd2835f Mon Sep 17 00:00:00 2001 From: tanaka takashi Date: Sat, 4 Jul 2026 14:54:45 +0900 Subject: 途中経過コミット MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mcp/tools/common/common.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'src/mcp/tools/common/common.c') diff --git a/src/mcp/tools/common/common.c b/src/mcp/tools/common/common.c index d6669f8..62f507f 100644 --- a/src/mcp/tools/common/common.c +++ b/src/mcp/tools/common/common.c @@ -68,6 +68,10 @@ tiny_mcp_tool_append_message(tiny_json_buffer_t *json, const tiny_message_t *mes tiny_json_string(json, tiny_role_name(message->role)); tiny_json_raw(json, ",\"content\":"); tiny_json_string(json, message->content); + tiny_json_raw(json, ",\"revision\":"); + tiny_json_u64(json, message->revision); + tiny_json_raw(json, ",\"updated_at\":"); + tiny_json_i64(json, message->updated_at_ms); tiny_json_raw(json, ",\"metadata\":{"); if (message->metadata.tool_call_id) { @@ -86,6 +90,38 @@ tiny_mcp_tool_append_message(tiny_json_buffer_t *json, const tiny_message_t *mes } tiny_json_raw(json, "],\"memory_tier\":"); tiny_json_string(json, tiny_tier_name(message->metadata.memory_tier)); + tiny_json_raw(json, ",\"memory_kind\":"); + tiny_json_string(json, tiny_kind_name(message->metadata.memory_kind)); + tiny_json_raw(json, ",\"importance\":"); + tiny_json_u64(json, message->metadata.importance); + if (message->metadata.summary) + { + tiny_json_raw(json, ",\"summary\":"); + tiny_json_string(json, message->metadata.summary); + } + tiny_json_raw(json, ",\"relations\":["); + for (index = 0; index < message->metadata.relation_count; ++index) + { + if (index) + { + tiny_json_raw(json, ","); + } + tiny_json_raw(json, "{\"type\":"); + tiny_json_string(json, tiny_relation_type_name(message->metadata.relations[index].type)); + tiny_json_raw(json, ",\"message_id\":"); + tiny_json_string(json, message->metadata.relations[index].message_id); + tiny_json_raw(json, "}"); + } + tiny_json_raw(json, "],\"source_message_ids\":["); + for (index = 0; index < message->metadata.source_count; ++index) + { + if (index) + { + tiny_json_raw(json, ","); + } + tiny_json_string(json, message->metadata.source_message_ids[index]); + } + tiny_json_raw(json, "]"); tiny_json_raw(json, "}}"); } -- cgit v1.2.3