MCPcopy Create free account
hub / github.com/diillson/chatcli / appendGraphViewRound

Function appendGraphViewRound

cli/chat_graphview.go:117–128  ·  view source on GitHub ↗

appendGraphViewRound folds the graph render into the conversation so the model can produce a short natural-language confirmation as its final answer.

(history []models.Message, prompt, callJSON, result string)

Source from the content-addressed store, hash-verified

115// appendGraphViewRound folds the graph render into the conversation so the model
116// can produce a short natural-language confirmation as its final answer.
117func appendGraphViewRound(history []models.Message, prompt, callJSON, result string) ([]models.Message, string) {
118 next := make([]models.Message, 0, len(history)+2)
119 next = append(next, history...)
120 next = append(next,
121 models.Message{Role: "user", Content: prompt},
122 models.Message{Role: "assistant", Content: "[graphview call] " + callJSON},
123 )
124 followup := "graphview result:\n" + result +
125 "\n\nThe interactive graph has been generated (and opened if a display is available). " +
126 "Briefly confirm to the user what was visualized and where the file is. Do not call graphview again."
127 return next, followup
128}
129
130// chatGraphViewXMLInstruction is appended to the decision-turn prompt for
131// providers WITHOUT native tools. It overrides the tool-less framing for this

Callers 3

TestAppendGraphViewRoundFunction · 0.85
executeChatAskNativeMethod · 0.85
executeChatAskXMLMethod · 0.85

Calls

no outgoing calls

Tested by 1

TestAppendGraphViewRoundFunction · 0.68