Skip to content

Commit 6f7e7cc

Browse files
committed
Re-implement indicator when running registered editor commands
1 parent 18c38d1 commit 6f7e7cc

File tree

1 file changed

+3
-16
lines changed

1 file changed

+3
-16
lines changed

src/features/Console.ts

+3-16
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { LanguageClientConsumer } from "../languageClientConsumer";
1414
export const EvaluateRequestType = new RequestType<IEvaluateRequestArguments, void, void>("evaluate");
1515
export const OutputNotificationType = new NotificationType<IOutputNotificationBody>("output");
1616
export const ExecutionStatusChangedNotificationType =
17-
new NotificationType<IExecutionStatusDetails>("powerShell/executionStatusChanged");
17+
new NotificationType<ExecutionStatus>("powerShell/executionStatusChanged");
1818

1919
export const ShowChoicePromptRequestType =
2020
new RequestType<IShowChoicePromptRequestArgs,
@@ -33,12 +33,6 @@ export interface IOutputNotificationBody {
3333
output: string;
3434
}
3535

36-
interface IExecutionStatusDetails {
37-
executionOptions: IExecutionOptions;
38-
executionStatus: ExecutionStatus;
39-
hadErrors: boolean;
40-
}
41-
4236
interface IChoiceDetails {
4337
label: string;
4438
helpMessage: string;
@@ -75,13 +69,6 @@ enum ExecutionStatus {
7569
Completed,
7670
}
7771

78-
interface IExecutionOptions {
79-
writeOutputToHost: boolean;
80-
writeErrorsToHost: boolean;
81-
addToHistory: boolean;
82-
interruptCommandPrompt: boolean;
83-
}
84-
8572
function showChoicePrompt(
8673
promptDetails: IShowChoicePromptRequestArgs,
8774
client: LanguageClient): Thenable<IShowChoicePromptResponseBody> {
@@ -257,12 +244,12 @@ export class ConsoleFeature extends LanguageClientConsumer {
257244
ShowInputPromptRequestType,
258245
(promptDetails) => showInputPrompt(promptDetails)),
259246

260-
// TODO: We're not receiving these events from the server any more.
261247
// Set up status bar alerts for when PowerShell is executing a script.
262248
this.languageClient.onNotification(
263249
ExecutionStatusChangedNotificationType,
264250
(executionStatusDetails) => {
265-
switch (executionStatusDetails.executionStatus) {
251+
switch (executionStatusDetails) {
252+
// TODO: Use the new language status bar item.
266253
// If execution has changed to running, make a notification
267254
case ExecutionStatus.Running:
268255
this.showExecutionStatus("PowerShell");

0 commit comments

Comments
 (0)