Skip to content

feat(cli): persist project-scoped prompt history - #1132

Closed
lifelmy wants to merge 8880 commits into
CodebuffAI:mainfrom
lifelmy:agent-tasks/1125
Closed

feat(cli): persist project-scoped prompt history#1132
lifelmy wants to merge 8880 commits into
CodebuffAI:mainfrom
lifelmy:agent-tasks/1125

Conversation

@lifelmy

@lifelmy lifelmy commented Aug 26, 2026

Copy link
Copy Markdown

Summary

Closes #1125.

  • persist CLI prompt history per project by default while preserving the existing global history path behind FREEBUFF_HISTORY_SCOPE=global
  • cap persisted history at 500 entries by default and collapse consecutive duplicate prompts
  • add FREEBUFF_HISTORY_SIZE=0 as an explicit off switch for prompt history persistence
  • document the plaintext on-disk history behavior and configuration in the CLI README
  • keep recalled entries editable before resubmission through the existing up/down recall flow

Testing

  • bun install
  • ./node_modules/.bin/prettier --write cli/README.md cli/src/chat.tsx cli/src/hooks/use-input-history.ts cli/src/utils/message-history.ts cli/src/utils/tests/message-history.test.ts
  • git diff --check
  • bun test cli/src/utils/tests/message-history.test.ts cli/src/hooks/tests/use-input-history.test.ts cli/src/utils/tests/keyboard-actions.test.ts cli/src/utils/tests/chat-input-key-intercept.test.ts — 111 pass, 0 fail, 213 expect() calls
  • bun run build:sdk
  • bun run build:freebuff

Notes

I also tried the broader CLI checks. cd cli && bun run typecheck currently fails because this checkout is missing existing dependencies/types for tar and react-dom/server; cd cli && bun run test currently fails before running tests because cli/bunfig.toml preloads missing ../test/setup-scm-loader.ts.

I use a coding assistant to help implement, and I review and take responsibility for the final change.

Loading
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.

Feature: Up/Down arrow prompt-history recall in the input boxes (CLI + Desktop)

2 participants