MCPcopy Create free account
hub / github.com/compozy/agh / taskCancel

Method taskCancel

internal/daemon/native_tools.go:2823–2841  ·  view source on GitHub ↗
(
	ctx context.Context,
	scope toolspkg.Scope,
	req toolspkg.CallRequest,
)

Source from the content-addressed store, hash-verified

2821}
2822
2823func (n *daemonNativeTools) taskCancel(
2824 ctx context.Context,
2825 scope toolspkg.Scope,
2826 req toolspkg.CallRequest,
2827) (toolspkg.ToolResult, error) {
2828 var input taskCancelInput
2829 if err := decodeNativeInput(req, &input); err != nil {
2830 return toolspkg.ToolResult{}, err
2831 }
2832 actor, err := actorContextFromScope(scope)
2833 if err != nil {
2834 return toolspkg.ToolResult{}, err
2835 }
2836 canceled, err := n.deps.Tasks.CancelTask(ctx, input.TaskID, input.cancel(), actor)
2837 if err != nil {
2838 return toolspkg.ToolResult{}, err
2839 }
2840 return structuredResult(map[string]any{nativeToolsTaskKey: canceled}, canceled.Title)
2841}
2842
2843func (n *daemonNativeTools) taskBlock(
2844 ctx context.Context,

Callers

nothing calls this directly

Calls 5

cancelMethod · 0.95
decodeNativeInputFunction · 0.85
actorContextFromScopeFunction · 0.85
structuredResultFunction · 0.85
CancelTaskMethod · 0.65

Tested by

no test coverage detected