From 64aef6df9ff5c438a5f447847cb2d17b9c78e3da Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Sun, 4 May 2025 18:08:15 +0530 Subject: [PATCH] open config when clicking on editing the prompt --- .../mainInput/Lump/sections/PromptsSection.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/gui/src/components/mainInput/Lump/sections/PromptsSection.tsx b/gui/src/components/mainInput/Lump/sections/PromptsSection.tsx index 25c9abc16..7b679c26e 100644 --- a/gui/src/components/mainInput/Lump/sections/PromptsSection.tsx +++ b/gui/src/components/mainInput/Lump/sections/PromptsSection.tsx @@ -4,6 +4,8 @@ import { } from "@heroicons/react/24/outline"; import { BookmarkIcon as BookmarkSolid } from "@heroicons/react/24/solid"; import { SlashCommandDescription } from "core"; +import { useContext } from "react"; +import { IdeMessengerContext } from "../../../../context/IdeMessenger"; import { useBookmarkedSlashCommands } from "../../../../hooks/useBookmarkedSlashCommands"; import { useAppSelector } from "../../../../redux/hooks"; import { fontSize } from "../../../../util"; @@ -89,14 +91,16 @@ function PromptRow({ */ export function PromptsSection() { const { isCommandBookmarked, toggleBookmark } = useBookmarkedSlashCommands(); + const ideMessenger = useContext(IdeMessengerContext); const slashCommands = useAppSelector( (state) => state.config.config.slashCommands ?? [], ); - const handleEdit = (prompt: any) => { - // Handle edit action here - console.log("Editing prompt:", prompt); + const handleEdit = (_prompt: SlashCommandDescription) => { + ideMessenger.post("config/openProfile", { + profileId: undefined, + }); }; const sortedCommands = [...slashCommands].sort((a, b) => {