Saoud Rizwan 1 год назад
Родитель
Сommit
5adf96dc82
2 измененных файлов с 14 добавлено и 12 удалено
  1. 12 10
      src/core/Cline.ts
  2. 2 2
      webview-ui/src/components/settings/SettingsView.tsx

+ 12 - 10
src/core/Cline.ts

@@ -1032,16 +1032,18 @@ export class Cline {
 							newContent = newContent.split("\n").slice(0, -1).join("\n").trim()
 						}
 
-						// it seems not just llama models are doing this, but also gemini and potentially others
-						if (
-							newContent.includes(">") ||
-							newContent.includes("<") ||
-							newContent.includes(""")
-						) {
-							newContent = newContent
-								.replace(/>/g, ">")
-								.replace(/&lt;/g, "<")
-								.replace(/&quot;/g, '"')
+						if (!this.api.getModel().id.includes("claude")) {
+							// it seems not just llama models are doing this, but also gemini and potentially others
+							if (
+								newContent.includes("&gt;") ||
+								newContent.includes("&lt;") ||
+								newContent.includes("&quot;")
+							) {
+								newContent = newContent
+									.replace(/&gt;/g, ">")
+									.replace(/&lt;/g, "<")
+									.replace(/&quot;/g, '"')
+							}
 						}
 
 						const sharedMessageProps: ClineSayTool = {

+ 2 - 2
webview-ui/src/components/settings/SettingsView.tsx

@@ -125,8 +125,8 @@ const SettingsView = ({ onDone }: SettingsViewProps) => {
 							marginTop: "5px",
 							color: "var(--vscode-descriptionForeground)",
 						}}>
-						When enabled, Cline will automatically read files, view directories, and inspect sites without
-						requiring you to click the Approve button.
+						When enabled, Cline will automatically view directory contents and read files without requiring
+						you to click the Approve button.
 					</p>
 				</div>