mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-02 22:52:58 +00:00
Draft commands read the state captured at render, so a plugin's
`await setProvider(); await setModel()` acted on a stale provider. The draft
form and options are now plain stores that commands read live, and
`setProvider`/`setModel` reject an unavailable provider or a model the loaded
catalog does not list. Draft `options` include the plugin's pending edits.
Shared composer controls own the pending state and show a rejected command as
an error toast, like the built-in controls. Callback payloads are objects
(`{ value }`, `onPress(event)`) so they can grow without breaking plugins.
The overflow sheet's content portals to the app root and lost the composer's
agent, input, toast and query contexts, so plugin items drew nothing in it.
`useComposerSheetBridge` carries them across.
19 lines
1.3 KiB
Markdown
19 lines
1.3 KiB
Markdown
# Composer controls
|
|
|
|
Install this directory as a plugin and open the agent, draft, or New workspace composer. Four
|
|
controls appear beside the model and thinking controls.
|
|
|
|
| Control | Component | What it does |
|
|
| -------------------- | --------- | ---------------------------------------------------------------------------------------- |
|
|
| **Context length** | `Select` | Saves `composer-controls.contextLength` in the agent's metadata. |
|
|
| **Needs review** | `Toggle` | Sets or clears `composer-controls.needsReview` in the agent's metadata. |
|
|
| **Plan first** | `Toggle` | Sets the provider option `plan_mode` with `composer.setOptions`; enabled for Codex only. |
|
|
| **Insert checklist** | `Action` | Inserts a task list at the cursor through `composer.insertText`. |
|
|
|
|
Each component calls `useComposer()` and uses the same commands in every composer. Paseo draws the
|
|
controls inline when the composer has room and as rows in the composer's overflow sheet when it
|
|
does not, including on a phone.
|
|
|
|
[client/controls.tsx](client/controls.tsx) holds the four components; [index.client.tsx](index.client.tsx)
|
|
registers them with `addComposerItem`.
|