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

Function workspaceDetailBundle

internal/cli/workspace.go:440–453  ·  view source on GitHub ↗
(detail WorkspaceDetailRecord, resolutionSource ...string)

Source from the content-addressed store, hash-verified

438}
439
440func workspaceDetailBundle(detail WorkspaceDetailRecord, resolutionSource ...string) outputBundle {
441 jsonValue := any(detail)
442 if len(resolutionSource) > 0 && strings.TrimSpace(resolutionSource[0]) != "" {
443 jsonValue = workspaceDetailOutput{
444 WorkspaceDetailRecord: detail,
445 ResolutionSource: strings.TrimSpace(resolutionSource[0]),
446 }
447 }
448 return outputBundle{
449 jsonValue: jsonValue,
450 human: func() (string, error) { return renderWorkspaceDetailHuman(detail) },
451 toon: func() (string, error) { return renderWorkspaceDetailToon(detail) },
452 }
453}
454
455func renderWorkspaceDetailHuman(detail WorkspaceDetailRecord) (string, error) {
456 workspaceBlock, err := workspaceRecordBundle(detail.Workspace).human()

Callers 1

newWorkspaceInfoCommandFunction · 0.85

Calls 2

Tested by

no test coverage detected