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

Method BackfillObservableInput

tools/backfill.go:13–33  ·  view source on GitHub ↗
(input any, execCtx ExecutionContext)

Source from the content-addressed store, hash-verified

11}
12
13func (t *EditFileTool) BackfillObservableInput(input any, execCtx ExecutionContext) any {
14 in := deref[EditFileInput](input)
15 path := in.FilePath
16 if path != "" && !filepath.IsAbs(path) {
17 cwd := stringFromExecCtx(execCtx, "cwd")
18 if cwd == "" {
19 cwd = "."
20 }
21 if resolved, err := filepath.Abs(filepath.Join(cwd, path)); err == nil {
22 path = resolved
23 } else {
24 path = filepath.Join(cwd, path)
25 }
26 }
27 return EditFileInput{
28 FilePath: path,
29 OldString: in.OldString,
30 NewString: in.NewString,
31 ReplaceAll: in.ReplaceAll,
32 }
33}
34
35func (t *BashTool) BackfillObservableInput(input any, _ ExecutionContext) any {
36 return BackfillBashInput(deref[BashInput](input))

Callers

nothing calls this directly

Calls 1

stringFromExecCtxFunction · 0.85

Tested by

no test coverage detected