Using Codex

Appshots

用于记录和复现应用状态,辅助问题定位和交互核验。

Appshots 让你把最前面的 app window 发送到 Codex thread。当你正在 computer 上的另一个 app 中工作,并希望把当前 context 提供给 Codex,让它帮你完成 task 时,可以使用 Appshots。

Appshots 可在 macOS 上的 Codex app 中使用。按下两个 Command keys,或你自定义的 Appshots hotkey,即可创建一个 appshot。

Appshots 会捕获什么

一个 appshot 只会捕获最前面的 window。它可以包含:

可见 window 的 image。

该 window 中可用的 text,包括 visible text,以及 app 在可见 scroll area 之外提供的 text。

将 appshot 添加到 thread 后,它会像 Codex attachment 一样工作。Codex 会像处理你手动附加的 files 或 images 一样,把 appshots 本地存储在 session file 中。

何时使用 Appshots

当 Codex 需要先获得某个 Mac app 的 context 才能行动时,请使用 Appshots。

示例:

分享 API reference page,并要求 Codex 编写使用它的 script。

分享 email 或 calendar view,并要求 Codex 起草 next step。

分享 image editor、design 或 preview window,并要求 Codex 修改相关 assets 或 code。

分享 error、settings panel 或 app state,也就是比文字描述更容易直接展示的内容。

创建 Appshot

在你的 Mac 上打开 Codex app。

打开你想要分享的 app 和 window。

按下两个 Command keys,或按下你在 Codex settings 中配置的 custom hotkey。

如果 Codex 询问,请允许 macOS permissions。

要求 Codex 结合这个 appshot 执行 task。

默认情况下,Codex 会为 appshot 启动一个 new thread。如果你在过去 60 秒内与某个 Codex thread 有过交互,Codex 会改为把 appshot 添加到那个 recent thread。连续创建 appshots 会把它们添加到同一个 thread。

你可以在 Codex settings 中更改 Appshots hotkey。

Permissions 和 safety

Codex 在创建 appshots 前,可能会请求 permissions:

Screen & System Audio Recording 让 Codex 可以捕获最前面 window 的 image。

Accessibility 让 Codex 可以读取最前面 window 中可用的 text。

创建 appshot 会把捕获的 image 和可用 text 分享给 Codex。除非 task 需要这些内容,否则请避免对 sensitive content 创建 appshots。

Review appshots 时,请采用和 review 向 Codex 分享 screenshots 与 documents 相同的方式。

Limits 和 troubleshooting

Appshots 是 Codex app feature。请在 macOS 上从 Codex app 创建它们。如果你在 CLI 中 resume 一个已经包含 appshot 的 thread,该 attachment 会作为 thread history 的一部分存在,但 CLI 无法创建新的 appshot。

对于某些 apps 和 websites,包括 Google Docs、Gmail、Google Sheets 和 Google Slides,Codex 可能只收到可见 screenshot,而收不到完整 document 或 off-screen text。如果你安装了 matching plugin,Codex 可以用该 plugin 访问相关 app content,并帮助处理你的 request。

如果 appshots 无法工作:

打开 System Settings > Privacy & Security。

检查 Codex Computer Use 的 Screen & System Audio Recording 和 Accessibility。

重启 Codex 后重试。

站内延伸阅读