core-agent-ide/codex-cli/tests
Tomas Cupr 295079cf33
feat: add command history persistence (#152)
This PR adds a command history persistence feature to Codex CLI that:

1. **Stores command history**: Commands are saved to
`~/.codex/history.json` and persist between CLI sessions.
2. **Navigates history**: Users can use the up/down arrow keys to
navigate through command history, similar to a traditional shell.
3. **Filters sensitive data**: Built-in regex patterns prevent commands
containing API keys, passwords, or tokens from being saved.
4. **Configurable**: Added configuration options for history size,
enabling/disabling history, and custom regex patterns for sensitive
content.
5. **New command**: Added `/clearhistory` command to clear command
history.

  ## Code Changes

- Added `src/utils/storage/command-history.ts` with functions for
history management
  - Extended config system to support history settings
  - Updated terminal input components to use persistent history
  - Added help text for the new `/clearhistory` command
  - Added CLAUDE.md file for guidance when working with the codebase

  ## Testing

  - All tests are passing
- Core functionality works with both input components (standard and
multiline)
- History navigation behaves correctly at line boundaries with the
multiline editor
2025-04-17 12:41:54 -07:00
..
__fixtures__ Initial commit 2025-04-16 12:56:08 -04:00
agent-cancel-early.test.ts Back out @lib indirection in tsconfig.json (#111) 2025-04-16 14:16:53 -07:00
agent-cancel-prev-response.test.ts Back out @lib indirection in tsconfig.json (#111) 2025-04-16 14:16:53 -07:00
agent-cancel-race.test.ts Back out @lib indirection in tsconfig.json (#111) 2025-04-16 14:16:53 -07:00
agent-cancel.test.ts Back out @lib indirection in tsconfig.json (#111) 2025-04-16 14:16:53 -07:00
agent-function-call-id.test.ts Back out @lib indirection in tsconfig.json (#111) 2025-04-16 14:16:53 -07:00
agent-generic-network-error.test.ts Back out @lib indirection in tsconfig.json (#111) 2025-04-16 14:16:53 -07:00
agent-interrupt-continue.test.ts fix: allow continuing after interrupting assistant (#178) 2025-04-16 22:20:19 -07:00
agent-invalid-request-error.test.ts Back out @lib indirection in tsconfig.json (#111) 2025-04-16 14:16:53 -07:00
agent-max-tokens-error.test.ts Back out @lib indirection in tsconfig.json (#111) 2025-04-16 14:16:53 -07:00
agent-network-errors.test.ts Back out @lib indirection in tsconfig.json (#111) 2025-04-16 14:16:53 -07:00
agent-project-doc.test.ts Back out @lib indirection in tsconfig.json (#111) 2025-04-16 14:16:53 -07:00
agent-rate-limit-error.test.ts Back out @lib indirection in tsconfig.json (#111) 2025-04-16 14:16:53 -07:00
agent-server-retry.test.ts Back out @lib indirection in tsconfig.json (#111) 2025-04-16 14:16:53 -07:00
agent-terminate.test.ts Back out @lib indirection in tsconfig.json (#111) 2025-04-16 14:16:53 -07:00
agent-thinking-time.test.ts Back out @lib indirection in tsconfig.json (#111) 2025-04-16 14:16:53 -07:00
api-key.test.ts Initial commit 2025-04-16 12:56:08 -04:00
apply-patch.test.ts Initial commit 2025-04-16 12:56:08 -04:00
approvals.test.ts fix(security): Shell commands auto-executing in 'suggest' mode without permission (#197) 2025-04-17 07:15:02 -07:00
cancel-exec.test.ts Initial commit 2025-04-16 12:56:08 -04:00
config.test.tsx feat: add command history persistence (#152) 2025-04-17 12:41:54 -07:00
dummy.test.ts Initial commit 2025-04-16 12:56:08 -04:00
external-editor.test.ts Back out @lib indirection in tsconfig.json (#111) 2025-04-16 14:16:53 -07:00
format-command.test.ts Back out @lib indirection in tsconfig.json (#111) 2025-04-16 14:16:53 -07:00
invalid-command-handling.test.ts Back out @lib indirection in tsconfig.json (#111) 2025-04-16 14:16:53 -07:00
markdown.test.tsx Initial commit 2025-04-16 12:56:08 -04:00
model-utils-network-error.test.ts Initial commit 2025-04-16 12:56:08 -04:00
multiline-ctrl-enter-submit.test.tsx Initial commit 2025-04-16 12:56:08 -04:00
multiline-dynamic-width.test.tsx Initial commit 2025-04-16 12:56:08 -04:00
multiline-enter-submit-cr.test.tsx Initial commit 2025-04-16 12:56:08 -04:00
multiline-external-editor-shortcut.test.tsx Back out @lib indirection in tsconfig.json (#111) 2025-04-16 14:16:53 -07:00
multiline-history-behavior.test.tsx Back out @lib indirection in tsconfig.json (#111) 2025-04-16 14:16:53 -07:00
multiline-input-test.ts Initial commit 2025-04-16 12:56:08 -04:00
multiline-newline.test.tsx Initial commit 2025-04-16 12:56:08 -04:00
multiline-shift-enter-crlf.test.tsx Initial commit 2025-04-16 12:56:08 -04:00
multiline-shift-enter.test.tsx Initial commit 2025-04-16 12:56:08 -04:00
parse-apply-patch.test.ts Back out @lib indirection in tsconfig.json (#111) 2025-04-16 14:16:53 -07:00
project-doc.test.ts Initial commit 2025-04-16 12:56:08 -04:00
raw-exec-process-group.test.ts Initial commit 2025-04-16 12:56:08 -04:00
terminal-chat-response-item.test.tsx Initial commit 2025-04-16 12:56:08 -04:00
text-buffer-copy-paste.test.ts Back out @lib indirection in tsconfig.json (#111) 2025-04-16 14:16:53 -07:00
text-buffer-crlf.test.ts Back out @lib indirection in tsconfig.json (#111) 2025-04-16 14:16:53 -07:00
text-buffer-gaps.test.ts Back out @lib indirection in tsconfig.json (#111) 2025-04-16 14:16:53 -07:00
text-buffer-word.test.ts fix(text-buffer): correct word deletion logic for trailing spaces (Ctrl+Backspace) (#131) 2025-04-16 16:25:08 -07:00
text-buffer.test.ts Back out @lib indirection in tsconfig.json (#111) 2025-04-16 14:16:53 -07:00
typeahead-scroll.test.tsx (fix) do not transitively rely on deprecated lodash deps (#175) 2025-04-16 20:52:35 -07:00
ui-test-helpers.tsx Initial commit 2025-04-16 12:56:08 -04:00