Skip to content

feat: input-box prompt#1

Open
swit33 wants to merge 1 commit intoRoot-lee:mainfrom
swit33:feature-ask
Open

feat: input-box prompt#1
swit33 wants to merge 1 commit intoRoot-lee:mainfrom
swit33:feature-ask

Conversation

@swit33
Copy link

@swit33 swit33 commented Mar 12, 2026

This PR introduces an interactive "ask" functionality to PopAI. Currently, the plugin relies on pre-defined static prompts. This change allows users to provide real-time instructions/questions via vim.ui.input(), which are then injected into the LLM request.

Key Changes

  • Interactive Input: Added logic to detect an ask action which triggers a native Neovim input box.
  • Dynamic Placeholders: Introduced the {user_prompt} placeholder.
    • If {user_prompt} is present in the template, the user's input is injected at that specific location.
    • If absent, the user's input is appended to the end of the template for a natural "Instruction -> Context" flow.
  • Fallback Logic: Maintains backward compatibility with existing static templates.

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.

1 participant