Skip to content

Commit b0b4240

Browse files
authored
Revert "feat @-mention window path style & file with space (#1924)" (#2162)
* Revert "feat @-mention window path style & file with space (#1924)" This reverts commit c62e8f2. * Add changeset
1 parent 9823628 commit b0b4240

File tree

22 files changed

+227
-789
lines changed

22 files changed

+227
-789
lines changed

.changeset/brown-cows-jump.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"roo-cline": patch
3+
---
4+
5+
Revert mention changes in case they're causing performance issues/crashes

src/core/Cline.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2049,16 +2049,14 @@ export class Cline extends EventEmitter<ClineEvents> {
20492049
// 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)
20502050
Promise.all(
20512051
userContent.map(async (block) => {
2052-
const { osInfo } = (await this.providerRef.deref()?.getState()) || { osInfo: "unix" }
2053-
20542052
const shouldProcessMentions = (text: string) =>
20552053
text.includes("<task>") || text.includes("<feedback>")
20562054

20572055
if (block.type === "text") {
20582056
if (shouldProcessMentions(block.text)) {
20592057
return {
20602058
...block,
2061-
text: await parseMentions(block.text, this.cwd, this.urlContentFetcher, osInfo),
2059+
text: await parseMentions(block.text, this.cwd, this.urlContentFetcher),
20622060
}
20632061
}
20642062
return block
@@ -2067,12 +2065,7 @@ export class Cline extends EventEmitter<ClineEvents> {
20672065
if (shouldProcessMentions(block.content)) {
20682066
return {
20692067
...block,
2070-
content: await parseMentions(
2071-
block.content,
2072-
this.cwd,
2073-
this.urlContentFetcher,
2074-
osInfo,
2075-
),
2068+
content: await parseMentions(block.content, this.cwd, this.urlContentFetcher),
20762069
}
20772070
}
20782071
return block
@@ -2086,7 +2079,6 @@ export class Cline extends EventEmitter<ClineEvents> {
20862079
contentBlock.text,
20872080
this.cwd,
20882081
this.urlContentFetcher,
2089-
osInfo,
20902082
),
20912083
}
20922084
}

src/core/__tests__/Cline.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -941,7 +941,6 @@ describe("Cline", () => {
941941
"<task>Text with @/some/path in task tags</task>",
942942
expect.any(String),
943943
expect.any(Object),
944-
expect.any(String),
945944
)
946945

947946
// Feedback tag content should be processed
@@ -952,7 +951,6 @@ describe("Cline", () => {
952951
"<feedback>Check @/some/path</feedback>",
953952
expect.any(String),
954953
expect.any(Object),
955-
expect.any(String),
956954
)
957955

958956
// Regular tool result should not be processed

0 commit comments

Comments
 (0)