Skip to content

Conversation

@Tyriar
Copy link
Member

@Tyriar Tyriar commented Feb 9, 2025

This change brings in the majority of dealing with script and custom generators from https://github.com/aws/amazon-q-developer-cli/tree/main/packages/autocomplete. Template generators are out of scope for this PR. It also features a big refactor that pulls all dealing with the fig/ folder into fig/figInterface.ts to better segment the "outside" code from the terminal-suggest extension.

Example of script generator:

image

Example of custom generator (showing local branches since -r isn't there):

Screenshot 2025-02-09 at 8 55 37 am

Limitations:

Part of #239519
Fixes #240131

@Tyriar Tyriar added this to the February 2025 milestone Feb 9, 2025
@Tyriar Tyriar self-assigned this Feb 9, 2025
meganrogge
meganrogge previously approved these changes Feb 10, 2025
Copy link
Contributor

@meganrogge meganrogge left a comment

Choose a reason for hiding this comment

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

Nice 👍🏼

@Tyriar Tyriar dismissed meganrogge’s stale review February 10, 2025 14:35

The merge-base changed after approval.

@Tyriar Tyriar marked this pull request as ready for review February 10, 2025 14:56
@Tyriar Tyriar requested a review from meganrogge February 10, 2025 14:56
meganrogge
meganrogge previously approved these changes Feb 10, 2025
meganrogge
meganrogge previously approved these changes Feb 10, 2025
@meganrogge
Copy link
Contributor

Tests failing for valid reasons

for (const command of availableCommands) {
if (!labels.has(command.label)) {
items.push(createCompletionItem(terminalContext.cursorPosition, prefix, command, command.detail));
} else {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we want it how it was before? Otherwise, it's possible that result had no items, neither files nor folders were requested, and we won't change that.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good call, that's why the tests failed too 👍

@meganrogge
Copy link
Contributor

meganrogge commented Feb 10, 2025

The cause: 015b23f

@Tyriar Tyriar disabled auto-merge February 10, 2025 21:08
@Tyriar Tyriar enabled auto-merge February 10, 2025 21:49
@Tyriar Tyriar merged commit 52efdd7 into main Feb 10, 2025
8 checks passed
@Tyriar Tyriar deleted the tyriar/239515__fig_generators branch February 10, 2025 22:20
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Mar 27, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Terminal suggest: Generator runs on cwd of VS Code, not terminal

3 participants