diff --git a/apps/presentation/dashboard/src/features/personal-workspace/capability-localization.ts b/apps/presentation/dashboard/src/features/personal-workspace/capability-localization.ts index c5c5d6262f..26f86233b8 100644 --- a/apps/presentation/dashboard/src/features/personal-workspace/capability-localization.ts +++ b/apps/presentation/dashboard/src/features/personal-workspace/capability-localization.ts @@ -250,6 +250,10 @@ export function localizedCapabilityFieldCopy(locale: WorkspaceLocale, capability label: "Codex", description: "仅作用于支持的 Codex 心跳;显式关闭的实验保持关闭。", options: {off: "关闭", on: "开启"}, } : { label: "Codex", description: "Applies only to supported Codex heartbeats; explicitly disabled runs stay disabled.", options: {off: "Off", on: "On"}, + }, antigravity_mode: locale === "zh-CN" ? { + label: "Antigravity", description: "仅作用于强能力 Antigravity 管家的交付历史渐进读取;关闭时保持完整内联。", options: {off: "关闭", on: "开启"}, + } : { + label: "Antigravity", description: "Applies only to progressive history reads in trusted-owner Antigravity manager sessions; off keeps full inline input.", options: {off: "Off", on: "On"}, }}; if (capabilityId === "codex_chat") return {...fieldCopy[locale], ...(locale === "zh-CN" ? { codex_profile: {label: "Codex 配置来源", description: "选择已有本机配置,例如 codex-gpt。账户和凭据留在原目录,不复制;留空继承服务配置。"}, diff --git a/apps/presentation/dashboard/src/features/personal-workspace/machine-configuration-settings.tsx b/apps/presentation/dashboard/src/features/personal-workspace/machine-configuration-settings.tsx index 8189af30ad..0f18eeb462 100644 --- a/apps/presentation/dashboard/src/features/personal-workspace/machine-configuration-settings.tsx +++ b/apps/presentation/dashboard/src/features/personal-workspace/machine-configuration-settings.tsx @@ -279,10 +279,10 @@ export function MachineConfigurationSettings({ section, onChanged }: { setNotice(null); } - async function setContextDelivery(mode: "off" | "on") { + async function setContextDelivery(mode: "off" | "on", key: "mode" | "antigravity_mode" = "mode") { if (busy || !editorAvailable || selected?.capability_id !== "context_delivery" || !selected.machine_namespace) return; const namespace = selected.machine_namespace; - const configuration = {...selected.default, mode}; + const configuration = {...selected.default, ...selectedCurrent, [key]: mode}; const generation = editorGeneration.current; setBusy("apply"); setError(null); setNotice(null); try { @@ -295,10 +295,11 @@ export function MachineConfigurationSettings({ section, onChanged }: { if (generation !== editorGeneration.current) return; setInspection(next); setReadbackPending(null); - if (next.machine_configuration?.namespaces[namespace]?.mode !== mode) { + if (next.machine_configuration?.namespaces[namespace]?.[key] !== mode) { throw new Error(locale === "zh-CN" ? "保存后的配置已变化,请刷新后重试。" : "The saved configuration changed. Refresh and retry."); } - setNotice(locale === "zh-CN" ? "Codex 偏好已保存。" : "Codex preference saved."); + const targetLabel = key === "antigravity_mode" ? "Antigravity" : "Codex"; + setNotice(locale === "zh-CN" ? `${targetLabel} 偏好已保存。` : `${targetLabel} preference saved.`); onChanged?.(); } catch (cause) { if (generation === editorGeneration.current) setError(cause instanceof Error ? cause.message : t("machine.applyError")); @@ -530,16 +531,24 @@ export function MachineConfigurationSettings({ section, onChanged }: { Codex void setContextDelivery(event.target.checked ? "on" : "off")} /> + onChange={(event) => void setContextDelivery(event.target.checked ? "on" : "off", "mode")} /> +

{(selectedCurrent?.mode ?? selected.default?.mode) === "on" ? selectedCurrent ? locale === "zh-CN" ? "已开启;原生初始化与实际使用尚未验证。" : "On; native setup and use unverified." : locale === "zh-CN" ? "默认开启;原生初始化与实际使用尚未验证。" : "Default on; native setup and use unverified." : locale === "zh-CN" ? "Codex 已关闭。" : "Off for Codex."}

-

{locale === "zh-CN" - ? "受支持的 POSIX Codex App/SSH 和 benchmark 心跳默认开启;已保存的关闭继续生效,benchmark trial 可单独显式关闭。其他应用和平台保留完整交付;显式开启遇到未知或冲突跑法会报错。保存偏好不代表当前会话已采用差分。宿主就绪且旧上下文完整时才使用差分,否则完整恢复;私有存储与会话隔离自动管理。" - : "Defaults on for supported POSIX Codex App/SSH and benchmark heartbeats. Saved off is preserved; benchmark trials can explicitly disable it independently. Other applications and platforms retain full delivery. Explicit on rejects unknown or conflicting modes. Saving a preference does not establish current-session adoption. Delta needs a ready host and complete retained context; otherwise full context is restored. Private storage and session isolation are automatic."}

+

{(selectedCurrent?.antigravity_mode ?? selected.default?.antigravity_mode ?? "on") === "on" + ? locale === "zh-CN" ? "Antigravity 管家历史渐进读取已开启。" : "Antigravity progressive manager history is on." + : locale === "zh-CN" ? "Antigravity 已关闭。" : "Off for Antigravity."}

+

{locale === "zh-CN" + ? "Codex(mode)与 Antigravity(antigravity_mode)独立控制:受支持的 POSIX Codex App/SSH 和 benchmark 心跳默认开启差分,已保存的关闭继续生效,benchmark trial 可单独显式关闭;强能力 Antigravity 管家默认开启私有快照的交付历史渐进读取,关闭时保持完整内联。其他应用和平台保留完整交付;显式开启遇到未知或冲突跑法会报错。保存偏好不代表当前会话已采用差分。宿主就绪且旧上下文完整时才使用差分,否则完整恢复;私有存储与会话隔离自动管理。" + : "Codex (mode) and Antigravity (antigravity_mode) are controlled independently: supported POSIX Codex App/SSH and benchmark heartbeats default on (saved off is preserved; benchmark trials can disable it independently), while trusted-owner Antigravity manager turns default on for progressive private-capture history reads and keep full inline input when off. Other applications and platforms retain full delivery. Explicit on rejects unknown or conflicting modes. Saving a preference does not establish current-session adoption. Delta needs a ready host and complete retained context; otherwise full context is restored. Private storage and session isolation are automatic."}

: null} {editorAvailable && selected.capability_id !== "context_delivery" ? <>{editorMode === "json" || !selected.configuration_editor.fields.some((field) => field.key === "enabled" && field.input_kind === "boolean") ?