Skip to content

[FEATURE]: Context-Aware Prompt Enhancement #10237

Closed as not planned
Closed as not planned

Description

@Faddz

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Introduce a "Prompt Enhancement" feature similar to Kilo Code and Augment Code. This tool allows users to transform brief, informal instructions into high-fidelity, structured prompts by leveraging a dedicated secondary model and local project context.

Core Functionalities

  • Dedicated Enhancer Model Selection: Allow users to select a separate, lightweight model (e.g., GPT-4o-mini, Claude 4.5 Haiku, etc.) specifically for the enhancement task.
  • Custom Enhancement Instructions: Provide a settings field where users can define their own system prompt for the enhancer. This allows for personalized coding standards, such as "always include error handling and JSDoc comments in the generated requirements."
  • Contextual Injection:
    • AGENTS.md Integration: Automatically include the content of the AGENTS.md file (if present).
    • Chat History: Pass the recent chat history (if present) to the enhancer model so it can resolve pronouns (e.g., "fix that bug") and maintain continuity without the user needing to repeat context.

UX & Interaction Design

  • Trigger: Use the hotkey Ctrl + e to trigger the enhancement of the current text in the input field.
  • Behavior: Upon activation, the current draft is replaced entirely by the enhanced version.
  • Undo Action: If the user is unsatisfied with the result, pressing Esc immediately reverts the text in the input field to the original draft.
  • Visual Feedback: A subtle loading state (e.g., a "Magic Wand" icon animation) should appear in the input bar while the enhancer model is processing the request.

Activity

  1. added
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on Jan 23, 2026
  2. github-actions commented on Jan 23, 2026

    @github-actions
    Contributor

    For keybind-related issues, please also check our pinned keybinds documentation: #4997

  3. jensenojs commented on Feb 2, 2026

    @jensenojs
    Contributor

    I tried this feature on trae and it actually seems pretty useful. I wonder if there are any ready-made custom-tools that support this functionality now.

  4. frogconn commented on Mar 6, 2026

    @frogconn

    I've been testing this feature in Augment Code. It significantly boosts code editing efficiency. Great job!

  5. jensenojs commented on Mar 6, 2026

    @jensenojs
    Contributor

    By the way, do we have the relevant hooks to make this feature into a plugin? I think I have a related issue

  6. rjamestaylor commented on Mar 14, 2026

    @rjamestaylor

    I've opened PR #17502 as a candidate implementation for this feature.

    What's there:

    • <leader>p (ctrl+x p by default) triggers enhancement of whatever's currently in the prompt input
    • A lightweight model rewrites the draft and replaces the input text
    • esc reverts to the original immediately after enhancement, or cancels an in-flight request
    • The footer shows enhancing (model-name) during the call and esc revert once done
    • Uses the provider's small model by default (e.g. Haiku for Anthropic); configurable via agent.enhance.model in opencode.json
    • Recent chat history (last 5 user turns) is passed as context so the enhancer can resolve references like "fix that bug"

    What's not there (trade-offs worth flagging):

    • No AGENTS.md injection — the enhance agent picks up InstructionPrompt.system() which includes instructions from AGENTS.md files, but it doesn't explicitly inject the raw file content the way the issue described. Happy to change this if there's a preferred approach.
    • No dedicated loading animation (no magic wand icon) — the footer text enhancing (model-name) is the feedback. Didn't want to add UI complexity without knowing what the team prefers.
    • TUI-only — the web/desktop app composer doesn't have this yet.

    Tests: packages/opencode/test/agent-enhance.test.ts (9 tests covering agent definition, permission rules, config overrides, and keybind defaults).

    Happy to take feedback on any of this — the model selection logic and history context size are the bits I'm least sure about.

  7. zedd3v commented on Apr 11, 2026

    @zedd3v
  8. removed
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on May 3, 2026
  9. jensenojs commented on May 16, 2026

    @jensenojs
    Contributor
  10. jensenojs commented on May 16, 2026

    @jensenojs
    Contributor
  11. github-actions commented on Jul 16, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

  12. jensenojs commented on Jul 16, 2026

    @jensenojs
    Contributor

    i will trying to implement it in sth like cursortab/cursortab.nvim#90

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions