From 695a8a14d4e419dfe5c649b0cdb3e729ad5a6176 Mon Sep 17 00:00:00 2001 From: Xiaoyun Zhang Date: Sat, 14 Dec 2024 07:42:39 +0900 Subject: [PATCH] add release note 0.0.10 (#123) --- .../components/chat-controlbar.tsx | 23 ++++++++++++ stepwise-studio/components/chat-history.tsx | 36 +++++++++++++------ .../components/copy-to-clipboard-icon.tsx | 19 +++++----- stepwise-studio/components/ui/button.tsx | 2 +- stepwise-studio/components/variable-card.tsx | 2 +- website/release_notes/0_0.md | 23 ++++++++++++ 6 files changed, 85 insertions(+), 20 deletions(-) diff --git a/stepwise-studio/components/chat-controlbar.tsx b/stepwise-studio/components/chat-controlbar.tsx index 390636a..755f308 100644 --- a/stepwise-studio/components/chat-controlbar.tsx +++ b/stepwise-studio/components/chat-controlbar.tsx @@ -405,6 +405,28 @@ ${ // } // } }; + + const handleKeyDown = (event: KeyboardEvent) => { + if (event.ctrlKey && event.key === "Enter") { + event.preventDefault(); + if (!busy && message.trim() !== "") { + sendMessage( + message, + selectedWorkflow!, + selectedStepRunHistory, + chatHistory, + ); + } + } + }; + + useEffect(() => { + window.addEventListener("keydown", handleKeyDown); + return () => { + window.removeEventListener("keydown", handleKeyDown); + }; + }, [busy, message, selectedWorkflow, selectedStepRunHistory, chatHistory]); + return (
@@ -423,6 +445,7 @@ ${ ) } disabled={busy || message === ""} + tooltip="Send message (Ctrl + Enter)" > diff --git a/stepwise-studio/components/chat-history.tsx b/stepwise-studio/components/chat-history.tsx index a97bb21..dc7f7fd 100644 --- a/stepwise-studio/components/chat-history.tsx +++ b/stepwise-studio/components/chat-history.tsx @@ -16,6 +16,8 @@ import { useWorkflowStore } from "@/hooks/useWorkflow"; import { stat } from "fs"; import { VariableDTO } from "@/stepwise-client"; import { VariableCard } from "./variable-card"; +import { CopyToClipboardIcon } from "./copy-to-clipboard-icon"; +import { cn } from "@/lib/utils"; export type ChatMessageType = "text" | "tool"; @@ -85,12 +87,13 @@ export const ChatMessageCard: React.FC = ({ sender, avatar, index, + fromUser, }) => { const deleteMessageAfter = useChatHistoryStore( (state) => state.deleteMessageAfter, ); return ( -
+
{avatar && typeof avatar === "string" && ( @@ -103,14 +106,27 @@ export const ChatMessageCard: React.FC = ({ {avatar && typeof avatar !== "string" && avatar} {sender && {sender}}
- {/* add x button */} - + {/* if fromUser is false, add copy button */} +
+ {fromUser === false && ( + + )} + {/* add x button */} + +
{message}
@@ -186,7 +202,7 @@ export const ChatHistory: React.FC = () => { }, [messages]); return ( -
+
{messages.length > 0 && messages.map((message, index) => (
diff --git a/stepwise-studio/components/copy-to-clipboard-icon.tsx b/stepwise-studio/components/copy-to-clipboard-icon.tsx index 2a3c5ab..9425837 100644 --- a/stepwise-studio/components/copy-to-clipboard-icon.tsx +++ b/stepwise-studio/components/copy-to-clipboard-icon.tsx @@ -1,16 +1,20 @@ import { ClipboardCheck, Clipboard } from "lucide-react"; import { FC, useEffect, useState } from "react"; +import { Button, buttonVariants } from "./ui/button"; +import { VariantProps } from "class-variance-authority"; interface CopyToClipboardIconProps { textValue: string; size?: number; showCopiedText?: boolean; + buttonVariants?: VariantProps; } export const CopyToClipboardIcon: FC = ({ textValue, size = 18, showCopiedText = true, + buttonVariants, }) => { const [isCopied, setIsCopied] = useState(false); const [valueToCopy, setValueToCopy] = useState(""); @@ -34,16 +38,15 @@ export const CopyToClipboardIcon: FC = ({ }; return ( - + ); }; diff --git a/stepwise-studio/components/ui/button.tsx b/stepwise-studio/components/ui/button.tsx index 959c710..1d68ca5 100644 --- a/stepwise-studio/components/ui/button.tsx +++ b/stepwise-studio/components/ui/button.tsx @@ -81,7 +81,7 @@ const Button = React.forwardRef( - {buttonComponent} +
{buttonComponent}

{tooltip}

diff --git a/stepwise-studio/components/variable-card.tsx b/stepwise-studio/components/variable-card.tsx index f98befd..33be116 100644 --- a/stepwise-studio/components/variable-card.tsx +++ b/stepwise-studio/components/variable-card.tsx @@ -44,8 +44,8 @@ export const VariableCard: React.FC = (props) => {
diff --git a/website/release_notes/0_0.md b/website/release_notes/0_0.md index de02882..c0280ca 100644 --- a/website/release_notes/0_0.md +++ b/website/release_notes/0_0.md @@ -1,3 +1,26 @@ +# Release Notes - StepWise v0.0.10 πŸš€ + +We are excited to announce the release of StepWise version 0.0.10. This update brings several enhancements and fixes aimed at improving user experience and expanding the functionality of our platform. Below is a summary of the changes made in this release: + +## ✨ Enhancements +- **πŸ’¬ New Feature - Geeno Chat:** We have integrated Geeno into the right sidebar, offering a chat-based interface for interacting with your workflows and enhancing user engagement. [#109](https://github.com/LittleLittleCloud/StepWise/issues/109) +- **πŸ” Right Sidebar Enhancement:** The details of each step are now visible in the right sidebar, making it easier for users to track their workflow progress. [#112](https://github.com/LittleLittleCloud/StepWise/issues/112) +- **πŸ“± Mobile UI Improvements:** Enhancements have been made to the mobile user interface, ensuring a better and more responsive user experience on both tablets and phones. [#110](https://github.com/LittleLittleCloud/StepWise/issues/110) + +## πŸ–₯️ UI Updates +- **🎨 Use Shadcn Sidebar:** The web UI has been upgraded to use the Shadcn sidebar, providing a modern and sleek look to our platform. [#103](https://github.com/LittleLittleCloud/StepWise/issues/103) + +## πŸ”§ Code Refactoring +- **πŸ”„ API Simplification:** The `IStepWiseEngine` API has been refactored for clarity and ease of use, streamlining the process for developers to integrate and interact with StepWise. [#102](https://github.com/LittleLittleCloud/StepWise/issues/102) + +## πŸ—ΊοΈ Roadmap +- **πŸ€– Agentify Workflow:** Progress continues on agentifying stepwise workflows, enabling seamless control and operation through the use of agent intermediaries. [#82](https://github.com/LittleLittleCloud/StepWise/issues/82) + +We would like to thank our community for the valuable feedback and contributions that make each release more impactful. Your support is essential in driving the ongoing evolution of StepWise! + +For further details on each issue, please refer to our [GitHub repository](https://github.com/LittleLittleCloud/StepWise). + + # Release Notes - StepWise v0.0.9 πŸš€ Welcome to version 0.0.9 of StepWise! We are excited to introduce new features and enhancements designed to enhance the functionality and user experience of both the StepWise Server and WebUI. Here's what's new: