@swiss-ai-hub/web 0.321.0 → 0.323.0
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/components/Event/Display/AddMemoryToChatHistoryEvent.vue +3 -3
- package/components/Event/Display/AttachedFileEvent.vue +42 -0
- package/components/Event/Display/AttachedFilesReadEvent.vue +22 -0
- package/components/Event/Display/BaseRetrieveMemoryEvent.vue +2 -2
- package/components/Event/Display/BaseStoreMemoryEvent.vue +2 -2
- package/components/Event/Display/CompleteConversationEvent.vue +35 -0
- package/components/Event/Display/ComposeContextEvent.vue +38 -0
- package/components/Event/Display/ContextComposedEvent.vue +60 -0
- package/components/Event/Display/ContextualizeConversationEvent.vue +26 -0
- package/components/Event/Display/ConversationContextualizedEvent.vue +34 -0
- package/components/Event/Display/HumanInTheLoopResponseEvent.vue +11 -1
- package/components/Event/Display/KnowledgeSearchedEvent.vue +33 -0
- package/components/Event/Display/MemoryRecalledEvent.vue +33 -0
- package/components/Event/Display/MemoryStorageRequestedEvent.vue +29 -0
- package/components/Event/Display/NotAMetaQuestionEvent.vue +20 -0
- package/components/Event/Display/Part/Facts.vue +39 -0
- package/components/Event/Display/Part/MessageList.vue +50 -0
- package/components/Event/Display/Part/ToolCalls.vue +58 -0
- package/components/Event/Display/Part/ToolLoopState.vue +36 -0
- package/components/Event/Display/ReadAttachedFilesEvent.vue +28 -0
- package/components/Event/Display/RecallMemoryEvent.vue +27 -0
- package/components/Event/Display/RunToolLoopEvent.vue +34 -0
- package/components/Event/Display/SandboxFileDisplayedEvent.vue +46 -0
- package/components/Event/Display/SearchKnowledgeEvent.vue +31 -0
- package/components/Event/Display/ToolCallApprovedEvent.vue +27 -0
- package/components/Event/Display/ToolCallsDecidedEvent.vue +24 -0
- package/components/Event/Display/ToolLoopCondensedEvent.vue +31 -0
- package/components/Event/Display/ToolLoopFinishedEvent.vue +49 -0
- package/components/Event/Display/ToolLoopIterationEvent.vue +18 -0
- package/components/Event/Display/ToolLoopStatusEvent.vue +27 -0
- package/components/Event/Display/ToolResultEvent.vue +38 -0
- package/components/Event/List/EventList.vue +1 -1
- package/components/FormKit/DynamicConfiguration.vue +6 -1
- package/components/FormKit/KnowledgeCollectionSelector.vue +281 -0
- package/components/FormKit/KnowledgeDatabaseSelector.vue +7 -0
- package/components/FormKit/LocaleInput.vue +2 -0
- package/components/FormKit/SecretFileInput.vue +181 -0
- package/components/FormKit/VectorStoreInput.vue +20 -1
- package/components/Knowledge/Database/CreateModal.vue +91 -2
- package/components/Knowledge/Database/SourceModal.vue +165 -0
- package/components/Knowledge/Document/UploadModal.vue +4 -0
- package/components/Knowledge/Namespace/Card.vue +4 -4
- package/components/Knowledge/Namespace/CreateModal.vue +1 -1
- package/components/Knowledge/Namespace/EditModal.vue +3 -4
- package/components/Role/AccessRulesEditor.vue +1 -1
- package/components/Service/Selection.vue +7 -1
- package/components/Support/IncidentButton.vue +37 -0
- package/components/Support/IncidentDialog.vue +119 -0
- package/components/User/Settings.vue +9 -8
- package/components/UserFiles/Browser.vue +361 -0
- package/components/UserFiles/MoveDialog.vue +77 -0
- package/components/UserFiles/NameDialog.vue +59 -0
- package/components/UserFiles/Preview.vue +110 -0
- package/composables/auth/useAuth.ts +19 -3
- package/composables/document/useDocumentIngestionPolling.ts +64 -0
- package/composables/document/useDocuments.ts +3 -0
- package/composables/document/useSourcePipelines.ts +23 -0
- package/composables/document/useUpdateDatabaseSource.ts +21 -0
- package/composables/event/useEventComponent.ts +46 -0
- package/composables/form/useFormKitTransform.ts +68 -17
- package/composables/openwebui/useOpenWebuiDisclaimer.ts +22 -0
- package/composables/suite/useApps.ts +12 -3
- package/composables/suite/useSuite.ts +2 -0
- package/composables/support/useIncidentAvailability.ts +17 -0
- package/composables/support/useIncidentContext.ts +56 -0
- package/composables/support/useIncidentForm.ts +45 -0
- package/composables/support/useIncidentReport.ts +16 -0
- package/composables/support/useOpenWebUIContext.ts +38 -0
- package/composables/tenant/useChatDisclaimer.ts +24 -0
- package/composables/user/useApplyLocale.ts +23 -0
- package/composables/user/useMyLocale.ts +20 -0
- package/composables/user/useRestorePreferredLocale.ts +38 -0
- package/composables/userFiles/useCreateUserFolder.ts +15 -0
- package/composables/userFiles/useDeleteUserFile.ts +15 -0
- package/composables/userFiles/useMoveUserFile.ts +15 -0
- package/composables/userFiles/useUploadUserFiles.ts +19 -0
- package/composables/userFiles/useUserFileContent.ts +24 -0
- package/composables/userFiles/useUserFiles.ts +25 -0
- package/formkit.config.ts +10 -2
- package/i18n/locales/de.yaml +171 -3
- package/i18n/locales/en.yaml +172 -3
- package/i18n/locales/fr.yaml +173 -3
- package/i18n/locales/it.yaml +173 -3
- package/layouts/default.vue +7 -1
- package/middleware/auth.global.ts +6 -3
- package/middleware/home-redirect.ts +15 -4
- package/package.json +4 -3
- package/pages/[tenant]/service/knowledge/[db]/[namespace].vue +6 -8
- package/pages/[tenant]/service/knowledge.vue +33 -7
- package/pages/[tenant]/service/openai/[thread_id]/[display_id]/files.vue +51 -0
- package/pages/[tenant]/service/openai.vue +61 -17
- package/pages/[tenant]/service/user-knowledge.vue +19 -0
- package/plugins/api-client.client.ts +5 -0
- package/plugins/oidc-client.ts +14 -7
- package/sdk/client/index.ts +171 -1
- package/sdk/client/schemas.gen.ts +18602 -8560
- package/sdk/client/sdk.gen.ts +482 -0
- package/sdk/client/types.gen.ts +13616 -7044
- package/types/EventFact.ts +4 -0
- package/utils/apiResponseGuard.ts +97 -0
|
@@ -32,13 +32,13 @@
|
|
|
32
32
|
|
|
33
33
|
<script setup lang="ts">
|
|
34
34
|
import type {
|
|
35
|
-
|
|
35
|
+
AddMemoryToChatHistoryEvent,
|
|
36
36
|
ThreadDto,
|
|
37
|
-
|
|
37
|
+
ContextualizedAgentEvent,
|
|
38
38
|
} from '@core/sdk/client'
|
|
39
39
|
|
|
40
40
|
const props = defineProps<{
|
|
41
|
-
event:
|
|
41
|
+
event: ContextualizedAgentEvent & { event: AddMemoryToChatHistoryEvent }
|
|
42
42
|
thread: ThreadDto
|
|
43
43
|
}>()
|
|
44
44
|
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<EventDisplayBase
|
|
3
|
+
:event="event"
|
|
4
|
+
:thread="thread"
|
|
5
|
+
icon="mage:file-2"
|
|
6
|
+
>
|
|
7
|
+
<div class="flex flex-col gap-4">
|
|
8
|
+
<div class="flex items-center gap-2">
|
|
9
|
+
<span class="font-semibold">{{ event.event.filename }}</span>
|
|
10
|
+
<Tag
|
|
11
|
+
:value="t(`event.capability.fileStatus.${event.event.status}`)"
|
|
12
|
+
:severity="severity"
|
|
13
|
+
/>
|
|
14
|
+
</div>
|
|
15
|
+
<EventDisplayPartFacts :facts="facts" />
|
|
16
|
+
<pre
|
|
17
|
+
v-if="event.event.content"
|
|
18
|
+
class="max-h-96 overflow-auto whitespace-pre-wrap break-words rounded-xl bg-surface-50 p-3 text-xs dark:bg-surface-850"
|
|
19
|
+
>{{ event.event.content }}</pre>
|
|
20
|
+
</div>
|
|
21
|
+
</EventDisplayBase>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<script setup lang="ts">
|
|
25
|
+
import type { AttachedFileEvent, ContextualizedAgentEvent, ThreadDto } from '@core/sdk/client'
|
|
26
|
+
import type { EventFact } from '@core/types/EventFact'
|
|
27
|
+
|
|
28
|
+
const props = defineProps<{
|
|
29
|
+
event: ContextualizedAgentEvent & { event: AttachedFileEvent }
|
|
30
|
+
thread: ThreadDto
|
|
31
|
+
}>()
|
|
32
|
+
|
|
33
|
+
const { t } = useI18n()
|
|
34
|
+
|
|
35
|
+
const severity = computed(() => ({ read: 'success', truncated: 'warn', failed: 'danger' })[props.event.event.status])
|
|
36
|
+
|
|
37
|
+
const facts = computed<EventFact[]>(() => [
|
|
38
|
+
{ label: t('event.capability.citationId'), value: props.event.event.citation_id },
|
|
39
|
+
{ label: t('event.capability.pages'), value: props.event.event.number_of_pages },
|
|
40
|
+
{ label: t('event.capability.error'), value: props.event.event.error },
|
|
41
|
+
])
|
|
42
|
+
</script>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<EventDisplayBase
|
|
3
|
+
:event="event"
|
|
4
|
+
:thread="thread"
|
|
5
|
+
icon="mage:file-2"
|
|
6
|
+
>
|
|
7
|
+
<EventDisplayPartMessageList
|
|
8
|
+
:messages="event.event.block ?? []"
|
|
9
|
+
:event="event"
|
|
10
|
+
:thread="thread"
|
|
11
|
+
/>
|
|
12
|
+
</EventDisplayBase>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script setup lang="ts">
|
|
16
|
+
import type { AttachedFilesReadEvent, ContextualizedAgentEvent, ThreadDto } from '@core/sdk/client'
|
|
17
|
+
|
|
18
|
+
defineProps<{
|
|
19
|
+
event: ContextualizedAgentEvent & { event: AttachedFilesReadEvent }
|
|
20
|
+
thread: ThreadDto
|
|
21
|
+
}>()
|
|
22
|
+
</script>
|
|
@@ -80,10 +80,10 @@
|
|
|
80
80
|
</template>
|
|
81
81
|
|
|
82
82
|
<script setup lang="ts">
|
|
83
|
-
import type {
|
|
83
|
+
import type { BaseRetrieveMemoryEvent, ThreadDto, ContextualizedAgentEvent } from '@core/sdk/client'
|
|
84
84
|
|
|
85
85
|
defineProps<{
|
|
86
|
-
event:
|
|
86
|
+
event: ContextualizedAgentEvent & { event: BaseRetrieveMemoryEvent }
|
|
87
87
|
thread: ThreadDto
|
|
88
88
|
}>()
|
|
89
89
|
|
|
@@ -149,10 +149,10 @@
|
|
|
149
149
|
<script setup lang="ts">
|
|
150
150
|
import { computed } from 'vue'
|
|
151
151
|
|
|
152
|
-
import type {
|
|
152
|
+
import type { BaseStoreMemoryEvent, ThreadDto, ContextualizedAgentEvent } from '@core/sdk/client'
|
|
153
153
|
|
|
154
154
|
const props = defineProps<{
|
|
155
|
-
event:
|
|
155
|
+
event: ContextualizedAgentEvent & { event: BaseStoreMemoryEvent }
|
|
156
156
|
thread: ThreadDto
|
|
157
157
|
}>()
|
|
158
158
|
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<EventDisplayBase
|
|
3
|
+
:event="event"
|
|
4
|
+
:thread="thread"
|
|
5
|
+
icon="mage:stop-circle-fill"
|
|
6
|
+
>
|
|
7
|
+
<div class="flex flex-col gap-4">
|
|
8
|
+
<EventDisplayPartFacts :facts="facts" />
|
|
9
|
+
<p
|
|
10
|
+
v-if="answer"
|
|
11
|
+
class="whitespace-pre-wrap rounded-xl bg-surface-50 p-3 text-sm dark:bg-surface-850"
|
|
12
|
+
>
|
|
13
|
+
{{ answer }}
|
|
14
|
+
</p>
|
|
15
|
+
</div>
|
|
16
|
+
</EventDisplayBase>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script setup lang="ts">
|
|
20
|
+
import type { CompleteConversationEvent, ContextualizedAgentEvent, ThreadDto } from '@core/sdk/client'
|
|
21
|
+
import type { EventFact } from '@core/types/EventFact'
|
|
22
|
+
|
|
23
|
+
const props = defineProps<{
|
|
24
|
+
event: ContextualizedAgentEvent & { event: CompleteConversationEvent }
|
|
25
|
+
thread: ThreadDto
|
|
26
|
+
}>()
|
|
27
|
+
|
|
28
|
+
const { t } = useI18n()
|
|
29
|
+
|
|
30
|
+
const answer = computed(() => props.event.event.answer.output_messages?.at(-1)?.content)
|
|
31
|
+
|
|
32
|
+
const facts = computed<EventFact[]>(() => [
|
|
33
|
+
{ label: t('event.capability.stop'), value: props.event.event.stop?._event_name ?? 'LLMStopEvent' },
|
|
34
|
+
])
|
|
35
|
+
</script>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<EventDisplayBase
|
|
3
|
+
:event="event"
|
|
4
|
+
:thread="thread"
|
|
5
|
+
icon="mdi:database-plus"
|
|
6
|
+
>
|
|
7
|
+
<div class="flex flex-col gap-6">
|
|
8
|
+
<EventDisplayPartFacts :facts="facts" />
|
|
9
|
+
<EventDisplayPartMessageList
|
|
10
|
+
v-for="(block, index) in blocks"
|
|
11
|
+
:key="index"
|
|
12
|
+
:messages="block"
|
|
13
|
+
:event="event"
|
|
14
|
+
:thread="thread"
|
|
15
|
+
:title="t('event.capability.block', { number: index + 1 })"
|
|
16
|
+
/>
|
|
17
|
+
</div>
|
|
18
|
+
</EventDisplayBase>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script setup lang="ts">
|
|
22
|
+
import type { ComposeContextEvent, ContextualizedAgentEvent, ThreadDto } from '@core/sdk/client'
|
|
23
|
+
import type { EventFact } from '@core/types/EventFact'
|
|
24
|
+
|
|
25
|
+
const props = defineProps<{
|
|
26
|
+
event: ContextualizedAgentEvent & { event: ComposeContextEvent }
|
|
27
|
+
thread: ThreadDto
|
|
28
|
+
}>()
|
|
29
|
+
|
|
30
|
+
const { t } = useI18n()
|
|
31
|
+
|
|
32
|
+
const blocks = computed(() => (props.event.event.blocks ?? []).filter(block => block.length > 0))
|
|
33
|
+
|
|
34
|
+
const facts = computed<EventFact[]>(() => [
|
|
35
|
+
{ label: t('event.capability.historyMessages'), value: props.event.event.history.length },
|
|
36
|
+
{ label: t('event.capability.blocks'), value: blocks.value.length },
|
|
37
|
+
])
|
|
38
|
+
</script>
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<EventDisplayBase
|
|
3
|
+
:event="event"
|
|
4
|
+
:thread="thread"
|
|
5
|
+
icon="lucide:layers"
|
|
6
|
+
>
|
|
7
|
+
<div class="flex flex-col gap-8">
|
|
8
|
+
<div class="flex items-center gap-2 text-sm text-surface-600 dark:text-surface-400">
|
|
9
|
+
<Icon
|
|
10
|
+
name="lucide:layers"
|
|
11
|
+
class="size-4"
|
|
12
|
+
/>
|
|
13
|
+
<span>{{ t('event.contextComposed.summary', { count: event.event.history.length }) }}</span>
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
<div
|
|
17
|
+
v-for="(message, index) in event.event.history"
|
|
18
|
+
:key="index"
|
|
19
|
+
class="flex flex-col gap-2"
|
|
20
|
+
>
|
|
21
|
+
<ChatMessage
|
|
22
|
+
:message="message"
|
|
23
|
+
:name="getMessageName(message.role)"
|
|
24
|
+
:email="''"
|
|
25
|
+
:date="new Date(event.event.created_at / 1_000_000)"
|
|
26
|
+
:icon="agentIcon"
|
|
27
|
+
/>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
</EventDisplayBase>
|
|
31
|
+
</template>
|
|
32
|
+
|
|
33
|
+
<script setup lang="ts">
|
|
34
|
+
import type {
|
|
35
|
+
ContextComposedEvent,
|
|
36
|
+
ThreadDto,
|
|
37
|
+
ContextualizedAgentEvent,
|
|
38
|
+
} from '@core/sdk/client'
|
|
39
|
+
|
|
40
|
+
const props = defineProps<{
|
|
41
|
+
event: ContextualizedAgentEvent & { event: ContextComposedEvent }
|
|
42
|
+
thread: ThreadDto
|
|
43
|
+
}>()
|
|
44
|
+
|
|
45
|
+
const { t } = useI18n()
|
|
46
|
+
const agentIcon = useAgentIconFromThread(props.event, props.thread)
|
|
47
|
+
|
|
48
|
+
const getMessageName = (role: string) => {
|
|
49
|
+
switch (role) {
|
|
50
|
+
case 'user':
|
|
51
|
+
return t('event.contextComposed.user')
|
|
52
|
+
case 'system':
|
|
53
|
+
return t('event.contextComposed.system')
|
|
54
|
+
case 'assistant':
|
|
55
|
+
return t('event.contextComposed.assistant')
|
|
56
|
+
default:
|
|
57
|
+
return t('event.contextComposed.assistant')
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
</script>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<EventDisplayBase
|
|
3
|
+
:event="event"
|
|
4
|
+
:thread="thread"
|
|
5
|
+
icon="mage:edit"
|
|
6
|
+
>
|
|
7
|
+
<EventDisplayPartFacts :facts="facts" />
|
|
8
|
+
</EventDisplayBase>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script setup lang="ts">
|
|
12
|
+
import type { ContextualizeConversationEvent, ContextualizedAgentEvent, ThreadDto } from '@core/sdk/client'
|
|
13
|
+
import type { EventFact } from '@core/types/EventFact'
|
|
14
|
+
|
|
15
|
+
const props = defineProps<{
|
|
16
|
+
event: ContextualizedAgentEvent & { event: ContextualizeConversationEvent }
|
|
17
|
+
thread: ThreadDto
|
|
18
|
+
}>()
|
|
19
|
+
|
|
20
|
+
const { t } = useI18n()
|
|
21
|
+
|
|
22
|
+
const facts = computed<EventFact[]>(() => [
|
|
23
|
+
{ label: t('event.capability.userQuery'), value: props.event.event.user_query },
|
|
24
|
+
{ label: t('event.capability.historyMessages'), value: props.event.event.history.length },
|
|
25
|
+
])
|
|
26
|
+
</script>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<EventDisplayBase
|
|
3
|
+
:event="event"
|
|
4
|
+
:thread="thread"
|
|
5
|
+
icon="mage:edit"
|
|
6
|
+
>
|
|
7
|
+
<div class="flex flex-col gap-4">
|
|
8
|
+
<EventDisplayPartFacts :facts="facts" />
|
|
9
|
+
<Tag
|
|
10
|
+
v-if="event.event.condensed"
|
|
11
|
+
:value="t('event.capability.condensed')"
|
|
12
|
+
severity="info"
|
|
13
|
+
class="self-start"
|
|
14
|
+
/>
|
|
15
|
+
</div>
|
|
16
|
+
</EventDisplayBase>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script setup lang="ts">
|
|
20
|
+
import type { ContextualizedAgentEvent, ConversationContextualizedEvent, ThreadDto } from '@core/sdk/client'
|
|
21
|
+
import type { EventFact } from '@core/types/EventFact'
|
|
22
|
+
|
|
23
|
+
const props = defineProps<{
|
|
24
|
+
event: ContextualizedAgentEvent & { event: ConversationContextualizedEvent }
|
|
25
|
+
thread: ThreadDto
|
|
26
|
+
}>()
|
|
27
|
+
|
|
28
|
+
const { t } = useI18n()
|
|
29
|
+
|
|
30
|
+
const facts = computed<EventFact[]>(() => [
|
|
31
|
+
{ label: t('event.capability.query'), value: props.event.event.query },
|
|
32
|
+
{ label: t('event.capability.historyMessages'), value: props.event.event.history.length },
|
|
33
|
+
])
|
|
34
|
+
</script>
|
|
@@ -26,13 +26,23 @@ const props = defineProps<{
|
|
|
26
26
|
thread: ThreadDto
|
|
27
27
|
}>()
|
|
28
28
|
|
|
29
|
+
const { t } = useI18n()
|
|
30
|
+
|
|
31
|
+
const responseText = computed<string>(() => {
|
|
32
|
+
const response = props.event.event.response
|
|
33
|
+
if (typeof response === 'boolean') {
|
|
34
|
+
return t(`event.humanInTheLoopResponse.${response ? 'confirmed' : 'declined'}`)
|
|
35
|
+
}
|
|
36
|
+
return response
|
|
37
|
+
})
|
|
38
|
+
|
|
29
39
|
const message = computed<ChatMessage>(() => {
|
|
30
40
|
return {
|
|
31
41
|
role: 'user',
|
|
32
42
|
blocks: [
|
|
33
43
|
{
|
|
34
44
|
block_type: 'text',
|
|
35
|
-
text:
|
|
45
|
+
text: responseText.value,
|
|
36
46
|
},
|
|
37
47
|
],
|
|
38
48
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<EventDisplayBase
|
|
3
|
+
:event="event"
|
|
4
|
+
:thread="thread"
|
|
5
|
+
icon="mage:file"
|
|
6
|
+
>
|
|
7
|
+
<div class="flex flex-col gap-4">
|
|
8
|
+
<EventDisplayPartFacts :facts="facts" />
|
|
9
|
+
<ChatSourceNodes :nodes="event.event.grounding_nodes ?? []" />
|
|
10
|
+
</div>
|
|
11
|
+
</EventDisplayBase>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script setup lang="ts">
|
|
15
|
+
import type { ContextualizedAgentEvent, KnowledgeSearchedEvent, ThreadDto } from '@core/sdk/client'
|
|
16
|
+
import type { EventFact } from '@core/types/EventFact'
|
|
17
|
+
|
|
18
|
+
const props = defineProps<{
|
|
19
|
+
event: ContextualizedAgentEvent & { event: KnowledgeSearchedEvent }
|
|
20
|
+
thread: ThreadDto
|
|
21
|
+
}>()
|
|
22
|
+
|
|
23
|
+
const { t } = useI18n()
|
|
24
|
+
|
|
25
|
+
const facts = computed<EventFact[]>(() => [
|
|
26
|
+
{ label: t('event.capability.sections'), value: (props.event.event.grounding_nodes ?? []).length },
|
|
27
|
+
{
|
|
28
|
+
label: t('event.capability.notSearched'),
|
|
29
|
+
value: (props.event.event.refused ?? []).map(reference => `${reference.database} / ${reference.namespace}`),
|
|
30
|
+
},
|
|
31
|
+
{ label: t('event.capability.toolCall'), value: props.event.event.tool_call_id },
|
|
32
|
+
])
|
|
33
|
+
</script>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<EventDisplayBase
|
|
3
|
+
:event="event"
|
|
4
|
+
:thread="thread"
|
|
5
|
+
icon="mdi:brain"
|
|
6
|
+
>
|
|
7
|
+
<div class="flex flex-col gap-6">
|
|
8
|
+
<EventDisplayPartMessageList
|
|
9
|
+
:messages="event.event.user_block ?? []"
|
|
10
|
+
:event="event"
|
|
11
|
+
:thread="thread"
|
|
12
|
+
:title="t('event.capability.userMemories')"
|
|
13
|
+
/>
|
|
14
|
+
<EventDisplayPartMessageList
|
|
15
|
+
:messages="event.event.organization_block ?? []"
|
|
16
|
+
:event="event"
|
|
17
|
+
:thread="thread"
|
|
18
|
+
:title="t('event.capability.organizationMemories')"
|
|
19
|
+
/>
|
|
20
|
+
</div>
|
|
21
|
+
</EventDisplayBase>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<script setup lang="ts">
|
|
25
|
+
import type { ContextualizedAgentEvent, MemoryRecalledEvent, ThreadDto } from '@core/sdk/client'
|
|
26
|
+
|
|
27
|
+
defineProps<{
|
|
28
|
+
event: ContextualizedAgentEvent & { event: MemoryRecalledEvent }
|
|
29
|
+
thread: ThreadDto
|
|
30
|
+
}>()
|
|
31
|
+
|
|
32
|
+
const { t } = useI18n()
|
|
33
|
+
</script>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<EventDisplayBase
|
|
3
|
+
:event="event"
|
|
4
|
+
:thread="thread"
|
|
5
|
+
icon="mdi:content-save-cog"
|
|
6
|
+
>
|
|
7
|
+
<EventDisplayPartFacts :facts="facts" />
|
|
8
|
+
</EventDisplayBase>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script setup lang="ts">
|
|
12
|
+
import type { ContextualizedAgentEvent, MemoryStorageRequestedEvent, ThreadDto } from '@core/sdk/client'
|
|
13
|
+
import type { EventFact } from '@core/types/EventFact'
|
|
14
|
+
|
|
15
|
+
const props = defineProps<{
|
|
16
|
+
event: ContextualizedAgentEvent & { event: MemoryStorageRequestedEvent }
|
|
17
|
+
thread: ThreadDto
|
|
18
|
+
}>()
|
|
19
|
+
|
|
20
|
+
const { t } = useI18n()
|
|
21
|
+
|
|
22
|
+
const facts = computed<EventFact[]>(() => [
|
|
23
|
+
{
|
|
24
|
+
label: t('event.capability.targetAgent'),
|
|
25
|
+
value: `${props.event.event.target_agent_class} / ${props.event.event.target_agent_id}`,
|
|
26
|
+
},
|
|
27
|
+
{ label: t('event.capability.historyMessages'), value: props.event.event.start_event.messages.length },
|
|
28
|
+
])
|
|
29
|
+
</script>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<EventDisplayBase
|
|
3
|
+
:event="event"
|
|
4
|
+
:thread="thread"
|
|
5
|
+
icon="mdi:help-circle-outline"
|
|
6
|
+
>
|
|
7
|
+
<span class="text-sm text-surface-600 dark:text-surface-400">
|
|
8
|
+
{{ event.event.reasoning }}
|
|
9
|
+
</span>
|
|
10
|
+
</EventDisplayBase>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script setup lang="ts">
|
|
14
|
+
import type { ContextualizedAgentEvent, NotAMetaQuestionEvent, ThreadDto } from '@core/sdk/client'
|
|
15
|
+
|
|
16
|
+
defineProps<{
|
|
17
|
+
event: ContextualizedAgentEvent & { event: NotAMetaQuestionEvent }
|
|
18
|
+
thread: ThreadDto
|
|
19
|
+
}>()
|
|
20
|
+
</script>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<dl class="grid grid-cols-[max-content_1fr] gap-x-6 gap-y-2 text-sm">
|
|
3
|
+
<template
|
|
4
|
+
v-for="fact in shownFacts"
|
|
5
|
+
:key="fact.label"
|
|
6
|
+
>
|
|
7
|
+
<dt class="text-surface-500 dark:text-surface-400">
|
|
8
|
+
{{ fact.label }}
|
|
9
|
+
</dt>
|
|
10
|
+
<dd class="break-words text-surface-800 dark:text-surface-200">
|
|
11
|
+
<div
|
|
12
|
+
v-if="Array.isArray(fact.value)"
|
|
13
|
+
class="flex flex-wrap gap-1"
|
|
14
|
+
>
|
|
15
|
+
<Tag
|
|
16
|
+
v-for="item in fact.value"
|
|
17
|
+
:key="item"
|
|
18
|
+
:value="item"
|
|
19
|
+
severity="secondary"
|
|
20
|
+
/>
|
|
21
|
+
<span v-if="fact.value.length === 0">–</span>
|
|
22
|
+
</div>
|
|
23
|
+
<span v-else>{{ fact.value }}</span>
|
|
24
|
+
</dd>
|
|
25
|
+
</template>
|
|
26
|
+
</dl>
|
|
27
|
+
</template>
|
|
28
|
+
|
|
29
|
+
<script setup lang="ts">
|
|
30
|
+
import type { EventFact } from '@core/types/EventFact'
|
|
31
|
+
|
|
32
|
+
const props = defineProps<{
|
|
33
|
+
facts: EventFact[]
|
|
34
|
+
}>()
|
|
35
|
+
|
|
36
|
+
const shownFacts = computed<EventFact[]>(() =>
|
|
37
|
+
props.facts.filter(fact => fact.value !== null && fact.value !== undefined && fact.value !== ''),
|
|
38
|
+
)
|
|
39
|
+
</script>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex flex-col gap-4">
|
|
3
|
+
<p
|
|
4
|
+
v-if="title"
|
|
5
|
+
class="text-sm font-semibold text-surface-600 dark:text-surface-400"
|
|
6
|
+
>
|
|
7
|
+
{{ title }}
|
|
8
|
+
</p>
|
|
9
|
+
<p
|
|
10
|
+
v-if="messages.length === 0"
|
|
11
|
+
class="text-sm text-surface-500 dark:text-surface-400"
|
|
12
|
+
>
|
|
13
|
+
{{ t('event.parts.noMessages') }}
|
|
14
|
+
</p>
|
|
15
|
+
<ChatMessage
|
|
16
|
+
v-for="(message, index) in messages"
|
|
17
|
+
:key="index"
|
|
18
|
+
:message="message"
|
|
19
|
+
:name="roleName(message.role)"
|
|
20
|
+
:email="''"
|
|
21
|
+
:date="new Date(event.event.created_at / 1_000_000)"
|
|
22
|
+
:icon="agentIcon"
|
|
23
|
+
/>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<script setup lang="ts">
|
|
28
|
+
import type { ContextualizedAgentEvent, ChatMessage, ThreadDto } from '@core/sdk/client'
|
|
29
|
+
|
|
30
|
+
const props = defineProps<{
|
|
31
|
+
messages: ChatMessage[]
|
|
32
|
+
event: ContextualizedAgentEvent
|
|
33
|
+
thread: ThreadDto
|
|
34
|
+
title?: string
|
|
35
|
+
}>()
|
|
36
|
+
|
|
37
|
+
const { t } = useI18n()
|
|
38
|
+
const agentIcon = useAgentIconFromThread(props.event, props.thread)
|
|
39
|
+
|
|
40
|
+
const roleName = (role: string | undefined) => {
|
|
41
|
+
switch (role) {
|
|
42
|
+
case 'user':
|
|
43
|
+
return t('event.contextComposed.user')
|
|
44
|
+
case 'system':
|
|
45
|
+
return t('event.contextComposed.system')
|
|
46
|
+
default:
|
|
47
|
+
return t('event.contextComposed.assistant')
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
</script>
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex flex-col gap-3">
|
|
3
|
+
<p class="text-sm font-semibold text-surface-600 dark:text-surface-400">
|
|
4
|
+
{{ t('event.toolLoop.decidedCalls', { count: calls.length }) }}
|
|
5
|
+
</p>
|
|
6
|
+
<div
|
|
7
|
+
v-for="call in calls"
|
|
8
|
+
:key="call.id"
|
|
9
|
+
class="flex flex-col gap-1 rounded-xl bg-surface-50 p-3 dark:bg-surface-850"
|
|
10
|
+
>
|
|
11
|
+
<div class="flex items-center gap-2">
|
|
12
|
+
<Icon
|
|
13
|
+
name="mynaui:tool"
|
|
14
|
+
class="size-4"
|
|
15
|
+
/>
|
|
16
|
+
<span class="font-semibold">{{ call.name }}</span>
|
|
17
|
+
<span class="text-xs text-surface-500 dark:text-surface-400">{{ call.id }}</span>
|
|
18
|
+
</div>
|
|
19
|
+
<pre class="max-h-48 overflow-auto whitespace-pre-wrap break-words text-xs">{{ call.arguments }}</pre>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<script setup lang="ts">
|
|
25
|
+
import type { Message } from '@core/sdk/client'
|
|
26
|
+
|
|
27
|
+
const props = defineProps<{
|
|
28
|
+
messages: Message[]
|
|
29
|
+
toolCallIds: string[]
|
|
30
|
+
}>()
|
|
31
|
+
|
|
32
|
+
const { t } = useI18n()
|
|
33
|
+
|
|
34
|
+
type DecidedCall = { id: string, name: string, arguments: string }
|
|
35
|
+
|
|
36
|
+
const prettyArguments = (raw: unknown): string => {
|
|
37
|
+
if (typeof raw !== 'string') {
|
|
38
|
+
return JSON.stringify(raw ?? {}, null, 2)
|
|
39
|
+
}
|
|
40
|
+
try {
|
|
41
|
+
return JSON.stringify(JSON.parse(raw), null, 2)
|
|
42
|
+
}
|
|
43
|
+
catch {
|
|
44
|
+
return raw
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const calls = computed<DecidedCall[]>(() => {
|
|
49
|
+
const wanted = new Set(props.toolCallIds)
|
|
50
|
+
return props.messages
|
|
51
|
+
.flatMap(message => message.tool_calls ?? [])
|
|
52
|
+
.map((call) => {
|
|
53
|
+
const fn = (call.function ?? {}) as { name?: string, arguments?: unknown }
|
|
54
|
+
return { id: String(call.id ?? ''), name: fn.name ?? '', arguments: prettyArguments(fn.arguments) }
|
|
55
|
+
})
|
|
56
|
+
.filter(call => wanted.has(call.id))
|
|
57
|
+
})
|
|
58
|
+
</script>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<EventDisplayPartFacts :facts="facts" />
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script setup lang="ts">
|
|
6
|
+
import type { ToolLoopState } from '@core/sdk/client'
|
|
7
|
+
import type { EventFact } from '@core/types/EventFact'
|
|
8
|
+
|
|
9
|
+
const props = defineProps<{
|
|
10
|
+
state: ToolLoopState
|
|
11
|
+
}>()
|
|
12
|
+
|
|
13
|
+
const { t } = useI18n()
|
|
14
|
+
|
|
15
|
+
const facts = computed<EventFact[]>(() => [
|
|
16
|
+
{ label: t('event.toolLoop.loop'), value: props.state.loop },
|
|
17
|
+
{ label: t('event.toolLoop.mode'), value: t(`event.toolLoop.modes.${props.state.mode}`) },
|
|
18
|
+
{
|
|
19
|
+
label: t('event.toolLoop.iteration'),
|
|
20
|
+
value: props.state.max_iterations
|
|
21
|
+
? `${props.state.iteration ?? 0} / ${props.state.max_iterations}`
|
|
22
|
+
: props.state.iteration ?? 0,
|
|
23
|
+
},
|
|
24
|
+
{ label: t('event.toolLoop.toolCallsMade'), value: props.state.tool_calls_made ?? 0 },
|
|
25
|
+
{ label: t('event.toolLoop.messages'), value: props.state.messages.length },
|
|
26
|
+
{ label: t('event.toolLoop.offeredTools'), value: (props.state.tools ?? []).map(tool => tool.name) },
|
|
27
|
+
{
|
|
28
|
+
label: t('event.toolLoop.condensedResults'),
|
|
29
|
+
value: props.state.condensed_tool_call_ids?.length || null,
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
label: t('event.toolLoop.needsCondensing'),
|
|
33
|
+
value: props.state.needs_condensing ? t('event.parts.yes') : null,
|
|
34
|
+
},
|
|
35
|
+
])
|
|
36
|
+
</script>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<EventDisplayBase
|
|
3
|
+
:event="event"
|
|
4
|
+
:thread="thread"
|
|
5
|
+
icon="mage:file-2"
|
|
6
|
+
>
|
|
7
|
+
<EventDisplayPartFacts :facts="facts" />
|
|
8
|
+
</EventDisplayBase>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script setup lang="ts">
|
|
12
|
+
import type { ContextualizedAgentEvent, ReadAttachedFilesEvent, ThreadDto } from '@core/sdk/client'
|
|
13
|
+
import type { EventFact } from '@core/types/EventFact'
|
|
14
|
+
|
|
15
|
+
const props = defineProps<{
|
|
16
|
+
event: ContextualizedAgentEvent & { event: ReadAttachedFilesEvent }
|
|
17
|
+
thread: ThreadDto
|
|
18
|
+
}>()
|
|
19
|
+
|
|
20
|
+
const { t } = useI18n()
|
|
21
|
+
|
|
22
|
+
const facts = computed<EventFact[]>(() => [
|
|
23
|
+
{ label: t('event.capability.files'), value: (props.event.event.files ?? []).map(file => file.filename) },
|
|
24
|
+
{ label: t('event.capability.query'), value: props.event.event.query },
|
|
25
|
+
{ label: t('event.capability.reserveTokens'), value: props.event.event.reserve_tokens || null },
|
|
26
|
+
{ label: t('event.capability.toolCall'), value: props.event.event.tool_call_id },
|
|
27
|
+
])
|
|
28
|
+
</script>
|