Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions src/core/Cline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2049,16 +2049,14 @@ export class Cline extends EventEmitter<ClineEvents> {
// 2. ToolResultBlockParam's content/context text arrays if it contains "<feedback>" (see formatToolDeniedFeedback, attemptCompletion, executeCommand, and consecutiveMistakeCount >= 3) or "<answer>" (see askFollowupQuestion), we place all user generated content in these tags so they can effectively be used as markers for when we should parse mentions)
Promise.all(
userContent.map(async (block) => {
const { osInfo } = (await this.providerRef.deref()?.getState()) || { osInfo: "unix" }

const shouldProcessMentions = (text: string) =>
text.includes("<task>") || text.includes("<feedback>")

if (block.type === "text") {
if (shouldProcessMentions(block.text)) {
return {
...block,
text: await parseMentions(block.text, this.cwd, this.urlContentFetcher, osInfo),
text: await parseMentions(block.text, this.cwd, this.urlContentFetcher),
}
}
return block
Expand All @@ -2067,12 +2065,7 @@ export class Cline extends EventEmitter<ClineEvents> {
if (shouldProcessMentions(block.content)) {
return {
...block,
content: await parseMentions(
block.content,
this.cwd,
this.urlContentFetcher,
osInfo,
),
content: await parseMentions(block.content, this.cwd, this.urlContentFetcher),
}
}
return block
Expand All @@ -2086,7 +2079,6 @@ export class Cline extends EventEmitter<ClineEvents> {
contentBlock.text,
this.cwd,
this.urlContentFetcher,
osInfo,
),
}
}
Expand Down
2 changes: 0 additions & 2 deletions src/core/__tests__/Cline.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,6 @@ describe("Cline", () => {
"<task>Text with @/some/path in task tags</task>",
expect.any(String),
expect.any(Object),
expect.any(String),
)

// Feedback tag content should be processed
Expand All @@ -952,7 +951,6 @@ describe("Cline", () => {
"<feedback>Check @/some/path</feedback>",
expect.any(String),
expect.any(Object),
expect.any(String),
)

// Regular tool result should not be processed
Expand Down
Loading
Loading