diff --git a/docs/PLUGINS.md b/docs/PLUGINS.md index bd557e7..60dc698 100644 --- a/docs/PLUGINS.md +++ b/docs/PLUGINS.md @@ -80,7 +80,7 @@ falls back to the one-shot call. `tick()` runs on a thread the host creates and can stop. It may read files, wait on sockets, sleep. It must not assume it is the only thread. -Anything that should appear in the sidebar is published: +What the plugin wants to say is published as a widget line: ```c sp_host_widget_text(host, "mywidget", "42 items"); @@ -102,9 +102,9 @@ static const struct sp_widget w = { sp_host_add_widget(host, &w); ``` -The sidebar lists one line per widget, `name: text`. `draw()` exists for -widgets that need more than one line; it runs on the UI thread and must be -fast, because it holds up every other pane while it runs. +`/widgets` in the chat prints one line per widget, `name: text`. The UI has no +sidebar any more, and `draw()` is not called at all: a widget that wants to say +something publishes text with `tick()`, and that is what `/widgets` shows. ## Threads, honestly @@ -164,7 +164,7 @@ run stays reproducible and costs nothing extra. would go) is computed on the widget's worker thread from an *index* of the conversation — role, size, and 64 bytes of head per message, copied under a mutex. The worker never touches the conversation itself. When the budget is -hit, the main thread splices an already-prepared plan in one pass. Its sidebar +hit, the main thread splices an already-prepared plan in one pass. Its widget line shows `idle (applied N, prepared M)` or `plan ready: cut X/Y, A -> B B`, so "continuous" is visible rather than claimed. @@ -223,7 +223,7 @@ belongs to the conversation in front of you and not to a file that outlives it. It registers as a compactor and, on every fifth turn, inserts one system message — *before* the newest user message, so the model reads goal then request and answers the request. Never twice in one turn, and nothing at all when no -goal is set. The sidebar shows the goal and how many reminders went out. +goal is set. Its widget line shows the goal and how many reminders went out. It is a reminder, not an instruction: the user can change direction at any time, and the message says so on its face.