chore: clean platform entry lint

This commit is contained in:
2026-04-26 21:43:24 +08:00
parent 7694ef5723
commit 8448913d2f
2 changed files with 33 additions and 31 deletions

View File

@@ -61,6 +61,7 @@ import {
type MiniGameDraftGenerationState, type MiniGameDraftGenerationState,
} from '../../services/miniGameDraftGenerationProgress'; } from '../../services/miniGameDraftGenerationProgress';
import { getPlatformProfileDashboard } from '../../services/platform-entry/platformProfileClient'; import { getPlatformProfileDashboard } from '../../services/platform-entry/platformProfileClient';
import { isSamePuzzlePublicWorkCode } from '../../services/publicWorkCode';
import { import {
createPuzzleAgentSession, createPuzzleAgentSession,
executePuzzleAgentAction, executePuzzleAgentAction,
@@ -78,7 +79,6 @@ import {
swapLocalPuzzlePieces, swapLocalPuzzlePieces,
} from '../../services/puzzle-runtime/puzzleLocalRuntime'; } from '../../services/puzzle-runtime/puzzleLocalRuntime';
import { deletePuzzleWork, listPuzzleWorks } from '../../services/puzzle-works'; import { deletePuzzleWork, listPuzzleWorks } from '../../services/puzzle-works';
import { isSamePuzzlePublicWorkCode } from '../../services/publicWorkCode';
import { deleteRpgCreationAgentSession } from '../../services/rpg-creation'; import { deleteRpgCreationAgentSession } from '../../services/rpg-creation';
import { rpgCreationPreviewAdapter } from '../../services/rpg-creation/rpgCreationPreviewAdapter'; import { rpgCreationPreviewAdapter } from '../../services/rpg-creation/rpgCreationPreviewAdapter';
import { import {
@@ -87,15 +87,15 @@ import {
} from '../../services/rpg-entry/rpgEntryLibraryClient'; } from '../../services/rpg-entry/rpgEntryLibraryClient';
import type { CustomWorldProfile } from '../../types'; import type { CustomWorldProfile } from '../../types';
import { useAuthUi } from '../auth/AuthUiContext'; import { useAuthUi } from '../auth/AuthUiContext';
import { useRpgCreationAgentOperationPolling } from '../rpg-entry/useRpgCreationAgentOperationPolling';
import { useRpgCreationEnterWorld } from '../rpg-entry/useRpgCreationEnterWorld';
import { useRpgCreationResultAutosave } from '../rpg-entry/useRpgCreationResultAutosave';
import { useRpgCreationSessionController } from '../rpg-entry/useRpgCreationSessionController';
import { import {
isPuzzleGalleryEntry, isPuzzleGalleryEntry,
mapPuzzleWorkToPlatformGalleryCard, mapPuzzleWorkToPlatformGalleryCard,
type PlatformPublicGalleryCard, type PlatformPublicGalleryCard,
} from '../rpg-entry/rpgEntryWorldPresentation'; } from '../rpg-entry/rpgEntryWorldPresentation';
import { useRpgCreationAgentOperationPolling } from '../rpg-entry/useRpgCreationAgentOperationPolling';
import { useRpgCreationEnterWorld } from '../rpg-entry/useRpgCreationEnterWorld';
import { useRpgCreationResultAutosave } from '../rpg-entry/useRpgCreationResultAutosave';
import { useRpgCreationSessionController } from '../rpg-entry/useRpgCreationSessionController';
import { PlatformEntryCreationTypeModal } from './PlatformEntryCreationTypeModal'; import { PlatformEntryCreationTypeModal } from './PlatformEntryCreationTypeModal';
import type { PlatformCreationTypeId } from './platformEntryCreationTypes'; import type { PlatformCreationTypeId } from './platformEntryCreationTypes';
import { import {
@@ -109,8 +109,8 @@ import {
} from './platformEntryShared'; } from './platformEntryShared';
import type { PlatformEntryFlowShellProps } from './platformEntryTypes'; import type { PlatformEntryFlowShellProps } from './platformEntryTypes';
import { PlatformEntryWorldDetailView } from './PlatformEntryWorldDetailView'; import { PlatformEntryWorldDetailView } from './PlatformEntryWorldDetailView';
import { usePlatformEntryBootstrap } from './usePlatformEntryBootstrap';
import { usePlatformCreationAgentFlowController } from './usePlatformCreationAgentFlowController'; import { usePlatformCreationAgentFlowController } from './usePlatformCreationAgentFlowController';
import { usePlatformEntryBootstrap } from './usePlatformEntryBootstrap';
import { usePlatformEntryLibraryDetail } from './usePlatformEntryLibraryDetail'; import { usePlatformEntryLibraryDetail } from './usePlatformEntryLibraryDetail';
import { usePlatformEntryNavigation } from './usePlatformEntryNavigation'; import { usePlatformEntryNavigation } from './usePlatformEntryNavigation';
@@ -1575,7 +1575,9 @@ export function PlatformEntryFlowShellImpl({
try { try {
await tryOpenGalleryEntry(); await tryOpenGalleryEntry();
return; return;
} catch {} } catch {
// 作品号优先时允许继续回退到用户号搜索。
}
} }
if (shouldSearchUserFirst) { if (shouldSearchUserFirst) {
@@ -1583,7 +1585,9 @@ export function PlatformEntryFlowShellImpl({
const user = await getPublicAuthUserByCode(normalizedKeyword); const user = await getPublicAuthUserByCode(normalizedKeyword);
setSearchedPublicUser(user); setSearchedPublicUser(user);
return; return;
} catch {} } catch {
// 用户号优先时允许继续回退到作品号搜索。
}
} }
if (!shouldSearchWorkFirst) { if (!shouldSearchWorkFirst) {

View File

@@ -8,30 +8,8 @@ import { beforeEach, expect, test, vi } from 'vitest';
import type { CustomWorldAgentSessionSnapshot } from '../../../packages/shared/src/contracts/customWorldAgent'; import type { CustomWorldAgentSessionSnapshot } from '../../../packages/shared/src/contracts/customWorldAgent';
import type { PuzzleWorkSummary } from '../../../packages/shared/src/contracts/puzzleWorkSummary'; import type { PuzzleWorkSummary } from '../../../packages/shared/src/contracts/puzzleWorkSummary';
import type { HydratedSavedGameSnapshot } from '../../persistence/runtimeSnapshotTypes'; import type { HydratedSavedGameSnapshot } from '../../persistence/runtimeSnapshotTypes';
import {
createRpgCreationSession,
executeRpgCreationAction,
getRpgCreationOperation,
getRpgCreationSession,
listRpgCreationWorks,
streamRpgCreationMessage,
upsertRpgWorldProfile,
} from '../../services/rpg-creation';
import type { AuthUser } from '../../services/authService';
import { ApiClientError } from '../../services/apiClient'; import { ApiClientError } from '../../services/apiClient';
import { import type { AuthUser } from '../../services/authService';
clearRpgProfileBrowseHistory as clearProfileBrowseHistory,
getRpgEntryWorldGalleryDetail,
getRpgProfileDashboard as getProfileDashboard,
listRpgEntryWorldGallery,
listRpgEntryWorldLibrary,
listRpgProfileBrowseHistory as listProfileBrowseHistory,
listRpgProfileSaveArchives as listProfileSaveArchives,
publishRpgEntryWorldProfile,
resumeRpgProfileSaveArchive as resumeProfileSaveArchive,
unpublishRpgEntryWorldProfile,
upsertRpgProfileBrowseHistory as upsertProfileBrowseHistory,
} from '../../services/rpg-entry';
import { import {
createBigFishCreationSession, createBigFishCreationSession,
executeBigFishCreationAction, executeBigFishCreationAction,
@@ -47,6 +25,26 @@ import {
listPuzzleGallery, listPuzzleGallery,
} from '../../services/puzzle-gallery'; } from '../../services/puzzle-gallery';
import { listPuzzleWorks } from '../../services/puzzle-works'; import { listPuzzleWorks } from '../../services/puzzle-works';
import {
createRpgCreationSession,
executeRpgCreationAction,
getRpgCreationOperation,
getRpgCreationSession,
listRpgCreationWorks,
streamRpgCreationMessage,
upsertRpgWorldProfile,
} from '../../services/rpg-creation';
import {
clearRpgProfileBrowseHistory as clearProfileBrowseHistory,
getRpgEntryWorldGalleryDetail,
getRpgProfileDashboard as getProfileDashboard,
listRpgEntryWorldGallery,
listRpgEntryWorldLibrary,
listRpgProfileBrowseHistory as listProfileBrowseHistory,
listRpgProfileSaveArchives as listProfileSaveArchives,
resumeRpgProfileSaveArchive as resumeProfileSaveArchive,
upsertRpgProfileBrowseHistory as upsertProfileBrowseHistory,
} from '../../services/rpg-entry';
import { import {
deleteRpgEntryWorldProfile, deleteRpgEntryWorldProfile,
getRpgEntryWorldGalleryDetailByCode, getRpgEntryWorldGalleryDetailByCode,