Clear the history
cellucid_history_clear.RdStart the branch "Fresh start" from the opening step with nothing behind it: keeping the state shown (one squashed step from the dataset as opened to it), or from the dataset as opened (the branch starts with the next change). Every branch stays, archivable; either way it is kept in Recently changed and can be undone there.
Arguments
- viewer
A viewer
cellucid_view()orcellucid_serve()returned.- keep_state
True keeps the state shown as one step; false starts over from the dataset as opened.
TRUEorFALSE. Required.
Value
A cellucid_action_request, at once and invisibly: the action is sent now, or when the viewer's channel opens.
cellucid_action_result(request) returns its outcome: a list of branch, head (The step shown now), journal (Its Recently changed entry).
Details
The viewer's action history.clear (History). It moves the viewer's history, as the person's Undo, Redo or a click on a step does: it makes no step of the history.
When an agent (Claude, ChatGPT) runs it, the viewer asks the person first (deletes-saved); from R it is not asked.
See also
cellucid_act() sends any action by its type, and cellucid_action_result()
collects its answer.
Examples
if (interactive() && requireNamespace("SeuratObject", quietly = TRUE)) {
data("pbmc_small", package = "SeuratObject")
viewer <- cellucid_view(SeuratObject::UpdateSeuratObject(pbmc_small))
request <- cellucid_history_clear(viewer, keep_state = TRUE)
print(request)
# cellucid_action_result(request) waits for its outcome.
cellucid_stop(viewer)
}