runChatGraphView executes one @graphview call through the same plugin the agent uses. Errors come back as a tool-result string so the model can correct the call instead of the turn failing.
(ctx context.Context, argsJSON string)
| 105 | // agent uses. Errors come back as a tool-result string so the model can correct |
| 106 | // the call instead of the turn failing. |
| 107 | func (cli *ChatCLI) runChatGraphView(ctx context.Context, argsJSON string) string { |
| 108 | out, err := plugins.NewBuiltinGraphViewPlugin().Execute(ctx, []string{argsJSON}) |
| 109 | if err != nil { |
| 110 | return "graphview error: " + err.Error() |
| 111 | } |
| 112 | return out |
| 113 | } |
| 114 | |
| 115 | // appendGraphViewRound folds the graph render into the conversation so the model |
| 116 | // can produce a short natural-language confirmation as its final answer. |