matcha icon indicating copy to clipboard operation
matcha copied to clipboard

FEAT: Plugin API - multi-field prompts and confirm dialogs

Open andrinoff opened this issue 7 months ago • 2 comments

Is your feature request related to a problem?

matcha.prompt() only supports a single text input field. Plugins that need multi-step configuration (e.g. API key + model selection, or multiple form fields) must chain multiple prompts sequentially, which is awkward UX. There's also no way to ask a simple yes/no confirmation question.

Describe the solution you'd like

At minimum, add a confirm dialog:

matcha.confirm("Are you sure you want to proceed?", function(yes)
    if yes then
        -- do the thing
    end
end)

Ideally, also support multi-field prompts:

matcha.prompt_fields({
    {name = "api_key", placeholder = "Enter API key"},
    {name = "model", placeholder = "Model name (default: gpt-4)"},
}, function(fields)
    local key = fields.api_key
    local model = fields.model
end)

Describe alternatives you've considered

Chaining multiple matcha.prompt() calls in nested callbacks. This works but creates deeply nested callback hell and poor UX (multiple sequential popups).

Additional context

N/A

andrinoff avatar Apr 15 '26 19:04 andrinoff

This has had no activity for 30 days. It will be closed in 14 days unless updated. Comment or remove the stale label to keep it open.

floatpanebot avatar May 16 '26 05:05 floatpanebot

Closing due to inactivity. Reopen if still relevant.

floatpanebot avatar May 30 '26 05:05 floatpanebot