fix: tool_end SSE-Event nicht mehr auf 500 Zeichen kürzen + tool_result History-Truncation
- tool_end SSE-Event: 500-Zeichen-Limit entfernt (2 Stellen), damit todo_write und andere Tools beim Streaming vollständig angezeigt werden - BuildHistoryFromDb: TruncateToolResult (20k) auf tool_result-Messages angewendet, um Token-Overflow bei History-Rebuild zu verhindern (609k Tokens > 200k Limit nach awaiting_user_choice) - TruncateToolResult/MaxToolResultChars auf internal geändert - TODO.md: todo_write-Bug als erledigt markiert
This commit is contained in:
1 parent
dcedbaa074
commit
cdad7faad4
3 files changed
+7
-7
No files matched your search
@@ -370,7 +370,7 @@ Für welche Plattform soll die App entwickelt werden? Web, Mobile oder Desktop?
|
||||
dict.TryGetValue("role", out var role) && role.ToString() == "user" &&
|
||||
dict.TryGetValue("content", out var existingContent) && existingContent is List<object> contentList)
|
||||
{
|
||||
contentList.Add(new { type = "tool_result", tool_use_id = msg.ToolCallId, content = msg.Content ?? "", is_error = msg.IsError });
|
||||
contentList.Add(new { type = "tool_result", tool_use_id = msg.ToolCallId, content = AnthropicService.TruncateToolResult(msg.Content ?? ""), is_error = msg.IsError });
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -379,7 +379,7 @@ Für welche Plattform soll die App entwickelt werden? Web, Mobile oder Desktop?
|
||||
["role"] = "user",
|
||||
["content"] = new List<object>
|
||||
{
|
||||
new { type = "tool_result", tool_use_id = msg.ToolCallId, content = msg.Content ?? "", is_error = msg.IsError }
|
||||
new { type = "tool_result", tool_use_id = msg.ToolCallId, content = AnthropicService.TruncateToolResult(msg.Content ?? ""), is_error = msg.IsError }
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user