mirror of
https://github.com/simstudioai/sim.git
synced 2026-02-16 01:15:26 -05:00
* feat(claude): added rules * fix(copilot): chat loading; refactor(copilot): components, utils, hooks * fix(copilot): options selection strikethrough * fix(copilot): options render inside thinking * fix(copilot): checkpoints, user-input; improvement(code): colors * fix(copilot): scrolling, tool-call truncation, thinking ui * fix(copilot): tool call spacing and shimmer/actions on previous messages * improvement(copilot): queue * addressed comments
1.4 KiB
1.4 KiB
paths
| paths | ||
|---|---|---|
|
Import Patterns
Absolute Imports
Always use absolute imports. Never use relative imports.
// ✓ Good
import { useWorkflowStore } from '@/stores/workflows/store'
import { Button } from '@/components/ui/button'
// ✗ Bad
import { useWorkflowStore } from '../../../stores/workflows/store'
Barrel Exports
Use barrel exports (index.ts) when a folder has 3+ exports. Import from barrel, not individual files.
// ✓ Good
import { Dashboard, Sidebar } from '@/app/workspace/[workspaceId]/logs/components'
// ✗ Bad
import { Dashboard } from '@/app/workspace/[workspaceId]/logs/components/dashboard/dashboard'
No Re-exports
Do not re-export from non-barrel files. Import directly from the source.
// ✓ Good - import from where it's declared
import { CORE_TRIGGER_TYPES } from '@/stores/logs/filters/types'
// ✗ Bad - re-exporting in utils.ts then importing from there
import { CORE_TRIGGER_TYPES } from '@/app/workspace/.../utils'
Import Order
- React/core libraries
- External libraries
- UI components (
@/components/emcn,@/components/ui) - Utilities (
@/lib/...) - Stores (
@/stores/...) - Feature imports
- CSS imports
Type Imports
Use type keyword for type-only imports:
import type { WorkflowLog } from '@/stores/logs/types'