mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-24 18:50:56 +08:00
chore(release): increase Node.js memory limit in release workflow
- Added NODE_OPTIONS to set max-old-space-size to 8192 in the release workflow for Mac, Windows, and Linux builds.
This commit is contained in:
parent
a8ddc1467a
commit
97257839de
3
.github/workflows/release.yml
vendored
3
.github/workflows/release.yml
vendored
@ -76,6 +76,7 @@ jobs:
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
RENDERER_VITE_AIHUBMIX_SECRET: ${{ vars.RENDERER_VITE_AIHUBMIX_SECRET }}
|
||||
NODE_OPTIONS: --max-old-space-size=8192
|
||||
|
||||
- name: Build Mac
|
||||
if: matrix.os == 'macos-latest'
|
||||
@ -91,6 +92,7 @@ jobs:
|
||||
APPLE_TEAM_ID: ${{ vars.APPLE_TEAM_ID }}
|
||||
RENDERER_VITE_AIHUBMIX_SECRET: ${{ vars.RENDERER_VITE_AIHUBMIX_SECRET }}
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
NODE_OPTIONS: --max-old-space-size=8192
|
||||
|
||||
- name: Build Windows
|
||||
if: matrix.os == 'windows-latest'
|
||||
@ -100,6 +102,7 @@ jobs:
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
RENDERER_VITE_AIHUBMIX_SECRET: ${{ vars.RENDERER_VITE_AIHUBMIX_SECRET }}
|
||||
NODE_OPTIONS: --max-old-space-size=8192
|
||||
|
||||
- name: Release
|
||||
uses: ncipollo/release-action@v1
|
||||
|
||||
@ -131,11 +131,10 @@ export const processKnowledgeSearch = async (
|
||||
|
||||
const searchResults = Array.from(
|
||||
new Map(allSearchResults.flat().map((item) => [item.metadata.uniqueId || item.pageContent, item])).values()
|
||||
)
|
||||
.sort((a, b) => b.score - a.score)
|
||||
.slice(0, documentCount)
|
||||
).sort((a, b) => b.score - a.score)
|
||||
|
||||
console.log(`Knowledge base ${base.name} search results:`, searchResults)
|
||||
|
||||
let rerankResults = searchResults
|
||||
if (base.rerankModel && searchResults.length > 0) {
|
||||
rerankResults = await window.api.knowledgeBase.rerank({
|
||||
@ -145,6 +144,10 @@ export const processKnowledgeSearch = async (
|
||||
})
|
||||
}
|
||||
|
||||
if (rerankResults.length > 0) {
|
||||
rerankResults = rerankResults.slice(0, documentCount)
|
||||
}
|
||||
|
||||
const processdResults = await Promise.all(
|
||||
rerankResults.map(async (item) => {
|
||||
const file = await getFileFromUrl(item.metadata.source)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user