统一 Rust 与 TypeScript 格式化门禁

纳入 AGC Cargo workspace 的统一 rustfmt 检查与格式化入口

完成项目 TypeScript/Prettier 与 Rust 全量格式化

修复 Pingora expected executable 门禁的空白敏感误报

同步开发运维文档与 AGC skill pack 格式化忽略规则
This commit is contained in:
2026-09-01 16:26:20 +08:00
parent ae79d50b14
commit 071faa482c
1051 changed files with 28412 additions and 19834 deletions
@@ -755,7 +755,7 @@ function resolveExternalGenerationTaskCompletionDialog(
source: task.requestLabel.trim() || task.jobKind || task.jobId,
message:
task.status === 'failed'
? (task.error?.trim() || '生成失败。')
? task.error?.trim() || '生成失败。'
: '生成已完成。',
})),
};
@@ -1713,8 +1713,7 @@ export function PlatformEntryFlowShellImpl({
const [showCreationTypeModal, setShowCreationTypeModal] = useState(false);
const [isMobileHomeWelcomeDismissed, setIsMobileHomeWelcomeDismissed] =
useState(false);
const [isCreationCommunityOpen, setIsCreationCommunityOpen] =
useState(false);
const [isCreationCommunityOpen, setIsCreationCommunityOpen] = useState(false);
const [draftGenerationPointNotice, setDraftGenerationPointNotice] =
useState<DraftGenerationPointNotice | null>(null);
const [selectedDetailEntry, setSelectedDetailEntry] =
@@ -1878,9 +1877,8 @@ export function PlatformEntryFlowShellImpl({
const [isStartingRecommendEntry, setIsStartingRecommendEntry] =
useState(false);
const recommendRuntimeStartRequestRef = useRef(0);
const [puzzleOperation, setPuzzleOperation] = useState<PuzzleAgentOperationRecord | null>(
null,
);
const [puzzleOperation, setPuzzleOperation] =
useState<PuzzleAgentOperationRecord | null>(null);
const [externalGenerationTasks, setExternalGenerationTasks] = useState<
ExternalGenerationTaskRecord[]
>([]);
@@ -3770,10 +3768,7 @@ export function PlatformEntryFlowShellImpl({
}, []);
const openEditorProject = useCallback(
(
projectId: string,
options?: { guide?: boolean; tool?: string },
) => {
(projectId: string, options?: { guide?: boolean; tool?: string }) => {
const params = new URLSearchParams({ projectid: projectId });
if (options?.tool) {
params.set('tool', options.tool);
@@ -5003,10 +4998,9 @@ export function PlatformEntryFlowShellImpl({
woodenFishQueueState?.status === 'running';
const shouldPollExternalGenerationTasks =
platformBootstrap.canReadProtectedData && Boolean(authUi?.user?.id);
const externalGenerationQueueOwnerKey =
shouldPollExternalGenerationTasks
? (authUi?.user?.id ?? 'anonymous')
: null;
const externalGenerationQueueOwnerKey = shouldPollExternalGenerationTasks
? (authUi?.user?.id ?? 'anonymous')
: null;
useEffect(() => {
acknowledgingExternalGenerationDialogKeysRef.current.clear();
@@ -5016,10 +5010,7 @@ export function PlatformEntryFlowShellImpl({
}, [externalGenerationQueueOwnerKey]);
useEffect(() => {
if (
!shouldPollExternalGenerationTasks ||
!isHostNetworkOnline
) {
if (!shouldPollExternalGenerationTasks || !isHostNetworkOnline) {
return;
}
@@ -5377,7 +5368,8 @@ export function PlatformEntryFlowShellImpl({
]);
const externalGenerationTaskCompletionDialog =
useMemo<PlatformTaskCompletionDialogState | null>(
() => resolveExternalGenerationTaskCompletionDialog(externalGenerationTasks),
() =>
resolveExternalGenerationTaskCompletionDialog(externalGenerationTasks),
[externalGenerationTasks],
);
const currentPlatformTaskCompletionDialog =
@@ -7750,10 +7742,11 @@ export function PlatformEntryFlowShellImpl({
setVisualNovelError(null);
setIsVisualNovelBusy(true);
try {
const runtimeRequestOptions =
await buildRecommendRuntimeRequestOptions({
const runtimeRequestOptions = await buildRecommendRuntimeRequestOptions(
{
kind: 'visual-novel',
});
},
);
const nextRun = await streamVisualNovelRuntimeAction(
visualNovelRun.runId,
payload,
@@ -8248,12 +8241,13 @@ export function PlatformEntryFlowShellImpl({
setJumpHopError(null);
setJumpHopRuntimeReturnStage(options.returnStage ?? 'work-detail');
try {
const runtimeRequestOptions =
await buildRecommendRuntimeRequestOptions({
const runtimeRequestOptions = await buildRecommendRuntimeRequestOptions(
{
kind: 'jump-hop',
embedded: options.embedded,
forcePublicRuntime: shouldUseRecommendRuntimeGuestAuth(authUi),
});
},
);
setJumpHopRuntimeRequestOptions(
Object.keys(runtimeRequestOptions).length > 0
? runtimeRequestOptions
@@ -8764,16 +8758,20 @@ export function PlatformEntryFlowShellImpl({
setPuzzleClearError(null);
setPuzzleClearRuntimeReturnStage(options.returnStage ?? 'work-detail');
try {
const runtimeRequestOptions =
await buildRecommendRuntimeRequestOptions({
const runtimeRequestOptions = await buildRecommendRuntimeRequestOptions(
{
kind: 'puzzle-clear',
embedded: options.embedded,
});
},
);
const [detail, runResponse] = await Promise.all([
puzzleClearClient
.getRuntimeWorkDetail(normalizedProfileId)
.catch(() => null),
puzzleClearClient.startRun(normalizedProfileId, runtimeRequestOptions),
puzzleClearClient.startRun(
normalizedProfileId,
runtimeRequestOptions,
),
]);
if (detail?.item) {
setPuzzleClearWork(detail.item);
@@ -8823,10 +8821,9 @@ export function PlatformEntryFlowShellImpl({
setIsPuzzleClearBusy(true);
setPuzzleClearError(null);
try {
const runtimeRequestOptions =
await buildRecommendRuntimeRequestOptions({
kind: 'puzzle-clear',
});
const runtimeRequestOptions = await buildRecommendRuntimeRequestOptions({
kind: 'puzzle-clear',
});
const response = await puzzleClearClient.retryLevel(
runId,
runtimeRequestOptions,
@@ -8868,10 +8865,9 @@ export function PlatformEntryFlowShellImpl({
setIsPuzzleClearBusy(true);
setPuzzleClearError(null);
try {
const runtimeRequestOptions =
await buildRecommendRuntimeRequestOptions({
kind: 'puzzle-clear',
});
const runtimeRequestOptions = await buildRecommendRuntimeRequestOptions({
kind: 'puzzle-clear',
});
const response = await puzzleClearClient.advanceNextLevel(
runId,
runtimeRequestOptions,
@@ -8903,10 +8899,9 @@ export function PlatformEntryFlowShellImpl({
}
try {
const runtimeRequestOptions =
await buildRecommendRuntimeRequestOptions({
kind: 'puzzle-clear',
});
const runtimeRequestOptions = await buildRecommendRuntimeRequestOptions({
kind: 'puzzle-clear',
});
const response = await puzzleClearClient.markTimeUp(
runId,
runtimeRequestOptions,
@@ -8936,10 +8931,11 @@ export function PlatformEntryFlowShellImpl({
return;
}
try {
const runtimeRequestOptions =
await buildRecommendRuntimeRequestOptions({
const runtimeRequestOptions = await buildRecommendRuntimeRequestOptions(
{
kind: 'puzzle-clear',
});
},
);
const response = await puzzleClearClient.swapCards(
runId,
payload,
@@ -9334,11 +9330,12 @@ export function PlatformEntryFlowShellImpl({
setWoodenFishError(null);
setWoodenFishRuntimeReturnStage(options.returnStage ?? 'work-detail');
try {
const runtimeRequestOptions =
await buildRecommendRuntimeRequestOptions({
const runtimeRequestOptions = await buildRecommendRuntimeRequestOptions(
{
kind: 'wooden-fish',
embedded: options.embedded,
});
},
);
const [detail, runResponse] = await Promise.all([
woodenFishClient.getWorkDetail(normalizedProfileId).catch(() => null),
options.embedded
@@ -9383,10 +9380,9 @@ export function PlatformEntryFlowShellImpl({
if (!runId) {
return;
}
const runtimeRequestOptions =
await buildRecommendRuntimeRequestOptions({
kind: 'wooden-fish',
});
const runtimeRequestOptions = await buildRecommendRuntimeRequestOptions({
kind: 'wooden-fish',
});
const response = await woodenFishClient.checkpointRun(
runId,
payload,
@@ -9430,7 +9426,10 @@ export function PlatformEntryFlowShellImpl({
continue;
}
const latestLevel = findPuzzleActionLevel(response.session, payload);
const latestLevel = findPuzzleActionLevel(
response.session,
payload,
);
if (latestLevel?.generationStatus === 'failed') {
const errorMessage = '拼图图片生成失败,请调整描述后重试。';
const failedGenerationState =
@@ -10011,12 +10010,13 @@ export function PlatformEntryFlowShellImpl({
runtimeProfile.generatedBackgroundAsset,
{ expireSeconds: 300 },
);
const runtimeRequestOptions =
await buildRecommendRuntimeRequestOptions({
const runtimeRequestOptions = await buildRecommendRuntimeRequestOptions(
{
kind: 'match3d',
embedded: options.embedded,
forcePublicRuntime: options.authMode === 'isolated',
});
},
);
const runtimeOptions = {
...runtimeRequestOptions,
...(typeof options.itemTypeCountOverride === 'number'
@@ -10091,11 +10091,12 @@ export function PlatformEntryFlowShellImpl({
setSquareHoleError(null);
try {
const runtimeRequestOptions =
await buildRecommendRuntimeRequestOptions({
const runtimeRequestOptions = await buildRecommendRuntimeRequestOptions(
{
kind: 'square-hole',
embedded: options.embedded,
});
},
);
const { run } = options.embedded
? await startSquareHoleRun(profile.profileId, runtimeRequestOptions)
: await startSquareHoleRun(profile.profileId);
@@ -10272,10 +10273,11 @@ export function PlatformEntryFlowShellImpl({
bigFishInputInFlightRef.current = true;
try {
const runtimeRequestOptions =
await buildRecommendRuntimeRequestOptions({
const runtimeRequestOptions = await buildRecommendRuntimeRequestOptions(
{
kind: 'big-fish',
});
},
);
const { run } = await submitBigFishRuntimeInput(
bigFishRun.runId,
payload,
@@ -10767,7 +10769,11 @@ export function PlatformEntryFlowShellImpl({
const submitLeaderboardPromise = buildPuzzleRuntimeRequestOptions().then(
(runtimeRequestOptions) =>
submitPuzzleLeaderboard(puzzleRun.runId, payload, runtimeRequestOptions),
submitPuzzleLeaderboard(
puzzleRun.runId,
payload,
runtimeRequestOptions,
),
);
void submitLeaderboardPromise
@@ -13451,11 +13457,12 @@ export function PlatformEntryFlowShellImpl({
setBigFishRuntimeReturnStage(returnStage);
setBigFishRun(null);
try {
const runtimeRequestOptions =
await buildRecommendRuntimeRequestOptions({
const runtimeRequestOptions = await buildRecommendRuntimeRequestOptions(
{
kind: 'big-fish',
embedded: options.embedded,
});
},
);
const { run } = options.embedded
? await startBigFishRuntimeRun(sessionId, runtimeRequestOptions)
: await startBigFishRuntimeRun(sessionId);
@@ -13468,7 +13475,11 @@ export function PlatformEntryFlowShellImpl({
);
}
const recordPlayPromise = options.embedded
? recordBigFishPlay(sessionId, { elapsedMs: 0 }, runtimeRequestOptions)
? recordBigFishPlay(
sessionId,
{ elapsedMs: 0 },
runtimeRequestOptions,
)
: recordBigFishPlay(sessionId, { elapsedMs: 0 });
void recordPlayPromise.catch((error) => {
setBigFishError(
@@ -13511,11 +13522,12 @@ export function PlatformEntryFlowShellImpl({
);
setBarkBattleRuntimeReturnStage(returnStage);
try {
const runtimeRequestOptions =
await buildRecommendRuntimeRequestOptions({
const runtimeRequestOptions = await buildRecommendRuntimeRequestOptions(
{
kind: 'bark-battle',
embedded: options.embedded,
});
},
);
setBarkBattleRuntimeRequestOptions(
Object.keys(runtimeRequestOptions).length > 0
? runtimeRequestOptions
@@ -14200,7 +14212,10 @@ export function PlatformEntryFlowShellImpl({
kind: 'square-hole',
})
.then((runtimeRequestOptions) =>
restartSquareHoleRun(squareHoleRun.runId, runtimeRequestOptions),
restartSquareHoleRun(
squareHoleRun.runId,
runtimeRequestOptions,
),
)
.then(({ run }) => {
setSquareHoleRun(run);
@@ -14426,11 +14441,7 @@ export function PlatformEntryFlowShellImpl({
}
postRecommendEntryMiniProgramShareTarget(activeRecommendEntry);
}, [
activeRecommendEntry,
platformBootstrap.platformTab,
selectionStage,
]);
}, [activeRecommendEntry, platformBootstrap.platformTab, selectionStage]);
useEffect(() => {
const decision = resolvePlatformRecommendRuntimeAutoStartDecision({
@@ -15548,9 +15559,7 @@ export function PlatformEntryFlowShellImpl({
);
const projectGalleryContent = (
<Suspense fallback={<LazyPanelFallback label="正在加载项目..." />}>
<ProjectGalleryView
onOpenProject={openEditorProject}
/>
<ProjectGalleryView onOpenProject={openEditorProject} />
</Suspense>
);
const handlePlatformHomeTabChange = useCallback(
@@ -15583,7 +15592,9 @@ export function PlatformEntryFlowShellImpl({
? 'create'
: platformBootstrap.platformTab
}
activeDesktopNavTab={selectionStage === 'project' ? 'projects' : undefined}
activeDesktopNavTab={
selectionStage === 'project' ? 'projects' : undefined
}
allowHiddenActiveTab={
initialPlatformTab === 'create' ||
selectionStage === 'creation-home' ||
@@ -15651,10 +15662,7 @@ export function PlatformEntryFlowShellImpl({
(isPuzzleBusy &&
!(activeRecommendRuntimeKind === 'puzzle' && puzzleRun)) ||
(isPuzzleClearBusy &&
!(
activeRecommendRuntimeKind === 'puzzle-clear' &&
puzzleClearRun
)) ||
!(activeRecommendRuntimeKind === 'puzzle-clear' && puzzleClearRun)) ||
isMatch3DBusy ||
isSquareHoleBusy ||
isVisualNovelBusy ||