fix(*): 平台稳定性 - 修复会话隔离、运行时缓存与部署镜像更新链路
This commit is contained in:
@@ -4,7 +4,6 @@ import type { GenerationTask, TaskStatus } from "@/services/api/task-center";
|
||||
import type { CanvasDrawingEngineSetting } from "@/lib/canvas/canvas-drawing-engine";
|
||||
import type { FeatureAvailability } from "@/stores/use-user-store";
|
||||
import { http, apiBaseURL } from "@/services/api/request";
|
||||
import type { PublicLogicalModel } from "@/services/api/logical-models";
|
||||
import type { OSSConnectionTestInput, OSSConnectionTestResult, OSSProvider, S3Preset } from "@/lib/oss-settings";
|
||||
import type { VerificationPolicy } from "./verification";
|
||||
|
||||
@@ -42,7 +41,6 @@ export type AdminUser = LocalUser & {
|
||||
|
||||
export type AuthSessionPayload = {
|
||||
user: LocalUser | null;
|
||||
logicalModels?: PublicLogicalModel[];
|
||||
runtimeLimits?: RuntimeLimits;
|
||||
drawingEngine?: CanvasDrawingEngineSetting;
|
||||
features?: FeatureAvailability;
|
||||
|
||||
@@ -111,8 +111,9 @@ export function initializeClientDiagnostics() {
|
||||
export function setDiagnosticUserScope(userId: string) {
|
||||
const next = userId.trim();
|
||||
if (next === scopedUserId) return;
|
||||
const preserveStartupEvents = !scopedUserId && Boolean(next);
|
||||
scopedUserId = next;
|
||||
events.length = 0;
|
||||
if (!preserveStartupEvents) events.length = 0;
|
||||
activeTraceId = createDiagnosticId("trace");
|
||||
}
|
||||
|
||||
@@ -153,6 +154,7 @@ export function getDiagnosticRuntime() {
|
||||
return {
|
||||
appVersion: String(import.meta.env.VITE_APP_VERSION || "dev"),
|
||||
buildCommit: String(import.meta.env.VITE_BUILD_COMMIT || "unknown"),
|
||||
buildTime: String(import.meta.env.VITE_BUILD_TIME || "unknown"),
|
||||
browser: typeof navigator !== "undefined" ? navigator.userAgent : "",
|
||||
os: typeof navigator !== "undefined" ? navigator.platform : "",
|
||||
timezone: Intl.DateTimeFormat().resolvedOptions().timeZone || "",
|
||||
|
||||
@@ -10,6 +10,7 @@ export type DiagnosticExportInput = {
|
||||
runtime: {
|
||||
appVersion?: string;
|
||||
buildCommit?: string;
|
||||
buildTime?: string;
|
||||
browser?: string;
|
||||
os?: string;
|
||||
timezone?: string;
|
||||
|
||||
Reference in New Issue
Block a user