[codex] Add Cursor SDK agent support#1399
Conversation
…support # Conflicts: # application/i18n/locales/en/ai.ts # application/i18n/locales/ru/ai.ts # application/i18n/locales/zh-CN/ai.ts # components/ai/managedAgentState.test.ts # components/settings/tabs/SettingsAITab.tsx # components/settings/tabs/ai/managedAgentState.ts # components/settings/tabs/ai/types.ts # electron/bridges/aiBridge/agentDiscoveryHandlers.cjs # electron/bridges/aiBridge/sdk/index.cjs # electron/bridges/aiBridge/sdk/index.test.cjs # electron/bridges/aiBridge/sdk/sdkStreamHandlers.cjs # infrastructure/ai/managedAgents.ts # infrastructure/ai/types.ts # package-lock.json
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e9f2071e0d
ℹ️ 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".
| }); | ||
| }, | ||
| async listModels(ctx) { | ||
| return cursor.listCursorModels({ env: ctx.env }); |
There was a problem hiding this comment.
Pass saved Cursor keys when listing models
When a user configures Cursor with the new Settings API key instead of exporting CURSOR_API_KEY, the key is stored on ExternalAgentConfig.apiKey and decrypted only for runSdkAgentTurn before streaming. The model-list path still calls the Cursor driver with only ctx.env, so listCursorModels sees no key and returns [] for that supported setup; users lose account-specific Cursor models and parameter variants unless they also duplicate the key into their shell environment.
Useful? React with 👍 / 👎.
Summary
Validation
npm run lintnpm run buildnpm test(2177 passed, 0 failed, 3 skipped)Review