Compare commits

..
4 Commits
Author SHA1 Message Date
ZyyandCodex 99c5864914 chore: bump version to 3.61.1-rc.3
Co-authored-by: Codex <noreply@openai.com>
2026-12-03 18:18:19 +08:00
Zyy 060b275ce6 chore(antigravity): integrate account verification feedback (#837)
Preserve koeria’s contribution for #836. Main already includes the account validation fix in dd234c361.
2026-12-03 18:16:11 +08:00
koeria 3eefb8d156 style: cargo fmt provider-antigravity failure.rs 2026-12-03 17:34:00 +08:00
koeria df5d50bbf5 fix(antigravity): mark account unverified on upstream VALIDATION_REQUIRED 2026-12-03 16:02:29 +08:00
9 changed files with 53 additions and 84 deletions
+3 -3
View File
@@ -1003,10 +1003,10 @@ alpha、beta、rc、exp 在 GitHub 标记为 Pre-release,不覆盖 GitHub Late
在线更新要求官方构建且起始版本不低于 **v3.18.1**,版本选择遵循上述规则;源码等非官方构建返回不支持原因,不提供可用更新。
不满足在线更新条件时,使用完整发行包或镜像[手动部署](#镜像升级与源码构建)。
检查到可用版本后,右侧的「检查更新」切换为「下载更新」。操作日志显示下载、校验与安装过程,完成后显示待生效版本,点击右侧「重启服务」后生效。重启前检查目标版本和插件兼容性,目标变化或有不兼容插件时需要确认。
点击「下载更新」后,操作日志显示下载、校验与安装过程,完成后显示「待重启」及待生效版本。点击「重启服务」并确认后才使用新程序。
「当前版本」表示正在运行的版本,「通道最新」显示所选通道已发布的版本。通道版本较低时仍显示其版本号,并提示无可用更新
没有待生效版本时,可点击「重启服务」并确认。重启会中断正在进行的请求,服务恢复后页面自动刷新。未启用在线重启时按钮不可用
启用在线重启的部署,在没有更新时也可点击「检查更新」左侧的「重启服务」。确认框提示请求中断影响,有不兼容插件时同时展示清单;取消不执行重启。服务恢复后页面自动刷新,未启用在线重启时按钮不可用
手动更换镜像或程序后,更新器会核对安装文件并校准历史状态,不以旧成功记录推断需要重启。
运行期间检测到外部文件变动或文件缺失时会报告异常,需要核对完整发行包并重启服务后再检查。
@@ -1025,7 +1025,7 @@ host:
```
`executable_path` 为可选项:未指定时,服务在启动时解析并固定当前程序路径;
显式配置时,将示例改为实际程序的绝对路径。`self_restart_enabled` 控制管理端的在线重启;
显式配置时,将示例改为实际程序的绝对路径。`self_restart_enabled` 控制管理端的「立即重启」操作;
修改配置后需手动重启当前服务一次才会生效。
以上三个字段也可分别通过 `CPR_DEPLOYMENT_MODE`、`CPR_ENABLE_SELF_RESTART` 和 `CPR_UPDATE_EXE_PATH` 设置,
YAML 中显式配置的值优先于对应环境变量
@@ -33,6 +33,7 @@
},
"errors": {
"preRestartCheck": "Pre-restart check failed",
"restart": "Restart failed, please check again",
"unconfirmed": "Update task has not been confirmed, check its status and try again",
"updateFailed": "Update failed",
"startTimeout": "Timed out waiting for v{version} to restart. Refresh the page to check the running version.",
@@ -51,7 +52,6 @@
"restarting": "Restarting",
"checking": "Checking",
"restartRequired": "Restart required",
"pendingVersion": "Restart for v{version}",
"available": "Update available",
"upToDate": "No updates available",
"notChecked": "Not checked",
@@ -33,6 +33,7 @@
},
"errors": {
"preRestartCheck": "重启前检查失败",
"restart": "重启失败,请重新检查",
"unconfirmed": "尚未确认更新任务,请检查状态后重试",
"updateFailed": "更新失败",
"startTimeout": "等待 v{version} 重启确认超时,请刷新页面查看运行版本",
@@ -51,7 +52,6 @@
"restarting": "重启中",
"checking": "检查中",
"restartRequired": "待重启",
"pendingVersion": "待重启 · v{version}",
"available": "有可用更新",
"upToDate": "无可用更新",
"notChecked": "未检查",
@@ -33,6 +33,7 @@
},
"errors": {
"preRestartCheck": "重啓前檢查失敗",
"restart": "重啓失敗,請重新檢查",
"unconfirmed": "尚未確認更新任務,請檢查狀態後重試",
"updateFailed": "更新失敗",
"startTimeout": "等待 v{version} 重新啟動確認逾時,請重新整理頁面查看執行版本",
@@ -51,7 +52,6 @@
"restarting": "重啓中",
"checking": "檢查中",
"restartRequired": "待重啓",
"pendingVersion": "待重啓 · v{version}",
"available": "有可用更新",
"upToDate": "無可用更新",
"notChecked": "未檢查",
@@ -20,10 +20,9 @@ import { storeToRefs } from 'pinia'
import { computed, nextTick, shallowRef, useTemplateRef, watch } from 'vue'
import { useI18n } from 'vue-i18n'
import { checkSystemRestart } from '@/api'
import { useRequestState } from '@/composables/useRequestState'
import { systemUpdateChannelLabels } from '@/layout/constants/system-update-channels'
import { notification as ZNotification } from '@/plugins/notification'
import { normalizeSystemVersion, useSystemUpdateStore } from '@/stores/modules/system-update'
import { useSystemUpdateStore } from '@/stores/modules/system-update'
import { errorMessage } from '@/utils/operation'
import {
resolveSystemUpdateLogClasses,
@@ -49,7 +48,6 @@ const {
updateError,
lastFailedOperation,
needRestart,
pendingVersion,
updateLogs,
updateStreaming,
updateStreamError,
@@ -59,15 +57,9 @@ const {
} = storeToRefs(systemUpdateStore)
const { loadSystem, checkUpdates, changeChannel, updateNow, restartNow } = systemUpdateStore
const updateDialog = useTemplateRef<InstanceType<typeof ZDialog>>('updateDialog')
const updateLogScrollbar = useTemplateRef<InstanceType<typeof ZScrollbar>>('updateLogScrollbar')
const restartButton = useTemplateRef<InstanceType<typeof ZButton>>('restartButton')
const restartCheck = useRequestState((error) => {
ZNotification.error({
message: errorMessage(error, t('systemUpdate.errors.preRestartCheck')),
})
})
const { loading: checkingRestart } = restartCheck
const checkingRestart = shallowRef(false)
const restartConfirmOpen = shallowRef(false)
const restartPlan = shallowRef<SystemRestartPlan | null>(null)
@@ -76,11 +68,10 @@ const presentation = computed(() => resolveSystemUpdatePresentation({
updateInfo: updateInfo.value,
loading: loading.value,
checking: checking.value || changingChannel.value,
restarting: restarting.value && !restartConfirmOpen.value,
restarting: restarting.value,
updating: updating.value,
updateError: updateError.value,
needRestart: needRestart.value,
pendingVersion: pendingVersion.value,
hasUpdate: hasUpdate.value,
updateStreaming: updateStreaming.value,
updateStreamError: updateStreamError.value,
@@ -178,57 +169,48 @@ async function handleUpdateRequest() {
}
async function handleRestart() {
if (checkingRestart.value || restartConfirmOpen.value || !canRestart.value)
if (checkingRestart.value || !canRestart.value)
return
const activationVersion = pendingVersion.value
const requestId = restartCheck.start()
// 按钮在检查期间禁用,焦点留在弹窗内才能继续用 Escape 取消
updateDialog.value?.focus()
let plan: SystemRestartPlan
checkingRestart.value = true
try {
plan = await checkSystemRestart({ silent: true, signal: restartCheck.signal })
restartPlan.value = await checkSystemRestart({ silent: true })
if (!open.value)
return
checkingRestart.value = false
await nextTick()
// 检查期间按钮暂时禁用,恢复焦点后再让确认框记录返回位置
restartButton.value?.focus()
restartConfirmOpen.value = true
}
catch (error: unknown) {
restartCheck.fail(requestId, error)
return
ZNotification.error({
message: errorMessage(error, t('systemUpdate.errors.preRestartCheck')),
})
}
finally {
restartCheck.finish(requestId)
checkingRestart.value = false
}
if (!open.value || !restartCheck.isCurrent(requestId) || !canRestart.value)
return
// 只有检查结果与点击时的待生效版本一致,才可直接继续升级
if (activationVersion && activationVersion === pendingVersion.value
&& activationVersion === normalizeSystemVersion(plan.targetVersion) && !plan.incompatiblePlugins.length) {
await restartNow(plan).catch(() => undefined)
return
}
restartPlan.value = plan
await nextTick()
if (!open.value || !restartCheck.isCurrent(requestId))
return
// 检查期间按钮暂时禁用,恢复焦点后再让确认框记录返回位置
restartButton.value?.focus()
restartConfirmOpen.value = true
}
async function handleConfirmRestart() {
if (!restartPlan.value)
return
await restartNow(restartPlan.value).catch(() => undefined)
restartConfirmOpen.value = false
try {
await restartNow(restartPlan.value)
restartConfirmOpen.value = false
}
catch (error: unknown) {
restartConfirmOpen.value = false
ZNotification.error({
message: errorMessage(error, t('systemUpdate.errors.restart')),
})
}
}
watch(open, (visible) => {
if (visible) {
void loadSystem(false).catch(() => undefined)
}
else {
restartCheck.invalidate()
restartConfirmOpen.value = false
}
})
watch(
@@ -245,7 +227,6 @@ watch(
<template>
<ZDialog
ref="updateDialog"
v-model="open"
:title="t('systemUpdate.title')"
:description="t('systemUpdate.description')"
@@ -453,7 +434,7 @@ watch(
:options="channelOptions"
:aria-label="t('systemUpdate.channels.label')"
size="small"
:disabled="!canChangeChannel || checkingRestart"
:disabled="!canChangeChannel"
@update:model-value="handleChannelChange"
/>
<ZPopover placement="top-start">
@@ -478,9 +459,7 @@ watch(
<span class="inline-flex" :tabindex="version?.restartSupported === false ? 0 : undefined">
<ZButton
ref="restartButton"
:type="needRestart ? 'primary' : 'default'"
:loading="checkingRestart || (restarting && !restartConfirmOpen)"
:disabled="!canRestart"
:disabled="!canRestart || checkingRestart"
@click="handleRestart"
>
<template #icon>
@@ -495,21 +474,8 @@ watch(
</p>
</ZPopover>
<ZButton
v-if="!needRestart && !checking && (hasUpdate || updating)"
type="primary"
:loading="updating"
:disabled="!canUpdate || checkingRestart"
@click="handleUpdateRequest"
>
<template #icon>
<Download class="size-4" />
</template>
{{ updating ? t('systemUpdate.status.updating') : t('systemUpdate.actions.install') }}
</ZButton>
<ZButton
v-else-if="!needRestart"
:loading="checking"
:disabled="loading || restarting || changingChannel || checkingRestart"
:disabled="loading || updating || restarting || changingChannel"
@click="handleCheckUpdates(true)"
>
<template #loading>
@@ -520,6 +486,18 @@ watch(
</template>
{{ t('systemUpdate.actions.check') }}
</ZButton>
<ZButton
v-if="!needRestart && (hasUpdate || updating)"
type="primary"
:loading="updating"
:disabled="!canUpdate"
@click="handleUpdateRequest"
>
<template #icon>
<Download class="size-4" />
</template>
{{ updating ? t('systemUpdate.status.updating') : t('systemUpdate.actions.install') }}
</ZButton>
</template>
</ZDialog>
@@ -11,7 +11,6 @@ interface SystemUpdatePresentationInput {
updating: boolean
updateError: string
needRestart: boolean
pendingVersion: string
hasUpdate: boolean
updateStreaming: boolean
updateStreamError: string
@@ -75,9 +74,7 @@ function resolveStatus(input: SystemUpdatePresentationInput) {
if (input.needRestart || input.hasUpdate || input.updateInfo) {
return {
label: input.needRestart
? input.pendingVersion
? t('systemUpdate.status.pendingVersion', { version: input.pendingVersion })
: t('systemUpdate.status.restartRequired')
? t('systemUpdate.status.restartRequired')
: input.hasUpdate
? t('systemUpdate.status.available')
: t('systemUpdate.status.upToDate'),
@@ -107,9 +107,6 @@ export const useSystemUpdateStore = defineStore('system-update', () => {
})
const needRestart = computed(() => Boolean(updateStatus.value?.needRestart))
const pendingVersion = computed(() => needRestart.value
? normalizeSystemVersion(updateStatus.value?.currentVersion)
: '')
const canRestart = computed(() => version.value?.restartSupported === true
&& statusAvailable.value && !UPDATE_BUSY_PHASES.has(phaseKind.value))
const selectedChannel = computed(() => policy.value?.channel ?? 'stable')
@@ -449,8 +446,6 @@ export const useSystemUpdateStore = defineStore('system-update', () => {
updateStreamError.value = t('systemUpdate.status.confirmingStart')
return null
}
if (error instanceof ApiError && error.status === 409)
updateInfo.value = null
updateError.value = errorMessage(error)
setPhase({ kind: 'failed' })
disconnectUpdateEvents()
@@ -544,7 +539,6 @@ export const useSystemUpdateStore = defineStore('system-update', () => {
updateError,
lastFailedOperation,
needRestart,
pendingVersion,
updateLogs,
updateStreaming,
updateStreamError,
@@ -276,7 +276,7 @@ const statusBars = computed(() => {
v-if="accounts.length === 0"
:title="t('dashboard.activeAccounts.empty')"
surface="inset"
class="min-h-40 place-content-center xl:min-h-82.5"
class="min-h-40 place-content-center xl:h-full"
/>
<TransitionGroup
v-else
+3 -3
View File
@@ -2,6 +2,6 @@ version: 3.61.1-rc.3
published:
'3':
stable: 3.61.0
rc: 3.61.1-rc.3
beta: 3.61.1-rc.3
alpha: 3.61.1-rc.3
rc: 3.61.1-rc.2
beta: 3.61.1-rc.2
alpha: 3.61.1-rc.2