Skip to content

Commit aa0c115

Browse files
committed
Remove references to search and replace
1 parent 7db9616 commit aa0c115

File tree

10 files changed

+5
-77
lines changed

10 files changed

+5
-77
lines changed

src/core/prompts/__tests__/kilocode/system-prompt-morph.spec.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -216,13 +216,10 @@ describe("SYSTEM_PROMPT", () => {
216216
expect(prompt).not.toContain("## apply_diff")
217217
expect(prompt).not.toContain("## write_to_file")
218218
expect(prompt).not.toContain("## insert_content")
219-
expect(prompt).not.toContain("## search_and_replace")
220219

221220
// Should contain Fast Apply-specific instructions
222221
expect(prompt).toContain("FastApply is enabled")
223-
expect(prompt).toContain(
224-
"Traditional editing tools (apply_diff, write_to_file, insert_content, search_and_replace) are disabled",
225-
)
222+
expect(prompt).toContain("Traditional editing tools (apply_diff, write_to_file, insert_content) are disabled")
226223
expect(prompt).toContain("ONLY use the edit_file tool for file modifications")
227224
})
228225

@@ -257,12 +254,11 @@ describe("SYSTEM_PROMPT", () => {
257254
expect(prompt).toContain("## apply_diff")
258255
expect(prompt).toContain("## write_to_file")
259256
expect(prompt).toContain("## insert_content")
260-
expect(prompt).toContain("## search_and_replace")
261257

262258
// Should NOT contain Fast Apply-specific instructions
263259
expect(prompt).not.toContain("FastApply is enabled")
264260
expect(prompt).not.toContain(
265-
"Traditional editing tools (apply_diff, write_to_file, insert_content, search_and_replace) are disabled",
261+
"Traditional editing tools (apply_diff, write_to_file, insert_content) are disabled",
266262
)
267263

268264
// Should contain traditional editing instructions

src/core/prompts/tools/edit-file.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
export function getFastApplyEditingInstructions(modelType: "Morph" | "Relace"): string {
44
return `- **${modelType} FastApply is enabled.** You have access to the \`edit_file\` tool which uses a specialized model optimized for intelligent code understanding and modification.
5-
- **ONLY use the edit_file tool for file modifications.** Traditional editing tools (apply_diff, write_to_file, insert_content, search_and_replace) are disabled in ${modelType} mode.
5+
- **ONLY use the edit_file tool for file modifications.**
66
- **Focus on clear instructions and precise code edits** using the edit_file format with \`// ... existing code ...\` placeholders to represent unchanged sections.
77
- **The edit_file tool requires three parameters:**
88
- \`target_file\`: Full path to the file to modify

src/core/prompts/tools/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ export function getToolDescriptionsForMode(
141141
// kilocode_change start: Morph fast apply
142142
if (isFastApplyAvailable(clineProviderState)) {
143143
// When Morph is enabled, disable traditional editing tools
144-
const traditionalEditingTools = ["apply_diff", "write_to_file", "insert_content", "search_and_replace"]
144+
const traditionalEditingTools = ["apply_diff", "write_to_file", "insert_content"]
145145
traditionalEditingTools.forEach((tool) => tools.delete(tool))
146146
} else {
147147
tools.delete("edit_file")

src/core/prompts/tools/native-tools/getAllowedJSONToolsForMode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export function getAllowedJSONToolsForMode(
5555

5656
if (isFastApplyAvailable(clineProviderState)) {
5757
// When Morph is enabled, disable traditional editing tools
58-
const traditionalEditingTools = ["apply_diff", "write_to_file", "insert_content", "search_and_replace"]
58+
const traditionalEditingTools = ["apply_diff", "write_to_file", "insert_content"]
5959
traditionalEditingTools.forEach((tool) => tools.delete(tool))
6060
} else {
6161
tools.delete("edit_file")

src/core/prompts/tools/native-tools/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import listFiles from "./list_files"
1313
import newTask from "./new_task"
1414
import { read_file_single, read_file_multi } from "./read_file"
1515
import runSlashCommand from "./run_slash_command"
16-
import searchAndReplace from "./search_and_replace"
1716
import searchFiles from "./search_files"
1817
import switchMode from "./switch_mode"
1918
import updateTodoList from "./update_todo_list"
@@ -38,7 +37,6 @@ export const nativeTools = [
3837
read_file_single,
3938
read_file_multi,
4039
runSlashCommand,
41-
searchAndReplace,
4240
searchFiles,
4341
switchMode,
4442
updateTodoList,

src/core/prompts/tools/native-tools/search_and_replace.ts

Lines changed: 0 additions & 46 deletions
This file was deleted.

webview-ui/src/i18n/locales/ar/settings.json

Lines changed: 0 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/cs/settings.json

Lines changed: 0 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/th/settings.json

Lines changed: 0 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/uk/settings.json

Lines changed: 0 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)