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

Function renderTaskInspectToon

internal/cli/task.go:3814–3865  ·  view source on GitHub ↗
(record *TaskInspectRecord)

Source from the content-addressed store, hash-verified

3812}
3813
3814func renderTaskInspectToon(record *TaskInspectRecord) (string, error) {
3815 blocks := []string{
3816 renderToonObject("task_inspect", []string{
3817 "target",
3818 taskTaskIDKey,
3819 taskTitleKey,
3820 taskStatusKey,
3821 "current_run_id",
3822 "next_action",
3823 "as_of",
3824 }, []string{
3825 record.Target,
3826 record.Task.ID,
3827 record.Task.Title,
3828 string(record.Task.Status),
3829 taskInspectCurrentRunID(record.CurrentRun),
3830 record.NextAction,
3831 formatTime(record.AsOf),
3832 }),
3833 renderToonArray(
3834 "diagnostics",
3835 []string{"code", "severity", "message", "command"},
3836 taskInspectDiagnosticToonRows(record.Diagnostics),
3837 ),
3838 renderToonArray(
3839 "recent_runs",
3840 []string{
3841 taskRunIDKey,
3842 taskStatusKey,
3843 taskAttemptKey,
3844 taskSessionIDKey,
3845 "hash",
3846 "heartbeat_age_seconds",
3847 taskErrorKey,
3848 },
3849 taskInspectRunToonRows(record.RecentRuns),
3850 ),
3851 renderToonArray(
3852 "recent_events",
3853 []string{
3854 "id",
3855 extensionTypeKey,
3856 taskRunIDKey,
3857 taskOutcomeKey,
3858 memorySummaryKey,
3859 taskTimestampKey,
3860 },
3861 taskInspectEventToonRows(record.RecentEvents),
3862 ),
3863 }
3864 return renderHumanBlocks(blocks...), nil
3865}
3866
3867func taskInspectRunSectionRows(run *contract.TaskInspectRunPayload) []keyValue {
3868 return []keyValue{

Callers 1

taskInspectBundleFunction · 0.85

Calls 8

renderToonObjectFunction · 0.85
taskInspectCurrentRunIDFunction · 0.85
formatTimeFunction · 0.85
renderToonArrayFunction · 0.85
taskInspectRunToonRowsFunction · 0.85
taskInspectEventToonRowsFunction · 0.85
renderHumanBlocksFunction · 0.85

Tested by

no test coverage detected