mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-12-18 22:21:32 +08:00
Allow smart cells to reevaluate automatically
This commit is contained in:
parent
b2bcc064fa
commit
cb0546f901
3 changed files with 5 additions and 1 deletions
|
|
@ -15,6 +15,7 @@ defmodule Livebook.Notebook.Cell.Smart do
|
||||||
:source,
|
:source,
|
||||||
:chunks,
|
:chunks,
|
||||||
:outputs,
|
:outputs,
|
||||||
|
:reevaluate_automatically,
|
||||||
:kind,
|
:kind,
|
||||||
:attrs,
|
:attrs,
|
||||||
:js_view,
|
:js_view,
|
||||||
|
|
@ -29,6 +30,7 @@ defmodule Livebook.Notebook.Cell.Smart do
|
||||||
source: String.t() | :__pruned__,
|
source: String.t() | :__pruned__,
|
||||||
chunks: Livebook.Runtime.chunks() | nil,
|
chunks: Livebook.Runtime.chunks() | nil,
|
||||||
outputs: list(Cell.indexed_output()),
|
outputs: list(Cell.indexed_output()),
|
||||||
|
reevaluate_automatically: boolean(),
|
||||||
kind: String.t() | nil,
|
kind: String.t() | nil,
|
||||||
attrs: attrs() | :__pruned__,
|
attrs: attrs() | :__pruned__,
|
||||||
js_view: Livebook.Runtime.js_view() | nil,
|
js_view: Livebook.Runtime.js_view() | nil,
|
||||||
|
|
@ -47,6 +49,7 @@ defmodule Livebook.Notebook.Cell.Smart do
|
||||||
source: "",
|
source: "",
|
||||||
chunks: nil,
|
chunks: nil,
|
||||||
outputs: [],
|
outputs: [],
|
||||||
|
reevaluate_automatically: false,
|
||||||
kind: nil,
|
kind: nil,
|
||||||
attrs: %{},
|
attrs: %{},
|
||||||
js_view: nil,
|
js_view: nil,
|
||||||
|
|
|
||||||
|
|
@ -1978,6 +1978,7 @@ defmodule LivebookWeb.SessionLive do
|
||||||
type: :smart,
|
type: :smart,
|
||||||
empty: cell.source == "",
|
empty: cell.source == "",
|
||||||
eval: eval_info_to_view(cell, info.eval, data, changed_input_ids),
|
eval: eval_info_to_view(cell, info.eval, data, changed_input_ids),
|
||||||
|
reevaluate_automatically: cell.reevaluate_automatically,
|
||||||
status: info.status,
|
status: info.status,
|
||||||
js_view: cell.js_view,
|
js_view: cell.js_view,
|
||||||
editor:
|
editor:
|
||||||
|
|
|
||||||
|
|
@ -249,7 +249,7 @@ defmodule LivebookWeb.SessionLive.CellComponent do
|
||||||
cell_id={@cell_view.id}
|
cell_id={@cell_view.id}
|
||||||
validity={@cell_view.eval.validity}
|
validity={@cell_view.eval.validity}
|
||||||
status={@cell_view.eval.status}
|
status={@cell_view.eval.status}
|
||||||
reevaluate_automatically={false}
|
reevaluate_automatically={@cell_view.reevaluate_automatically}
|
||||||
reevaluates_automatically={@cell_view.eval.reevaluates_automatically}
|
reevaluates_automatically={@cell_view.eval.reevaluates_automatically}
|
||||||
/>
|
/>
|
||||||
</:primary>
|
</:primary>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue