Skip to content

fix: provide inline suggestions in Docker Compose files#141

Draft
laileni-aws wants to merge 1 commit into
aws:mainfrom
laileni-aws:fix/inline-completion-dockercompose-language
Draft

fix: provide inline suggestions in Docker Compose files#141
laileni-aws wants to merge 1 commit into
aws:mainfrom
laileni-aws:fix/inline-completion-dockercompose-language

Conversation

@laileni-aws

Copy link
Copy Markdown
Contributor

Problem

Amazon Q inline suggestions do not work in Docker Compose files. In a docker-compose.yaml (or .yml) file, completions fail with a "language is not supported" style result, even though inline suggestions work in a plain .yaml file.

The cause is the editor language id: VS Code identifies Docker Compose files with the dockercompose language id (not yaml). The runtime language mapping did not know about dockercompose, so the language was treated as unsupported and no suggestions were requested.

Fix

Treat dockercompose as YAML:

  • packages/core/src/codewhisperer/util/runtimeLanguageContext.ts: map the dockercompose platform language id to the yaml runtime language in supportedLanguageMap.
  • packages/core/src/codewhisperer/models/constants.ts: add dockercompose to platformLanguageIds so it is recognized as a supported platform language id (this is also the key type used by the map above).

With this change, Docker Compose files receive the same inline suggestion support as other YAML files.

Testing

  • Extended packages/amazonq/test/unit/codewhisperer/util/runtimeLanguageContext.test.ts:
    • isLanguageSupported('dockercompose') returns true;
    • getLanguageContext('dockercompose') resolves to yaml.
  • Type-checked the core package (tsc -p ./ --noEmit): no type errors in the changed files.
  • Added a changelog entry.

Notes

  • dockercompose is the language id VS Code assigns to docker-compose.yaml / docker-compose.yml (and compose.yaml) files; mapping it to YAML is consistent with how the extension already treats yml and yaml.

VS Code assigns docker-compose files the 'dockercompose' language id
rather than 'yaml', so Amazon Q reported the language as unsupported
and did not offer inline suggestions. Map 'dockercompose' to the YAML
runtime language (and register it as a supported platform language id)
so completions are provided as they are for other YAML files.
@laileni-aws
laileni-aws force-pushed the fix/inline-completion-dockercompose-language branch from bb22f89 to 544916d Compare July 15, 2026 02:25
@laileni-aws laileni-aws changed the title fix(amazonq): provide inline suggestions in Docker Compose files fix: provide inline suggestions in Docker Compose files Jul 15, 2026
@laileni-aws laileni-aws reopened this Jul 15, 2026
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.

1 participant