Skip to content

Commit

Permalink
Remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
brettimus committed Dec 3, 2024
1 parent 1c84cc2 commit 961b315
Showing 1 changed file with 1 addition and 27 deletions.
28 changes: 1 addition & 27 deletions studio/src/pages/RequestorPage/CommandBar/CommandBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,9 @@ import { useRequestorStore } from "../store";
type CommandBarProps = {
open: boolean;
setOpen: (open: boolean) => void;
// onGenerateRequest?: (prompt?: string) => void;
};

export function CommandBar({
open,
setOpen,
// onGenerateRequest,
}: CommandBarProps) {
export function CommandBar({ open, setOpen }: CommandBarProps) {
const { togglePanel, visibleRequestsPanelTabs, setActiveRequestsPanelTab } =
useRequestorStore(
"togglePanel",
Expand All @@ -37,14 +32,6 @@ export function CommandBar({

const [inputValue, setInputValue] = React.useState("");

// const handleGenerateRequest = (currentInput: string) => {
// // Extract any text after "generate" as the prompt
// const prompt = currentInput.replace(/^generate\s*/, "").trim();
// onGenerateRequest?.(prompt.length > 0 ? prompt : undefined);
// setOpen(false);
// setInputValue("");
// };

return (
<Dialog open={open} onOpenChange={setOpen} modal={false}>
<DialogContent className="overflow-hidden p-0 shadow-lg max-w-[500px] mx-auto data-[state=open]:bg-transparent">
Expand All @@ -63,19 +50,6 @@ export function CommandBar({
/>
<CommandList className="max-h-[300px] overflow-y-auto overflow-x-hidden">
<CommandEmpty>No results found.</CommandEmpty>
{/* <CommandGroup heading="Actions" className="py-2">
<CommandItem
className="flex items-center gap-2 px-2 hover:bg-accent rounded-sm cursor-pointer"
onSelect={() => handleGenerateRequest(inputValue)}
>
<MagicWandIcon className="flex-shrink-0" />
<span>Generate Request Data</span>
<span className="text-xs text-muted-foreground ml-auto">
Type additional text for custom prompt
</span>
</CommandItem>
</CommandGroup> */}
{/* <CommandSeparator className="mx-2" /> */}
<CommandGroup heading="Navigation" className="py-2">
<CommandItem
className="flex items-center gap-2 px-2 hover:bg-accent rounded-sm cursor-pointer"
Expand Down

0 comments on commit 961b315

Please sign in to comment.