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

Function taskReferenceFromTask

internal/task/manager.go:3912–3932  ·  view source on GitHub ↗
(record Task, status Status)

Source from the content-addressed store, hash-verified

3910}
3911
3912func taskReferenceFromTask(record Task, status Status) Reference {
3913 return Reference{
3914 ID: record.ID,
3915 Identifier: record.Identifier,
3916 Title: record.Title,
3917 Status: status,
3918 Priority: record.Priority,
3919 Owner: cloneOwnership(record.Owner),
3920 Scope: record.Scope,
3921 WorkspaceID: record.WorkspaceID,
3922 LatestEventSeq: record.LatestEventSeq,
3923 Paused: record.Paused,
3924 EffectivePaused: record.Paused,
3925 PausedByTaskID: func() string {
3926 if record.Paused {
3927 return record.ID
3928 }
3929 return ""
3930 }(),
3931 }
3932}
3933
3934type effectiveTaskPauseReader interface {
3935 IsTaskEffectivelyPaused(ctx context.Context, taskID string) (bool, string, error)

Callers 4

taskReferenceMethod · 0.85
buildTreeNodeMethod · 0.85
RunDetailMethod · 0.85
loadTaskLiveContextMethod · 0.85

Calls 1

cloneOwnershipFunction · 0.70

Tested by

no test coverage detected