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

Function findActualString

tools/builtin.go:1316–1336  ·  view source on GitHub ↗
(fileContent, searchString string)

Source from the content-addressed store, hash-verified

1314}
1315
1316func rootsFromAny(raw any) []string {
1317 switch v := raw.(type) {
1318 case []string:
1319 return v
1320 case []any:
1321 out := make([]string, 0, len(v))
1322 for _, item := range v {
1323 if s, ok := item.(string); ok {
1324 out = append(out, s)
1325 }
1326 }
1327 return out
1328 default:
1329 return nil
1330 }
1331}
1332
1333func resolvePathBestEffort(path string) string {
1334 abs, err := filepath.Abs(path)
1335 if err != nil {
1336 abs = path
1337 }
1338 cleaned := filepath.Clean(abs)
1339 if resolved, err := filepath.EvalSymlinks(cleaned); err == nil {

Callers 2

ExecuteMethod · 0.85
countOccurrencesFunction · 0.85

Calls 1

normalizeQuotesFunction · 0.85

Tested by

no test coverage detected