30 lines
1.4 KiB
Markdown
30 lines
1.4 KiB
Markdown
---
|
|
description: List carts, show the active one, or switch carts in-process
|
|
---
|
|
|
|
The user invoked `/cart` with argument: `$ARGUMENTS`
|
|
|
|
Handle it as follows, calling tools directly and reporting back tersely:
|
|
|
|
- **Empty / `list` / `ls`** → call `cart_list` and `cart_info`. Render a compact
|
|
table with columns: `slug`, `name`, `voice` (or `-`), `version`, `★` (mark the current one).
|
|
Append a one-line totals summary.
|
|
|
|
- **`current` / `active` / `?`** → call `cart_info` and report just `slug` + `name`
|
|
(and `voice` if set). One line.
|
|
|
|
- **`main` / `eems` / `base`** → call `cart_load` with no `slug` argument. Confirm
|
|
the swap by echoing the returned `slug`, `name`, and `path`. One line.
|
|
|
|
- **Anything else** → treat as a cart slug. Call `cart_load` with `tag="$ARGUMENTS"`.
|
|
On success, echo the new active `slug` + `name` + `path` (one line). On error (typo, cart
|
|
not found), surface the error string verbatim and suggest `/cart list`.
|
|
|
|
Rules:
|
|
- Don't narrate ("I'll now..."). Just call tools and report.
|
|
- No more than 6 lines of output total (table can exceed if many carts).
|
|
- Don't call any other tools — cart ops only.
|
|
- Remember: this is an **in-process** swap. opencode chat history is shared across carts;
|
|
only EEMS data is isolated. Don't restate this every time — only mention it if the user
|
|
switches into a different cart for the first time in this session.
|