你可以通过 VS Code 的 Command Palette 调用这些命令来控制 Codex,也可以把它们绑定到自定义快捷键上。
分配快捷键
如果你要给某个 Codex 命令新增或修改快捷键:
- 打开命令面板:macOS 用 Cmd+Shift+P,Windows / Linux 用 Ctrl+Shift+P。
- 运行 Preferences: Open Keyboard Shortcuts。
- 搜索
Codex或某个具体命令 ID,例如chatgpt.newChat。 - 点击铅笔图标,然后输入你想要的快捷键。
扩展命令
| 命令 | 默认快捷键 | 说明 |
|---|---|---|
chatgpt.addToThread |
- | 将选中的文本范围加入当前线程作为上下文 |
chatgpt.addFileToThread |
- | 将整个文件加入当前线程作为上下文 |
chatgpt.newChat |
macOS: Cmd+N Windows/Linux: Ctrl+N |
创建新线程 |
chatgpt.implementTodo |
- | 让 Codex 处理当前选中的 TODO 注释 |
chatgpt.newCodexPanel |
- | 创建一个新的 Codex 面板 |
chatgpt.openSidebar |
- | 打开 Codex 侧边栏面板 |