MCPcopy Create free account
hub / github.com/GongShichen/LuminaCode / checkCascadingEdit

Function checkCascadingEdit

tools/builtin.go:1426–1441  ·  view source on GitHub ↗
(execCtx ExecutionContext, filePath, oldString string)

Source from the content-addressed store, hash-verified

1424 return fmt.Sprintf("[ErrCode %d] %s: %s", code.value, code.name, detail)
1425 }
1426 return fmt.Sprintf("[ErrCode %d] %s", code.value, code.name)
1427}
1428
1429var curlyToStraight = map[rune]rune{'“': '"', '”': '"', '‘': '\'', '': '\''}
1430
1431func normalizeQuotes(text string) string {
1432 return strings.Map(func(r rune) rune {
1433 if repl, ok := curlyToStraight[r]; ok {
1434 return repl
1435 }
1436 return r
1437 }, text)
1438}
1439
1440func stripTrailingWhitespace(text, filePath string) string {
1441 ext := strings.ToLower(filepath.Ext(filePath))
1442 if ext == ".md" || ext == ".mdx" {
1443 return text
1444 }

Callers 1

ExecuteMethod · 0.85

Calls 1

formatEditErrorFunction · 0.85

Tested by

no test coverage detected