feat(小宝): 优化助手入口与预警已读
关键改动: - 更新 README 项目说明和小宝相关入口命名 - 优化问翻小宝页面与侧边栏测试 - 小宝预警已读状态抑制同签名重复 AI 请求 Co-Authored-By: Codex GPT-5 <codex@openai.com>
This commit is contained in:
@@ -87,6 +87,17 @@ export function isXiaobaoWarningUpdated(
|
||||
return readSignature !== currentSignature;
|
||||
}
|
||||
|
||||
export function shouldSkipXiaobaoRiskInsightRequestForReadState(
|
||||
risk: XiaobaoVersionRisk,
|
||||
readStates: XiaobaoWarningReadState[],
|
||||
userId: string | undefined,
|
||||
readStateLoaded: boolean,
|
||||
): boolean {
|
||||
if (!userId) return false;
|
||||
if (!readStateLoaded) return true;
|
||||
return !isXiaobaoWarningUpdated(risk, readStates, userId);
|
||||
}
|
||||
|
||||
export function getXiaobaoWarningUnreadUpdateCount(
|
||||
risks: XiaobaoVersionRisk[],
|
||||
readStates: XiaobaoWarningReadState[],
|
||||
|
||||
Reference in New Issue
Block a user