Skip to content

fix(core): seed multiline prompt with initialValue#570

Closed
spokodev wants to merge 1 commit into
bombshell-dev:mainfrom
spokodev:fix/multiline-initial-value
Closed

fix(core): seed multiline prompt with initialValue#570
spokodev wants to merge 1 commit into
bombshell-dev:mainfrom
spokodev:fix/multiline-initial-value

Conversation

@spokodev

Copy link
Copy Markdown

Closes #566.

multiline accepts initialValue but never seeded the editor with it, so passing it had no effect — the prompt always opened empty.

TextPrompt forwards initialValue to the base Prompt as initialUserInput; MultiLinePrompt did not. This mirrors that single line in the MultiLinePrompt constructor, so the editor opens pre-filled and an unedited submit returns the seeded value (falling back to initialUserInput).

Tests

Two @clack/core tests, red before the change and green after:

  • seeds initialValue into the editor (userInput + value)
  • submits initialValue when not edited

Full @clack/core suite: 143 passing. Changeset included (@clack/core patch).

The multiline prompt accepted `initialValue` but never seeded the editor
with it, unlike the text prompt, so passing it had no effect. Forward
`initialValue` (falling back to `initialUserInput`) to the base Prompt so
the value is present when the prompt opens.

Closes bombshell-dev#566
@changeset-bot

changeset-bot Bot commented Jun 16, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 38f597d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@clack/core Patch
@clack/prompts Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@43081j

43081j commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

thanks for the contribution 🙏 but this is already being fixed in the earlier #569 PR

@43081j 43081j closed this Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] initialValue on multilinenot working

2 participants