fix(frontend): restore staging quality gate contracts
Independent Staging Quality Gate / validate (push) Successful in 10m34s
Independent Staging Quality Gate / publish (push) Successful in 10m11s

This commit is contained in:
Jesse_Chen
2026-08-30 17:01:01 +08:00
parent a671986a1d
commit 79f65ac8b0
+10 -11
View File
@@ -2181,11 +2181,11 @@ export default function Home() {
const latest = await fetchAccount();
if (!accountRefreshGuard.current.isCurrent(requestIdentity)) return;
const nextProfile = readProfile(latest.profile);
setProfile((current) => {
const activeOther = activeChartId !== "self" && chartLibrary.find((record) => record.id === activeChartId && record.role === "other");
return activeOther ? current : preserveShallowEqual(current, nextProfile);
});
setProfileDraft(nextProfile);
const activeOther = activeChartId !== "self"
&& chartLibrary.find((record) => record.id === activeChartId && record.role === "other");
if (!activeOther) {
setProfile((current) => preserveShallowEqual(current, nextProfile));
}
setAccount(latest);
setAccountError("");
} catch (caught) {
@@ -2300,11 +2300,10 @@ export default function Home() {
async function startNewChat(): Promise<ChatSession | null> {
if (!account || !modelCatalog || creatingSession) return null;
const nextSession = createSession(
modelCatalog.defaultModelId,
"consultation",
chartSnapshotForSession(activeChartId, chartLibrary, profile),
);
const nextSession = {
...createSession(modelCatalog.defaultModelId),
...chartSnapshotForSession(activeChartId, chartLibrary, profile),
};
const previousSessionId = activeSession?.id ?? "";
setCreatingSession(true);
setSessions((current) => [nextSession, ...current]);
@@ -4029,7 +4028,7 @@ export default function Home() {
{avatarNotice && <p className="form-success avatar-notice" role="status">{avatarNotice}</p>}
</section>
)}
<section className="sheet-section account-info-section" aria-labelledby="account-info-title">
<section className="sheet-section" aria-labelledby="account-info-title">
<div className="section-heading"><b id="account-info-title"></b><small></small></div>
<dl className="account-info-list">
<div><dt></dt><dd>{profile.name.trim() || "尚未设置"}<small></small></dd></div>