Show an informative message on completion when there is no runtime (#316)

This commit is contained in:
Jonatan Kłosko 2021-06-03 19:43:22 +02:00 committed by GitHub
parent f613b2f21e
commit da64f51589
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -514,7 +514,12 @@ defmodule LivebookWeb.SessionLive do
{:reply, %{"completion_ref" => inspect(ref)}, socket} {:reply, %{"completion_ref" => inspect(ref)}, socket}
else else
{:reply, %{"completion_ref" => nil}, socket} {:reply, %{"completion_ref" => nil},
put_flash(
socket,
:info,
"You need to start a runtime (or evaluate a cell) for accurate completion"
)}
end end
else else
_ -> {:noreply, socket} _ -> {:noreply, socket}