Skip to content

fix: 微信 /stop 中止检测 + AuthExpired 处理 + 配置向导改进#434

Open
windcat2333 wants to merge 4 commits into
lsdefine:mainfrom
windcat2333:fix/wechat-stop-and-auth-396-416
Open

fix: 微信 /stop 中止检测 + AuthExpired 处理 + 配置向导改进#434
windcat2333 wants to merge 4 commits into
lsdefine:mainfrom
windcat2333:fix/wechat-stop-and-auth-396-416

Conversation

@windcat2333
Copy link
Copy Markdown
Contributor

@windcat2333 windcat2333 commented May 19, 2026

PR: 微信停止检测 / AuthExpired 处理 / 配置向导改进

分支: fix/wechat-stop-and-auth-396-416main
Created: 2026-05-19
Commits: 4 commits, +189/-21


变更概要

类别 数量
✅ 已提交 4 commits
📝 文件变更 3 个
➕ 新增行 189
➖ 删除行 21

变更详情

1. 🐛 /stop 中止检测 + AuthExpired 处理

Commit: f58fdba
文件: frontends/wechatapp.py (+27/-4)

2. 🔧 配置向导支持微信 iLink 二维码扫码

Commit: f44de94
文件: assets/configure_mykey.py (+35)

  • 配置 mykey 时自动触发微信 iLink 二维码扫码流程
  • 用户无需手动跳转,配置体验更流畅

3. 🎨 去除二维码登录的浏览器弹窗

Commit: 0a57a5b
文件: frontends/wechatapp.py (+2/-2)

  • 二维码登录不再弹出浏览器窗口
  • 纯终端显示,适合 SSH / 无 GUI 环境

4. 📦 配置向导重构:备份命名 + LLM 配置保留

Commit: 965e391
文件: assets/configure_mykey.py (+91/-17), ga_cli/cli.py (+7)

备份逻辑重构:

  • 备份文件名标准化:mykey_模型名_平台ID.py
    • 旧格式: mykey.py.bak.20260519_223023
    • 新格式: mykey_deepseek-gpt-4_telegram-qq.py
  • 修改模式不备份(直接在原文件覆写)
  • 新增 _backup_with_name() 辅助函数
  • 修复 backupbackup_path NameError({backup} 应为 {backup_path}

LLM 配置保留:

  • 新增 _parse_existing_llm_cfgs() 解析现有 mykey.py 的 LLM 配置
  • 新建"仅平台"模式时自动保留旧 LLM 配置
  • 修改"仅平台"模式时也保留旧 LLM 配置

通用变量解析:

  • _parse_existing_mykey() 重构为支持 is_list: true 的列表变量
  • 不再硬编码平台映射表,从 PLATFORMS 定义自动推导

CLI 入口:

  • ga_cli/cli.py 新增 tui2 命令,启动 TUI v2 增强版

测试建议

测试场景 预期
已有 mykey.py + 选择"新建" 备份文件名为 mykey_模型名_平台ID.py
已有 mykey.py + 选择"修改" 不备份,直接覆写
首次运行 + 选"仅平台" 写空的 LLM 配置
已有 mykey.py + 选"仅平台" 保留旧 LLM 配置
微信 iLink 二维码 扫码后可正常登录

待确认

  • 代码无语法错误
  • _backup_with_name 防重名(避免与源文件同名为 mykey.py
  • 备份名超长截断为 100 字符

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant