@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,144 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<StructuralColumn
|
|
3
|
+
:title="t('knowledge.documents.title')"
|
|
4
|
+
close-route="/service/knowledge"
|
|
5
|
+
:loading="isLoading"
|
|
6
|
+
>
|
|
7
|
+
<div class="mb-4 flex items-center gap-4">
|
|
8
|
+
<IconField class="flex-1">
|
|
9
|
+
<InputIcon :class="isFetching ? 'pi pi-spinner pi-spin' : 'pi pi-search'" />
|
|
10
|
+
<InputText
|
|
11
|
+
v-model="searchInput"
|
|
12
|
+
:placeholder="t('knowledge.documents.search.placeholder')"
|
|
13
|
+
class="w-full"
|
|
14
|
+
/>
|
|
15
|
+
<InputIcon
|
|
16
|
+
v-if="searchInput && !isFetching"
|
|
17
|
+
class="pi pi-times cursor-pointer"
|
|
18
|
+
@click="searchInput = ''"
|
|
19
|
+
/>
|
|
20
|
+
</IconField>
|
|
21
|
+
<Button
|
|
22
|
+
v-if="!currentDatabase?.auto_sync"
|
|
23
|
+
icon="pi pi-upload"
|
|
24
|
+
:label="t('knowledge.documents.upload.title')"
|
|
25
|
+
@click="openUploadModal"
|
|
26
|
+
/>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<KnowledgeDocumentList
|
|
30
|
+
:documents="documents"
|
|
31
|
+
:sort-field="sortState.field"
|
|
32
|
+
:sort-order="sortState.order"
|
|
33
|
+
@selected="toDocument"
|
|
34
|
+
@sort="handleSort"
|
|
35
|
+
/>
|
|
36
|
+
|
|
37
|
+
<div class="mt-4">
|
|
38
|
+
<Paginator
|
|
39
|
+
:rows="pageSize"
|
|
40
|
+
:total-records="pagination.total"
|
|
41
|
+
:rows-per-page-options="[10, 20, 30, 50]"
|
|
42
|
+
:first="(currentPage - 1) * pageSize"
|
|
43
|
+
@page="onPageChange"
|
|
44
|
+
/>
|
|
45
|
+
</div>
|
|
46
|
+
</StructuralColumn>
|
|
47
|
+
<NuxtPage />
|
|
48
|
+
|
|
49
|
+
<KnowledgeDocumentUploadModal
|
|
50
|
+
v-model:visible="uploadModalVisible"
|
|
51
|
+
:database="route.params.db as string"
|
|
52
|
+
:namespace="route.params.namespace as string"
|
|
53
|
+
:database-display-name="databaseDisplayName"
|
|
54
|
+
:namespace-display-name="namespaceDisplayName"
|
|
55
|
+
@success="handleUpload"
|
|
56
|
+
/>
|
|
57
|
+
</template>
|
|
58
|
+
|
|
59
|
+
<script setup lang="ts">
|
|
60
|
+
import { useDebounceFn } from '@vueuse/core'
|
|
61
|
+
import { useChangeCase } from '@vueuse/integrations/useChangeCase'
|
|
62
|
+
|
|
63
|
+
import type { DocumentDto } from '@core/sdk/client'
|
|
64
|
+
|
|
65
|
+
const route = useRoute()
|
|
66
|
+
const router = useRouter()
|
|
67
|
+
const tenantPath = useTenantPath()
|
|
68
|
+
const { t } = useI18n()
|
|
69
|
+
|
|
70
|
+
const { databases } = useDatabases()
|
|
71
|
+
|
|
72
|
+
const {
|
|
73
|
+
documents,
|
|
74
|
+
isLoading,
|
|
75
|
+
isFetching,
|
|
76
|
+
pagination,
|
|
77
|
+
currentPage,
|
|
78
|
+
pageSize,
|
|
79
|
+
searchQuery,
|
|
80
|
+
sortState,
|
|
81
|
+
setPage,
|
|
82
|
+
setPageSize,
|
|
83
|
+
setSearch,
|
|
84
|
+
setSort,
|
|
85
|
+
refetch,
|
|
86
|
+
} = useDocuments()
|
|
87
|
+
|
|
88
|
+
const uploadModalVisible = ref(false)
|
|
89
|
+
const searchInput = ref(searchQuery.value ?? '')
|
|
90
|
+
|
|
91
|
+
const debouncedSearch = useDebounceFn((value: string) => {
|
|
92
|
+
setSearch(value)
|
|
93
|
+
}, 300)
|
|
94
|
+
|
|
95
|
+
// Sync local input to composable (debounced)
|
|
96
|
+
watch(searchInput, (newValue) => {
|
|
97
|
+
debouncedSearch(newValue)
|
|
98
|
+
})
|
|
99
|
+
|
|
100
|
+
// Sync composable state back to local input (e.g., on navigation)
|
|
101
|
+
watch(searchQuery, (newValue) => {
|
|
102
|
+
if (searchInput.value !== (newValue ?? '')) {
|
|
103
|
+
searchInput.value = newValue ?? ''
|
|
104
|
+
}
|
|
105
|
+
})
|
|
106
|
+
|
|
107
|
+
const currentDatabase = computed(() => {
|
|
108
|
+
return databases.value?.find(db => db.name === route.params.db)
|
|
109
|
+
})
|
|
110
|
+
|
|
111
|
+
const currentNamespace = computed(() => {
|
|
112
|
+
return currentDatabase.value?.namespaces?.find(ns => ns.name === route.params.namespace)
|
|
113
|
+
})
|
|
114
|
+
|
|
115
|
+
const databaseDisplayName = computed(() => {
|
|
116
|
+
return currentDatabase.value?.display_name || useChangeCase(route.params.db as string, 'capitalCase').value
|
|
117
|
+
})
|
|
118
|
+
|
|
119
|
+
const namespaceDisplayName = computed(() => {
|
|
120
|
+
return currentNamespace.value?.display_name || useChangeCase(route.params.namespace as string, 'capitalCase').value
|
|
121
|
+
})
|
|
122
|
+
|
|
123
|
+
const toDocument = (document: DocumentDto) => {
|
|
124
|
+
router.push(tenantPath(`/service/knowledge/${route.params.db}/${route.params.namespace}/${document.id}/overview`))
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
const onPageChange = (event) => {
|
|
128
|
+
setPageSize(event.rows)
|
|
129
|
+
const newPage = Math.floor(event.first / event.rows) + 1
|
|
130
|
+
setPage(newPage)
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
const handleSort = (field: string | null, order: 1 | -1) => {
|
|
134
|
+
setSort(field, order)
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
const openUploadModal = () => {
|
|
138
|
+
uploadModalVisible.value = true
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
const handleUpload = () => {
|
|
142
|
+
refetch()
|
|
143
|
+
}
|
|
144
|
+
</script>
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<StructuralScreen>
|
|
3
|
+
<StructuralColumn
|
|
4
|
+
:title="t('knowledge.title')"
|
|
5
|
+
:loading="databasesAreLoading"
|
|
6
|
+
>
|
|
7
|
+
<div class="flex flex-col gap-12">
|
|
8
|
+
<div
|
|
9
|
+
v-for="database in databases"
|
|
10
|
+
:key="database.name"
|
|
11
|
+
>
|
|
12
|
+
<div class="flex items-center gap-2 pb-2 pl-2">
|
|
13
|
+
<span class="text-sm font-medium">{{ database.display_name || useChangeCase(database.name, 'capitalCase') }}</span>
|
|
14
|
+
<i
|
|
15
|
+
v-if="database.auto_sync"
|
|
16
|
+
class="pi pi-lock text-surface-400 dark:text-surface-500"
|
|
17
|
+
:title="t('knowledge.auto_sync.description')"
|
|
18
|
+
/>
|
|
19
|
+
<i
|
|
20
|
+
v-else
|
|
21
|
+
class="pi pi-lock-open text-surface-400 dark:text-surface-500"
|
|
22
|
+
:title="t('knowledge.manual_management.description')"
|
|
23
|
+
/>
|
|
24
|
+
</div>
|
|
25
|
+
<div class="grid grid-cols-2 gap-4 2xl:grid-cols-2">
|
|
26
|
+
<KnowledgeNamespaceCard
|
|
27
|
+
v-for="namespace in database.namespaces"
|
|
28
|
+
:key="namespace.name"
|
|
29
|
+
:namespace="namespace"
|
|
30
|
+
:auto-sync="database.auto_sync"
|
|
31
|
+
@click="toNamespace(database.name, namespace)"
|
|
32
|
+
@upload="openUploadModal(database, namespace)"
|
|
33
|
+
@edit="openEditNamespaceModal(namespace)"
|
|
34
|
+
/>
|
|
35
|
+
<KnowledgeNamespaceEmptyCard
|
|
36
|
+
v-if="!database.auto_sync"
|
|
37
|
+
@add="openNewNamespaceModal(database.name)"
|
|
38
|
+
/>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
</StructuralColumn>
|
|
43
|
+
<NuxtPage />
|
|
44
|
+
|
|
45
|
+
<KnowledgeDocumentUploadModal
|
|
46
|
+
v-model:visible="uploadModalVisible"
|
|
47
|
+
:database="selectedDatabaseForUpload"
|
|
48
|
+
:namespace="selectedNamespaceForUpload"
|
|
49
|
+
:database-display-name="selectedDatabaseDisplayNameForUpload"
|
|
50
|
+
:namespace-display-name="selectedNamespaceDisplayNameForUpload"
|
|
51
|
+
@success="handleUploadSuccess"
|
|
52
|
+
/>
|
|
53
|
+
|
|
54
|
+
<KnowledgeNamespaceCreateModal
|
|
55
|
+
v-model="newNamespaceModalVisible"
|
|
56
|
+
:databases="databases || []"
|
|
57
|
+
:initial-database="selectedDatabaseForNewNamespace"
|
|
58
|
+
@success="handleCreationSuccess"
|
|
59
|
+
/>
|
|
60
|
+
|
|
61
|
+
<KnowledgeNamespaceEditModal
|
|
62
|
+
v-model="editNamespaceModalVisible"
|
|
63
|
+
:namespace="editingNamespace"
|
|
64
|
+
@success="handleUpdateSuccess"
|
|
65
|
+
/>
|
|
66
|
+
</StructuralScreen>
|
|
67
|
+
</template>
|
|
68
|
+
|
|
69
|
+
<script setup lang="ts">
|
|
70
|
+
import { useChangeCase } from '@vueuse/integrations/useChangeCase'
|
|
71
|
+
|
|
72
|
+
import type { DatabaseDto, NamespaceDto } from '@core/sdk/client'
|
|
73
|
+
|
|
74
|
+
const router = useRouter()
|
|
75
|
+
const tenantPath = useTenantPath()
|
|
76
|
+
const { t } = useI18n()
|
|
77
|
+
|
|
78
|
+
const { databases, databasesAreLoading } = useDatabases()
|
|
79
|
+
|
|
80
|
+
const uploadModalVisible = ref(false)
|
|
81
|
+
const selectedDatabaseForUpload = ref('')
|
|
82
|
+
const selectedNamespaceForUpload = ref('')
|
|
83
|
+
const selectedDatabaseDisplayNameForUpload = ref('')
|
|
84
|
+
const selectedNamespaceDisplayNameForUpload = ref('')
|
|
85
|
+
|
|
86
|
+
const newNamespaceModalVisible = ref(false)
|
|
87
|
+
const selectedDatabaseForNewNamespace = ref('')
|
|
88
|
+
|
|
89
|
+
const editNamespaceModalVisible = ref(false)
|
|
90
|
+
const editingNamespace = ref<NamespaceDto | null>(null)
|
|
91
|
+
|
|
92
|
+
const toNamespace = (database_name: string, namespace: NamespaceDto) => {
|
|
93
|
+
router.push(tenantPath(`/service/knowledge/${database_name}/${namespace.name}`))
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
const openUploadModal = (database: DatabaseDto, namespace: NamespaceDto) => {
|
|
97
|
+
selectedDatabaseForUpload.value = database.name
|
|
98
|
+
selectedNamespaceForUpload.value = namespace.name
|
|
99
|
+
selectedDatabaseDisplayNameForUpload.value = database.display_name || useChangeCase(database.name, 'capitalCase')
|
|
100
|
+
selectedNamespaceDisplayNameForUpload.value = namespace.display_name || useChangeCase(namespace.name, 'capitalCase')
|
|
101
|
+
uploadModalVisible.value = true
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const handleUploadSuccess = (data: { files: File[], namespace: string, database: string }) => {
|
|
105
|
+
uploadModalVisible.value = false
|
|
106
|
+
router.push(tenantPath(`/service/knowledge/${data.database}/${data.namespace}`))
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
const openNewNamespaceModal = (databaseName: string) => {
|
|
110
|
+
selectedDatabaseForNewNamespace.value = databaseName
|
|
111
|
+
newNamespaceModalVisible.value = true
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
const handleCreationSuccess = (data: { database: string, namespace: string }) => {
|
|
115
|
+
router.push(tenantPath(`/service/knowledge/${data.database}/${data.namespace}`))
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
const openEditNamespaceModal = (namespace: NamespaceDto) => {
|
|
119
|
+
editingNamespace.value = namespace
|
|
120
|
+
editNamespaceModalVisible.value = true
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
const handleUpdateSuccess = () => {
|
|
124
|
+
editingNamespace.value = null
|
|
125
|
+
}
|
|
126
|
+
</script>
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<StructuralColumn
|
|
3
|
+
:title="t('models.modelDetails.overview')"
|
|
4
|
+
close-route="/service/models"
|
|
5
|
+
:loading="modelIsLoading"
|
|
6
|
+
>
|
|
7
|
+
<div class="flex flex-col gap-8">
|
|
8
|
+
<Panel class="panel pt-5">
|
|
9
|
+
<div class="grid grid-cols-3 gap-6">
|
|
10
|
+
<div class="flex flex-col items-start gap-2">
|
|
11
|
+
<span class="font-semibold">
|
|
12
|
+
{{ t('models.modelDetails.name') }}
|
|
13
|
+
</span>
|
|
14
|
+
<span class="text-lg font-light">
|
|
15
|
+
{{ model?.model_name || t('models.modelDetails.notSpecified') }}
|
|
16
|
+
</span>
|
|
17
|
+
</div>
|
|
18
|
+
<div class="flex flex-col items-start gap-2">
|
|
19
|
+
<span class="font-semibold">
|
|
20
|
+
{{ t('models.modelDetails.mode') }}
|
|
21
|
+
</span>
|
|
22
|
+
<span class="text-lg font-light capitalize">
|
|
23
|
+
{{ model?.model_info?.mode || t('models.modelDetails.notSpecified') }}
|
|
24
|
+
</span>
|
|
25
|
+
</div>
|
|
26
|
+
<div class="flex flex-col items-start gap-2">
|
|
27
|
+
<span class="font-semibold">
|
|
28
|
+
{{ t('models.modelDetails.maxInputTokens') }}
|
|
29
|
+
</span>
|
|
30
|
+
<span class="text-lg font-light">
|
|
31
|
+
{{
|
|
32
|
+
model?.model_info?.max_input_tokens ? formatNumber(model?.model_info?.max_input_tokens) : t('models.modelDetails.notSpecified')
|
|
33
|
+
}}
|
|
34
|
+
</span>
|
|
35
|
+
</div>
|
|
36
|
+
<div class="flex flex-col items-start gap-2">
|
|
37
|
+
<span class="font-semibold">
|
|
38
|
+
{{ t('models.modelDetails.maxOutputTokens') }}
|
|
39
|
+
</span>
|
|
40
|
+
<span class="text-lg font-light">
|
|
41
|
+
{{
|
|
42
|
+
model?.model_info?.max_output_tokens ? formatNumber(model?.model_info?.max_output_tokens) : t('models.modelDetails.notSpecified')
|
|
43
|
+
}}
|
|
44
|
+
</span>
|
|
45
|
+
</div>
|
|
46
|
+
<div class="flex flex-col items-start gap-2">
|
|
47
|
+
<span class="font-semibold">
|
|
48
|
+
{{ t('models.modelDetails.basicInputCost') }}
|
|
49
|
+
</span>
|
|
50
|
+
<span class="text-lg font-light">
|
|
51
|
+
{{
|
|
52
|
+
isDefined(model?.model_info?.input_cost_per_token) ? `$${model.model_info.input_cost_per_token.toFixed(2)}` : t('models.modelDetails.notSpecified')
|
|
53
|
+
}}
|
|
54
|
+
</span>
|
|
55
|
+
</div>
|
|
56
|
+
<div class="flex flex-col items-start gap-2">
|
|
57
|
+
<span class="font-semibold">
|
|
58
|
+
{{ t('models.modelDetails.basicOutputCost') }}
|
|
59
|
+
</span>
|
|
60
|
+
<span class="text-lg font-light">
|
|
61
|
+
{{
|
|
62
|
+
isDefined(model?.model_info?.output_cost_per_token) ? `$${model.model_info.output_cost_per_token.toFixed(2)}` : t('models.modelDetails.notSpecified')
|
|
63
|
+
}}
|
|
64
|
+
</span>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
</Panel>
|
|
68
|
+
|
|
69
|
+
<ModelDetailsPanel :model="model" />
|
|
70
|
+
</div>
|
|
71
|
+
</StructuralColumn>
|
|
72
|
+
</template>
|
|
73
|
+
|
|
74
|
+
<script setup lang="ts">
|
|
75
|
+
import ModelDetailsPanel from '@core/components/Models/ModelDetailsPanel.vue'
|
|
76
|
+
|
|
77
|
+
const { t } = useI18n()
|
|
78
|
+
|
|
79
|
+
const { model, modelIsLoading } = useSingleModel()
|
|
80
|
+
|
|
81
|
+
const formatNumber = (num: number): string => {
|
|
82
|
+
return new Intl.NumberFormat().format(num)
|
|
83
|
+
}
|
|
84
|
+
</script>
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<StructuralScreen>
|
|
3
|
+
<StructuralColumn
|
|
4
|
+
:title="t('models.title')"
|
|
5
|
+
:loading="modelsAreLoading"
|
|
6
|
+
>
|
|
7
|
+
<div
|
|
8
|
+
v-if="error"
|
|
9
|
+
class="mb-4"
|
|
10
|
+
>
|
|
11
|
+
<Message
|
|
12
|
+
severity="error"
|
|
13
|
+
:closable="false"
|
|
14
|
+
>
|
|
15
|
+
{{ t('models.error') }}: {{ error }}
|
|
16
|
+
</Message>
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
<div class="flex flex-col gap-12">
|
|
20
|
+
<div
|
|
21
|
+
v-for="modelType in modelTypes"
|
|
22
|
+
:key="modelType.name"
|
|
23
|
+
>
|
|
24
|
+
<div
|
|
25
|
+
class="pb-2 pl-2 text-sm font-medium"
|
|
26
|
+
>
|
|
27
|
+
{{ useChangeCase(modelType.name, 'capitalCase') }}
|
|
28
|
+
</div>
|
|
29
|
+
<div
|
|
30
|
+
class="grid grid-cols-2 gap-4 2xl:grid-cols-2"
|
|
31
|
+
>
|
|
32
|
+
<ModelsNamespaceCard
|
|
33
|
+
v-for="model in modelType.models"
|
|
34
|
+
:key="model.model_name"
|
|
35
|
+
:model="model"
|
|
36
|
+
@click="() => showModelDetails(model)"
|
|
37
|
+
/>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
</StructuralColumn>
|
|
42
|
+
|
|
43
|
+
<NuxtPage />
|
|
44
|
+
</StructuralScreen>
|
|
45
|
+
</template>
|
|
46
|
+
|
|
47
|
+
<script setup lang="ts">
|
|
48
|
+
import { useChangeCase } from '@vueuse/integrations/useChangeCase'
|
|
49
|
+
|
|
50
|
+
import type { ModelDTO } from '@core/sdk/client'
|
|
51
|
+
|
|
52
|
+
const router = useRouter()
|
|
53
|
+
const tenantPath = useTenantPath()
|
|
54
|
+
const { t } = useI18n()
|
|
55
|
+
|
|
56
|
+
const { modelTypes, modelsAreLoading, error } = useModelsList()
|
|
57
|
+
|
|
58
|
+
function showModelDetails(model: ModelDTO) {
|
|
59
|
+
router.push(tenantPath(`/service/models/${encodeURIComponent(model.model_name)}`))
|
|
60
|
+
}
|
|
61
|
+
</script>
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<StructuralScreen>
|
|
3
|
+
<StructuralColumn
|
|
4
|
+
:title="t('my_account.title')"
|
|
5
|
+
:loading="myUserIsLoading"
|
|
6
|
+
>
|
|
7
|
+
<div
|
|
8
|
+
v-if="myUser"
|
|
9
|
+
class="flex flex-col gap-12"
|
|
10
|
+
>
|
|
11
|
+
<Panel class="panel pt-5">
|
|
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('user.list.name') }}
|
|
16
|
+
</span>
|
|
17
|
+
<Tag
|
|
18
|
+
:value="myUser.name"
|
|
19
|
+
severity="secondary"
|
|
20
|
+
/>
|
|
21
|
+
</div>
|
|
22
|
+
<div class="flex flex-col items-start gap-2">
|
|
23
|
+
<span class="font-semibold">
|
|
24
|
+
{{ t('user.list.email') }}
|
|
25
|
+
</span>
|
|
26
|
+
<Tag
|
|
27
|
+
:value="myUser.email"
|
|
28
|
+
severity="secondary"
|
|
29
|
+
/>
|
|
30
|
+
</div>
|
|
31
|
+
<div class="flex flex-col items-start gap-2">
|
|
32
|
+
<span class="font-semibold">
|
|
33
|
+
{{ t('user.list.last_accessed') }}
|
|
34
|
+
</span>
|
|
35
|
+
<Tag
|
|
36
|
+
v-if="myUser.last_accessed"
|
|
37
|
+
:value="getTimeAgo(myUser.last_accessed).text"
|
|
38
|
+
:severity="getTimeAgo(myUser.last_accessed).severity"
|
|
39
|
+
/>
|
|
40
|
+
</div>
|
|
41
|
+
<div class="flex flex-col items-start gap-2">
|
|
42
|
+
<span class="font-semibold">
|
|
43
|
+
{{ t('user.list.roles') }}
|
|
44
|
+
</span>
|
|
45
|
+
<div class="flex flex-wrap gap-2">
|
|
46
|
+
<Badge
|
|
47
|
+
v-for="role in myUser.roles"
|
|
48
|
+
:key="role"
|
|
49
|
+
:value="role"
|
|
50
|
+
/>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
</Panel>
|
|
55
|
+
|
|
56
|
+
<div class="flex flex-col gap-8">
|
|
57
|
+
<div class="flex flex-col gap-3">
|
|
58
|
+
<h3 class="text-2xl">
|
|
59
|
+
{{ t('my_account.services') }}
|
|
60
|
+
</h3>
|
|
61
|
+
<div class="flex flex-wrap gap-2">
|
|
62
|
+
<Tag
|
|
63
|
+
v-for="service in myUser.access.services"
|
|
64
|
+
:key="service.name"
|
|
65
|
+
v-tooltip.top="service.level === 2 ? 'Admin' : 'User'"
|
|
66
|
+
:value="service.name"
|
|
67
|
+
:icon="service.level === 2 ? 'pi pi-crown' : undefined"
|
|
68
|
+
/>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
|
|
72
|
+
<div class="flex flex-col gap-3">
|
|
73
|
+
<h3 class="text-2xl">
|
|
74
|
+
{{ t('my_account.agents') }}
|
|
75
|
+
</h3>
|
|
76
|
+
<div class="flex flex-wrap gap-2">
|
|
77
|
+
<Tag
|
|
78
|
+
v-for="agent in myUser.access.agents"
|
|
79
|
+
:key="agent.name"
|
|
80
|
+
v-tooltip.top="agent.level === 2 ? 'Admin' : 'User'"
|
|
81
|
+
:value="agent.name"
|
|
82
|
+
:icon="agent.level === 2 ? 'pi pi-crown' : undefined"
|
|
83
|
+
/>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
|
|
87
|
+
<div class="flex flex-col gap-3">
|
|
88
|
+
<h3 class="text-2xl">
|
|
89
|
+
{{ t('my_account.processes') }}
|
|
90
|
+
</h3>
|
|
91
|
+
<div class="flex flex-wrap gap-2">
|
|
92
|
+
<Tag
|
|
93
|
+
v-for="process in myUser.access.processes"
|
|
94
|
+
:key="process.name"
|
|
95
|
+
v-tooltip.top="process.level === 2 ? 'Admin' : 'User'"
|
|
96
|
+
:value="process.name"
|
|
97
|
+
:icon="process.level === 2 ? 'pi pi-crown' : undefined"
|
|
98
|
+
/>
|
|
99
|
+
</div>
|
|
100
|
+
</div>
|
|
101
|
+
</div>
|
|
102
|
+
</div>
|
|
103
|
+
</StructuralColumn>
|
|
104
|
+
</StructuralScreen>
|
|
105
|
+
</template>
|
|
106
|
+
|
|
107
|
+
<script setup lang="ts">
|
|
108
|
+
const { myUser, myUserIsLoading } = useMyUser()
|
|
109
|
+
const { t } = useI18n()
|
|
110
|
+
const { getTimeAgo } = useTimeAgo()
|
|
111
|
+
</script>
|
|
112
|
+
|
|
113
|
+
<style scoped>
|
|
114
|
+
.panel :deep(.p-panel-header) {
|
|
115
|
+
padding: 0 !important;
|
|
116
|
+
}
|
|
117
|
+
</style>
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<ProgressBar
|
|
3
|
+
v-if="threadIsLoading || !thread"
|
|
4
|
+
mode="indeterminate"
|
|
5
|
+
style="height: 2px"
|
|
6
|
+
/>
|
|
7
|
+
<div
|
|
8
|
+
v-else
|
|
9
|
+
ref="memoriesPanelRef"
|
|
10
|
+
class="relative h-[calc(100vh-50px)] w-1/2 min-w-[800px] overflow-y-auto border-l border-surface-200 p-6 dark:border-surface-700"
|
|
11
|
+
>
|
|
12
|
+
<div class="mb-4">
|
|
13
|
+
<h2 class="text-2xl font-semibold">
|
|
14
|
+
{{ t('openwebui.memories.title') }}
|
|
15
|
+
</h2>
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
<!-- Top-level tabs: One per agent -->
|
|
19
|
+
<TabView v-if="agents.length > 0">
|
|
20
|
+
<TabPanel
|
|
21
|
+
v-for="agent in agents"
|
|
22
|
+
:key="`${agent.agent_class}-${agent.agent_id}`"
|
|
23
|
+
:header="agent.agent_config.name"
|
|
24
|
+
>
|
|
25
|
+
<MemoryOpenWebUIContent
|
|
26
|
+
:agent-class="agent.agent_class"
|
|
27
|
+
:agent-id="agent.agent_id"
|
|
28
|
+
/>
|
|
29
|
+
</TabPanel>
|
|
30
|
+
</TabView>
|
|
31
|
+
|
|
32
|
+
<!-- Close button -->
|
|
33
|
+
<div
|
|
34
|
+
class="fixed top-1/2 -translate-y-1/2"
|
|
35
|
+
:style="{ left: `${panelLeftPosition - 16}px` }"
|
|
36
|
+
>
|
|
37
|
+
<i
|
|
38
|
+
class="pi pi-chevron-right cursor-pointer rounded-full border border-surface-200 bg-surface-0 p-3 hover:bg-surface-100 dark:border-surface-700 dark:bg-surface-900 hover:dark:bg-surface-800"
|
|
39
|
+
@click="closeMemories"
|
|
40
|
+
/>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
</template>
|
|
44
|
+
|
|
45
|
+
<script setup lang="ts">
|
|
46
|
+
import type { MinimalAgentDto } from '@core/sdk/client'
|
|
47
|
+
|
|
48
|
+
const router = useRouter()
|
|
49
|
+
const tenantPath = useTenantPath()
|
|
50
|
+
const { t } = useI18n()
|
|
51
|
+
|
|
52
|
+
const memoriesPanelRef = ref(null)
|
|
53
|
+
const panelBounding = useElementBounding(memoriesPanelRef)
|
|
54
|
+
const panelLeftPosition = computed(() => panelBounding.left.value)
|
|
55
|
+
|
|
56
|
+
// Fetch thread to get agents
|
|
57
|
+
const { thread, threadIsLoading } = useThread()
|
|
58
|
+
|
|
59
|
+
// Get agents from thread
|
|
60
|
+
const agents = computed<MinimalAgentDto[]>(() => thread.value?.agents || [])
|
|
61
|
+
|
|
62
|
+
// Close and return to OpenWebUI
|
|
63
|
+
const closeMemories = () => {
|
|
64
|
+
router.push(tenantPath('/service/openai'))
|
|
65
|
+
}
|
|
66
|
+
</script>
|