Fix unmounted state updates in mobile emulator setup and localize text (#5514)
- Wrap emulator setup terminal title and ARIA labels with translate calls. - Prevent setting CLI install status on unmounted components in the state hook.
This commit is contained in:
parent
15ed059947
commit
fde610a306
|
|
@ -131,8 +131,14 @@ export function MobileEmulatorAgentSetupGuideSteps({
|
|||
'Teaches agents the orca emulator commands for this worktree.'
|
||||
)}
|
||||
command={ORCA_CLI_SKILL_INSTALL_COMMAND}
|
||||
terminalTitle="Mobile emulator Orca CLI skill setup"
|
||||
terminalAriaLabel="Mobile emulator Orca CLI skill install terminal"
|
||||
terminalTitle={translate(
|
||||
'auto.components.emulator.pane.MobileEmulatorAgentSetupGuideSteps.5c59ea96ca',
|
||||
'Mobile emulator Orca CLI skill setup'
|
||||
)}
|
||||
terminalAriaLabel={translate(
|
||||
'auto.components.emulator.pane.MobileEmulatorAgentSetupGuideSteps.bff5341ac3',
|
||||
'Mobile emulator Orca CLI skill install terminal'
|
||||
)}
|
||||
terminalWorktreeId={terminalWorktreeId}
|
||||
installed={setup.cliSkillInstalled}
|
||||
loading={setup.cliSkillLoading || setup.setupRechecking}
|
||||
|
|
|
|||
|
|
@ -77,7 +77,10 @@ export function useMobileEmulatorAgentSetupState(enabled = true): {
|
|||
const refreshCliStatus = useCallback(async (): Promise<void> => {
|
||||
setCliLoading(true)
|
||||
try {
|
||||
setCliInstallStatus(await window.api.cli.getInstallStatus())
|
||||
const status = await window.api.cli.getInstallStatus()
|
||||
if (mountedRef.current) {
|
||||
setCliInstallStatus(status)
|
||||
}
|
||||
} catch (error) {
|
||||
if (mountedRef.current) {
|
||||
toast.error(
|
||||
|
|
@ -88,8 +91,8 @@ export function useMobileEmulatorAgentSetupState(enabled = true): {
|
|||
'Failed to load CLI status.'
|
||||
)
|
||||
)
|
||||
setCliInstallStatus(null)
|
||||
}
|
||||
setCliInstallStatus(null)
|
||||
} finally {
|
||||
if (mountedRef.current) {
|
||||
setCliLoading(false)
|
||||
|
|
|
|||
|
|
@ -9882,7 +9882,9 @@
|
|||
"9b49d892e3": "Enable Orca CLI",
|
||||
"3d8dc52c93": "Registers the orca command for emulator control in agent shells.",
|
||||
"21f5687c07": "Orca CLI skill",
|
||||
"64fb057667": "Teaches agents the orca emulator commands for this worktree."
|
||||
"64fb057667": "Teaches agents the orca emulator commands for this worktree.",
|
||||
"5c59ea96ca": "Mobile emulator Orca CLI skill setup",
|
||||
"bff5341ac3": "Mobile emulator Orca CLI skill install terminal"
|
||||
},
|
||||
"MobileEmulatorTabIntroCallout": {
|
||||
"1924982130": "Dismiss",
|
||||
|
|
|
|||
|
|
@ -9882,7 +9882,9 @@
|
|||
"9b49d892e3": "Habilitar CLI de Orca",
|
||||
"3d8dc52c93": "Registra el comando orca para control del emulador en los shells de los agents.",
|
||||
"21f5687c07": "Skill del CLI de Orca",
|
||||
"64fb057667": "Enseña a los agents los comandos del emulador orca para este worktree."
|
||||
"64fb057667": "Enseña a los agents los comandos del emulador orca para este worktree.",
|
||||
"5c59ea96ca": "Mobile emulator Orca CLI skill setup",
|
||||
"bff5341ac3": "Mobile emulator Orca CLI skill install terminal"
|
||||
},
|
||||
"MobileEmulatorTabIntroCallout": {
|
||||
"1924982130": "Descartar",
|
||||
|
|
|
|||
|
|
@ -9882,7 +9882,9 @@
|
|||
"9b49d892e3": "Orca CLI を有効化",
|
||||
"3d8dc52c93": "agent シェルでエミュレーター制御用の orca コマンドを登録します。",
|
||||
"21f5687c07": "Orca CLI スキル",
|
||||
"64fb057667": "このワークツリーの orca エミュレーターコマンドを agents に教えます。"
|
||||
"64fb057667": "このワークツリーの orca エミュレーターコマンドを agents に教えます。",
|
||||
"5c59ea96ca": "Mobile emulator Orca CLI skill setup",
|
||||
"bff5341ac3": "Mobile emulator Orca CLI skill install terminal"
|
||||
},
|
||||
"MobileEmulatorTabIntroCallout": {
|
||||
"1924982130": "閉じる",
|
||||
|
|
|
|||
|
|
@ -9882,7 +9882,9 @@
|
|||
"9b49d892e3": "Orca CLI 활성화",
|
||||
"3d8dc52c93": "agents 셸에서 에뮬레이터 제어를 위해 orca 명령을 등록합니다.",
|
||||
"21f5687c07": "Orca CLI 스킬",
|
||||
"64fb057667": "이 워크트리의 orca 에뮬레이터 명령을 agents에게 알려줍니다."
|
||||
"64fb057667": "이 워크트리의 orca 에뮬레이터 명령을 agents에게 알려줍니다.",
|
||||
"5c59ea96ca": "Mobile emulator Orca CLI skill setup",
|
||||
"bff5341ac3": "Mobile emulator Orca CLI skill install terminal"
|
||||
},
|
||||
"MobileEmulatorTabIntroCallout": {
|
||||
"1924982130": "닫기",
|
||||
|
|
|
|||
|
|
@ -9882,7 +9882,9 @@
|
|||
"9b49d892e3": "启用 Orca CLI",
|
||||
"3d8dc52c93": "在 agent shell 中注册用于模拟器控制的 orca 命令。",
|
||||
"21f5687c07": "Orca CLI 技能",
|
||||
"64fb057667": "教授 agents 此工作区的 orca 模拟器命令。"
|
||||
"64fb057667": "教授 agents 此工作区的 orca 模拟器命令。",
|
||||
"5c59ea96ca": "Mobile emulator Orca CLI skill setup",
|
||||
"bff5341ac3": "Mobile emulator Orca CLI skill install terminal"
|
||||
},
|
||||
"MobileEmulatorTabIntroCallout": {
|
||||
"1924982130": "关闭",
|
||||
|
|
|
|||
Loading…
Reference in New Issue