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

Method runChatKnowledge

cli/chat_knowledge.go:108–114  ·  view source on GitHub ↗

runChatKnowledge executes one knowledge call through the same plugin the agent uses (global adapter). 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)

Source from the content-addressed store, hash-verified

106// agent uses (global adapter). Errors come back as a tool-result string so
107// the model can correct the call instead of the turn failing.
108func (cli *ChatCLI) runChatKnowledge(ctx context.Context, argsJSON string) string {
109 out, err := plugins.NewBuiltinKnowledgePlugin().Execute(ctx, []string{argsJSON})
110 if err != nil {
111 return "knowledge error: " + err.Error()
112 }
113 return out
114}
115
116// appendKnowledgeRound folds one pull into the conversation being built for
117// the next decision call: the pending prompt becomes a user turn, the model's

Callers 4

runMoaTurnNativeMethod · 0.95
runMoaTurnXMLMethod · 0.95
executeChatAskNativeMethod · 0.95
executeChatAskXMLMethod · 0.95

Calls 3

ExecuteMethod · 0.65
ErrorMethod · 0.65

Tested by

no test coverage detected