import { UpdateCheckInterval } from './pluginUpdate'; import type { ActivityLogEntry } from './activityLog/activityLog.types'; export type ExecutionMode = 'paste' | 'line'; export type TargetMode = 'current' | 'all'; export type FailureStrategy = 'continue' | 'stop' | 'manual'; export type ImportMode = 'merge' | 'replace'; export type OutputMatchMode = 'literal' | 'regex'; export type OutputPatternLogic = 'single' | 'any' | 'all'; export type DrawerInitialFocus = 'drawer' | 'terminal'; export type AutomationCommandAction = 'none' | 'stop' | 'custom' | 'command'; export type AutomationMatchFlow = 'continue' | 'nextLine' | 'stop'; export type AutomationTimeoutAction = 'continue' | 'stop' | 'custom' | 'command'; export interface QuickAutomationRule { id: string; name: string; enabled: boolean; collapsed: boolean; /** 0 waits until the whole command is sent; positive values run after that source line. */ triggerLine: number; matchMode: OutputMatchMode; waitFor: string; waitForLogic: OutputPatternLogic; timeoutMs: number; errorPattern: string; errorPatternLogic: OutputPatternLogic; matchFlow: AutomationMatchFlow; onMatchAction: AutomationCommandAction; onMatchCommand: string; onMatchAutoEnter: boolean; onMatchCommandId: string; onErrorAction: AutomationCommandAction; onErrorCommand: string; onErrorAutoEnter: boolean; onErrorCommandId: string; onTimeoutCommand: string; onTimeoutAutoEnter: boolean; onTimeoutCommandId: string; timeoutAction: AutomationTimeoutAction; } export interface QuickCommand { id: string; name: string; description: string; category: string; command: string; autoEnter: boolean; lineDelay: number; lineDelays: number[]; linePauses: boolean[]; shortcut: string; favorite: boolean; pinned: boolean; usageCount: number; lastUsedAt: string | null; automationRules: QuickAutomationRule[]; } export interface QuickCommandsConfig { commands: QuickCommand[]; customCategories: string[]; categoryOrder: string[]; selectedCommandId: string | null; selectedCategory: string; executionMode: ExecutionMode; targetMode: TargetMode; failureStrategy: FailureStrategy; drawerWidth: number; showToolbarButton: boolean; drawerInitialFocus: DrawerInitialFocus; focusTerminalAfterSend: boolean; showOperationHints: boolean; requireConfirmBeforeExecute: boolean; confirmHighRiskCommands: boolean; confirmBroadcast: boolean; exportFileName: string; basicInfoCollapsed: boolean; moreSettingsCollapsed: boolean; previewCollapsed: boolean; moveNavigateAfterMove: boolean; recentOutputLimit: number; logLimit: number; logRetentionMode: 'count' | 'days' | 'size' | 'unlimited'; logRetentionDays: number; logSizeLimitMb: number; logWarningSizeMb: number; logSizeUnit: 'MB' | 'GB'; logWarningSizeUnit: 'MB' | 'GB'; updateCheckInterval: UpdateCheckInterval; ignoredUpdateVersion: string; automationLogs: AutomationLogEntry[]; } export type AutomationLogEntry = ActivityLogEntry;