refactor(store): split gatewayStore into specialized domain stores
Major restructuring: - Split monolithic gatewayStore into 5 focused stores: - connectionStore: WebSocket connection and gateway lifecycle - configStore: quickConfig, workspaceInfo, MCP services - agentStore: clones, usage stats, agent management - handStore: hands, approvals, triggers, hand runs - workflowStore: workflows, workflow runs, execution - Update all components to use new stores with selector pattern - Remove
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
import { useState, useEffect, useCallback } from 'react';
|
||||
import { useGatewayStore, type Workflow, type WorkflowRun } from '../store/gatewayStore';
|
||||
import { useWorkflowStore, type Workflow, type WorkflowRun } from '../store/workflowStore';
|
||||
import {
|
||||
ArrowLeft,
|
||||
Clock,
|
||||
@@ -113,7 +113,9 @@ function RunCard({ run, index }: RunCardProps) {
|
||||
}
|
||||
|
||||
export function WorkflowHistory({ workflow, onBack }: WorkflowHistoryProps) {
|
||||
const { loadWorkflowRuns, cancelWorkflow, isLoading } = useGatewayStore();
|
||||
const loadWorkflowRuns = useWorkflowStore((s) => s.loadWorkflowRuns);
|
||||
const cancelWorkflow = useWorkflowStore((s) => s.cancelWorkflow);
|
||||
const isLoading = useWorkflowStore((s) => s.isLoading);
|
||||
const [runs, setRuns] = useState<WorkflowRun[]>([]);
|
||||
const [isRefreshing, setIsRefreshing] = useState(false);
|
||||
const [cancellingRunId, setCancellingRunId] = useState<string | null>(null);
|
||||
|
||||
Reference in New Issue
Block a user