-
Notifications
You must be signed in to change notification settings - Fork 112
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
Feedbacks for builders #9110
Feedbacks for builders #9110
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost there, few comments! (and one or 2 on my own commits haha)
); | ||
|
||
const TabsSection = () => ( | ||
<Tabs defaultValue="feedback"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's put back "info"
@@ -242,6 +243,32 @@ export function useAgentConfiguration({ | |||
}; | |||
} | |||
|
|||
export function useAgentConfigurationFeedbacks({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want any kind of pagination there or do we think it's not worth it for now?
(I think we can wait until someone tells us it's hard to manage)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As seen irl the assistant with most feedbacks has only 9 feedbacks, we'll revamp this part when we reach e.g. 100
<div className="mt-3 text-sm text-element-900">No feedbacks.</div> | ||
) : ( | ||
<div className="mt-3"> | ||
<ConfigVersionHeader |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not use weird shortcuts names we don't use anywhere -> AgentConfigurationVersionHeader
}) { | ||
const getStringRepresentation = useCallback( | ||
(config: LightAgentConfigurationType) => { | ||
const dateFormatter = new Intl.DateTimeFormat(navigator.language, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't use that anywhere else 🤔
Can we use what we have in the codebase? (also we don't want to format per navigator language, our platform is english only)
return date.toLocaleDateString("en-US", {
year: "numeric",
month: "long",
day: "numeric",
});
agentConfiguration: LightAgentConfigurationType | undefined; | ||
isLatestVersion: boolean; | ||
}) { | ||
const getStringRepresentation = useCallback( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getAgentConfigurationVersionString
or something like similar.
The goal of being precise is to make sure in the future newcomers don't get confused trying to use one of these specific functions with generic names for something else 👍
const baseUrl = | ||
process.env.NODE_ENV === "development" | ||
? "http://localhost:3000" | ||
: "https://dust.tt"; | ||
const conversationUrl = `${baseUrl}/w/${owner.sId}/assistant/${conversationId}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const baseUrl = | |
process.env.NODE_ENV === "development" | |
? "http://localhost:3000" | |
: "https://dust.tt"; | |
const conversationUrl = `${baseUrl}/w/${owner.sId}/assistant/${conversationId}`; | |
const conversationUrl = `${DUST_FRONT_API}/w/${owner.sId}/assistant/${conversationId}`; |
workspaceId: owner.sId, | ||
feedbackId: feedback.id.toString(), | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import DUST_FRONT_API at the top of your script:
const { DUST_FRONT_API } = process.env;
<ContentMessage variant="slate" className="my-2"> | ||
<div className="justify-content-around mb-3 flex items-center gap-2"> | ||
<div className="flex w-full items-center gap-2"> | ||
<Avatar |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Image will break if userDetails.image === null, display it conditionally 👍 (my fault haha)
include: [ | ||
{ | ||
model: Message, | ||
as: "agentMessage", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as: "message"
no?
It's a bit confusing to name is agentMessage when it's coming from the "Message" model.
Also little snake_case vs camelCase issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried a more friendly name but sequelize would complain because the alias is not what is expected (it seems to expect agentMessage specifically). Haven't looked for a workaround for more than 10 minutes though, so happy to jumb back to it if you think it's worth it :)
<Tabs defaultValue="feedback"> | ||
<TabsList> | ||
<TabsTrigger value="info" label="Info" icon={InformationCircleIcon} /> | ||
<TabsTrigger value="feedback" label="Feedback" icon={HandThumbUpIcon} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<TabsTrigger value="feedback" label="Feedback" icon={HandThumbUpIcon} /> | |
<TabsTrigger value="feedback" label="Performance" icon={HandThumbUpIcon} /> |
<div className="flex w-full items-center gap-2"> | ||
<Avatar | ||
size="xs" | ||
visual={userDetails?.image || undefined} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: was more thinking something around
{userDetails.image ? (<Avatar... />) : null
LGTM |
Description
Risk
Deploy Plan