Skip to content

Commit 695a8a1

Browse files
authoredDec 13, 2024··
add release note 0.0.10 (#123)
1 parent ab6cdf6 commit 695a8a1

File tree

6 files changed

+85
-20
lines changed

6 files changed

+85
-20
lines changed
 

‎stepwise-studio/components/chat-controlbar.tsx

+23
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,28 @@ ${
405405
// }
406406
// }
407407
};
408+
409+
const handleKeyDown = (event: KeyboardEvent) => {
410+
if (event.ctrlKey && event.key === "Enter") {
411+
event.preventDefault();
412+
if (!busy && message.trim() !== "") {
413+
sendMessage(
414+
message,
415+
selectedWorkflow!,
416+
selectedStepRunHistory,
417+
chatHistory,
418+
);
419+
}
420+
}
421+
};
422+
423+
useEffect(() => {
424+
window.addEventListener("keydown", handleKeyDown);
425+
return () => {
426+
window.removeEventListener("keydown", handleKeyDown);
427+
};
428+
}, [busy, message, selectedWorkflow, selectedStepRunHistory, chatHistory]);
429+
408430
return (
409431
<div className="flex items-center justify-end w-full">
410432
<div className="flex grow">
@@ -423,6 +445,7 @@ ${
423445
)
424446
}
425447
disabled={busy || message === ""}
448+
tooltip="Send message (Ctrl + Enter)"
426449
>
427450
<SendHorizonal />
428451
</Button>

‎stepwise-studio/components/chat-history.tsx

+26-10
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ import { useWorkflowStore } from "@/hooks/useWorkflow";
1616
import { stat } from "fs";
1717
import { VariableDTO } from "@/stepwise-client";
1818
import { VariableCard } from "./variable-card";
19+
import { CopyToClipboardIcon } from "./copy-to-clipboard-icon";
20+
import { cn } from "@/lib/utils";
1921

2022
export type ChatMessageType = "text" | "tool";
2123

@@ -85,12 +87,13 @@ export const ChatMessageCard: React.FC<ChatMessage & { index: number }> = ({
8587
sender,
8688
avatar,
8789
index,
90+
fromUser,
8891
}) => {
8992
const deleteMessageAfter = useChatHistoryStore(
9093
(state) => state.deleteMessageAfter,
9194
);
9295
return (
93-
<div className="flex flex-col w-full gap-1 group">
96+
<div className={cn("flex flex-col w-full gap-1 group")}>
9497
<div className="flex items-center w-full relative ">
9598
<div className="flex items-center gap-2">
9699
{avatar && typeof avatar === "string" && (
@@ -103,14 +106,27 @@ export const ChatMessageCard: React.FC<ChatMessage & { index: number }> = ({
103106
{avatar && typeof avatar !== "string" && avatar}
104107
{sender && <span className="font-bold">{sender}</span>}
105108
</div>
106-
{/* add x button */}
107-
<Button
108-
size="tinyIcon"
109-
onClick={() => deleteMessageAfter(index)}
110-
className="absolute right-0 opacity-0 group-hover:opacity-100 transition-opacity"
111-
>
112-
<X />
113-
</Button>
109+
{/* if fromUser is false, add copy button */}
110+
<div className="flex items-center grow opacity-0 group-hover:opacity-100 transition-opacity justify-end gap-2">
111+
{fromUser === false && (
112+
<CopyToClipboardIcon
113+
buttonVariants={{
114+
variant: "ghost",
115+
size: "tinyIcon",
116+
}}
117+
textValue={message}
118+
showCopiedText={false}
119+
/>
120+
)}
121+
{/* add x button */}
122+
<Button
123+
variant="ghost"
124+
size="tinyIcon"
125+
onClick={() => deleteMessageAfter(index)}
126+
>
127+
<X />
128+
</Button>
129+
</div>
114130
</div>
115131
<Markdown className="p-0">{message}</Markdown>
116132
</div>
@@ -186,7 +202,7 @@ export const ChatHistory: React.FC = () => {
186202
}, [messages]);
187203

188204
return (
189-
<div className="gap-2 border-b-2 flex flex-col h-full overflow-y-auto">
205+
<div className="gap-2 flex flex-col h-full overflow-y-auto">
190206
{messages.length > 0 &&
191207
messages.map((message, index) => (
192208
<div key={index}>

‎stepwise-studio/components/copy-to-clipboard-icon.tsx

+11-8
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
import { ClipboardCheck, Clipboard } from "lucide-react";
22
import { FC, useEffect, useState } from "react";
3+
import { Button, buttonVariants } from "./ui/button";
4+
import { VariantProps } from "class-variance-authority";
35

46
interface CopyToClipboardIconProps {
57
textValue: string;
68
size?: number;
79
showCopiedText?: boolean;
10+
buttonVariants?: VariantProps<typeof buttonVariants>;
811
}
912

1013
export const CopyToClipboardIcon: FC<CopyToClipboardIconProps> = ({
1114
textValue,
1215
size = 18,
1316
showCopiedText = true,
17+
buttonVariants,
1418
}) => {
1519
const [isCopied, setIsCopied] = useState<Boolean>(false);
1620
const [valueToCopy, setValueToCopy] = useState<string>("");
@@ -34,16 +38,15 @@ export const CopyToClipboardIcon: FC<CopyToClipboardIconProps> = ({
3438
};
3539

3640
return (
37-
<button
38-
className="flex items-center rounded py-0.5 text-xs focus:outline-none"
41+
<Button
42+
variant={buttonVariants ? buttonVariants.variant : "ghost"}
43+
size={buttonVariants ? buttonVariants.size : "tinyIcon"}
44+
tooltip="Copy to clipboard"
45+
className="flex items-center rounded py-0.5 gap-1 text-xs focus:outline-none"
3946
onClick={copyToClipboard}
4047
>
41-
{isCopied ? (
42-
<ClipboardCheck size={size} className="mr-1.5" />
43-
) : (
44-
<Clipboard size={size} className="mr-1.5" />
45-
)}
48+
{isCopied ? <ClipboardCheck /> : <Clipboard />}
4649
{showCopiedText && <span>{isCopied ? "Copied!" : "Copy"}</span>}
47-
</button>
50+
</Button>
4851
);
4952
};

‎stepwise-studio/components/ui/button.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
8181
<TooltipProvider>
8282
<Tooltip delayDuration={tooltipDelayDuration}>
8383
<TooltipTrigger asChild>
84-
{buttonComponent}
84+
<div>{buttonComponent}</div>
8585
</TooltipTrigger>
8686
<TooltipContent side={tooltipSide}>
8787
<p>{tooltip}</p>

‎stepwise-studio/components/variable-card.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ export const VariableCard: React.FC<VariableCardProps> = (props) => {
4444
</div>
4545
<div className="w-full px-1 flex justify-end">
4646
<CopyToClipboardIcon
47-
size={12}
4847
textValue={variable.displayValue}
48+
showCopiedText={false}
4949
/>
5050
</div>
5151
</div>

‎website/release_notes/0_0.md

+23
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
# Release Notes - StepWise v0.0.10 🚀
2+
3+
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:
4+
5+
## ✨ Enhancements
6+
- **💬 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)
7+
- **🔍 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)
8+
- **📱 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)
9+
10+
## 🖥️ UI Updates
11+
- **🎨 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)
12+
13+
## 🔧 Code Refactoring
14+
- **🔄 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)
15+
16+
## 🗺️ Roadmap
17+
- **🤖 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)
18+
19+
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!
20+
21+
For further details on each issue, please refer to our [GitHub repository](https://github.com/LittleLittleCloud/StepWise).
22+
23+
124
# Release Notes - StepWise v0.0.9 🚀
225

326
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:

0 commit comments

Comments
 (0)
Please sign in to comment.