Skip to content

Commit 096e14d

Browse files
committed
tweak: adjust lsp wording a bit more to encourage fixing
1 parent bbb3120 commit 096e14d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/opencode/src/tool/edit.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ export const EditTool = Tool.define("edit", {
129129
const limited = errors.slice(0, MAX_DIAGNOSTICS_PER_FILE)
130130
const suffix =
131131
errors.length > MAX_DIAGNOSTICS_PER_FILE ? `\n... and ${errors.length - MAX_DIAGNOSTICS_PER_FILE} more` : ""
132-
output += `\n\nLSP errors detected in this file:\n<diagnostics file="${filePath}">\n${limited.map(LSP.Diagnostic.pretty).join("\n")}${suffix}\n</diagnostics>`
132+
output += `\n\nLSP errors detected in this file, please fix:\n<diagnostics file="${filePath}">\n${limited.map(LSP.Diagnostic.pretty).join("\n")}${suffix}\n</diagnostics>`
133133
}
134134

135135
return {

packages/opencode/src/tool/write.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export const WriteTool = Tool.define("write", {
5959
const suffix =
6060
errors.length > MAX_DIAGNOSTICS_PER_FILE ? `\n... and ${errors.length - MAX_DIAGNOSTICS_PER_FILE} more` : ""
6161
if (file === normalizedFilepath) {
62-
output += `\n\nLSP errors detected in this file:\n<diagnostics file="${filepath}">\n${limited.map(LSP.Diagnostic.pretty).join("\n")}${suffix}\n</diagnostics>`
62+
output += `\n\nLSP errors detected in this file, please fix:\n<diagnostics file="${filepath}">\n${limited.map(LSP.Diagnostic.pretty).join("\n")}${suffix}\n</diagnostics>`
6363
continue
6464
}
6565
if (projectDiagnosticsCount >= MAX_PROJECT_DIAGNOSTICS_FILES) continue

0 commit comments

Comments
 (0)