| 34 | import type { ExecutionContext } from '@/lib/copilot/request/types' |
| 35 | |
| 36 | function buildTable(overrides: Partial<TableDefinition> = {}): TableDefinition { |
| 37 | return { |
| 38 | id: 'tbl_1', |
| 39 | name: 'People', |
| 40 | description: null, |
| 41 | schema: { |
| 42 | columns: [ |
| 43 | { id: 'col_name', name: 'name', type: 'string' }, |
| 44 | { id: 'col_age', name: 'age', type: 'number' }, |
| 45 | ], |
| 46 | }, |
| 47 | metadata: null, |
| 48 | rowCount: 0, |
| 49 | maxRows: 100, |
| 50 | workspaceId: 'workspace-1', |
| 51 | createdBy: 'user-1', |
| 52 | archivedAt: null, |
| 53 | createdAt: new Date('2024-01-01'), |
| 54 | updatedAt: new Date('2024-01-01'), |
| 55 | ...overrides, |
| 56 | } as TableDefinition |
| 57 | } |
| 58 | |
| 59 | function buildContext(overrides: Partial<ExecutionContext> = {}): ExecutionContext { |
| 60 | return { |