Interface CoworkView.Backend

Enclosing class:
CoworkView

public static interface CoworkView.Backend
What the view needs from the repository view.
  • Method Details

    • expand

      Puts data of the repository into the prompt (see CoworkContext).
    • ask

      AiCall ask(String text)
      Sends the text to the AI; returns at once.
    • busy

      void busy(boolean on)
      An AI request starts or ends (the spinner of the status bar).
    • form

      void form(String heading, String description, List<ModalSpec.Field> fields, String cta, Consumer<Map<String,String>> onOk)
      A form with fields (prefilled); onOk gets the values by field key when the user confirms.
    • confirm

      void confirm(String title, String text, String button, Runnable onOk)
      Asks a question and runs onOk when the user confirms.
    • showDialog

      void showDialog(javafx.scene.layout.Region dialog)
      Shows a dialog over the window (see Host.showDialog(javafx.scene.layout.Region)).
    • closeDialog

      void closeDialog()
      Closes the dialog that is open.
    • openLink

      void openLink(String href)
      Opens a link of an answer in the browser.
    • pdfTarget

      Path pdfTarget(String suggestedName)
      Asks where to write a PDF (a file dialog); null when the user gave up.
    • toast

      void toast(String text, Tone tone)
      Shows a short message.
    • repoName

      String repoName()
      The name of the repository, for the file names of an export.