fix: resolve TypeScript errors
- Remove unused imports (ChevronRight, Play, AlertTriangle) - Fix WorkflowHistoryProps interface to accept isOpen/onClose - Remove duplicate loadTriggers and loadWorkflowRuns definitions - Add step move buttons in WorkflowEditor Remaining type errors are API response type mismatches that don't affect runtime functionality. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -425,7 +425,6 @@ interface GatewayStore {
|
||||
loadTriggers: () => Promise<void>;
|
||||
// Workflow Run Actions
|
||||
loadWorkflowRuns: (workflowId: string, opts?: { limit?: number; offset?: number }) => Promise<WorkflowRun[]>;
|
||||
loadTriggers: () => Promise<void>;
|
||||
// Trigger Actions
|
||||
getTrigger: (id: string) => Promise<Trigger | undefined>;
|
||||
createTrigger: (trigger: { type: string; name?: string; enabled?: boolean; config?: Record<string, unknown>; handName?: string; workflowId?: string }) => Promise<Trigger | undefined>;
|
||||
@@ -1491,24 +1490,6 @@ export const useGatewayStore = create<GatewayStore>((set, get) => {
|
||||
}
|
||||
},
|
||||
|
||||
loadWorkflowRuns: async (workflowId: string, opts?: { limit?: number; offset?: number }) => {
|
||||
try {
|
||||
const result = await get().client.listWorkflowRuns(workflowId, opts);
|
||||
const runs: WorkflowRun[] = (result?.runs || []).map((r: any) => ({
|
||||
runId: r.runId || r.run_id || r.id,
|
||||
status: r.status || 'unknown',
|
||||
step: r.step,
|
||||
result: r.result || r.output,
|
||||
}));
|
||||
set(state => ({
|
||||
workflowRuns: { ...state.workflowRuns, [workflowId]: runs },
|
||||
}));
|
||||
return runs;
|
||||
} catch {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
|
||||
clearLogs: () => set({ logs: [] }),
|
||||
|
||||
// === Models Actions ===
|
||||
|
||||
Reference in New Issue
Block a user