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

Function RenderGroupedNotebookEditToolUse

tools/notebook_ui.go:30–51  ·  view source on GitHub ↗
(inputs []NotebookEditInput)

Source from the content-addressed store, hash-verified

28}
29
30func RenderGroupedNotebookEditToolUse(inputs []NotebookEditInput) string {
31 if len(inputs) == 0 {
32 return ""
33 }
34 if len(inputs) == 1 {
35 return RenderNotebookEditToolUse(inputs[0])
36 }
37 names := map[string]struct{}{}
38 for _, input := range inputs {
39 names[filepath.Base(input.NotebookPath)] = struct{}{}
40 }
41 orderedNames := make([]string, 0, len(names))
42 for _, input := range inputs {
43 name := filepath.Base(input.NotebookPath)
44 if _, ok := names[name]; !ok {
45 continue
46 }
47 orderedNames = append(orderedNames, name)
48 delete(names, name)
49 }
50 return "Edit notebook: " + strconv.Itoa(len(inputs)) + " edits in " + strings.Join(orderedNames, ", ")
51}
52
53func BackfillNotebookEditInput(input NotebookEditInput, execCtx ExecutionContext) NotebookEditInput {
54 path := input.NotebookPath

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected