Pure rules of app attachments: threads, drafts and Send receipts.
An app attachment is a live view with the attachment placement. The engine
and the TUI apply these rules to the same engine-shaped maps, so both paint the
same threads and receipts. Every function here is pure: ids, authors and times
come from the caller.
Pure rules of app attachments: threads, drafts and Send receipts. An app attachment is a live view with the `attachment` placement. The engine and the TUI apply these rules to the same engine-shaped maps, so both paint the same threads and receipts. Every function here is pure: ids, authors and times come from the caller.
(agent-note-error view text)nil when text can be the note of view for the model, otherwise the reason.
Only an app takes a note. A blank text is valid: it removes the note.
nil when `text` can be the note of `view` for the model, otherwise the reason. Only an app takes a note. A blank text is valid: it removes the note.
(app? view)True when view is an app attachment.
True when `view` is an app attachment.
(blank-text? text)True for nil or text with only whitespace.
True for nil or text with only whitespace.
How many receipts, threads, messages, Send values and Send comments an app holds, and the longest texts: a message body, a Send note and the note for the model.
How many receipts, threads, messages, Send values and Send comments an app holds, and the longest texts: a message body, a Send note and the note for the model.
(check-shortcuts view)view when its shortcuts are valid. Otherwise refuses with the reason.
`view` when its shortcuts are valid. Otherwise refuses with the reason.
(draft-op node {:keys [thread-id anchor body]} new-id)The patch operation that saves body as the draft of a thread in node, or
nil when nothing changes. action holds :thread-id, :anchor and :body.
A new thread takes new-id. Blank text removes a draft, and a new blank thread
is never created.
The patch operation that saves `body` as the draft of a thread in `node`, or nil when nothing changes. `action` holds `:thread-id`, `:anchor` and `:body`. A new thread takes `new-id`. Blank text removes a draft, and a new blank thread is never created.
(find-shortcut view k)The shortcut of view that binds key k, or nil.
The shortcut of `view` that binds key `k`, or nil.
(find-submission view submission-id)Receipt submission-id of view, or nil.
Receipt `submission-id` of `view`, or nil.
(find-thread node thread-id)Thread thread-id of node node, or nil.
Thread `thread-id` of node `node`, or nil.
(idempotency-key? k)True when k is a valid idempotency key of a Send.
True when `k` is a valid idempotency key of a Send.
Media type of the attachment row that lists an app.
Media type of the attachment row that lists an app.
Internal placement of an app attachment.
Internal placement of an app attachment.
(post-drafts nodes {:keys [author at submission-id new-id]})Post every saved draft of the thread nodes in nodes as a message. post
holds :author, :at, :submission-id and :new-id, a function that gives
one fresh message id per call. Answers {:ops [...] :comments [...]}.
Post every saved draft of the thread nodes in `nodes` as a message. `post`
holds `:author`, `:at`, `:submission-id` and `:new-id`, a function that gives
one fresh message id per call. Answers `{:ops [...] :comments [...]}`.(remove-threads node thread-ids)Diff node node without the threads in thread-ids. A missing id changes nothing.
Diff node `node` without the threads in `thread-ids`. A missing id changes nothing.
(reply-op node {:keys [thread-id anchor new-thread-id]} message)The patch operation that adds message to a thread of node. Without
:thread-id, a diff starts thread :new-thread-id at :anchor.
The patch operation that adds `message` to a thread of `node`. Without `:thread-id`, a diff starts thread `:new-thread-id` at `:anchor`.
(revision node)The reviewed revision of node node: the new_revision of a diff, else nil.
The reviewed revision of node `node`: the `new_revision` of a diff, else nil.
(set-agent-note view text)App view with text as its note for the model. The model reads the note
with the next user message. A blank text removes the note.
App `view` with `text` as its note for the model. The model reads the note with the next user message. A blank text removes the note.
(set-shortcuts view shortcuts)App view with shortcuts in place of its old list. An empty list removes
every shortcut.
App `view` with `shortcuts` in place of its old list. An empty list removes every shortcut.
Stages after which a receipt no longer changes.
Stages after which a receipt no longer changes.
How many shortcuts an app holds, and the longest label and action id.
How many shortcuts an app holds, and the longest label and action id.
The valid shortcut keys, as one sentence part that a refusal can quote.
The valid shortcut keys, as one sentence part that a refusal can quote.
(shortcut-key? k)True when k is a key that an app shortcut can bind.
True when `k` is a key that an app shortcut can bind.
Named keys that an app shortcut can bind, besides one printable character.
Named keys that an app shortcut can bind, besides one printable character.
(shortcut-shape-error shortcut)nil when shortcut has a valid shape, otherwise the reason. Whether its
node_id exists is the answer of shortcuts-error.
nil when `shortcut` has a valid shape, otherwise the reason. Whether its `node_id` exists is the answer of [[shortcuts-error]].
(shortcuts-error view)nil when the shortcuts of view are valid, otherwise the reason. Only an app
takes shortcuts, each key is bound once, and a node_id shortcut presses a
button or a selectable card of the app.
nil when the shortcuts of `view` are valid, otherwise the reason. Only an app takes shortcuts, each key is bound once, and a `node_id` shortcut presses a button or a selectable card of the app.
(submission-for-key view k)The receipt that idempotency key k made in view, or nil.
The receipt that idempotency key `k` made in `view`, or nil.
Delivery stages of a Send, in order.
Delivery stages of a Send, in order.
(threads node)The threads of node node: every thread of a diff, or the thread node itself.
The threads of node `node`: every thread of a diff, or the thread node itself.
(upsert-submission view submission)View view with receipt submission in place. When the view holds too many
receipts, the oldest settled receipt goes first, then the oldest receipt.
View `view` with receipt `submission` in place. When the view holds too many receipts, the oldest settled receipt goes first, then the oldest receipt.
(upsert-thread node thread)Node node with thread in place. A diff replaces the thread with the same
id or adds it. A thread node takes the messages, draft, anchor and resolution.
Node `node` with `thread` in place. A diff replaces the thread with the same id or adds it. A thread node takes the messages, draft, anchor and resolution.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |