fix: update installing status immediately (#8339)

This commit is contained in:
Konv Suu 2025-07-21 12:44:00 +08:00 committed by GitHub
parent a44a986ace
commit 8967a82107
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -42,8 +42,8 @@ const InstallNpxUv: FC<Props> = ({ mini = false }) => {
try { try {
setIsInstallingUv(true) setIsInstallingUv(true)
await window.api.installUVBinary() await window.api.installUVBinary()
setIsUvInstalled(true)
setIsInstallingUv(false) setIsInstallingUv(false)
dispatch(setIsUvInstalled(true))
} catch (error: any) { } catch (error: any) {
window.message.error({ content: `${t('settings.mcp.installError')}: ${error.message}`, key: 'mcp-install-error' }) window.message.error({ content: `${t('settings.mcp.installError')}: ${error.message}`, key: 'mcp-install-error' })
setIsInstallingUv(false) setIsInstallingUv(false)
@ -55,8 +55,8 @@ const InstallNpxUv: FC<Props> = ({ mini = false }) => {
try { try {
setIsInstallingBun(true) setIsInstallingBun(true)
await window.api.installBunBinary() await window.api.installBunBinary()
setIsBunInstalled(true)
setIsInstallingBun(false) setIsInstallingBun(false)
dispatch(setIsBunInstalled(true))
} catch (error: any) { } catch (error: any) {
window.message.error({ window.message.error({
content: `${t('settings.mcp.installError')}: ${error.message}`, content: `${t('settings.mcp.installError')}: ${error.message}`,