chore: apply changes for Issue #385 #399
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #385
Applied changes based on Issue #385.
I’ve centralized the default trigger phrase and progress‑bar settings into a single constants module and wired all the code to use it. Summary of changes:
1. New
src/constants.ts
Created a central file exporting our shared values:
【F:src/constants.ts†L1-L9】
2. config.ts → use
DEFAULT_TRIGGER_PHRASE
'/codex'
.【F:src/config/config.ts†L6-L11】【F:src/config/config.ts†L152-L156】
3. action.ts → use
PROGRESS_BAR_BLOCKS
&PROGRESS_TITLE
const PROGRESS_BAR_BLOCKS = 20
andPROGRESS_TITLE
definitions.【F:src/github/action.ts†L26-L28】【F:src/github/action.ts†L95-L100】
4. event.ts → use
DEFAULT_TRIGGER_PHRASE
in the “no prompt” logDEFAULT_TRIGGER_PHRASE
.'/codex'
.【F:src/github/event.ts†L9-L11】【F:src/github/event.ts†L167-L170】
5. github.ts → strip hard‑coded “/codex” and doc‑comments
DEFAULT_TRIGGER_PHRASE
.startsWith
checks to use the constant.【F:src/github/github.ts†L12-L13】【F:src/github/github.ts†L518-L530】【F:src/github/github.ts†L533-L548】
No other behavior was changed. All hard‑coded strings and magic numbers have been replaced with named constants to keep our defaults in one place. Let me know if you’d like anything tweaked!