← Back to Pull requests

feat: 新增问舟 AI 助手并扩展西交通知订阅 #55

Closed
unknown closed this pull request without merging on Aug 14, 2026 02:50 UTC
View on GitHub
unknown unknown commented on Aug 06, 2026 07:29 UTC
Author

概述

本 PR 扩展了西安交通大学通知订阅能力,并新增“问舟”多会话 AI 助手,同时完善 Ctrl+C 退出、冻结打包资源和 AUR 依赖校验。

主要变更

通知订阅

  • 将通知来源迁移到声明式 notification/sources.json,减少站点硬编码。

  • 收录 60 个校内站点、78 个可独立订阅栏目。

  • 默认仅启用教务处通知,避免首次运行订阅过多来源。

  • 按“校级部门、学院与学部、书院、医学教育”组织目录。

  • “西安交通大学”根目录默认展开,其余类别、学科和站点目录默认收起。

  • 单栏目站点不再额外显示冗余的栏目文件夹。

  • 支持来源搜索、站点级三态勾选、快速分类筛选和旧配置兼容。

  • 新增通用 HTML、XPath、RSS、JSON 通知爬虫及详情页日期补全。

  • 保留并复用现有动态挑战处理流程,不为每个学院单独硬编码爬虫。

  • 单个来源抓取失败时记录具体错误,不影响其他来源继续查询。

  • 修复通知页面中浏览、筛选按钮重叠以及窄窗口布局问题。

  • 通知选择界面适配浅色和深色主题。

  • 新增只读在线爬取检查脚本 scripts/smoke_notification_sources.py。
  • 问舟 AI 助手

  • 支持 OpenAI、Anthropic、Gemini、Ollama 及兼容接口。

  • 支持多个本地对话的创建、切换、重命名和删除。

  • 支持在默认紧凑布局与独立对话页面间进行动画切换。

  • 支持 Markdown 与代码高亮显示。

  • 支持读取用户明确勾选的本地通知、课表、成绩和考勤缓存。

  • 成绩均分复用成绩页面现有统计逻辑,避免重复实现。

  • 各类缓存使用独立上下文预算,避免成绩或考勤数据被较大的课表缓存挤出。

  • 缓存为空、缺失或损坏时明确告知模型,并继续完成查询。

  • 联网搜索支持 DuckDuckGo,以及通过自定义 SearXNG 使用 Bing、百度和 Google。

  • 保留用户上次选择的搜索引擎和搜索设置。

  • DuckDuckGo 出现人机验证时自动关闭本次联网搜索。

  • 停用 deepseek-chat 和 deepseek-reasoner,默认使用 DeepSeek V4 模型 ID。

  • API Key 仅保存到系统 Keyring,不写入普通配置文件。
  • 稳定性与构建

  • 增加 Qt 事件循环的 SIGINT 唤醒机制,使 Ctrl+C 可以正常退出。

  • 将通知来源注册表加入 PyInstaller 冻结资源。

  • 补充 Pygments、NumPy 及 AUR 运行依赖。

  • AUR 发布流程会验证依赖是否存在于 Arch 官方仓库或 AUR。

  • 未修改 AUR 版本号和 SHA256,继续由 GitHub Actions 自动更新。

  • 交晓智浏览器原型未接入 UI、启动流程或打包入口,不引入 Qt 6 编译依赖。
  • 范围说明

    本 PR 不包含境外高校来源,也没有将通知入口加入侧边栏。

    课表、考勤以及统一登录/WebVPN 策略相关文件与目标分支保持一致,本 PR 不修改这些业务流程。

    Diff: 173 lines (+129 / -44) across 2 files Reviewer: JimmyWang0417 Review duration: 11240m
    All Vouch review confidence checks passed
    Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 173 lines diff across 2 files
    0.40
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.309
    Shallow Review Depth shallow_review_depth
    0.289
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #55"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 40.3% (MEDIUM) · Higher = larger blast radius
    40.3%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 15.9% · Safe to merge
    15.9%