From 4b68cb3b77e0564168dc849cc6c87bfd0ef40daa Mon Sep 17 00:00:00 2001 From: relhamdi Date: Fri, 22 May 2026 17:50:37 +0200 Subject: [PATCH] Remove extra_options from PromptOptionPicker --- src/nodes/prompt_option_picker.py | 22 ++-------------------- tests/test_prompt_option_picker.py | 22 ---------------------- 2 files changed, 2 insertions(+), 42 deletions(-) diff --git a/src/nodes/prompt_option_picker.py b/src/nodes/prompt_option_picker.py index a599c4a..0a69b43 100644 --- a/src/nodes/prompt_option_picker.py +++ b/src/nodes/prompt_option_picker.py @@ -34,15 +34,6 @@ class PromptOptionPicker: }, ), }, - "optional": { - "extra_options": ( - "STRING", - { - "forceInput": True, - "tooltip": "External options prepended to the options field.", - }, - ), - }, } RETURN_TYPES = ("STRING",) @@ -55,18 +46,9 @@ class PromptOptionPicker: return "options cannot be empty" return True - def process(self, options, selected, extra_options=None): - combined = "" - if extra_options and extra_options.strip(): - combined = extra_options.strip() + "\n" + options - else: - combined = options - - if not combined.strip(): - raise ValueError("PromptOptionPicker: options cannot be empty.") - + def process(self, options, selected): # Validate only, JS handles the dropdown - parse_options(combined) + parse_options(options) # -- displays an empty string return ("" if selected == "--" else selected,) diff --git a/tests/test_prompt_option_picker.py b/tests/test_prompt_option_picker.py index 8dff6c4..d10e6a4 100644 --- a/tests/test_prompt_option_picker.py +++ b/tests/test_prompt_option_picker.py @@ -41,28 +41,6 @@ def test_whitespace_only_lines(node): assert value == "" -# --- Extra options --- - - -def test_extra_options_prepended(node): - # extra_options are handled by JS, process just returns selected - (value,) = node.process( - options="sitting down\nstanding up", - selected="from extra", - extra_options="from extra\nother extra", - ) - assert value == "from extra" - - -def test_extra_options_none(node): - (value,) = node.process( - options="sitting down", - selected="sitting down", - extra_options=None, - ) - assert value == "sitting down" - - # --- VALIDATE_INPUTS ---