mirror of
https://github.com/stablyai/orca.git
synced 2026-10-24 08:03:58 +00:00
fix(automations): restore main checks
This commit is contained in:
@@ -98,6 +98,7 @@ function renderPanel(
|
||||
requestExternalAction={() => undefined}
|
||||
openEditExternalDialog={() => undefined}
|
||||
openCreateDialog={() => undefined}
|
||||
canCreateAutomation
|
||||
onOpenDetail={() => undefined}
|
||||
onRefresh={() => undefined}
|
||||
isRefreshing={false}
|
||||
|
||||
@@ -63,10 +63,7 @@ import type { AutomationTemplate } from './automation-templates'
|
||||
import { getAutomationTargetAvailability } from './automation-target-availability'
|
||||
import { getAutomationCreateAvailability } from './automation-create-admission'
|
||||
import { buildAutomationRunContextForRepo } from './automation-run-context'
|
||||
import {
|
||||
repoMatchesExternalAutomationTarget,
|
||||
getExternalAutomationTargetForRepo
|
||||
} from './automation-external-target-match'
|
||||
import { repoMatchesExternalAutomationTarget } from './automation-external-target-match'
|
||||
import { ensureHooksConfirmed } from '@/lib/ensure-hooks-confirmed'
|
||||
import { getSettingsForRepoRuntimeOwner } from '@/lib/repo-runtime-owner'
|
||||
import { checkRuntimeHooks } from '@/runtime/runtime-hooks-client'
|
||||
@@ -82,6 +79,7 @@ import {
|
||||
getAutomationHostTargetFromKey,
|
||||
getAutomationHostTargetKey,
|
||||
getAutomationListTarget,
|
||||
getAutomationOwnerTarget,
|
||||
getAutomationTargetFromHostId,
|
||||
listAutomationsForTarget,
|
||||
runAutomationNowForTarget,
|
||||
@@ -1349,27 +1347,7 @@ export default function AutomationsPage(): React.JSX.Element {
|
||||
: null
|
||||
const projectId = targetWorktree?.repoId ?? fallbackRepo?.id ?? ''
|
||||
const workspaceId = targetWorktree?.id ?? fallbackWorktree?.id ?? ''
|
||||
const nextDraft: AutomationDraft = {
|
||||
name: job.name,
|
||||
prompt: job.prompt ?? job.promptPreview,
|
||||
agentId: 'hermes',
|
||||
projectId,
|
||||
workspaceMode: 'existing',
|
||||
workspaceId,
|
||||
baseBranch: '',
|
||||
setupDecision: undefined,
|
||||
reuseSession: false,
|
||||
precheckCommand: '',
|
||||
precheckTimeoutSeconds: '60',
|
||||
preset: hasCustomSchedule ? 'custom' : 'weekdays',
|
||||
time: AUTOMATION_DEFAULT_TIME,
|
||||
dayOfWeek: '1',
|
||||
customSchedule: hasCustomSchedule ? rawSchedule : '',
|
||||
missedRunGraceMinutes: '720',
|
||||
scheduleWarning: hasCustomSchedule
|
||||
? null
|
||||
: 'This Hermes automation has an unsupported saved schedule. Pick a supported schedule before saving changes.'
|
||||
}
|
||||
const nextDraft = buildExternalAutomationEditDraft(job, { projectId, workspaceId })
|
||||
setEditingAutomationId(null)
|
||||
setEditingRowKey(null)
|
||||
setEditingDestination(null)
|
||||
|
||||
@@ -127,9 +127,6 @@ export async function listAutomationRunsForTarget(
|
||||
|
||||
export async function createAutomationForTarget(input: AutomationCreateInput): Promise<Automation> {
|
||||
const target = getAutomationCreateTarget(input)
|
||||
if (target.kind === 'local') {
|
||||
return await window.api.automations.create(input)
|
||||
}
|
||||
const result = await callRuntimeRpc<{ automation: Automation }>(
|
||||
target,
|
||||
'automation.create',
|
||||
|
||||
Reference in New Issue
Block a user