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

Method resolveWorkspaceID

internal/extension/host_api.go:2075–2088  ·  view source on GitHub ↗
(ctx context.Context, rawWorkspace string)

Source from the content-addressed store, hash-verified

2073}
2074
2075func (h *HostAPIHandler) resolveWorkspaceID(ctx context.Context, rawWorkspace string) (string, error) {
2076 trimmed := strings.TrimSpace(rawWorkspace)
2077 if trimmed == "" {
2078 return "", nil
2079 }
2080 if h.workspaces == nil {
2081 return trimmed, nil
2082 }
2083 resolved, err := h.workspaces.Resolve(ctx, trimmed)
2084 if err != nil {
2085 return "", err
2086 }
2087 return hostAPIResolvedWorkspaceID(&resolved)
2088}
2089
2090func (h *HostAPIHandler) resolveRequiredWorkspaceID(ctx context.Context, rawWorkspace string) (string, error) {
2091 workspaceID, err := h.resolveWorkspaceID(ctx, rawWorkspace)

Callers 2

recallMemoryMethod · 0.95

Calls 2

ResolveMethod · 0.65

Tested by

no test coverage detected