-
Notifications
You must be signed in to change notification settings - Fork 30
Fix unexpected blocking for pwsh command activation #952
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
Merged
Merged
Changes from 13 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
e6926b9
Race terminal shell integration
anthonykim1 f196dd1
Proper disposables
anthonykim1 7aa0d38
onDidWriteTerminalData should live in window.apis.ts for extension
anthonykim1 245df55
remove $ from regex
anthonykim1 f0f4f17
pin vscode version to have new timeout setting from shellIntegration
anthonykim1 ef2c22b
Try to follow core syntax for timeout
anthonykim1 4972322
TODO for post-universe
anthonykim1 1fb26bc
Replace cursorLine -> terminalData
anthonykim1 b4579f3
Debounce detectCommonPromptPattern to 50ms
anthonykim1 a3feed7
Use removeAnsiEscapeCodes and bring back $ in prompt regex
anthonykim1 b3f3359
Don't update vscode engine version
anthonykim1 d6626fb
Potentially save some compute before calculating regex
anthonykim1 dc221fa
Tweak the wording for waitForShellIntegration description
anthonykim1 b7ebab6
Update src/features/terminal/utils.ts
anthonykim1 f64b62c
Rename sleep to timeout for better wording consistency
anthonykim1 2b56b82
add missing [] next to string to make it stringbuilder
anthonykim1 73f3f3c
Try to make SimpleDebounce disposable
anthonykim1 28f5261
make timeout setting more consistent with vscode
anthonykim1 86141c3
Revert "Try to make SimpleDebounce disposable"
anthonykim1 cca8bbb
Make SimpleDebounce disposable
anthonykim1 6b589d5
remove unecessary, make it clean for review
anthonykim1 ff91421
Update src/common/utils/asyncUtils.ts
Tyriar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,9 @@ | ||
| export async function sleep(milliseconds: number) { | ||
| return new Promise<void>((resolve) => setTimeout(resolve, milliseconds)); | ||
| } | ||
|
|
||
| export function timeout(ms: number): Promise<void> { | ||
| return new Promise((resolve) => setTimeout(resolve, ms)); | ||
| } | ||
|
|
||
| // TODO: Advanced timeout from core async: https://github.com/microsoft/vscode-python-environments/issues/953 | ||
anthonykim1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
Tyriar marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| /*--------------------------------------------------------------------------------------------- | ||
| * Copyright (c) Microsoft Corporation. All rights reserved. | ||
| * Licensed under the MIT License. See License.txt in the project root for license information. | ||
| *--------------------------------------------------------------------------------------------*/ | ||
|
|
||
| declare module 'vscode' { | ||
| // https://github.com/microsoft/vscode/issues/78502 | ||
| // | ||
| // This API is still proposed but we don't intent on promoting it to stable due to problems | ||
| // around performance. See #145234 for a more likely API to get stabilized. | ||
|
|
||
| export interface TerminalDataWriteEvent { | ||
| /** | ||
| * The {@link Terminal} for which the data was written. | ||
| */ | ||
| readonly terminal: Terminal; | ||
| /** | ||
| * The data being written. | ||
| */ | ||
| readonly data: string; | ||
| } | ||
|
|
||
| namespace window { | ||
| /** | ||
| * An event which fires when the terminal's child pseudo-device is written to (the shell). | ||
| * In other words, this provides access to the raw data stream from the process running | ||
| * within the terminal, including VT sequences. | ||
| */ | ||
| export const onDidWriteTerminalData: Event<TerminalDataWriteEvent>; | ||
| } | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.