使用这些 commands,可以从 VS Code Command Palette 控制 Codex。你也可以把它们绑定到 keyboard shortcuts。
分配 key binding
要为 Codex command 分配或更改 key binding:
打开 Command Palette(macOS 上为 Cmd+Shift+P,Windows/Linux 上为 Ctrl+Shift+P)。
运行 Preferences: Open Keyboard Shortcuts。
搜索 Codex 或 command ID,例如 chatgpt.newChat。
选择 pencil icon,然后输入你想要的 shortcut。
Extension commands
| Command | Default key binding | Description |
|---|---|---|
| chatgpt.addToThread | - | 将 selected text range 添加为当前 thread 的 context |
| chatgpt.addFileToThread | - | 将整个 file 添加为当前 thread 的 context |
| chatgpt.newChat | macOS: Cmd+N;Windows/Linux: Ctrl+N | 创建 new thread |
| chatgpt.implementTodo | - | 要求 Codex 处理 selected TODO comment |
| chatgpt.newCodexPanel | - | 创建 new Codex panel |
| chatgpt.openSidebar | - | 打开 Codex sidebar panel |