加入「拾语」:首页 AI 近况摘要(流式)

- 汇总学习目录、博客分类与最近更新的 10 篇文章
- 调用本地 Ollama qwen3.8:27b 生成技术栈与最近在做
- 每次生成入库,10 天后首次打开首页自动重新生成
- 前端逐字展开缓存摘要,过期时读取 AI 流式响应
- 首页在开场引导结束后显示;拾脉目录页内嵌展示
- 修复摘要面板标题栏命中全局 header 定位的问题
This commit is contained in:
2026-11-21 13:56:53 +08:00
parent 7c6e5d45d1
commit e3270bcd94
19 changed files with 951 additions and 3 deletions
+7
View File
@@ -9,6 +9,7 @@ from django.utils.text import slugify
from django.views.decorators.http import require_POST
from cabinet.access import is_unlocked, minutes_left, unlock_minutes
from digest.services import DIGEST_DAYS, DIGEST_MODEL, digest_is_stale, latest_digest
from .forms import MindFolderForm, MindMapEditForm, MindMapUploadForm, descendant_ids
from .models import MindFolder, MindMap, make_slug, unique_slug
@@ -57,10 +58,16 @@ def index(request):
)
unfiled = MindMap.objects.filter(folder__isnull=True).order_by("created_at", "id")
all_maps = MindMap.objects.all()
digest = latest_digest()
context = {
"folders": folders,
"unfiled": unfiled,
"digest": digest,
"digest_stale": digest_is_stale(digest),
"digest_days": DIGEST_DAYS,
"digest_model": DIGEST_MODEL,
"digest_inline": True,
"stats": {
"folders": MindFolder.objects.count(),
"maps": all_maps.count(),