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

Function BackfillReadFileInput

tools/basic_ui.go:51–65  ·  view source on GitHub ↗
(input ReadFileInput, execCtx ExecutionContext)

Source from the content-addressed store, hash-verified

49}
50
51func BackfillReadFileInput(input ReadFileInput, execCtx ExecutionContext) ReadFileInput {
52 path := input.FilePath
53 if path != "" && !filepath.IsAbs(path) {
54 cwd := stringFromExecCtx(execCtx, "cwd")
55 if cwd == "" {
56 cwd = "."
57 }
58 if resolved, err := filepath.Abs(filepath.Join(cwd, path)); err == nil {
59 path = resolved
60 } else {
61 path = filepath.Join(cwd, path)
62 }
63 }
64 return ReadFileInput{FilePath: path, Offset: input.Offset, Limit: input.Limit}
65}
66
67func RenderWriteFileToolUse(input WriteFileInput) string {
68 name := filepath.Base(input.FilePath)

Callers 1

Calls 1

stringFromExecCtxFunction · 0.85

Tested by

no test coverage detected