search-results changedbuild-with-claude/search-results
Nearest release: v2.1.307, published 4 hours after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Recorded here
Lines+30added
Lines−48removed
From line
320
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits11to this page, all time
The whole hunk
from line 320, old and new numbered
/
from line 320
320320 }
321321
322322 // Build up the conversation in a list, starting with the user's question
323 List<MessageParam> messages = [new() { Role = Role.User, Content = "How do I configure the timeout settings?" }];
323 List<MessageParam> messages = [new UserMessageParam { Content = "How do I configure the timeout settings?" }];
324324
325325 // Create a message with the tool
326326 var response = await client.Messages.Create(new()
from line 342
342342 var toolResults = SearchKnowledgeBase(query);
343343
344344 // Append Claude's turn, then the tool result, to the running conversation
345 messages.Add(new() { Role = Role.Assistant, Content = response.Content.Select(contentBlock => new ContentBlockParam(contentBlock.Json)).ToList() });
346 messages.Add(new()
345 messages.Add(new AssistantMessageParam { Content = response.Content.Select(contentBlock => new ContentBlockParam(contentBlock.Json)).ToList() });
346 messages.Add(new UserMessageParam
347347 {
348 Role = Role.User,
349 Content = new MessageParamContent(
348 Content = new MessageContentParam(
350349 [new ContentBlockParam(new ToolResultBlockParam() { ToolUseID = toolUse.ID, Content = new ToolResultBlockParamContent(toolResults) })]
351350 ),
352351 });
from line 493
494493
495494 // Build up the conversation in a list, starting with the user's question
496495 List<MessageParam> messages = new ArrayList<>();
497 messages.add(MessageParam.builder()
498 .role(MessageParam.Role.USER)
499 .content("How do I configure the timeout settings?")
500 .build());
496 messages.add(MessageParam.ofUser("How do I configure the timeout settings?"));
501497
502498 MessageCreateParams params = MessageCreateParams.builder()
503499 .model(Model.CLAUDE_OPUS_5)
from line 522
526522 // Rebuilding only the tool_use block would drop any other content blocks Claude
527523 // returned (e.g. leading text when the tool call is not forced) — append the
528524 // full turn, as the other language tabs do.
529 messages.add(MessageParam.builder()
530 .role(MessageParam.Role.ASSISTANT)
531 .contentOfBlockParams(
532 response.content().stream()
533 .map(block -> block.toParam())
534 .toList()
525 messages.add(response.toParam());
526 messages.add(MessageParam.ofUserOfContentBlockParams(List.of(
527 ContentBlockParam.ofToolResult(
528 ToolResultBlockParam.builder()
529 .toolUseId(toolUse.id())
530 .contentOfBlocks(toolResult)
531 .build()
535532 )
536 .build());
537 messages.add(MessageParam.builder()
538 .role(MessageParam.Role.USER)
539 .contentOfBlockParams(List.of(
540 ContentBlockParam.ofToolResult(
541 ToolResultBlockParam.builder()
542 .toolUseId(toolUse.id())
543 .contentOfBlocks(toolResult)
544 .build()
545 )
546 ))
547 .build());
533 )));
548534
549535 // Send the tool result back
550536 MessageCreateParams finalParams = MessageCreateParams.builder()
from line 961
975961 MaxTokens = 1024,
976962 Messages =
977963 [
978 new()
964 new UserMessageParam
979965 {
980 Role = Role.User,
981 Content = new MessageParamContent(
966 Content = new MessageContentParam(
982967 [
983968 new ContentBlockParam(new SearchResultBlockParam
984969 {
from line 1036
10511036 MessageCreateParams params = MessageCreateParams.builder()
10521037 .model(Model.CLAUDE_OPUS_5_5)
10531038 .maxTokens(1024L)
1054 .addUserMessageOfBlockParams(List.of(
1039 .addUserMessageOfContentBlockParams(List.of(
10551040 ContentBlockParam.ofSearchResult(
10561041 SearchResultBlockParam.builder()
10571042 .source("https://docs.company.com/api-reference")
from line 1624
16391624 ],
16401625 Messages =
16411626 [
1642 new()
1627 new UserMessageParam
16431628 {
1644 Role = Role.User,
1645 Content = new MessageParamContent(
1629 Content = new MessageContentParam(
16461630 [
16471631 new ContentBlockParam(new SearchResultBlockParam
16481632 {
from line 1638
16541638 new ContentBlockParam(new TextBlockParam { Text = "What does Acme Dashboard do, and what plans is it available on?" }),
16551639 ]),
16561640 },
1657 new()
1641 new AssistantMessageParam
16581642 {
1659 Role = Role.Assistant,
1660 Content = new MessageParamContent(
1643 Content = new MessageContentParam(
16611644 [
16621645 new ContentBlockParam(new TextBlockParam { Text = "Let me check the pricing information." }),
16631646 new ContentBlockParam(new ToolUseBlockParam
from line 1654
16711654 }),
16721655 ]),
16731656 },
1674 new()
1657 new UserMessageParam
16751658 {
1676 Role = Role.User,
1677 Content = new MessageParamContent(
1659 Content = new MessageContentParam(
16781660 [
16791661 new ContentBlockParam(new ToolResultBlockParam()
16801662 {
from line 1777
17951777 .model(Model.CLAUDE_OPUS_5_5)
17961778 .maxTokens(1024L)
17971779 .addTool(knowledgeBaseTool)
1798 .addUserMessageOfBlockParams(List.of(
1780 .addUserMessageOfContentBlockParams(List.of(
17991781 ContentBlockParam.ofSearchResult(SearchResultBlockParam.builder()
18001782 .source("https://docs.company.com/overview")
18011783 .title("Product Overview")
from line 1790
18081790 .text("What does Acme Dashboard do, and what plans is it available on?")
18091791 .build())
18101792 ))
1811 .addAssistantMessageOfBlockParams(List.of(
1793 .addAssistantMessageOfContentBlockParams(List.of(
18121794 ContentBlockParam.ofText(TextBlockParam.builder()
18131795 .text("Let me check the pricing information.")
18141796 .build()),
from line 1800
18181800 .input(JsonValue.from(Map.of("query", "Acme Dashboard pricing plans")))
18191801 .build())
18201802 ))
1821 .addUserMessageOfBlockParams(List.of(
1803 .addUserMessageOfContentBlockParams(List.of(
18221804 ContentBlockParam.ofToolResult(ToolResultBlockParam.builder()
18231805 .toolUseId("toolu_01A09q90qw90lq917835lq9")
18241806 .contentOfBlocks(List.of(
No line in this hunk matches that.