Class DynamicModelBuilderFragment

java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.Composite<com.vaadin.flow.component.orderedlayout.VerticalLayout>
io.jmix.flowui.fragment.Fragment<com.vaadin.flow.component.orderedlayout.VerticalLayout>
io.jmix.dynmodelaiflowui.view.builder.DynamicModelBuilderFragment
All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasStyle, FacetOwner, FragmentOwner, Serializable

@CssImport("./dmagent/builder-workspace.css") public class DynamicModelBuilderFragment extends Fragment<com.vaadin.flow.component.orderedlayout.VerticalLayout>
Chat and plan confirmation inside the shared Dynamic Model editor. Successful AI changes update the host's unsaved model; only the host publishes it. Clearing a conversation retains editor changes unless the user explicitly discards them.
See Also:
  • Field Details

    • ACTIVE_RUN_POLL_INTERVAL_MS

      protected static final int ACTIVE_RUN_POLL_INTERVAL_MS
      See Also:
    • IDLE_POLL_INTERVAL_MS

      protected static final int IDLE_POLL_INTERVAL_MS
      While a draft waits, the poll doubles as the heartbeat that keeps the server session alive.
      See Also:
    • configuredApprovalMode

      @Value("${jmix.dynmodel.ai.plan-approval-mode:MANUAL}") protected PlanApprovalMode configuredApprovalMode
    • editorContext

      protected @Nullable DynamicModelEditorContext editorContext
    • chat

    • chatPane

      @ViewComponent protected com.vaadin.flow.component.orderedlayout.VerticalLayout chatPane
    • emptyExamples

      @ViewComponent protected com.vaadin.flow.component.orderedlayout.FlexLayout emptyExamples
    • modelPanel

      @ViewComponent protected ModelPanelFragment modelPanel
    • draftTitle

      @ViewComponent("workspaceLayout.modelWorkspace.workspaceContent.modelPanel.draftTitle") protected com.vaadin.flow.component.html.H4 draftTitle
    • draftBody

      @ViewComponent("workspaceLayout.modelWorkspace.workspaceContent.modelPanel.draftBody") protected com.vaadin.flow.component.orderedlayout.VerticalLayout draftBody
    • draftPanel

      @ViewComponent("workspaceLayout.modelWorkspace.workspaceContent.modelPanel.draftPanel") protected com.vaadin.flow.component.orderedlayout.VerticalLayout draftPanel
    • noteBox

      @ViewComponent("workspaceLayout.modelWorkspace.workspaceContent.modelPanel.noteBox") protected JmixDetails noteBox
    • changesBox

      @ViewComponent("workspaceLayout.modelWorkspace.workspaceContent.modelPanel.changesBox") protected JmixDetails changesBox
    • changeItems

      @ViewComponent("workspaceLayout.modelWorkspace.workspaceContent.modelPanel.changeItems") protected com.vaadin.flow.component.orderedlayout.VerticalLayout changeItems
    • findingsBox

      @ViewComponent("workspaceLayout.modelWorkspace.workspaceContent.modelPanel.findingsBox") protected JmixDetails findingsBox
    • findingItems

      @ViewComponent("workspaceLayout.modelWorkspace.workspaceContent.modelPanel.findingItems") protected com.vaadin.flow.component.orderedlayout.VerticalLayout findingItems
    • stepsDetails

      @ViewComponent("workspaceLayout.modelWorkspace.workspaceContent.modelPanel.stepsDetails") protected JmixDetails stepsDetails
    • stepItems

      @ViewComponent("workspaceLayout.modelWorkspace.workspaceContent.modelPanel.stepItems") protected com.vaadin.flow.component.orderedlayout.VerticalLayout stepItems
    • approvePlanButton

      @ViewComponent("workspaceLayout.modelWorkspace.workspaceContent.modelPanel.approvePlanButton") protected JmixButton approvePlanButton
    • cancelPlanButton

      @ViewComponent("workspaceLayout.modelWorkspace.workspaceContent.modelPanel.cancelPlanButton") protected JmixButton cancelPlanButton
    • closePanelButton

      @ViewComponent("workspaceLayout.modelWorkspace.workspaceContent.modelPanel.closePanelButton") protected JmixButton closePanelButton
    • actionsBox

      @ViewComponent("workspaceLayout.modelWorkspace.workspaceContent.modelPanel.actionsBox") protected com.vaadin.flow.component.orderedlayout.VerticalLayout actionsBox
    • startOverButton

      @ViewComponent protected JmixButton startOverButton
    • progressBox

      @ViewComponent protected com.vaadin.flow.component.html.Div progressBox
    • workspaceLayout

      @ViewComponent protected com.vaadin.flow.component.orderedlayout.HorizontalLayout workspaceLayout
    • workspaceHeader

      @ViewComponent protected com.vaadin.flow.component.orderedlayout.HorizontalLayout workspaceHeader
    • workspaceContent

      @ViewComponent protected com.vaadin.flow.component.orderedlayout.VerticalLayout workspaceContent
    • currentStepBox

      @ViewComponent protected com.vaadin.flow.component.orderedlayout.VerticalLayout currentStepBox
    • currentStepTitle

      @ViewComponent protected com.vaadin.flow.component.html.H4 currentStepTitle
    • currentStepSummary

      @ViewComponent protected com.vaadin.flow.component.html.Span currentStepSummary
    • currentActions

      @ViewComponent protected com.vaadin.flow.component.orderedlayout.HorizontalLayout currentActions
    • reviewEditorButton

      @ViewComponent protected JmixButton reviewEditorButton
    • cancelRunButton

      @ViewComponent protected JmixButton cancelRunButton
    • workspaceToggle

      @ViewComponent protected JmixButton workspaceToggle
    • messageBundle

      @ViewComponent protected MessageBundle messageBundle
    • agentService

      @Autowired protected DynamicModelAgentService agentService
    • notifications

      @Autowired protected Notifications notifications
    • dialogs

      @Autowired protected Dialogs dialogs
    • fragments

      @Autowired protected Fragments fragments
    • currentAuthentication

      @Autowired protected CurrentAuthentication currentAuthentication
    • systemAuthenticator

      @Autowired protected SystemAuthenticator systemAuthenticator
    • icons

      @Autowired protected Icons icons
    • viewRegistry

      @Autowired protected ViewRegistry viewRegistry
    • accessManager

      @Autowired protected AccessManager accessManager
  • Constructor Details

    • DynamicModelBuilderFragment

      public DynamicModelBuilderFragment()
  • Method Details

    • onReady

      @Subscribe public void onReady(Fragment.ReadyEvent event)
    • setEditorContext

      public void setEditorContext(DynamicModelEditorContext context)
    • hasUnsavedChanges

      public boolean hasUnsavedChanges()
      Unsaved model content belongs to the host; this reports only separate AI work that closing would lose: a running Run or a result that can still be transferred. An open question is conversation, not work.
    • editorChanged

      public void editorChanged()
    • onStartOverButtonClick

      @Subscribe("startOverButton") public void onStartOverButtonClick(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.button.Button> event)
      Clears the conversation, with an explicit option to discard unpublished editor changes.
    • confirmCancelPlan

      protected void confirmCancelPlan()
    • setWorkspaceCollapsed

      protected void setWorkspaceCollapsed(boolean collapsed)
    • focusWorkspaceComponent

      protected void focusWorkspaceComponent(com.vaadin.flow.component.Component component)
    • setReviewEditorAction

      public void setReviewEditorAction(Runnable action)
    • setNativeApplyButton

      public void setNativeApplyButton(JmixButton button, boolean permitted)
    • onAttach

      protected void onAttach(com.vaadin.flow.component.AttachEvent event)
      Overrides:
      onAttach in class Fragment<com.vaadin.flow.component.orderedlayout.VerticalLayout>
    • onDetach

      protected void onDetach(com.vaadin.flow.component.DetachEvent event)
      Overrides:
      onDetach in class Fragment<com.vaadin.flow.component.orderedlayout.VerticalLayout>
    • changesApplied

      public void changesApplied(@Nullable UUID baselineId, UUID publishedId)