Skip to content

Add slash command menu#5813

Open
wca4a wants to merge 4 commits into
developfrom
feature/slash-command-menu
Open

Add slash command menu#5813
wca4a wants to merge 4 commits into
developfrom
feature/slash-command-menu

Conversation

@wca4a
Copy link
Copy Markdown
Contributor

@wca4a wca4a commented May 1, 2026

Summary

  • Add a slash command popup to BareChatInput, reusing the existing mention popup/list patterns
  • Add filtering, keyboard navigation, escape dismissal, and command insertion
  • Seed the menu with backed OpenClaw/Tlon commands including /owner-listen, /status, /help, /new, approval commands, and /tlon-version

Tests

  • pnpm --filter @tloncorp/app tsc
  • pnpm exec eslint packages/app/ui/components/BareChatInput/index.tsx packages/app/ui/components/BareChatInput/useSlashCommands.tsx packages/app/ui/components/SlashCommandPopup.tsx packages/app/ui/components/MessageInput/MessageInputBase.tsx packages/app/ui/components/MessageInput/InputSlashCommandPopup.tsx
  • pnpm --filter @tloncorp/app test
  • git diff --cached --check && git diff --check

Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.

Tip: disable this comment in your organization's Code Review settings.

@wca4a
Copy link
Copy Markdown
Contributor Author

wca4a commented May 1, 2026

@claude review once

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 83285d1471

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +217 to +219
(cursorPosition === lastSlashIndex + 1 ||
(cursorPosition > lastSlashIndex && !afterCursor.includes(' ')))
) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Treat all whitespace as slash-command terminator

The slash parser only checks afterCursor.includes(' '), so it ignores other whitespace like \n or tabs. In a multiline draft such as /st\nnext, placing the caret before the newline keeps slash mode active because afterCursor has no literal space, which can reopen the popup and route Enter to command selection instead of normal send/edit behavior. This should use a whitespace check (e.g. /\s/) consistent with the rest of the parser.

Useful? React with 👍 / 👎.

Comment thread packages/app/ui/components/BareChatInput/index.tsx
Comment thread packages/app/ui/components/BareChatInput/index.tsx
@jamesacklin
Copy link
Copy Markdown
Member

What does this look like on a mobile device?

@patosullivan
Copy link
Copy Markdown
Member

What does this look like on a mobile device?

Simulator Screenshot - iPhone 15 Pro - 2026-05-05 at 16 16 29

@jamesacklin
Copy link
Copy Markdown
Member

Let's do something about those extra-long helper strings but otherwise looks OK to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants