[READ-ONLY] Mirror of https://github.com/bombshell-dev/clack. Effortlessly build beautiful command-line apps bomb.sh/docs/clack/basics/getting-started/
cli command-line command-line-app node prompt prompts
5

Configure Feed

Select the types of activity you want to include in your feed.

fix(prompts): honor withGuide for intro/outro/cancel messages (#474)

authored by

mikkelal and committed by
GitHub
(Mar 1, 2026, 1:36 PM UTC) ba3df8e8 6086b25b

+15 -3
+5
.changeset/quiet-experts-itch.md
··· 1 + --- 2 + "@clack/prompts": patch 3 + --- 4 + 5 + Fixes withGuide support in intro, outro, and cancel messages.
+10 -3
packages/prompts/src/messages.ts
··· 1 1 import type { Writable } from 'node:stream'; 2 2 import { styleText } from 'node:util'; 3 + import { settings } from '@clack/core'; 3 4 import { type CommonOptions, S_BAR, S_BAR_END, S_BAR_START } from './common.js'; 4 5 5 6 export const cancel = (message = '', opts?: CommonOptions) => { 6 7 const output: Writable = opts?.output ?? process.stdout; 7 - output.write(`${styleText('gray', S_BAR_END)} ${styleText('red', message)}\n\n`); 8 + const hasGuide = opts?.withGuide ?? settings.withGuide; 9 + const prefix = hasGuide ? `${styleText('gray', S_BAR_END)} ` : ''; 10 + output.write(`${prefix}${styleText('red', message)}\n\n`); 8 11 }; 9 12 10 13 export const intro = (title = '', opts?: CommonOptions) => { 11 14 const output: Writable = opts?.output ?? process.stdout; 12 - output.write(`${styleText('gray', S_BAR_START)} ${title}\n`); 15 + const hasGuide = opts?.withGuide ?? settings.withGuide; 16 + const prefix = hasGuide ? `${styleText('gray', S_BAR_START)} ` : ''; 17 + output.write(`${prefix}${title}\n`); 13 18 }; 14 19 15 20 export const outro = (message = '', opts?: CommonOptions) => { 16 21 const output: Writable = opts?.output ?? process.stdout; 17 - output.write(`${styleText('gray', S_BAR)}\n${styleText('gray', S_BAR_END)} ${message}\n\n`); 22 + const hasGuide = opts?.withGuide ?? settings.withGuide; 23 + const prefix = hasGuide ? `${styleText('gray', S_BAR)}\n${styleText('gray', S_BAR_END)} ` : ''; 24 + output.write(`${prefix}${message}\n\n`); 18 25 };