MCPcopy Create free account
hub / github.com/MatterAIOrg/OrbCode / parseReplaceAll

Function parseReplaceAll

src/tools/executors/files.ts:61–63  ·  view source on GitHub ↗

The model may send replace_all as a boolean or a string ("true"/"1").

(value: unknown)

Source from the content-addressed store, hash-verified

59
60/** The model may send replace_all as a boolean or a string ("true"/"1"). */
61function parseReplaceAll(value: unknown): boolean {
62 return value === true || value === "true" || value === "1"
63}
64
65function applyEdit(content: string, edit: EditSpec): { content: string; error?: string } {
66 const { old_string, new_string } = edit

Callers 3

applyEditFunction · 0.85
fileEditFunction · 0.85
previewFileChangeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected