Skip to content

Input Box: Prompt Optimization via Sub-Thread Discussion #228

@crazygo

Description

@crazygo

Summary

Add a prompt optimization feature to the input box that allows users to refine a prompt through discussion in a sub-thread, then send the finalized result back to the originating area.

Motivation

Users often want to iteratively improve a prompt before sending it. A dedicated sub-thread discussion flow — scoped to a single message — provides a structured way to collaborate on prompt quality without polluting the main conversation.

Proposed Behavior

  1. Open sub-thread for prompt discussion

    • From any message input area, users can open a sub-thread specifically for refining the current prompt.
    • The sub-thread context is tied to the originating area (main area or a parent sub-thread).
  2. Source tracking

    • Main area → Sub-thread A: After discussion, the finalized prompt is sent back to the main area.
    • Sub-thread A → Sub-thread B: After discussion, the finalized prompt is sent back to Sub-thread A.
    • In general: always return the result to the direct parent of the sub-thread where the discussion took place.
  3. Confirm and send back

    • When the user finishes refining the prompt in the sub-thread, a "Use this prompt" or similar action delivers the result to the source input box.
    • The source input box is populated with the optimized prompt so the user can review and send it.

Acceptance Criteria

  • A prompt optimization entry point is visible in the input box UI.
  • Opening it creates a sub-thread scoped to the current message context.
  • The sub-thread clearly indicates which area it will return the result to.
  • Confirming the optimized prompt closes/collapses the sub-thread and populates the parent input box.
  • Nesting is handled correctly: Sub-thread B returns to Sub-thread A, not to the main area.
  • The feature does not disrupt normal message sending behavior.

Open Questions

  • Should the sub-thread persist after the optimized prompt is sent back, or be discarded?
  • What is the maximum nesting depth for prompt optimization sub-threads?
  • Should there be a way to cancel and discard the sub-thread discussion without affecting the parent?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions