|
|
|
|
@@ -1264,9 +1264,13 @@ export function PlatformEntryFlowShellImpl({
|
|
|
|
|
|
|
|
|
|
const match3dSession = match3dFlow.session;
|
|
|
|
|
const match3dError = match3dFlow.error;
|
|
|
|
|
const setMatch3DSession = match3dFlow.setSession;
|
|
|
|
|
const setMatch3DError = match3dFlow.setError;
|
|
|
|
|
const isMatch3DBusy = match3dFlow.isBusy;
|
|
|
|
|
const streamingMatch3DReplyText = match3dFlow.streamingReplyText;
|
|
|
|
|
const setStreamingMatch3DReplyText = match3dFlow.setStreamingReplyText;
|
|
|
|
|
const isStreamingMatch3DReply = match3dFlow.isStreamingReply;
|
|
|
|
|
const setIsStreamingMatch3DReply = match3dFlow.setIsStreamingReply;
|
|
|
|
|
|
|
|
|
|
const puzzleSession = puzzleFlow.session;
|
|
|
|
|
const puzzleError = puzzleFlow.error;
|
|
|
|
|
@@ -1292,12 +1296,18 @@ export function PlatformEntryFlowShellImpl({
|
|
|
|
|
}, [bigFishFlow]);
|
|
|
|
|
|
|
|
|
|
const openMatch3DAgentWorkspace = useCallback(async () => {
|
|
|
|
|
match3dFlow.setSession(null);
|
|
|
|
|
match3dFlow.setError(null);
|
|
|
|
|
match3dFlow.setStreamingReplyText('');
|
|
|
|
|
match3dFlow.setIsStreamingReply(false);
|
|
|
|
|
setMatch3DSession(null);
|
|
|
|
|
setMatch3DError(null);
|
|
|
|
|
setStreamingMatch3DReplyText('');
|
|
|
|
|
setIsStreamingMatch3DReply(false);
|
|
|
|
|
await match3dFlow.openWorkspace();
|
|
|
|
|
}, [match3dFlow]);
|
|
|
|
|
}, [
|
|
|
|
|
match3dFlow,
|
|
|
|
|
setIsStreamingMatch3DReply,
|
|
|
|
|
setMatch3DError,
|
|
|
|
|
setMatch3DSession,
|
|
|
|
|
setStreamingMatch3DReplyText,
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
const openPuzzleAgentWorkspace = useCallback(async () => {
|
|
|
|
|
setPuzzleRun(null);
|
|
|
|
|
@@ -1356,10 +1366,10 @@ export function PlatformEntryFlowShellImpl({
|
|
|
|
|
setBigFishRuntimeReturnStage('platform');
|
|
|
|
|
setBigFishGenerationState(null);
|
|
|
|
|
setBigFishError(null);
|
|
|
|
|
match3dFlow.setSession(null);
|
|
|
|
|
match3dFlow.setError(null);
|
|
|
|
|
match3dFlow.setStreamingReplyText('');
|
|
|
|
|
match3dFlow.setIsStreamingReply(false);
|
|
|
|
|
setMatch3DSession(null);
|
|
|
|
|
setMatch3DError(null);
|
|
|
|
|
setStreamingMatch3DReplyText('');
|
|
|
|
|
setIsStreamingMatch3DReply(false);
|
|
|
|
|
setPuzzleOperation(null);
|
|
|
|
|
setPuzzleWorks([]);
|
|
|
|
|
setSelectedPuzzleDetail(null);
|
|
|
|
|
@@ -1388,17 +1398,20 @@ export function PlatformEntryFlowShellImpl({
|
|
|
|
|
}
|
|
|
|
|
}, [
|
|
|
|
|
authUi?.user,
|
|
|
|
|
match3dFlow,
|
|
|
|
|
platformBootstrap.canReadProtectedData,
|
|
|
|
|
persistRpgAgentUiState,
|
|
|
|
|
resetAutoSaveTrackingToIdle,
|
|
|
|
|
resetRpgSessionViewState,
|
|
|
|
|
selectionStage,
|
|
|
|
|
setBigFishError,
|
|
|
|
|
setIsStreamingMatch3DReply,
|
|
|
|
|
setMatch3DError,
|
|
|
|
|
setMatch3DSession,
|
|
|
|
|
setPuzzleError,
|
|
|
|
|
setRpgCustomWorldError,
|
|
|
|
|
setRpgGeneratedCustomWorldProfile,
|
|
|
|
|
setSelectionStage,
|
|
|
|
|
setStreamingMatch3DReplyText,
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
const handleCreationHubCreateType = useCallback(
|
|
|
|
|
@@ -1492,6 +1505,14 @@ export function PlatformEntryFlowShellImpl({
|
|
|
|
|
}
|
|
|
|
|
}, [bigFishRun, bigFishSession, selectionStage, setSelectionStage]);
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
if (selectionStage === 'match3d-result' && !match3dSession?.draft) {
|
|
|
|
|
setSelectionStage(
|
|
|
|
|
match3dSession ? 'match3d-agent-workspace' : 'platform',
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}, [match3dSession, selectionStage, setSelectionStage]);
|
|
|
|
|
|
|
|
|
|
const startBigFishRun = useCallback(() => {
|
|
|
|
|
if (!bigFishSession) {
|
|
|
|
|
return;
|
|
|
|
|
@@ -2897,11 +2918,13 @@ export function PlatformEntryFlowShellImpl({
|
|
|
|
|
: (platformBootstrap.platformError ??
|
|
|
|
|
sessionController.agentWorkspaceRestoreError ??
|
|
|
|
|
bigFishError ??
|
|
|
|
|
match3dError ??
|
|
|
|
|
puzzleError)
|
|
|
|
|
}
|
|
|
|
|
onRetry={() => {
|
|
|
|
|
platformBootstrap.setPlatformError(null);
|
|
|
|
|
setBigFishError(null);
|
|
|
|
|
setMatch3DError(null);
|
|
|
|
|
setPuzzleError(null);
|
|
|
|
|
void platformBootstrap.refreshCustomWorldWorks().catch((error) => {
|
|
|
|
|
platformBootstrap.setPlatformError(
|
|
|
|
|
@@ -2914,11 +2937,15 @@ export function PlatformEntryFlowShellImpl({
|
|
|
|
|
void refreshPuzzleShelf();
|
|
|
|
|
}}
|
|
|
|
|
createError={
|
|
|
|
|
sessionController.creationTypeError ?? bigFishError ?? puzzleError
|
|
|
|
|
sessionController.creationTypeError ??
|
|
|
|
|
bigFishError ??
|
|
|
|
|
match3dError ??
|
|
|
|
|
puzzleError
|
|
|
|
|
}
|
|
|
|
|
createBusy={
|
|
|
|
|
sessionController.isCreatingAgentSession ||
|
|
|
|
|
isBigFishBusy ||
|
|
|
|
|
isMatch3DBusy ||
|
|
|
|
|
isPuzzleBusy
|
|
|
|
|
}
|
|
|
|
|
onCreateType={handleCreationHubCreateType}
|
|
|
|
|
@@ -3078,7 +3105,12 @@ export function PlatformEntryFlowShellImpl({
|
|
|
|
|
<PlatformWorkDetailView
|
|
|
|
|
entry={selectedPublicWorkDetail}
|
|
|
|
|
authorAvatarUrl={selectedPublicWorkAuthor?.avatarUrl ?? null}
|
|
|
|
|
isBusy={isPublicWorkDetailBusy || isPuzzleBusy || isBigFishBusy}
|
|
|
|
|
isBusy={
|
|
|
|
|
isPublicWorkDetailBusy ||
|
|
|
|
|
isPuzzleBusy ||
|
|
|
|
|
isBigFishBusy ||
|
|
|
|
|
isMatch3DBusy
|
|
|
|
|
}
|
|
|
|
|
error={publicWorkDetailError}
|
|
|
|
|
onBack={() => {
|
|
|
|
|
setPublicWorkDetailError(null);
|
|
|
|
|
|