mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-11-08 05:04:46 +08:00
Fix default chunks info
This commit is contained in:
parent
16d473685a
commit
c0fa414593
2 changed files with 3 additions and 3 deletions
|
|
@ -1109,7 +1109,7 @@ defmodule Livebook.Session do
|
|||
|
||||
case Notebook.fetch_cell_and_section(state.data.notebook, id) do
|
||||
{:ok, cell, _section} ->
|
||||
chunks = info[:chunks] || []
|
||||
chunks = info[:chunks]
|
||||
delta = Livebook.JSInterop.diff(cell.source, info.source)
|
||||
|
||||
operation =
|
||||
|
|
@ -1130,7 +1130,7 @@ defmodule Livebook.Session do
|
|||
def handle_info({:runtime_smart_cell_update, id, attrs, source, info}, state) do
|
||||
case Notebook.fetch_cell_and_section(state.data.notebook, id) do
|
||||
{:ok, cell, _section} ->
|
||||
chunks = info[:chunks] || []
|
||||
chunks = info[:chunks]
|
||||
delta = Livebook.JSInterop.diff(cell.source, source)
|
||||
operation = {:update_smart_cell, @client_id, id, attrs, delta, chunks, info.reevaluate}
|
||||
{:noreply, handle_operation(state, operation)}
|
||||
|
|
|
|||
|
|
@ -692,7 +692,7 @@ defmodule Livebook.SessionTest do
|
|||
delta = Delta.new() |> Delta.retain(7) |> Delta.insert("!")
|
||||
cell_id = smart_cell.id
|
||||
|
||||
assert_receive {:operation, {:smart_cell_started, _, ^cell_id, ^delta, [], %{}, nil}}
|
||||
assert_receive {:operation, {:smart_cell_started, _, ^cell_id, ^delta, nil, %{}, nil}}
|
||||
end
|
||||
|
||||
test "sends an event to the smart cell server when the editor source changes" do
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue