From 804edc6490167b8ca886aaeb33887d81f2db5494 Mon Sep 17 00:00:00 2001 From: Nate Date: Fri, 21 Mar 2025 17:53:22 -0700 Subject: [PATCH] prompts section in lump --- .../mainInput/Lump/TopInputToolbar.tsx | 5 +- .../Lump/sections/PromptsSection.tsx | 55 ++++++++++++++++++- 2 files changed, 55 insertions(+), 5 deletions(-) diff --git a/gui/src/components/mainInput/Lump/TopInputToolbar.tsx b/gui/src/components/mainInput/Lump/TopInputToolbar.tsx index a5ca50e51..5175c9507 100644 --- a/gui/src/components/mainInput/Lump/TopInputToolbar.tsx +++ b/gui/src/components/mainInput/Lump/TopInputToolbar.tsx @@ -2,7 +2,6 @@ import { BookOpenIcon, ChatBubbleLeftIcon, CubeIcon, - FolderIcon, PencilIcon, WrenchScrewdriverIcon, } from "@heroicons/react/24/outline"; @@ -110,7 +109,7 @@ export function TopInputToolbar(props: TopInputProps) { ) } /> - + /> */} Prompts content; +import { BookmarkIcon as BookmarkOutline } from "@heroicons/react/24/outline"; +import { BookmarkIcon as BookmarkSolid } from "@heroicons/react/24/solid"; +import { useState } from "react"; +import { useAppSelector } from "../../../../redux/hooks"; +import { getFontSize } from "../../../../util"; + +interface PromptRowProps { + command: string; + description: string; +} + +function PromptRow({ command, description }: PromptRowProps) { + const [isBookmarked, setIsBookmarked] = useState(false); + + return ( +
+
+ {command} + {description} +
+
setIsBookmarked(!isBookmarked)} + className="cursor-pointer" + > + {isBookmarked ? ( + + ) : ( + + )} +
+
+ ); +} + +export function PromptsSection() { + const prompts = useAppSelector((store) => store.config.config.slashCommands); + + return ( +
+ {prompts?.map((prompt) => ( + + ))} +
+ ); }