diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 352cdab2e..701b5fea4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,7 +20,11 @@ jobs: strategy: matrix: - os: [macos-latest, windows-latest, ubuntu-latest] + os: [macos-13, windows-latest, ubuntu-latest] + arch: [x64, arm64] + exclude: + - os: windows-latest + arch: arm64 steps: - name: Check out Git repository @@ -30,6 +34,7 @@ jobs: uses: actions/setup-node@v3 with: node-version: 20 + arch: ${{ matrix.arch }} - name: Install corepack run: corepack enable && corepack prepare yarn@4.3.1 --activate @@ -42,10 +47,13 @@ jobs: run: yarn build:linux env: GH_TOKEN: ${{ secrets.GH_TOKEN }} + ARCH: ${{ matrix.arch }} - name: Build Mac - if: matrix.os == 'macos-latest' - run: yarn build:mac + if: matrix.os == 'macos-13' + run: | + yarn electron-rebuild + yarn build:mac env: CSC_LINK: ${{ secrets.CSC_LINK }} CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} @@ -53,12 +61,14 @@ jobs: APPLE_APP_SPECIFIC_PASSWORD: ${{ vars.APPLE_APP_SPECIFIC_PASSWORD }} APPLE_TEAM_ID: ${{ vars.APPLE_TEAM_ID }} GH_TOKEN: ${{ secrets.GH_TOKEN }} + ARCH: ${{ matrix.arch }} - name: Build Windows if: matrix.os == 'windows-latest' run: yarn build:win env: GH_TOKEN: ${{ secrets.GH_TOKEN }} + ARCH: ${{ matrix.arch }} - name: Replace spaces in filenames run: node scripts/replaceSpaces.js diff --git a/electron-builder.yml b/electron-builder.yml index bdb3f9586..9013718cd 100644 --- a/electron-builder.yml +++ b/electron-builder.yml @@ -11,6 +11,7 @@ files: - '!src' - '!scripts' - '!local' + - '!node_modules/@electron/rebuild' asarUnpack: - resources/** win: diff --git a/electron.vite.config.ts b/electron.vite.config.ts index 1b4097882..f0646d897 100644 --- a/electron.vite.config.ts +++ b/electron.vite.config.ts @@ -16,6 +16,7 @@ export default defineConfig({ '@llm-tools/embedjs-loader-msoffice', '@llm-tools/embedjs-loader-xml', '@llm-tools/embedjs-loader-pdf', + '@llm-tools/embedjs-loader-sitemap', '@lancedb/lancedb' ] }) @@ -29,7 +30,7 @@ export default defineConfig({ }, build: { rollupOptions: { - external: ['@lancedb/lancedb', '@llm-tools/embedjs-loader-sitemap'] + external: ['@lancedb/lancedb'] } } }, diff --git a/package.json b/package.json index c87afcaa2..b4e202a7a 100644 --- a/package.json +++ b/package.json @@ -28,9 +28,9 @@ "build": "npm run typecheck && electron-vite build", "postinstall": "electron-builder install-app-deps", "build:unpack": "dotenv npm run build && electron-builder --dir", - "build:win": "dotenv npm run build && electron-builder --win --publish never", - "build:mac": "dotenv electron-vite build && electron-builder --mac --publish never", - "build:linux": "dotenv electron-vite build && electron-builder --linux --publish never", + "build:win": "dotenv npm run build && electron-builder --win --$ARCH", + "build:mac": "dotenv electron-vite build && electron-builder --mac --$ARCH", + "build:linux": "dotenv electron-vite build && electron-builder --linux --$ARCH", "release": "node scripts/version.js", "publish": "yarn release patch push", "pulish:artifacts": "cd packages/artifacts && npm publish && cd -", @@ -40,12 +40,14 @@ "dependencies": { "@electron-toolkit/preload": "^3.0.0", "@electron-toolkit/utils": "^3.0.0", + "@electron/rebuild": "^3.7.1", "@llm-tools/embedjs": "^0.1.24", "@llm-tools/embedjs-lancedb": "^0.1.24", "@llm-tools/embedjs-loader-csv": "^0.1.24", "@llm-tools/embedjs-loader-markdown": "^0.1.24", "@llm-tools/embedjs-loader-msoffice": "^0.1.24", "@llm-tools/embedjs-loader-pdf": "^0.1.24", + "@llm-tools/embedjs-loader-sitemap": "^0.1.24", "@llm-tools/embedjs-loader-web": "^0.1.24", "@llm-tools/embedjs-loader-xml": "^0.1.24", "@llm-tools/embedjs-ollama": "^0.1.24", diff --git a/src/main/services/KnowledgeService.ts b/src/main/services/KnowledgeService.ts index 3b87d3707..e1b63b7ba 100644 --- a/src/main/services/KnowledgeService.ts +++ b/src/main/services/KnowledgeService.ts @@ -7,9 +7,10 @@ import { LanceDb } from '@llm-tools/embedjs-lancedb' import { MarkdownLoader } from '@llm-tools/embedjs-loader-markdown' import { DocxLoader } from '@llm-tools/embedjs-loader-msoffice' import { PdfLoader } from '@llm-tools/embedjs-loader-pdf' +import { SitemapLoader } from '@llm-tools/embedjs-loader-sitemap' import { WebLoader } from '@llm-tools/embedjs-loader-web' import { OpenAiEmbeddings } from '@llm-tools/embedjs-openai' -import { FileType, RagAppRequestParams } from '@types' +import { FileType, KnowledgeBaseParams, KnowledgeItem } from '@types' import { app } from 'electron' class KnowledgeService { @@ -25,7 +26,7 @@ class KnowledgeService { } } - private getRagApplication = async ({ id, model, apiKey, baseURL }: RagAppRequestParams): Promise => { + private getRagApplication = async ({ id, model, apiKey, baseURL }: KnowledgeBaseParams): Promise => { return new RAGApplicationBuilder() .setModel('NO_MODEL') .setEmbeddingModel( @@ -42,13 +43,13 @@ class KnowledgeService { public create = async ( _: Electron.IpcMainInvokeEvent, - { id, model, apiKey, baseURL }: RagAppRequestParams + { id, model, apiKey, baseURL }: KnowledgeBaseParams ): Promise => { this.getRagApplication({ id, model, apiKey, baseURL }) } - public reset = async (_: Electron.IpcMainInvokeEvent, { config }: { config: RagAppRequestParams }): Promise => { - const ragApplication = await this.getRagApplication(config) + public reset = async (_: Electron.IpcMainInvokeEvent, { base }: { base: KnowledgeBaseParams }): Promise => { + const ragApplication = await this.getRagApplication(base) await ragApplication.reset() } @@ -61,27 +62,41 @@ class KnowledgeService { public add = async ( _: Electron.IpcMainInvokeEvent, - { data, config }: { data: string | FileType; config: RagAppRequestParams } + { base, item }: { base: KnowledgeBaseParams; item: KnowledgeItem } ): Promise => { - const ragApplication = await this.getRagApplication(config) + const ragApplication = await this.getRagApplication(base) - if (typeof data === 'string') { - if (data.startsWith('http')) { - return await ragApplication.addLoader(new WebLoader({ urlOrContent: data })) + if (item.type === 'url') { + const content = item.content as string + if (content.startsWith('http')) { + return await ragApplication.addLoader(new WebLoader({ urlOrContent: content })) } - return await ragApplication.addLoader(new TextLoader({ text: data })) } - if (data.ext === '.pdf') { - return await ragApplication.addLoader(new PdfLoader({ filePathOrUrl: data.path }) as any) + if (item.type === 'sitemap') { + const content = item.content as string + return await ragApplication.addLoader(new SitemapLoader({ url: content })) } - if (data.ext === '.docx') { - return await ragApplication.addLoader(new DocxLoader({ filePathOrUrl: data.path }) as any) + if (item.type === 'note') { + const content = item.content as string + return await ragApplication.addLoader(new TextLoader({ text: content })) } - if (data.ext === '.md' || data.ext === '.mdx') { - return await ragApplication.addLoader(new MarkdownLoader({ filePathOrUrl: data.path }) as any) + if (item.type === 'file') { + const file = item.content as FileType + + if (file.ext === '.pdf') { + return await ragApplication.addLoader(new PdfLoader({ filePathOrUrl: file.path }) as any) + } + + if (file.ext === '.docx') { + return await ragApplication.addLoader(new DocxLoader({ filePathOrUrl: file.path }) as any) + } + + if (file.ext.startsWith('.md')) { + return await ragApplication.addLoader(new MarkdownLoader({ filePathOrUrl: file.path }) as any) + } } return { entriesAdded: 0, uniqueId: '', loaderType: '' } @@ -89,17 +104,17 @@ class KnowledgeService { public remove = async ( _: Electron.IpcMainInvokeEvent, - { uniqueId, config }: { uniqueId: string; config: RagAppRequestParams } + { uniqueId, base }: { uniqueId: string; base: KnowledgeBaseParams } ): Promise => { - const ragApplication = await this.getRagApplication(config) + const ragApplication = await this.getRagApplication(base) await ragApplication.deleteLoader(uniqueId) } public search = async ( _: Electron.IpcMainInvokeEvent, - { search, config }: { search: string; config: RagAppRequestParams } + { search, base }: { search: string; base: KnowledgeBaseParams } ): Promise => { - const ragApplication = await this.getRagApplication(config) + const ragApplication = await this.getRagApplication(base) return await ragApplication.search(search) } } diff --git a/src/preload/index.d.ts b/src/preload/index.d.ts index d0d526ec7..4f34b94d2 100644 --- a/src/preload/index.d.ts +++ b/src/preload/index.d.ts @@ -2,7 +2,7 @@ import { ElectronAPI } from '@electron-toolkit/preload' import { AddLoaderReturn, ExtractChunkData } from '@llm-tools/embedjs-interfaces' import { FileType } from '@renderer/types' import { WebDavConfig } from '@renderer/types' -import { AppInfo, LanguageVarious, RagAppRequestParams } from '@renderer/types' +import { AppInfo, KnowledgeBaseParams, KnowledgeItem, LanguageVarious } from '@renderer/types' import type { OpenDialogOptions } from 'electron' import type { UpdateInfo } from 'electron-updater' import { Readable } from 'stream' @@ -60,12 +60,12 @@ declare global { update: (shortcuts: Shortcut[]) => Promise } knowledgeBase: { - create: ({ id, model, apiKey, baseURL }: RagAppRequestParams) => Promise - reset: ({ config }: { config: RagAppRequestParams }) => Promise + create: ({ id, model, apiKey, baseURL }: KnowledgeBaseParams) => Promise + reset: ({ base }: { base: KnowledgeBaseParams }) => Promise delete: (id: string) => Promise - add: ({ data, config }: { data: string | FileType; config: RagAppRequestParams }) => Promise - remove: ({ uniqueId, config }: { uniqueId: string; config: RagAppRequestParams }) => Promise - search: ({ search, config }: { search: string; config: RagAppRequestParams }) => Promise + add: ({ base, item }: { base: KnowledgeBaseParams; item: KnowledgeItem }) => Promise + remove: ({ uniqueId, base }: { uniqueId: string; base: KnowledgeBaseParams }) => Promise + search: ({ search, base }: { search: string; base: KnowledgeBaseParams }) => Promise } } } diff --git a/src/preload/index.ts b/src/preload/index.ts index 657dd573d..2190f7494 100644 --- a/src/preload/index.ts +++ b/src/preload/index.ts @@ -1,5 +1,5 @@ import { electronAPI } from '@electron-toolkit/preload' -import { FileType, RagAppRequestParams, Shortcut, WebDavConfig } from '@types' +import { KnowledgeBaseParams, KnowledgeItem, Shortcut, WebDavConfig } from '@types' import { contextBridge, ipcRenderer, OpenDialogOptions } from 'electron' // Custom APIs for renderer @@ -52,16 +52,16 @@ const api = { update: (shortcuts: Shortcut[]) => ipcRenderer.invoke('shortcuts:update', shortcuts) }, knowledgeBase: { - create: ({ id, model, apiKey, baseURL }: RagAppRequestParams) => + create: ({ id, model, apiKey, baseURL }: KnowledgeBaseParams) => ipcRenderer.invoke('knowledge-base:create', { id, model, apiKey, baseURL }), - reset: ({ config }: { config: RagAppRequestParams }) => ipcRenderer.invoke('knowledge-base:reset', { config }), + reset: ({ base }: { base: KnowledgeBaseParams }) => ipcRenderer.invoke('knowledge-base:reset', { base }), delete: (id: string) => ipcRenderer.invoke('knowledge-base:delete', id), - add: ({ data, config }: { data: string | FileType; config: RagAppRequestParams }) => - ipcRenderer.invoke('knowledge-base:add', { data, config }), - remove: ({ uniqueId, config }: { uniqueId: string; config: RagAppRequestParams }) => - ipcRenderer.invoke('knowledge-base:remove', { uniqueId, config }), - search: ({ search, config }: { search: string; config: RagAppRequestParams }) => - ipcRenderer.invoke('knowledge-base:search', { search, config }) + add: ({ base, item }: { base: KnowledgeBaseParams; item: KnowledgeItem }) => + ipcRenderer.invoke('knowledge-base:add', { base, item }), + remove: ({ uniqueId, base }: { uniqueId: string; base: KnowledgeBaseParams }) => + ipcRenderer.invoke('knowledge-base:remove', { uniqueId, base }), + search: ({ search, base }: { search: string; base: KnowledgeBaseParams }) => + ipcRenderer.invoke('knowledge-base:search', { search, base }) } } diff --git a/src/renderer/src/hooks/useknowledge.ts b/src/renderer/src/hooks/useknowledge.ts index c4ab65f31..0af8b787c 100644 --- a/src/renderer/src/hooks/useknowledge.ts +++ b/src/renderer/src/hooks/useknowledge.ts @@ -2,7 +2,7 @@ import { db } from '@renderer/databases/index' import KnowledgeQueue from '@renderer/queue/KnowledgeQueue' import FileManager from '@renderer/services/FileManager' -import { getRagAppRequestParams } from '@renderer/services/KnowledgeService' +import { getKnowledgeBaseParams } from '@renderer/services/KnowledgeService' import { RootState } from '@renderer/store' import { addBase, @@ -143,9 +143,8 @@ export const useKnowledge = (baseId: string) => { const removeItem = async (item: KnowledgeItem) => { dispatch(removeItemAction({ baseId, item })) if (base) { - const config = getRagAppRequestParams(base) if (item?.uniqueId) { - await window.api.knowledgeBase.remove({ uniqueId: item.uniqueId, config }) + await window.api.knowledgeBase.remove({ uniqueId: item.uniqueId, base: getKnowledgeBaseParams(base) }) } if (item.type === 'file' && typeof item.content === 'object') { await FileManager.deleteFile(item.content.id) diff --git a/src/renderer/src/i18n/locales/en-us.json b/src/renderer/src/i18n/locales/en-us.json index 483aae366..d80a19a17 100644 --- a/src/renderer/src/i18n/locales/en-us.json +++ b/src/renderer/src/i18n/locales/en-us.json @@ -560,8 +560,9 @@ "no_bases": "No knowledge bases available", "clear_selection": "Clear selection", "delete_confirm": "Are you sure you want to delete this knowledge base?", - "sitemaps": "Site Maps", - "add_sitemap": "Add Site Map" + "sitemaps": "Websites", + "add_sitemap": "Website Map", + "sitemap_placeholder": "Enter Website Map URL" } } } diff --git a/src/renderer/src/i18n/locales/ru-ru.json b/src/renderer/src/i18n/locales/ru-ru.json index d4d7d41ae..f286df381 100644 --- a/src/renderer/src/i18n/locales/ru-ru.json +++ b/src/renderer/src/i18n/locales/ru-ru.json @@ -560,8 +560,9 @@ "no_bases": "База знаний не найдена", "clear_selection": "Очистить выбор", "delete_confirm": "Вы уверены, что хотите удалить эту базу знаний?", - "sitemaps": "Карта сайта", - "add_sitemap": "Добавить карту сайта" + "sitemaps": "Сайты", + "add_sitemap": "Карта сайта", + "sitemap_placeholder": "Введите URL карты сайта" } } } diff --git a/src/renderer/src/i18n/locales/zh-cn.json b/src/renderer/src/i18n/locales/zh-cn.json index 52bcd8da8..2cf689f60 100644 --- a/src/renderer/src/i18n/locales/zh-cn.json +++ b/src/renderer/src/i18n/locales/zh-cn.json @@ -549,8 +549,9 @@ "no_bases": "暂无知识库", "clear_selection": "清除选择", "delete_confirm": "确定要删除此知识库吗?", - "sitemaps": "站点地图", - "add_sitemap": "添加站点地图" + "sitemaps": "网站", + "add_sitemap": "站点地图", + "sitemap_placeholder": "请输入站点地图 URL" } } } diff --git a/src/renderer/src/i18n/locales/zh-tw.json b/src/renderer/src/i18n/locales/zh-tw.json index a07e5e442..dc0f31214 100644 --- a/src/renderer/src/i18n/locales/zh-tw.json +++ b/src/renderer/src/i18n/locales/zh-tw.json @@ -548,8 +548,9 @@ "no_bases": "暫無知識庫", "clear_selection": "清除選擇", "delete_confirm": "確定要刪除此知識庫嗎?", - "sitemaps": "站點地圖", - "add_sitemap": "添加站點地圖" + "sitemaps": "網站", + "add_sitemap": "網站地圖", + "sitemap_placeholder": "請輸入網站地圖 URL" } } } diff --git a/src/renderer/src/pages/knowledge/KnowledgePage.tsx b/src/renderer/src/pages/knowledge/KnowledgePage.tsx index cd77a87bd..13331a4bf 100644 --- a/src/renderer/src/pages/knowledge/KnowledgePage.tsx +++ b/src/renderer/src/pages/knowledge/KnowledgePage.tsx @@ -27,7 +27,7 @@ const KnowledgePage: FC = () => { if (!selectedBase) { return setSelectedBase(bases[0]) } - if (selectedBase && !bases.includes(selectedBase)) { + if (selectedBase && !bases.find((base) => base.id === selectedBase.id)) { return setSelectedBase(bases[0]) } } diff --git a/src/renderer/src/pages/knowledge/components/AddKnowledgePopup.tsx b/src/renderer/src/pages/knowledge/components/AddKnowledgePopup.tsx index caa031bed..51e681d22 100644 --- a/src/renderer/src/pages/knowledge/components/AddKnowledgePopup.tsx +++ b/src/renderer/src/pages/knowledge/components/AddKnowledgePopup.tsx @@ -2,7 +2,7 @@ import { TopView } from '@renderer/components/TopView' import { isEmbeddingModel } from '@renderer/config/models' import { useKnowledgeBases } from '@renderer/hooks/useknowledge' import { useProviders } from '@renderer/hooks/useProvider' -import { getRagAppRequestParams } from '@renderer/services/KnowledgeService' +import { getKnowledgeBaseParams } from '@renderer/services/KnowledgeService' import { getModelUniqId } from '@renderer/services/ModelService' import { Model } from '@renderer/types' import { Form, Input, Modal, Select } from 'antd' @@ -64,7 +64,7 @@ const PopupContainer: React.FC = ({ title, resolve }) => { updated_at: Date.now() } - await window.api.knowledgeBase.create(getRagAppRequestParams(newBase)) + await window.api.knowledgeBase.create(getKnowledgeBaseParams(newBase)) addKnowledgeBase(newBase as any) setOpen(false) diff --git a/src/renderer/src/pages/knowledge/components/KnowledgeSearchPopup.tsx b/src/renderer/src/pages/knowledge/components/KnowledgeSearchPopup.tsx index 8d5cfebf2..b5f631409 100644 --- a/src/renderer/src/pages/knowledge/components/KnowledgeSearchPopup.tsx +++ b/src/renderer/src/pages/knowledge/components/KnowledgeSearchPopup.tsx @@ -1,6 +1,6 @@ import { ExtractChunkData } from '@llm-tools/embedjs-interfaces' import { TopView } from '@renderer/components/TopView' -import { getRagAppRequestParams } from '@renderer/services/KnowledgeService' +import { getKnowledgeBaseParams } from '@renderer/services/KnowledgeService' import { KnowledgeBase } from '@renderer/types' import { Input, List, Modal, Spin, Typography } from 'antd' import { useState } from 'react' @@ -37,7 +37,7 @@ const PopupContainer: React.FC = ({ base, resolve }) => { try { const searchResults = await window.api.knowledgeBase.search({ search: value, - config: getRagAppRequestParams(base) + base: getKnowledgeBaseParams(base) }) setResults(searchResults) } catch (error) { diff --git a/src/renderer/src/providers/BaseProvider.ts b/src/renderer/src/providers/BaseProvider.ts index 857f2179f..c6fdc1b17 100644 --- a/src/renderer/src/providers/BaseProvider.ts +++ b/src/renderer/src/providers/BaseProvider.ts @@ -1,5 +1,5 @@ import { getOllamaKeepAliveTime } from '@renderer/hooks/useOllama' -import { getRagAppRequestParams } from '@renderer/services/KnowledgeService' +import { getKnowledgeBaseParams } from '@renderer/services/KnowledgeService' import store from '@renderer/store' import { Assistant, FileType, Message, Provider, Suggestion } from '@renderer/types' import { delay } from '@renderer/utils' @@ -96,7 +96,7 @@ export default abstract class BaseProvider { const searchResults = await window.api.knowledgeBase.search({ search: message.content, - config: getRagAppRequestParams(base) + base: getKnowledgeBaseParams(base) }) const references = take(searchResults, 5) diff --git a/src/renderer/src/queue/KnowledgeQueue.ts b/src/renderer/src/queue/KnowledgeQueue.ts index 24e979a8a..51736ff7f 100644 --- a/src/renderer/src/queue/KnowledgeQueue.ts +++ b/src/renderer/src/queue/KnowledgeQueue.ts @@ -1,6 +1,6 @@ import { AddLoaderReturn } from '@llm-tools/embedjs-interfaces' import db from '@renderer/databases' -import { getRagAppRequestParams } from '@renderer/services/KnowledgeService' +import { getKnowledgeBaseParams } from '@renderer/services/KnowledgeService' import store from '@renderer/store' import { clearCompletedProcessing, updateBaseItemUniqueId, updateItemProcessingStatus } from '@renderer/store/knowledge' import { KnowledgeItem } from '@renderer/types' @@ -142,7 +142,7 @@ class KnowledgeQueue { throw new Error(`[KnowledgeQueue] Knowledge base ${baseId} not found`) } - const requestParams = getRagAppRequestParams(base) + const baseParams = getKnowledgeBaseParams(base) const sourceItem = base.items.find((i) => i.id === item.id) if (!sourceItem) { @@ -155,26 +155,22 @@ class KnowledgeQueue { switch (item.type) { case 'file': console.log(`[KnowledgeQueue] Processing file: ${sourceItem.content}`) - result = await window.api.knowledgeBase.add({ data: sourceItem.content, config: requestParams }) - console.log(`[KnowledgeQueue] Result: ${JSON.stringify(result)}`) + result = await window.api.knowledgeBase.add({ base: baseParams, item: sourceItem }) break case 'url': console.log(`[KnowledgeQueue] Processing URL: ${sourceItem.content}`) - result = await window.api.knowledgeBase.add({ data: sourceItem.content, config: requestParams }) - console.log(`[KnowledgeQueue] Result: ${JSON.stringify(result)}`) + result = await window.api.knowledgeBase.add({ base: baseParams, item: sourceItem }) break case 'sitemap': console.log(`[KnowledgeQueue] Processing Sitemap: ${sourceItem.content}`) - result = await window.api.knowledgeBase.add({ data: sourceItem.content, config: requestParams }) - console.log(`[KnowledgeQueue] Result: ${JSON.stringify(result)}`) + result = await window.api.knowledgeBase.add({ base: baseParams, item: sourceItem }) break case 'note': console.log(`[KnowledgeQueue] Processing note: ${sourceItem.content}`) note = await db.knowledge_notes.get(item.id) if (!note) throw new Error(`Source note ${item.id} not found`) content = note.content as string - result = await window.api.knowledgeBase.add({ data: content, config: requestParams }) - console.log(`[KnowledgeQueue] Result: ${JSON.stringify(result)}`) + result = await window.api.knowledgeBase.add({ base: baseParams, item: { ...sourceItem, content } }) break } diff --git a/src/renderer/src/services/KnowledgeService.ts b/src/renderer/src/services/KnowledgeService.ts index 176ee97d0..4fce5e91b 100644 --- a/src/renderer/src/services/KnowledgeService.ts +++ b/src/renderer/src/services/KnowledgeService.ts @@ -1,12 +1,17 @@ import AiProvider from '@renderer/providers/AiProvider' -import { KnowledgeBase, RagAppRequestParams } from '@renderer/types' +import { KnowledgeBase, KnowledgeBaseParams } from '@renderer/types' +import { isEmpty } from 'lodash' import { getProviderByModel } from './AssistantService' -export const getRagAppRequestParams = (base: KnowledgeBase): RagAppRequestParams => { +export const getKnowledgeBaseParams = (base: KnowledgeBase): KnowledgeBaseParams => { const provider = getProviderByModel(base.model) const aiProvider = new AiProvider(provider) + if (provider.id === 'ollama' && isEmpty(provider.apiKey)) { + provider.apiKey = 'empty' + } + return { id: base.id, model: base.model.name, diff --git a/src/renderer/src/store/knowledge.ts b/src/renderer/src/store/knowledge.ts index 95dd7d6d9..48fe5b3e8 100644 --- a/src/renderer/src/store/knowledge.ts +++ b/src/renderer/src/store/knowledge.ts @@ -48,12 +48,20 @@ const knowledgeSlice = createSlice({ if (base) { if (action.payload.item.type === 'note') { base.items.push(action.payload.item) - } else if (action.payload.item.type === 'url') { + } + if (action.payload.item.type === 'url') { const urlExists = base.items.some((item) => item.content === action.payload.item.content) if (!urlExists) { base.items.push(action.payload.item) } - } else if (action.payload.item.type === 'file') { + } + if (action.payload.item.type === 'sitemap') { + const sitemapExists = base.items.some((item) => item.content === action.payload.item.content) + if (!sitemapExists) { + base.items.push(action.payload.item) + } + } + if (action.payload.item.type === 'file') { action.payload.item.created_at = new Date(action.payload.item.created_at).getTime() action.payload.item.updated_at = new Date(action.payload.item.updated_at).getTime() base.items.push(action.payload.item) diff --git a/src/renderer/src/types/index.ts b/src/renderer/src/types/index.ts index bb6f289e1..a46409a6e 100644 --- a/src/renderer/src/types/index.ts +++ b/src/renderer/src/types/index.ts @@ -197,6 +197,8 @@ export type KnowledgeItem = { retryCount?: number } +export type KnowledgeItemType = 'file' | 'url' | 'note' | 'sitemap' + export interface KnowledgeBase { id: string name: string @@ -207,7 +209,7 @@ export interface KnowledgeBase { updated_at: number } -export type RagAppRequestParams = { +export type KnowledgeBaseParams = { id: string model: string apiKey: string diff --git a/yarn.lock b/yarn.lock index 34502173b..af8fa29ca 100644 --- a/yarn.lock +++ b/yarn.lock @@ -504,6 +504,26 @@ __metadata: languageName: node linkType: hard +"@electron/node-gyp@git+https://github.com/electron/node-gyp.git#06b29aafb7708acef8b3669835c8a7857ebc92d2": + version: 10.2.0-electron.1 + resolution: "@electron/node-gyp@https://github.com/electron/node-gyp.git#commit=06b29aafb7708acef8b3669835c8a7857ebc92d2" + dependencies: + env-paths: "npm:^2.2.0" + exponential-backoff: "npm:^3.1.1" + glob: "npm:^8.1.0" + graceful-fs: "npm:^4.2.6" + make-fetch-happen: "npm:^10.2.1" + nopt: "npm:^6.0.0" + proc-log: "npm:^2.0.1" + semver: "npm:^7.3.5" + tar: "npm:^6.2.1" + which: "npm:^2.0.2" + bin: + node-gyp: ./bin/node-gyp.js + checksum: 10c0/e8c97bb5347bf0871312860010b70379069359bf05a6beb9e4d898d0831f9f8447f35b887a86d5241989e804813cf72054327928da38714a6102f791e802c8d9 + languageName: node + linkType: hard + "@electron/notarize@npm:2.3.2": version: 2.3.2 resolution: "@electron/notarize@npm:2.3.2" @@ -543,6 +563,31 @@ __metadata: languageName: node linkType: hard +"@electron/rebuild@npm:^3.7.1": + version: 3.7.1 + resolution: "@electron/rebuild@npm:3.7.1" + dependencies: + "@electron/node-gyp": "git+https://github.com/electron/node-gyp.git#06b29aafb7708acef8b3669835c8a7857ebc92d2" + "@malept/cross-spawn-promise": "npm:^2.0.0" + chalk: "npm:^4.0.0" + debug: "npm:^4.1.1" + detect-libc: "npm:^2.0.1" + fs-extra: "npm:^10.0.0" + got: "npm:^11.7.0" + node-abi: "npm:^3.45.0" + node-api-version: "npm:^0.2.0" + node-gyp: "npm:latest" + ora: "npm:^5.1.0" + read-binary-file-arch: "npm:^1.0.6" + semver: "npm:^7.3.5" + tar: "npm:^6.0.5" + yargs: "npm:^17.0.1" + bin: + electron-rebuild: lib/cli.js + checksum: 10c0/ef498ec1eb6d2870f4331dd53d84132a4fb7d2ef6a0058854731d3261fc0af3e2c8549c1c268801b7c2c9e93519b22d67b2a4fe7ed0136214100980801e2a372 + languageName: node + linkType: hard + "@electron/universal@npm:1.5.1": version: 1.5.1 resolution: "@electron/universal@npm:1.5.1" @@ -798,7 +843,7 @@ __metadata: languageName: node linkType: hard -"@gar/promisify@npm:^1.0.1": +"@gar/promisify@npm:^1.0.1, @gar/promisify@npm:^1.1.3": version: 1.1.3 resolution: "@gar/promisify@npm:1.1.3" checksum: 10c0/0b3c9958d3cd17f4add3574975e3115ae05dc7f1298a60810414b16f6f558c137b5fb3cd3905df380bacfd955ec13f67c1e6710cbb5c246a7e8d65a8289b2bff @@ -1569,6 +1614,19 @@ __metadata: languageName: node linkType: hard +"@llm-tools/embedjs-loader-sitemap@npm:^0.1.24": + version: 0.1.24 + resolution: "@llm-tools/embedjs-loader-sitemap@npm:0.1.24" + dependencies: + "@llm-tools/embedjs-interfaces": "npm:0.1.24" + "@llm-tools/embedjs-loader-web": "npm:0.1.24" + debug: "npm:^4.4.0" + md5: "npm:^2.3.0" + sitemapper: "npm:^3.2.18" + checksum: 10c0/afda59d2f2e60cafd1398bf28b45ded8abc3849e354f85afd1b37c17cdc16d9483627352a85f90d6ecc52ff6aaa5a5c52bc6ebbfafdbc30b8005b26f6a95d5b9 + languageName: node + linkType: hard + "@llm-tools/embedjs-loader-web@npm:0.1.24, @llm-tools/embedjs-loader-web@npm:^0.1.24": version: 0.1.24 resolution: "@llm-tools/embedjs-loader-web@npm:0.1.24" @@ -1653,6 +1711,15 @@ __metadata: languageName: node linkType: hard +"@malept/cross-spawn-promise@npm:^2.0.0": + version: 2.0.0 + resolution: "@malept/cross-spawn-promise@npm:2.0.0" + dependencies: + cross-spawn: "npm:^7.0.1" + checksum: 10c0/84d60b8d467f4252114849f0a33c3763f07898335269eec5c94978ccac9d5680e1e268d993dd1a6d25a91476f9e0992759d7e1f385f9f3a090d862f9bb949603 + languageName: node + linkType: hard + "@malept/flatpak-bundler@npm:^0.4.0": version: 0.4.0 resolution: "@malept/flatpak-bundler@npm:0.4.0" @@ -1715,6 +1782,16 @@ __metadata: languageName: node linkType: hard +"@npmcli/fs@npm:^2.1.0": + version: 2.1.2 + resolution: "@npmcli/fs@npm:2.1.2" + dependencies: + "@gar/promisify": "npm:^1.1.3" + semver: "npm:^7.3.5" + checksum: 10c0/c50d087733d0d8df23be24f700f104b19922a28677aa66fdbe06ff6af6431cc4a5bb1e27683cbc661a5dafa9bafdc603e6a0378121506dfcd394b2b6dd76a187 + languageName: node + linkType: hard + "@npmcli/fs@npm:^3.1.0": version: 3.1.1 resolution: "@npmcli/fs@npm:3.1.1" @@ -1734,6 +1811,16 @@ __metadata: languageName: node linkType: hard +"@npmcli/move-file@npm:^2.0.0": + version: 2.0.1 + resolution: "@npmcli/move-file@npm:2.0.1" + dependencies: + mkdirp: "npm:^1.0.4" + rimraf: "npm:^3.0.2" + checksum: 10c0/11b2151e6d1de6f6eb23128de5aa8a429fd9097d839a5190cb77aa47a6b627022c42d50fa7c47a00f1c9f8f0c1560092b09b061855d293fa0741a2a94cfb174d + languageName: node + linkType: hard + "@pkgjs/parseargs@npm:^0.11.0": version: 0.11.0 resolution: "@pkgjs/parseargs@npm:0.11.0" @@ -2740,6 +2827,7 @@ __metadata: "@electron-toolkit/preload": "npm:^3.0.0" "@electron-toolkit/tsconfig": "npm:^1.0.1" "@electron-toolkit/utils": "npm:^3.0.0" + "@electron/rebuild": "npm:^3.7.1" "@google/generative-ai": "npm:^0.21.0" "@hello-pangea/dnd": "npm:^16.6.0" "@kangfenmao/keyv-storage": "npm:^0.1.0" @@ -2749,6 +2837,7 @@ __metadata: "@llm-tools/embedjs-loader-markdown": "npm:^0.1.24" "@llm-tools/embedjs-loader-msoffice": "npm:^0.1.24" "@llm-tools/embedjs-loader-pdf": "npm:^0.1.24" + "@llm-tools/embedjs-loader-sitemap": "npm:^0.1.24" "@llm-tools/embedjs-loader-web": "npm:^0.1.24" "@llm-tools/embedjs-loader-xml": "npm:^0.1.24" "@llm-tools/embedjs-ollama": "npm:^0.1.24" @@ -2831,7 +2920,7 @@ __metadata: languageName: unknown linkType: soft -"abbrev@npm:1": +"abbrev@npm:1, abbrev@npm:^1.0.0": version: 1.1.1 resolution: "abbrev@npm:1.1.1" checksum: 10c0/3f762677702acb24f65e813070e306c61fafe25d4b2583f9dfc935131f774863f3addd5741572ed576bd69cabe473c5af18e1e108b829cb7b6b4747884f726e6 @@ -3502,7 +3591,7 @@ __metadata: languageName: node linkType: hard -"bl@npm:^4.0.3": +"bl@npm:^4.0.3, bl@npm:^4.1.0": version: 4.1.0 resolution: "bl@npm:4.1.0" dependencies: @@ -3747,6 +3836,32 @@ __metadata: languageName: node linkType: hard +"cacache@npm:^16.1.0": + version: 16.1.3 + resolution: "cacache@npm:16.1.3" + dependencies: + "@npmcli/fs": "npm:^2.1.0" + "@npmcli/move-file": "npm:^2.0.0" + chownr: "npm:^2.0.0" + fs-minipass: "npm:^2.1.0" + glob: "npm:^8.0.1" + infer-owner: "npm:^1.0.4" + lru-cache: "npm:^7.7.1" + minipass: "npm:^3.1.6" + minipass-collect: "npm:^1.0.2" + minipass-flush: "npm:^1.0.5" + minipass-pipeline: "npm:^1.2.4" + mkdirp: "npm:^1.0.4" + p-map: "npm:^4.0.0" + promise-inflight: "npm:^1.0.1" + rimraf: "npm:^3.0.2" + ssri: "npm:^9.0.0" + tar: "npm:^6.1.11" + unique-filename: "npm:^2.0.0" + checksum: 10c0/cdf6836e1c457d2a5616abcaf5d8240c0346b1f5bd6fdb8866b9d84b6dff0b54e973226dc11e0d099f35394213d24860d1989c8358d2a41b39eb912b3000e749 + languageName: node + linkType: hard + "cacache@npm:^18.0.0": version: 18.0.4 resolution: "cacache@npm:18.0.4" @@ -3909,7 +4024,7 @@ __metadata: languageName: node linkType: hard -"chalk@npm:^4.0.0, chalk@npm:^4.0.2, chalk@npm:^4.1.2": +"chalk@npm:^4.0.0, chalk@npm:^4.0.2, chalk@npm:^4.1.0, chalk@npm:^4.1.2": version: 4.1.2 resolution: "chalk@npm:4.1.2" dependencies: @@ -4015,6 +4130,22 @@ __metadata: languageName: node linkType: hard +"cli-cursor@npm:^3.1.0": + version: 3.1.0 + resolution: "cli-cursor@npm:3.1.0" + dependencies: + restore-cursor: "npm:^3.1.0" + checksum: 10c0/92a2f98ff9037d09be3dfe1f0d749664797fb674bf388375a2207a1203b69d41847abf16434203e0089212479e47a358b13a0222ab9fccfe8e2644a7ccebd111 + languageName: node + linkType: hard + +"cli-spinners@npm:^2.5.0": + version: 2.9.2 + resolution: "cli-spinners@npm:2.9.2" + checksum: 10c0/907a1c227ddf0d7a101e7ab8b300affc742ead4b4ebe920a5bf1bc6d45dce2958fcd195eb28fa25275062fe6fa9b109b93b63bc8033396ed3bcb50297008b3a3 + languageName: node + linkType: hard + "cli-truncate@npm:^2.1.0": version: 2.1.0 resolution: "cli-truncate@npm:2.1.0" @@ -4056,6 +4187,13 @@ __metadata: languageName: node linkType: hard +"clone@npm:^1.0.2": + version: 1.0.4 + resolution: "clone@npm:1.0.4" + checksum: 10c0/2176952b3649293473999a95d7bebfc9dc96410f6cbd3d2595cf12fd401f63a4bf41a7adbfd3ab2ff09ed60cb9870c58c6acdd18b87767366fabfc163700f13b + languageName: node + linkType: hard + "code-point-at@npm:^1.0.0": version: 1.1.0 resolution: "code-point-at@npm:1.1.0" @@ -4649,6 +4787,15 @@ __metadata: languageName: node linkType: hard +"defaults@npm:^1.0.3": + version: 1.0.4 + resolution: "defaults@npm:1.0.4" + dependencies: + clone: "npm:^1.0.2" + checksum: 10c0/9cfbe498f5c8ed733775db62dfd585780387d93c17477949e1670bfcfb9346e0281ce8c4bf9f4ac1fc0f9b851113bd6dc9e41182ea1644ccd97de639fa13c35a + languageName: node + linkType: hard + "defer-to-connect@npm:^2.0.0, defer-to-connect@npm:^2.0.1": version: 2.0.1 resolution: "defer-to-connect@npm:2.0.1" @@ -4715,7 +4862,7 @@ __metadata: languageName: node linkType: hard -"detect-libc@npm:^2.0.0": +"detect-libc@npm:^2.0.0, detect-libc@npm:^2.0.1": version: 2.0.3 resolution: "detect-libc@npm:2.0.3" checksum: 10c0/88095bda8f90220c95f162bf92cad70bd0e424913e655c20578600e35b91edc261af27531cf160a331e185c0ced93944bc7e09939143225f56312d7fd800fdb7 @@ -6156,7 +6303,7 @@ __metadata: languageName: node linkType: hard -"fs-minipass@npm:^2.0.0": +"fs-minipass@npm:^2.0.0, fs-minipass@npm:^2.1.0": version: 2.1.0 resolution: "fs-minipass@npm:2.1.0" dependencies: @@ -6387,6 +6534,19 @@ __metadata: languageName: node linkType: hard +"glob@npm:^8.0.1, glob@npm:^8.1.0": + version: 8.1.0 + resolution: "glob@npm:8.1.0" + dependencies: + fs.realpath: "npm:^1.0.0" + inflight: "npm:^1.0.4" + inherits: "npm:2" + minimatch: "npm:^5.0.1" + once: "npm:^1.3.0" + checksum: 10c0/cb0b5cab17a59c57299376abe5646c7070f8acb89df5595b492dba3bfb43d301a46c01e5695f01154e6553168207cb60d4eaf07d3be4bc3eb9b0457c5c561d0f + languageName: node + linkType: hard + "global-agent@npm:^3.0.0": version: 3.0.0 resolution: "global-agent@npm:3.0.0" @@ -6479,7 +6639,7 @@ __metadata: languageName: node linkType: hard -"got@npm:^11.8.5": +"got@npm:^11.7.0, got@npm:^11.8.0, got@npm:^11.8.5": version: 11.8.6 resolution: "got@npm:11.8.6" dependencies: @@ -7384,6 +7544,13 @@ __metadata: languageName: node linkType: hard +"is-gzip@npm:2.0.0": + version: 2.0.0 + resolution: "is-gzip@npm:2.0.0" + checksum: 10c0/80868d1c2e8a0cba249485bd8d99e98141366c2f5afa206ec6cdfc9b2393aa0c72b223ded82666e28e8d878f039fca7b19a1d0894c0eff30d330e27d1a2c9cde + languageName: node + linkType: hard + "is-hexadecimal@npm:^2.0.0": version: 2.0.1 resolution: "is-hexadecimal@npm:2.0.1" @@ -7391,6 +7558,13 @@ __metadata: languageName: node linkType: hard +"is-interactive@npm:^1.0.0": + version: 1.0.0 + resolution: "is-interactive@npm:1.0.0" + checksum: 10c0/dd47904dbf286cd20aa58c5192161be1a67138485b9836d5a70433b21a45442e9611b8498b8ab1f839fc962c7620667a50535fdfb4a6bc7989b8858645c06b4d + languageName: node + linkType: hard + "is-lambda@npm:^1.0.1": version: 1.0.1 resolution: "is-lambda@npm:1.0.1" @@ -7537,6 +7711,13 @@ __metadata: languageName: node linkType: hard +"is-unicode-supported@npm:^0.1.0": + version: 0.1.0 + resolution: "is-unicode-supported@npm:0.1.0" + checksum: 10c0/00cbe3455c3756be68d2542c416cab888aebd5012781d6819749fefb15162ff23e38501fe681b3d751c73e8ff561ac09a5293eba6f58fdf0178462ce6dcb3453 + languageName: node + linkType: hard + "is-utf8@npm:^0.2.0": version: 0.2.1 resolution: "is-utf8@npm:0.2.1" @@ -8194,6 +8375,16 @@ __metadata: languageName: node linkType: hard +"log-symbols@npm:^4.1.0": + version: 4.1.0 + resolution: "log-symbols@npm:4.1.0" + dependencies: + chalk: "npm:^4.1.0" + is-unicode-supported: "npm:^0.1.0" + checksum: 10c0/67f445a9ffa76db1989d0fa98586e5bc2fd5247260dafb8ad93d9f0ccd5896d53fb830b0e54dade5ad838b9de2006c826831a3c528913093af20dff8bd24aca6 + languageName: node + linkType: hard + "longest-streak@npm:^3.0.0": version: 3.1.0 resolution: "longest-streak@npm:3.1.0" @@ -8262,6 +8453,13 @@ __metadata: languageName: node linkType: hard +"lru-cache@npm:^7.7.1": + version: 7.18.3 + resolution: "lru-cache@npm:7.18.3" + checksum: 10c0/b3a452b491433db885beed95041eb104c157ef7794b9c9b4d647be503be91769d11206bb573849a16b4cc0d03cbd15ffd22df7960997788b74c1d399ac7a4fed + languageName: node + linkType: hard + "magic-string@npm:^0.30.10": version: 0.30.11 resolution: "magic-string@npm:0.30.11" @@ -8280,6 +8478,30 @@ __metadata: languageName: node linkType: hard +"make-fetch-happen@npm:^10.2.1": + version: 10.2.1 + resolution: "make-fetch-happen@npm:10.2.1" + dependencies: + agentkeepalive: "npm:^4.2.1" + cacache: "npm:^16.1.0" + http-cache-semantics: "npm:^4.1.0" + http-proxy-agent: "npm:^5.0.0" + https-proxy-agent: "npm:^5.0.0" + is-lambda: "npm:^1.0.1" + lru-cache: "npm:^7.7.1" + minipass: "npm:^3.1.6" + minipass-collect: "npm:^1.0.2" + minipass-fetch: "npm:^2.0.3" + minipass-flush: "npm:^1.0.5" + minipass-pipeline: "npm:^1.2.4" + negotiator: "npm:^0.6.3" + promise-retry: "npm:^2.0.1" + socks-proxy-agent: "npm:^7.0.0" + ssri: "npm:^9.0.0" + checksum: 10c0/28ec392f63ab93511f400839dcee83107eeecfaad737d1e8487ea08b4332cd89a8f3319584222edd9f6f1d0833cf516691469496d46491863f9e88c658013949 + languageName: node + linkType: hard + "make-fetch-happen@npm:^13.0.0": version: 13.0.1 resolution: "make-fetch-happen@npm:13.0.1" @@ -9259,6 +9481,21 @@ __metadata: languageName: node linkType: hard +"minipass-fetch@npm:^2.0.3": + version: 2.1.2 + resolution: "minipass-fetch@npm:2.1.2" + dependencies: + encoding: "npm:^0.1.13" + minipass: "npm:^3.1.6" + minipass-sized: "npm:^1.0.3" + minizlib: "npm:^2.1.2" + dependenciesMeta: + encoding: + optional: true + checksum: 10c0/33ab2c5bdb3d91b9cb8bc6ae42d7418f4f00f7f7beae14b3bb21ea18f9224e792f560a6e17b6f1be12bbeb70dbe99a269f4204c60e5d99130a0777b153505c43 + languageName: node + linkType: hard + "minipass-fetch@npm:^3.0.0": version: 3.0.5 resolution: "minipass-fetch@npm:3.0.5" @@ -9301,7 +9538,7 @@ __metadata: languageName: node linkType: hard -"minipass@npm:^3.0.0, minipass@npm:^3.1.0, minipass@npm:^3.1.1, minipass@npm:^3.1.3": +"minipass@npm:^3.0.0, minipass@npm:^3.1.0, minipass@npm:^3.1.1, minipass@npm:^3.1.3, minipass@npm:^3.1.6": version: 3.3.6 resolution: "minipass@npm:3.3.6" dependencies: @@ -9451,7 +9688,7 @@ __metadata: languageName: node linkType: hard -"node-abi@npm:^3.3.0": +"node-abi@npm:^3.3.0, node-abi@npm:^3.45.0": version: 3.71.0 resolution: "node-abi@npm:3.71.0" dependencies: @@ -9478,6 +9715,15 @@ __metadata: languageName: node linkType: hard +"node-api-version@npm:^0.2.0": + version: 0.2.0 + resolution: "node-api-version@npm:0.2.0" + dependencies: + semver: "npm:^7.3.5" + checksum: 10c0/a5bdc7559237d2acebadc9ac0f29dd1279726e4226a8b3256ea605f6ad4a5c48528a2b6684d09237d33f0b714a95573d7f14a2a628642d31e05c79395e2c7873 + languageName: node + linkType: hard + "node-domexception@npm:1.0.0": version: 1.0.0 resolution: "node-domexception@npm:1.0.0" @@ -9564,6 +9810,17 @@ __metadata: languageName: node linkType: hard +"nopt@npm:^6.0.0": + version: 6.0.0 + resolution: "nopt@npm:6.0.0" + dependencies: + abbrev: "npm:^1.0.0" + bin: + nopt: bin/nopt.js + checksum: 10c0/837b52c330df16fcaad816b1f54fec6b2854ab1aa771d935c1603fbcf9b023bb073f1466b1b67f48ea4dce127ae675b85b9d9355700e9b109de39db490919786 + languageName: node + linkType: hard + "nopt@npm:^7.0.0": version: 7.2.1 resolution: "nopt@npm:7.2.1" @@ -9758,7 +10015,7 @@ __metadata: languageName: node linkType: hard -"onetime@npm:^5.1.2": +"onetime@npm:^5.1.0, onetime@npm:^5.1.2": version: 5.1.2 resolution: "onetime@npm:5.1.2" dependencies: @@ -9879,6 +10136,23 @@ __metadata: languageName: node linkType: hard +"ora@npm:^5.1.0": + version: 5.4.1 + resolution: "ora@npm:5.4.1" + dependencies: + bl: "npm:^4.1.0" + chalk: "npm:^4.1.0" + cli-cursor: "npm:^3.1.0" + cli-spinners: "npm:^2.5.0" + is-interactive: "npm:^1.0.0" + is-unicode-supported: "npm:^0.1.0" + log-symbols: "npm:^4.1.0" + strip-ansi: "npm:^6.0.0" + wcwidth: "npm:^1.0.1" + checksum: 10c0/10ff14aace236d0e2f044193362b22edce4784add08b779eccc8f8ef97195cae1248db8ec1ec5f5ff076f91acbe573f5f42a98c19b78dba8c54eefff983cae85 + languageName: node + linkType: hard + "os-locale@npm:^1.4.0": version: 1.4.0 resolution: "os-locale@npm:1.4.0" @@ -9918,7 +10192,7 @@ __metadata: languageName: node linkType: hard -"p-limit@npm:^3.0.2": +"p-limit@npm:^3.0.2, p-limit@npm:^3.1.0": version: 3.1.0 resolution: "p-limit@npm:3.1.0" dependencies: @@ -10436,6 +10710,13 @@ __metadata: languageName: node linkType: hard +"proc-log@npm:^2.0.1": + version: 2.0.1 + resolution: "proc-log@npm:2.0.1" + checksum: 10c0/701c501429775ce34cec28ef6a1c976537274b42917212fb8a5975ebcecb0a85612907fd7f99ff28ff4c2112bb84a0f4322fc9b9e1e52a8562fcbb1d5b3ce608 + languageName: node + linkType: hard + "proc-log@npm:^4.1.0, proc-log@npm:^4.2.0": version: 4.2.0 resolution: "proc-log@npm:4.2.0" @@ -11314,6 +11595,17 @@ __metadata: languageName: node linkType: hard +"read-binary-file-arch@npm:^1.0.6": + version: 1.0.6 + resolution: "read-binary-file-arch@npm:1.0.6" + dependencies: + debug: "npm:^4.3.4" + bin: + read-binary-file-arch: cli.js + checksum: 10c0/7665cb4ec61da1f4da7ba6c0fb64f53f6e739373d427dd0e1c4d19f240b3ebff0f596377c01e290a6370f611899b82df09edafa758200bf31216d855e3230058 + languageName: node + linkType: hard + "read-config-file@npm:6.3.2": version: 6.3.2 resolution: "read-config-file@npm:6.3.2" @@ -11749,6 +12041,16 @@ __metadata: languageName: node linkType: hard +"restore-cursor@npm:^3.1.0": + version: 3.1.0 + resolution: "restore-cursor@npm:3.1.0" + dependencies: + onetime: "npm:^5.1.0" + signal-exit: "npm:^3.0.2" + checksum: 10c0/8051a371d6aa67ff21625fa94e2357bd81ffdc96267f3fb0fc4aaf4534028343836548ef34c240ffa8c25b280ca35eb36be00b3cb2133fa4f51896d7e73c6b4f + languageName: node + linkType: hard + "retry@npm:^0.12.0": version: 0.12.0 resolution: "retry@npm:0.12.0" @@ -12145,7 +12447,7 @@ __metadata: languageName: node linkType: hard -"signal-exit@npm:^3.0.7": +"signal-exit@npm:^3.0.2, signal-exit@npm:^3.0.7": version: 3.0.7 resolution: "signal-exit@npm:3.0.7" checksum: 10c0/25d272fa73e146048565e08f3309d5b942c1979a6f4a58a8c59d5fa299728e9c2fcd1a759ec870863b1fd38653670240cd420dad2ad9330c71f36608a6a1c912 @@ -12186,6 +12488,18 @@ __metadata: languageName: node linkType: hard +"sitemapper@npm:^3.2.18": + version: 3.2.18 + resolution: "sitemapper@npm:3.2.18" + dependencies: + fast-xml-parser: "npm:^4.5.0" + got: "npm:^11.8.0" + is-gzip: "npm:2.0.0" + p-limit: "npm:^3.1.0" + checksum: 10c0/d23b0bb067a182313598494def92c8839f12ead34952a45d60afb7b5dd458e4b363892b1809cb8a99a8c358448cd0e18b2da9e9bed1289a7fbcda7a8f54971ec + languageName: node + linkType: hard + "slash@npm:^3.0.0": version: 3.0.0 resolution: "slash@npm:3.0.0" @@ -12222,6 +12536,17 @@ __metadata: languageName: node linkType: hard +"socks-proxy-agent@npm:^7.0.0": + version: 7.0.0 + resolution: "socks-proxy-agent@npm:7.0.0" + dependencies: + agent-base: "npm:^6.0.2" + debug: "npm:^4.3.3" + socks: "npm:^2.6.2" + checksum: 10c0/b859f7eb8e96ec2c4186beea233ae59c02404094f3eb009946836af27d6e5c1627d1975a69b4d2e20611729ed543b6db3ae8481eb38603433c50d0345c987600 + languageName: node + linkType: hard + "socks-proxy-agent@npm:^8.0.3": version: 8.0.4 resolution: "socks-proxy-agent@npm:8.0.4" @@ -12395,6 +12720,15 @@ __metadata: languageName: node linkType: hard +"ssri@npm:^9.0.0": + version: 9.0.1 + resolution: "ssri@npm:9.0.1" + dependencies: + minipass: "npm:^3.1.1" + checksum: 10c0/c5d153ce03b5980d683ecaa4d805f6a03d8dc545736213803e168a1907650c46c08a4e5ce6d670a0205482b35c35713d9d286d9133bdd79853a406e22ad81f04 + languageName: node + linkType: hard + "stat-mode@npm:^1.0.0": version: 1.0.0 resolution: "stat-mode@npm:1.0.0" @@ -12798,7 +13132,7 @@ __metadata: languageName: node linkType: hard -"tar@npm:^6.0.2, tar@npm:^6.1.11, tar@npm:^6.1.12, tar@npm:^6.1.2, tar@npm:^6.2.1": +"tar@npm:^6.0.2, tar@npm:^6.0.5, tar@npm:^6.1.11, tar@npm:^6.1.12, tar@npm:^6.1.2, tar@npm:^6.2.1": version: 6.2.1 resolution: "tar@npm:6.2.1" dependencies: @@ -13280,6 +13614,15 @@ __metadata: languageName: node linkType: hard +"unique-filename@npm:^2.0.0": + version: 2.0.1 + resolution: "unique-filename@npm:2.0.1" + dependencies: + unique-slug: "npm:^3.0.0" + checksum: 10c0/55d95cd670c4a86117ebc34d394936d712d43b56db6bc511f9ca00f666373818bf9f075fb0ab76bcbfaf134592ef26bb75aad20786c1ff1ceba4457eaba90fb8 + languageName: node + linkType: hard + "unique-filename@npm:^3.0.0": version: 3.0.0 resolution: "unique-filename@npm:3.0.0" @@ -13298,6 +13641,15 @@ __metadata: languageName: node linkType: hard +"unique-slug@npm:^3.0.0": + version: 3.0.0 + resolution: "unique-slug@npm:3.0.0" + dependencies: + imurmurhash: "npm:^0.1.4" + checksum: 10c0/617240eb921af803b47d322d75a71a363dacf2e56c29ae5d1404fad85f64f4ec81ef10ee4fd79215d0202cbe1e5a653edb0558d59c9c81d3bd538c2d58e4c026 + languageName: node + linkType: hard + "unique-slug@npm:^4.0.0": version: 4.0.0 resolution: "unique-slug@npm:4.0.0" @@ -13684,6 +14036,15 @@ __metadata: languageName: node linkType: hard +"wcwidth@npm:^1.0.1": + version: 1.0.1 + resolution: "wcwidth@npm:1.0.1" + dependencies: + defaults: "npm:^1.0.3" + checksum: 10c0/5b61ca583a95e2dd85d7078400190efd452e05751a64accb8c06ce4db65d7e0b0cde9917d705e826a2e05cc2548f61efde115ffa374c3e436d04be45c889e5b4 + languageName: node + linkType: hard + "web-namespaces@npm:^2.0.0": version: 2.0.1 resolution: "web-namespaces@npm:2.0.1" @@ -14140,7 +14501,7 @@ __metadata: languageName: node linkType: hard -"yargs@npm:^17.6.2": +"yargs@npm:^17.0.1, yargs@npm:^17.6.2": version: 17.7.2 resolution: "yargs@npm:17.7.2" dependencies: