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

Method ExecuteWithStream

cli/plugins/builtin_http.go:127–136  ·  view source on GitHub ↗

ExecuteWithStream mirrors Execute — no incremental output.

(ctx context.Context, args []string, _ func(string))

Source from the content-addressed store, hash-verified

125
126// ExecuteWithStream mirrors Execute — no incremental output.
127func (p *BuiltinHTTPPlugin) ExecuteWithStream(ctx context.Context, args []string, _ func(string)) (string, error) {
128 if len(args) == 0 {
129 return "", errors.New(`@http: empty args. Example: <tool_call name="@http" args='{"cmd":"get","args":{"url":"http://localhost:8080/healthz"}}' />`)
130 }
131 in, err := parseHTTPInvocation(args)
132 if err != nil {
133 return "", fmt.Errorf("@http: %w", err)
134 }
135 return p.perform(ctx, in)
136}
137
138// httpArgs is the parsed request specification.
139type httpArgs struct {

Callers 1

ExecuteMethod · 0.95

Calls 3

performMethod · 0.95
parseHTTPInvocationFunction · 0.85
ErrorfMethod · 0.80

Tested by

no test coverage detected