Skip to content

Remove the plain text option and detect the compose format automatically #856

Description

@micz

The add-on currently exposes an option that lets the user declare whether the composer is in plain text mode. This information is already available at runtime from the Thunderbird compose API: browser.compose.getComposeDetails(tabId) returns isPlainText, which reflects the actual state of the compose window (identity default, "reply in the format of the original message", Shift-click override, and manual format switching are all accounted for).

The option is therefore redundant and can be wrong: a user who sets it once will get the wrong result whenever the actual composer format differs.

Proposed change

  • Read isPlainText from getComposeDetails() instead of the stored option, both when building the prompt and when writing the AI output back to the composer (plainTextBody vs body).
  • Remove the stored option.

Activity

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

Metadata

Metadata

Assignees

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions