core-agent-ide/codex-cli/src/utils
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
..
agent chore: consolidate patch prefix constants in apply‑patch.ts (#274) 2025-04-17 17:00:30 -07:00
singlepass refactor: improve performance of renderFilesToXml using Array.join (#127) 2025-04-16 16:14:57 -07:00
storage feat: add command history persistence (#152) 2025-04-17 12:41:54 -07:00
approximate-tokens-used.ts Initial commit 2025-04-16 12:56:08 -04:00
auto-approval-mode.js Initial commit 2025-04-16 12:56:08 -04:00
auto-approval-mode.ts Initial commit 2025-04-16 12:56:08 -04:00
check-in-git.ts Initial commit 2025-04-16 12:56:08 -04:00
config.ts feat: add notifications for MacOS using Applescript (#160) 2025-04-17 16:19:26 -07:00
input-utils.ts Initial commit 2025-04-16 12:56:08 -04:00
model-utils.ts w (#8) 2025-04-16 10:32:45 -07:00
parsers.ts Removes computeAutoApproval() and tightens up canAutoApprove() as the source of truth (#126) 2025-04-16 15:39:41 -07:00
session.ts bump(version): 0.1.2504161510 (#135) 2025-04-16 15:49:32 -07:00
short-path.ts Initial commit 2025-04-16 12:56:08 -04:00
terminal.ts Initial commit 2025-04-16 12:56:08 -04:00