加入「拾语」:首页 AI 近况摘要(流式)
- 汇总学习目录、博客分类与最近更新的 10 篇文章 - 调用本地 Ollama qwen3.8:27b 生成技术栈与最近在做 - 每次生成入库,10 天后首次打开首页自动重新生成 - 前端逐字展开缓存摘要,过期时读取 AI 流式响应 - 首页在开场引导结束后显示;拾脉目录页内嵌展示 - 修复摘要面板标题栏命中全局 header 定位的问题
This commit is contained in:
@@ -22,6 +22,8 @@
|
||||
<div class="mm-stat"><b>{{ stats.nodes }}</b><span>节点</span></div>
|
||||
</div>
|
||||
|
||||
{% include "digest/_panel.html" %}
|
||||
|
||||
<div class="mm-toolbar">
|
||||
{% if unlocked %}
|
||||
<button class="mm-btn mm-btn-primary" id="mmNewFolderBtn" type="button">+ 新建目录</button>
|
||||
@@ -115,8 +117,10 @@
|
||||
|
||||
{% block extra_css %}
|
||||
<link rel="stylesheet" href="{% static 'mindmaps/mindmaps.css' %}">
|
||||
<link rel="stylesheet" href="{% static 'digest/digest.css' %}">
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_js %}
|
||||
<script src="{% static 'mindmaps/mindmaps.js' %}"></script>
|
||||
<script src="{% static 'digest/digest.js' %}"></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user