Team chat
A channel conversation with inline @people and #issue mentions, a message composer, and message actions on right-click or a visible menu button.
bunx --bun @getweini/cli@latest add action-surface avatar button composer icon-button kbd mention-textCustomize
- Messages are plain text plus mention ranges. `MentionText` renders each range as a styled inline reference, and the Composer returns the same `{ text, mentions, files }` shape on send, so what you store is what you render. The block appends the sent message locally and emits `send`; replace that with your API call.
- Mention sources live in `mentionSources`: type `@` for people and `#` for issues. Offsets are UTF-16 indices, so the small `message()` helper finds them for you in the mock data. Give entities an `href` to turn a mention into a link.
- ActionSurface defines each action once. The channel provider feeds the command palette (⌘K or Ctrl+K, or the header button); every message has its own provider for a context menu on right-click, long press, or Shift+F10, plus a visible menu button that opens the same actions in a bottom sheet for touch. Listen to `action` to run them.
- Pass `sending` while a message posts so the send button shows progress and blocks a second send. Attachments are collected by the Composer, and uploading them is yours.
- Every visible string is in the `copy` prop, including the palette and sheet message objects. Label the composer with `composerLabel` so assistive technology announces the channel.