Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move copy message button in the playground to the text input #1691

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions agenta-web/src/components/Playground/Views/TestView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ const useStylesBox = createUseStyles({
},
row3: {
margin: "16px 0",
position: "relative",
"& textarea": {
height: "100%",
width: "100%",
Expand Down Expand Up @@ -211,6 +212,7 @@ const BoxComponent: React.FC<BoxComponentProps> = ({
form={form}
imageSize="large"
isPlaygroundComponent={true}
isLoading={loading}
/>
</Row>
{additionalData?.cost || additionalData?.latency ? (
Expand Down Expand Up @@ -247,12 +249,6 @@ const BoxComponent: React.FC<BoxComponentProps> = ({
>
Add to Test Set
</Button>
<CopyButton
buttonText={isChatVariant ? "Copy last message" : "Copy result"}
text={result}
disabled={loading || !result}
shape="round"
/>
{loading ? (
<Button
icon={<CloseCircleOutlined />}
Expand Down Expand Up @@ -299,6 +295,13 @@ const BoxComponent: React.FC<BoxComponentProps> = ({
: "",
}}
/>
<CopyButton
buttonText={null}
text={result}
disabled={loading || !result}
icon={true}
className="absolute top-2 right-2 opacity-70"
/>
</Row>
)}
</Card>
Expand Down
Loading