Skip to content

[codex] add ChatGPT project sources support#132

Open
vgorlovi wants to merge 1 commit intosteipete:mainfrom
vgorlovi:codex/project-sources-cli-mcp
Open

[codex] add ChatGPT project sources support#132
vgorlovi wants to merge 1 commit intosteipete:mainfrom
vgorlovi:codex/project-sources-cli-mcp

Conversation

@vgorlovi
Copy link
Copy Markdown

@vgorlovi vgorlovi commented Apr 1, 2026

Summary

Add first-class ChatGPT Project Sources management in browser mode for both the CLI and MCP.

Closes #131.

What changed

  • add --project-sources add|delete|replace|sync to the CLI
  • add --source for delete/replace target names
  • add shared browser automation for ChatGPT Project Sources operations
  • add MCP project_sources with the same add/delete/replace/sync operations
  • update browser/MCP/README docs for persistent Sources management
  • add targeted tests for promptless project-sources runs and helper behavior

Why

Uploading files into a chat is not the same as managing a ChatGPT project's persistent Sources tab. This change adds a first-class path for project-source management instead of relying on chat attachments.

Implementation notes

  • targets the ChatGPT project Sources surface directly in browser mode
  • batches uploads in groups of 10 files to match the current ChatGPT Sources UI limit
  • prefers the Sources panel's own hidden file input so uploads can bypass the OS file picker and work in terminal/headless flows
  • falls back to dialog-scoped sources upload behavior when needed
  • verifies add/delete outcomes against the Sources list itself

Validation

  • pnpm vitest run tests/browser/projectSources.test.ts tests/cli/promptRequirement.test.ts
  • pnpm vitest run tests/mcp.schema.test.ts tests/mcp/consult.test.ts
  • pnpm typecheck
  • pnpm build

@vgorlovi vgorlovi marked this pull request as ready for review April 1, 2026 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: manage ChatGPT Project Sources directly from CLI and MCP

1 participant