Skip to content

Command History and Recall Feature#33

Merged
Odjit merged 4 commits intodev/v0.10.3from
feature/Previous_command_repeating_
May 27, 2025
Merged

Command History and Recall Feature#33
Odjit merged 4 commits intodev/v0.10.3from
feature/Previous_command_repeating_

Conversation

@Odjit
Copy link
Collaborator

@Odjit Odjit commented May 17, 2025

This PR introduces a new "command history" feature allowing players to recall and reuse previously executed commands. This quality-of-life improvement helps players avoid retyping complex or frequently used commands.

Features

Command Repeat (.!)

• Instantly repeats the most recently executed command
• Shows feedback indicating which command is being repeated
• Example: After using .echo hello, typing .! will execute .echo hello again

Command History Listing (.! list or .! l)

• Displays a numbered list of your 10 most recently executed commands
• Most recent commands appear at the top of the list
• Each command is prefixed with its history index number

Command History Recall by Index (.! )

• Executes a specific command from your history using its index number
• Example: .! 2 will execute the command listed as #2 in your history

Implementation Details

• Command history is user-specific (each player has their own isolated command history)
• History is limited to the 10 most recent commands per player
• Graceful error handling for users with no command history
• Invalid history indices trigger helpful error messages
• The feature structure uses placeholder commands in RepeatCommands.cs for help documentation, with the actual implementation in CommandRegistry.HandleCommandHistory

This feature enhances the user experience by reducing repetitive typing and making complex command sequences more accessible.

Odjit added 3 commits May 17, 2025 14:20
…closest possible command matches are returned.

Updating presentation of messages and help.
Updating unit tests for the new presentation of messages
… repeat the previous one, .! [#] to repeat the # back command, and .! list to list out the last 10 command history for the user.
@Odjit Odjit requested a review from decaprime May 17, 2025 18:53
Base automatically changed from feature/Closest_command_recommendation_and_updating_message_presentation to dev/v0.10.3 May 27, 2025 17:20
@Odjit Odjit marked this pull request as ready for review May 27, 2025 17:21
@Odjit Odjit merged commit 080d649 into dev/v0.10.3 May 27, 2025
@Odjit Odjit deleted the feature/Previous_command_repeating_ branch May 27, 2025 17:22
Odjit added a commit that referenced this pull request May 31, 2025
* .help by default lists all the plugins with commands you can use

Added a second level of filtering to .help so you can filter commands with a plugin or second filter for the command search
.help now has commands and plugins sorted
Adds .help-all which functions similar to previous .help except its ordered
Added new unit tests

* Commands can now be overloaded.

If there is ambiguity in which command was intended to be called then you will be presented with the options and asked to pick one with .#
Can specify a command for a specific plugin by using the name of it first before the command

* .help by default lists all the plugins with commands you can use

Added a second level of filtering to .help so you can filter commands with a plugin or second filter for the command search
.help now has commands and plugins sorted
Adds .help-all which functions similar to previous .help except its ordered
Added new unit tests

* When you submit a command but its not quite right up to three of the closest possible command matches are returned.

Updating presentation of messages and help.
Updating unit tests for the new presentation of messages

* Command History and Recall Feature (#33)

* When you submit a command but its not quite right up to three of the closest possible command matches are returned.

Updating presentation of messages and help.
Updating unit tests for the new presentation of messages

* Adds the ability to repeat any of the last 10 commands.  Can use .! to repeat the previous one, .! [#] to repeat the # back command, and .! list to list out the last 10 command history for the user.

* Unit tests added for repeat commands

* Updating README.md reflecting all changes

Added additional colors correlating to various colors in VRising

* Adding reference to V Roles in the Middleware section as an example plugin already using the middleware.

* Guess different version of .net is being used on the GitHub Action workflow than in the project
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