Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@vignesh07
Copy link
Contributor

@vignesh07 vignesh07 commented Jan 21, 2026

Summary

Adds shell-style input history to the TUI editor: submitted prompts are recorded so you can use ↑ / ↓ to recall previous messages. Provides parity with existing CLI AI tools.

Details

  • Records every non-empty submission (messages and slash commands)
  • Uses the existing @mariozechner/pi-tui Editor history navigation
  • Keeps behavior minimal and in-memory (no persistence)

Testing

  • pnpm test src/tui/tui-input-history.test.ts
  • pnpm lint
  • pnpm build

🤖 AI-assisted

Codex Review

Codex did not find any issues; expand for code review details ``` >> Code review started: current changes <<

• Ran git diff

• Ran git log -1

• Ran git show HEAD

• Explored
└ Search addToHistory in tui
Search class .*Editor in tui
Read custom-editor.ts
Search class Editor in editor
Search addToHistory in node_modules
Search history in pi-tui
List pi-tui
Search history in pi-tui
Read editor.js
Search ./tui.js in src
Search addToHistory in pi-tui
List components
Read editor.d.ts, tui.test.ts, tui.ts
Search function handleCommand in tui
Search createCommandHandlers in *.ts
Read tui-command-handlers.ts
Search handleCommand in tui-command-handlers.ts
Read tui-command-handlers.ts
Search addToHistory

The helper that records editor submissions mirrors the previous onSubmit logic while adding prompt history support, and the accompanying tests assert the expected routing behavior. No regressions or obvious issues are introduced by the refactor.

<< Code review finished >>

<details>

vignesh07 and others added 2 commits January 21, 2026 04:31
Record submitted inputs in the editor history so up/down arrow
can recall previous messages.

Adds a small helper to wire submit handling and unit tests for
routing/recording behavior.

No PR yet (per request).
@steipete steipete force-pushed the feat/tui-input-history branch from 6d8f8bb to 6f37f1d Compare January 21, 2026 04:37
@steipete steipete merged commit fe1133e into openclaw:main Jan 21, 2026
@steipete
Copy link
Contributor

Landed via temp rebase onto main.

  • Gate: pnpm lint && pnpm build && pnpm test
  • Land commit: fe1133e
  • Merge commit: fe1133e

Thanks @vignesh07!

@steipete
Copy link
Contributor

Correction: land commit was 6f37f1d (previous comment listed the merge commit). Merge commit remains fe1133e.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants