Skip to content

Conversation

@deepfuriya
Copy link
Contributor

…owed using inline completion suggestions

Description of changes:

  • Created a new provider which will be triggered when the user is starting to author a new resource.
  • Extracting all the resource types from the template and return top 5 related resource that the user can author next.
  • Currently only displaying the resource type names in the ghost text suggestions. Next will have the actual snippets suggested instead of just resource type

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@deepfuriya deepfuriya requested a review from a team as a code owner September 30, 2025 21:56
@deepfuriya deepfuriya force-pushed the feature/related-resources-inline-completion branch from 3a77e31 to 9dabaea Compare October 1, 2025 18:08
@deepfuriya deepfuriya force-pushed the feature/related-resources-inline-completion branch from 5ffbfdf to d6c9412 Compare October 2, 2025 14:06
Copilot AI review requested due to automatic review settings October 3, 2025 14:24
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a new inline completion provider that suggests related AWS resources when authoring CloudFormation templates. It analyzes existing resources in the template and suggests the most relevant related resource types based on AWS service relationships.

  • Adds a new RelatedResourcesInlineCompletionProvider that extracts existing resource types and suggests related ones
  • Integrates the provider into the existing InlineCompletionRouter with proper context detection for new resource authoring
  • Implements ranking logic to prioritize suggestions by relationship frequency and limits to top 5 results

Reviewed Changes

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

File Description
src/autocomplete/RelatedResourcesInlineCompletionProvider.ts New provider implementing the core logic for suggesting related AWS resources
src/autocomplete/InlineCompletionRouter.ts Updated router to integrate the new provider with context-aware triggering
tst/unit/autocomplete/RelatedResourcesInlineCompletionProvider.test.ts Comprehensive test suite for the new provider functionality
tst/unit/autocomplete/InlineCompletionRouter.test.ts Updated router tests to accommodate the new provider integration

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@github-actions
Copy link

github-actions bot commented Oct 3, 2025

Package Line Rate Branch Rate Complexity Health
ai 22% 80% 0
ai.llm 53% 80% 0
app 0% 0% 0
artifacts 100% 100% 0
auth 87% 92% 0
autocomplete 93% 91% 0
context 95% 95% 0
context.semantic 98% 97% 0
context.semantic.parameter 100% 95% 0
context.syntaxtree 89% 90% 0
context.syntaxtree.utils 86% 91% 0
datastore 77% 97% 0
definition 100% 100% 0
document 93% 96% 0
documentSymbol 93% 81% 0
handlers 75% 88% 0
hover 85% 86% 0
protocol 96% 100% 0
resourceState 76% 80% 0
schema 88% 87% 0
schema.transformers 85% 84% 0
server 97% 96% 0
services 67% 89% 0
services.cfnLint 72% 91% 0
services.guard 95% 79% 0
services.guard.assets 81% 77% 0
settings 97% 87% 0
stacks 100% 100% 0
telemetry 58% 78% 0
templates 89% 85% 0
utils 91% 92% 0
Summary 86% (16998 / 19697) 89% (3516 / 3949) 0

@deepfuriya deepfuriya merged commit 5c60204 into main Oct 3, 2025
8 checks passed
@deepfuriya deepfuriya deleted the feature/related-resources-inline-completion branch October 5, 2025 21:46
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