关于本站
-- DNFS 树状笔记是一个以树状结构组织内容的笔记社区:每个节点都可以生长出子节点, - 像树枝一样层层延展,让知识自然成体系。支持 Markdown 文本、链接卡片、图片与文件分享, - 注册登录后即可创建属于你自己的知识树。 -
-From 27ab50ae68f9d1a43ef0ade1013ce4c23731b2ce Mon Sep 17 00:00:00 2001 From: qing <1776177662@qq.com> Date: Sat, 1 Aug 2026 20:53:40 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix(aibox/botops):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E8=BE=93=E5=87=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 服务端:is_continuation(工具调用后递归继续)时不再重复发送 "思考中"提示和reasoning_start信号,避免多轮工具调用时侧栏 出现多条冗余"思考中"消息 2. BotOps:line消息过滤前缀从5个扩展到9个,过滤掉"分析工具结果" "需要调用工具"等被后续具体信息覆盖的过渡提示 3. BotOps:移除危险的fallback分支(未知消息类型直接append到AI 聊天区),改为写入侧栏日志,防止非AI内容污染回复 --- BotOps/app.py | 15 +++++++++++---- aibox/aibox.py | 4 +++- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/BotOps/app.py b/BotOps/app.py index ca3170f..0b8f450 100644 --- a/BotOps/app.py +++ b/BotOps/app.py @@ -186,10 +186,16 @@ class BotOpsApp(App): stripped = content.strip() if not stripped: pass - elif stripped.startswith(("💬 助手", "💬 Assistant", "🤔 思考中", "🤔 Thinking", "🤔 深度思考中")): - pass # 助手前缀 / 思考提示:聊天区已有对应区域,无需展示 + elif stripped.startswith(( + "💬 助手", "💬 Assistant", # 助手前缀(聊天区已有对应区域) + "🤔 思考中", "🤔 Thinking", # 思考提示(聊天区已有思考区域) + "🤔 深度思考中", + "🤔 分析工具结果", "🤔 Analyzing", # 工具分析提示(后续有具体工具输出,此为冗余) + "🔧 需要调用工具", "🔧 Need to call",# 工具调用前置提示(后续有"调用工具: xxx"具体提示) + )): + pass # 冗余/有替代展示的提示行,过滤避免重复 else: - # 🔧 调用工具 / 工具输出 / 🤔 分析工具结果 等 → 任务侧栏 + # 🔧 调用工具: xxx / 工具输出 / 用户中断提示等 → 任务侧栏 self.tasks.write(stripped) elif t == "complete": # complete 携带完整全文,用于对齐已显示内容 @@ -244,7 +250,8 @@ class BotOpsApp(App): elif t == "notification": await self.notify_system(f"🔔 {content}") elif content: - await self.chat.append_ai(content) + # 未知消息类型不追加到AI聊天区(避免非AI内容污染回复),仅记入侧栏日志 + self.tasks.write(f"[未知消息 type={t}] {str(content)[:200]}") # ── 连接状态回调 ────────────────────────────────────────────────────── async def _on_ws_state(self, state: str, detail: str): diff --git a/aibox/aibox.py b/aibox/aibox.py index 86284a1..2334e97 100644 --- a/aibox/aibox.py +++ b/aibox/aibox.py @@ -7267,7 +7267,9 @@ class DeepSeekChat: payload["tool_choice"] = "auto" current_time = datetime.now().strftime("%H:%M:%S") - if output_callback: + if output_callback and not is_continuation: + # 工具调用后的递归继续(is_continuation=True)时不重复发送"思考中"提示, + # 因为前端已处于活跃AI状态,重复提示会导致冗余/重复输出 output_callback("line", f"\n{i18n.get('thinking', current_time)}\n") if constants.REASONING_ENABLED: output_callback("reasoning_start", "🤔 思考中...") From 66963092a3e9db5affeb2bce6f0d9e93f4a6004e Mon Sep 17 00:00:00 2001 From: qing <1776177662@qq.com> Date: Sat, 1 Aug 2026 20:56:39 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat(static):=20=E4=BC=98=E5=8C=96=E7=A4=BE?= =?UTF-8?q?=E5=8C=BA=E9=A6=96=E9=A1=B5=20=E2=80=94=20Hero=E9=A6=96?= =?UTF-8?q?=E5=B1=8F+=E7=89=B9=E6=80=A7=E5=8D=A1=E7=89=87+=E6=82=AC?= =?UTF-8?q?=E6=B5=AE=E6=AF=9B=E7=8E=BB=E7=92=83=E5=AF=BC=E8=88=AA=EF=BC=8C?= =?UTF-8?q?CTA=E9=9A=8F=E7=99=BB=E5=BD=95=E6=80=81=E5=88=87=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/public/css/index.css | 203 ++++++++++++++++++++++++++++++++++-- static/public/index.html | 102 ++++++++++++++---- static/public/js/index.js | 20 +++- 3 files changed, 292 insertions(+), 33 deletions(-) diff --git a/static/public/css/index.css b/static/public/css/index.css index 73597f3..2b933e0 100644 --- a/static/public/css/index.css +++ b/static/public/css/index.css @@ -4,31 +4,177 @@ body { align-items: normal; } -/* ===== 头部 ===== */ +@media (prefers-reduced-motion: no-preference) { + html { scroll-behavior: smooth; } +} + +/* ===== 按钮 ===== */ +.btn { + display: inline-flex; + align-items: center; + justify-content: center; + padding: 0.55rem 1.3rem; + font-size: 0.88rem; + font-weight: 600; + font-family: inherit; + border: 1px solid transparent; + border-radius: var(--radius-sm); + cursor: pointer; + text-decoration: none; + line-height: 1.4; + transition: opacity 0.15s, transform 0.1s, background 0.15s, border-color 0.15s; +} +.btn:active { transform: scale(0.96); } +.btn-primary { background: var(--accent); color: #fff; } +.btn-primary:hover { background: var(--accent-dark); opacity: 1; } +.btn-ghost { background: var(--accent-soft); color: var(--accent-dark); } +.btn-ghost:hover { border-color: var(--accent); opacity: 1; } +.btn-lg { padding: 0.7rem 1.9rem; font-size: 1rem; border-radius: var(--radius-md); } + +/* ===== 头部:悬浮毛玻璃导航(镜像 minimap/userpanel 风格) ===== */ .header { + position: sticky; + top: 0.75rem; + z-index: 100; display: flex; justify-content: space-between; align-items: center; + flex-wrap: wrap; + gap: 0.5rem; width: 100%; + max-width: 960px; + margin: 0 auto; + padding: 0.5rem 1rem; + border-radius: var(--radius-md); + background: rgba(253, 246, 238, 0.72); + border: 1px solid var(--border-light); + backdrop-filter: blur(12px); + -webkit-backdrop-filter: blur(12px); + box-shadow: var(--shadow-md); + transition: background 0.2s, border-color 0.2s; } +@media (prefers-color-scheme: dark) { + .header { + background: rgba(30, 23, 18, 0.72); + border-color: var(--border); + } +} + +.header h1 { + font-size: 1.15rem; + cursor: pointer; + user-select: none; + transition: color 0.15s; +} +.header h1:hover { color: var(--accent); } .right-group { display: flex; align-items: center; -} - -.right-group > img, -.right-group > b, -.right-group > button { - margin-left: 5px; - margin-right: 5px; + flex-wrap: wrap; + gap: 0.4rem; } #avatar { + width: 36px; + height: 36px; border-radius: 50%; + border: 1.5px solid var(--border); + object-fit: cover; } -/* ===== 网站简介 ===== */ +#name { + font-size: 0.88rem; + max-width: 120px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +/* ===== Hero 首屏 ===== */ +.hero { + position: relative; + text-align: center; + padding: 4rem 1rem 3rem; +} +.hero::before { + content: ""; + position: absolute; + inset: 0; + background: radial-gradient(ellipse 60% 50% at 50% 30%, var(--accent-glow), transparent 70%); + pointer-events: none; +} +.hero > * { position: relative; } +.hero-title { + font-size: clamp(1.8rem, 5vw, 2.6rem); + font-weight: 800; + line-height: 1.35; + letter-spacing: 0.02em; + margin-bottom: 0.75rem; +} +.accent-text { color: var(--accent); } +.hero-sub { + font-size: 1.05rem; + color: var(--fg-secondary); +} +.hero-actions { + display: flex; + justify-content: center; + flex-wrap: wrap; + gap: 0.75rem; + margin-top: 1.75rem; +} + +/* ===== 特性卡片 ===== */ +.section-title { + text-align: center; + margin-top: 3rem; +} +.features { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); + gap: 0.9rem; + width: 100%; + max-width: 960px; + margin: 0 auto; +} +.feature-card { + background: var(--card); + border: 1px solid var(--border-light); + border-radius: var(--radius-md); + padding: 1.4rem 1.25rem; + box-shadow: var(--shadow-sm); + transition: transform 0.18s, box-shadow 0.2s, border-color 0.2s; +} +.feature-card:hover { + transform: translateY(-3px); + border-color: var(--border); + box-shadow: var(--shadow-md); +} +.feature-icon { + display: flex; + align-items: center; + justify-content: center; + width: 38px; + height: 38px; + margin-bottom: 0.75rem; + border-radius: var(--radius-sm); + background: var(--accent-soft); + color: var(--accent-dark); +} +.feature-icon svg { width: 20px; height: 20px; } +.feature-card h3 { margin-bottom: 0.35rem; } +.feature-card p { + font-size: 0.86rem; + line-height: 1.65; + color: var(--fg-secondary); +} + +/* ===== 关于本站 ===== */ +.about { + text-align: center; + padding-bottom: 2rem; +} .site-intro { max-width: 640px; margin: 0 auto; @@ -36,3 +182,42 @@ body { line-height: 1.9; color: var(--fg-secondary); } +.quick-links { + display: flex; + justify-content: center; + flex-wrap: wrap; + gap: 1.25rem; + margin-top: 1.5rem; +} +.quick-links a { + font-size: 0.85rem; + color: var(--muted); + text-decoration: none; + transition: color 0.15s; +} +.quick-links a:hover { color: var(--accent); } + +/* ===== 入场动画 ===== */ +@keyframes fade-up { + from { opacity: 0; transform: translateY(12px); } + to { opacity: 1; transform: none; } +} +@media (prefers-reduced-motion: no-preference) { + .hero > *, .feature-card, .about { animation: fade-up 0.5s ease both; } + .hero-sub { animation-delay: 0.08s; } + .hero-actions { animation-delay: 0.16s; } + .feature-card:nth-child(2) { animation-delay: 0.06s; } + .feature-card:nth-child(3) { animation-delay: 0.12s; } + .feature-card:nth-child(4) { animation-delay: 0.18s; } +} + +/* ===== 响应式 ===== */ +@media (max-width: 480px) { + .header { top: 0.5rem; padding: 0.45rem 0.75rem; } + .header h1 { font-size: 1rem; } + #name { max-width: 72px; } + .hero { padding: 2.5rem 0.5rem 2rem; } + .hero-sub { font-size: 0.95rem; } + .hero-actions { flex-direction: column; align-items: stretch; } + .section-title { margin-top: 2rem; } +} diff --git a/static/public/index.html b/static/public/index.html index e2b1eff..f6c31b9 100644 --- a/static/public/index.html +++ b/static/public/index.html @@ -1,35 +1,91 @@
- + + + + + -- DNFS 树状笔记是一个以树状结构组织内容的笔记社区:每个节点都可以生长出子节点, - 像树枝一样层层延展,让知识自然成体系。支持 Markdown 文本、链接卡片、图片与文件分享, - 注册登录后即可创建属于你自己的知识树。 -
-每个节点都可以生长出子节点,像树枝一样层层延展
+每个节点都能生长出子节点,像树枝般层层延展,让零散的想法自然汇聚成体系。
+原生支持 Markdown 渲染,代码块、引用、列表一应俱全,专注内容本身。
+链接卡片、图片直显、文件下载,多种内容形态一站承载,分享更自由。
+跟随系统偏好自动切换明暗主题,日夜皆宜的舒适阅读体验。
++ DNFS 树状笔记是一个以树状结构组织内容的笔记社区:每个节点都可以生长出子节点, + 像树枝一样层层延展,让知识自然成体系。支持 Markdown 文本、链接卡片、图片与文件分享, + 注册登录后即可创建属于你自己的知识树。 +
+ +