Skip to content

feat: add kimchi history subcommand - #1

Open
igor-susic1 wants to merge 1 commit into
masterfrom
feature/history-command
Open

feat: add kimchi history subcommand#1
igor-susic1 wants to merge 1 commit into
masterfrom
feature/history-command

Conversation

@igor-susic1

Copy link
Copy Markdown
Owner

Adds a new "kimchi history" subcommand that lets users browse and resume previous local chat/development sessions.

  • Implements "src/commands/history.ts" with runHistory() and getHistoryHelp()
  • Parses --help/-h and --limit flags (default 20, max 100)
  • Lists sessions via SessionManager.list(process.cwd()), sorted by modified descending
  • Interactive @clack/prompts select when stdin is a TTY; prints a numbered list otherwise
  • Spawns the current executable with --session and forwards SIGINT/SIGTERM/SIGHUP
  • Handles empty history, cancellation (exit 130), and errors gracefully
  • Registers the command in src/commands/registry.ts and updates src/commands/help.ts
  • Adds src/commands/history.test.ts with 15 vitest tests

Verification:

  • pnpm run lint ✅
  • pnpm run typecheck ✅
  • pnpm run test src/commands/history.test.ts ✅ (15/15)
  • pnpm run test src/commands/dispatch.test.ts src/commands/update.test.ts ✅ (25/25)

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.

1 participant