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 的分组行为不变
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