@swiss-ai-hub/web 0.290.11
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/LICENSE +661 -0
- package/README.md +479 -0
- package/app.config.ts +1 -0
- package/app.vue +52 -0
- package/assets/css/main.css +4 -0
- package/assets/images/logo.png +0 -0
- package/components/Agent/Avatar.vue +40 -0
- package/components/Agent/Card.vue +139 -0
- package/components/Agent/Configuration.vue +20 -0
- package/components/Agent/CreateModal.vue +287 -0
- package/components/Agent/EmptyCard.vue +35 -0
- package/components/Agent/List.vue +85 -0
- package/components/Agent/TemplateCard.vue +58 -0
- package/components/AppLoader.vue +55 -0
- package/components/Chat/Message.vue +90 -0
- package/components/Chat/SourceNodes.vue +120 -0
- package/components/Chat/Thread.vue +134 -0
- package/components/Costs/Table.vue +56 -0
- package/components/Dashboard/Component/BarChart.vue +46 -0
- package/components/Dashboard/Component/LineChart.vue +138 -0
- package/components/Dashboard/Component/Number.vue +31 -0
- package/components/Dashboard/Grid.vue +214 -0
- package/components/Dashboard/Item.vue +75 -0
- package/components/Dashboard/Trend.vue +34 -0
- package/components/Display/List/DisplayList.vue +93 -0
- package/components/Evaluation/Dataset/Card.vue +70 -0
- package/components/Evaluation/Dataset/Create.vue +81 -0
- package/components/Evaluation/Dataset/Edit.vue +132 -0
- package/components/Event/Display/AddMemoryToChatHistoryEvent.vue +60 -0
- package/components/Event/Display/AgentInTheLoopRequestEvent.vue +56 -0
- package/components/Event/Display/AgentInTheLoopResponseEvent.vue +17 -0
- package/components/Event/Display/Base.vue +125 -0
- package/components/Event/Display/BaseRetrieveMemoryEvent.vue +101 -0
- package/components/Event/Display/BaseStoreMemoryEvent.vue +182 -0
- package/components/Event/Display/ChunkEvent.vue +40 -0
- package/components/Event/Display/EmbeddingEvent.vue +25 -0
- package/components/Event/Display/ExceptionEvent.vue +21 -0
- package/components/Event/Display/GuardAcceptEvent.vue +25 -0
- package/components/Event/Display/GuardEvent.vue +17 -0
- package/components/Event/Display/GuardRejectionEvent.vue +25 -0
- package/components/Event/Display/HumanInTheLoopRequestEvent.vue +53 -0
- package/components/Event/Display/HumanInTheLoopResponseEvent.vue +40 -0
- package/components/Event/Display/LLMCostEvent.vue +25 -0
- package/components/Event/Display/LLMEvent.vue +92 -0
- package/components/Event/Display/LimitChatHistoryEvent.vue +60 -0
- package/components/Event/Display/RAGFailureStopEvent.vue +28 -0
- package/components/Event/Display/RAGStartEvent.vue +77 -0
- package/components/Event/Display/RAGSuccessStopEvent.vue +16 -0
- package/components/Event/Display/RawDataContent.vue +69 -0
- package/components/Event/Display/RerankerEvent.vue +39 -0
- package/components/Event/Display/RetrieverEvent.vue +22 -0
- package/components/Event/Display/RouterEvent.vue +54 -0
- package/components/Event/Display/StandaloneQuestionCondenserEvent.vue +38 -0
- package/components/Event/Display/StopEvent.vue +16 -0
- package/components/Event/Display/ThoughtEvent.vue +20 -0
- package/components/Event/Display/ToolEvent.vue +38 -0
- package/components/Event/Display/UnknownEvent.vue +17 -0
- package/components/Event/Display/UserMessageEvent.vue +35 -0
- package/components/Event/List/EventList.vue +249 -0
- package/components/Event/Statistics.vue +49 -0
- package/components/Event/Timeseries.vue +224 -0
- package/components/FormKit/AgentSelector.vue +307 -0
- package/components/FormKit/ChipsInput.vue +62 -0
- package/components/FormKit/DynamicConfiguration.vue +155 -0
- package/components/FormKit/IconSelector.vue +72 -0
- package/components/FormKit/KnowledgeDatabaseSelector.vue +92 -0
- package/components/FormKit/LocaleInput.vue +150 -0
- package/components/FormKit/ModelSelect.vue +110 -0
- package/components/FormKit/Repeater.vue +93 -0
- package/components/FormKit/VectorStoreInput.vue +247 -0
- package/components/Knowledge/Document/List.vue +140 -0
- package/components/Knowledge/Document/Overview.vue +28 -0
- package/components/Knowledge/Document/UploadModal.vue +298 -0
- package/components/Knowledge/Document/WithNodes.vue +105 -0
- package/components/Knowledge/Namespace/Card.vue +108 -0
- package/components/Knowledge/Namespace/CreateModal.vue +203 -0
- package/components/Knowledge/Namespace/EditModal.vue +134 -0
- package/components/Knowledge/Namespace/EmptyCard.vue +35 -0
- package/components/Knowledge/Node/Content.vue +71 -0
- package/components/Markdown/Renderer.vue +87 -0
- package/components/Memory/DetailPage.vue +48 -0
- package/components/Memory/Edit.vue +241 -0
- package/components/Memory/Graph.vue +318 -0
- package/components/Memory/List.vue +155 -0
- package/components/Memory/MemoryManagementPage.vue +178 -0
- package/components/Memory/OpenWebUIContent.vue +96 -0
- package/components/Memory/PageLayout.vue +72 -0
- package/components/Models/ModelDetailsPanel.vue +250 -0
- package/components/Models/NamespaceCard.vue +79 -0
- package/components/Navigation/Left.vue +85 -0
- package/components/Navigation/Top.vue +31 -0
- package/components/Notification/Item.vue +88 -0
- package/components/Notification/NotificationsOverlay.vue +164 -0
- package/components/Process/Card.vue +119 -0
- package/components/Process/Configuration.vue +20 -0
- package/components/Process/CreateModal.vue +276 -0
- package/components/Process/EmptyCard.vue +35 -0
- package/components/Process/Form.vue +153 -0
- package/components/Process/Starts.vue +44 -0
- package/components/Process/Walkthrough/List.vue +162 -0
- package/components/Role/AccessRulesEditor.vue +132 -0
- package/components/Role/Card.vue +68 -0
- package/components/Role/Create.vue +55 -0
- package/components/Role/Edit.vue +82 -0
- package/components/Role/UsageLimitsEditor.vue +225 -0
- package/components/Service/Selection.vue +148 -0
- package/components/Structural/Column.vue +74 -0
- package/components/Structural/Screen.vue +10 -0
- package/components/Structural/Substructure.vue +5 -0
- package/components/Tenant/Switcher.vue +102 -0
- package/components/Thread/Details.vue +135 -0
- package/components/Thread/Hierarchy.vue +136 -0
- package/components/Thread/Info.vue +41 -0
- package/components/Thread/List.vue +136 -0
- package/components/User/Bar.vue +74 -0
- package/components/User/List.vue +86 -0
- package/components/User/RoleChips.vue +83 -0
- package/components/User/Settings.vue +79 -0
- package/components/Workflow/Modal.vue +39 -0
- package/components/Workflow/NodeCard.vue +41 -0
- package/components/Workflow/StartNode.vue +24 -0
- package/components/Workflow/StepNode.vue +27 -0
- package/components/Workflow/StopNode.vue +24 -0
- package/components/Workflow/Visualization.vue +265 -0
- package/components/mdc/MarkdownFigure.vue +9 -0
- package/components/mdc/MarkdownTable.vue +9 -0
- package/components/mdc/ResolveImageComponent.vue +58 -0
- package/composables/agent/useAgentClass.ts +27 -0
- package/composables/agent/useAgentClassInstances.ts +27 -0
- package/composables/agent/useAgentClasses.ts +27 -0
- package/composables/agent/useAgentIconFromThread.ts +8 -0
- package/composables/agent/useAgentInstance.ts +28 -0
- package/composables/agent/useAgentInstanceThreads.ts +76 -0
- package/composables/agent/useAgentInstances.ts +25 -0
- package/composables/agent/useAgentNavigation.ts +35 -0
- package/composables/agent/useCreateAgentInstance.ts +33 -0
- package/composables/agent/useDeleteAgentInstance.ts +31 -0
- package/composables/agent/useUpdateAgentInstance.ts +40 -0
- package/composables/auth/useAuth.ts +54 -0
- package/composables/auth/useAuthProviders.ts +14 -0
- package/composables/chat/useChatCompletions.ts +30 -0
- package/composables/dashboard/useAgentNameFromDashboardWidget.ts +27 -0
- package/composables/dashboard/useDashboardComponent.ts +27 -0
- package/composables/dashboard/useSaveDashboard.ts +21 -0
- package/composables/document/useCreateNamespace.ts +26 -0
- package/composables/document/useDatabases.ts +23 -0
- package/composables/document/useDocument.ts +29 -0
- package/composables/document/useDocumentUrl.ts +20 -0
- package/composables/document/useDocuments.ts +107 -0
- package/composables/document/useNodes.ts +29 -0
- package/composables/document/useSummaryNodes.ts +32 -0
- package/composables/document/useUpdateNamespace.ts +22 -0
- package/composables/evaluation/useCreateDataset.ts +19 -0
- package/composables/evaluation/useDataset.ts +26 -0
- package/composables/evaluation/useDatasets.ts +25 -0
- package/composables/evaluation/useUpdateDataset.ts +23 -0
- package/composables/event/useBasicEventStatistics.ts +83 -0
- package/composables/event/useEventColor.ts +25 -0
- package/composables/event/useEventComponent.ts +87 -0
- package/composables/event/useEventTimeseries.ts +39 -0
- package/composables/event/useEventTimeseriesStats.ts +26 -0
- package/composables/file/useFileUpload.ts +91 -0
- package/composables/file/useSupportedFileTypes.ts +22 -0
- package/composables/form/useCreateInstanceForm.ts +251 -0
- package/composables/form/useFormKitTransform.ts +753 -0
- package/composables/memory/useMemoryCRUD.ts +88 -0
- package/composables/memory/useMemoryFactory.ts +319 -0
- package/composables/memory/useMemorySearchFilter.ts +74 -0
- package/composables/models/useModelsList.ts +24 -0
- package/composables/models/useSingleModel.ts +30 -0
- package/composables/notification/useNotificationPoller.ts +58 -0
- package/composables/notification/useNotifications.ts +57 -0
- package/composables/notification/useUpdateMultipleNotifications.ts +17 -0
- package/composables/notification/useUpdateNotification.ts +17 -0
- package/composables/process/useCreateProcessInstance.ts +32 -0
- package/composables/process/useDeleteProcessInstance.ts +31 -0
- package/composables/process/useProcessClasses.ts +27 -0
- package/composables/process/useProcessInstance.ts +28 -0
- package/composables/process/useProcessInstances.ts +27 -0
- package/composables/process/useProcessWalkthroughs.ts +73 -0
- package/composables/process/useSendProcessStartForm.ts +43 -0
- package/composables/process/useUpdateProcessInstance.ts +40 -0
- package/composables/role/useCreateRole.ts +19 -0
- package/composables/role/useDeleteRole.ts +21 -0
- package/composables/role/useRole.ts +30 -0
- package/composables/role/useRoles.ts +25 -0
- package/composables/role/useUpdateRole.ts +22 -0
- package/composables/suite/useApps.ts +31 -0
- package/composables/suite/useSuite.ts +26 -0
- package/composables/tenant/useActiveTenant.ts +27 -0
- package/composables/tenant/useSysadminNavigation.ts +19 -0
- package/composables/tenant/useTenant.ts +38 -0
- package/composables/tenant/useTenantMemberships.ts +15 -0
- package/composables/tenant/useTenantPath.ts +20 -0
- package/composables/tenant/useTenantPolling.ts +30 -0
- package/composables/tenant/useTenantReady.ts +12 -0
- package/composables/theme/useDarkMode.ts +5 -0
- package/composables/thread/useThread.ts +27 -0
- package/composables/thread/useThreadEvents.ts +91 -0
- package/composables/thread/useThreadUtils.ts +49 -0
- package/composables/thread/useThreads.ts +64 -0
- package/composables/thread/useThreadsInfinite.ts +56 -0
- package/composables/translation/useTranslate.ts +20 -0
- package/composables/useRouteReady.ts +21 -0
- package/composables/useTimeAgo.ts +40 -0
- package/composables/user/useAssignRoleToUser.ts +22 -0
- package/composables/user/useMyUser.ts +25 -0
- package/composables/user/useRevokeRoleFromUser.ts +21 -0
- package/composables/user/useUser.ts +30 -0
- package/composables/user/useUsers.ts +63 -0
- package/composables/utils/useJsonTree.ts +138 -0
- package/formkit.config.ts +44 -0
- package/i18n/locales/de.yaml +815 -0
- package/i18n/locales/en.yaml +804 -0
- package/i18n/locales/fr.yaml +812 -0
- package/i18n/locales/it.yaml +808 -0
- package/layouts/anonymous.vue +8 -0
- package/layouts/default.vue +116 -0
- package/middleware/auth.global.ts +62 -0
- package/nuxt.config.ts +145 -0
- package/package.json +114 -0
- package/pages/[tenant]/index.vue +31 -0
- package/pages/[tenant]/notifications/index.vue +235 -0
- package/pages/[tenant]/service/agents/[agent_class]-[agent_id]/chat.vue +67 -0
- package/pages/[tenant]/service/agents/[agent_class]-[agent_id]/configuration.vue +122 -0
- package/pages/[tenant]/service/agents/[agent_class]-[agent_id]/memories/[memory_id].vue +3 -0
- package/pages/[tenant]/service/agents/[agent_class]-[agent_id]/memories.vue +20 -0
- package/pages/[tenant]/service/agents/[agent_class]-[agent_id]/overview.vue +72 -0
- package/pages/[tenant]/service/agents/[agent_class]-[agent_id]/threads.vue +52 -0
- package/pages/[tenant]/service/agents/[agent_class]-[agent_id]/workflow.vue +19 -0
- package/pages/[tenant]/service/agents/[agent_class]-[agent_id].vue +63 -0
- package/pages/[tenant]/service/agents/templates.vue +102 -0
- package/pages/[tenant]/service/agents.vue +185 -0
- package/pages/[tenant]/service/datasets/[dataset_id].vue +81 -0
- package/pages/[tenant]/service/datasets.vue +53 -0
- package/pages/[tenant]/service/health/index.vue +3 -0
- package/pages/[tenant]/service/knowledge/[db]/[namespace]/[document_id]/nodes.vue +20 -0
- package/pages/[tenant]/service/knowledge/[db]/[namespace]/[document_id]/overview.vue +40 -0
- package/pages/[tenant]/service/knowledge/[db]/[namespace]/[document_id]/summary.vue +88 -0
- package/pages/[tenant]/service/knowledge/[db]/[namespace]/[document_id].vue +48 -0
- package/pages/[tenant]/service/knowledge/[db]/[namespace].vue +144 -0
- package/pages/[tenant]/service/knowledge.vue +126 -0
- package/pages/[tenant]/service/models/[model_name].vue +84 -0
- package/pages/[tenant]/service/models.vue +61 -0
- package/pages/[tenant]/service/my-account.vue +117 -0
- package/pages/[tenant]/service/openai/[thread_id]/[display_id]/memories.vue +66 -0
- package/pages/[tenant]/service/openai/[thread_id]/[display_id]/sources.vue +100 -0
- package/pages/[tenant]/service/openai/[thread_id]/[display_id]/tracing.vue +49 -0
- package/pages/[tenant]/service/openai.vue +101 -0
- package/pages/[tenant]/service/organization-memories/graph.vue +97 -0
- package/pages/[tenant]/service/organization-memories/list/[memory_id].vue +3 -0
- package/pages/[tenant]/service/organization-memories/list.vue +150 -0
- package/pages/[tenant]/service/organization-memories.vue +3 -0
- package/pages/[tenant]/service/processes/[process_class]-[process_id]/[process_walkthrough_id].vue +7 -0
- package/pages/[tenant]/service/processes/[process_class]-[process_id]/configuration.vue +106 -0
- package/pages/[tenant]/service/processes/[process_class]-[process_id]/overview.vue +67 -0
- package/pages/[tenant]/service/processes/[process_class]-[process_id]/start.vue +26 -0
- package/pages/[tenant]/service/processes/[process_class]-[process_id]/walkthroughs/[process_walkthrough_id]/overview.vue +14 -0
- package/pages/[tenant]/service/processes/[process_class]-[process_id]/walkthroughs.vue +54 -0
- package/pages/[tenant]/service/processes/[process_class]-[process_id].vue +60 -0
- package/pages/[tenant]/service/processes.vue +129 -0
- package/pages/[tenant]/service/roles/[role_id].vue +54 -0
- package/pages/[tenant]/service/roles.vue +84 -0
- package/pages/[tenant]/service/threads/[thread_id]/chat.vue +51 -0
- package/pages/[tenant]/service/threads/[thread_id]/display/[display_id].vue +21 -0
- package/pages/[tenant]/service/threads/[thread_id]/display.vue +29 -0
- package/pages/[tenant]/service/threads/[thread_id]/hierarchy.vue +14 -0
- package/pages/[tenant]/service/threads/[thread_id]/memories/[memory_id].vue +3 -0
- package/pages/[tenant]/service/threads/[thread_id]/memories.vue +19 -0
- package/pages/[tenant]/service/threads/[thread_id]/overview.vue +100 -0
- package/pages/[tenant]/service/threads/[thread_id].vue +54 -0
- package/pages/[tenant]/service/threads.vue +52 -0
- package/pages/[tenant]/service/user-memories/graph.vue +97 -0
- package/pages/[tenant]/service/user-memories/list/[memory_id].vue +3 -0
- package/pages/[tenant]/service/user-memories/list.vue +150 -0
- package/pages/[tenant]/service/user-memories.vue +3 -0
- package/pages/[tenant]/service/users/[user_id].vue +117 -0
- package/pages/[tenant]/service/users.vue +88 -0
- package/pages/auth/callback.vue +52 -0
- package/pages/auth/login.vue +80 -0
- package/pages/auth/renew.vue +24 -0
- package/pages/index.vue +59 -0
- package/pages/select-tenant.vue +76 -0
- package/plugins/0.runtime-config.client.ts +55 -0
- package/plugins/apexcharts.client.ts +5 -0
- package/plugins/api-client.client.ts +38 -0
- package/plugins/dark-mode.client.ts +12 -0
- package/plugins/keycloak-client.ts +41 -0
- package/plugins/oidc-client.ts +78 -0
- package/sdk/client/client/client.gen.ts +237 -0
- package/sdk/client/client/index.ts +24 -0
- package/sdk/client/client/types.gen.ts +213 -0
- package/sdk/client/client/utils.gen.ts +407 -0
- package/sdk/client/client.gen.ts +25 -0
- package/sdk/client/core/auth.gen.ts +42 -0
- package/sdk/client/core/bodySerializer.gen.ts +96 -0
- package/sdk/client/core/params.gen.ts +181 -0
- package/sdk/client/core/pathSerializer.gen.ts +180 -0
- package/sdk/client/core/queryKeySerializer.gen.ts +136 -0
- package/sdk/client/core/serverSentEvents.gen.ts +265 -0
- package/sdk/client/core/types.gen.ts +118 -0
- package/sdk/client/core/utils.gen.ts +143 -0
- package/sdk/client/index.ts +1013 -0
- package/sdk/client/schemas.gen.ts +35395 -0
- package/sdk/client/sdk.gen.ts +3438 -0
- package/sdk/client/transformers.gen.ts +143 -0
- package/sdk/client/types.gen.ts +27567 -0
- package/tailwind.config.mjs +27 -0
- package/themes/aihub-theme.ts +125 -0
- package/types/DashboardWidget.ts +13 -0
- package/types/EventChartInput.ts +7 -0
- package/types/NavItem.ts +6 -0
- package/types/TimeseriesInput.ts +7 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<StructuralColumn
|
|
3
|
+
:title="processInstance?.process_config.name"
|
|
4
|
+
close-route="/service/processes"
|
|
5
|
+
:loading="processInstanceIsLoading"
|
|
6
|
+
size="large"
|
|
7
|
+
>
|
|
8
|
+
<div class="flex flex-col gap-12">
|
|
9
|
+
<ProcessStarts
|
|
10
|
+
:human-inputs="startInputs"
|
|
11
|
+
/>
|
|
12
|
+
</div>
|
|
13
|
+
</StructuralColumn>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script setup lang="ts">
|
|
17
|
+
import type { HumanInSpecsReadable } from '@core/sdk/client'
|
|
18
|
+
|
|
19
|
+
const { processInstance, processInstanceIsLoading } = useProcessInstance()
|
|
20
|
+
|
|
21
|
+
const startInputs = computed<HumanInSpecsReadable[]>(() => {
|
|
22
|
+
return processInstance.value?.human_inputs?.filter((input: HumanInSpecsReadable) => {
|
|
23
|
+
return input.is_process_start
|
|
24
|
+
})
|
|
25
|
+
})
|
|
26
|
+
</script>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<StructuralColumn
|
|
3
|
+
:title="t('thread.events.title')"
|
|
4
|
+
:close-route="`/service/processes/${route.params.process_class}-${route.params.process_id}/walkthroughs`"
|
|
5
|
+
:loading="false"
|
|
6
|
+
>
|
|
7
|
+
<p>This is overview</p>
|
|
8
|
+
</StructuralColumn>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script setup lang="ts">
|
|
12
|
+
const route = useRoute()
|
|
13
|
+
const { t } = useI18n()
|
|
14
|
+
</script>
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<StructuralSubstructure>
|
|
3
|
+
<StructuralColumn
|
|
4
|
+
:title="t('process.title')"
|
|
5
|
+
:loading="isLoading"
|
|
6
|
+
>
|
|
7
|
+
<ProcessWalkthroughList
|
|
8
|
+
:walkthroughs="walkthroughs"
|
|
9
|
+
@selected="toWalkthrough"
|
|
10
|
+
/>
|
|
11
|
+
|
|
12
|
+
<div class="mt-4">
|
|
13
|
+
<Paginator
|
|
14
|
+
:rows="pageSize"
|
|
15
|
+
:total-records="pagination.total"
|
|
16
|
+
:rows-per-page-options="[10, 20, 30, 50]"
|
|
17
|
+
:first="(currentPage - 1) * pageSize"
|
|
18
|
+
@page="onPageChange"
|
|
19
|
+
/>
|
|
20
|
+
</div>
|
|
21
|
+
</StructuralColumn>
|
|
22
|
+
<NuxtPage />
|
|
23
|
+
</StructuralSubstructure>
|
|
24
|
+
</template>
|
|
25
|
+
|
|
26
|
+
<script setup lang="ts">
|
|
27
|
+
import { useProcessWalkthroughs } from '@core/composables/process/useProcessWalkthroughs'
|
|
28
|
+
|
|
29
|
+
import type { ProcessWalkthroughDto } from '@core/sdk/client'
|
|
30
|
+
|
|
31
|
+
const router = useRouter()
|
|
32
|
+
const tenantPath = useTenantPath()
|
|
33
|
+
const { t } = useI18n()
|
|
34
|
+
|
|
35
|
+
const {
|
|
36
|
+
walkthroughs,
|
|
37
|
+
isLoading,
|
|
38
|
+
pagination,
|
|
39
|
+
currentPage,
|
|
40
|
+
pageSize,
|
|
41
|
+
setPage,
|
|
42
|
+
setPageSize,
|
|
43
|
+
} = useProcessWalkthroughs()
|
|
44
|
+
|
|
45
|
+
const toWalkthrough = (walkthrough: ProcessWalkthroughDto) => {
|
|
46
|
+
router.push(tenantPath(`/service/processes/${walkthrough.process_class}-${walkthrough.process_id}/walkthroughs/${walkthrough.process_walkthrough_id}/overview`))
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const onPageChange = (event) => {
|
|
50
|
+
setPageSize(event.rows)
|
|
51
|
+
const newPage = Math.floor(event.first / event.rows) + 1
|
|
52
|
+
setPage(newPage)
|
|
53
|
+
}
|
|
54
|
+
</script>
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex flex-col gap-2">
|
|
3
|
+
<SelectButton
|
|
4
|
+
v-if="navItems"
|
|
5
|
+
:model-value="activeNavItem"
|
|
6
|
+
:options="navItems"
|
|
7
|
+
data-key="key"
|
|
8
|
+
option-label="name"
|
|
9
|
+
size="small"
|
|
10
|
+
@update:model-value="toNavItem"
|
|
11
|
+
/>
|
|
12
|
+
<NuxtPage />
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script setup lang="ts">
|
|
17
|
+
import type { NavItem } from '@core/types/NavItem'
|
|
18
|
+
|
|
19
|
+
const router = useRouter()
|
|
20
|
+
const route = useRoute()
|
|
21
|
+
const tenantPath = useTenantPath()
|
|
22
|
+
const { t } = useI18n()
|
|
23
|
+
|
|
24
|
+
const { processInstance } = useProcessInstance()
|
|
25
|
+
|
|
26
|
+
const subPath = (path: string) => {
|
|
27
|
+
return `/service/processes/${route.params.process_class}-${route.params.process_id}/${path}`
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const isActive = (path: string) => {
|
|
31
|
+
return () => {
|
|
32
|
+
const localizedPath = tenantPath(subPath(path))
|
|
33
|
+
return route.path.startsWith(localizedPath)
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const hasConfigForm = computed(() => {
|
|
38
|
+
return processInstance.value?.form && processInstance.value.form.length > 0
|
|
39
|
+
})
|
|
40
|
+
|
|
41
|
+
const navItems = computed<NavItem[]>(() => {
|
|
42
|
+
const items: NavItem[] = [
|
|
43
|
+
{ name: t('process.navigation.overview'), key: 'overview', path: subPath('overview'), isActive: isActive('overview') },
|
|
44
|
+
{ name: t('process.navigation.walkthroughs'), key: 'walkthroughs', path: subPath('walkthroughs'), isActive: isActive('walkthroughs') },
|
|
45
|
+
{ name: t('process.navigation.start'), key: 'start', path: subPath('start'), isActive: isActive('start') },
|
|
46
|
+
]
|
|
47
|
+
if (hasConfigForm.value) {
|
|
48
|
+
items.push({ name: t('process.navigation.configuration'), key: 'configuration', path: subPath('configuration'), isActive: isActive('configuration') })
|
|
49
|
+
}
|
|
50
|
+
return items
|
|
51
|
+
})
|
|
52
|
+
|
|
53
|
+
const toNavItem = (navItem: NavItem) => {
|
|
54
|
+
router.push(tenantPath(navItem.path))
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const activeNavItem = computed<NavItem | undefined>(() => {
|
|
58
|
+
return navItems.value?.filter(navItem => navItem.isActive())[0]
|
|
59
|
+
})
|
|
60
|
+
</script>
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<StructuralScreen>
|
|
3
|
+
<StructuralColumn
|
|
4
|
+
:title="t('process.title')"
|
|
5
|
+
:loading="isLoading"
|
|
6
|
+
>
|
|
7
|
+
<div class="flex flex-col gap-12">
|
|
8
|
+
<div
|
|
9
|
+
v-for="group in groupedProcesses"
|
|
10
|
+
:key="group.processClass"
|
|
11
|
+
>
|
|
12
|
+
<div class="flex items-center gap-2 pb-2 pl-2">
|
|
13
|
+
<Icon
|
|
14
|
+
:name="group.icon"
|
|
15
|
+
size="1.25em"
|
|
16
|
+
class="text-surface-500"
|
|
17
|
+
/>
|
|
18
|
+
<span class="text-sm font-medium">{{ group.name }}</span>
|
|
19
|
+
<span
|
|
20
|
+
v-if="group.description"
|
|
21
|
+
class="text-xs text-surface-500"
|
|
22
|
+
>
|
|
23
|
+
— {{ group.description }}
|
|
24
|
+
</span>
|
|
25
|
+
</div>
|
|
26
|
+
<div class="grid grid-cols-2 gap-4 2xl:grid-cols-2">
|
|
27
|
+
<ProcessCard
|
|
28
|
+
v-for="process in group.instances"
|
|
29
|
+
:key="`${process.process_class}-${process.process_id}`"
|
|
30
|
+
:process="process"
|
|
31
|
+
@click="() => toProcess(process)"
|
|
32
|
+
/>
|
|
33
|
+
<ProcessEmptyCard
|
|
34
|
+
v-if="group.isAvailable"
|
|
35
|
+
@add="openCreateModal(group.processClass)"
|
|
36
|
+
/>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
<ProcessCreateModal
|
|
41
|
+
v-model="createModalOpen"
|
|
42
|
+
:initial-class="selectedClassForCreate"
|
|
43
|
+
@success="handleCreateSuccess"
|
|
44
|
+
/>
|
|
45
|
+
</StructuralColumn>
|
|
46
|
+
|
|
47
|
+
<NuxtPage />
|
|
48
|
+
</StructuralScreen>
|
|
49
|
+
</template>
|
|
50
|
+
|
|
51
|
+
<script setup lang="ts">
|
|
52
|
+
import type { FullProcessInstanceDtoReadable } from '@core/sdk/client'
|
|
53
|
+
|
|
54
|
+
const router = useRouter()
|
|
55
|
+
const tenantPath = useTenantPath()
|
|
56
|
+
const { t, locale } = useI18n()
|
|
57
|
+
|
|
58
|
+
const { processInstances, processInstancesAreLoading } = useProcessInstances()
|
|
59
|
+
const { processClasses, processClassesAreLoading } = useProcessClasses()
|
|
60
|
+
|
|
61
|
+
const isLoading = computed(() => processInstancesAreLoading.value || processClassesAreLoading.value)
|
|
62
|
+
|
|
63
|
+
const createModalOpen = ref(false)
|
|
64
|
+
const selectedClassForCreate = ref('')
|
|
65
|
+
|
|
66
|
+
const openCreateModal = (processClass: string) => {
|
|
67
|
+
selectedClassForCreate.value = processClass
|
|
68
|
+
createModalOpen.value = true
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const groupedProcesses = computed(() => {
|
|
72
|
+
const groups = new Map<string, {
|
|
73
|
+
processClass: string
|
|
74
|
+
name: string
|
|
75
|
+
description: string
|
|
76
|
+
icon: string
|
|
77
|
+
instances: FullProcessInstanceDtoReadable[]
|
|
78
|
+
isAvailable: boolean
|
|
79
|
+
}>()
|
|
80
|
+
|
|
81
|
+
const localeKey = locale.value as 'de' | 'en' | 'fr' | 'it'
|
|
82
|
+
|
|
83
|
+
// First, add all available process classes (even those without instances)
|
|
84
|
+
if (processClasses.value) {
|
|
85
|
+
for (const classInfo of processClasses.value) {
|
|
86
|
+
groups.set(classInfo.process_class, {
|
|
87
|
+
processClass: classInfo.process_class,
|
|
88
|
+
name: classInfo.name?.[localeKey] ?? classInfo.process_class,
|
|
89
|
+
description: classInfo.description?.[localeKey] ?? '',
|
|
90
|
+
icon: classInfo.icon ?? 'carbon:ibm-event-processing',
|
|
91
|
+
instances: [],
|
|
92
|
+
isAvailable: true,
|
|
93
|
+
})
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// Then, add instances to their groups (or create groups for unavailable classes)
|
|
98
|
+
if (processInstances.value) {
|
|
99
|
+
for (const process of processInstances.value) {
|
|
100
|
+
const existing = groups.get(process.process_class)
|
|
101
|
+
if (existing) {
|
|
102
|
+
existing.instances.push(process)
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
// Class not available - create group but mark as unavailable
|
|
106
|
+
groups.set(process.process_class, {
|
|
107
|
+
processClass: process.process_class,
|
|
108
|
+
name: process.process_class,
|
|
109
|
+
description: '',
|
|
110
|
+
icon: 'carbon:ibm-event-processing',
|
|
111
|
+
instances: [process],
|
|
112
|
+
isAvailable: false,
|
|
113
|
+
})
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
return Array.from(groups.values())
|
|
119
|
+
.sort((a, b) => a.processClass.localeCompare(b.processClass))
|
|
120
|
+
})
|
|
121
|
+
|
|
122
|
+
const toProcess = (process: FullProcessInstanceDtoReadable) => {
|
|
123
|
+
router.push(tenantPath(`/service/processes/${process.process_class}-${process.process_id}/overview`))
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
const handleCreateSuccess = (processClass: string, processId: string) => {
|
|
127
|
+
router.push(tenantPath(`/service/processes/${processClass}-${processId}/overview`))
|
|
128
|
+
}
|
|
129
|
+
</script>
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<StructuralColumn
|
|
3
|
+
:title="role?.name"
|
|
4
|
+
close-route="/service/roles"
|
|
5
|
+
:loading="roleIsLoading"
|
|
6
|
+
size="small"
|
|
7
|
+
>
|
|
8
|
+
<div class="flex flex-col gap-4">
|
|
9
|
+
<RoleEdit
|
|
10
|
+
v-model="clonedRole"
|
|
11
|
+
/>
|
|
12
|
+
<div class="flex justify-end">
|
|
13
|
+
<Button
|
|
14
|
+
type="button"
|
|
15
|
+
:label="t('role.save_button')"
|
|
16
|
+
icon="pi pi-save"
|
|
17
|
+
:disabled="!clonedRole.name || !clonedRole.description || !clonedRole.access_rules?.length"
|
|
18
|
+
@click="saveRole"
|
|
19
|
+
/>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
</StructuralColumn>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script setup lang="ts">
|
|
26
|
+
import { useUpdateRole } from '@core/composables/role/useUpdateRole'
|
|
27
|
+
import { cloneDeep } from 'lodash-es'
|
|
28
|
+
|
|
29
|
+
import type { CreateRoleRequest, RoleResponse } from '@core/sdk/client'
|
|
30
|
+
|
|
31
|
+
const { role, roleIsLoading } = useRole()
|
|
32
|
+
const { t } = useI18n()
|
|
33
|
+
const toast = useToast()
|
|
34
|
+
|
|
35
|
+
const { updateRole } = useUpdateRole()
|
|
36
|
+
const { tenantId } = useTenant()
|
|
37
|
+
|
|
38
|
+
const clonedRole = ref<CreateRoleRequest>({
|
|
39
|
+
name: '',
|
|
40
|
+
description: '',
|
|
41
|
+
access_rules: [],
|
|
42
|
+
})
|
|
43
|
+
watch(role, (newRole: RoleResponse) => {
|
|
44
|
+
if (!newRole) {
|
|
45
|
+
return
|
|
46
|
+
}
|
|
47
|
+
clonedRole.value = cloneDeep(newRole)
|
|
48
|
+
})
|
|
49
|
+
|
|
50
|
+
const saveRole = async () => {
|
|
51
|
+
await updateRole({ roleId: role.value.id, updatedRole: clonedRole.value, tenantId: tenantId.value! })
|
|
52
|
+
toast.add({ severity: 'success', summary: t('role.role_saved.summary'), detail: t('role.role_saved.detail'), life: 3000 })
|
|
53
|
+
}
|
|
54
|
+
</script>
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<StructuralScreen>
|
|
3
|
+
<StructuralColumn
|
|
4
|
+
:title="t('role.title')"
|
|
5
|
+
:loading="rolesAreLoading"
|
|
6
|
+
>
|
|
7
|
+
<div class="grid grid-cols-2 gap-4 2xl:grid-cols-2">
|
|
8
|
+
<RoleCard
|
|
9
|
+
v-for="role in roles"
|
|
10
|
+
:key="role.id"
|
|
11
|
+
:role="role"
|
|
12
|
+
@click="() => toRole(role)"
|
|
13
|
+
@delete="confirmDeleteRole"
|
|
14
|
+
/>
|
|
15
|
+
<div
|
|
16
|
+
class="flex min-h-full cursor-pointer flex-col justify-center gap-3 rounded-xl border-2 border-dashed border-surface-300 p-4 hover:border-primary-500 hover:bg-surface-50 dark:border-surface-600 dark:hover:bg-surface-800"
|
|
17
|
+
@click="createModalOpen = true"
|
|
18
|
+
>
|
|
19
|
+
<div class="flex items-center justify-center">
|
|
20
|
+
<div class="flex items-center justify-center p-3">
|
|
21
|
+
<i
|
|
22
|
+
class="pi pi-plus text-surface-400"
|
|
23
|
+
style="font-size: 1.5rem"
|
|
24
|
+
/>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
<div class="text-center">
|
|
28
|
+
<h3 class="font-medium text-surface-600 dark:text-surface-400">
|
|
29
|
+
{{ t('role.create_new') }}
|
|
30
|
+
</h3>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
<Dialog
|
|
34
|
+
v-model:visible="createModalOpen"
|
|
35
|
+
modal
|
|
36
|
+
:header="t('role.create_new')"
|
|
37
|
+
>
|
|
38
|
+
<RoleCreate
|
|
39
|
+
@close="createModalOpen = false"
|
|
40
|
+
/>
|
|
41
|
+
</Dialog>
|
|
42
|
+
</div>
|
|
43
|
+
</StructuralColumn>
|
|
44
|
+
<NuxtPage />
|
|
45
|
+
</StructuralScreen>
|
|
46
|
+
</template>
|
|
47
|
+
|
|
48
|
+
<script setup lang="ts">
|
|
49
|
+
import { useI18n } from 'vue-i18n'
|
|
50
|
+
|
|
51
|
+
import type { RoleResponse } from '@core/sdk/client'
|
|
52
|
+
|
|
53
|
+
const router = useRouter()
|
|
54
|
+
const tenantPath = useTenantPath()
|
|
55
|
+
const { t } = useI18n()
|
|
56
|
+
const confirm = useConfirm()
|
|
57
|
+
const toast = useToast()
|
|
58
|
+
|
|
59
|
+
const { tenantId } = useTenant()
|
|
60
|
+
const { roles, rolesAreLoading } = useRoles()
|
|
61
|
+
const { deleteRole } = useDeleteRole()
|
|
62
|
+
|
|
63
|
+
const createModalOpen = ref(false)
|
|
64
|
+
|
|
65
|
+
const toRole = (role: RoleResponse) => {
|
|
66
|
+
router.push(tenantPath(`/service/roles/${role.id}`))
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const confirmDeleteRole = (role: RoleResponse) => {
|
|
70
|
+
confirm.require({
|
|
71
|
+
message: t('role.remove_dialog.explanation'),
|
|
72
|
+
header: t('role.remove_dialog.confirm'),
|
|
73
|
+
icon: 'pi pi-exclamation-triangle',
|
|
74
|
+
position: 'bottom',
|
|
75
|
+
rejectProps: { label: t('role.remove_dialog.cancel'), severity: 'secondary', outlined: true },
|
|
76
|
+
acceptProps: { label: t('role.remove_dialog.proceed'), severity: 'danger' },
|
|
77
|
+
accept: async () => {
|
|
78
|
+
await router.push(tenantPath('/service/roles'))
|
|
79
|
+
await deleteRole({ roleId: role.id, tenantId: tenantId.value! })
|
|
80
|
+
toast.add({ severity: 'success', summary: t('role.role_deleted.summary'), detail: t('role.role_deleted.detail'), life: 3000 })
|
|
81
|
+
},
|
|
82
|
+
})
|
|
83
|
+
}
|
|
84
|
+
</script>
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<StructuralColumn
|
|
3
|
+
:title="t('thread.chat.title')"
|
|
4
|
+
close-route="/service/threads"
|
|
5
|
+
:loading="threadIsLoading || threadEventsAreLoading"
|
|
6
|
+
>
|
|
7
|
+
<ChatThread
|
|
8
|
+
:events="threadEvents"
|
|
9
|
+
:thread="thread"
|
|
10
|
+
/>
|
|
11
|
+
<div class="pt-16">
|
|
12
|
+
<Textarea
|
|
13
|
+
v-model="userInput"
|
|
14
|
+
class="w-full"
|
|
15
|
+
auto-resize
|
|
16
|
+
rows="5"
|
|
17
|
+
cols="30"
|
|
18
|
+
/>
|
|
19
|
+
<Button
|
|
20
|
+
label="Send new Message"
|
|
21
|
+
class="w-full"
|
|
22
|
+
@click="submitMessage"
|
|
23
|
+
/>
|
|
24
|
+
</div>
|
|
25
|
+
</StructuralColumn>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<script setup lang="ts">
|
|
29
|
+
const route = useRoute()
|
|
30
|
+
|
|
31
|
+
const { thread, threadIsLoading } = useThread()
|
|
32
|
+
const { threadEvents, threadEventsAreLoading } = useThreadEvents()
|
|
33
|
+
const { tenantId } = useTenant()
|
|
34
|
+
const { t } = useI18n()
|
|
35
|
+
|
|
36
|
+
const { sendMessages } = useChatCompletions()
|
|
37
|
+
|
|
38
|
+
const userInput = ref('')
|
|
39
|
+
|
|
40
|
+
const submitMessage = async () => {
|
|
41
|
+
const agent = thread.value?.agents?.at(0)
|
|
42
|
+
const agentIdentifier = `${agent?.agent_class}/${agent?.agent_id}`
|
|
43
|
+
sendMessages({
|
|
44
|
+
model: agentIdentifier,
|
|
45
|
+
messages: [{ role: 'user', content: userInput.value }],
|
|
46
|
+
threadId: route.params.thread_id as string,
|
|
47
|
+
tenantId: tenantId.value!,
|
|
48
|
+
})
|
|
49
|
+
userInput.value = ''
|
|
50
|
+
}
|
|
51
|
+
</script>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<StructuralColumn
|
|
3
|
+
:title="t('thread.events.title')"
|
|
4
|
+
:close-route="`/service/threads/${route.params.thread_id}/display`"
|
|
5
|
+
:loading="threadIsLoading || threadEventsAreLoading"
|
|
6
|
+
>
|
|
7
|
+
<EventList
|
|
8
|
+
:thread="thread"
|
|
9
|
+
:events="threadEvents"
|
|
10
|
+
:display-id="route.params.display_id"
|
|
11
|
+
/>
|
|
12
|
+
</StructuralColumn>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script setup lang="ts">
|
|
16
|
+
const { thread, threadIsLoading } = useThread()
|
|
17
|
+
const { threadEvents, threadEventsAreLoading } = useThreadEvents()
|
|
18
|
+
|
|
19
|
+
const route = useRoute()
|
|
20
|
+
const { t } = useI18n()
|
|
21
|
+
</script>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<StructuralSubstructure>
|
|
3
|
+
<StructuralColumn
|
|
4
|
+
:title="t('thread.display.title')"
|
|
5
|
+
close-route="/service/threads"
|
|
6
|
+
:loading="threadIsLoading"
|
|
7
|
+
>
|
|
8
|
+
<DisplayList
|
|
9
|
+
:displays="thread.displays"
|
|
10
|
+
@selected="toDisplay"
|
|
11
|
+
/>
|
|
12
|
+
</StructuralColumn>
|
|
13
|
+
<NuxtPage />
|
|
14
|
+
</StructuralSubstructure>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script setup lang="ts">
|
|
18
|
+
import type { DisplayStatistics } from '@core/sdk/client'
|
|
19
|
+
|
|
20
|
+
const router = useRouter()
|
|
21
|
+
const tenantPath = useTenantPath()
|
|
22
|
+
const { t } = useI18n()
|
|
23
|
+
|
|
24
|
+
const { thread, threadIsLoading } = useThread()
|
|
25
|
+
|
|
26
|
+
const toDisplay = (display: DisplayStatistics) => {
|
|
27
|
+
router.push(tenantPath(`/service/threads/${thread.value.id}/display/${display.display_id}`))
|
|
28
|
+
}
|
|
29
|
+
</script>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<StructuralColumn
|
|
3
|
+
:title="t('thread.hierarchy.title')"
|
|
4
|
+
close-route="/service/threads"
|
|
5
|
+
:loading="threadIsLoading"
|
|
6
|
+
>
|
|
7
|
+
<ThreadHierarchy :thread="thread" />
|
|
8
|
+
</StructuralColumn>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script setup lang="ts">
|
|
12
|
+
const { thread, threadIsLoading } = useThread()
|
|
13
|
+
const { t } = useI18n()
|
|
14
|
+
</script>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<MemoryManagementPage
|
|
3
|
+
translation-prefix="thread"
|
|
4
|
+
:context-name="thread?.name ?? ''"
|
|
5
|
+
:context-loading="threadIsLoading"
|
|
6
|
+
:memory-context="{
|
|
7
|
+
type: 'user',
|
|
8
|
+
thread_id: route.params.thread_id as string,
|
|
9
|
+
}"
|
|
10
|
+
:base-path="`/service/threads/${route.params.thread_id}/memories`"
|
|
11
|
+
/>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script setup lang="ts">
|
|
15
|
+
const route = useRoute()
|
|
16
|
+
|
|
17
|
+
// Get thread info
|
|
18
|
+
const { thread, threadIsLoading } = useThread()
|
|
19
|
+
</script>
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<StructuralColumn
|
|
3
|
+
:title="thread?.name"
|
|
4
|
+
close-route="/service/threads"
|
|
5
|
+
:loading="threadIsLoading"
|
|
6
|
+
size="large"
|
|
7
|
+
>
|
|
8
|
+
<div class="flex flex-col gap-12">
|
|
9
|
+
<Panel
|
|
10
|
+
class="panel pt-5"
|
|
11
|
+
>
|
|
12
|
+
<div class="grid grid-cols-2 gap-4 xl:grid-cols-4">
|
|
13
|
+
<div class="flex flex-col items-start gap-2">
|
|
14
|
+
<span class="font-semibold">
|
|
15
|
+
{{ t('event.list.firstInteraction') }}
|
|
16
|
+
</span>
|
|
17
|
+
<Tag
|
|
18
|
+
:value="firstInteraction"
|
|
19
|
+
severity="secondary"
|
|
20
|
+
/>
|
|
21
|
+
</div>
|
|
22
|
+
<div class="flex flex-col items-start gap-2">
|
|
23
|
+
<span class="font-semibold">
|
|
24
|
+
{{ t('event.list.lastInteraction') }}
|
|
25
|
+
</span>
|
|
26
|
+
<Tag
|
|
27
|
+
:value="lastInteraction"
|
|
28
|
+
severity="secondary"
|
|
29
|
+
/>
|
|
30
|
+
</div>
|
|
31
|
+
<div class="flex flex-col items-start gap-2">
|
|
32
|
+
<span class="font-semibold">
|
|
33
|
+
{{ t('event.list.duration') }}
|
|
34
|
+
</span>
|
|
35
|
+
<Tag
|
|
36
|
+
:value="duration"
|
|
37
|
+
severity="secondary"
|
|
38
|
+
/>
|
|
39
|
+
</div>
|
|
40
|
+
<div class="flex flex-col items-start gap-2">
|
|
41
|
+
<span class="font-semibold">
|
|
42
|
+
{{ t('event.list.costs') }}
|
|
43
|
+
</span>
|
|
44
|
+
<Tag
|
|
45
|
+
:value="thread.llm_cost.toFixed(6) + 'CHF'"
|
|
46
|
+
severity="secondary"
|
|
47
|
+
/>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
</Panel>
|
|
51
|
+
<ThreadInfo
|
|
52
|
+
:thread="thread"
|
|
53
|
+
/>
|
|
54
|
+
<EventStatistics
|
|
55
|
+
v-model="timeRange"
|
|
56
|
+
:charts="charts"
|
|
57
|
+
/>
|
|
58
|
+
</div>
|
|
59
|
+
</StructuralColumn>
|
|
60
|
+
</template>
|
|
61
|
+
|
|
62
|
+
<script setup lang="ts">
|
|
63
|
+
import { formatDuration, intervalToDuration } from 'date-fns'
|
|
64
|
+
import { de } from 'date-fns/locale/de'
|
|
65
|
+
import { enUS } from 'date-fns/locale/en-US'
|
|
66
|
+
import { frCH } from 'date-fns/locale/fr-CH'
|
|
67
|
+
import { itCH } from 'date-fns/locale/it-CH'
|
|
68
|
+
|
|
69
|
+
const { thread, threadIsLoading } = useThread()
|
|
70
|
+
const { timeRange, charts } = useBasicEventStatistics()
|
|
71
|
+
const { locale, t } = useI18n()
|
|
72
|
+
|
|
73
|
+
const firstInteraction = computed<string>(() => {
|
|
74
|
+
return useDateFormat(new Date(thread.value?.first_interaction), 'DD.MM.YYYY HH:mm:ss')
|
|
75
|
+
})
|
|
76
|
+
|
|
77
|
+
const lastInteraction = computed<string>(() => {
|
|
78
|
+
return useDateFormat(new Date(thread.value?.latest_interaction), 'DD.MM.YYYY HH:mm:ss')
|
|
79
|
+
})
|
|
80
|
+
|
|
81
|
+
const duration = computed<string>(() => {
|
|
82
|
+
const duration = intervalToDuration({
|
|
83
|
+
start: new Date(thread.value?.first_interaction),
|
|
84
|
+
end: new Date(thread.value?.latest_interaction),
|
|
85
|
+
})
|
|
86
|
+
if (duration.minutes || duration.hours || duration.days) {
|
|
87
|
+
duration.seconds = 0
|
|
88
|
+
}
|
|
89
|
+
if (duration.days || duration.weeks) {
|
|
90
|
+
duration.minutes = 0
|
|
91
|
+
}
|
|
92
|
+
return formatDuration(duration, { locale: { de, en: enUS, fr: frCH, it: itCH }[locale.value as 'de' | 'en' | 'fr' | 'it'] })
|
|
93
|
+
})
|
|
94
|
+
</script>
|
|
95
|
+
|
|
96
|
+
<style scoped>
|
|
97
|
+
.panel :deep(.p-panel-header) {
|
|
98
|
+
padding: 0 !important;
|
|
99
|
+
}
|
|
100
|
+
</style>
|