Skip to content

Commit e2d57e4

Browse files
committed
docs: update comment to reflect uniform mention parsing behavior
1 parent be3bda8 commit e2d57e4

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/core/mentions/processUserContentMentions.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,10 @@ export async function processUserContentMentions({
2929
}) {
3030
// Process userContent array, which contains various block types:
3131
// TextBlockParam, ImageBlockParam, ToolUseBlockParam, and ToolResultBlockParam.
32-
// We need to apply parseMentions() to:
33-
// 1. All TextBlockParam's text (first user message with task)
34-
// 2. ToolResultBlockParam's content/context text arrays if it contains
35-
// "<feedback>" (see formatToolDeniedFeedback, attemptCompletion,
36-
// executeCommand, and consecutiveMistakeCount >= 3) or "<answer>"
37-
// (see askFollowupQuestion), we place all user generated content in
38-
// these tags so they can effectively be used as markers for when we
39-
// should parse mentions).
32+
// We apply parseMentions() to all text content:
33+
// 1. All TextBlockParam's text
34+
// 2. ToolResultBlockParam's string content
35+
// 3. ToolResultBlockParam's array content where blocks are text type
4036
return Promise.all(
4137
userContent.map(async (block) => {
4238
const shouldProcessMentions = (_text: string) => true

0 commit comments

Comments
 (0)