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

Function BackfillWriteFileInput

tools/basic_ui.go:100–114  ·  view source on GitHub ↗
(input WriteFileInput, execCtx ExecutionContext)

Source from the content-addressed store, hash-verified

98}
99
100func BackfillWriteFileInput(input WriteFileInput, execCtx ExecutionContext) WriteFileInput {
101 path := input.FilePath
102 if path != "" && !filepath.IsAbs(path) {
103 cwd := stringFromExecCtx(execCtx, "cwd")
104 if cwd == "" {
105 cwd = "."
106 }
107 if resolved, err := filepath.Abs(filepath.Join(cwd, path)); err == nil {
108 path = resolved
109 } else {
110 path = filepath.Join(cwd, path)
111 }
112 }
113 return WriteFileInput{FilePath: path, Content: input.Content}
114}
115
116func RenderBashToolUse(input BashInput) string {
117 command := input.Command

Callers 1

Calls 1

stringFromExecCtxFunction · 0.85

Tested by

no test coverage detected