Fix OA workspace cover thumbnails and add space chat new session.
Resolve mindspace-cover images from workspace directories when generating feed thumbnails, refresh stale SVGs missing embedded photos, and disable thumbnail API caching so fixes take effect immediately. Also add a new session control to the space chat panel, including on mobile. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+12
-1
@@ -8,7 +8,7 @@ import {
|
||||
ensureHtmlThumbnail,
|
||||
scheduleHtmlThumbnail,
|
||||
} from './mindspace-thumbnails.mjs';
|
||||
import { mirrorAssetToZone, removeZoneMirror, resolveUserWorkspaceRoot } from './user-space.mjs';
|
||||
import { mirrorAssetToZone, removeZoneMirror, resolveUserWorkspaceRoot, resolveZoneFilePath } from './user-space.mjs';
|
||||
import { canPreviewAsset, renderAssetPreviewHtml } from './mindspace-asset-preview.mjs';
|
||||
import { createWorkspaceAssetSync } from './mindspace-workspace-sync.mjs';
|
||||
|
||||
@@ -828,10 +828,21 @@ export function createAssetService(pool, options = {}) {
|
||||
[assetId],
|
||||
);
|
||||
const html = await fs.readFile(assetPath, 'utf8');
|
||||
const contentBaseDir =
|
||||
asset.sourceType === 'workspace' && h5Root
|
||||
? path.dirname(
|
||||
resolveZoneFilePath(
|
||||
resolveUserWorkspaceRoot(h5Root, { id: userId }),
|
||||
asset.categoryCode,
|
||||
asset.filename,
|
||||
),
|
||||
)
|
||||
: undefined;
|
||||
return ensureHtmlThumbnail(storageRoot, assetThumbnailKey(userId, assetId), html, {
|
||||
title: asset.displayName,
|
||||
subtitle: asset.categoryCode?.toUpperCase?.() ?? 'HTML',
|
||||
contentStorageKey: versions[0]?.storage_key,
|
||||
contentBaseDir,
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user