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

Function editLineCount

tools/builtin.go:1486–1495  ·  view source on GitHub ↗
(content string)

Source from the content-addressed store, hash-verified

1484
1485func matchFailureSnippet(fileContent, oldString string) string {
1486 oldFirst := strings.TrimSpace(strings.Split(oldString, "\n")[0])
1487 if oldFirst == "" {
1488 return ""
1489 }
1490 lines := strings.Split(fileContent, "\n")
1491 bestIdx, bestScore := -1, 0.0
1492 for i, line := range lines {
1493 score := lineSimilarity(oldFirst, strings.TrimSpace(line))
1494 if score > bestScore {
1495 bestScore = score
1496 bestIdx = i
1497 }
1498 }

Callers 1

ComputeEditDiffStatFunction · 0.85

Calls 1

CountMethod · 0.80

Tested by

no test coverage detected