Skip to content

feat: add /new to slash command menu for V1 conversations#13599

Merged
hieptl merged 1 commit intoOpenHands:mainfrom
karanjaxyz:feat/slash-command-new-menu
Mar 30, 2026
Merged

feat: add /new to slash command menu for V1 conversations#13599
hieptl merged 1 commit intoOpenHands:mainfrom
karanjaxyz:feat/slash-command-new-menu

Conversation

@karanjaxyz
Copy link
Copy Markdown
Contributor

Summary of PR

Add /new to the GUI slash command menu so users can discover it alongside other slash commands, instead of only learning about it through docs or release notes.

Changes are confined to frontend/src/hooks/chat/use-slash-command.ts:

  • Define a BUILT_IN_COMMANDS array with /new as a standard SlashCommandItem
  • Gate it behind V1 conversations via useActiveConversation
  • Merge built-in commands into the existing slashItems memo

No changes to types, the menu component, or the /new handler in chat-interface.tsx.

Demo Screenshots/Videos

slash-command-menu

Change Type

  • Bug fix
  • New feature
  • Breaking change
  • Refactor
  • Other (dependency update, docs, typo fixes, etc.)

Checklist

  • I have read and reviewed the code and I understand what the code is doing.
  • I have tested the code to the best of my ability and ensured it works as expected.

Fixes

Resolves #12847

Release Notes

  • Include this change in the Release Notes.

The /new slash command now appears in the slash command menu for V1 conversations, making it easier to discover. Selecting it inserts /new into the chat input, which creates a new conversation while preserving the existing runtime/sandbox.

@jpelletier1 jpelletier1 linked an issue Mar 26, 2026 that may be closed by this pull request
Copy link
Copy Markdown
Collaborator

@hieptl hieptl left a comment

Choose a reason for hiding this comment

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

Hello @karanjaxyz,

Thank you for creating this pull request!

Could you please add tests to cover the front-end changes?

Thank you very much! 🙏

}

/** Built-in slash commands surfaced in the menu for V1 conversations. */
const BUILT_IN_COMMANDS: SlashCommandItem[] = [
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

suggestion (blocking): Could you please move this into the constants.ts file?

Thank you! 🙏

@hieptl
Copy link
Copy Markdown
Collaborator

hieptl commented Mar 27, 2026

Hello @karanjaxyz,

While testing the changes locally, I came across an issue:

Issue (blocking):

  • Step 1: Create a new conversation.
  • Step 2: Type /. The /new command appears first, and the remaining commands are displayed a few seconds later, resulting in inconsistent behavior.

Expected behavior:

  • The full list of commands should be displayed immediately upon typing /.

Please refer to the video below for more details.

issue.mov

Thank you very much! 🙏

@Colt1831
Copy link
Copy Markdown

Hi, I’d like to work on this issue. Can you confirm it’s still available?

@karanjaxyz
Copy link
Copy Markdown
Contributor Author

A fix is in the works

@Colt1831
Copy link
Copy Markdown

want to contribute on this.

@karanjaxyz karanjaxyz force-pushed the feat/slash-command-new-menu branch from 5d372a7 to 1d253f3 Compare March 30, 2026 07:54
@karanjaxyz karanjaxyz force-pushed the feat/slash-command-new-menu branch from ab5b0f3 to bd3d202 Compare March 30, 2026 08:18
@karanjaxyz
Copy link
Copy Markdown
Contributor Author

Hi @hieptl

  • added frontend tests
  • ensured the built in skills load at the same time as other skills, removing the staggered menu bug

Copy link
Copy Markdown
Collaborator

@hieptl hieptl left a comment

Choose a reason for hiding this comment

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

Hello @karanjaxyz,

Thank you for creating this pull request!

I have reviewed, approved, and merged it. Great work—much appreciated.

Thank you very much! 🙏

@hieptl hieptl merged commit c210d52 into OpenHands:main Mar 30, 2026
22 checks passed
@mamoodi mamoodi added the release:cloud-1.19.0 Included in release 1.19.0 label Mar 30, 2026 — with OpenHands AI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release:cloud-1.19.0 Included in release 1.19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Add /new to the GUI slash command menu

4 participants