Skip to content

Conversation

AllyW
Copy link
Contributor

@AllyW AllyW commented Feb 18, 2025

  1. provide short message automatically if not exists

Comment on lines 628 to 641
# provide default short summary
for node in manager.iter_command_tree_nodes():
if not node.help:
node.help = CMDHelp()
if not node.help.short:
node.help.short = f"Manage {node.names[-1]}"

for leaf in manager.iter_command_tree_leaves():
if not leaf.help:
leaf.help = CMDHelp()
if not leaf.help.short:
n = leaf.names[-1]
n = n[0].upper() + n[1:]
leaf.help.short = f"{n} {leaf.names[-2]}"
Copy link
Collaborator

@kairu-ms kairu-ms Feb 21, 2025

Choose a reason for hiding this comment

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

Please don't implement code in the api level. Please implement it in related code of command generation.

@AllyW AllyW force-pushed the support-auto-short-message branch 2 times, most recently from 6140ea0 to 05679e8 Compare February 24, 2025 09:04
@AllyW
Copy link
Contributor Author

AllyW commented Feb 24, 2025

image

@AllyW
Copy link
Contributor Author

AllyW commented Feb 24, 2025

image

@kairu-ms
Copy link
Collaborator

Please convert the name with space between.
image

@AllyW AllyW force-pushed the support-auto-short-message branch from e6c2b8e to 1d79cef Compare February 27, 2025 08:57
@AllyW AllyW merged commit b4bbf2c into Azure:dev Feb 28, 2025
3 checks passed
@AllyW AllyW deleted the support-auto-short-message branch February 28, 2025 06:17
@AllyW AllyW mentioned this pull request Mar 4, 2025
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.

2 participants