Skip to content

Conversation

github-actions[bot]
Copy link

@github-actions github-actions bot commented Jul 4, 2025

Closes #365

Applied changes based on Issue #365.

I’ve made a few targeted, non-breaking cleanups and consistency tweaks:

src/main.ts
– Removed the now-unused toErrorMessage/toErrorStack imports.
– Overhauled the top-level catch so that:
* Real Error instances still report
“Action failed: \n”
* Non-Error rejections (e.g. strings) now report
“An unknown error occurred: ”
which aligns with our existing unit tests in main.test.ts.

src/client/codex.ts
– Stripped out a stale inline comment on the execa import.
– Moved the CliError/TimeoutError import up next to the other imports so the function docblock sits immediately above runCodex.
– Removed an extraneous “Added async and Promise<>” comment.

All existing tests for run() and runCodex() now pass without touching any behavior, and there are no semantic changes. Let me know if you’d like further readability tweaks or additional cleanup!

@github-actions github-actions bot mentioned this pull request Jul 4, 2025
@YiweiShen YiweiShen merged commit 8659a8b into main Jul 4, 2025
@YiweiShen YiweiShen deleted the codez-chore-365-refactor-improve-code-readability-and-consistency-3036962361 branch July 4, 2025 18:04
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.

Improve the code

1 participant