feat: openai auth login via cli#217
Conversation
|
@claude review |
|
首先 非常感谢你的贡献,这个改动比较大,影响范围不太好评估,加上openai oauth一直是我想弄但是没时间弄,这边建议把把桌面端的oauth也加上,可以参考claude的oauth 另外建议拉取最新的main的代码,加了很多测试和质量门禁的,pr前让ai跑下项目里质量门禁,这样后面返修的概率小一些 (最近一直更新这个repo发现,虽然ai写代码真的非常快,但是全局视野还是差了一些,会有概率改着改着把别的功能就改废了,所以E2E、冒烟测试这些比较重要) |
PR quality triageChanged areas: area:cli-core, area:desktop, area:server CLI core policy: No CLI-core policy block detected. CLI core files:
Expected checks:
Test coverage signals:
Risk notes:
Hard merge gates still come from GitHub Actions, not AI review. Dosu handoff: Dosu can be used as the AI reviewer for risk explanation, missing-test prompts, and maintainer Q&A. If it does not comment automatically from the PR template, ask: @dosubot review this PR for changed-area risk, missing tests, docs impact, desktop startup risk, and CLI core impact. |
|
ai summary 了一下新补充的测试情况: 新增 18 个测试用例全部通过:
已有测试回归情况:
PR quality gate:
那两个已有的失败用例建议在别的问题/PR里修,跟本次改动完全无关。 |
PR 217 combined OpenAI OAuth model options with env-configured provider models, but the picker path returned before appending third-party model aliases. The desktop workspace test also exercised Prism highlighting for every expanded line, which was costly enough to time out on CI runners. The docs job did not need the root React Vite plugin; the desktop package owns that dependency.\n\nConstraint: PR Quality must pass server, desktop, and docs jobs before merge.\nRejected: Increase Vitest timeout | keeps the expensive render path and hides the CI regression.\nRejected: Add root Vite 8 peer dependencies | root only builds VitePress docs; React Vite plugin belongs in desktop/.\nConfidence: high\nScope-risk: narrow\nTested: npm ci --ignore-scripts; npm run docs:build; bun test src/server/__tests__/settings.test.ts src/server/__tests__/conversation-service.test.ts; bun run check:server; bun run check:desktop\nNot-tested: live provider OAuth login
Remote main already contains PR #217. Local main had provider context-window and auth-strategy work, so this merge keeps both context resolvers and reconciles the desktop Bun lockfile with the merged desktop package manifest. The accidental remote .nvimlog artifact is excluded from the merge result. Constraint: Local main was 15 commits ahead and 8 commits behind origin/main after PR #217 was merged remotely Rejected: Fast-forward pull | local main had unpushed commits Rejected: Keep remote desktop lockfile verbatim | failed bun install --frozen-lockfile against the merged package.json Confidence: high Scope-risk: broad Directive: Keep provider-configured context windows ahead of OpenAI OAuth model windows so explicit user/provider settings win Tested: bun install --frozen-lockfile; cd desktop && bun install --frozen-lockfile; git diff --check; bun run check:server; bun run check:desktop; ALLOW_CLI_CORE_CHANGE=1 bun run quality:pr Not-tested: live provider OAuth login with a real OpenAI account


在 TUI 新增了 openai auth 登录,可以直接使用 openai 的订阅。
/login新增了 openai 登录的选项/model会显示为 openai 的模型