From 5a651f3eae88470b05827108966f4698d726d88a Mon Sep 17 00:00:00 2001 From: Suzumiya Date: Sun, 4 Oct 2026 18:45:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=8F=91=E5=B8=83=E9=9D=A2?= =?UTF-8?q?=E6=9D=BF=E5=86=97=E4=BD=99=E6=8F=90=E7=A4=BA=E6=96=87=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - GameDistributionPublishPanel.tsx:删除「项目版本」下的说明段(projectVersionHint 派生逻辑与其 useMemo、以及渲染它的 hint span),面板不再写「发布将使用最新内部版本 v{N}…」「线上最近提交 vN 是平台侧事实…」 - GameDistributionPublishPanel.tsx:删除简介/分类的三态提示文案(「正在根据创作内容生成简介和分类…」/「AI 已根据创作内容生成…」/「已根据创作内容预填…」)及支撑它们的 metadataSuggestionPending、metadataSuggestionReady 两个 state 与请求完成后的置位,保留静默预填行为 - apps/ai-game-creator-shell/src/styles.css:删除随上述提示一起作废的样式(-7 行) - tests/gameDistributionPublishPanel.test.tsx:同步删除对已废弃提示文案的断言(-15 行) --- .../GameDistributionPublishPanel.tsx | 57 ++----------------- apps/ai-game-creator-shell/src/styles.css | 7 --- .../gameDistributionPublishPanel.test.tsx | 15 +---- 3 files changed, 7 insertions(+), 72 deletions(-) diff --git a/apps/ai-game-creator-shell/src/components/game-distribution/GameDistributionPublishPanel.tsx b/apps/ai-game-creator-shell/src/components/game-distribution/GameDistributionPublishPanel.tsx index e8c103f7a..51dc44f27 100644 --- a/apps/ai-game-creator-shell/src/components/game-distribution/GameDistributionPublishPanel.tsx +++ b/apps/ai-game-creator-shell/src/components/game-distribution/GameDistributionPublishPanel.tsx @@ -247,9 +247,6 @@ export function GameDistributionPublishPanel({ const [previewScreenshot, setPreviewScreenshot] = useState(null); const [uploadingLabel, setUploadingLabel] = useState(''); - const [metadataSuggestionPending, setMetadataSuggestionPending] = - useState(false); - const [metadataSuggestionReady, setMetadataSuggestionReady] = useState(false); const [coverConfirmOpen, setCoverConfirmOpen] = useState(false); const [generatingCover, setGeneratingCover] = useState(false); const [coverGenerationPrice, setCoverGenerationPrice] = useState< @@ -282,25 +279,6 @@ export function GameDistributionPublishPanel({ () => resolveGameCreationAppProjectVersion(manifest), [manifest], ); - /** - * 「项目版本」这一格的说明。 - * - * 口径必须与取数一致:发布提交的标签是 `versions.length`(最新内部版本序数), - * **不读**任何"选中版本";资源画布上的选中/「当前版本」只影响「当前版本素材」与运行用哪版播放。 - * 所以这里直说"发布用最新",并写明暂不能指定版本,不用「发布标签」去暗示用户可以挑卡。 - */ - const projectVersionHint = useMemo(() => { - const internalCount = manifest.versions?.length ?? 0; - const label = - internalCount > 0 - ? `发布将使用最新内部版本 v${projectVersion}(标签 = 内部版本条数,暂不能指定其它版本);agent 再改进一次后,下一次是 v${projectVersion + 1}。` - : `这个项目还没有内部版本,本次发布按首版 v${projectVersion}。`; - const platform = - latestVersionNumber > 0 - ? `线上最近提交 v${latestVersionNumber} 是平台侧事实,与本标签互不推导。` - : '第一次发布即第一版。'; - return `${label}${platform}`; - }, [latestVersionNumber, manifest.versions, projectVersion]); const metadataSuggestionRequestRef = useRef(0); const publicationRequestRef = useRef(0); const publicationDraftAppliedRef = useRef(false); @@ -331,8 +309,6 @@ export function GameDistributionPublishPanel({ setBusy(false); setError(''); setResult(null); - setMetadataSuggestionPending(false); - setMetadataSuggestionReady(false); setCoverConfirmOpen(false); setGeneratingCover(false); setCoverGenerationPrice(null); @@ -351,7 +327,6 @@ export function GameDistributionPublishPanel({ uploadedAssetCacheRef.current.clear(); const suggestionRequestId = ++metadataSuggestionRequestRef.current; - setMetadataSuggestionPending(true); void suggestGameDistributionPublishMetadata({ name: manifest.name, goal: manifest.goal, @@ -375,15 +350,9 @@ export function GameDistributionPublishPanel({ ) { setCategory(suggestion.category); } - setMetadataSuggestionReady(true); }) .catch(() => { // 免费增强能力失败时保留本地兜底,不阻断发布。 - }) - .finally(() => { - if (suggestionRequestId === metadataSuggestionRequestRef.current) { - setMetadataSuggestionPending(false); - } }); // 绑定恢复:原生按当前会话(账号 + origin)隔离;网络/401/5xx 返回 unavailable, @@ -940,19 +909,6 @@ export function GameDistributionPublishPanel({ value={projectVersion} /> - - {projectVersionHint} - - - {metadataSuggestionPending - ? '正在根据创作内容生成简介和分类…' - : metadataSuggestionReady - ? 'AI 已根据创作内容生成简介和分类,免费;你可以直接修改。' - : '已根据创作内容预填简介和分类,免费;你可以直接修改。'} -
) : null}
- - {cover - ? `已选择「${cover.name}」;重新选择即可替换封面。` - : '封面会作为游戏广场卡片与详情页首图,建议 16:9 的 JPG/PNG/WebP,最大 6MB。'} - + {cover ? null : ( + + {'封面会作为游戏广场卡片与详情页首图,建议 16:9 的 JPG/PNG/WebP,最大 6MB。'} + + )} {coverGenerationDetail ? ( - - 每张截图独立上传,单张失败不会影响其它截图或发布;鼠标移到成功截图上可删除或预览。 - {screenshots.length > 0 ? (