Repository navigation
feat(keys): 支持将 API 密钥导入 Magpie - #861
Merged
ranxi2001 merged 3 commits intoNov 15, 2026
Merged
Conversation
Hand off the selected key and its supported gateway endpoints to the existing Magpie desktop confirmation page. Keep the CCS action independent and do not guess endpoints for unsupported groups. Verified on the v2.21.3 production base: 193 targeted frontend tests (Magpie, key view, CCS and i18n), ESLint on the six changed files, production frontend build, and git diff --check. The contributor also verified the browser-to-desktop flow on Windows on the original fork build; no new native test was run on this PR build. (cherry picked from commit d9c828b) Co-Authored-By: Claude Code <noreply@anthropic.com>
Owner
|
维护定位(固定 head
该后端测试也存在 production。当前 PR 仍保留失败门槛;维护下一修复槽处理共享测试,避免向外部 fork 分支擅自推送。UI 部分另需按 CONTRIBUTING 和 PR 模板补足真实 CSS 的脱敏前后截图原生附件,以及完整验收/Agent 披露;当前正文没有这些证据。未独审通过,不作 ready/merge。 |
12 tasks done
ranxi2001
changed the base branch from
production
to
feat/bps-search-settings-20261115
November 15, 2026 07:39
ranxi2001
changed the base branch from
feat/bps-search-settings-20261115
to
production
November 15, 2026 08:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
解决的问题与行为变化
magpie://import协议打开预填的供应商预览。只有用户在 Magpie 中确认后才保存。未加载到公开设置或无法确定端点的分组不会发起导入。关联记录与来源
d9c828bcf8678950c0fcbe1b65a017933fd7d5bb。以cherry-pick -x应用到production的 v2.21.3 基线,代码改动未变。管理员新功能提示
NewFeatureBadge位置:不适用,未新增管理员入口。复现与验收
/keys)。可使用隔离环境中的单一 OpenAI 分组、两条测试密钥。api_base_url,未配置时用当前站点地址。未分组、跨分组或未知平台不猜测端点;提示改用「使用密钥」查看配置。实际验证
pnpm --dir frontend install --frozen-lockfilepnpm --dir frontend exec vitest run src/utils/__tests__/magpieImport.spec.ts src/views/user/__tests__/KeysView.spec.ts src/utils/__tests__/ccswitchImport.spec.ts src/i18npnpm --dir frontend exec eslint(限定本 PR 的 6 个改动文件)pnpm --dir frontend run buildgit diff --check origin/production...HEADmake test-unit、make test-integration;前端关键测试、构建、lint、安全扫描兼容性与运行影响
文档与用户可见变化
Agent 使用声明
mythos-magpie-0870153534(当前提交阶段的环境报告值;早期实现阶段如使用不同模型,未单独记录)。提交前自查
ranxi2001/sub2api:production,仅含相关前端改动。🤖 Generated with Claude Code
实际页面组件前后截图
证据提交
f2365ac2987d9eb93f4d28a82a3bdd8bb9848dbc,其 KeysView、Magpie helper 和中英文语言文件已与原 PR head 逐文件核对一致。前图使用713cb0f3efe3f838d159cd57998128c2cdaa84b1的 KeysView;4 张中英文截图已逐张核对,页面脚本错误为 0。CI 执行
node .github/scripts/magpie-import-preview.mjs,渲染实际 KeysView 与项目 CSS,使用虚构账号/API 适配器;仅外层 AppLayout 替换为容器。点击第二条密钥后,断言实际生成链接包含第二条密钥及正确 Responses 端点。系统协议启动已拦截,未启动真实 Magpie,不代表生产接口或完整导航验收。截图和选中行检查 / 原始产物。本轮 Agent:Codex,环境标识 GPT-6,完整模型 ID / 推理强度未暴露、未知;参与维护修复、源码复核、CI、截图与合并。子 Agent 调用均返回 502,没有产出审查证据。