File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
packages/voila/src/plugins/outputs Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -154,6 +154,10 @@ export const renderOutputsProgressivelyPlugin: JupyterFrontEndPlugin<void> = {
154
154
console . error ( `Execution error: ${ payload . error } ` ) ;
155
155
break ;
156
156
}
157
+ case 'ping' : {
158
+ ws . send ( JSON . stringify ( { action : 'pong' } ) ) ;
159
+ break ;
160
+ }
157
161
default :
158
162
break ;
159
163
}
Original file line number Diff line number Diff line change @@ -27,6 +27,14 @@ export interface IExecutionErrorMessage {
27
27
} ;
28
28
}
29
29
30
+ /**
31
+ * Interface representing the structure of an execution's ping and pong message.
32
+ */
33
+ export interface IExecutionResultPingMessage {
34
+ action : 'ping' ;
35
+ payload : any ;
36
+ }
37
+
30
38
/**
31
39
* Interface representing a received widget model
32
40
* containing output and execution models.
@@ -39,7 +47,8 @@ export interface IReceivedWidgetModel {
39
47
}
40
48
export type IExecutionMessage =
41
49
| IExecutionResultMessage
42
- | IExecutionErrorMessage ;
50
+ | IExecutionErrorMessage
51
+ | IExecutionResultPingMessage ;
43
52
44
53
export function getExecutionURL ( kernelId ?: string ) : string {
45
54
const wsUrl = PageConfig . getWsUrl ( ) ;
You can’t perform that action at this time.
0 commit comments