Skip to content

Commit

Permalink
[front] - chore: hide conversation message labels (#8274)
Browse files Browse the repository at this point in the history
* [front] - refactor: replace options objects with Button components in AgentMessage

 - Converted action options in AgentMessage to use Button component for improved maintainability and consistency
 - Added tooltip to buttons for enhanced user experience and accessibility

* [front] - feature: update @dust-tt/sparkle to v0.2.281-rc-1

 - Upgraded @dust-tt/sparkle to include new features and improvements in release candidate version
 - Ensured package-lock.json reflects the updated resolution and integrity of the package

* [front] - feature: update copy and retry buttons in AgentMessage component

 - Added 'outline' variant and 'xs' size to the copy and retry buttons for visual consistency
 - Enhancements aim to improve the user interface by scaling the buttons appropriately within the agent message bubble

---------

Co-authored-by: Jules <[email protected]>
  • Loading branch information
JulesBelveze and Jules authored Oct 28, 2024
1 parent 03f654c commit 77eab96
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 18 deletions.
32 changes: 19 additions & 13 deletions front/components/assistant/conversation/AgentMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -325,23 +325,29 @@ export function AgentMessage({
message.status === "failed"
? []
: [
{
label: "Copy to clipboard",
icon: ClipboardIcon,
onClick: () => {
<Button
key="copy-msg-button"
tooltip="Copy to clipboard"
variant="outline"
size="xs"
onClick={() => {
void navigator.clipboard.writeText(
cleanUpCitations(agentMessageToRender.content || "")
);
},
},
{
label: "Retry",
icon: ArrowPathIcon,
onClick: () => {
}}
icon={ClipboardIcon}
/>,
<Button
key="retry-msg-button"
tooltip="Retry"
variant="outline"
size="xs"
onClick={() => {
void retryHandler(agentMessageToRender);
},
disabled: isRetryHandlerProcessing || shouldStream,
},
}}
icon={ArrowPathIcon}
disabled={isRetryHandlerProcessing || shouldStream}
/>,
];

// References logic.
Expand Down
8 changes: 4 additions & 4 deletions front/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion front/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"dependencies": {
"@auth0/nextjs-auth0": "^3.5.0",
"@dust-tt/client": "file:../sdks/js",
"@dust-tt/sparkle": "^0.2.280",
"@dust-tt/sparkle": "^0.2.281",
"@dust-tt/types": "file:../types",
"@headlessui/react": "^1.7.7",
"@heroicons/react": "^2.0.11",
Expand Down

0 comments on commit 77eab96

Please sign in to comment.