-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
PR FOR VISIBILITY: Generated artifacts in side panel - draft #10159
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
Conversation
| <TableHeader> | ||
| <TableRow className="border-b border-border-light"> | ||
| <TableHead className="w-[45%] bg-surface-secondary py-3 text-left text-sm font-medium text-text-secondary"> | ||
| <div>Title</div> |
Check failure
Code scanning / ESLint
disallow literal string Error
| <div>Title</div> | ||
| </TableHead> | ||
| <TableHead className="w-[25%] bg-surface-secondary py-3 text-left text-sm font-medium text-text-secondary"> | ||
| <div>Type</div> |
Check failure
Code scanning / ESLint
disallow literal string Error
| <div>Type</div> | ||
| </TableHead> | ||
| <TableHead className="w-[30%] bg-surface-secondary py-3 text-left text-sm font-medium text-text-secondary"> | ||
| <div>Preview</div> |
Check failure
Code scanning / ESLint
disallow literal string Error
| export default function GeneratedArtifacts() { | ||
| const { conversationId } = useParams(); | ||
|
|
||
| const { data: artifacts = [], isLoading } = useGetMessagesByConvoId(conversationId ?? '', { |
Check warning
Code scanning / ESLint
Disallow unused variables Warning
| }); | ||
|
|
||
| if (!artifacts || artifacts.length === 0) { | ||
| return <div>No artifacts found</div>; |
Check failure
Code scanning / ESLint
disallow literal string Error
| const type = typeMatch?.[1] || 'unknown'; | ||
| const title = titleMatch?.[1] || 'Untitled'; | ||
| const id = idMatch?.[1] || `artifact-${title}-${type}`; | ||
| let language = mimeToLang[type] || fenceLangMatch?.[1] || 'txt'; |
Check failure
Code scanning / ESLint
Require `const` declarations for variables that are never reassigned after declared Error
I'd like to receive some feedback on the following feature I am proposing.
In short, I've added a nav entry in the right sidebar called generated artifacts. The goal is to provide an easy way to preview all the artifacts the model generates in a given conversation, so the user doesn't have to scroll up or down to find the artifact they are looking for.
This is what it looks like:
ATM, I'm only supporting Gemini, as they label artifacts distinctively in their payloads, but I don't think it will be hard to also include other models.
What do you think? Should I go on implement this fully?
Thanks!