Skip to content

history command: first draft#7

Merged
mari4kaa merged 6 commits into
mainfrom
4-a-history-command
Jun 3, 2025
Merged

history command: first draft#7
mari4kaa merged 6 commits into
mainfrom
4-a-history-command

Conversation

@mari4kaa
Copy link
Copy Markdown
Collaborator

@mari4kaa mari4kaa commented Jun 1, 2025

This is a very first draft of a history command
(hopefully will be improved later and properly tested)

EventEmitter, Singleton and Command patterns are used.

  • Code is up-to-date with the main branch
  • npm run lint passes with this change
  • npm run test passes with this change
  • This pull request links relevant issues as Fixes #0000
  • There are new or updated unit tests validating the change
  • Documentation has been updated to reflect this change
  • The new commits follow conventions outlined in the conventional commit spec

Fixes #4

@mari4kaa mari4kaa self-assigned this Jun 1, 2025
@mari4kaa mari4kaa linked an issue Jun 1, 2025 that may be closed by this pull request
@kujo205 kujo205 requested review from Copilot and kujo205 and removed request for kujo205 June 2, 2025 22:14
@kujo205
Copy link
Copy Markdown
Owner

kujo205 commented Jun 2, 2025

Don't see the tests

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a first draft of a history command that displays copy history using the EventEmitter, Singleton, and Command patterns.

  • Added a new HistoryCommand integrated with Commander.
  • Implemented a SQLite-backed HistoryRepository to store and retrieve history records.
  • Registered the history command in the CLI.

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/modules/events.ts Adds a shared EventEmitter instance
src/modules/commands/HistoryCommand/index.ts Implements HistoryCommand using Commander
src/modules/commands/HistoryCommand/historyRepository.ts Introduces SQLite-backed persistent storage for records
src/modules/commands/HistoryCommand/history.ts Implements command logic including navigation handling
src/cli.ts Registers the HistoryCommand in the CLI
package.json Adds new sqlite3 dependency

Comment thread src/modules/commands/HistoryCommand/index.ts Outdated
Comment thread src/modules/commands/HistoryCommand/history.ts Outdated
Copy link
Copy Markdown
Owner

@kujo205 kujo205 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to implement the command and add tests

Comment thread src/modules/commands/HistoryCommand/historyRepository.ts
Comment thread src/modules/events.ts
Comment thread src/modules/commands/HistoryCommand/historyRepository.ts Outdated
Comment thread src/modules/commands/HistoryCommand/index.ts Outdated
@kujo205 kujo205 force-pushed the 4-a-history-command branch 2 times, most recently from 8569c3f to 0e0d476 Compare June 3, 2025 22:40
@kujo205 kujo205 force-pushed the 4-a-history-command branch from 0e0d476 to 9dee154 Compare June 3, 2025 22:42
@mari4kaa mari4kaa requested a review from kujo205 June 3, 2025 22:46
@mari4kaa
Copy link
Copy Markdown
Collaborator Author

mari4kaa commented Jun 3, 2025

@kujo205 review the code pls

Comment thread package.json Outdated
@kujo205 kujo205 force-pushed the 4-a-history-command branch from 6fd6598 to 509ef93 Compare June 3, 2025 22:48
@mari4kaa mari4kaa requested a review from kujo205 June 3, 2025 22:49
@kujo205
Copy link
Copy Markdown
Owner

kujo205 commented Jun 3, 2025

No test but who cares lets merge

@kujo205 kujo205 closed this Jun 3, 2025
@kujo205 kujo205 reopened this Jun 3, 2025
Copy link
Copy Markdown
Owner

@kujo205 kujo205 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets merge

@mari4kaa mari4kaa merged commit 5e1a97d into main Jun 3, 2025
2 checks passed
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 3, 2025

🎉 This PR is included in version 1.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A history command

3 participants