Class AICommandHandler

java.lang.Object
com.vaadin.copilot.CopilotCommand
com.vaadin.copilot.ai.AICommandHandler

public class AICommandHandler extends CopilotCommand
Command handler for AI related operations
  • Constructor Details

    • AICommandHandler

      public AICommandHandler()
  • Method Details

    • handleMessage

      public boolean handleMessage(String command, com.fasterxml.jackson.databind.JsonNode data, com.vaadin.base.devserver.DevToolsInterface devToolsInterface)
      Handles the message with exception handling, and if there was a caught exception then it will notify the client/browser.
      Specified by:
      handleMessage in class CopilotCommand
      Parameters:
      command - - the command, we are getting from the client/browser (can be prompt-text or prompt-cancel), which we handle here
      data - - the data object, we are getting from the client/browser
      devToolsInterface - - the devtools interface we use to communicate with the client/browser
      Returns:
      - true if the message was handled by this handler, false otherwise
    • handleMessageWithException

      public boolean handleMessageWithException(String command, com.fasterxml.jackson.databind.JsonNode data, com.vaadin.base.devserver.DevToolsInterface devToolsInterface)
      Handles the message.
      Parameters:
      command - - the command, we are getting from the client/browser (can be prompt-text or prompt-cancel), which we handle here
      data - - the data object, we are getting from the client/browser
      devToolsInterface - - the devtools interface we use to communicate with the client/browser
      Returns:
      - true if the message was handled by this handler, false otherwise
    • getDisposables

      public Map<String,reactor.core.Disposable> getDisposables()