[GH-ISSUE #7913] [Feature]: Professor Mari - @ references and a / command menu in her composer #4346

Closed
opened 2026-10-22 04:05:52 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @ylli-selmani on GitHub (Oct 20, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/7913

Originally assigned to: @ylli-selmani on GitHub.

What problem does this solve?

Professor Mari's composer can only suggest names. Tab accepts the spelling, and then she has to go and fetch the
thing herself, name-first, through her shell CLI:

mari characters get "Alice" → miss → mari characters list → "oh, that's her name" → mari characters get "Alice in Wonderland"

Three round-trips, three chances to pick the wrong "Alice", for a decision the user already made in their head when
they picked the suggestion. The same dance happens for personas, lorebooks, lorebook entries, presets, connections,
skills and workspace files.

Two other gaps sit next to it: there is no @ (link something into this message) and no / (run a command or pull a
skill in), so nothing in the composer says what can be linked or done. The paperclip menu has three bare rows and no
descriptions.

Proposed solution

Three surfaces over one menu index — every row calls an existing handler or inserts a trigger, so behaviour has one
implementation:

  1. @ references. Type @ (start of line or after whitespace) to open a picker grouped by kind: Characters,
    Personas, Lorebooks, Lorebook entries, Presets, Connections, Skills, Agent packages, Docs, Files. @"quoted" for
    labels with spaces. Tab and Enter accept, arrow keys move, Escape closes. An accepted reference is marked inline in
    the draft (highlighted token) and recorded by id; on send, the server resolves each to the payload Mari would have
    got from her own command, and injects it once, for that message, through the same renderer as the attached
    context (budgeted, delimiters neutralized, framed as user-provided evidence rather than instructions). No
    credentials are ever included — a @connection reference carries provider/model/base-URL host only.

  2. / commands. Opens the same menu, filtered: common composer commands (/new, /history, /skills,
    /memories, /context, /permissions, /model, /approvals, /help) plus skills — built-in (from #7908)
    and user-created — and non-persistent memories, which can be pulled into this turn. Rows carry a chip showing
    whether that skill or memory is disabled, with a subcommand to enable it.

  3. Paperclip as the index. The existing attach control becomes a sectioned menu (Attach / Reference / Mari) with
    a right-aligned one-liner per row, DSH-style. The Reference rows open the @ picker pre-scoped, so the menu
    teaches the trigger.

Payload rule: what the corresponding mari command returns, in full, with a high per-reference and total ceiling
(truncated at N chars — full content via mari characters get <id> when one is hit, never a silent digest).

Alternatives considered

  • Path-only references (DSH-literal). In DSH @ is a path and the agent reads it on demand. Here the
    path-equivalent Mari already has is a name, which is the ambiguous, expensive part — that is the bug, so the id
    has to resolve server-side.
  • Reusing the chat slash-command registry. 1,656 lines of roleplay commands (/roll, /emote, /selfie); wrong
    domain for a workspace assistant.
  • Reusing the chat-scoped attached-context table for @. It re-injects on every later turn, so references would
    accumulate until the budget omitted everything.
  • A rich contenteditable token editor. The composer is a plain textarea with a synced ghost overlay and
    store-backed string drafts; this breaks drafts, IME, paste and mobile focus behaviour.

Additional context

  • Depends on / sequenced after #7908 (built-in skills): the Skills rows, @skill and /skillname should land only
    after that draft PR merges, since they touch the same files. Everything else (characters, personas, lorebooks,
    entries, presets, connections, chats, docs, files, the / actions and the menu restructure) is independent.
  • Design record, with the screenshots and the measured harness mechanics: .tmp/mari-composer-references/.
  • Related: the roleplay composer already sends structured mentionedCharacterNames for @name mentions
    (ConversationInput.tsx); this brings the same idea to the workspace assistant, with ids instead of names.

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @ylli-selmani on GitHub (Oct 20, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/7913 Originally assigned to: @ylli-selmani on GitHub. ## What problem does this solve? Professor Mari's composer can only *suggest* names. Tab accepts the spelling, and then she has to go and fetch the thing herself, name-first, through her shell CLI: > `mari characters get "Alice"` → miss → `mari characters list` → "oh, that's her name" → `mari characters get "Alice in Wonderland"` Three round-trips, three chances to pick the wrong "Alice", for a decision the user already made in their head when they picked the suggestion. The same dance happens for personas, lorebooks, lorebook entries, presets, connections, skills and workspace files. Two other gaps sit next to it: there is no `@` (link something into this message) and no `/` (run a command or pull a skill in), so nothing in the composer says what can be linked or done. The paperclip menu has three bare rows and no descriptions. ## Proposed solution Three surfaces over one menu index — every row calls an existing handler or inserts a trigger, so behaviour has one implementation: 1. **`@` references.** Type `@` (start of line or after whitespace) to open a picker grouped by kind: Characters, Personas, Lorebooks, Lorebook entries, Presets, Connections, Skills, Agent packages, Docs, Files. `@"quoted"` for labels with spaces. Tab and Enter accept, arrow keys move, Escape closes. An accepted reference is marked inline in the draft (highlighted token) and recorded by id; on send, the server resolves each to the payload Mari would have got from her own command, and injects it **once, for that message**, through the same renderer as the attached context (budgeted, delimiters neutralized, framed as user-provided evidence rather than instructions). No credentials are ever included — a `@connection` reference carries provider/model/base-URL host only. 2. **`/` commands.** Opens the same menu, filtered: common composer commands (`/new`, `/history`, `/skills`, `/memories`, `/context`, `/permissions`, `/model`, `/approvals`, `/help`) plus **skills** — built-in (from #7908) and user-created — and non-persistent **memories**, which can be pulled into this turn. Rows carry a chip showing whether that skill or memory is disabled, with a subcommand to enable it. 3. **Paperclip as the index.** The existing attach control becomes a sectioned menu (Attach / Reference / Mari) with a right-aligned one-liner per row, DSH-style. The Reference rows open the `@` picker pre-scoped, so the menu teaches the trigger. Payload rule: what the corresponding `mari` command returns, in full, with a high per-reference and total ceiling (`truncated at N chars — full content via mari characters get <id>` when one is hit, never a silent digest). ## Alternatives considered - **Path-only references (DSH-literal).** In DSH `@` is a path and the agent reads it on demand. Here the path-equivalent Mari already has is a *name*, which is the ambiguous, expensive part — that is the bug, so the id has to resolve server-side. - **Reusing the chat slash-command registry.** 1,656 lines of roleplay commands (`/roll`, `/emote`, `/selfie`); wrong domain for a workspace assistant. - **Reusing the chat-scoped attached-context table for `@`.** It re-injects on every later turn, so references would accumulate until the budget omitted everything. - **A rich contenteditable token editor.** The composer is a plain textarea with a synced ghost overlay and store-backed string drafts; this breaks drafts, IME, paste and mobile focus behaviour. ## Additional context - Depends on / sequenced after #7908 (built-in skills): the Skills rows, `@skill` and `/skillname` should land only after that draft PR merges, since they touch the same files. Everything else (characters, personas, lorebooks, entries, presets, connections, chats, docs, files, the `/` actions and the menu restructure) is independent. - Design record, with the screenshots and the measured harness mechanics: `.tmp/mari-composer-references/`. - Related: the roleplay composer already sends structured `mentionedCharacterNames` for `@name` mentions (`ConversationInput.tsx`); this brings the same idea to the workspace assistant, with ids instead of names. ## Template check - [ ] I DID NOT read this template and provide the requested details.
Author
Owner

@ylli-selmani commented on GitHub (Oct 21, 2026):

i'm doing it

<!-- gh-comment-id:6312839557 --> @ylli-selmani commented on GitHub (Oct 21, 2026): i'm doing it
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#4346
No description provided.