feat: 更新首页信息处理模型,支持内存缓存与过期机制;添加全量目录同步脚本
This commit is contained in:
@@ -71,6 +71,7 @@ type Analysis = {
|
||||
outdated: boolean;
|
||||
};
|
||||
type Snapshot = {
|
||||
ephemeral?: boolean;
|
||||
content: Content | null;
|
||||
fetched_at: string | null;
|
||||
error: string | null;
|
||||
@@ -243,7 +244,9 @@ function Interpretation({ state, zone }: { state: Resource; zone: string }) {
|
||||
</>
|
||||
) : (
|
||||
<p className="home-info-muted">
|
||||
手动生成并保存,重新打开首页不会调用模型。
|
||||
{state.data?.ephemeral
|
||||
? "解读仅暂存在内存,不写入数据库;重启或缓存到期后清除。"
|
||||
: "手动生成并保存,重新打开首页不会调用模型。"}
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
@@ -348,7 +351,9 @@ function MessagePage({
|
||||
state={state}
|
||||
zone={zone}
|
||||
>
|
||||
<p className="home-info-muted">来自平台消息的公告、更新及社区资讯。</p>
|
||||
<p className="home-info-muted">
|
||||
仅展示最近一个月的公告、更新及社区资讯(按美东时间筛选),不写入数据库。
|
||||
</p>
|
||||
{content?.items?.length ? (
|
||||
<div className="home-info-feed">
|
||||
{content.items.map((item, index) => (
|
||||
@@ -376,13 +381,15 @@ function MessagePage({
|
||||
))}
|
||||
</div>
|
||||
) : (
|
||||
<Empty>本页暂无平台消息</Empty>
|
||||
<Empty>最近一个月本页暂无平台消息</Empty>
|
||||
)}
|
||||
<div className="home-info-row home-info-pagination">
|
||||
<span className="home-info-muted">
|
||||
从第 {offset + 1} 条开始
|
||||
{content?.total != null ? ` · 平台共 ${content.total} 条` : ""} ·
|
||||
解读仅针对本页
|
||||
{content?.total != null
|
||||
? ` · 最近一个月共 ${content.total} 条`
|
||||
: ""}{" "}
|
||||
· 解读仅针对本页
|
||||
</span>
|
||||
<div className="home-info-actions">
|
||||
<Button size="small" disabled={!back || !!state.busy} onClick={back}>
|
||||
|
||||
Reference in New Issue
Block a user