Skip to content

Conversation

constewart9
Copy link

@constewart9 constewart9 commented Aug 5, 2025

Problem

In large workspaces, indexing can take a long time with no indication of status. Also, the "Pin Context" button does not appear until after indexing is complete.

Solution

The "Pin Context" is triggered immediately on startup by sending a file, folder, code, and workspace placeholder set to pending (aws/mynah-ui#421). Then, files/folders, code, and workspace are updated to active once their respective indexing processes are complete.

Should be merged after (first) aws/language-server-runtimes#652 and aws/mynah-ui#421

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@@ -152,10 +168,12 @@ export class ContextCommandsProvider implements Disposable {
icon: 'image',
placeholder: 'Select an image file',
}
const workspaceCmd = {

const workspaceCmd: ContextCommand = {
Copy link
Author

Choose a reason for hiding this comment

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

I am not sure why workspaceCmd was not a ContextCommand before. I think it was handled fine by duck typing but this change would bring better type safety. Can revert back if not necessary for this project

@constewart9 constewart9 requested a review from manodnyab August 7, 2025 20:07
@@ -24,12 +28,27 @@ export class ContextCommandsProvider implements Disposable {
)
}

onReady() {
if (!this.initialStateSent) {
this.initialStateSent = true
Copy link
Contributor

Choose a reason for hiding this comment

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

can we add a comment on why this flag is required

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.

2 participants