From d8f420193a096c4da89fb1dd0832d61351faf6ee Mon Sep 17 00:00:00 2001 From: Carrotzpc Date: Tue, 9 Apr 2024 18:31:31 +0800 Subject: [PATCH] feat(knowledge): add file version support --- package.json | 2 +- pnpm-lock.yaml | 108 +++----- src/pages/KnowledgeCreate/index.jsx | 19 +- src/pages/KnowledgeDetail/index.jsx | 372 ++++++++++++++++++++-------- 4 files changed, 303 insertions(+), 198 deletions(-) diff --git a/package.json b/package.json index 6210ad5..af70563 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,7 @@ "@tenx-ui/utils": "^2.3.1", "@umijs/max": "^4.0.42", "@yunti/lowcode-datasource-axios-handler": "^1.0.1", - "@yuntijs/arcadia-bff-sdk": "^1.2.14", + "@yuntijs/arcadia-bff-sdk": "^1.2.16", "@yuntijs/chat": "workspace:*", "@yuntijs/react-markdown-lowcode-materials": "1.0.1", "@yuntijs/request": "^1.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 43f912e..9569f3e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -71,8 +71,8 @@ importers: specifier: ^1.0.1 version: 1.0.1 '@yuntijs/arcadia-bff-sdk': - specifier: ^1.2.14 - version: 1.2.14(@tarojs/taro@3.6.25)(antd@5.13.2)(headers-polyfill@4.0.3)(react@18.2.0)(swr@2.2.4) + specifier: ^1.2.16 + version: 1.2.16(@tarojs/taro@3.6.25)(antd@5.13.2)(headers-polyfill@4.0.3)(react@18.2.0)(swr@2.2.4) '@yuntijs/chat': specifier: workspace:* version: link:packages/chat @@ -3526,7 +3526,7 @@ packages: '@dnd-kit/core': ^6.0.7 react: '>=16.8.0' dependencies: - '@dnd-kit/core': 6.1.0(react-dom@17.0.2)(react@18.2.0) + '@dnd-kit/core': 6.1.0(react-dom@18.2.0)(react@18.2.0) '@dnd-kit/utilities': 3.2.2(react@18.2.0) react: 18.2.0 tslib: 2.6.2 @@ -6429,7 +6429,7 @@ packages: dev: true /@semantic-release/error@3.0.0: - resolution: {integrity: sha512-5hiM4Un+tpl4cKw3lV4UgzJj+SmfNIDCLLw0TepzQxz9ZGV5ixnqkzIVF+3tp0ZHgcMKE+VNGHJjEeyFG2dcSw==} + resolution: {integrity: sha1-MKO5e7tYRNaV6yL506pA9qkncMI=} engines: {node: '>=14.17'} dev: true @@ -6725,6 +6725,7 @@ packages: cpu: [arm64] os: [darwin] requiresBuild: true + dev: false optional: true /@swc/core-darwin-x64@1.3.96: @@ -6733,6 +6734,7 @@ packages: cpu: [x64] os: [darwin] requiresBuild: true + dev: false optional: true /@swc/core-linux-arm-gnueabihf@1.3.96: @@ -6741,6 +6743,7 @@ packages: cpu: [arm] os: [linux] requiresBuild: true + dev: false optional: true /@swc/core-linux-arm64-gnu@1.3.96: @@ -6750,6 +6753,7 @@ packages: os: [linux] libc: [glibc] requiresBuild: true + dev: false optional: true /@swc/core-linux-arm64-musl@1.3.96: @@ -6759,6 +6763,7 @@ packages: os: [linux] libc: [musl] requiresBuild: true + dev: false optional: true /@swc/core-linux-x64-gnu@1.3.96: @@ -6768,6 +6773,7 @@ packages: os: [linux] libc: [glibc] requiresBuild: true + dev: false optional: true /@swc/core-linux-x64-musl@1.3.96: @@ -6777,6 +6783,7 @@ packages: os: [linux] libc: [musl] requiresBuild: true + dev: false optional: true /@swc/core-win32-arm64-msvc@1.3.96: @@ -6785,6 +6792,7 @@ packages: cpu: [arm64] os: [win32] requiresBuild: true + dev: false optional: true /@swc/core-win32-ia32-msvc@1.3.96: @@ -6793,6 +6801,7 @@ packages: cpu: [ia32] os: [win32] requiresBuild: true + dev: false optional: true /@swc/core-win32-x64-msvc@1.3.96: @@ -6801,6 +6810,7 @@ packages: cpu: [x64] os: [win32] requiresBuild: true + dev: false optional: true /@swc/core@1.3.96: @@ -6826,9 +6836,11 @@ packages: '@swc/core-win32-arm64-msvc': 1.3.96 '@swc/core-win32-ia32-msvc': 1.3.96 '@swc/core-win32-x64-msvc': 1.3.96 + dev: false /@swc/counter@0.1.3: resolution: {integrity: sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==} + dev: false /@swc/register@0.1.10(@swc/core@1.3.96): resolution: {integrity: sha512-6STwH/q4dc3pitXLVkV7sP0Hiy+zBsU2wOF1aXpXR95pnH3RYHKIsDC+gvesfyB7jxNT9OOZgcqOp9RPxVTx9A==} @@ -6847,6 +6859,7 @@ packages: resolution: {integrity: sha512-/JLo/l2JsT/LRd80C3HfbmVpxOAJ11FO2RCEslFrgzLltoP9j8XIbsyDcfCt2WWyX+CM96rBoNM+IToAkFOugg==} dependencies: '@swc/counter': 0.1.3 + dev: false /@tanstack/match-sorter-utils@8.11.7: resolution: {integrity: sha512-4PUKgaaFpiB7MK406N5VAiLu2VUhDumojGWhEC8kNQ767RGU2vsJDI7Xp4D8lMBzijqswRWz3U8ioa2zUKnFeQ==} @@ -8550,7 +8563,7 @@ packages: react-refresh: 0.14.0 schema-utils: 3.3.0 source-map: 0.7.4 - webpack: 5.90.0(@swc/core@1.3.96) + webpack: 5.90.0 /@umijs/renderer-react@4.1.1(react-dom@18.1.0)(react@18.1.0): resolution: {integrity: sha512-h6mXzTeadXGjUUDfBOjNjIFPkiyt1N0oIEK+eS2PH3SaZGCUa8HNm+yWJmUxxDqbo/+1rvnN8z1oEGDRHfHwXA==} @@ -8791,7 +8804,7 @@ packages: - debug dev: false - /@yuntijs/arcadia-bff-sdk@1.2.14(@tarojs/taro@3.6.25)(antd@5.13.2)(headers-polyfill@4.0.3)(react@18.2.0)(swr@2.2.4): + /@yuntijs/arcadia-bff-sdk@1.2.14(@tarojs/taro@3.6.25)(antd@5.15.0)(headers-polyfill@4.0.3)(react@18.2.0)(swr@2.2.4): resolution: {integrity: sha512-AcTWSgFjyuMVX6OgXkZ7qc2a46MmPgJbtHENon8O/LaQVR9OL0RBCtUIPjl+bPoakjVBW4MHbPegfZ9Zl9Ma5A==} peerDependencies: '@tarojs/taro': '>=3' @@ -8801,7 +8814,7 @@ packages: swr: '>=2.0.0' dependencies: '@tarojs/taro': 3.6.25(@tarojs/helper@3.6.25)(@tarojs/runtime@3.6.25)(@types/react@18.2.48)(postcss@8.4.33) - antd: 5.13.2(react-dom@18.2.0)(react@18.2.0) + antd: 5.15.0(react-dom@18.2.0)(react@18.2.0) graphql: 16.8.1 graphql-request: 5.2.0(graphql@16.8.1) graphql-tag: 2.12.6(graphql@16.8.1) @@ -8813,8 +8826,8 @@ packages: - encoding dev: false - /@yuntijs/arcadia-bff-sdk@1.2.14(@tarojs/taro@3.6.25)(antd@5.15.0)(headers-polyfill@4.0.3)(react@18.2.0)(swr@2.2.4): - resolution: {integrity: sha512-AcTWSgFjyuMVX6OgXkZ7qc2a46MmPgJbtHENon8O/LaQVR9OL0RBCtUIPjl+bPoakjVBW4MHbPegfZ9Zl9Ma5A==} + /@yuntijs/arcadia-bff-sdk@1.2.16(@tarojs/taro@3.6.25)(antd@5.13.2)(headers-polyfill@4.0.3)(react@18.2.0)(swr@2.2.4): + resolution: {integrity: sha512-GN9YBcRvEZZAMlisb4B3xKxn/g+ld7U+wjgeLv9KGBn4H9GZ98Dqdo1kTCVLN8bm60sl7Dn34zU803pxtSU4AQ==} peerDependencies: '@tarojs/taro': '>=3' antd: '>=5.4.0' @@ -8823,7 +8836,7 @@ packages: swr: '>=2.0.0' dependencies: '@tarojs/taro': 3.6.25(@tarojs/helper@3.6.25)(@tarojs/runtime@3.6.25)(@types/react@18.2.48)(postcss@8.4.33) - antd: 5.15.0(react-dom@18.2.0)(react@18.2.0) + antd: 5.13.2(react-dom@18.2.0)(react@18.2.0) graphql: 16.8.1 graphql-request: 5.2.0(graphql@16.8.1) graphql-tag: 2.12.6(graphql@16.8.1) @@ -9101,7 +9114,7 @@ packages: dev: false /aggregate-error@3.1.0: - resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==} + resolution: {integrity: sha1-kmcP9Q9TWb23o+DUDQ7DDFc3aHo=} engines: {node: '>=8'} dependencies: clean-stack: 2.2.0 @@ -10374,7 +10387,7 @@ packages: dev: true /clean-stack@2.2.0: - resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} + resolution: {integrity: sha1-7oRy27Ep5yezHooQpCfe6d/kAIs=} engines: {node: '>=6'} dev: true @@ -10925,7 +10938,7 @@ packages: postcss-modules-values: 4.0.0(postcss@8.4.33) postcss-value-parser: 4.2.0 semver: 7.5.4 - webpack: 5.90.0(@swc/core@1.3.96) + webpack: 5.90.0 /css-prefers-color-scheme@6.0.3(postcss@8.4.33): resolution: {integrity: sha512-4BqMbZksRkJQx2zAjrokiGMd07RqOa2IxIrrN10lyBe9xhn9DEvjUK79J6jkeiv9D9hQFXKb6g1jwU62jziJZA==} @@ -12775,7 +12788,7 @@ packages: semver: 7.5.4 tapable: 2.2.1 typescript: 5.0.4 - webpack: 5.90.0(@swc/core@1.3.96) + webpack: 5.90.0 /fork-ts-checker-webpack-plugin@8.0.0(typescript@5.3.3)(webpack@5.90.0): resolution: {integrity: sha512-mX3qW3idpueT2klaQXBzrIM/pHw+T0B/V9KHEvNrqijTq9NFnMZU6oreVxDYcf33P8a5cW+67PjodNHthGnNVg==} @@ -18130,7 +18143,7 @@ packages: side-channel: 1.0.4 /query-string@6.14.1: - resolution: {integrity: sha512-XDxAeVmpfu1/6IjyT/gXHOl+S0vQ9owggJ30hhWKdHAsNPOcasn5o9BW0eejZqL2e4vMjhAxoW3jVHcD6mbcYw==} + resolution: {integrity: sha1-esLcpG2n8wlEm6D4ax/SglWwyGo=} engines: {node: '>=6'} dependencies: decode-uri-component: 0.2.2 @@ -23041,30 +23054,6 @@ packages: ansi-escapes: 4.3.2 supports-hyperlinks: 2.3.0 - /terser-webpack-plugin@5.3.10(@swc/core@1.3.96)(webpack@5.90.0): - resolution: {integrity: sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==} - engines: {node: '>= 10.13.0'} - peerDependencies: - '@swc/core': '*' - esbuild: '*' - uglify-js: '*' - webpack: ^5.1.0 - peerDependenciesMeta: - '@swc/core': - optional: true - esbuild: - optional: true - uglify-js: - optional: true - dependencies: - '@jridgewell/trace-mapping': 0.3.22 - '@swc/core': 1.3.96 - jest-worker: 27.5.1 - schema-utils: 3.3.0 - serialize-javascript: 6.0.2 - terser: 5.27.0 - webpack: 5.90.0(@swc/core@1.3.96) - /terser-webpack-plugin@5.3.10(webpack@5.90.0): resolution: {integrity: sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==} engines: {node: '>= 10.13.0'} @@ -23087,7 +23076,6 @@ packages: serialize-javascript: 6.0.2 terser: 5.27.0 webpack: 5.90.0 - dev: false /terser@5.27.0: resolution: {integrity: sha512-bi1HRwVRskAjheeYl291n3JC4GgO/Ty4z1nVs5AAsmonJulGxpSektecnNedrwK9C7vpvVtcX3cw00VSLt7U2A==} @@ -24247,46 +24235,6 @@ packages: - '@swc/core' - esbuild - uglify-js - dev: false - - /webpack@5.90.0(@swc/core@1.3.96): - resolution: {integrity: sha512-bdmyXRCXeeNIePv6R6tGPyy20aUobw4Zy8r0LUS2EWO+U+Ke/gYDgsCh7bl5rB6jPpr4r0SZa6dPxBxLooDT3w==} - engines: {node: '>=10.13.0'} - hasBin: true - peerDependencies: - webpack-cli: '*' - peerDependenciesMeta: - webpack-cli: - optional: true - dependencies: - '@types/eslint-scope': 3.7.7 - '@types/estree': 1.0.5 - '@webassemblyjs/ast': 1.11.6 - '@webassemblyjs/wasm-edit': 1.11.6 - '@webassemblyjs/wasm-parser': 1.11.6 - acorn: 8.11.3 - acorn-import-assertions: 1.9.0(acorn@8.11.3) - browserslist: 4.23.0 - chrome-trace-event: 1.0.3 - enhanced-resolve: 5.15.0 - es-module-lexer: 1.4.1 - eslint-scope: 5.1.1 - events: 3.3.0 - glob-to-regexp: 0.4.1 - graceful-fs: 4.2.11 - json-parse-even-better-errors: 2.3.1 - loader-runner: 4.3.0 - mime-types: 2.1.35 - neo-async: 2.6.2 - schema-utils: 3.3.0 - tapable: 2.2.1 - terser-webpack-plugin: 5.3.10(@swc/core@1.3.96)(webpack@5.90.0) - watchpack: 2.4.0 - webpack-sources: 3.2.3 - transitivePeerDependencies: - - '@swc/core' - - esbuild - - uglify-js /whatwg-encoding@1.0.5: resolution: {integrity: sha1-WrrPd3wyFmpR0IXWtPPn0nET3bA=} diff --git a/src/pages/KnowledgeCreate/index.jsx b/src/pages/KnowledgeCreate/index.jsx index 675f269..23c8ec4 100644 --- a/src/pages/KnowledgeCreate/index.jsx +++ b/src/pages/KnowledgeCreate/index.jsx @@ -143,14 +143,14 @@ class KnowledgeCreate$$Page extends React.Component { } catch (error) {} } - getCheckBox(rows) { + getCheckBox(keys, rows) { try { const { version } = this.state; this.setState({ - selectFiles: rows, - nextFileList: rows.map(item => { + selectFiles: keys, + nextFileList: keys.map(key => { return { - ...this.state.dataSetFileList.find(_item => _item.path === item), + ...this.state.dataSetFileList.find(_item => _item.path === key), version, }; }), @@ -330,8 +330,9 @@ class KnowledgeCreate$$Page extends React.Component { name: version, namespace: this.utils.getAuthData().project, }, - files: selectFiles.map(path => ({ - path, + files: selectFiles.map(file => ({ + path: file.path, + version: file.latestVersion, })), }, ]; @@ -752,7 +753,7 @@ class KnowledgeCreate$$Page extends React.Component { { dataIndex: 'fileType', key: '', - render: (text, record, index) => + render: /* 插槽容器*/ (text, record, index) => (__$$context => ( - {__$$eval(() => text || '-')} + {__$$eval(() => __$$context.fileTyle || '-')} ))(__$$createChildContext(__$$context, { text, record, index })), title: '类型', @@ -859,7 +860,7 @@ class KnowledgeCreate$$Page extends React.Component { strong={false} style={{ fontSize: '' }} > - {__$$eval(() => `类型:${__$$context.getType() || '-'}`)} + {__$$eval(() => `类型:${item.fileType || '-'}`)} diff --git a/src/pages/KnowledgeDetail/index.jsx b/src/pages/KnowledgeDetail/index.jsx index 7017f7c..253a69f 100644 --- a/src/pages/KnowledgeDetail/index.jsx +++ b/src/pages/KnowledgeDetail/index.jsx @@ -20,6 +20,8 @@ import { Tooltip, Dropdown, Space, + Badge, + Tag, } from '@tenx-ui/materials'; import LccComponentSbva0 from 'confirm'; @@ -31,6 +33,7 @@ import LccComponentXnggv from 'kubeagi-knowledge-edit-modal'; import { AntdIconInfoCircleOutlined, AntdIconPlusOutlined, + TenxIconHandPress, AntdIconReloadOutlined, } from '@tenx-ui/icon-materials'; @@ -79,6 +82,7 @@ class KnowledgeDetail$$Page extends React.Component { addFilesModalConfirmBtnLoading: false, addFilesModalOpen: false, baseInfoModalOpen: false, + confirm: {}, dataset: undefined, datasetList: [], datasetVersion: undefined, @@ -86,10 +90,10 @@ class KnowledgeDetail$$Page extends React.Component { deleteModalOpen: false, editModalOpen: false, fileDelBtnsLoading: {}, - fileDelconfirm: {}, modalFilesList: [], modalFilesListLoading: false, modalFilesSelectedKeys: [], + modalFilesSelectedRows: [], searchText: undefined, }; } @@ -113,6 +117,7 @@ class KnowledgeDetail$$Page extends React.Component { let processing = 0; let succeeded = 0; let failed = 0; + let pendingUpdate = 0; detail.forEach(d => { if (d.phase === 'Processing') { processing++; @@ -121,12 +126,16 @@ class KnowledgeDetail$$Page extends React.Component { } else if (d.phase === 'Failed') { failed++; } + if (d.latestVersion !== d.version) { + pendingUpdate++; + } }); return { total: detail.length, processing, succeeded, failed, + pendingUpdate, }; } @@ -296,28 +305,42 @@ class KnowledgeDetail$$Page extends React.Component { } async onAddFilesModalOk() { - const { modalFilesSelectedKeys } = this.state; + const { modalFilesSelectedKeys, modalFilesSelectedRows } = this.state; const knowledge = this.getKnowledge(); const fileGroups = (knowledge.fileGroupDetails || []).map(fgd => ({ source: fgd.source, files: fgd.filedetails.map(detail => ({ path: detail.path, + version: detail.version, })), })); const version = this.getCurrentDatasetAndVersion().version; const targetFileGroupIndex = fileGroups.findIndex(fg => fg.source?.name === version); if (targetFileGroupIndex > -1) { - fileGroups[targetFileGroupIndex].files = modalFilesSelectedKeys.map(path => ({ - path, - })); + // 修改已有 dataset + const currentFiles = fileGroups[targetFileGroupIndex].files; + fileGroups[targetFileGroupIndex].files = modalFilesSelectedKeys.map(path => { + const oldFile = currentFiles.find(f => f.path === path); + let version = oldFile?.version; + if (!version) { + // 没有的话说明是新增的,需要获取最新版本 + version = modalFilesSelectedRows.find(f => f.path === path)?.latestVersion; + } + return { + path, + version, + }; + }); } else { + // 新增 dataset fileGroups.push({ source: { kind: 'VersionedDataset', name: version, }, - files: modalFilesSelectedKeys.map(path => ({ - path, + files: modalFilesSelectedRows.map(row => ({ + path: row.path, + version: row.latestVersion, })), }); } @@ -416,7 +439,7 @@ class KnowledgeDetail$$Page extends React.Component { async onFileDelBtnClick(event, extParams) { const { path, source } = extParams.record; this.setState({ - fileDelconfirm: { + confirm: { id: new Date().getTime(), title: '删除知识库文件', content: `确定删除知识库文件:${source}/${path} ?`, @@ -428,6 +451,7 @@ class KnowledgeDetail$$Page extends React.Component { .filter(detail => detail.path !== path || fgd.source.name !== source) .map(detail => ({ path: detail.path, + version: detail.version, })), })); const input = { @@ -460,6 +484,7 @@ class KnowledgeDetail$$Page extends React.Component { this.fileModalSelectedRowKeys = selectedRowKeys; this.setState({ modalFilesSelectedKeys: selectedRowKeys, + modalFilesSelectedRows: selectedRows, }); } @@ -494,6 +519,65 @@ class KnowledgeDetail$$Page extends React.Component { } } + async onFileUpdateBtnClick(event, extParams) { + const { path, source } = extParams?.record || {}; + const pendingUpdateCount = this.countFileGroupDetails().pendingUpdate; + this.setState({ + confirm: { + id: new Date().getTime(), + title: '更新知识库文件', + content: source + ? `确定更新知识库文件:${source}/${path} ?` + : `确定更新所有知识库文件(共 ${pendingUpdateCount} 个需要更新)?`, + onOk: async () => { + const knowledge = this.getKnowledge(); + const fileGroups = (knowledge.fileGroupDetails || []).map(fgd => ({ + source: fgd.source, + files: fgd.filedetails.map(detail => { + // 更新全部文件 + if (!source) { + return { + path: detail.path, + version: detail.latestVersion, + }; + } + // 更新单个文件 + if (detail.path === path && fgd.source.name === source) { + return { + path: detail.path, + version: detail.latestVersion, + }; + } + return { + path: detail.path, + version: detail.version, + }; + }), + })); + const input = { + name: knowledge.name, + namespace: knowledge.namespace, + fileGroups, + }; + try { + await this.utils.bff.updateKnowledgeBase({ + input, + }); + this.utils.message.success( + source ? `文件 '${path}' 更新成功` : `${pendingUpdateCount} 个文件更新成功` + ); + this.refreshData(); + } catch (err) { + console.warn('updateKnowledgeBase failed', err); + this.utils.message.warning(`文件更新失败`); + } finally { + // + } + }, + }, + }); + } + onSearchTextSubmit(value) { this.setState({ searchText: value, @@ -555,7 +639,7 @@ class KnowledgeDetail$$Page extends React.Component { Array.prototype.slice.call(arguments).concat([]) ); }.bind(this)} - open={__$$eval(() => this.state.baseInfoModalOpen)} + open={false} title="基础信息" width="700px" > @@ -719,7 +803,7 @@ class KnowledgeDetail$$Page extends React.Component { this.state.fileDelconfirm)} + data={__$$eval(() => this.state.confirm)} /> - - - - - + + - - {__$$eval(() => `共有文件:${this.countFileGroupDetails().total} 个`)} - - } + onClick={function () { + return this.openAddFilesModal.apply( + this, + Array.prototype.slice.call(arguments).concat([]) + ); + }.bind(this)} + shape="default" + style={{}} + type="primary" > - {__$$eval( - () => `文件向量化中:${this.countFileGroupDetails().processing} 个` - )} - - + {!!__$$eval(() => this.countFileGroupDetails().pendingUpdate > 0) && ( + + + + )} + + + + + {__$$eval(() => `共有文件:${this.countFileGroupDetails().total} 个`)} + + + {__$$eval( + () => `文件向量化中:${this.countFileGroupDetails().processing} 个` + )} + {__$$eval( - () => `文件向量化失败:${this.countFileGroupDetails().failed} 个` + () => `文件向量化成功:${this.countFileGroupDetails().succeeded} 个` )} - {!!__$$eval(() => this.getKnowledge()?.status === 'False') && ( + + + {__$$eval( + () => `文件向量化失败:${this.countFileGroupDetails().failed} 个` + )} + + + + {!!__$$eval(() => this.getKnowledge()?.status === 'False') && ( + 重试 - )} - + + )} + (__$$context => ( + + + {__$$eval(() => text)} + + {!!__$$eval(() => record.latestVersion !== record.version) && ( + + new + + )} + + ))(__$$createChildContext(__$$context, { text, record, index })), + title: '文件名称', + }, { dataIndex: 'phase', key: 'age', @@ -1283,6 +1419,26 @@ class KnowledgeDetail$$Page extends React.Component { render: /* 插槽容器*/ (text, record, index) => (__$$context => ( +