Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[Request] Retrieve the partial user input on text prompt cancelation

オープン
#407 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
48/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
nodejs, typescript
領域
cli

調査の方向性

@clack/prompts の text メソッドと、issue で言及されている TextPrompt のカスタマイズから始めます。キャンセルが発生したときに部分的な入力を利用できるかを追跡し、次に、呼び出し元が空でない入力を取得でき、繰り返される空のキャンセルを区別できるようにキャンセル結果を定義します。既存の text prompt の動作が維持されることを確認します。

索引モデルが issue の本文から書いたものです。

説明

enhancement

Is your feature request related to a problem? Please describe.
Currently, when using the @clack/prompts text prompt, all that is returned is either the user entered value (if submitted) or the cancel symbol (if canceled). When the request is canceled, there is no way to know what the user had typed up to that point.

Describe the solution you'd like
I would like to get a way to retrieve what the user had for input when it canceled the request. This is to implement a feature similar to the node CLI, where canceling with a non-empty value clears the input, while canceling with an empty value twice in a row triggers an exit.

Describe alternatives you've considered
For now I have to treat empty and non-empty values in the same way. I was considering re-implementing the text method, but feels a lot of work (the great TextPrompt customization would need to be duplicated) and I'm not even sure if the data would be available there to begin with.

主要言語
TypeScript
スター
8.1k
フォーク
217
平均マージ
1日 11時間
マージ済み PR(30日)
5

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

bombshell-dev/clack のほかの issue

bombshell-dev/clack の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。