Skip to content

feat(codex): 添加历史会话可见性手动修复#3793

Open
Alexlangl wants to merge 2 commits into
farion1231:mainfrom
Alexlangl:feat(codex)/history-visibility-repair
Open

feat(codex): 添加历史会话可见性手动修复#3793
Alexlangl wants to merge 2 commits into
farion1231:mainfrom
Alexlangl:feat(codex)/history-visibility-repair

Conversation

@Alexlangl
Copy link
Copy Markdown
Contributor

@Alexlangl Alexlangl commented Jun 6, 2026

Summary / 概述

  • 在当前 Codex provider 卡片上新增“修复历史会话可见性”入口,并在执行前加入确认弹窗,明确说明会把可识别历史移动到当前 Codex 可见的供应商桶。
  • 新增后端手动修复命令:备份并同步 rollout JSONL 的 session_meta.payload.model_providerstate_5.sqlitethreads.model_provider,并重建/补齐 session_index.jsonl
  • 重建 session index 时保留旧 index 中用户手动命名的 thread_name,只补缺失会话或刷新实际更新的索引元数据。
  • 更新中/繁/英/日 i18n 文案;启动自动迁移仍保留当前 custom 稳定桶边界。

Related Issue / 关联 Issue

Fixes #3740

Screenshots / 截图

Before / 修改前 After / 修改后
无手动修复入口 image

Checklist / 检查清单

  • pnpm typecheck passes / 通过 TypeScript 类型检查
  • pnpm format:check passes / 通过代码格式检查
  • cargo clippy passes (if Rust code changed) / 通过 Clippy 检查(如修改了 Rust 代码)
  • Updated i18n files if user-facing text changed / 如修改了用户可见文本,已更新国际化文件
  • cargo test codex_history_migration passes / 通过 Codex 历史迁移相关测试

@Alexlangl
Copy link
Copy Markdown
Contributor Author

CI Backend Checks 在恢复 Cargo cache 阶段失败 与本次改动无关

@farion1231
Copy link
Copy Markdown
Owner

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f34ac62f53

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +283 to +286
if include_standard_history_buckets {
ids.insert(OPENAI_CODEX_MODEL_PROVIDER_ID.to_string());
ids.insert(CC_SWITCH_CODEX_MODEL_PROVIDER_ID.to_string());
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include legacy buckets in manual repair

When manual repair runs after the old third-party provider definition has been deleted or replaced, the only remaining evidence can be history rows/files with legacy bucket IDs such as ccswitch or aihubmix. In that case this source set contains only the standard openai/custom buckets plus IDs discovered from currently saved providers, so recognizable legacy history is never rewritten and stays invisible even though the user clicked “Repair history visibility.” The manual path should seed the known legacy IDs (or scan existing history) rather than depending on provider records still being present.

Useful? React with 👍 / 👎.

@Alexlangl
Copy link
Copy Markdown
Contributor Author

已修复

@farion1231
Copy link
Copy Markdown
Owner

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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.

接入第三方,codex原来的项目下的聊天记录消失

2 participants