Skip to content

Commit 2d16f28

Browse files
committed
Use frontend_params again
1 parent 43d74e9 commit 2d16f28

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

julia-runtime/run.jl

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -145,30 +145,28 @@ command_task = Pluto.@asynclog while true
145145
type = get(new_command, "type", "")
146146
detail = get(new_command, "detail", Dict())
147147

148-
vscode_proxy_root = let
149-
s = get(detail, "vscode_proxy_root", "not given")
150-
if isempty(s) || endswith(s, "/")
151-
s
152-
else
153-
s * "/"
154-
end
155-
end
156148

157-
if type == "new"
149+
if type == "open"
158150
editor_html_filename = detail["editor_html_filename"]
159-
nb = Pluto.SessionActions.new(pluto_server_session; notebook_id=UUID(detail["notebook_id"]))
160-
generate_output(nb, editor_html_filename, vscode_proxy_root)
151+
vscode_proxy_root = let
152+
s = get(detail, "vscode_proxy_root", "not given")
153+
if isempty(s) || endswith(s, "/")
154+
s
155+
else
156+
s * "/"
157+
end
158+
end
159+
frontend_params = get(detail, "frontend_params", Dict())
160+
161161

162-
elseif type == "open"
163-
editor_html_filename = detail["editor_html_filename"]
164162
jlpath = joinpath(extensionData.jlfilesroot, detail["jlfile"])
165163
extensionData.textRepresentations[detail["jlfile"]] = detail["text"]
166164
open(jlpath, "w") do f
167165
write(f, detail["text"])
168166
end
169167
nb = Pluto.SessionActions.open(pluto_server_session, jlpath; notebook_id=UUID(detail["notebook_id"]))
170168
filenbmap[detail["jlfile"]] = nb
171-
generate_output(nb, editor_html_filename, vscode_proxy_root)
169+
generate_output(nb, editor_html_filename, vscode_proxy_root, frontend_params)
172170

173171
elseif type == "update"
174172
nb = filenbmap[detail["jlfile"]]

0 commit comments

Comments
 (0)