( ctx context.Context, scope toolspkg.Scope, req toolspkg.CallRequest, )
| 2761 | } |
| 2762 | |
| 2763 | func (n *daemonNativeTools) taskCreate( |
| 2764 | ctx context.Context, |
| 2765 | scope toolspkg.Scope, |
| 2766 | req toolspkg.CallRequest, |
| 2767 | ) (toolspkg.ToolResult, error) { |
| 2768 | var input taskCreateInput |
| 2769 | if err := decodeNativeInput(req, &input); err != nil { |
| 2770 | return toolspkg.ToolResult{}, err |
| 2771 | } |
| 2772 | actor, err := actorContextFromScope(scope) |
| 2773 | if err != nil { |
| 2774 | return toolspkg.ToolResult{}, err |
| 2775 | } |
| 2776 | created, err := n.deps.Tasks.CreateTask(ctx, input.spec(scope), actor) |
| 2777 | if err != nil { |
| 2778 | return toolspkg.ToolResult{}, err |
| 2779 | } |
| 2780 | return structuredResult(map[string]any{nativeToolsTaskKey: created}, created.Title) |
| 2781 | } |
| 2782 | |
| 2783 | func (n *daemonNativeTools) taskChildCreate( |
| 2784 | ctx context.Context, |
nothing calls this directly
no test coverage detected