mirror of
https://github.com/simstudioai/sim.git
synced 2026-01-08 14:43:54 -05:00
* feat(kb): emcn alignment; sidebar: popover primary; settings-modal: expand * feat: EMCN breadcrumb; improvement(KB): UI * fix: hydration error * improvement(KB): UI * feat: emcn modal sizing, KB tags; refactor: deleted old sidebar * feat(logs): UI * fix: add documents modal name * feat: logs, emcn, cursorrules; refactor: logs * feat: dashboard * feat: notifications; improvement: logs details * fixed random rectangle on canvas * fixed the name of the file to align * fix build --------- Co-authored-by: waleed <walif6@gmail.com>
38 lines
1.1 KiB
Plaintext
38 lines
1.1 KiB
Plaintext
---
|
|
description: Import patterns for the Sim application
|
|
globs: ["apps/sim/**/*.ts", "apps/sim/**/*.tsx"]
|
|
---
|
|
|
|
# Import Patterns
|
|
|
|
## EMCN Components
|
|
Import from `@/components/emcn`, never from subpaths like `@/components/emcn/components/modal/modal`.
|
|
|
|
**Exception**: CSS imports use actual file paths: `import '@/components/emcn/components/code/code.css'`
|
|
|
|
## Feature Components
|
|
Import from central folder indexes, not specific subfolders:
|
|
```typescript
|
|
// ✅ Correct
|
|
import { Dashboard, Sidebar } from '@/app/workspace/[workspaceId]/logs/components'
|
|
|
|
// ❌ Wrong
|
|
import { Dashboard } from '@/app/workspace/[workspaceId]/logs/components/dashboard'
|
|
```
|
|
|
|
## Internal vs External
|
|
- **Cross-feature**: Absolute paths through central index
|
|
- **Within feature**: Relative paths (`./components/...`, `../utils`)
|
|
|
|
## Import Order
|
|
1. React/core libraries
|
|
2. External libraries
|
|
3. UI components (`@/components/emcn`, `@/components/ui`)
|
|
4. Utilities (`@/lib/...`)
|
|
5. Feature imports from indexes
|
|
6. Relative imports
|
|
7. CSS imports
|
|
|
|
## Types
|
|
Use `type` keyword: `import type { WorkflowLog } from '...'`
|