📘 OpenAI Codex📚 官方教程中文版产品入口
调整 IDE 扩展设置
Codex IDE extension settings 用来调整 IDE 里的 Codex 使用体验。
Codex IDE extension settings 用来调整 IDE 里的 Codex 使用体验。
Change a setting
修改设置按下面步骤:
- 打开 editor settings(编辑器设置)。
- 搜索
Codex或具体 setting name(设置名)。 - 更新 value(值)。
Codex IDE extension 底层使用 Codex CLI。有些行为不在 editor settings 里配置,而是在共享的 ~/.codex/config.toml 文件中配置,例如:
- default model(默认模型)。
- approvals(审批)。
- sandbox settings(沙箱设置)。
配置基础见:
https://developers.openai.com/codex/config-basic
Extension 也会遵循 VS Code 内置 chat font settings(聊天字体设置),用于 Codex conversation surfaces(对话界面)。
Settings reference
| Setting | Description |
|---|---|
chat.fontSize | 控制 Codex sidebar 中 chat text(聊天文本)的字号,包括 conversation content(对话内容)和 composer(输入区)。 |
chat.editor.fontSize | 控制 Codex conversations 中 code-rendered content(代码渲染内容)的字号,包括 code snippets(代码片段)和 diffs(差异)。 |
chatgpt.cliExecutable | 仅 development(开发)使用:Codex CLI executable(可执行文件)的路径。除非你正在主动开发 Codex CLI,否则不需要设置。手动设置后,extension 的部分能力可能无法按预期工作。 |
chatgpt.commentCodeLensEnabled | 在 to-do comments 上方显示 CodeLens,让你可以用 Codex 完成这些待办。 |
chatgpt.localeOverride | Codex UI 的 preferred language(首选语言)。留空则自动检测。 |
chatgpt.openOnStartup | Extension 启动完成后,自动 focus(聚焦)Codex sidebar。 |
chatgpt.runCodexInWindowsSubsystemForLinux | 仅 Windows:当 Windows Subsystem for Linux(WSL)可用时,在 WSL 中运行 Codex。当 repositories 和 tooling 位于 WSL2,或你需要 Linux-native tooling 时使用。否则,Codex 可以配合 Windows sandbox 在 Windows 上原生运行。修改这个设置会 reload VS Code,使变更生效。 |