Skip to content

Commit

Permalink
chore(version): 0.9.11
Browse files Browse the repository at this point in the history
  • Loading branch information
kangfenmao committed Jan 19, 2025
1 parent 88cc783 commit 63673ec
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 121 deletions.
9 changes: 6 additions & 3 deletions electron-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ afterPack: scripts/after-pack.js
afterSign: scripts/notarize.js
releaseInfo:
releaseNotes: |
添加模型提及功能,支持多个模型一起回答 @teojs
增加 QweLM 服务提供商 @Nana7mi1
修复删除服务商导致的数据错误白屏问题
新增快捷助手弹窗
翻译默认使用流输出
小程序弹窗顶部增加固定按钮 @ousugo
Gemini 安全设置更新 @magicdmer
智能体页面性能优化 @magicdmer
修复 WebDAV 不能自动备份问题
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "CherryStudio",
"version": "0.9.10",
"version": "0.9.11",
"private": true,
"description": "A powerful AI assistant for producer.",
"main": "./out/main/index.js",
Expand Down Expand Up @@ -85,15 +85,13 @@
"@kangfenmao/keyv-storage": "^0.1.0",
"@reduxjs/toolkit": "^2.2.5",
"@types/adm-zip": "^0",
"@types/ffi-napi": "^4",
"@types/fs-extra": "^11",
"@types/lodash": "^4.17.5",
"@types/markdown-it": "^14",
"@types/node": "^18.19.9",
"@types/react": "^18.2.48",
"@types/react-dom": "^18.2.18",
"@types/react-infinite-scroll-component": "^5.0.0",
"@types/ref-napi": "^3",
"@types/tinycolor2": "^1",
"@vitejs/plugin-react": "^4.2.1",
"antd": "^5.22.5",
Expand Down
5 changes: 4 additions & 1 deletion src/renderer/src/context/ThemeProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { isMac } from '@renderer/config/constant'
import { useSettings } from '@renderer/hooks/useSettings'
import { ThemeMode } from '@renderer/types'
import { isMiniWindow } from '@renderer/utils'
import React, { createContext, PropsWithChildren, useContext, useEffect, useState } from 'react'

interface ThemeContextType {
Expand Down Expand Up @@ -39,7 +40,9 @@ export const ThemeProvider: React.FC<ThemeProviderProps> = ({ children, defaultT

useEffect(() => {
document.body.setAttribute('theme-mode', _theme)
window.api?.setTheme(_theme === ThemeMode.dark ? 'dark' : 'light')
if (!isMiniWindow()) {
window.api?.setTheme(_theme === ThemeMode.dark ? 'dark' : 'light')
}
}, [_theme])

useEffect(() => {
Expand Down
3 changes: 2 additions & 1 deletion src/renderer/src/pages/settings/QuickAssistantSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { SettingContainer, SettingDivider, SettingGroup, SettingRow, SettingRowT
const QuickAssistantSettings: FC = () => {
const { t } = useTranslation()
const { theme } = useTheme()
const { enableQuickAssistant, clickTrayToShowQuickAssistant, tray, setTray } = useSettings()
const { enableQuickAssistant, clickTrayToShowQuickAssistant, setTray } = useSettings()
const dispatch = useAppDispatch()

const handleEnableQuickAssistant = async (enable: boolean) => {
Expand Down Expand Up @@ -84,6 +84,7 @@ const AssistantContainer = styled.div`
border-radius: 10px;
border: 0.5px solid var(--color-border);
margin: 0 auto;
overflow: hidden;
`

export default QuickAssistantSettings
4 changes: 4 additions & 0 deletions src/renderer/src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -381,4 +381,8 @@ export const compareVersions = (v1: string, v2: string): number => {
return 0
}

export function isMiniWindow() {
return window.location.hash === '#/mini'
}

export { classNames }
3 changes: 2 additions & 1 deletion src/renderer/src/windows/mini/chat/components/Message.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import MessageErrorBoundary from '@renderer/pages/home/Messages/MessageErrorBoun
import { fetchChatCompletion } from '@renderer/services/ApiService'
import { getDefaultAssistant, getDefaultModel } from '@renderer/services/AssistantService'
import { Message } from '@renderer/types'
import { isMiniWindow } from '@renderer/utils'
import { Dispatch, FC, memo, SetStateAction, useEffect, useMemo, useRef, useState } from 'react'
import styled from 'styled-components'

Expand Down Expand Up @@ -36,7 +37,7 @@ const MessageItem: FC<Props> = ({ message: _message, index, total, route, onSetM

const messageBackground = getMessageBackground(true, isAssistantMessage)

const maxWidth = window.location.hash === '#/mini' ? '480px' : '100%'
const maxWidth = isMiniWindow() ? '480px' : '100%'

useEffect(() => {
if (onGetMessages && onSetMessages) {
Expand Down
112 changes: 0 additions & 112 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2495,17 +2495,6 @@ __metadata:
languageName: node
linkType: hard

"@types/ffi-napi@npm:^4":
version: 4.0.10
resolution: "@types/ffi-napi@npm:4.0.10"
dependencies:
"@types/node": "npm:*"
"@types/ref-napi": "npm:*"
"@types/ref-struct-di": "npm:*"
checksum: 10c0/309e4659676ea978c76ebd336935f7d7481343e982c0a6e93e5cae09ffd45530171ea1bc5832cf21a3358828e7d96d32ccb436785abb34dcbba6ecfbcc0d3f30
languageName: node
linkType: hard

"@types/fs-extra@npm:9.0.13, @types/fs-extra@npm:^9.0.11":
version: 9.0.13
resolution: "@types/fs-extra@npm:9.0.13"
Expand Down Expand Up @@ -2735,24 +2724,6 @@ __metadata:
languageName: node
linkType: hard

"@types/ref-napi@npm:*, @types/ref-napi@npm:^3":
version: 3.0.12
resolution: "@types/ref-napi@npm:3.0.12"
dependencies:
"@types/node": "npm:*"
checksum: 10c0/d60c3e07aa908c97fdf3ea958264ca0f88d080467c045f423d7dda43d475b35e7a5798b108ddfbce7ced04a70d9787acf99991e251c6f8c0556be6e71c0e02b8
languageName: node
linkType: hard

"@types/ref-struct-di@npm:*":
version: 1.1.12
resolution: "@types/ref-struct-di@npm:1.1.12"
dependencies:
"@types/ref-napi": "npm:*"
checksum: 10c0/c52043a067fd419b30ebbfe794cad9e44606a100a31aa4d094effc121a7c30ce654dd287809f57b289f0622fb642b916a9d90b559f7f721e21c322075ce149c1
languageName: node
linkType: hard

"@types/responselike@npm:^1.0.0":
version: 1.0.3
resolution: "@types/responselike@npm:1.0.3"
Expand Down Expand Up @@ -3028,15 +2999,13 @@ __metadata:
"@llm-tools/embedjs-openai": "npm:^0.1.25"
"@reduxjs/toolkit": "npm:^2.2.5"
"@types/adm-zip": "npm:^0"
"@types/ffi-napi": "npm:^4"
"@types/fs-extra": "npm:^11"
"@types/lodash": "npm:^4.17.5"
"@types/markdown-it": "npm:^14"
"@types/node": "npm:^18.19.9"
"@types/react": "npm:^18.2.48"
"@types/react-dom": "npm:^18.2.18"
"@types/react-infinite-scroll-component": "npm:^5.0.0"
"@types/ref-napi": "npm:^3"
"@types/tinycolor2": "npm:^1"
"@vitejs/plugin-react": "npm:^4.2.1"
adm-zip: "npm:^0.5.16"
Expand Down Expand Up @@ -3066,7 +3035,6 @@ __metadata:
eslint-plugin-react-hooks: "npm:^4.6.2"
eslint-plugin-simple-import-sort: "npm:^12.1.1"
eslint-plugin-unused-imports: "npm:^4.0.0"
ffi-napi: "npm:^4.0.3"
fs-extra: "npm:^11.2.0"
html2canvas: "npm:^1.4.1"
i18next: "npm:^23.11.5"
Expand All @@ -3088,7 +3056,6 @@ __metadata:
react-spinners: "npm:^0.14.1"
redux: "npm:^5.0.1"
redux-persist: "npm:^6.0.0"
ref-napi: "npm:^3.0.3"
rehype-katex: "npm:^7.0.1"
rehype-mathjax: "npm:^6.0.0"
rehype-raw: "npm:^7.0.0"
Expand All @@ -3107,11 +3074,6 @@ __metadata:
peerDependencies:
react: ^17.0.0 || ^18.0.0
react-dom: ^17.0.0 || ^18.0.0
dependenciesMeta:
ffi-napi:
optional: true
ref-napi:
optional: true
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -6144,21 +6106,6 @@ __metadata:
languageName: node
linkType: hard

"ffi-napi@npm:^4.0.3":
version: 4.0.3
resolution: "ffi-napi@npm:4.0.3"
dependencies:
debug: "npm:^4.1.1"
get-uv-event-loop-napi-h: "npm:^1.0.5"
node-addon-api: "npm:^3.0.0"
node-gyp: "npm:latest"
node-gyp-build: "npm:^4.2.1"
ref-napi: "npm:^2.0.1 || ^3.0.2"
ref-struct-di: "npm:^1.1.0"
checksum: 10c0/03a81bc228da1fa4f65431a3a54cf8e0367f9be45173ffd3085f13ec44b7bb9124b703535aa0b49955207f083daca86795759d6513db1605d1ed868c76d199de
languageName: node
linkType: hard

"fflate@npm:0.8.1":
version: 0.8.1
resolution: "fflate@npm:0.8.1"
Expand Down Expand Up @@ -6652,22 +6599,6 @@ __metadata:
languageName: node
linkType: hard

"get-symbol-from-current-process-h@npm:^1.0.1, get-symbol-from-current-process-h@npm:^1.0.2":
version: 1.0.2
resolution: "get-symbol-from-current-process-h@npm:1.0.2"
checksum: 10c0/f33109e08aef7029b16f18032dce669e92efb21992946d7b575e494f32907c3d2c353685e00398b9202c332aab140e444e9333c93f2b81aa662bde3f59e3a25a
languageName: node
linkType: hard

"get-uv-event-loop-napi-h@npm:^1.0.5":
version: 1.0.6
resolution: "get-uv-event-loop-napi-h@npm:1.0.6"
dependencies:
get-symbol-from-current-process-h: "npm:^1.0.1"
checksum: 10c0/beb601c7e4b74fec51fb33df452a214943a1453bac9e3ca66b98fabb9ac9371f07b53d43b163a20b69228003eaf61a84b9b3faf692ed896ef66d84970411d5e0
languageName: node
linkType: hard

"getpass@npm:^0.1.1":
version: 0.1.7
resolution: "getpass@npm:0.1.7"
Expand Down Expand Up @@ -9877,15 +9808,6 @@ __metadata:
languageName: node
linkType: hard

"node-addon-api@npm:^3.0.0":
version: 3.2.1
resolution: "node-addon-api@npm:3.2.1"
dependencies:
node-gyp: "npm:latest"
checksum: 10c0/41f21c9d12318875a2c429befd06070ce367065a3ef02952cfd4ea17ef69fa14012732f510b82b226e99c254da8d671847ea018cad785f839a5366e02dd56302
languageName: node
linkType: hard

"node-addon-api@npm:^7.0.0":
version: 7.1.1
resolution: "node-addon-api@npm:7.1.1"
Expand Down Expand Up @@ -9934,17 +9856,6 @@ __metadata:
languageName: node
linkType: hard

"node-gyp-build@npm:^4.2.1":
version: 4.8.4
resolution: "node-gyp-build@npm:4.8.4"
bin:
node-gyp-build: bin.js
node-gyp-build-optional: optional.js
node-gyp-build-test: build-test.js
checksum: 10c0/444e189907ece2081fe60e75368784f7782cfddb554b60123743dfb89509df89f1f29c03bbfa16b3a3e0be3f48799a4783f487da6203245fa5bed239ba7407e1
languageName: node
linkType: hard

"node-gyp@npm:8.x":
version: 8.4.1
resolution: "node-gyp@npm:8.4.1"
Expand Down Expand Up @@ -11887,29 +11798,6 @@ __metadata:
languageName: node
linkType: hard

"ref-napi@npm:^2.0.1 || ^3.0.2, ref-napi@npm:^3.0.3":
version: 3.0.3
resolution: "ref-napi@npm:3.0.3"
dependencies:
debug: "npm:^4.1.1"
get-symbol-from-current-process-h: "npm:^1.0.2"
node-addon-api: "npm:^3.0.0"
node-gyp: "npm:latest"
node-gyp-build: "npm:^4.2.1"
checksum: 10c0/03768cfe6134061c4afe8c5da6cc03ced9763ad1b8401895df2c5f6b10211dfd2bbcf31cca256e2abe9f2d4ddf08333590a6589b2ec5e68efacf70de2c0e2d7b
languageName: node
linkType: hard

"ref-struct-di@npm:^1.1.0":
version: 1.1.1
resolution: "ref-struct-di@npm:1.1.1"
dependencies:
debug: "npm:^3.1.0"
node-gyp: "npm:latest"
checksum: 10c0/e456f4b228647d06af1c911bd3f90fd85f7b9d88aa9707e10fa2879fee92d2e7a3035ca819cb30b0bdc1b32751a628308229204b00a0fb3b0e93b002dcef9835
languageName: node
linkType: hard

"reflect.getprototypeof@npm:^1.0.6, reflect.getprototypeof@npm:^1.0.9":
version: 1.0.10
resolution: "reflect.getprototypeof@npm:1.0.10"
Expand Down

0 comments on commit 63673ec

Please sign in to comment.