mirror of
https://github.com/stablyai/orca.git
synced 2026-10-15 08:03:08 +00:00
Refine setup guide completion states
Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
@@ -132,6 +132,11 @@ type AgentCapabilitySlide = {
|
||||
}
|
||||
|
||||
const AGENT_CAPABILITY_SETUP_ROWS: readonly AgentCapabilitySetupRow[] = [
|
||||
{
|
||||
id: 'orchestration',
|
||||
title: 'Agent Orchestration',
|
||||
icon: <Workflow className="size-4" />
|
||||
},
|
||||
{
|
||||
id: 'browserUse',
|
||||
title: 'Agent Browser Use',
|
||||
@@ -141,11 +146,6 @@ const AGENT_CAPABILITY_SETUP_ROWS: readonly AgentCapabilitySetupRow[] = [
|
||||
id: 'computerUse',
|
||||
title: 'Computer Use',
|
||||
icon: <MonitorCog className="size-4" />
|
||||
},
|
||||
{
|
||||
id: 'orchestration',
|
||||
title: 'Agent Orchestration',
|
||||
icon: <Workflow className="size-4" />
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
@@ -106,6 +106,7 @@ function SelectedStepAction(props: FeatureWallSetupChecklistProps): React.JSX.El
|
||||
if (!activeStep) {
|
||||
return null
|
||||
}
|
||||
const activeDone = props.progress.stepDone[activeStep.id]
|
||||
if (activeStep.id === 'default-agent') {
|
||||
return <DefaultAgentAction />
|
||||
}
|
||||
@@ -119,6 +120,9 @@ function SelectedStepAction(props: FeatureWallSetupChecklistProps): React.JSX.El
|
||||
return <TwoAgentsAction reducedMotion={reducedMotion} />
|
||||
}
|
||||
if (activeStep.id === 'two-worktrees') {
|
||||
if (activeDone) {
|
||||
return null
|
||||
}
|
||||
return <WorkspacesAction reducedMotion={reducedMotion} />
|
||||
}
|
||||
if (activeStep.id === 'task-sources') {
|
||||
|
||||
@@ -265,4 +265,18 @@ describe('getFeatureWallSetupProgress', () => {
|
||||
|
||||
expect(progress.stepDone['agent-capabilities']).toBe(true)
|
||||
})
|
||||
|
||||
it('does not block agent capabilities on unavailable Computer Use access', () => {
|
||||
const progress = getFeatureWallSetupProgress(
|
||||
makeInput({
|
||||
browserUseSkillInstalled: true,
|
||||
computerUseSkillInstalled: true,
|
||||
computerUsePermissionsReady: false,
|
||||
computerUseUnavailable: true,
|
||||
orchestrationSkillInstalled: true
|
||||
})
|
||||
)
|
||||
|
||||
expect(progress.stepDone['agent-capabilities']).toBe(true)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -18,6 +18,7 @@ export type FeatureWallSetupProgressInput = {
|
||||
browserUseSkillInstalled: boolean
|
||||
computerUseSkillInstalled: boolean
|
||||
computerUsePermissionsReady: boolean
|
||||
computerUseUnavailable?: boolean
|
||||
orchestrationSkillInstalled: boolean
|
||||
gitRepoCount: number
|
||||
worktreesByRepo: Record<string, Worktree[]>
|
||||
@@ -75,7 +76,7 @@ export function getFeatureWallSetupProgress(
|
||||
const agentCapabilitiesDone =
|
||||
input.browserUseSkillInstalled &&
|
||||
input.computerUseSkillInstalled &&
|
||||
input.computerUsePermissionsReady &&
|
||||
(input.computerUsePermissionsReady || input.computerUseUnavailable === true) &&
|
||||
input.orchestrationSkillInstalled
|
||||
const stepDone: Record<FeatureWallSetupStepId, boolean> = {
|
||||
'default-agent':
|
||||
|
||||
@@ -37,6 +37,7 @@ export function useSetupGuideProgress(
|
||||
const activeRepoId = useAppStore((s) => s.activeRepoId)
|
||||
const [hasSetupScript, setHasSetupScript] = useState(false)
|
||||
const [computerUsePermissionsReady, setComputerUsePermissionsReady] = useState(false)
|
||||
const [computerUseUnavailable, setComputerUseUnavailable] = useState(false)
|
||||
const { installed: detectedBrowserUseSkillInstalled } = useInstalledAgentSkill(
|
||||
ORCA_CLI_SKILL_NAME,
|
||||
{
|
||||
@@ -117,11 +118,13 @@ export function useSetupGuideProgress(
|
||||
status.helperUnavailableReason === null &&
|
||||
status.permissions.every((permission) => permission.status !== 'not-granted')
|
||||
)
|
||||
setComputerUseUnavailable(status?.helperUnavailableReason !== null)
|
||||
}, [])
|
||||
|
||||
useEffect(() => {
|
||||
if (!shouldRefreshCoreState || !computerUseSkillInstalled) {
|
||||
setComputerUsePermissionsReady(false)
|
||||
setComputerUseUnavailable(false)
|
||||
return
|
||||
}
|
||||
let stale = false
|
||||
@@ -163,6 +166,7 @@ export function useSetupGuideProgress(
|
||||
browserUseSkillInstalled: browserUseSkillInstalled || detectedBrowserUseSkillInstalled,
|
||||
computerUseSkillInstalled,
|
||||
computerUsePermissionsReady,
|
||||
computerUseUnavailable,
|
||||
orchestrationSkillInstalled:
|
||||
orchestrationSkillInstalled || detectedOrchestrationSkillInstalled,
|
||||
gitRepoCount,
|
||||
@@ -173,6 +177,7 @@ export function useSetupGuideProgress(
|
||||
}),
|
||||
[
|
||||
browserUseSkillInstalled,
|
||||
computerUseUnavailable,
|
||||
computerUsePermissionsReady,
|
||||
computerUseSkillInstalled,
|
||||
detectedBrowserUseSkillInstalled,
|
||||
|
||||
Reference in New Issue
Block a user