Skip to content

Commit

Permalink
chore(version): 0.8.26
Browse files Browse the repository at this point in the history
  • Loading branch information
kangfenmao committed Dec 15, 2024
1 parent 7d561db commit ab99a7b
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 22 deletions.
5 changes: 1 addition & 4 deletions electron-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,4 @@ electronDownload:
afterSign: scripts/notarize.js
releaseInfo:
releaseNotes: |
修复对话消息无法删除问题
支持 Gemini 模型联网搜索
发送消息增加 Command + Enter 快捷键 by @duanyongcheng
Windows 版本样式优化
修复部分场景下应用崩溃问题
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "CherryStudio",
"version": "0.8.25",
"version": "0.8.26",
"private": true,
"description": "A powerful AI assistant for producer.",
"main": "./out/main/index.js",
Expand Down Expand Up @@ -76,7 +76,7 @@
"dexie": "^4.0.8",
"dexie-react-hooks": "^1.1.7",
"dotenv-cli": "^7.4.2",
"electron": "^33.2.1",
"electron": "31.7.6",
"electron-builder": "^24.13.3",
"electron-devtools-installer": "^3.2.0",
"electron-icon-builder": "^2.0.1",
Expand Down
54 changes: 43 additions & 11 deletions scripts/replaceSpaces.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,54 @@ const path = require('path')

const directory = 'dist'

fs.readdir(directory, (err, files) => {
if (err) throw err
// 处理文件名中的空格
function replaceFileNames() {
fs.readdir(directory, (err, files) => {
if (err) throw err

files.forEach((file) => {
const oldPath = path.join(directory, file)
const newPath = path.join(directory, file.replace(/ /g, '-'))
files.forEach((file) => {
const oldPath = path.join(directory, file)
const newPath = path.join(directory, file.replace(/ /g, '-'))

fs.stat(oldPath, (err, stats) => {
if (err) throw err
fs.stat(oldPath, (err, stats) => {
if (err) throw err

if (stats.isFile() && oldPath !== newPath) {
fs.rename(oldPath, newPath, (err) => {
if (stats.isFile() && oldPath !== newPath) {
fs.rename(oldPath, newPath, (err) => {
if (err) throw err
console.log(`Renamed: ${oldPath} -> ${newPath}`)
})
}
})
})
})
}

function replaceYmlContent() {
fs.readdir(directory, (err, files) => {
if (err) throw err

files.forEach((file) => {
if (path.extname(file).toLowerCase() === '.yml') {
const filePath = path.join(directory, file)

fs.readFile(filePath, 'utf8', (err, data) => {
if (err) throw err
console.log(`Renamed: ${oldPath} -> ${newPath}`)

// 替换内容
const newContent = data.replace(/Cherry Studio-/g, 'Cherry-Studio-')

// 写回文件
fs.writeFile(filePath, newContent, 'utf8', (err) => {
if (err) throw err
console.log(`Updated content in: ${filePath}`)
})
})
}
})
})
})
}

// 执行两个操作
replaceFileNames()
replaceYmlContent()
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2355,7 +2355,7 @@ __metadata:
dexie-react-hooks: "npm:^1.1.7"
docx: "npm:^9.0.2"
dotenv-cli: "npm:^7.4.2"
electron: "npm:^33.2.1"
electron: "npm:31.7.6"
electron-builder: "npm:^24.13.3"
electron-devtools-installer: "npm:^3.2.0"
electron-icon-builder: "npm:^2.0.1"
Expand Down Expand Up @@ -4452,16 +4452,16 @@ __metadata:
languageName: node
linkType: hard

"electron@npm:^33.2.1":
version: 33.3.0
resolution: "electron@npm:33.3.0"
"electron@npm:31.7.6":
version: 31.7.6
resolution: "electron@npm:31.7.6"
dependencies:
"@electron/get": "npm:^2.0.0"
"@types/node": "npm:^20.9.0"
extract-zip: "npm:^2.0.1"
bin:
electron: cli.js
checksum: 10c0/ce381fb63da60b52b131aea473568aad2bff58cc3d8fd6fc68b4d0c0d5485e381e1a576727477ce901f4bd017baaa9e66f3f04da6ff698229343193258a8d38e
checksum: 10c0/4b7ee31894eb3606d6a6047cd7af22d3b82331dacb96869c483bfd32ffc8581ef638ccfa027938d83d5242e7bf8b7856cad29a09fb80942a25ef3de0c888fb48
languageName: node
linkType: hard

Expand Down

0 comments on commit ab99a7b

Please sign in to comment.