makecindy / makecindy/cindy

支持在 Cindy 中显式使用当前 Codex CLI 账号

Open
#3,857 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
2.7k
Forks
395
Avg merge
21h 48m
Merged PRs (30d)
776

Description

## 背景

Cindy 能够安全继承本机 Codex CLI 的 ChatGPT 登录,但用户在 Cindy 中主动断开连接后,会留下持久的断开边界,避免系统凭证被静默恢复。

因此,即使 Codex CLI 仍处于登录状态,用户也只能重新执行 ChatGPT 登录,缺少一个明确的“重新使用当前 CLI 账号”入口。

## 期望行为

当满足以下条件时:

- Cindy 中的 OpenAI 供应商处于未连接或错误状态;
- 本机 Codex CLI 存在有效的 ChatGPT OAuth 登录;

在“登录 ChatGPT”旁显示:

> 使用当前 Codex CLI 账号

点击后应当:

- 不打开浏览器或设备码登录页面;
- 不复制 OAuth Token;
- 复用 Cindy 现有的系统 Codex 凭证共享机制;
- 恢复 OpenAI 供应商连接并刷新模型状态;
- 保留 Cindy 与 Codex CLI 相互独立的退出语义。

## 安全要求

- 凭证读取和文件操作仅在 Main 进程执行;
- Renderer 只能获取是否存在可复用账号等非敏感元数据;
- API Key-only、格式损坏或缺少账号标识的凭证不可采用;
- 只有用户明确点击后,才可以清除 Cindy 的持久断开边界;
- owner/session 在操作期间变化时必须终止并回滚;
- Cindy 断开连接不能退出系统 Codex CLI;
- 不改变现有 `reconnect-required` 恢复流程。

## 非目标

本需求不包含完整的多账号管理或账号切换功能。

Contributor guide

Open the contributing guide

Research direction

Start by tracing the Main-process system Codex credential sharing and the Renderer OpenAI login UI, then review the existing reconnect-required recovery flow. Done means an explicit reuse action appears only when eligible, restores the provider and model state without exposing credentials, preserves separate logout behavior, and aborts safely if owner or session changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
electron, typescript
Domain
authentication, desktop, security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.