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

Function BackfillGrepSearchInput

tools/search_ui.go:53–77  ·  view source on GitHub ↗
(input GrepSearchInput, execCtx ExecutionContext)

Source from the content-addressed store, hash-verified

51}
52
53func BackfillGrepSearchInput(input GrepSearchInput, execCtx ExecutionContext) GrepSearchInput {
54 path := input.Path
55 if path == "" {
56 path = "."
57 }
58 if path != "." && !filepath.IsAbs(path) {
59 cwd := stringFromExecCtx(execCtx, "cwd")
60 if cwd == "" {
61 cwd = "."
62 }
63 if resolved, err := filepath.Abs(filepath.Join(cwd, path)); err == nil {
64 path = resolved
65 } else {
66 path = filepath.Join(cwd, path)
67 }
68 }
69 return GrepSearchInput{
70 Pattern: input.Pattern,
71 Path: path,
72 Glob: input.Glob,
73 HeadLimit: grepHeadLimit(input.HeadLimit),
74 OutputMode: grepOutputMode(input.OutputMode),
75 CaseInsensitive: input.CaseInsensitive,
76 }
77}
78
79func RenderGlobMatchToolUse(input GlobMatchInput) string {
80 target := "."

Callers 1

Calls 3

stringFromExecCtxFunction · 0.85
grepHeadLimitFunction · 0.85
grepOutputModeFunction · 0.85

Tested by

no test coverage detected