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

Method resolveTaskWorkspaceID

internal/extension/host_api_tasks.go:825–842  ·  view source on GitHub ↗
(ctx context.Context, workspaceRef string)

Source from the content-addressed store, hash-verified

823}
824
825func (h *HostAPIHandler) resolveTaskWorkspaceID(ctx context.Context, workspaceRef string) (string, error) {
826 trimmed := strings.TrimSpace(workspaceRef)
827 if trimmed == "" {
828 return "", nil
829 }
830 if h.workspaces == nil {
831 return trimmed, nil
832 }
833
834 resolved, err := h.workspaces.Resolve(ctx, trimmed)
835 if err != nil {
836 if errors.Is(err, workspacepkg.ErrWorkspaceNotFound) {
837 return "", notFoundRPCError("workspace", trimmed, err)
838 }
839 return "", err
840 }
841 return hostAPIResolvedWorkspaceID(&resolved)
842}
843
844func validateTaskChannel(path string, channel string) error {
845 trimmed := strings.TrimSpace(channel)

Calls 4

notFoundRPCErrorFunction · 0.85
ResolveMethod · 0.65
IsMethod · 0.45

Tested by

no test coverage detected