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

Function parseBashTimeoutSeconds

tools/builtin.go:1592–1610  ·  view source on GitHub ↗
(timeout any, timeoutSeconds any, defaultSeconds float64)

Source from the content-addressed store, hash-verified

1590 return ""
1591 }
1592 diff, err := difflib.GetUnifiedDiffString(difflib.UnifiedDiff{
1593 A: difflib.SplitLines(oldContent),
1594 B: difflib.SplitLines(newContent),
1595 FromFile: "a/" + path,
1596 ToFile: "b/" + path,
1597 Context: contextLines,
1598 })
1599 if err != nil {
1600 return ""
1601 }
1602 diff = strings.TrimRight(diff, "\n")
1603 if diff == "" {
1604 return ""
1605 }
1606 lines := strings.Split(diff, "\n")
1607 if len(lines) > 34 {
1608 lines = append(lines[:34], " ... (diff truncated)")
1609 }
1610 return strings.Join(lines, "\n")
1611}
1612
1613func ComputeEditDiffStat(oldContent, newContent string) (int, int) {

Callers 2

ExecuteMethod · 0.85

Calls 1

parseBashTimeoutValueFunction · 0.85

Tested by

no test coverage detected