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

Function wrapContextErr

cli/plugins/builtin_context.go:378–383  ·  view source on GitHub ↗

wrapContextErr namespaces an adapter error under the subcommand.

(sub, out string, err error)

Source from the content-addressed store, hash-verified

376
377// wrapContextErr namespaces an adapter error under the subcommand.
378func wrapContextErr(sub, out string, err error) (string, error) {
379 if err != nil {
380 return "", fmt.Errorf("@context %s: %w", sub, err)
381 }
382 return out, nil
383}
384
385// contextRagTopK reads the rag flag, which the model may send as a bool
386// (true → default top-K, encoded here as -1 meaning "mode default on") or an

Callers 1

ExecuteWithStreamMethod · 0.85

Calls 1

ErrorfMethod · 0.80

Tested by

no test coverage detected