Skip to content

Commit 9870352

Browse files
authored
Version 3.6.0-beta.12
- Fix workflow parallel execution defer. - Migrate out plugins - Fix Xinference does not support encoding_format - Fix user request reset password api - Streaming text blocks in chat view - Image file support in kb
2 parents 28c9e80 + d17630d commit 9870352

File tree

169 files changed

+1963
-1539
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

169 files changed

+1963
-1539
lines changed

.deploy/api/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"start": "nx serve",
2929
"build": "nx build",
3030
"test": "nx test",
31-
"build:plugins": "yarn nx build integration-github && yarn nx build ocr-paddle && yarn nx build retriever-common && yarn nx build textsplitter-common && yarn nx build tool-calculator && yarn nx build transformer-common && yarn nx build transformer-unstructured && yarn nx build trigger-schedule && yarn nx build vlm-default && yarn nx build vstore-chroma && yarn nx build vstore-milvus && yarn nx build vstore-weaviate",
31+
"build:plugins": "yarn nx build integration-github && yarn nx build ocr-paddle && yarn nx build retriever-common && yarn nx build textsplitter-common && yarn nx build tool-calculator && yarn nx build transformer-common && yarn nx build trigger-schedule && yarn nx build vlm-default && yarn nx build vstore-chroma && yarn nx build vstore-milvus && yarn nx build vstore-weaviate",
3232
"build:all": "yarn rimraf dist && yarn nx build contracts && yarn nx build common && yarn nx build config && yarn nx build auth && yarn nx build server && yarn nx build adapter && yarn nx build plugin-sdk && yarn nx build integration-github && yarn nx build analytics && yarn nx build api"
3333
},
3434
"dependencies": {

apps/api/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@metad/xpert-api",
3-
"version": "3.6.0-beta.10",
3+
"version": "3.6.0-beta.12",
44
"description": "Xpert API",
55
"license": "AGPL-3.0",
66
"homepage": "https://mtda.cloud",

apps/cloud/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@metad/xpert-ui",
3-
"version": "3.6.0-beta.10",
3+
"version": "3.6.0-beta.12",
44
"type": "commonjs",
55
"license": "AGPL-3.0",
66
"scripts": {

apps/cloud/src/app/@core/services/knowledgebase.service.ts

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { MaxMarginalRelevanceSearchOptions, VectorStoreInterface } from '@langch
55
import {
66
_TFile,
77
API_PREFIX,
8+
classificateDocumentCategory,
89
DocumentMetadata,
910
IDocumentChunkerProvider,
1011
IDocumentProcessorProvider,
@@ -14,14 +15,13 @@ import {
1415
IKnowledgebaseTask,
1516
IKnowledgeDocument,
1617
IKnowledgeRetrievalLog,
17-
isDocumentSheet,
1818
IXpert,
19-
KBDocumentCategoryEnum,
2019
PaginationParams,
2120
toHttpParams
2221
} from '@metad/cloud/state'
2322
import { NGXLogger } from 'ngx-logger'
2423
import { BehaviorSubject, interval, of } from 'rxjs'
24+
import { v4 as uuidv4 } from 'uuid'
2525
import { catchError, filter, shareReplay, switchMap, takeWhile, tap } from 'rxjs/operators'
2626
import { getErrorMessage, uuid } from '../types'
2727
import { XpertWorkspaceBaseCrudService } from './xpert-workspace.service'
@@ -233,16 +233,27 @@ export class KnowledgeFileUploader {
233233
case HttpEventType.Response: {
234234
this.progress.set(100)
235235
const type = this.file.type?.split('/').pop().toLowerCase() || 'unknown'
236+
const metadata: DocumentMetadata = {
237+
chunkId: uuidv4(),
238+
title: this.file.name,
239+
}
240+
if (event.body.mimeType?.startsWith('image/')) {
241+
metadata.assets = [
242+
{
243+
type: 'image',
244+
url: event.body.fileUrl,
245+
filePath: event.body.filePath
246+
}
247+
]
248+
}
236249
this.document$.next({
237250
...event.body,
238251
id: uuid(),
239252
name: this.file.name,
240253
size: `${this.file.size}`,
241254
type,
242-
category: isDocumentSheet(type) ? KBDocumentCategoryEnum.Sheet : KBDocumentCategoryEnum.Text,
243-
metadata: {
244-
title: this.file.name,
245-
}
255+
category: classificateDocumentCategory({type}),
256+
metadata
246257
})
247258
this.document.set(this.document$.value)
248259
this.uploadedUrl.set(event.body.fileUrl) // Assuming response contains URL

apps/cloud/src/app/@shared/agent/variable-panel/variable.component.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
<ul class="grow px-2 pb-2 overflow-auto">
1212
@for (g of filteredVariables(); track g) {
1313
@if (g.group) {
14-
<div class="p-1 mt-2 text-sm font-semibold text-text-secondary uppercase">{{g.group.description | i18n}}</div>
14+
<div class="p-1 mt-2 text-sm font-semibold text-text-secondary uppercase"
15+
[ngmHighlight]="searchTerm()" [content]="g.group.description | i18n">{{g.group.description | i18n}}</div>
1516
} @else {
1617
<div class="p-1 mt-2 text-sm font-semibold text-text-secondary">{{'PAC.Copilot.SystemVariables' | translate: {Default: 'System Variables'} }}</div>
1718
}

apps/cloud/src/app/@shared/agent/variable-panel/variable.component.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,11 @@ export class XpertVariablePanelComponent {
8181
return (type
8282
? variable.type?.startsWith(type)
8383
: true) &&
84-
(variable.name.toLowerCase().includes(searchTerm) ||
85-
(this.i18nPipe.transform(description).toLowerCase().includes(searchTerm)))
84+
(
85+
variable.name.toLowerCase().includes(searchTerm) ||
86+
(this.i18nPipe.transform(description)?.toLowerCase().includes(searchTerm)) ||
87+
this.i18nPipe.transform(group.group.description)?.toLowerCase().includes(searchTerm)
88+
)
8689
}) : group.variables
8790
}))
8891
.filter((group) => group.variables?.length > 0)
Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
11
:host {
22
@apply flex flex-col gap-4;
3-
}
3+
}
4+
5+
:host::ng-deep {
6+
/* Image fade in to prevent flickering */
7+
img {
8+
opacity: 0;
9+
height: 40px;
10+
animation: fadeIn 300ms ease forwards;
11+
animation-delay: 1s;
12+
}
13+
14+
@keyframes fadeIn {
15+
to {
16+
opacity: 1;
17+
height: auto;
18+
}
19+
}
20+
}

apps/cloud/src/app/@shared/knowledge/knowledge-doc-id/doc.component.html

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,20 @@
1818
<i class="ri-html5-fill text-lg leading-4 text-orange-500"></i>
1919
}
2020
@default {
21-
<i class="ri-file-text-fill text-lg leading-4"></i>
21+
@switch (category()) {
22+
@case('image') {
23+
<i class="ri-file-image-fill text-lg leading-4 text-green-500"></i>
24+
}
25+
@case('video') {
26+
<i class="ri-file-video-fill text-lg leading-4 text-purple-500"></i>
27+
}
28+
@case('audio') {
29+
<i class="ri-file-audio-fill text-lg leading-4 text-yellow-500"></i>
30+
}
31+
@default {
32+
<i class="ri-file-text-fill text-lg leading-4"></i>
33+
}
34+
}
2235
}
2336
}
2437
}

apps/cloud/src/app/@shared/knowledge/knowledge-doc-id/doc.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export class KnowledgeDocIdComponent {
2121
// States
2222
readonly sourceType = computed(() => this.doc().sourceType)
2323
readonly type = computed(() => this.doc().type)
24+
readonly category = computed(() => this.doc().category)
2425
readonly storageFile = computed(() => this.doc().storageFile)
2526
readonly label = computed(() => this.doc().name || this.storageFile()?.originalName || this.doc().options?.url)
2627

apps/cloud/src/app/@shared/knowledge/pipelines/pipelines.component.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<div class="flex items-center gap-x-3 p-4 pb-2">
2727
<div class="relative shrink-0">
2828
@if (template.icon) {
29-
<xp-icon [icon]="template.icon" class="block w-10 h-10 rounded-[10px] border-[0.5px] border-divider-regular bg-background-section" />
29+
<xp-icon [icon]="template.icon" size="32" class="flex justify-center items-center w-10 h-10 rounded-[10px] overflow-hidden border-[0.5px] border-divider-regular" />
3030
} @else {
3131
<div
3232
class="flex items-center justify-center relative grow-0 shrink-0 overflow-hidden border-[0.5px] border-divider-regular w-10 h-10 text-[24px] rounded-[10px] bg-pipeline-template-default-icon-bg text-text-secondary"
@@ -36,8 +36,8 @@
3636
}
3737
</div>
3838
<div class="flex grow flex-col gap-y-1 overflow-hidden py-px">
39-
<div class="system-md-semibold truncate text-text-secondary" [title]="template.name">{{ template.name }}</div>
40-
<div class="system-2xs-medium-uppercase text-text-tertiary">{{ template.category }}</div>
39+
<div class="system-md-semibold truncate text-text-secondary" [title]="template.title">{{ template.title }}</div>
40+
<div class="text-xs font-mono font-medium uppercase text-text-tertiary">{{ template.category }}</div>
4141
</div>
4242
</div>
4343
<p

0 commit comments

Comments
 (0)