-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmessages.ts
82 lines (68 loc) · 2.26 KB
/
messages.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
import { GrMLDataSet } from "./datasets/datasets";
export abstract class VSCMessage {
constructor (public command: string) { }
}
export class GrMLVSCAppReadyMessage extends VSCMessage {
public static COMMAND = 'grml-vsc-app-ready';
constructor () {
super(GrMLVSCAppReadyMessage.COMMAND);
}
}
export class GrMLVSCSendModelMessage extends VSCMessage {
public static COMMAND = 'grml-vsc-send-model';
constructor (public model: any) {
super(GrMLVSCSendModelMessage.COMMAND);
}
}
export class GrMLVSCModelChangedMessage extends VSCMessage {
public static COMMAND = 'grml-vsc-model-changed';
constructor (public model: any) {
super(GrMLVSCModelChangedMessage.COMMAND);
}
}
export enum GrMLLogLevel {
LOG,
ERROR,
}
export class GrMLVSCLogMessage extends VSCMessage {
public static COMMAND = 'grml-vsc-log-message';
constructor (public messages: string[], public level: GrMLLogLevel = GrMLLogLevel.LOG) {
super(GrMLVSCLogMessage.COMMAND);
}
}
export class GrMLVSCDataSetRequestMessage extends VSCMessage {
public static COMMAND = 'dataset-request';
constructor (public type: GrMLDataSet) {
super(GrMLVSCDataSetRequestMessage.COMMAND);
}
}
export class GrMLVSCDataSeResponsetMessage extends VSCMessage {
public static COMMAND = 'dataset-response';
constructor (public type: GrMLDataSet, public dataset: any) {
super(GrMLVSCDataSeResponsetMessage.COMMAND);
}
}
export class GrMLVSCDataSePartialResponsetMessage extends VSCMessage {
public static COMMAND = 'dataset-response-part';
constructor (public type: GrMLDataSet, public dataset: any, public offset: number) {
super(GrMLVSCDataSePartialResponsetMessage.COMMAND);
}
}
export class GrMLVSCPersistentLogMessage extends VSCMessage {
public static COMMAND = 'log-persistent';
constructor (public message: string) {
super(GrMLVSCPersistentLogMessage.COMMAND);
}
}
export class GrMLVSCExecuteCodeRequestMessage extends VSCMessage {
public static COMMAND = 'kernel-execute-code-request';
constructor (public code: string) {
super(GrMLVSCExecuteCodeRequestMessage.COMMAND);
}
}
export class GrMLVSCKernelIdleMessage extends VSCMessage {
public static COMMAND = 'kernel-idle';
constructor (public status: string) {
super(GrMLVSCKernelIdleMessage.COMMAND);
}
}