Skip to content

Conversation

pakrym-oai
Copy link
Collaborator

No description provided.

Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ 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

…esponse items

- Only push assistant_message items to response items list
- Set finalResponse directly from assistant_message text
- Remove redundant getFinalResponse helper
- Update tests to match changed item structure
- Enable noImplicitAny in tsconfig for stricter type checking
…date tests

- exec.ts: CodexExec now requires apiKey and baseUrl as part of exec args, removing hardcoded/test values.
- index.ts:
  - CodexExec instantiated with only executablePath.
  - Codex stores options and provides to Conversation.
  - Conversation passes baseUrl/apiKey to exec, adds runStreamed.
  - Simplifies event handling, correct types.
  - Standardizes double
…ests

- Add support for resuming Codex threads by ID (Codex.resumeThread)
- Track thread ID in Thread, wire through to CodexExec
- Accept optional baseUrl, apiKey in Codex, CodexExec, Thread constructors
- CodexExec.run now passes through sessionId, adds "resume" args if provided
- startResponsesTestProxy: support multiple response bodies, record requests
- Update and expand
- Added [email protected] to sdk/typescript dependencies
- Added [email protected] to devDependencies (and lock related deps)
- Updated jest, ts-jest, and config snapshots to include ts-node
- Locked new supporting packages required for ts-node
- No source code changes
… tsconfig to use ESNext module and bundler resolution
const thread = codex.startThread();
const rl = createInterface({ input, output });

const handleItemCompleted = (item: ConversationItem): void => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note this style is less verbose:

Suggested change
const handleItemCompleted = (item: ConversationItem): void => {
function handleItemCompleted(item: ConversationItem): void {


export class Codex {
constructor() {
private exec: CodexExec;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move these into their own files (codex.ts, thread.ts) so it makes it easier to find the definitions using ordinary file search? I think it's generally cleaner if index.ts is only exports and no defs, anyway.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on it

sessionId?: string | null;
};

export class CodexExec {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this have some sort of dispose() or shutdown() method?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exec invocations are relatively finite today, we should add support for abort controller though.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In a separate PR

Comment on lines 60 to 62
const exitCode: number | null = await new Promise((resolve) => {
child.once("exit", (code) => resolve(code));
});
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not check code and use that to resolve vs reject?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On it

@pakrym-oai pakrym-oai merged commit 52e591c into main Sep 30, 2025
19 checks passed
@pakrym-oai pakrym-oai deleted the pakrym/add-some-types-and-a-basic-test branch September 30, 2025 02:40
@github-actions github-actions bot locked and limited conversation to collaborators Sep 30, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants