+
+ {t("CHAT_INTERFACE$COMMANDS")}
+
+ {items.map((item, index) => (
+
{
+ itemRefs.current[index] = el;
+ }}
+ />
+ ))}
+
+ );
+}
diff --git a/frontend/src/components/features/chat/custom-chat-input.tsx b/frontend/src/components/features/chat/custom-chat-input.tsx
index 624457b35b..5fd92fdcd6 100644
--- a/frontend/src/components/features/chat/custom-chat-input.tsx
+++ b/frontend/src/components/features/chat/custom-chat-input.tsx
@@ -5,6 +5,7 @@ import { useFileHandling } from "#/hooks/chat/use-file-handling";
import { useGripResize } from "#/hooks/chat/use-grip-resize";
import { useChatInputEvents } from "#/hooks/chat/use-chat-input-events";
import { useChatSubmission } from "#/hooks/chat/use-chat-submission";
+import { useSlashCommand } from "#/hooks/chat/use-slash-command";
import { ChatInputGrip } from "./components/chat-input-grip";
import { ChatInputContainer } from "./components/chat-input-container";
import { HiddenFileInput } from "./components/hidden-file-input";
@@ -105,6 +106,16 @@ export function CustomChatInput({
onBlur,
);
+ const {
+ isMenuOpen: isSlashMenuOpen,
+ filteredItems: slashItems,
+ selectedIndex: slashSelectedIndex,
+ updateSlashMenu,
+ selectItem: selectSlashItem,
+ handleSlashKeyDown,
+ closeMenu: closeSlashMenu,
+ } = useSlashCommand(chatInputRef as React.RefObject