fix(frontend): restore staging quality gate contracts
This commit is contained in:
+10
-11
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user