Modernize CommandManager, prep for API13, add new experimental console-backed API - #2247
Open
goaaats wants to merge 3 commits into
Open
Modernize CommandManager, prep for API13, add new experimental console-backed API#2247goaaats wants to merge 3 commits into
goaaats wants to merge 3 commits into
Conversation
KazWolfe
reviewed
Apr 20, 2025
KazWolfe
left a comment
Member
There was a problem hiding this comment.
We're moving from InternalName to GUID in a bunch of places. Is there a reason for this vs just passing in a reference to that loaded plugin?
|
|
||
| /// <inheritdoc/> | ||
| public ReadOnlyDictionary<string, IReadOnlyCommandInfo> Commands => new(this.commandMap); | ||
| [Api13ToDo("Make this sensible. Don't use exposed API for internal structures.")] |
Member
There was a problem hiding this comment.
API note: some people can/do use this, we may need to create an interface to expose commands. (See: SimpleTweaks)
Member
Author
There was a problem hiding this comment.
Yeah, we definitely still want this. The intent isn't to remove it, but to replace it with something nicer.
| /// <inheritdoc/> | ||
| public bool RemoveHandler(string command) | ||
| [Experimental("Dalamud001")] | ||
| public bool AddCommand(string commandName, string helpMessage, Delegate func, bool showInHelp = true, int displayOrder = -1) |
Member
There was a problem hiding this comment.
Honestly not sure here re a bare Delegate. Maybe a new class like a CommandExecutionContext would be better? Would let us pass args as a bare string, "parsed" args, and other context info (e.g. if we're in a macro).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.