SIGN IN SIGN UP

Feature: Configurable Commit Message Prompts (#143)

Fixes #142 

## Implementation Details

- **New configuration fields** — Added `commitSystemPromptOverride` and
`commitMessagePromptOverride` to the `LiteLLMConfig` interface
- **ConfigManager integration** — Settings are read via
`vscode.workspace.getConfiguration()` with empty-string defaults
- **Prompt resolution** — New `resolvePrompt(override, fallback)` helper
(exported from `prompts.ts`) trims user input and falls back to built-in
defaults when empty/whitespace-only
- **`Package.json` contribution** — Two new settings entries use
`"editPresentation": "multilineText"` for textarea rendering
- **Token budgeting** — The resolved prompts (not constants) are used
for token calculations to ensure accurate context-window budgeting
- **Backward compatible** — Existing users with no overrides configured
see no change in behavior

## Related Files
- `prompts.ts` — Default prompts + `resolvePrompt()` helper
- `configManager.ts` — Settings keys + `getConfig()` reads
- `types.ts` — `LiteLLMConfig` interface
- `package.json` — Settings schema
- `generateCommitMessage.ts` — Command handler wiring
- `liteLLMCommitProvider.ts` — Deprecated provider path wiring

## Testing
- New unit tests for `resolvePrompt()` edge cases (undefined, empty,
whitespace → fallback; non-empty → trimmed override)
- Extended config tests to verify the two new setting keys are read with
correct defaults
- Extended command and provider tests to verify overrides are used in
actual message construction
- All 1044 existing tests pass; coverage remains at 91%+

## Additional Fix: Line-Ending Normalization

**Issue**: During implementation, `package.json` and
`scripts/test-coverage.mjs` were committed with CRLF line endings
(Windows-style `\r\n`) despite the project's Prettier configuration
enforcing LF. This occurred because both files are in `.prettierignore`
(JSON and `.mjs` files are not formatted), so Prettier never normalized
them. Without a `.gitattributes` rule, they were committed as-is and
would appear as full-file diffs for any subsequent contributor on
Windows.

**Fix**:
1. Normalized both files from CRLF → LF byte content
2. Added [`.gitattributes`](./.gitattributes) with `* text=auto eol=lf`
to enforce LF line endings for all text files on commit, regardless of
platform or user git configuration

**Impact**: Prevents future CRLF noise in diffs and ensures consistent
line endings across all platforms (macOS, Linux, Windows).

---------

Co-authored-by: Simon Clément <clement.simon@nagra.com>
Co-authored-by: amwdrizz <amwdrizz@users.noreply.github.com>
N
N7 Architect committed
6bbbf7114a8138979ea55bedc4a349e4f2a6bc48
Parent: 7032bd8
Committed by GitHub <noreply@github.com> on 8/29/2026, 1:54:15 PM