You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: codeflash/lsp/lsp_message.py
+4-5Lines changed: 4 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,9 @@
10
10
json_primitive_types= (str, float, int, bool)
11
11
max_code_lines_before_collapse=45
12
12
13
+
# \u241F is the message delimiter becuase it can be more than one message sent over the same message, so we need something to separate each message
14
+
message_delimiter="\u241f"
15
+
13
16
14
17
@dataclass
15
18
classLspMessage:
@@ -32,12 +35,8 @@ def type(self) -> str:
32
35
33
36
defserialize(self) ->str:
34
37
data=self._loop_through(asdict(self))
35
-
# Important: keep type as the first key, for making it easy and fast for the client to know if this is a lsp message before parsing it
36
38
ordered= {"type": self.type(), **data}
37
-
return (
38
-
json.dumps(ordered)
39
-
+"\u241f"# \u241F is the message delimiter becuase it can be more than one message sent over the same message, so we need something to separate each message
0 commit comments