Skip to content

Enhance Prompt Commands with Variables, Arguments, and Text Selection Logic #69

@Axlfc

Description

@Axlfc

Description:

Objective:
Improve the functionality of AI prompt commands by introducing structured variable handling, additional arguments, and modifiers to refine and automate user interactions.


Feature Enhancements

  1. Command Enhancements:

    • Allow commands to process:
      • Entire text input: If no text is explicitly selected, process the full prompt.
      • Selected text only: If a portion of the text input is selected, process only that portion.
    • Automatically structure commands for clarity and context-specific performance.
  2. Variable Creation:

    • Support for dynamic variables where required by commands.
    • Auto-suggest or auto-fill variables based on the command's action and context.
    • Example:
      Command: /command {empty my system's recycle bin}
      Auto-detected variable: {target: "recycle bin"}
  3. Argument Support:

    • Introduce arguments to modify command behavior:
      • -y, --yes: Bypass user confirmation for execution.
        Example: /command {} -y (Direct execution without confirmation)
      • --dryrun: Simulate the command without actual execution.
        Example: /command {} --dryrun (Display result without performing the action)
  4. Command Examples:

    • /command {action}: Executes a general action with structured text input.
      Example: /command {empty recycle bin}
    • /command {} -y: Executes a command immediately without user permission.
      Example: /command {delete all logs} -y
    • /command {} --dryrun: Simulates the command and displays potential actions.
      Example: /command {clear cache} --dryrun

Implementation Tasks

  1. Command Parsing:

    • Enhance the parser to identify:
      • Full input text when no selection is made.
      • Selected text and isolate it for command execution.
    • Ensure robust handling of commands with embedded variables.
  2. Variable Handling:

    • Introduce a system to define and manage dynamic variables within commands.
    • Suggest variables contextually based on input text or action requirements.
  3. Argument Parsing:

    • Implement support for new arguments (-y, --dryrun, etc.).
    • Add safeguards to prevent unintentional execution unless -y is explicitly used.
  4. UI/UX Adjustments:

    • Provide visual or inline feedback for dry runs and potential execution results.
    • Highlight auto-detected variables for transparency.
  5. Testing:

    • Create comprehensive test cases for:
      • Commands with and without arguments.
      • Commands with and without variables.
      • Dry run and direct execution scenarios.

Expected Outcomes

  • Enhanced command flexibility for end-users.
  • Safer execution with -y and --dryrun arguments.
  • Improved user experience with structured prompts and dynamic variable support.

Latest Comment Reference:

Perform AI prompt enhancement to all text of prompt command if no text is selected in the text input entry or only the selected text from the Entry, well structured, and if it needs variables, we need to create them.

Would you like to prioritize certain commands or arguments in this implementation?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementRequests for improvements or new featuresfeature_requestSuggestions for new features or functionalities

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions