@@ -5,13 +5,14 @@ import { truncateUtf16Safe } from "@openclaw/normalization-core/utf16-slice";
55import { getTerminalTableWidth , renderTable } from "../../../packages/terminal-core/src/table.js" ;
66import { isRich , theme } from "../../../packages/terminal-core/src/theme.js" ;
77import type { ProgressReporter } from "../../cli/progress.js" ;
8+ import { buildStatusChannelsTableRows , statusChannelsTableColumns } from "./channels-table.js" ;
89import { appendStatusAllDiagnosis } from "./diagnosis.js" ;
910import {
10- buildStatusAgentsSection ,
11- buildStatusChannelDetailsSections ,
12- buildStatusChannelsSection ,
13- buildStatusOverviewSection ,
14- } from "./report-sections .js" ;
11+ buildStatusAgentTableRows ,
12+ buildStatusChannelDetailSections ,
13+ statusAgentsTableColumns ,
14+ statusOverviewTableColumns ,
15+ } from "./report-tables .js" ;
1516import { appendStatusReportSections , appendStatusSectionHeading } from "./text-report.js" ;
1617
1718type OverviewRow = { Item : string ; Value : string } ;
@@ -75,36 +76,52 @@ export async function buildStatusAllReportLines(params: {
7576 lines,
7677 heading,
7778 sections : [
78- buildStatusOverviewSection ( {
79+ {
80+ kind : "table" ,
81+ title : "Overview" ,
7982 width : tableWidth ,
8083 renderTable,
84+ columns : [ ...statusOverviewTableColumns ] ,
8185 rows : params . overviewRows ,
82- } ) ,
83- buildStatusChannelsSection ( {
86+ } ,
87+ {
88+ kind : "table" ,
89+ title : "Channels" ,
8490 width : tableWidth ,
8591 renderTable,
86- rows : params . channels . rows ,
87- channelIssues : params . channelIssues ,
88- ok,
89- warn,
90- muted,
91- accentDim : theme . accentDim ,
92- formatIssueMessage : ( message ) => truncateUtf16Safe ( message , 90 ) ,
93- } ) ,
94- ...buildStatusChannelDetailsSections ( {
92+ // The status-all report has more horizontal space than compact status output.
93+ columns : statusChannelsTableColumns . map ( ( column ) =>
94+ column . key === "Detail" ? Object . assign ( { } , column , { minWidth : 28 } ) : column ,
95+ ) ,
96+ rows : buildStatusChannelsTableRows ( {
97+ rows : params . channels . rows ,
98+ channelIssues : params . channelIssues ,
99+ ok,
100+ warn,
101+ muted,
102+ accentDim : theme . accentDim ,
103+ formatIssueMessage : ( message ) => truncateUtf16Safe ( message , 90 ) ,
104+ } ) ,
105+ } ,
106+ ...buildStatusChannelDetailSections ( {
95107 details : params . channels . details ,
96108 width : tableWidth ,
97109 renderTable,
98110 ok,
99111 warn,
100112 } ) ,
101- buildStatusAgentsSection ( {
113+ {
114+ kind : "table" ,
115+ title : "Agents" ,
102116 width : tableWidth ,
103117 renderTable,
104- agentStatus : params . agentStatus ,
105- ok,
106- warn,
107- } ) ,
118+ columns : [ ...statusAgentsTableColumns ] ,
119+ rows : buildStatusAgentTableRows ( {
120+ agentStatus : params . agentStatus ,
121+ ok,
122+ warn,
123+ } ) ,
124+ } ,
108125 ] ,
109126 } ) ;
110127 appendStatusSectionHeading ( {
0 commit comments