Open source Grok Bot alternative, Bring your own agent and subscription: message Claude Code, Codex, Gemini CLI, Cursor, Copilot and 40+ AI agents as bots on your own computer, from iPhone, Mac, Windows, Linux or terminal. Agent-agnostic and free. Also a Muse and Dots alternative. Built in Rust.
Rust acpagent-client-protocolai-agentsai-assistantclaudeclaude-codecodexcoding-agentscursorgeminigemini-cligrok-bot-alternativeiosiphonelinuxmacosmcpopen-sourcerustself-hosted
fix(desktop): send with Return once the caret leaves the @ or / being typed
leepokai7e39688b6de1
diff --git a/apps/desktop/e2e/command-menu.spec.ts b/apps/desktop/e2e/command-menu.spec.tsindex 305be008..4422f43b 100644--- a/apps/desktop/e2e/command-menu.spec.ts+++ b/apps/desktop/e2e/command-menu.spec.ts@@ -36,6 +36,12 @@ test('typing / lists the bot\'s commands, and the keyboard moves, picks and hideawait field.press('ArrowUp')await expect(rows.nth(1)).toHaveAttribute('aria-selected', 'true')+ // Off the end of the draft, they move the caret and leave the highlight.+ await field.press('Home')+ await field.press('ArrowDown')+ await expect(rows.nth(1)).toHaveAttribute('aria-selected', 'true')+ await field.press('End')+// Return fills in the skill and sends nothing.await field.press('Enter')await expect(field).toHaveValue(`/${skill.id} `)diff --git a/apps/desktop/e2e/mention-menu.spec.ts b/apps/desktop/e2e/mention-menu.spec.tsindex a61a3e41..2b46fc57 100644--- a/apps/desktop/e2e/mention-menu.spec.ts+++ b/apps/desktop/e2e/mention-menu.spec.ts@@ -82,6 +82,38 @@ test('typing @ in a group lists its members one per row, and the keyboard or theawait field.press('Tab')await expect(field).toHaveValue(`hello @${alpha} `)+ // Off the `@partial` (caret moved away, or text selected), the keys edit the draft and Return sends.+ await field.fill('hello @')+ await expect(rows).toHaveCount(2)+ await field.press('Home')+ await field.press('ArrowDown')+ await expect(rows.nth(0)).toHaveAttribute('aria-selected', 'true')+ await field.press('Home')+ await field.press('Enter')+ await expect(field).toHaveValue('')+ await expect.poll(() => sent(page, groupId)).toBe(2)+ await field.fill('hello @alp')+ await expect(rows).toHaveCount(1)+ await field.press('Shift+ArrowLeft')+ await field.press('Enter')+ await expect(field).toHaveValue('')+ await expect.poll(() => sent(page, groupId)).toBe(3)++ // Escape there still hides the list first, and keeps the reply being written.+ const message = page.locator('.message.user').last()+ await message.hover()+ await message.getByRole('button', { name: 'Reply' }).click()+ const quote = page.locator('.composer-reply')+ await expect(quote).toBeVisible()+ await field.fill('see @')+ await expect(rows).toHaveCount(2)+ await field.press('Home')+ await field.press('Escape')+ await expect(list).toHaveCount(0)+ await expect(quote).toBeVisible()+ await field.press('Escape')+ await expect(quote).toHaveCount(0)+// An input method's Return confirms its candidate, not a member.await field.fill('@')await expect(rows).toHaveCount(2)diff --git a/apps/desktop/src/renderer/views/thread/ComposerMenu.tsx b/apps/desktop/src/renderer/views/thread/ComposerMenu.tsxindex a27d446f..036ac88d 100644--- a/apps/desktop/src/renderer/views/thread/ComposerMenu.tsx+++ b/apps/desktop/src/renderer/views/thread/ComposerMenu.tsx@@ -17,6 +17,8 @@ interface ComposerMenuState<T> {/*** The highlight and keys of a list above the box (`/` commands, `@` members): ↑/↓ move, Tab or Return picks,* Escape hides the list until the draft changes. `returnPicks` lets Return fall through to sending for a row.+ * Both lists are for the query at the end of the draft, so with the caret elsewhere or text selected+ * every key but Escape edits the draft and Return sends.*/export function useComposerMenu<T>(draft: string, items: T[], pick: (item: T) => void, returnPicks: (item: T, draft: string) => boolean = () => true) {const [highlight, setHighlight] = useState({ draft: '', index: 0 })@@ -26,9 +28,11 @@ export function useComposerMenu<T>(draft: string, items: T[], pick: (item: T) =>const index = highlight.draft === draft ? Math.min(highlight.index, shown.length - 1) : 0/** Handles a key in the field while the list is up; returns whether it did. */- const onKey = (e: KeyboardEvent, composing: boolean): boolean => {+ const onKey = (e: KeyboardEvent<HTMLTextAreaElement>, composing: boolean): boolean => {const picked = shown[index]if (!picked || composing || e.altKey || e.metaKey || e.ctrlKey) return false+ const { selectionStart, selectionEnd } = e.currentTarget+ if ((selectionStart !== draft.length || selectionEnd !== draft.length) && e.key !== 'Escape') return falseconst step = e.key === 'ArrowDown' ? 1 : e.key === 'ArrowUp' ? -1 : 0const picks = (e.key === 'Tab' && !e.shiftKey) || (e.key === 'Enter' && !e.shiftKey && returnPicks(picked, draft))if (!step && !picks && e.key !== 'Escape') return falsediff --git a/docs/features/groups-and-replies.md b/docs/features/groups-and-replies.mdindex 641b6594..3bc7bf64 100644--- a/docs/features/groups-and-replies.md+++ b/docs/features/groups-and-replies.md@@ -51,11 +51,11 @@ quotes itself.a member's message counts like `@`-mentioning it.- Typing `@` lists the group's members above the box, filtered by what follows it: each row showsthe face, name and description, in the same list as the `/` commands- ([marketplace](marketplace.md#commands)). On the desktop ↑/↓ move the highlight, Tab or Return- picks it, and Escape hides the list until the draft changes; on the phones a tap picks. A- member's full name and its space end the list, so the next Return sends, and Return on a whole- `@all` / `@everyone` sends, since the list doesn't offer them. The terminal has no `@` list: you- type the name.+ ([marketplace](marketplace.md#commands)). On the desktop, with the caret at the end of the+ draft, ↑/↓ move the highlight and Tab or Return picks it, and Escape hides the list until the+ draft changes; on the phones a tap picks. A member's full name and its space end the list, so+ the next Return sends, and Return on a whole `@all` / `@everyone` sends, since the list doesn't+ offer them. The terminal has no `@` list: you type the name.- Who answers a later round: only the members another member @-mentioned in this room turn(a member's `@all` / `@everyone`: all the others) and who haven't spoken or been asked since(one that passed after seeing the mention isn't asked again). Nobody named,diff --git a/docs/features/marketplace.md b/docs/features/marketplace.mdindex b375aae0..cfef2ac4 100644--- a/docs/features/marketplace.md+++ b/docs/features/marketplace.md@@ -74,7 +74,7 @@ Hermes keeps its own memory, on by default: `MEMORY.md` and `USER.md` in `~/.her## Commands-Typing `/` at the start of a message to a bot (desktop, iPhone, Android, terminal) lists that bot's commands, filtered by what follows the `/` (a command's name or title): the built-in ones first, then the skills the bot has on. A group chat lists its members' commands the same way: Fast mode for every member that offers it (on once all of them are; picking it turns each member's own Fast mode on or back off, so it also applies in their own chats), then every skill one of them has on. A `/skill …` message in a group reaches each member that has the skill on as "read this skill first"; the others read it as typed. Each row shows an icon, the title and what it does. The list floats above the box on the desktop (↑/↓ move the highlight, Tab or Return picks it, Escape hides the list until the draft changes, hover and click work too), sits inline above the box on the iPhone (a tap picks; it isn't a menu, so the system-menu rule doesn't apply), and is the highlighted list over the transcript in the terminal (↑/↓, Tab or ↵).+Typing `/` at the start of a message to a bot (desktop, iPhone, Android, terminal) lists that bot's commands, filtered by what follows the `/` (a command's name or title): the built-in ones first, then the skills the bot has on. A group chat lists its members' commands the same way: Fast mode for every member that offers it (on once all of them are; picking it turns each member's own Fast mode on or back off, so it also applies in their own chats), then every skill one of them has on. A `/skill …` message in a group reaches each member that has the skill on as "read this skill first"; the others read it as typed. Each row shows an icon, the title and what it does. The list floats above the box on the desktop (with the caret at the end of the draft ↑/↓ move the highlight and Tab or Return picks it, Escape hides the list until the draft changes, hover and click work too), sits inline above the box on the iPhone (a tap picks; it isn't a menu, so the system-menu rule doesn't apply), and is the highlighted list over the transcript in the terminal (↑/↓, Tab or ↵).| Command | Title | Does || --- | --- | --- |