diff options
| author | tanaka takashi <isazaka@gmail.com> | 2026-07-01 00:11:08 +0900 |
|---|---|---|
| committer | tanaka takashi <isazaka@gmail.com> | 2026-07-01 00:11:08 +0900 |
| commit | a44fd4cf3a0c3d7ae33b7664341a0a9bff07aaaa (patch) | |
| tree | 5c3152e7df8b16b207d6ebd69dfaf205765a8044 /src/mcp/tools/write_message.c | |
| parent | e3db01cd487c5b666366885367c8bfff4a6a09da (diff) | |
大規模履歴向けread_messages pagination対応
Diffstat (limited to 'src/mcp/tools/write_message.c')
| -rw-r--r-- | src/mcp/tools/write_message.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mcp/tools/write_message.c b/src/mcp/tools/write_message.c index f9c078a..c4b18cc 100644 --- a/src/mcp/tools/write_message.c +++ b/src/mcp/tools/write_message.c @@ -185,6 +185,14 @@ call_write_message(const mcpc_tool_t *tool, mcpc_ucbr_t *result) tiny_search_index_free(context->search_index); context->search_index = NULL; } + if (context->history_index + && !tiny_history_index_add(context->history_index, + context->store, + tiny_store_entry_count(context->store) - 1)) + { + tiny_history_index_free(context->history_index); + context->history_index = NULL; + } tiny_json_init(&json); tiny_json_raw(&json, "{\"status\":\"OK\",\"message\":"); tiny_mcp_tool_append_message(&json, &written); |
