Remove unused state variables from useSlashCommands hook to clean up code and improve readability.

This commit is contained in:
angelplusultra
2025-09-22 12:53:09 -07:00
parent 3e85053755
commit 9389a2ff2b

View File

@@ -6,7 +6,6 @@ export function useSlashCommands({ sendCommand }) {
const [showSlashCommand, setShowSlashCommand] = useState(false);
const [highlightedSlashCommand, setHighlightedSlashCommand] = useState(1);
const [slashCommands, setSlashCommands] = useState([]);
// const [qtyOfSlashCommands, setQtyOfSlashCommands] = useState(0);
// Ref to the textarea element, this is needed to apply focus to the textarea when slash commands are triggered by clicking the slash command button
const textareaRef = useRef(null);
@@ -24,7 +23,6 @@ export function useSlashCommands({ sendCommand }) {
const fetchSlashCommands = async () => {
const presets = await System.getSlashCommandPresets();
setSlashCommands(presets);
// setQtyOfSlashCommands(presets.length + 1);
};
useEffect(() => {
@@ -95,8 +93,6 @@ export function useSlashCommands({ sendCommand }) {
setShowSlashCommand,
highlightedSlashCommand,
setHighlightedSlashCommand,
// qtyOfSlashCommands,
// setQtyOfSlashCommands,
watchForSlash,
handleKeyDown,
textareaRef,