From 6ecd4483f8f306cd341f8a1da4b96793ab0a0943 Mon Sep 17 00:00:00 2001 From: shatfield4 Date: Mon, 9 Jun 2025 17:32:38 -0700 Subject: [PATCH 01/20] implement ui for publish system prompt to hub --- frontend/src/index.css | 2 + .../PublishPromptModal/index.jsx | 169 ++++++++++++++++++ .../ChatSettings/ChatPromptSettings/index.jsx | 32 +++- frontend/tailwind.config.js | 1 + 4 files changed, 196 insertions(+), 8 deletions(-) create mode 100644 frontend/src/pages/WorkspaceSettings/ChatSettings/ChatPromptSettings/PublishPromptModal/index.jsx diff --git a/frontend/src/index.css b/frontend/src/index.css index a971f91eaf3..8c4ff7e1aac 100644 --- a/frontend/src/index.css +++ b/frontend/src/index.css @@ -17,6 +17,7 @@ --theme-bg-chat-input: #27282a; --theme-text-primary: #ffffff; --theme-text-secondary: rgba(255, 255, 255, 0.6); + --theme-placeholder: #57585a; --theme-sidebar-item-default: rgba(255, 255, 255, 0.1); --theme-sidebar-item-selected: rgba(255, 255, 255, 0.3); --theme-sidebar-item-hover: #3f3f42; @@ -116,6 +117,7 @@ --theme-bg-chat-input: #eaeaea; --theme-text-primary: #0e0f0f; --theme-text-secondary: #7a7d7e; + --theme-placeholder: #9ca3af; --theme-sidebar-item-default: #ffffff; --theme-sidebar-item-selected: #ffffff; --theme-sidebar-item-hover: #c8efff; diff --git a/frontend/src/pages/WorkspaceSettings/ChatSettings/ChatPromptSettings/PublishPromptModal/index.jsx b/frontend/src/pages/WorkspaceSettings/ChatSettings/ChatPromptSettings/PublishPromptModal/index.jsx new file mode 100644 index 00000000000..ae3eb68d573 --- /dev/null +++ b/frontend/src/pages/WorkspaceSettings/ChatSettings/ChatPromptSettings/PublishPromptModal/index.jsx @@ -0,0 +1,169 @@ +import { useState } from "react"; +import { X } from "@phosphor-icons/react"; + +export default function PublishPromptModal({ show, onClose, currentPrompt }) { + const [formData, setFormData] = useState({ + name: "", + description: "", + prompt: currentPrompt || "", + tags: "", + visibility: "public", + }); + + if (!show) return null; + + const handleSubmit = (e) => { + e.preventDefault(); + onClose(); + }; + + return ( +
+
+
+
+

+ Publish System Prompt +

+
+ +
+ +
+
+
+ +
+ This is the display name of your system prompt. +
+ + setFormData({ ...formData, name: e.target.value }) + } + className="w-full bg-theme-bg-secondary rounded-lg p-2 text-white text-sm focus:outline-primary-button active:outline-primary-button outline-none placeholder:text-theme-text-placeholder" + /> +
+ +
+ +
+ This is the description of your system prompt. Use this to + describe the purpose of your system prompt. +
+