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

Function resolvePathBestEffort

tools/builtin.go:1197–1220  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

1195 if v != nil {
1196 return *v
1197 }
1198 }
1199 var zero T
1200 return zero
1201}
1202
1203func plural(n int) string {
1204 if n == 1 {
1205 return ""
1206 }
1207 return "s"
1208}
1209
1210func timeSeconds(seconds int) time.Duration {
1211 return time.Duration(seconds) * time.Second
1212}
1213
1214func decodeToolBytes(data []byte) string {
1215 if len(data) >= 2 && data[0] == 0xff && data[1] == 0xfe {
1216 u16 := make([]uint16, 0, len(data)/2)
1217 for i := 0; i+1 < len(data); i += 2 {
1218 u16 = append(u16, uint16(data[i])|uint16(data[i+1])<<8)
1219 }
1220 runes := utf16.Decode(u16)
1221 if len(data)%2 == 1 {
1222 runes = append(runes, '\ufffd')
1223 }

Callers 3

resolveToolPathFunction · 0.85
checkAllowedRootsFunction · 0.85
isBroadSearchRootFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected