@@ -7,13 +7,18 @@ import {
77 listChatCommandsForConfig ,
88 resolveTextCommand ,
99} from "../auto-reply/commands-registry.js" ;
10- import { formatThinkingLevels , listThinkingLevelLabels } from "../auto-reply/thinking.js" ;
10+ import {
11+ formatThinkingLevels ,
12+ listThinkingLevelLabels ,
13+ type ReasoningLevel ,
14+ type VerboseLevel ,
15+ } from "../auto-reply/thinking.js" ;
1116import type { OpenClawConfig } from "../config/types.js" ;
1217
13- const VERBOSE_LEVELS = [ "on" , "off" ] ;
18+ const VERBOSE_LEVELS = [ "on" , "off" , "full" ] satisfies VerboseLevel [ ] ;
1419const TRACE_LEVELS = [ "on" , "off" ] ;
1520const FAST_LEVELS = [ "status" , "auto" , "on" , "off" ] ;
16- const REASONING_LEVELS = [ "on" , "off" ] ;
21+ const REASONING_LEVELS = [ "on" , "off" , "stream" ] satisfies ReasoningLevel [ ] ;
1722const ELEVATED_LEVELS = [ "on" , "off" , "ask" , "full" ] ;
1823const ACTIVATION_LEVELS = [ "mention" , "always" ] ;
1924const USAGE_FOOTER_LEVELS = [ "off" , "tokens" , "full" , "reset" , "inherit" , "clear" , "default" ] ;
@@ -55,6 +60,12 @@ function createLevelCompletion(
5560 } ) ) ;
5661}
5762
63+ /** Keep TUI help and no-argument usage aligned with actual directive completions. */
64+ export function formatTuiLevelCommandUsage ( command : "verbose" | "reasoning" ) : string {
65+ const levels = command === "verbose" ? VERBOSE_LEVELS : REASONING_LEVELS ;
66+ return `/${ command } <${ levels . join ( "|" ) } >` ;
67+ }
68+
5869function normalizeSlashCommandName ( value : string ) : string {
5970 return value . replace ( / ^ \/ / , "" ) . trim ( ) ;
6071}
@@ -139,7 +150,7 @@ export function getSlashCommands(options: SlashCommandOptions = {}): SlashComman
139150 } ,
140151 {
141152 name : "verbose" ,
142- description : " Set verbose on/off" ,
153+ description : ` Set verbose ${ VERBOSE_LEVELS . join ( "/" ) } ` ,
143154 getArgumentCompletions : verboseCompletions ,
144155 } ,
145156 {
@@ -149,7 +160,7 @@ export function getSlashCommands(options: SlashCommandOptions = {}): SlashComman
149160 } ,
150161 {
151162 name : "reasoning" ,
152- description : " Set reasoning on/off" ,
163+ description : ` Set reasoning ${ REASONING_LEVELS . join ( "/" ) } ` ,
153164 getArgumentCompletions : reasoningCompletions ,
154165 } ,
155166 {
@@ -249,9 +260,9 @@ export function helpText(options: SlashCommandOptions = {}): string {
249260 "/model <provider/model> (or /models)" ,
250261 `/think <${ thinkLevels } >` ,
251262 "/fast <status|auto|on|off>" ,
252- "/ verbose <on|off>" ,
263+ formatTuiLevelCommandUsage ( " verbose" ) ,
253264 "/trace <on|off>" ,
254- "/ reasoning <on|off>" ,
265+ formatTuiLevelCommandUsage ( " reasoning" ) ,
255266 "/usage <off|tokens|full|reset|inherit|clear|default>" ,
256267 "/elevated <on|off|ask|full>" ,
257268 "/elev <on|off|ask|full>" ,
0 commit comments