Skip to content

Commit 950aa5e

Browse files
committed
fix: update Task.spec.ts for new processUserContentMentions return type
1 parent 4368e82 commit 950aa5e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/core/task/__tests__/Task.spec.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -919,26 +919,26 @@ describe("Cline", () => {
919919
})
920920

921921
// Regular text should not be processed
922-
expect((processedContent[0] as Anthropic.TextBlockParam).text).toBe(
922+
expect((processedContent.content[0] as Anthropic.TextBlockParam).text).toBe(
923923
"Regular text with 'some/path' (see below for file content)",
924924
)
925925

926926
// Text within task tags should be processed
927-
expect((processedContent[1] as Anthropic.TextBlockParam).text).toContain("processed:")
928-
expect((processedContent[1] as Anthropic.TextBlockParam).text).toContain(
927+
expect((processedContent.content[1] as Anthropic.TextBlockParam).text).toContain("processed:")
928+
expect((processedContent.content[1] as Anthropic.TextBlockParam).text).toContain(
929929
"<task>Text with 'some/path' (see below for file content) in task tags</task>",
930930
)
931931

932932
// Feedback tag content should be processed
933-
const toolResult1 = processedContent[2] as Anthropic.ToolResultBlockParam
933+
const toolResult1 = processedContent.content[2] as Anthropic.ToolResultBlockParam
934934
const content1 = Array.isArray(toolResult1.content) ? toolResult1.content[0] : toolResult1.content
935935
expect((content1 as Anthropic.TextBlockParam).text).toContain("processed:")
936936
expect((content1 as Anthropic.TextBlockParam).text).toContain(
937937
"<feedback>Check 'some/path' (see below for file content)</feedback>",
938938
)
939939

940940
// Regular tool result should not be processed
941-
const toolResult2 = processedContent[3] as Anthropic.ToolResultBlockParam
941+
const toolResult2 = processedContent.content[3] as Anthropic.ToolResultBlockParam
942942
const content2 = Array.isArray(toolResult2.content) ? toolResult2.content[0] : toolResult2.content
943943
expect((content2 as Anthropic.TextBlockParam).text).toBe(
944944
"Regular tool result with 'path' (see below for file content)",

0 commit comments

Comments
 (0)