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

Function BackfillNotebookEditInput

tools/notebook_ui.go:53–73  ·  view source on GitHub ↗
(input NotebookEditInput, execCtx ExecutionContext)

Source from the content-addressed store, hash-verified

51}
52
53func BackfillNotebookEditInput(input NotebookEditInput, execCtx ExecutionContext) NotebookEditInput {
54 path := input.NotebookPath
55 if path != "" && !filepath.IsAbs(path) {
56 cwd := stringFromExecCtx(execCtx, "cwd")
57 if cwd == "" {
58 cwd = "."
59 }
60 if resolved, err := filepath.Abs(filepath.Join(cwd, path)); err == nil {
61 path = resolved
62 } else {
63 path = filepath.Join(cwd, path)
64 }
65 }
66 return NotebookEditInput{
67 NotebookPath: path,
68 CellID: input.CellID,
69 NewSource: input.NewSource,
70 CellType: input.CellType,
71 EditMode: notebookEditMode(input.EditMode),
72 }
73}

Callers 1

Calls 2

stringFromExecCtxFunction · 0.85
notebookEditModeFunction · 0.85

Tested by

no test coverage detected