@vertesia/ui 0.79.0 → 0.80.0-dev-20251118
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/core/components/Panel.js +8 -0
- package/lib/esm/core/components/Panel.js.map +1 -0
- package/lib/esm/core/components/SelectBox.js +1 -1
- package/lib/esm/core/components/SelectBox.js.map +1 -1
- package/lib/esm/core/components/SidePanel.js +2 -2
- package/lib/esm/core/components/SidePanel.js.map +1 -1
- package/lib/esm/core/components/index.js +1 -1
- package/lib/esm/core/components/index.js.map +1 -1
- package/lib/esm/core/components/shadcn/breadcrumb.js +29 -8
- package/lib/esm/core/components/shadcn/breadcrumb.js.map +1 -1
- package/lib/esm/core/components/shadcn/button.js +3 -2
- package/lib/esm/core/components/shadcn/button.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/filterBar.js +2 -2
- package/lib/esm/core/components/shadcn/filters/filterBar.js.map +1 -1
- package/lib/esm/core/components/shadcn/index.js +1 -0
- package/lib/esm/core/components/shadcn/index.js.map +1 -1
- package/lib/esm/core/components/shadcn/input.js +4 -1
- package/lib/esm/core/components/shadcn/input.js.map +1 -1
- package/lib/esm/core/components/shadcn/resizeable.js +2 -2
- package/lib/esm/core/components/shadcn/resizeable.js.map +1 -1
- package/lib/esm/core/components/shadcn/selectBox.js +15 -9
- package/lib/esm/core/components/shadcn/selectBox.js.map +1 -1
- package/lib/esm/core/components/shadcn/tabs.js +10 -3
- package/lib/esm/core/components/shadcn/tabs.js.map +1 -1
- package/lib/esm/core/components/shadcn/textarea.js +7 -0
- package/lib/esm/core/components/shadcn/textarea.js.map +1 -0
- package/lib/esm/core/hooks/CompositeState.js +139 -1
- package/lib/esm/core/hooks/CompositeState.js.map +1 -1
- package/lib/esm/core/hooks/index.js +1 -0
- package/lib/esm/core/hooks/index.js.map +1 -1
- package/lib/esm/core/hooks/useScrollableSearch.js +92 -0
- package/lib/esm/core/hooks/useScrollableSearch.js.map +1 -0
- package/lib/esm/env/index.js +1 -1
- package/lib/esm/env/index.js.map +1 -1
- package/lib/esm/features/agent/PayloadBuilder.js +80 -55
- package/lib/esm/features/agent/PayloadBuilder.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentConversation.js +22 -24
- package/lib/esm/features/agent/chat/ModernAgentConversation.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js +2 -3
- package/lib/esm/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/Header.js +2 -2
- package/lib/esm/features/agent/chat/ModernAgentOutput/Header.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.js +15 -20
- package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/PlanPanel.js +1 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/PlanPanel.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.js +3 -3
- package/lib/esm/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js +6 -6
- package/lib/esm/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js.map +1 -1
- package/lib/esm/features/facets/CollectionsFacetsNav.js +19 -0
- package/lib/esm/features/facets/CollectionsFacetsNav.js.map +1 -1
- package/lib/esm/features/facets/InteractionsFacetsNav.js +9 -3
- package/lib/esm/features/facets/InteractionsFacetsNav.js.map +1 -1
- package/lib/esm/features/facets/utils/VTypeFacet.js +4 -1
- package/lib/esm/features/facets/utils/VTypeFacet.js.map +1 -1
- package/lib/esm/features/layout/GenericPageNavHeader.js +58 -5
- package/lib/esm/features/layout/GenericPageNavHeader.js.map +1 -1
- package/lib/esm/features/store/collections/BrowseCollectionView.js +3 -0
- package/lib/esm/features/store/collections/BrowseCollectionView.js.map +1 -1
- package/lib/esm/features/store/collections/CreateCollection.js +2 -2
- package/lib/esm/features/store/collections/CreateCollection.js.map +1 -1
- package/lib/esm/features/store/collections/EditCollectionView.js +29 -30
- package/lib/esm/features/store/collections/EditCollectionView.js.map +1 -1
- package/lib/esm/features/store/collections/SelectCollection.js +46 -45
- package/lib/esm/features/store/collections/SelectCollection.js.map +1 -1
- package/lib/esm/features/store/objects/DocumentSearchResults.js +35 -9
- package/lib/esm/features/store/objects/DocumentSearchResults.js.map +1 -1
- package/lib/esm/features/store/objects/DocumentTable.js +6 -6
- package/lib/esm/features/store/objects/DocumentTable.js.map +1 -1
- package/lib/esm/features/store/objects/components/ContentOverview.js +158 -114
- package/lib/esm/features/store/objects/components/ContentOverview.js.map +1 -1
- package/lib/esm/features/store/objects/components/DocumentIcon.js +5 -3
- package/lib/esm/features/store/objects/components/DocumentIcon.js.map +1 -1
- package/lib/esm/features/store/objects/components/SaveVersionConfirmModal.js +11 -2
- package/lib/esm/features/store/objects/components/SaveVersionConfirmModal.js.map +1 -1
- package/lib/esm/features/store/objects/components/useDownloadObject.js +2 -2
- package/lib/esm/features/store/objects/components/useDownloadObject.js.map +1 -1
- package/lib/esm/features/store/objects/layout/DocumentTableColumn.js +13 -1
- package/lib/esm/features/store/objects/layout/DocumentTableColumn.js.map +1 -1
- package/lib/esm/features/store/objects/layout/documentLayout.js +5 -5
- package/lib/esm/features/store/objects/layout/documentLayout.js.map +1 -1
- package/lib/esm/features/store/objects/layout/renderers.js +28 -12
- package/lib/esm/features/store/objects/layout/renderers.js.map +1 -1
- package/lib/esm/features/store/objects/search/DocumentSearchContext.js +5 -1
- package/lib/esm/features/store/objects/search/DocumentSearchContext.js.map +1 -1
- package/lib/esm/features/store/objects/search/DocumentSearchProvider.js +1 -1
- package/lib/esm/features/store/objects/search/DocumentSearchProvider.js.map +1 -1
- package/lib/esm/features/store/objects/selection/ObjectsActionContext.js +3 -2
- package/lib/esm/features/store/objects/selection/ObjectsActionContext.js.map +1 -1
- package/lib/esm/features/store/objects/selection/SelectionActions.js +2 -0
- package/lib/esm/features/store/objects/selection/SelectionActions.js.map +1 -1
- package/lib/esm/features/store/objects/selection/actions/AddToCollectionAction.js +10 -2
- package/lib/esm/features/store/objects/selection/actions/AddToCollectionAction.js.map +1 -1
- package/lib/esm/features/store/objects/selection/actions/DeleteObjectsAction.js +20 -2
- package/lib/esm/features/store/objects/selection/actions/DeleteObjectsAction.js.map +1 -1
- package/lib/esm/features/store/objects/upload/DocumentUploadModal.js +15 -7
- package/lib/esm/features/store/objects/upload/DocumentUploadModal.js.map +1 -1
- package/lib/esm/features/store/types/CreateOrUpdateTypeModal.js +1 -1
- package/lib/esm/features/store/types/CreateOrUpdateTypeModal.js.map +1 -1
- package/lib/esm/features/user/UserInfo.js +2 -0
- package/lib/esm/features/user/UserInfo.js.map +1 -1
- package/lib/esm/router/HistoryNavigator.js +25 -2
- package/lib/esm/router/HistoryNavigator.js.map +1 -1
- package/lib/esm/router/Nav.js +3 -3
- package/lib/esm/router/Nav.js.map +1 -1
- package/lib/esm/session/UserSession.js +1 -0
- package/lib/esm/session/UserSession.js.map +1 -1
- package/lib/esm/session/UserSessionProvider.js +9 -2
- package/lib/esm/session/UserSessionProvider.js.map +1 -1
- package/lib/esm/session/auth/composable.js +66 -67
- package/lib/esm/session/auth/composable.js.map +1 -1
- package/lib/esm/widgets/form/Form.js +17 -30
- package/lib/esm/widgets/form/Form.js.map +1 -1
- package/lib/esm/widgets/form/FormContext.js +4 -2
- package/lib/esm/widgets/form/FormContext.js.map +1 -1
- package/lib/esm/widgets/form/ManagedObject.js +4 -0
- package/lib/esm/widgets/form/ManagedObject.js.map +1 -1
- package/lib/esm/widgets/form/fields.js +4 -3
- package/lib/esm/widgets/form/fields.js.map +1 -1
- package/lib/esm/widgets/form/inputs.js +2 -0
- package/lib/esm/widgets/form/inputs.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/core/components/Panel.d.ts +11 -0
- package/lib/types/core/components/Panel.d.ts.map +1 -0
- package/lib/types/core/components/SidePanel.d.ts.map +1 -1
- package/lib/types/core/components/index.d.ts +1 -1
- package/lib/types/core/components/index.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/breadcrumb.d.ts +3 -2
- package/lib/types/core/components/shadcn/breadcrumb.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/button.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/filters/filterBar.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/index.d.ts +1 -0
- package/lib/types/core/components/shadcn/index.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/input.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/selectBox.d.ts +3 -2
- package/lib/types/core/components/shadcn/selectBox.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/tabs.d.ts.map +1 -1
- package/lib/types/core/components/shadcn/textarea.d.ts +4 -0
- package/lib/types/core/components/shadcn/textarea.d.ts.map +1 -0
- package/lib/types/core/hooks/CompositeState.d.ts +115 -6
- package/lib/types/core/hooks/CompositeState.d.ts.map +1 -1
- package/lib/types/core/hooks/index.d.ts +1 -0
- package/lib/types/core/hooks/index.d.ts.map +1 -1
- package/lib/types/core/hooks/useScrollableSearch.d.ts +82 -0
- package/lib/types/core/hooks/useScrollableSearch.d.ts.map +1 -0
- package/lib/types/env/index.d.ts +3 -1
- package/lib/types/env/index.d.ts.map +1 -1
- package/lib/types/features/agent/PayloadBuilder.d.ts +11 -19
- package/lib/types/features/agent/PayloadBuilder.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentConversation.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/Header.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.d.ts.map +1 -1
- package/lib/types/features/agent/chat/ModernAgentOutput/PlanPanel.d.ts.map +1 -1
- package/lib/types/features/facets/CollectionsFacetsNav.d.ts.map +1 -1
- package/lib/types/features/facets/InteractionsFacetsNav.d.ts +1 -0
- package/lib/types/features/facets/InteractionsFacetsNav.d.ts.map +1 -1
- package/lib/types/features/facets/utils/SearchInterface.d.ts +6 -1
- package/lib/types/features/facets/utils/SearchInterface.d.ts.map +1 -1
- package/lib/types/features/facets/utils/VTypeFacet.d.ts +2 -1
- package/lib/types/features/facets/utils/VTypeFacet.d.ts.map +1 -1
- package/lib/types/features/layout/GenericPageNavHeader.d.ts +2 -1
- package/lib/types/features/layout/GenericPageNavHeader.d.ts.map +1 -1
- package/lib/types/features/store/collections/BrowseCollectionView.d.ts.map +1 -1
- package/lib/types/features/store/collections/CreateCollection.d.ts.map +1 -1
- package/lib/types/features/store/collections/EditCollectionView.d.ts.map +1 -1
- package/lib/types/features/store/collections/SelectCollection.d.ts +6 -4
- package/lib/types/features/store/collections/SelectCollection.d.ts.map +1 -1
- package/lib/types/features/store/objects/DocumentSearchResults.d.ts.map +1 -1
- package/lib/types/features/store/objects/DocumentTable.d.ts +4 -0
- package/lib/types/features/store/objects/DocumentTable.d.ts.map +1 -1
- package/lib/types/features/store/objects/components/ContentOverview.d.ts.map +1 -1
- package/lib/types/features/store/objects/components/DocumentIcon.d.ts +3 -1
- package/lib/types/features/store/objects/components/DocumentIcon.d.ts.map +1 -1
- package/lib/types/features/store/objects/components/SaveVersionConfirmModal.d.ts.map +1 -1
- package/lib/types/features/store/objects/components/useDownloadObject.d.ts +1 -1
- package/lib/types/features/store/objects/components/useDownloadObject.d.ts.map +1 -1
- package/lib/types/features/store/objects/layout/DocumentTableColumn.d.ts +2 -1
- package/lib/types/features/store/objects/layout/DocumentTableColumn.d.ts.map +1 -1
- package/lib/types/features/store/objects/layout/documentLayout.d.ts +4 -2
- package/lib/types/features/store/objects/layout/documentLayout.d.ts.map +1 -1
- package/lib/types/features/store/objects/layout/renderers.d.ts +1 -1
- package/lib/types/features/store/objects/layout/renderers.d.ts.map +1 -1
- package/lib/types/features/store/objects/search/DocumentSearchContext.d.ts +1 -0
- package/lib/types/features/store/objects/search/DocumentSearchContext.d.ts.map +1 -1
- package/lib/types/features/store/objects/selection/ObjectsActionContext.d.ts.map +1 -1
- package/lib/types/features/store/objects/selection/SelectionActions.d.ts.map +1 -1
- package/lib/types/features/store/objects/selection/actions/DeleteObjectsAction.d.ts +1 -0
- package/lib/types/features/store/objects/selection/actions/DeleteObjectsAction.d.ts.map +1 -1
- package/lib/types/features/store/objects/upload/DocumentUploadModal.d.ts.map +1 -1
- package/lib/types/features/user/UserInfo.d.ts.map +1 -1
- package/lib/types/router/HistoryNavigator.d.ts.map +1 -1
- package/lib/types/router/Nav.d.ts +2 -1
- package/lib/types/router/Nav.d.ts.map +1 -1
- package/lib/types/session/UserSession.d.ts.map +1 -1
- package/lib/types/session/UserSessionProvider.d.ts.map +1 -1
- package/lib/types/session/auth/composable.d.ts.map +1 -1
- package/lib/types/widgets/form/Form.d.ts +2 -1
- package/lib/types/widgets/form/Form.d.ts.map +1 -1
- package/lib/types/widgets/form/FormContext.d.ts +5 -2
- package/lib/types/widgets/form/FormContext.d.ts.map +1 -1
- package/lib/types/widgets/form/ManagedObject.d.ts.map +1 -1
- package/lib/types/widgets/form/fields.d.ts +2 -2
- package/lib/types/widgets/form/fields.d.ts.map +1 -1
- package/lib/types/widgets/form/inputs.d.ts.map +1 -1
- package/lib/vertesia-ui-core.js +1 -1
- package/lib/vertesia-ui-core.js.map +1 -1
- package/lib/vertesia-ui-env.js +1 -1
- package/lib/vertesia-ui-env.js.map +1 -1
- package/lib/vertesia-ui-features.js +1 -1
- package/lib/vertesia-ui-features.js.map +1 -1
- package/lib/vertesia-ui-router.js +1 -1
- package/lib/vertesia-ui-router.js.map +1 -1
- package/lib/vertesia-ui-session.js +1 -1
- package/lib/vertesia-ui-session.js.map +1 -1
- package/lib/vertesia-ui-shell.js.map +1 -1
- package/lib/vertesia-ui-widgets.js +1 -1
- package/lib/vertesia-ui-widgets.js.map +1 -1
- package/package.json +170 -165
- package/src/core/components/Panel.tsx +34 -0
- package/src/core/components/SelectBox.tsx +1 -1
- package/src/core/components/SidePanel.tsx +5 -3
- package/src/core/components/TagsInput.tsx +388 -0
- package/src/core/components/index.ts +2 -1
- package/src/core/components/shadcn/breadcrumb.tsx +49 -30
- package/src/core/components/shadcn/button.tsx +3 -2
- package/src/core/components/shadcn/filters/filterBar.tsx +3 -3
- package/src/core/components/shadcn/index.ts +2 -1
- package/src/core/components/shadcn/input.tsx +10 -7
- package/src/core/components/shadcn/popover.tsx +2 -2
- package/src/core/components/shadcn/resizeable.tsx +4 -4
- package/src/core/components/shadcn/selectBox.tsx +87 -67
- package/src/core/components/shadcn/tabs.tsx +10 -3
- package/src/core/components/shadcn/textarea.tsx +21 -0
- package/src/core/hooks/CompositeState.tsx +156 -6
- package/src/core/hooks/index.ts +1 -0
- package/src/core/hooks/useScrollableSearch.tsx +193 -0
- package/src/env/index.ts +4 -3
- package/src/features/agent/PayloadBuilder.tsx +92 -65
- package/src/features/agent/chat/ModernAgentConversation.tsx +109 -118
- package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.tsx +3 -23
- package/src/features/agent/chat/ModernAgentOutput/Header.tsx +3 -11
- package/src/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.tsx +39 -55
- package/src/features/agent/chat/ModernAgentOutput/PlanPanel.tsx +1 -0
- package/src/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.tsx +8 -8
- package/src/features/agent/chat/ModernAgentOutput/WorkstreamTabs.tsx +9 -9
- package/src/features/facets/CollectionsFacetsNav.tsx +21 -0
- package/src/features/facets/InteractionsFacetsNav.tsx +13 -3
- package/src/features/facets/utils/SearchInterface.tsx +5 -1
- package/src/features/facets/utils/VTypeFacet.tsx +6 -2
- package/src/features/layout/GenericPageNavHeader.tsx +73 -10
- package/src/features/store/collections/BrowseCollectionView.tsx +4 -0
- package/src/features/store/collections/CreateCollection.tsx +3 -4
- package/src/features/store/collections/EditCollectionView.tsx +112 -85
- package/src/features/store/collections/SelectCollection.tsx +105 -49
- package/src/features/store/collections/SharedPropsEditor.tsx +61 -0
- package/src/features/store/collections/SyncMemberHeadsToggle.tsx +48 -0
- package/src/features/store/collections/index.ts +3 -1
- package/src/features/store/objects/DocumentSearchResults.tsx +128 -53
- package/src/features/store/objects/DocumentTable.tsx +14 -4
- package/src/features/store/objects/components/ContentOverview.tsx +208 -110
- package/src/features/store/objects/components/DocumentIcon.tsx +11 -12
- package/src/features/store/objects/components/SaveVersionConfirmModal.tsx +12 -2
- package/src/features/store/objects/components/useDownloadObject.ts +7 -2
- package/src/features/store/objects/layout/DocumentTableColumn.tsx +16 -1
- package/src/features/store/objects/layout/documentLayout.tsx +7 -5
- package/src/features/store/objects/layout/knowledge.md +10 -10
- package/src/features/store/objects/layout/renderers.tsx +39 -18
- package/src/features/store/objects/search/DocumentSearchContext.ts +6 -1
- package/src/features/store/objects/search/DocumentSearchProvider.tsx +1 -1
- package/src/features/store/objects/selection/ObjectsActionContext.tsx +3 -2
- package/src/features/store/objects/selection/SelectionActions.tsx +2 -0
- package/src/features/store/objects/selection/actions/AddToCollectionAction.tsx +8 -2
- package/src/features/store/objects/selection/actions/DeleteObjectsAction.tsx +22 -2
- package/src/features/store/objects/upload/DocumentUploadModal.tsx +18 -9
- package/src/features/store/objects/upload/useSmartFileUploadProcessing.ts +10 -7
- package/src/features/store/types/CreateOrUpdateTypeModal.tsx +1 -1
- package/src/features/user/UserInfo.tsx +2 -0
- package/src/router/HistoryNavigator.ts +33 -2
- package/src/router/Nav.tsx +4 -3
- package/src/session/UserSession.ts +1 -0
- package/src/session/UserSessionProvider.tsx +10 -2
- package/src/session/auth/composable.ts +71 -70
- package/src/shell/apps/AppProjectSelector.tsx +2 -2
- package/src/widgets/form/Form.tsx +19 -43
- package/src/widgets/form/FormContext.ts +5 -2
- package/src/widgets/form/ManagedObject.ts +4 -0
- package/src/widgets/form/fields.tsx +8 -6
- package/src/widgets/form/inputs.tsx +1 -0
- package/lib/esm/core/components/Textarea.js +0 -15
- package/lib/esm/core/components/Textarea.js.map +0 -1
- package/lib/types/core/components/Textarea.d.ts +0 -8
- package/lib/types/core/components/Textarea.d.ts.map +0 -1
- package/src/core/components/Textarea.tsx +0 -25
|
@@ -1,29 +1,33 @@
|
|
|
1
1
|
import { AsyncExecutionResult, VertesiaClient } from "@vertesia/client";
|
|
2
|
-
import {
|
|
2
|
+
import { AgentSearchScope, ExecutionEnvironmentRef, InCodeInteraction, mergeInCodePromptSchemas, supportsToolUse, WorkflowInteractionVars } from "@vertesia/common";
|
|
3
3
|
import { JSONObject } from "@vertesia/json";
|
|
4
4
|
import { useUserSession } from "@vertesia/ui/session";
|
|
5
5
|
import Ajv, { ValidateFunction } from "ajv";
|
|
6
6
|
import type { JSONSchema4 } from "json-schema";
|
|
7
7
|
import React, { createContext, useContext, useEffect, useState } from "react";
|
|
8
8
|
|
|
9
|
-
export interface ConversationWorkflowPayload {
|
|
10
|
-
interaction?: Interaction | undefined;
|
|
11
|
-
config: {
|
|
12
|
-
environment?: ExecutionEnvironmentRef | undefined;
|
|
13
|
-
model?: string;
|
|
14
|
-
}
|
|
15
|
-
data?: JSONObject | undefined,
|
|
16
|
-
tool_names: string[],
|
|
17
|
-
}
|
|
18
9
|
|
|
19
|
-
export
|
|
10
|
+
// export interface ConversationWorkflowPayload {
|
|
11
|
+
// config: {
|
|
12
|
+
// environment?: ExecutionEnvironmentRef | undefined;
|
|
13
|
+
// model?: string;
|
|
14
|
+
// }
|
|
15
|
+
// data?: JSONObject | undefined,
|
|
16
|
+
// tool_names: string[],
|
|
17
|
+
// }
|
|
18
|
+
|
|
19
|
+
export class PayloadBuilder {
|
|
20
20
|
_interactive: boolean = true;
|
|
21
21
|
_debug_mode: boolean = false;
|
|
22
22
|
_collection: string | undefined;
|
|
23
23
|
_start: boolean = false;
|
|
24
24
|
_preserveRunValues: boolean = false;
|
|
25
|
+
_interaction: InCodeInteraction | undefined;
|
|
26
|
+
_environment: ExecutionEnvironmentRef | undefined;
|
|
27
|
+
_model: string = '';
|
|
28
|
+
_tool_names: string[] = [];
|
|
29
|
+
_data: JSONObject | undefined;
|
|
25
30
|
|
|
26
|
-
payload: ConversationWorkflowPayload;
|
|
27
31
|
private _interactionParamsSchema?: JSONSchema4 | null;
|
|
28
32
|
private _inputValidator?: {
|
|
29
33
|
validate: ValidateFunction;
|
|
@@ -31,12 +35,6 @@ export class PayloadBuilder implements ConversationWorkflowPayload {
|
|
|
31
35
|
};
|
|
32
36
|
|
|
33
37
|
constructor(public vertesia: VertesiaClient, public updateState: (data: PayloadBuilder) => void) {
|
|
34
|
-
this.payload = {
|
|
35
|
-
config: {
|
|
36
|
-
model: '',
|
|
37
|
-
},
|
|
38
|
-
tool_names: [],
|
|
39
|
-
}
|
|
40
38
|
}
|
|
41
39
|
|
|
42
40
|
onStateChanged() {
|
|
@@ -47,7 +45,11 @@ export class PayloadBuilder implements ConversationWorkflowPayload {
|
|
|
47
45
|
clone() {
|
|
48
46
|
const builder = new PayloadBuilder(this.vertesia, this.updateState);
|
|
49
47
|
builder._interactionParamsSchema = this._interactionParamsSchema;
|
|
50
|
-
builder.
|
|
48
|
+
builder._interaction = this._interaction;
|
|
49
|
+
builder._data = this._data;
|
|
50
|
+
builder._environment = this._environment;
|
|
51
|
+
builder._model = this._model;
|
|
52
|
+
builder._tool_names = [...this._tool_names];
|
|
51
53
|
builder._interactive = this._interactive;
|
|
52
54
|
builder._debug_mode = this._debug_mode;
|
|
53
55
|
builder._inputValidator = this._inputValidator;
|
|
@@ -91,31 +93,64 @@ export class PayloadBuilder implements ConversationWorkflowPayload {
|
|
|
91
93
|
}
|
|
92
94
|
|
|
93
95
|
get search_scope() {
|
|
94
|
-
return this._collection ?
|
|
96
|
+
return this._collection ? AgentSearchScope.Collection : undefined;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
async restoreConversation(context: WorkflowInteractionVars) {
|
|
100
|
+
|
|
101
|
+
// Handle version-specific interaction resolution
|
|
102
|
+
let interactionRef = context.interaction;
|
|
103
|
+
if (context.version) {
|
|
104
|
+
const objectIdRegex = /^[a-fA-F0-9]{24}$/;
|
|
105
|
+
if (!objectIdRegex.test(interactionRef)) {
|
|
106
|
+
// regex to check if interactionRef is an object id (24 hex characters), only append version if not an object id
|
|
107
|
+
interactionRef = `${interactionRef}@${context.version}`;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
const inter = await this.vertesia.interactions.catalog.resolve(interactionRef);
|
|
112
|
+
const envId = inter.runtime?.environment || context.config?.environment;
|
|
113
|
+
const model = context.config?.model;
|
|
114
|
+
const env = await (envId ?
|
|
115
|
+
this.vertesia.environments.retrieve(context.config?.environment)
|
|
116
|
+
:
|
|
117
|
+
Promise.resolve(undefined)
|
|
118
|
+
);
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
this.interactionParamsSchema = context.interactionParamsSchema ?? null;
|
|
122
|
+
// trigger the setter to update the corresponding interactionParamsSchema
|
|
123
|
+
this.interaction = inter;
|
|
124
|
+
|
|
125
|
+
this._tool_names = context.tool_names || [];
|
|
126
|
+
this._data = context.data;
|
|
127
|
+
this._interactive = context.interactive;
|
|
128
|
+
this._debug_mode = context.debug_mode ?? false;
|
|
129
|
+
this.collection = context.collection_id ?? undefined;
|
|
130
|
+
|
|
131
|
+
// we need to trigger the setter to deal with default models
|
|
132
|
+
this.environment = env;
|
|
133
|
+
if (model) {
|
|
134
|
+
this._model = model;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
this.onStateChanged();
|
|
95
138
|
}
|
|
96
139
|
|
|
97
140
|
get interaction() {
|
|
98
|
-
return this.
|
|
141
|
+
return this._interaction;
|
|
99
142
|
}
|
|
100
|
-
set interaction(interaction:
|
|
101
|
-
if (interaction?.id !== this.
|
|
102
|
-
this.
|
|
103
|
-
|
|
143
|
+
set interaction(interaction: InCodeInteraction | undefined) {
|
|
144
|
+
if (interaction?.id !== this._interaction?.id) {
|
|
145
|
+
this._interaction = interaction;
|
|
146
|
+
// trigger the setter to update the onChange state
|
|
147
|
+
this.interactionParamsSchema = interaction ? mergeInCodePromptSchemas(interaction.prompts) as JSONSchema4 : undefined;
|
|
104
148
|
// Reset the validator when schema changes
|
|
105
149
|
this._inputValidator = undefined;
|
|
106
150
|
if (interaction && !this._preserveRunValues) {
|
|
107
|
-
if (interaction.environment) {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
} else {
|
|
111
|
-
this.payload.config.environment = interaction.environment;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
if (interaction.model) {
|
|
115
|
-
this.payload.config.model = interaction.model;
|
|
116
|
-
} else {
|
|
117
|
-
this.payload.config.model = this.environment?.default_model && supportsToolUse(this.environment.default_model, this.environment.provider)
|
|
118
|
-
? this.environment.default_model : undefined;
|
|
151
|
+
if (interaction.runtime?.environment) {
|
|
152
|
+
const envId = interaction.runtime.environment;
|
|
153
|
+
this.vertesia.environments.retrieve(envId).then((environment) => this.environment = environment);
|
|
119
154
|
}
|
|
120
155
|
}
|
|
121
156
|
this.onStateChanged();
|
|
@@ -123,19 +158,19 @@ export class PayloadBuilder implements ConversationWorkflowPayload {
|
|
|
123
158
|
}
|
|
124
159
|
|
|
125
160
|
get environment() {
|
|
126
|
-
return this.
|
|
161
|
+
return this._environment;
|
|
127
162
|
}
|
|
128
163
|
set environment(environment: ExecutionEnvironmentRef | undefined) {
|
|
129
|
-
if (environment?.id !== this.
|
|
130
|
-
this.
|
|
164
|
+
if (environment?.id !== this._environment?.id) {
|
|
165
|
+
this._environment = environment;
|
|
131
166
|
if (!this._preserveRunValues) {
|
|
132
167
|
// First try to use the interaction model, then the environment default model
|
|
133
|
-
const interactionModel = this.
|
|
168
|
+
const interactionModel = this.interaction?.runtime?.model;
|
|
134
169
|
if (interactionModel && environment && supportsToolUse(interactionModel, environment.provider)) {
|
|
135
|
-
this.
|
|
170
|
+
this._model = interactionModel;
|
|
136
171
|
} else {
|
|
137
|
-
this.
|
|
138
|
-
? environment.default_model :
|
|
172
|
+
this._model = environment?.default_model && supportsToolUse(environment.default_model, environment.provider)
|
|
173
|
+
? environment.default_model : '';
|
|
139
174
|
}
|
|
140
175
|
}
|
|
141
176
|
|
|
@@ -144,35 +179,31 @@ export class PayloadBuilder implements ConversationWorkflowPayload {
|
|
|
144
179
|
}
|
|
145
180
|
|
|
146
181
|
get model() {
|
|
147
|
-
return this.
|
|
182
|
+
return this._model;
|
|
148
183
|
}
|
|
149
184
|
set model(model: string | undefined) {
|
|
150
|
-
if (model !== this.
|
|
151
|
-
this.
|
|
185
|
+
if (model !== this._model) {
|
|
186
|
+
this._model = model || '';
|
|
152
187
|
this.onStateChanged();
|
|
153
188
|
}
|
|
154
189
|
}
|
|
155
190
|
|
|
156
191
|
get tool_names() {
|
|
157
|
-
return this.
|
|
192
|
+
return this._tool_names;
|
|
158
193
|
}
|
|
159
194
|
set tool_names(tools: string[]) {
|
|
160
|
-
this.
|
|
195
|
+
this._tool_names = tools;
|
|
161
196
|
this.onStateChanged();
|
|
162
197
|
}
|
|
163
198
|
|
|
164
199
|
get data(): JSONObject | undefined {
|
|
165
|
-
return this.
|
|
200
|
+
return this._data;
|
|
166
201
|
}
|
|
167
202
|
set data(prompt_data: JSONObject) {
|
|
168
|
-
this.
|
|
203
|
+
this._data = prompt_data;
|
|
169
204
|
this.onStateChanged();
|
|
170
205
|
}
|
|
171
206
|
|
|
172
|
-
get config() {
|
|
173
|
-
return this.payload.config;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
207
|
set run(run: AsyncExecutionResult | { workflow_id: string; run_id: string }) {
|
|
177
208
|
console.log("run", run);
|
|
178
209
|
this.onStateChanged();
|
|
@@ -214,15 +245,11 @@ export class PayloadBuilder implements ConversationWorkflowPayload {
|
|
|
214
245
|
this._debug_mode = false;
|
|
215
246
|
this._collection = undefined;
|
|
216
247
|
this._preserveRunValues = false;
|
|
217
|
-
this.
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
tool_names: [],
|
|
223
|
-
interaction: undefined,
|
|
224
|
-
data: undefined
|
|
225
|
-
};
|
|
248
|
+
this._model = '';
|
|
249
|
+
this._environment = undefined;
|
|
250
|
+
this._tool_names = [];
|
|
251
|
+
this._interaction = undefined;
|
|
252
|
+
this._data = undefined;
|
|
226
253
|
this._interactionParamsSchema = null;
|
|
227
254
|
this._inputValidator = undefined;
|
|
228
255
|
this.model = undefined;
|
|
@@ -250,7 +277,7 @@ export class PayloadBuilder implements ConversationWorkflowPayload {
|
|
|
250
277
|
};
|
|
251
278
|
}
|
|
252
279
|
|
|
253
|
-
const prompt_data = this.
|
|
280
|
+
const prompt_data = this._data || {};
|
|
254
281
|
const isValid = this._inputValidator.validate(prompt_data);
|
|
255
282
|
|
|
256
283
|
if (!isValid) {
|
|
@@ -1,33 +1,17 @@
|
|
|
1
|
+
import React, { useEffect, useMemo, useRef, useState } from "react";
|
|
2
|
+
import { Bot, Cpu, SendIcon, XIcon } from "lucide-react";
|
|
3
|
+
import { useUserSession } from "@vertesia/ui/session";
|
|
1
4
|
import { AsyncExecutionResult, VertesiaClient } from "@vertesia/client";
|
|
2
|
-
import {
|
|
3
|
-
AgentMessage,
|
|
4
|
-
AgentMessageType,
|
|
5
|
-
Plan,
|
|
6
|
-
UserInputSignal
|
|
7
|
-
} from "@vertesia/common";
|
|
5
|
+
import { AgentMessage, AgentMessageType, Plan, UserInputSignal } from "@vertesia/common";
|
|
8
6
|
import { Button, MessageBox, Spinner, useToast } from "@vertesia/ui/core";
|
|
9
|
-
|
|
10
|
-
import {
|
|
11
|
-
Bot,
|
|
12
|
-
Cpu,
|
|
13
|
-
SendIcon,
|
|
14
|
-
XIcon
|
|
15
|
-
} from "lucide-react";
|
|
16
|
-
import React, { useEffect, useMemo, useRef, useState } from "react";
|
|
17
|
-
import {
|
|
18
|
-
AnimatedThinkingDots,
|
|
19
|
-
PulsatingCircle
|
|
20
|
-
} from "./AnimatedThinkingDots";
|
|
7
|
+
|
|
8
|
+
import { AnimatedThinkingDots, PulsatingCircle } from "./AnimatedThinkingDots";
|
|
21
9
|
import AllMessagesMixed from "./ModernAgentOutput/AllMessagesMixed";
|
|
22
10
|
import Header from "./ModernAgentOutput/Header";
|
|
23
11
|
import MessageInput from "./ModernAgentOutput/MessageInput";
|
|
24
|
-
import
|
|
25
|
-
import {
|
|
26
|
-
getWorkstreamId,
|
|
27
|
-
insertMessageInTimeline,
|
|
28
|
-
isInProgress,
|
|
29
|
-
} from "./ModernAgentOutput/utils";
|
|
12
|
+
import { getWorkstreamId, insertMessageInTimeline, isInProgress } from "./ModernAgentOutput/utils";
|
|
30
13
|
import { ThinkingMessages } from "./WaitingMessages";
|
|
14
|
+
import InlineSlidingPlanPanel from "./ModernAgentOutput/InlineSlidingPlanPanel";
|
|
31
15
|
|
|
32
16
|
type StartWorkflowFn = (
|
|
33
17
|
initialMessage?: string,
|
|
@@ -177,7 +161,7 @@ function StartWorkflowView({
|
|
|
177
161
|
<div className="flex items-center justify-between py-2 px-3 border-b border-gray-100 dark:border-gray-800 bg-white dark:bg-gray-900">
|
|
178
162
|
<div className="flex items-center space-x-2">
|
|
179
163
|
<div className="p-1">
|
|
180
|
-
<Cpu className="
|
|
164
|
+
<Cpu className="size-3.5 text-muted" />
|
|
181
165
|
</div>
|
|
182
166
|
<span className="font-medium text-sm text-gray-700 dark:text-gray-300">
|
|
183
167
|
{title}
|
|
@@ -193,7 +177,7 @@ function StartWorkflowView({
|
|
|
193
177
|
title="Close"
|
|
194
178
|
className="text-slate-500 hover:text-slate-700"
|
|
195
179
|
>
|
|
196
|
-
<XIcon className="
|
|
180
|
+
<XIcon className="size-4" />
|
|
197
181
|
</Button>
|
|
198
182
|
)}
|
|
199
183
|
</div>
|
|
@@ -239,7 +223,7 @@ function StartWorkflowView({
|
|
|
239
223
|
{isSending ? (
|
|
240
224
|
<Spinner size="sm" className="mr-1.5" />
|
|
241
225
|
) : (
|
|
242
|
-
<SendIcon className="
|
|
226
|
+
<SendIcon className="size-3.5 mr-1.5" />
|
|
243
227
|
)}
|
|
244
228
|
{startButtonText}
|
|
245
229
|
</Button>
|
|
@@ -269,9 +253,7 @@ function ModernAgentConversationInner({
|
|
|
269
253
|
const [inputValue, setInputValue] = useState<string>("");
|
|
270
254
|
const [isSending, setIsSending] = useState(false);
|
|
271
255
|
const [viewMode, setViewMode] = useState<"stacked" | "sliding">("sliding");
|
|
272
|
-
|
|
273
|
-
const [showPlanPanel, _setShowPlanPanel] = useState<boolean>(false);
|
|
274
|
-
const [showSlidingPanel, setShowSlidingPanel] = useState<boolean>(false);
|
|
256
|
+
const [showSlidingPanel, setShowSlidingPanel] = useState<boolean>(!isModal);
|
|
275
257
|
// Keep track of multiple plans and their timestamps
|
|
276
258
|
const [plans, setPlans] = useState<Array<{ plan: Plan; timestamp: number }>>(
|
|
277
259
|
[],
|
|
@@ -602,103 +584,112 @@ function ModernAgentConversationInner({
|
|
|
602
584
|
};
|
|
603
585
|
|
|
604
586
|
return (
|
|
605
|
-
<div
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
isModal={isModal}
|
|
613
|
-
run={run}
|
|
614
|
-
viewMode={viewMode}
|
|
615
|
-
onViewModeChange={setViewMode}
|
|
616
|
-
showPlanPanel={showSlidingPanel}
|
|
617
|
-
hasPlan={plans.length > 0}
|
|
618
|
-
onTogglePlanPanel={() => {
|
|
619
|
-
setShowSlidingPanel(!showSlidingPanel);
|
|
620
|
-
// When opening the plan panel, mark that we've shown it
|
|
621
|
-
if (!showSlidingPanel) {
|
|
622
|
-
sessionStorage.setItem("plan-panel-shown", "true");
|
|
623
|
-
}
|
|
624
|
-
}}
|
|
625
|
-
onDownload={downloadConversation}
|
|
626
|
-
onCopyRunId={copyRunId}
|
|
627
|
-
resetWorkflow={resetWorkflow}
|
|
628
|
-
/>
|
|
629
|
-
|
|
630
|
-
{/* Inline Plan Panel - only shown when toggle is clicked */}
|
|
631
|
-
{showPlanPanel && !showSlidingPanel && plans.length > 0 && (
|
|
632
|
-
<PlanPanel
|
|
633
|
-
plan={getActivePlan.plan}
|
|
634
|
-
workstreamStatus={getActivePlan.workstreamStatus}
|
|
635
|
-
isVisible={true}
|
|
636
|
-
/>
|
|
637
|
-
)}
|
|
638
|
-
|
|
639
|
-
{messages.length === 0 && !isCompleted ? (
|
|
640
|
-
<div className="flex-1 flex flex-col items-center justify-center h-full text-center py-6 bg-white dark:bg-gray-900">
|
|
641
|
-
<div className="bg-white dark:bg-slate-800 p-5 max-w-md border border-blue-200 dark:border-blue-900/50 rounded-lg shadow-sm">
|
|
642
|
-
<div className="flex items-center space-x-3 mb-3">
|
|
643
|
-
<PulsatingCircle size="sm" color="blue" />
|
|
644
|
-
<div className="text-sm text-slate-600 dark:text-slate-300 font-medium">
|
|
645
|
-
{ThinkingMessages[thinkingMessageIndex]}
|
|
646
|
-
</div>
|
|
647
|
-
</div>
|
|
648
|
-
<div className="mt-4 flex justify-center">
|
|
649
|
-
<AnimatedThinkingDots color="blue" className="mt-1" />
|
|
650
|
-
</div>
|
|
651
|
-
</div>
|
|
652
|
-
</div>
|
|
653
|
-
) : (
|
|
654
|
-
<AllMessagesMixed
|
|
655
|
-
messages={messages}
|
|
656
|
-
bottomRef={bottomRef as React.RefObject<HTMLDivElement>}
|
|
657
|
-
viewMode={viewMode}
|
|
587
|
+
<div className="flex gap-2 h-full">
|
|
588
|
+
{/* Conversation Area - responsive width based on panel visibility */}
|
|
589
|
+
<div className={`flex flex-col h-full min-h-0 border-0 ${
|
|
590
|
+
showSlidingPanel ? 'lg:w-2/3 flex-1' : `flex-1 mx-auto ${!isModal ? 'max-w-4xl' : ''}`
|
|
591
|
+
}`}>
|
|
592
|
+
<Header
|
|
593
|
+
title={actualTitle}
|
|
658
594
|
isCompleted={isCompleted}
|
|
659
|
-
|
|
660
|
-
|
|
595
|
+
onClose={onClose}
|
|
596
|
+
isModal={isModal}
|
|
597
|
+
run={run}
|
|
598
|
+
viewMode={viewMode}
|
|
599
|
+
onViewModeChange={setViewMode}
|
|
661
600
|
showPlanPanel={showSlidingPanel}
|
|
601
|
+
hasPlan={plans.length > 0}
|
|
662
602
|
onTogglePlanPanel={() => {
|
|
663
|
-
console.log(
|
|
664
|
-
"Toggle plan panel called, current state:",
|
|
665
|
-
showSlidingPanel,
|
|
666
|
-
);
|
|
667
603
|
setShowSlidingPanel(!showSlidingPanel);
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
onChangePlan={(index) => setActivePlanIndex(index)}
|
|
672
|
-
taskLabels={getActivePlan.plan.plan?.reduce((acc, task) => {
|
|
673
|
-
if (task.id && task.goal) {
|
|
674
|
-
acc.set(task.id.toString(), task.goal);
|
|
604
|
+
// When opening the plan panel, mark that we've shown it
|
|
605
|
+
if (!showSlidingPanel) {
|
|
606
|
+
sessionStorage.setItem("plan-panel-shown", "true");
|
|
675
607
|
}
|
|
676
|
-
|
|
677
|
-
}
|
|
608
|
+
}}
|
|
609
|
+
onDownload={downloadConversation}
|
|
610
|
+
onCopyRunId={copyRunId}
|
|
611
|
+
resetWorkflow={resetWorkflow}
|
|
678
612
|
/>
|
|
679
|
-
)}
|
|
680
613
|
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
614
|
+
{messages.length === 0 && !isCompleted ? (
|
|
615
|
+
<div className="flex-1 flex flex-col items-center justify-center h-full text-center py-6">
|
|
616
|
+
<div className="p-5 max-w-md border border-info rounded-lg shadow-sm">
|
|
617
|
+
<div className="flex items-center space-x-3 mb-3">
|
|
618
|
+
<PulsatingCircle size="sm" color="blue" />
|
|
619
|
+
<div className="text-sm text-muted font-medium">
|
|
620
|
+
{ThinkingMessages[thinkingMessageIndex]}
|
|
621
|
+
</div>
|
|
622
|
+
</div>
|
|
623
|
+
<div className="mt-4 flex justify-center">
|
|
624
|
+
<AnimatedThinkingDots color="blue" className="mt-1" />
|
|
625
|
+
</div>
|
|
626
|
+
</div>
|
|
627
|
+
</div>
|
|
628
|
+
) : (
|
|
629
|
+
<AllMessagesMixed
|
|
630
|
+
messages={messages}
|
|
631
|
+
bottomRef={bottomRef as React.RefObject<HTMLDivElement>}
|
|
632
|
+
viewMode={viewMode}
|
|
697
633
|
isCompleted={isCompleted}
|
|
698
|
-
|
|
699
|
-
|
|
634
|
+
plan={getActivePlan.plan}
|
|
635
|
+
workstreamStatus={getActivePlan.workstreamStatus}
|
|
636
|
+
showPlanPanel={showSlidingPanel}
|
|
637
|
+
onTogglePlanPanel={() => {
|
|
638
|
+
console.log(
|
|
639
|
+
"Toggle plan panel called, current state:",
|
|
640
|
+
showSlidingPanel,
|
|
641
|
+
);
|
|
642
|
+
setShowSlidingPanel(!showSlidingPanel);
|
|
643
|
+
}}
|
|
644
|
+
plans={plans}
|
|
645
|
+
activePlanIndex={activePlanIndex}
|
|
646
|
+
onChangePlan={(index) => setActivePlanIndex(index)}
|
|
647
|
+
taskLabels={getActivePlan.plan.plan?.reduce((acc, task) => {
|
|
648
|
+
if (task.id && task.goal) {
|
|
649
|
+
acc.set(task.id.toString(), task.goal);
|
|
650
|
+
}
|
|
651
|
+
return acc;
|
|
652
|
+
}, new Map<string, string>())}
|
|
700
653
|
/>
|
|
701
|
-
)
|
|
654
|
+
)}
|
|
655
|
+
|
|
656
|
+
{workflowStatus && (
|
|
657
|
+
workflowStatus !== "RUNNING" ? (
|
|
658
|
+
<MessageBox
|
|
659
|
+
status={workflowStatus === "COMPLETED" ? 'success' : 'done'}
|
|
660
|
+
icon={null}
|
|
661
|
+
className="flex-shrink-0 m-2"
|
|
662
|
+
>
|
|
663
|
+
This Workflow is {workflowStatus}
|
|
664
|
+
</MessageBox>
|
|
665
|
+
) : showInput && (
|
|
666
|
+
<MessageInput
|
|
667
|
+
value={inputValue}
|
|
668
|
+
onChange={setInputValue}
|
|
669
|
+
onSend={handleSendMessage}
|
|
670
|
+
disabled={false}
|
|
671
|
+
isSending={isSending}
|
|
672
|
+
isCompleted={isCompleted}
|
|
673
|
+
activeTaskCount={getActiveTaskCount()}
|
|
674
|
+
placeholder={placeholder}
|
|
675
|
+
/>
|
|
676
|
+
))}
|
|
677
|
+
</div>
|
|
678
|
+
|
|
679
|
+
{/* Plan Panel Area - only rendered when panel should be shown */}
|
|
680
|
+
{showSlidingPanel && (
|
|
681
|
+
<div className="h-full lg:w-1/3 border-l">
|
|
682
|
+
<InlineSlidingPlanPanel
|
|
683
|
+
plan={getActivePlan.plan}
|
|
684
|
+
workstreamStatus={getActivePlan.workstreamStatus}
|
|
685
|
+
isOpen={showSlidingPanel}
|
|
686
|
+
onClose={() => setShowSlidingPanel(false)}
|
|
687
|
+
plans={plans}
|
|
688
|
+
activePlanIndex={activePlanIndex}
|
|
689
|
+
onChangePlan={setActivePlanIndex}
|
|
690
|
+
/>
|
|
691
|
+
</div>
|
|
692
|
+
)}
|
|
702
693
|
</div>
|
|
703
694
|
);
|
|
704
695
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { AgentMessage, AgentMessageType, Plan } from "@vertesia/common";
|
|
2
2
|
import React, { useEffect, useMemo, useState } from "react";
|
|
3
|
-
import InlineSlidingPlanPanel from "./InlineSlidingPlanPanel";
|
|
4
3
|
import MessageItem from "./MessageItem";
|
|
5
4
|
import WorkstreamTabs, { extractWorkstreams, filterMessagesByWorkstream } from "./WorkstreamTabs";
|
|
6
5
|
import { DONE_STATES, getWorkstreamId } from "./utils";
|
|
@@ -25,13 +24,6 @@ export default function AllMessagesMixed({
|
|
|
25
24
|
bottomRef,
|
|
26
25
|
viewMode = 'stacked',
|
|
27
26
|
isCompleted = false,
|
|
28
|
-
plan = { plan: [] },
|
|
29
|
-
workstreamStatus = new Map(),
|
|
30
|
-
showPlanPanel = false,
|
|
31
|
-
onTogglePlanPanel = () => { },
|
|
32
|
-
plans = [],
|
|
33
|
-
activePlanIndex = 0,
|
|
34
|
-
onChangePlan = () => { },
|
|
35
27
|
}: AllMessagesMixedProps) {
|
|
36
28
|
const containerRef = React.useRef<HTMLDivElement | null>(null);
|
|
37
29
|
const [activeWorkstream, setActiveWorkstream] = useState<string>("all");
|
|
@@ -127,24 +119,12 @@ export default function AllMessagesMixed({
|
|
|
127
119
|
return (
|
|
128
120
|
<div
|
|
129
121
|
ref={containerRef}
|
|
130
|
-
className="flex-1 min-h-0 h-full overflow-y-auto
|
|
122
|
+
className="flex-1 min-h-0 h-full overflow-y-auto px-4 sm:px-2 lg:px-4 flex flex-col relative"
|
|
131
123
|
data-testid="all-messages-mixed"
|
|
132
|
-
style={showPlanPanel ? { paddingRight: "350px" } : {}} // Only make space when panel is showing
|
|
133
124
|
>
|
|
134
|
-
{/* Plan panel - respect showPlanPanel flag */}
|
|
135
|
-
<InlineSlidingPlanPanel
|
|
136
|
-
plan={plan}
|
|
137
|
-
workstreamStatus={workstreamStatus}
|
|
138
|
-
isOpen={showPlanPanel}
|
|
139
|
-
onClose={onTogglePlanPanel}
|
|
140
|
-
plans={plans}
|
|
141
|
-
activePlanIndex={activePlanIndex}
|
|
142
|
-
onChangePlan={onChangePlan}
|
|
143
|
-
/>
|
|
144
|
-
|
|
145
125
|
|
|
146
126
|
{/* Workstream tabs with completion indicators */}
|
|
147
|
-
<div className="sticky top-0
|
|
127
|
+
<div className="sticky top-0 z-10">
|
|
148
128
|
<WorkstreamTabs
|
|
149
129
|
workstreams={workstreams}
|
|
150
130
|
activeWorkstream={activeWorkstream}
|
|
@@ -156,7 +136,7 @@ export default function AllMessagesMixed({
|
|
|
156
136
|
|
|
157
137
|
{displayMessages.length === 0 ? (
|
|
158
138
|
<div className="flex items-center justify-center h-full text-center py-8">
|
|
159
|
-
<div className="flex items-center px-4 py-3 text-
|
|
139
|
+
<div className="flex items-center px-4 py-3 text-muted">
|
|
160
140
|
{activeWorkstream === "all"
|
|
161
141
|
? "Waiting for agent response..."
|
|
162
142
|
: "No messages in this workstream yet..."}
|
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
import { AsyncExecutionResult } from "@vertesia/client";
|
|
2
2
|
import { Button, Command, CommandGroup, CommandItem, CommandList, Popover, PopoverContent, PopoverTrigger, useToast } from "@vertesia/ui/core";
|
|
3
3
|
import { useUserSession } from "@vertesia/ui/session";
|
|
4
|
-
import {
|
|
5
|
-
Bot,
|
|
6
|
-
ClipboardList,
|
|
7
|
-
CopyIcon,
|
|
8
|
-
DownloadCloudIcon,
|
|
9
|
-
ExternalLink,
|
|
10
|
-
MoreVertical,
|
|
11
|
-
XIcon,
|
|
12
|
-
} from "lucide-react";
|
|
4
|
+
import { Bot, ClipboardList, CopyIcon, DownloadCloudIcon, ExternalLink, MoreVertical, XIcon } from "lucide-react";
|
|
13
5
|
import { PayloadBuilderProvider, usePayloadBuilder } from "../../PayloadBuilder";
|
|
14
6
|
import { getConversationUrl } from "./utils";
|
|
15
7
|
|
|
@@ -45,7 +37,7 @@ export default function Header({
|
|
|
45
37
|
}: HeaderProps) {
|
|
46
38
|
return (
|
|
47
39
|
<PayloadBuilderProvider>
|
|
48
|
-
<div className="flex items-
|
|
40
|
+
<div className="flex flex-wrap items-end justify-between py-1.5 px-2 border-b shadow-sm flex-shrink-0">
|
|
49
41
|
<div className="flex flex-wrap items-center space-x-2">
|
|
50
42
|
<div className="flex items-center space-x-1">
|
|
51
43
|
<Bot className="size-5 text-muted" />
|
|
@@ -55,7 +47,7 @@ export default function Header({
|
|
|
55
47
|
(Run ID: {run.runId.substring(0, 8)}...)
|
|
56
48
|
</span>
|
|
57
49
|
</div>
|
|
58
|
-
<div className="flex items-center space-x-2">
|
|
50
|
+
<div className="flex justify-end items-center space-x-2 ml-auto">
|
|
59
51
|
{/* View Mode Toggle */}
|
|
60
52
|
<div className="flex items-center space-x-1 bg-muted rounded p-0.5">
|
|
61
53
|
<Button variant={viewMode === "stacked" ? "outline" : "ghost"} size="xs" className="rounded-l-md" onClick={() => onViewModeChange("stacked")}>
|