core-agent-ide/codex-cli
Michael f4b9153f78
chore: consolidate patch prefix constants in apply‑patch.ts (#274)
This PR replaces all hard‑coded patch markers in apply‑patch.ts with the
corresponding constants (now) exported from parse‑apply‑patch.ts.

Changes
• Import PATCH_PREFIX, PATCH_SUFFIX, ADD_FILE_PREFIX,
DELETE_FILE_PREFIX, UPDATE_FILE_PREFIX, MOVE_FILE_TO_PREFIX,
END_OF_FILE_PREFIX, and HUNK_ADD_LINE_PREFIX from parse‑apply‑patch.ts.
	•	Remove duplicate string literals for patch markers in apply‑patch.ts.
• Changed is_done() to trim the input to account for the slight
difference between the variables.

Why
• DRY & Consistency: Ensures a single source of truth for patch
prefixes.
• Maintainability: Simplifies future updates to prefix values by
centralizing them.
	•	Readability: Makes the code more declarative and self‑documenting.

All tests are passing, lint and format was ran.
2025-04-17 17:00:30 -07:00
..
.husky Feat/add husky (#223) 2025-04-17 07:18:43 -07:00
examples fix: typos in prompts and comments (#195) 2025-04-17 07:12:39 -07:00
scripts (fix) update Docker container scripts (#47) 2025-04-16 12:02:41 -07:00
src chore: consolidate patch prefix constants in apply‑patch.ts (#274) 2025-04-17 17:00:30 -07:00
tests feat: add notifications for MacOS using Applescript (#160) 2025-04-17 16:19:26 -07:00
.dockerignore (fix) update Docker container scripts (#47) 2025-04-16 12:02:41 -07:00
.editorconfig Initial commit 2025-04-16 12:56:08 -04:00
.eslintrc.cjs Initial commit 2025-04-16 12:56:08 -04:00
.lintstagedrc.json Feat/add husky (#223) 2025-04-17 07:18:43 -07:00
build.mjs Initial commit 2025-04-16 12:56:08 -04:00
Dockerfile chore: reduce docker image size (#194) 2025-04-17 07:12:14 -07:00
HUSKY.md Feat/add husky (#223) 2025-04-17 07:18:43 -07:00
ignore-react-devtools-plugin.js Initial commit 2025-04-16 12:56:08 -04:00
package-lock.json feat: shell command explanation option (#173) 2025-04-17 13:28:58 -07:00
package.json feat: shell command explanation option (#173) 2025-04-17 13:28:58 -07:00
require-shim.js Initial commit 2025-04-16 12:56:08 -04:00
tsconfig.json Back out @lib indirection in tsconfig.json (#111) 2025-04-16 14:16:53 -07:00