Skip to content

新增:Qoder 账号设置支持自动获取网页 Cookie - #417

Open
hebingking wants to merge 2 commits into
aimod-cc:betafrom
hebingking:feat/qoder-web-cookie
Open

hebingking wants to merge 2 commits into
aimod-cc:betafrom
hebingking:feat/qoder-web-cookie

Conversation

@hebingking

@hebingking hebingking commented Oct 31, 2026 •

Copy link
Copy Markdown

概述

配合 ProvidersPlugin/Agent2Providers#23,在桌面端为 Qoder 账号增加「网页 Cookie」自动获取入口。Cookie 只用于读取逐份积分包到期时间,不参与聊天或续期。

改动

  • 新增 /api/qoder-cookie/info|set|clear,转插件的 webcookie.info/set/clear 管理动作。
  • Tauri 新增 capture_qoder_web_cookie:内嵌 WebView 打开 Qoder 账号页,登录后读取 HttpOnly 的 qoder_session_cookie,提交后端保存。
  • Qoder 账号设置「凭证与套餐」增加网页 Cookie 状态、获取/重新获取按钮。
  • 组内没有任何 Qoder 账号配置网页 Cookie 时,不默认启用「积分到期时间」;分组设置显示「未获取网页 Cookie / 待配置」,摘要回落手动顺序。 后端 rules_for 同步压掉已保存的 credit 规则,避免界面与实际默认口径不一致。
  • 未配置 Cookie 的 Qoder 组行为只影响 Qoder;其他提供商保持原默认。
  • 更新账号页对 Qoder 到期排序能力的说明,并重建前端产物。

依赖

验证

  • 主程序 cargo check 通过;ui-islands 的 tsc + vite build 通过。
  • 无 Cookie 的 Qoder 组:默认/有效 credit 规则关闭,分组设置显示「未获取网页 Cookie / 待配置」,摘要为手动顺序;其他提供商不受影响。
  • dev 端真实中国版账号:点击获取 → 内嵌窗口登录 → 保存成功,日志为 [Qoder] 网页 Cookie 已保存(…读到 7 份积分包);测试库 usage 中生成 7 条带 expireAt 的逐包行。
  • 国际版路径已实现,但未用国际版 Cookie 实测。

说明

  • 手动粘贴字段暂未接入旧版 Qoder 添加表单;桌面端走自动获取,无头/网页端后续可补手动入口。

🤖 本条回复由 AI Agent 生成
Generated by an AI agent.

- 新增 /api/qoder-cookie/info|set|clear,转插件 webcookie.* 动作
- Tauri 内嵌 WebView 登录后读取 qoder_session_cookie 并保存
- Qoder 账号设置增加网页 Cookie 获取入口与状态
- 同步账号页支持 Qoder 到期排序的说明与前端产物
- 前端分组默认/有效规则在 Qoder 组没有 hasWebCookie 时关闭 credit 规则
- 分组设置显示「未获取网页 Cookie / 待配置」,摘要回落到仅手动顺序
- 后端 rules_for 在 Qoder 无 Cookie 时压掉已保存的 credit 规则
- 其他提供商与 Qoder 已配置 Cookie 的分组行为不变
xiarunjie added a commit to xiarunjie/Agent2API that referenced this pull request Nov 3, 2026
xiarunjie added a commit to xiarunjie/Agent2API that referenced this pull request Nov 4, 2026
本提交把 main 的内容整体切到上游 v3.4.0 的发布状态(tag v3.4.0 = 31bc7bd,其后
0add462 重建了手机端与 Service Worker 产物并把版本号跟到 3.4.0):

  · 此前在 beta.6 基线上同步进来的 8 条上游 PR 内容(aimod-cc#305 aimod-cc#311 aimod-cc#343 aimod-cc#415 aimod-cc#417
    aimod-cc#418 aimod-cc#434 aimod-cc#449)不再出现在 main 上 —— 它们都改在 beta.6 的旧落点,其中相当
    一部分与 3.4.0 自带的实现(路由工作台、会话图片压缩)在同一批文件上各走了
    一条路(实测 43 个文件内容分叉)。旧状态完整保留在 archive-main-pre-340
    (分支与 tag 同名),需要时可逐条取回。
  · 前端产物取自上游 3.4.0 自己的构建结果,与上游源码逐字节同源。
  · 基线切齐后,「哪些上游 PR 还能合」可用硬证据重新判定,而不是在分叉状态上叠。

上游对照:aimod-cc/Agent2API @ 0add462(tree 4ffbf15)
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.

2 participants