(inputs []NotebookEditInput)
| 28 | } |
| 29 | |
| 30 | func 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 | |
| 53 | func BackfillNotebookEditInput(input NotebookEditInput, execCtx ExecutionContext) NotebookEditInput { |
| 54 | path := input.NotebookPath |
nothing calls this directly
no test coverage detected