Merge pull request #504 from thecodacus/bundle-artifact

feat(UI): added artifact bundling for custom long artifacts like uploading folder
This commit is contained in:
Anirban Kar
2024-12-06 17:16:50 +05:30
committed by GitHub
7 changed files with 51 additions and 5 deletions

View File

@@ -19,6 +19,7 @@ import { description } from '~/lib/persistence';
export interface ArtifactState {
id: string;
title: string;
type?: string;
closed: boolean;
runner: ActionRunner;
}
@@ -230,7 +231,7 @@ export class WorkbenchStore {
// TODO: what do we wanna do and how do we wanna recover from this?
}
addArtifact({ messageId, title, id }: ArtifactCallbackData) {
addArtifact({ messageId, title, id, type }: ArtifactCallbackData) {
const artifact = this.#getArtifact(messageId);
if (artifact) {
@@ -245,6 +246,7 @@ export class WorkbenchStore {
id,
title,
closed: false,
type,
runner: new ActionRunner(webcontainer, () => this.boltTerminal),
});
}