@vellumai/assistant 0.4.19 → 0.4.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -819,6 +819,7 @@ export async function surfaceProxyResolver(
819
819
  if (toolName === 'app_open') {
820
820
  const appId = input.app_id as string;
821
821
  const preview = input.preview as DynamicPageSurfaceData['preview'];
822
+ const openMode = input.open_mode as string | undefined;
822
823
  const app = getApp(appId);
823
824
  if (!app) return { content: `App not found: ${appId}`, isError: true };
824
825
  const seededHomeBase = findSeededHomeBaseApp();
@@ -837,6 +838,33 @@ export async function surfaceProxyResolver(
837
838
  preview: { ...defaultPreview, ...preview, ...(storedPreview ? { previewImage: storedPreview } : {}) },
838
839
  };
839
840
  const surfaceId = uuid();
841
+
842
+ if (openMode === 'preview') {
843
+ // Inline-only preview card emitted during app_create — do not open a
844
+ // workspace panel and do not register surface state. The client renders
845
+ // this as a tappable inline card that opens the app on demand.
846
+ ctx.sendToClient({
847
+ type: 'ui_surface_show',
848
+ sessionId: ctx.conversationId,
849
+ surfaceId,
850
+ surfaceType: 'dynamic_page',
851
+ title: app.name,
852
+ data: surfaceData,
853
+ display: 'inline',
854
+ } as UiSurfaceShow);
855
+
856
+ // Track for message persistence so the inline card survives history reload.
857
+ ctx.currentTurnSurfaces.push({
858
+ surfaceId,
859
+ surfaceType: 'dynamic_page',
860
+ title: app.name,
861
+ data: surfaceData,
862
+ display: 'inline',
863
+ });
864
+
865
+ return { content: JSON.stringify({ surfaceId, appId }), isError: false };
866
+ }
867
+
840
868
  ctx.surfaceState.set(surfaceId, {
841
869
  surfaceType: 'dynamic_page',
842
870
  data: surfaceData,