Skip to content

Fix auto-completion logic for APIs that end with 'y' - #194

Open
Pearl1594 wants to merge 3 commits into
mainfrom
fix-autocomplete-apis-ending-in-ies
Open

Fix auto-completion logic for APIs that end with 'y'#194
Pearl1594 wants to merge 3 commits into
mainfrom
fix-autocomplete-apis-ending-in-ies

Conversation

@Pearl1594

Copy link
Copy Markdown
Contributor

With this fix, autocompletion works for APIs ending in 'y' or 'ies' e.g. deleteSnapshotPolicies , deleteAutoscalePolicy

Screenshot from 2025-09-02 15-00-22 Screenshot from 2025-09-02 15-01-03

@Pearl1594
Pearl1594 requested a review from shwstppr September 2, 2025 19:05
@github-actions

github-actions Bot commented Sep 2, 2025

Copy link
Copy Markdown

✅ Build complete for PR #194.

📦 Binary artifacts are available in the workflow run (expires on August 31, 2026).

Note: Download artifacts by clicking on the workflow run link above, then scroll to the "Artifacts" section.
Artifacts from PR builds are for testing only and may contain unreviewed, malicious code.

Comment thread cli/completer.go Outdated
@shwstppr shwstppr added this to the 6.6.0 milestone Sep 3, 2025
@DaanHoogland

Copy link
Copy Markdown
Contributor

would it be feasible to add a configurable lookup list, all examples cought in generic rule may be ambitious. I may one day decide we need status/statae… or worse, some dutch plural.

@Pearl1594

Copy link
Copy Markdown
Contributor Author

@DaanHoogland currently we use plain, regular English nouns for CloudStack API resources, and there are no cases today where an irregular plural would arise. Since there's no concrete requirement for it yet, I don't think a configurable lookup list is needed here. We can probably address that when the need arises.

Copilot AI lite review requested due to automatic review settings August 21, 2026 13:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This pull request improves CLI auto-completion API selection by introducing a small pluralization helper and using it in the autocomplete heuristics so that APIs whose nouns end in y/ies are mapped correctly to their corresponding list* APIs.

Changes:

  • Add pluralizeNoun helper to apply basic English pluralization rules (including y -> ies).
  • Use pluralizeNoun for deriving the related noun in findAutocompleteAPI instead of naïvely appending s / es.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread cli/completer.go
Copilot AI review requested due to automatic review settings August 21, 2026 14:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

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.

4 participants