import { ipcMain } from 'electron'
import { startLogStream } from '../commandRunner'

export function registerLogsIpc(): void {
  ipcMain.handle('logs:start', (event, operationId: string, name: string, service: string) =>
    startLogStream(operationId, ['logs', name, '-f', '-s', service, '--tail', '200'], event.sender)
  )
}
