Skip to content

feat(completion): add API field completion and revamp shell predictors - #448

Merged
thde merged 3 commits into
mainfrom
thde/completion
Sep 3, 2026
Merged

feat(completion): add API field completion and revamp shell predictors#448
thde merged 3 commits into
mainfrom
thde/completion

Conversation

@thde

@thde thde commented Aug 26, 2026

Copy link
Copy Markdown
Member

Improve the predictor package to provide structured shell completions, dynamic API resource resolution, and automatic flag help/placeholder enrichment.

  • Introduce internal/apifield with known API field defaults and values, plus a Kong PostBuild hook to automatically populate placeholders and append available values to flag help texts.
  • Introduce internal/apiresource to resolve command names and aliases to Kubernetes API GroupVersionKinds dynamically.
  • Introduce internal/completion with namespaced predictors (local:, client:, apifield:*) and lazy API client initialization.
  • Update all CLI verbs (create, update, exec, auth, apply, delete, edit, get, logs, copy) to use namespaced completion tags.
  • Remove redundant Kong variable helper functions across create and update.
  • Add comprehensive unit tests for completion, field enrichment, and resource resolution.

Comment thread create/mysql.go
@thde
thde force-pushed the thde/completion branch from ecb6f43 to a921517 Compare August 28, 2026 14:13
Improve the predictor package to provide structured shell completions,
dynamic API resource resolution, and automatic flag help/placeholder
enrichment.

- Introduce internal/apifield with known API field defaults and values,
  plus a Kong PostBuild hook to automatically populate placeholders
  and append available values to flag help texts.
- Introduce internal/apiresource to resolve command names and aliases
  to Kubernetes API GroupVersionKinds dynamically.
- Introduce internal/completion with namespaced predictors (local:*,
  client:*, apifield:*) and lazy API client initialization.
- Update all CLI verbs (create, update, exec, auth, apply, delete, edit,
  get, logs, copy) to use namespaced completion tags.
- Remove redundant Kong variable helper functions across create and
  update.
- Add comprehensive unit tests for completion, field enrichment, and
  resource resolution.
Comment thread internal/apiresource/apiresource.go
Comment thread internal/completion/databases.go Outdated
@thde
thde merged commit ef0d2ab into main Sep 3, 2026
3 checks passed
@thde
thde deleted the thde/completion branch September 3, 2026 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants