mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-03 07:03:18 +00:00
A plugin registers a component with addComposerItem and reads and changes the composer through useComposer(): provider, model, mode, thinking, options, prompt, attachments and agent metadata. The agent, draft and New workspace composers provide the same ComposerInput and ComposerAgent halves, so a command reaches the right model without the plugin knowing which composer it sits in. Toggle, Select and Action are drawn by one ComposerControl renderer that the thinking select and provider option controls now use too. Controls sit in the toolbar when there is room and become rows in the existing overflow sheet otherwise, so on a phone they appear in the overflow. Plugin items count in the density presence so the composer condenses to make room. Model and mode stay specialized but share the trigger, density and overflow. Draft metadata is kept locally, sent at creation and reset when the prompt is sent. PluginAgentSnapshot.metadata, deferred from the metadata phase, lands here. The unused provider badge is removed. vitest resolves @floating-ui/react-native to its ESM build: the CJS entry requires the real react-native, whose Flow sources do not parse.
Composer controls
Install this directory as a plugin and open the agent, draft, or New workspace composer. Three 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. |
| 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 holds the three components; index.client.tsx
registers them with addComposerItem.