fix: preserve duplicate slash commands in autocomplete
Show commands with identical names from different sources Add stable command IDs so selection no longer depends on name dedupe Keep command insertion flow working across chat and prompt editors
This commit is contained in:
@@ -13,7 +13,7 @@ import { RiAddLine, RiCloseLine, RiCalendarLine, RiArrowLeftSLine, RiArrowRightS
|
||||
import { ModelSelector } from '@/components/sections/agents/ModelSelector';
|
||||
import { AgentSelector } from '@/components/sections/commands/AgentSelector';
|
||||
import { isPrimaryMode } from '@/components/chat/mobileControlsUtils';
|
||||
import { CommandAutocomplete, type CommandAutocompleteHandle } from '@/components/chat/CommandAutocomplete';
|
||||
import { CommandAutocomplete, type CommandAutocompleteHandle, type CommandInfo } from '@/components/chat/CommandAutocomplete';
|
||||
import { FileMentionAutocomplete, type FileMentionHandle } from '@/components/chat/FileMentionAutocomplete';
|
||||
import { useConfigStore } from '@/stores/useConfigStore';
|
||||
import { useUIStore } from '@/stores/useUIStore';
|
||||
@@ -907,7 +907,7 @@ export function ScheduledTaskEditorDialog(props: {
|
||||
});
|
||||
}, [draft.execution.prompt, setPromptValue, updateAutocompleteState]);
|
||||
|
||||
const handleCommandSelect = React.useCallback((command: { name: string }) => {
|
||||
const handleCommandSelect = React.useCallback((command: CommandInfo) => {
|
||||
const nextPrompt = `/${command.name} `;
|
||||
setPromptValue(nextPrompt);
|
||||
setShowCommandAutocomplete(false);
|
||||
|
||||
Reference in New Issue
Block a user