From 7abe2a70c7fb782f8bfb15e01f9f9fdabeea40b3 Mon Sep 17 00:00:00 2001 From: 404-Page-Found <139850808+404-Page-Found@users.noreply.github.com> Date: Wed, 5 Aug 2026 12:31:25 +1000 Subject: [PATCH 1/2] feat(config): show prompt template status Display whether system and user prompt templates use custom or default values in human-readable config output, with CLI coverage. Closes #214 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- src/commands/config.ts | 3 +++ tests/config-command.test.mjs | 15 +++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/src/commands/config.ts b/src/commands/config.ts index 8fcb2da..5d78b91 100644 --- a/src/commands/config.ts +++ b/src/commands/config.ts @@ -205,6 +205,9 @@ export async function configCommand(options: ConfigCommandOptions = {}): Promise console.log(` Endpoint: ${pc.dim(resolveEndpoint(config))}`); console.log(` History size: ${pc.bold(String(config.historySize))}`); console.log(` Max diff size: ${pc.bold(String(config.maxDiffSize))}`); + console.log( + ` Prompt templates: system ${pc.dim(config.systemPromptTemplate ? 'custom' : 'default')}, user ${pc.dim(config.userPromptTemplate ? 'custom' : 'default')}`, + ); console.log(` API key: ${pc.dim(maskApiKey(config.apiKey))}`); console.log(); diff --git a/tests/config-command.test.mjs b/tests/config-command.test.mjs index 726e3f4..578fdc2 100644 --- a/tests/config-command.test.mjs +++ b/tests/config-command.test.mjs @@ -109,6 +109,7 @@ test('config command displays the current configuration with a masked API key', assert.match(output, /Endpoint:\s+https:\/\/api\.openai\.com\/v1/); assert.match(output, /History size:\s+12/); assert.match(output, /Max diff size:\s+4000/); + assert.match(output, /Prompt templates:\s+system default, user default/); assert.match(output, /API key:\s+sk-t••••/); assert.doesNotMatch(output, /sk-test-secret-value/); }); @@ -129,6 +130,20 @@ test('config command displays a custom endpoint from the config file', async () }); }); +test('config command reports custom prompt template status', async () => { + await withTempHome(async (homeDir) => { + writeConfig(homeDir, { + systemPromptTemplate: 'Use system instructions.', + userPromptTemplate: 'Use user instructions for {{diff}}.', + }); + + const { stdout, stderr } = await runConfig(homeDir); + const output = stdout + stderr; + + assert.match(output, /Prompt templates:\s+system custom, user custom/); + }); +}); + test('config command reports when no API key is stored in config', async () => { await withTempHome(async (homeDir) => { writeConfig(homeDir, { apiKey: undefined }); From dd378c6169773c5779812c7430a5ccdd47dfa7e2 Mon Sep 17 00:00:00 2001 From: 404-Page-Found <139850808+404-Page-Found@users.noreply.github.com> Date: Wed, 5 Aug 2026 12:36:59 +1000 Subject: [PATCH 2/2] test(config): cover mixed prompt template status Add coverage for configurations that customize only the user prompt template. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- tests/config-command.test.mjs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/config-command.test.mjs b/tests/config-command.test.mjs index 578fdc2..6b39ff7 100644 --- a/tests/config-command.test.mjs +++ b/tests/config-command.test.mjs @@ -144,6 +144,19 @@ test('config command reports custom prompt template status', async () => { }); }); +test('config command reports mixed prompt template status', async () => { + await withTempHome(async (homeDir) => { + writeConfig(homeDir, { + userPromptTemplate: 'Use user instructions for {{diff}}.', + }); + + const { stdout, stderr } = await runConfig(homeDir); + const output = stdout + stderr; + + assert.match(output, /Prompt templates:\s+system default, user custom/); + }); +}); + test('config command reports when no API key is stored in config', async () => { await withTempHome(async (homeDir) => { writeConfig(homeDir, { apiKey: undefined });