diff --git a/app/components/chat/Artifact.tsx b/app/components/chat/Artifact.tsx
index 682a4c7..f26b1ee 100644
--- a/app/components/chat/Artifact.tsx
+++ b/app/components/chat/Artifact.tsx
@@ -59,6 +59,14 @@ export const Artifact = memo(({ messageId }: ArtifactProps) => {
workbenchStore.showWorkbench.set(!showWorkbench);
}}
>
+ {artifact.type == 'bundled' && (
+ <>
+
+
+ >
+ )}
{artifact?.title}
Click to open Workbench
@@ -66,7 +74,7 @@ export const Artifact = memo(({ messageId }: ArtifactProps) => {
- {actions.length && (
+ {actions.length && artifact.type !== 'bundled' && (
{
- {showActions && actions.length > 0 && (
+ {artifact.type !== 'bundled' && showActions && actions.length > 0 && (
{
transition={{ duration: 0.15 }}
>
+
diff --git a/app/components/chat/ImportFolderButton.tsx b/app/components/chat/ImportFolderButton.tsx
index 5f822ee..b28ca51 100644
--- a/app/components/chat/ImportFolderButton.tsx
+++ b/app/components/chat/ImportFolderButton.tsx
@@ -79,7 +79,7 @@ ${content}
role: 'assistant',
content: `I'll help you set up these files.${binaryFilesMessage}
-
+
${fileArtifacts.join('\n\n')}
`,
id: generateId(),
diff --git a/app/lib/runtime/message-parser.ts b/app/lib/runtime/message-parser.ts
index 48f3f52..ab6b695 100644
--- a/app/lib/runtime/message-parser.ts
+++ b/app/lib/runtime/message-parser.ts
@@ -192,6 +192,7 @@ export class StreamingMessageParser {
const artifactTag = input.slice(i, openTagEnd + 1);
const artifactTitle = this.#extractAttribute(artifactTag, 'title') as string;
+ const type = this.#extractAttribute(artifactTag, 'type') as string;
const artifactId = this.#extractAttribute(artifactTag, 'id') as string;
if (!artifactTitle) {
@@ -207,6 +208,7 @@ export class StreamingMessageParser {
const currentArtifact = {
id: artifactId,
title: artifactTitle,
+ type,
} satisfies BoltArtifactData;
state.currentArtifact = currentArtifact;
diff --git a/app/lib/stores/workbench.ts b/app/lib/stores/workbench.ts
index cbb3f8a..a1de47e 100644
--- a/app/lib/stores/workbench.ts
+++ b/app/lib/stores/workbench.ts
@@ -18,6 +18,7 @@ import { extractRelativePath } from '~/utils/diff';
export interface ArtifactState {
id: string;
title: string;
+ type?: string;
closed: boolean;
runner: ActionRunner;
}
@@ -229,7 +230,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) {
@@ -244,6 +245,7 @@ export class WorkbenchStore {
id,
title,
closed: false,
+ type,
runner: new ActionRunner(webcontainer, () => this.boltTerminal),
});
}
diff --git a/app/types/artifact.ts b/app/types/artifact.ts
index e35697a..660729c 100644
--- a/app/types/artifact.ts
+++ b/app/types/artifact.ts
@@ -1,4 +1,5 @@
export interface BoltArtifactData {
id: string;
title: string;
+ type?: string;
}