name: Bug Report
description: Report a bug or unexpected behavior in oh-my-opencode
title: "[Bug]: "
labels: ["bug", "needs-triage"]
body:
  - type: markdown
    attributes:
      value: |
        **Please write your issue in English.** See our [Language Policy](https://github.com/code-yeongyu/oh-my-opencode/blob/dev/CONTRIBUTING.md#language-policy) for details.

  - type: checkboxes
    id: prerequisites
    attributes:
      label: Prerequisites
      description: Please confirm the following before submitting
      options:
        - label: I will write this issue in English (see our [Language Policy](https://github.com/code-yeongyu/oh-my-opencode/blob/dev/CONTRIBUTING.md#language-policy))
          required: true
        - label: I have searched existing issues to avoid duplicates
          required: true
        - label: I am using the latest version of oh-my-opencode
          required: true
        - label: I have read the [documentation](https://github.com/code-yeongyu/oh-my-opencode#readme)
          required: true

  - type: textarea
    id: description
    attributes:
      label: Bug Description
      description: A clear and concise description of what the bug is
      placeholder: Describe the bug in detail...
    validations:
      required: true

  - type: textarea
    id: reproduction
    attributes:
      label: Steps to Reproduce
      description: Steps to reproduce the behavior
      placeholder: |
        1. Configure oh-my-opencode with...
        2. Run command '...'
        3. See error...
    validations:
      required: true

  - type: textarea
    id: expected
    attributes:
      label: Expected Behavior
      description: What did you expect to happen?
      placeholder: Describe what should happen...
    validations:
      required: true

  - type: textarea
    id: actual
    attributes:
      label: Actual Behavior
      description: What actually happened?
      placeholder: Describe what actually happened...
    validations:
      required: true

  - type: textarea
    id: doctor
    attributes:
      label: Doctor Output
      description: |
        **Required:** Run `bunx oh-my-opencode doctor` and paste the full output below.
        This helps us diagnose your environment and configuration.
      placeholder: |
        Paste the output of: bunx oh-my-opencode doctor
        
        Example:
        ✓ OpenCode version: 1.0.150
        ✓ oh-my-opencode version: 1.2.3
        ✓ Plugin loaded successfully
        ...
      render: shell
    validations:
      required: true

  - type: textarea
    id: logs
    attributes:
      label: Error Logs
      description: If applicable, add any error messages or logs
      placeholder: Paste error logs here...
      render: shell

  - type: textarea
    id: config
    attributes:
      label: Configuration
      description: If relevant, share your oh-my-opencode configuration (remove sensitive data)
      placeholder: |
        {
          "agents": { ... },
          "disabled_hooks": [ ... ]
        }
      render: json

  - type: textarea
    id: context
    attributes:
      label: Additional Context
      description: Any other context about the problem
      placeholder: Add any other context, screenshots, or information...

  - type: dropdown
    id: os
    attributes:
      label: Operating System
      description: Which operating system are you using?
      options:
        - macOS
        - Linux
        - Windows
        - Other
    validations:
      required: true

  - type: input
    id: opencode-version
    attributes:
      label: OpenCode Version
      description: Run `opencode --version` to get your version
      placeholder: "1.0.150"
    validations:
      required: true
