Skip to content

tui: expose reasoning stream in slash command help/completion - #42312

Closed
randyjtw wants to merge 3 commits into
openclaw:mainfrom
randyjtw:codex/tui-reasoning-stream-help
Closed

randyjtw wants to merge 3 commits into
openclaw:mainfrom
randyjtw:codex/tui-reasoning-stream-help

Conversation

@randyjtw

Copy link
Copy Markdown

Summary

  • Include stream in TUI /reasoning argument completion.
  • Update TUI /reasoning help/usage text from on|off to on|off|stream.

Why

ReasoningLevel already supports stream, but TUI command metadata and usage hints only advertised on|off. This makes users think stream mode is unsupported in TUI.

Scope

  • TUI command metadata/help only.
  • No behavior change to gateway/session logic.

Files

  • src/tui/commands.ts
  • src/tui/tui-command-handlers.ts

Refs: #42276

@greptile-apps

greptile-apps Bot commented Mar 10, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR exposes the already-supported stream value for ReasoningLevel in the TUI's /reasoning slash command by updating the auto-complete list, the command description, the /help output, and the no-args usage hint. The changes are purely metadata — no gateway or session logic is touched.

  • REASONING_LEVELS in commands.ts extended from ["on", "off"] to ["on", "off", "stream"], propagating automatically to tab-completion via createLevelCompletion.
  • Command description, helpText() output, and the inline usage hint in tui-command-handlers.ts all updated consistently to reflect on|off|stream.
  • The test file should be updated to assert the new stream entry appears in reasoning completions, mirroring the existing test pattern for other level-based completions.

Confidence Score: 4/5

  • Safe to merge — metadata-only changes with consistent updates across all user-facing locations.
  • All changes are correct and consistent across every location that needed updating (REASONING_LEVELS, command description, helpText(), and usage hint). The only minor gap is the absence of a test assertion for the new stream completion, which would provide regression coverage. No behavioral risk is introduced to gateway or session logic.
  • src/tui/commands.test.ts — adding a test assertion for reasoning completions would complete the change.

Comments Outside Diff (1)

  1. src/tui/commands.test.ts, line 15-26 (link)

    The existing test covers verbose and activation completions, but there is no assertion for the reasoning command's completions. Now that "stream" has been added to REASONING_LEVELS, adding a test case for the new entry would prevent regressions.

Last reviewed commit: 4b313ea

@randyjtw

Copy link
Copy Markdown
Author

Addressed, thanks for the review.

Added regression coverage for the new reasoning stream completion:

  • src/tui/commands.test.ts
    • assert reasoning completions include stream (getArgumentCompletions("s"))

Commit: 8f1986254

@randyjtw
randyjtw force-pushed the codex/tui-reasoning-stream-help branch from 45c9116 to 9f3405a Compare March 12, 2026 13:51
@randyjtw

Copy link
Copy Markdown
Author

Closing this PR because the effect is not obvious in practice, and most models do not yet support the intended behavior.

@randyjtw randyjtw closed this Mar 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant