Detect code omission and show warning with troubleshooting link

This commit is contained in:
Saoud Rizwan
2024-10-17 05:31:48 -04:00
parent 15b105b6c9
commit b33abaa8b5
3 changed files with 56 additions and 1 deletions

View File

@@ -41,6 +41,7 @@ import { formatResponse } from "./prompts/responses"
import { addCustomInstructions, SYSTEM_PROMPT } from "./prompts/system"
import { truncateHalfConversation } from "./sliding-window"
import { ClineProvider, GlobalFileNames } from "./webview/ClineProvider"
import { showOmissionWarning } from "../integrations/editor/detect-omission"
const cwd =
vscode.workspace.workspaceFolders?.map((folder) => folder.uri.fsPath).at(0) ?? path.join(os.homedir(), "Desktop") // may or may not exist but fs checking existence would immediately ask for permission which would be bad UX, need to come up with a better solution
@@ -1075,6 +1076,8 @@ export class Cline {
await delay(300) // wait for diff view to update
this.diffViewProvider.scrollToFirstDiff()
showOmissionWarning(newContent)
const completeMessage = JSON.stringify({
...sharedMessageProps,
content: fileExists ? undefined : newContent,