feat(automation): complete unified automation system redesign

Phase 4 completion:
- Add ApprovalQueue component for managing pending approvals
- Add ExecutionResult component for displaying hand/workflow results
- Update Sidebar navigation to use unified AutomationPanel
- Replace separate 'hands' and 'workflow' tabs with single 'automation' tab
- Fix TypeScript type safety issues with unknown types in JSX expressions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
iven
2026-03-18 17:12:05 +08:00
parent 3a7631e035
commit 3518fc8ece
74 changed files with 4984 additions and 687 deletions

View File

@@ -10,6 +10,7 @@ import { useState, useEffect, useCallback } from 'react';
import { useGatewayStore, type Workflow } from '../store/gatewayStore';
import { WorkflowEditor } from './WorkflowEditor';
import { WorkflowHistory } from './WorkflowHistory';
import { TriggersPanel } from './TriggersPanel';
import {
Clock,
Zap,
@@ -661,11 +662,6 @@ export function SchedulerPanel() {
setIsCreateModalOpen(true);
}, []);
const handleCreateTrigger = useCallback(() => {
// TODO: Implement trigger creation modal
alert('事件触发器创建功能即将推出!');
}, []);
const handleCreateSuccess = useCallback(() => {
loadScheduledTasks();
}, [loadScheduledTasks]);
@@ -862,15 +858,7 @@ export function SchedulerPanel() {
)}
{activeTab === 'triggers' && (
<div className="bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 p-4">
<EmptyState
icon={Zap}
title="暂无事件触发器"
description="事件触发器在系统事件(如收到消息、文件更改或 API webhook发生时触发代理执行。"
actionLabel="创建事件触发器"
onAction={handleCreateTrigger}
/>
</div>
<TriggersPanel />
)}
{/* Workflows Tab */}