From 1cc7a64f99f79d58ca75c56c6f15b0e857dd762f Mon Sep 17 00:00:00 2001 From: Kongpon Charanwattanakit Date: Wed, 23 Jul 2025 16:15:20 +0700 Subject: [PATCH] feat(commit.ts): add confirmation prompt and refactor commit message editing for better user experience --- src/commands/commit.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/commands/commit.ts b/src/commands/commit.ts index 0766407c..f86016e4 100644 --- a/src/commands/commit.ts +++ b/src/commands/commit.ts @@ -1,5 +1,6 @@ import { text, + confirm, intro, isCancel, multiselect, @@ -99,10 +100,12 @@ ${chalk.grey('——————————————————')}` if (isCancel(userAction)) process.exit(1); if (userAction === 'Edit') { - commitMessage = await text({ + const textResponse = await text({ message: 'Please edit the commit message: (press Enter to continue)', initialValue: commitMessage }); + + commitMessage = textResponse.toString(); } if (userAction === 'Yes' || userAction === 'Edit') {