EasyUse/Promptgenerated

PromptLine(promptLine)

The PromptLine node extracts a consecutive block of lines from a prompt string.

prompt Line

STRING
COMBO
prompt
text
start_index
0
max_rows
1000
remove_empty_lines
Easy Use

The PromptLine node extracts a consecutive block of lines from a prompt string. It lets you select a starting line, limit how many lines are returned, and optionally drop blank lines before doing the selection. The selected lines are returned both as a single joined STRING and as a COMBO/list value.

Inputs

NameTypeDefaultDescription
promptSTRINGtextThe source prompt text. Line selection is performed on this string by splitting it on newline characters.
start_indexINT0Zero-based index of the first line to select. 0 selects the first line. Range: 0–9999.
max_rowsINT1000Maximum number of lines to return. If fewer lines are available after start_index, all remaining lines are returned. Range: 1–9999.
remove_empty_linesBOOLEANtrueWhen enabled, empty or whitespace-only lines are removed before indexing and are not included in the output. When disabled, blank lines are preserved and count toward start_index/max_rows.

Outputs

TypeDescription
STRINGThe selected lines joined into a single string with newlines.
COMBOThe same selected lines as a COMBO/list value, preserving order. Useful for downstream nodes that accept line lists or combo-style inputs.

Usage Notes

  • Indices are zero-based: the first line is 0, the second is 1, and so on.
  • The defaults (start_index=0, max_rows=1000, remove_empty_lines=true) effectively return the entire prompt with empty lines removed. If the prompt contains more than 1000 non-empty lines, only the first 1000 are returned.
  • If start_index points past the last available line, the output is empty.
  • Because max_rows has a minimum of 1, you cannot explicitly request zero rows. To produce empty output, use a start_index past the end of the prompt or pass an empty prompt.
  • The default prompt value is the literal string text, so an unwired prompt input still produces a valid single-line selection.
  • The COMBO output is useful when the selected lines need to be consumed as individual items rather than as one combined text block.

Comments

Sign in with GitHub to join the discussion.

Loading comments…