Persist custom world asset configs in runtime snapshots
This commit is contained in:
@@ -44,7 +44,6 @@ import {
|
||||
} from '../../services/customWorldAgentUiState';
|
||||
import {
|
||||
buildCustomWorldCreatorIntentFoundationText,
|
||||
buildCustomWorldCreatorIntentGenerationText,
|
||||
} from '../../services/customWorldCreatorIntent';
|
||||
import {
|
||||
clearPlatformBrowseHistory,
|
||||
@@ -151,14 +150,6 @@ function buildOptimisticAgentMessage(
|
||||
};
|
||||
}
|
||||
|
||||
function buildAgentSeedTextFromProfile(profile: CustomWorldProfile) {
|
||||
return (
|
||||
buildCustomWorldCreatorIntentGenerationText(profile.creatorIntent).trim() ||
|
||||
buildCustomWorldCreatorIntentFoundationText(profile.creatorIntent).trim() ||
|
||||
profile.settingText.trim()
|
||||
);
|
||||
}
|
||||
|
||||
function normalizeAgentBackedProfile(profile: CustomWorldProfile) {
|
||||
const foundationText = buildCustomWorldCreatorIntentFoundationText(
|
||||
profile.creatorIntent,
|
||||
@@ -784,29 +775,6 @@ export function PreGameSelectionFlow({
|
||||
}
|
||||
};
|
||||
|
||||
const continueWorldInAgent = async (
|
||||
profile = generatedCustomWorldProfile,
|
||||
) => {
|
||||
if (!profile || isCreatingAgentSession) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (isAgentDraftResultView && activeAgentSessionId) {
|
||||
setGeneratedCustomWorldProfile(null);
|
||||
setCustomWorldError(null);
|
||||
setCustomWorldAutoSaveError(null);
|
||||
setCustomWorldAutoSaveState('idle');
|
||||
setAgentDraftGenerationStartedAt(null);
|
||||
setCustomWorldGenerationViewSource(null);
|
||||
setCustomWorldResultViewSource(null);
|
||||
setPlatformTab('create');
|
||||
setSelectionStage('agent-workspace');
|
||||
return;
|
||||
}
|
||||
|
||||
await openRpgAgentWorkspace(buildAgentSeedTextFromProfile(profile));
|
||||
};
|
||||
|
||||
const submitAgentMessage = async (
|
||||
payload: SendCustomWorldAgentMessageRequest,
|
||||
) => {
|
||||
@@ -961,10 +929,6 @@ export function PreGameSelectionFlow({
|
||||
openCreationTypePicker();
|
||||
};
|
||||
|
||||
const editCustomWorldSetting = () => {
|
||||
void continueWorldInAgent();
|
||||
};
|
||||
|
||||
const openLibraryDetail = (
|
||||
entry: CustomWorldLibraryEntry<CustomWorldProfile>,
|
||||
) => {
|
||||
@@ -1441,9 +1405,7 @@ export function PreGameSelectionFlow({
|
||||
? leaveAgentDraftResult
|
||||
: leaveCustomWorldResult
|
||||
}
|
||||
onEditSetting={
|
||||
isAgentDraftResultView ? undefined : editCustomWorldSetting
|
||||
}
|
||||
onEditSetting={undefined}
|
||||
onRegenerate={undefined}
|
||||
onContinueExpand={undefined}
|
||||
onEnterWorld={() => {
|
||||
|
||||
Reference in New Issue
Block a user