This commit is contained in:
2026-05-02 16:22:12 +08:00
25 changed files with 1336 additions and 169 deletions

View File

@@ -1106,14 +1106,13 @@ export function PlatformEntryFlowShellImpl({
const galleryResponse = await listMatch3DGallery();
setMatch3DGalleryEntries(galleryResponse.items);
return galleryResponse.items;
} catch (error) {
} catch {
// 中文注释:公开广场是首页展示数据,失败时只降级为空列表;
// 不写入创作错误态,避免挡住抓大鹅共创入口。
setMatch3DGalleryEntries([]);
setMatch3DError(
resolveMatch3DErrorMessage(error, '读取抓大鹅广场失败。'),
);
return [];
}
}, [resolveMatch3DErrorMessage]);
}, []);
const refreshPuzzleShelf = useCallback(async () => {
setIsPuzzleLoadingLibrary(true);
@@ -1238,6 +1237,7 @@ export function PlatformEntryFlowShellImpl({
isBigFishCreationVisible
? refreshBigFishGallery()
: Promise.resolve([] as BigFishWorkSummary[]),
refreshMatch3DGallery(),
refreshPuzzleGallery(),
]);
return latestSession;
@@ -1680,6 +1680,24 @@ export function PlatformEntryFlowShellImpl({
await bigFishFlow.openWorkspace();
}, [bigFishFlow]);
const openMatch3DAgentWorkspace = useCallback(async () => {
setMatch3DSession(null);
setMatch3DProfile(null);
setMatch3DRun(null);
setMatch3DError(null);
setStreamingMatch3DReplyText('');
setIsStreamingMatch3DReply(false);
await match3dFlow.openWorkspace();
}, [
match3dFlow,
setIsStreamingMatch3DReply,
setMatch3DError,
setMatch3DProfile,
setMatch3DRun,
setMatch3DSession,
setStreamingMatch3DReplyText,
]);
const openPuzzleAgentWorkspace = useCallback(async () => {
setPuzzleRun(null);
setPuzzleOperation(null);
@@ -1824,7 +1842,7 @@ export function PlatformEntryFlowShellImpl({
const handleCreationHubCreateType = useCallback(
(type: PlatformCreationTypeId) => {
if (type === 'match3d' || type === 'airp' || type === 'visual-novel') {
if (type === 'airp' || type === 'visual-novel') {
return;
}
@@ -1846,6 +1864,13 @@ export function PlatformEntryFlowShellImpl({
return;
}
if (type === 'match3d') {
runProtectedAction(() => {
void openMatch3DAgentWorkspace();
});
return;
}
if (type === 'puzzle') {
runProtectedAction(() => {
void openPuzzleAgentWorkspace();
@@ -1854,6 +1879,7 @@ export function PlatformEntryFlowShellImpl({
},
[
openBigFishAgentWorkspace,
openMatch3DAgentWorkspace,
openPuzzleAgentWorkspace,
prepareCreationLaunch,
runProtectedAction,
@@ -5108,7 +5134,9 @@ export function PlatformEntryFlowShellImpl({
});
}}
onSelectMatch3D={() => {
// 抓大鹅创作入口当前为敬请期待;保留回调防御,避免旧入口绕过锁定态。
runProtectedAction(() => {
void openMatch3DAgentWorkspace();
});
}}
onSelectPuzzle={() => {
runProtectedAction(() => {