Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate with fig's generator code #240135

Merged
merged 10 commits into from
Feb 10, 2025
Merged

Integrate with fig's generator code #240135

merged 10 commits into from
Feb 10, 2025

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
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.

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