- Add mermaid dependency to package.json
- Implement MermaidRenderer component with performance optimizations:
* Global initialization and caching system
* Lazy loading with Intersection Observer
* Memory management with automatic cache cleanup
* Graceful fallback to syntax-highlighted code on render failure
- Integrate MermaidRenderer into CodeBlockCode component
- Refactor code-block.tsx for better separation of concerns
- Support both Mermaid diagram rendering and code display modes
The implementation provides a seamless user experience where:
- Valid Mermaid syntax renders as interactive diagrams
- Invalid syntax gracefully falls back to highlighted code
- Performance is optimized through caching and lazy loading
- Memory usage is controlled through intelligent cache management
- Added PostHog client initialization in instrumentation-client.ts.
- Configured Next.js rewrites for PostHog ingestion endpoints in next.config.ts.
- Implemented user identification and event tracking in various components, including pricing-section.tsx, sidebar-left.tsx, chat-input.tsx, and api.ts.
- Introduced PostHogIdentify component to handle user session changes.
- Updated package.json and package-lock.json to include PostHog dependencies.
./src/components/thread/tool-views/file-operation/FileEditToolView.tsx
Attempted import error: 'generateLineDiff' is not exported from './_utils' (imported as 'generateLineDiff').
Import trace for requested module:
./src/components/thread/tool-views/file-operation/FileEditToolView.tsx
./src/components/thread/tool-views/wrapper/ToolViewRegistry.tsx
./src/components/thread/tool-views/wrapper/index.ts
./src/components/thread/tool-call-side-panel.tsx
./src/app/share/[threadId]/page.tsx
./src/components/thread/tool-views/file-operation/FileEditToolView.tsx
Attempted import error: 'calculateDiffStats' is not exported from './_utils' (imported as 'calculateDiffStats').
Import trace for requested module:
./src/components/thread/tool-views/file-operation/FileEditToolView.tsx
./src/components/thread/tool-views/wrapper/ToolViewRegistry.tsx
./src/components/thread/tool-views/wrapper/index.ts
./src/components/thread/tool-call-side-panel.tsx
./src/app/share/[threadId]/page.tsx
⚠ Compiled with warnings in 40.0s
./src/components/thread/tool-views/file-operation/FileEditToolView.tsx
Attempted import error: 'generateLineDiff' is not exported from './_utils' (imported as 'generateLineDiff').
Import trace for requested module:
./src/components/thread/tool-views/file-operation/FileEditToolView.tsx
./src/components/thread/tool-views/wrapper/ToolViewRegistry.tsx
./src/components/thread/tool-views/wrapper/index.ts
./src/components/thread/tool-call-side-panel.tsx
./src/app/share/[threadId]/page.tsx
./src/components/thread/tool-views/file-operation/FileEditToolView.tsx
Attempted import error: 'calculateDiffStats' is not exported from './_utils' (imported as 'calculateDiffStats').
Import trace for requested module:
./src/components/thread/tool-views/file-operation/FileEditToolView.tsx
./src/components/thread/tool-views/wrapper/ToolViewRegistry.tsx
./src/components/thread/tool-views/wrapper/index.ts
./src/components/thread/tool-call-side-panel.tsx
./src/app/share/[threadId]/page.tsx
- Added new phone input component for improved user experience during phone number entry.
- Integrated additional icons for better visual feedback in the OTP verification process.
- Updated phone verification page to include a sign-out button, enhancing user navigation.
- Refined text descriptions for clarity and user guidance throughout the verification steps.
This update improves the overall usability and accessibility of the phone verification feature.