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

Function taskBundle

internal/cli/task.go:3113–3183  ·  view source on GitHub ↗
(item *TaskRecord)

Source from the content-addressed store, hash-verified

3111}
3112
3113func taskBundle(item *TaskRecord) outputBundle {
3114 return outputBundle{
3115 jsonValue: *item,
3116 human: func() (string, error) {
3117 return renderHumanSection(taskTaskValue, []keyValue{
3118 {Label: "ID", Value: stringOrDash(item.ID)},
3119 {Label: taskIdentifierValue, Value: stringOrDash(item.Identifier)},
3120 {Label: taskScopeValue, Value: stringOrDash(string(item.Scope))},
3121 {Label: taskWorkspaceValue, Value: stringOrDash(item.WorkspaceID)},
3122 {Label: taskParentValue, Value: stringOrDash(item.ParentTaskID)},
3123 {Label: taskTitleValue, Value: stringOrDash(item.Title)},
3124 {Label: taskDescriptionValue, Value: stringOrDash(item.Description)},
3125 {Label: taskStatusValue, Value: stringOrDash(string(item.Status))},
3126 {Label: "Paused", Value: strconv.FormatBool(item.Paused)},
3127 {Label: "Paused By", Value: stringOrDash(item.PausedBy)},
3128 {Label: taskReasonValue, Value: stringOrDash(item.PausedReason)},
3129 {Label: taskOwnerValue, Value: stringOrDash(formatTaskOwnership(item.Owner))},
3130 {Label: taskCreatedByValue, Value: stringOrDash(formatTaskActor(item.CreatedBy))},
3131 {Label: taskOriginValue, Value: stringOrDash(formatTaskOrigin(item.Origin))},
3132 {Label: taskChannelValue, Value: stringOrDash(item.NetworkChannel)},
3133 {Label: taskCreatedValue, Value: stringOrDash(formatTime(item.CreatedAt))},
3134 {Label: taskUpdatedValue, Value: stringOrDash(formatTime(item.UpdatedAt))},
3135 {Label: "Closed", Value: stringOrDash(formatTimePtr(item.ClosedAt))},
3136 {Label: "Metadata", Value: stringOrDash(compactJSON(item.Metadata))},
3137 }), nil
3138 },
3139 toon: func() (string, error) {
3140 return renderToonObject(taskTaskKey, []string{
3141 "id",
3142 taskIdentifierKey,
3143 taskScopeKey,
3144 taskWorkspaceIDKey,
3145 "parent_task_id",
3146 taskTitleKey,
3147 taskDescriptionKey,
3148 taskStatusKey,
3149 "paused",
3150 "paused_by",
3151 "paused_reason",
3152 taskOwnerKey,
3153 createdByKey,
3154 taskOriginKey,
3155 taskNetworkChannelKey,
3156 taskCreatedAtKey,
3157 taskUpdatedAtKey,
3158 "closed_at",
3159 "metadata",
3160 }, []string{
3161 item.ID,
3162 item.Identifier,
3163 string(item.Scope),
3164 item.WorkspaceID,
3165 item.ParentTaskID,
3166 item.Title,
3167 item.Description,
3168 string(item.Status),
3169 strconv.FormatBool(item.Paused),
3170 item.PausedBy,

Callers 11

newTaskCreateCommandFunction · 0.85
newTaskUpdateCommandFunction · 0.85
newTaskRejectCommandFunction · 0.85
newTaskCancelCommandFunction · 0.85
newTaskRecoverCommandFunction · 0.85
newTaskPauseCommandFunction · 0.85
newTaskResumeCommandFunction · 0.85
taskExecutionBundleFunction · 0.85
renderTaskDetailHumanFunction · 0.85
renderTaskDetailToonFunction · 0.85

Calls 9

renderHumanSectionFunction · 0.85
stringOrDashFunction · 0.85
formatTaskOwnershipFunction · 0.85
formatTaskActorFunction · 0.85
formatTaskOriginFunction · 0.85
formatTimeFunction · 0.85
formatTimePtrFunction · 0.85
renderToonObjectFunction · 0.85
compactJSONFunction · 0.70

Tested by

no test coverage detected