Commit 76edfda
committed
refactor(cli): migrate legacy commands' chat output to Report
Bring the remaining commands (reload, dump, info, migrate, debug) onto
the same Report builder used by the new resource-based subcommands, so
chat formatting is consistent everywhere: muted-key/colored-value kvs,
accent section headers, summary blocks, list items, [Label] action
buttons. Their console rendering is left untouched (CliOutput +
CliTable + ProgressBarComponent) because each has bespoke needs that
do not benefit from the unified path; the builder exposes sendChatOnly
for that case.
Replace ReloadCommand's broken [View scripts] click target — it ran
the removed /cb scripts command — with [Scripts] -> /cb script list.
Switch HelpCommand entries to suggestCommand so clicking a command
that requires arguments inserts it into chat input rather than running
it with missing args. Drop the open-coded getActiveClients duplicated
across Reload/Ping/List in favour of SessionHub.authenticated().1 parent c8a60c3 commit 76edfda
5 files changed
Lines changed: 158 additions & 249 deletions
File tree
- velocity/src/main/java/dev/objz/commandbridge/velocity/cli/subcommands
Lines changed: 25 additions & 32 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
10 | 9 | | |
11 | | - | |
| 10 | + | |
12 | 11 | | |
13 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
39 | 36 | | |
40 | | - | |
| 37 | + | |
41 | 38 | | |
42 | | - | |
| 39 | + | |
43 | 40 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
51 | 44 | | |
52 | 45 | | |
53 | 46 | | |
Lines changed: 18 additions & 44 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | 14 | | |
18 | 15 | | |
19 | | - | |
20 | | - | |
21 | 16 | | |
22 | 17 | | |
23 | 18 | | |
24 | | - | |
25 | 19 | | |
26 | 20 | | |
27 | 21 | | |
| |||
96 | 90 | | |
97 | 91 | | |
98 | 92 | | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
103 | 100 | | |
104 | 101 | | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
| 102 | + | |
118 | 103 | | |
119 | | - | |
| 104 | + | |
120 | 105 | | |
121 | 106 | | |
122 | 107 | | |
123 | | - | |
| 108 | + | |
124 | 109 | | |
125 | 110 | | |
126 | | - | |
| 111 | + | |
127 | 112 | | |
128 | | - | |
129 | | - | |
| 113 | + | |
130 | 114 | | |
131 | 115 | | |
132 | 116 | | |
133 | 117 | | |
134 | | - | |
| 118 | + | |
135 | 119 | | |
136 | | - | |
137 | | - | |
| 120 | + | |
138 | 121 | | |
139 | 122 | | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
| 123 | + | |
149 | 124 | | |
150 | 125 | | |
151 | 126 | | |
| |||
179 | 154 | | |
180 | 155 | | |
181 | 156 | | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
186 | 160 | | |
187 | 161 | | |
188 | 162 | | |
| |||
Lines changed: 17 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | 5 | | |
8 | 6 | | |
9 | 7 | | |
10 | 8 | | |
11 | 9 | | |
12 | 10 | | |
13 | 11 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | 12 | | |
18 | 13 | | |
19 | 14 | | |
| |||
33 | 28 | | |
34 | 29 | | |
35 | 30 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | 31 | | |
44 | | - | |
| 32 | + | |
| 33 | + | |
45 | 34 | | |
46 | 35 | | |
47 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
48 | 39 | | |
49 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
50 | 43 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
57 | 53 | | |
58 | 54 | | |
59 | 55 | | |
| |||
0 commit comments