Merge remote-tracking branch 'origin/codex/open-platform'

This commit is contained in:
2026-04-14 20:16:57 +08:00
2 changed files with 11 additions and 10 deletions

View File

@@ -6,5 +6,8 @@ DASHSCOPE_API_KEY="sk-65a0c6fa5e294b9887ace860f9d65990"
EMBEDDING_MODEL="doubao-embedding-text-240715" EMBEDDING_MODEL="doubao-embedding-text-240715"
VOLCENGINE_ACCESS_KEY_ID="AKLTZWFjMmYzZTdjZTIxNDRiNTkzMTZiMTk2NzVmNTUxOGI" VOLCENGINE_ACCESS_KEY_ID="AKLTZWFjMmYzZTdjZTIxNDRiNTkzMTZiMTk2NzVmNTUxOGI"
VOLCENGINE_SECRET_ACCESS_KEY="TURRMk56bGhZalE0TjJReE5ERmpNMkpoTUdaa1lqRmtaVGt5TVRrM1lXSQ==" VOLCENGINE_SECRET_ACCESS_KEY="TURRMk56bGhZalE0TjJReE5ERmpNMkpoTUdaa1lqRmtaVGt5TVRrM1lXSQ=="
WECHAT_AUTH_ENABLED="true" WECHAT_AUTH_ENABLED="false"
WECHAT_AUTH_PROVIDER="mock" WECHAT_AUTH_PROVIDER="mock"
SMS_AUTH_ENABLED="true"
SMS_AUTH_PROVIDER="mock"

View File

@@ -4,9 +4,8 @@ import type {
} from '../../../../packages/shared/src/contracts/story.js'; } from '../../../../packages/shared/src/contracts/story.js';
import { conflict, invalidRequest } from '../../errors.js'; import { conflict, invalidRequest } from '../../errors.js';
import { import {
calculatePlayerBuildSnapshot, getPlayerBuildDamageBreakdown,
type RuntimeGameState as BuildRuntimeGameState, } from '../runtime/runtimeBuildModule.js';
} from '../build/buildCalculationService.js';
import { import {
craftForgeRecipe, craftForgeRecipe,
dismantleInventoryItem, dismantleInventoryItem,
@@ -96,15 +95,14 @@ function refreshSessionFromGameState(
export function buildBuildToast( export function buildBuildToast(
nextState: InventoryMutationSuccess['nextState'], nextState: InventoryMutationSuccess['nextState'],
) { ) {
const snapshot = calculatePlayerBuildSnapshot( if (!nextState.playerCharacter) {
nextState as BuildRuntimeGameState,
);
if (!snapshot.ok) {
return null; return null;
} }
const buildMultiplier = const buildMultiplier = getPlayerBuildDamageBreakdown(
snapshot.value.buildBreakdown.buildDamageMultiplier.toFixed(2); nextState,
nextState.playerCharacter,
).buildDamageMultiplier.toFixed(2);
return `当前 Build 倍率 x${buildMultiplier}`; return `当前 Build 倍率 x${buildMultiplier}`;
} }