Folo/packages/internal/tracker
Innei c4ac1b1875
feat(ai): add ai mention plugin (#4305)
* init

* refactor

* implement mention plugin for chat input

- Updated pnpm-lock.yaml and pnpm-workspace.yaml to include new versions of @floating-ui packages.
- Added MentionPlugin to the chat input component, enabling mention functionality.
- Created necessary components, hooks, and utilities for mention handling, including MentionNode, MentionDropdown, and related styles.
- Refactored existing code to integrate mention features seamlessly into the chat interface.

This update enhances the chat experience by allowing users to mention others easily, improving interactivity and engagement.

Signed-off-by: Innei <tukon479@gmail.com>

* Enhance mention functionality in chat editor

- Integrated MentionNode into AIRichTextMessage for improved mention handling.
- Updated MentionPlugin to utilize new hooks for mention search and insertion.
- Added useMentionIntegration and useMentionSearchService hooks for better mention management.
- Created contextBarSearchService and feedEntrySearchService for unified search functionality.
- Refactored LexicalRichEditor to support custom nodes from plugins.

This update improves the chat experience by streamlining mention interactions and enhancing search capabilities.

Signed-off-by: Innei <tukon479@gmail.com>

* Enhance mention integration and synchronization in chat editor

- Updated ChatInput layout for improved button positioning.
- Added select-none class to mention styles for better user experience.
- Refactored MentionDropdown to improve the display of mention types and content.
- Introduced useMentionBlockSync hook for bidirectional synchronization between mention nodes and context blocks.
- Enhanced useMentionIntegration to handle mention insertion with node key tracking.
- Implemented useMentionSearchService for streamlined mention search functionality.

These changes improve the overall mention handling and user interaction within the chat editor, making it more intuitive and efficient.

Signed-off-by: Innei <tukon479@gmail.com>

* Refactor ChatInput layout to include ScrollArea for improved scrolling experience

- Wrapped LexicalRichEditor in a ScrollArea component to enhance the input area’s usability.
- Adjusted styles in LexicalRichEditor for better layout consistency.

These changes aim to improve user interaction within the chat input by providing a more flexible scrolling interface.

Signed-off-by: Innei <tukon479@gmail.com>

* Remove deprecated mention functionality and update MentionNode for markdown export

- Deleted mention-related files and types as functionality has been moved to the desktop app.
- Updated MentionNode to change the text content format for markdown export.
- Refactored useMentionBlockSync to remove unused helper functions and streamline dependencies.
- Adjusted LexicalRichEditor placeholder styles for better alignment.

These changes clean up the codebase by removing obsolete mention features and enhancing the current mention handling in the chat editor.

Signed-off-by: Innei <tukon479@gmail.com>

* Implement AI chat message tracking functionality

- Added tracking for AI chat messages sent by integrating the tracker module into the ChatInterface component.
- Introduced a new tracker point for AIChatMessageSent in the TrackerMapper enum.
- Removed deprecated entry tracking methods to streamline the tracking process.

These changes enhance the analytics capabilities of the chat interface by monitoring AI interactions more effectively.

Signed-off-by: Innei <tukon479@gmail.com>

* Update VSCode settings for Tailwind CSS and i18n-ally configuration

- Streamlined the tailwindCSS.experimental.classRegex by removing unnecessary line breaks for better readability.
- Consolidated the tailwindCSS.experimental.configFile and i18n-ally settings into single-line arrays for consistency.
- Ensured proper formatting and alignment of settings to enhance maintainability.

These changes improve the clarity and organization of the VSCode settings file.

Signed-off-by: Innei <tukon479@gmail.com>

---------

Signed-off-by: Innei <tukon479@gmail.com>
2025-08-04 23:06:15 +08:00
..
src feat(ai): add ai mention plugin (#4305) 2025-08-04 23:06:15 +08:00
package.json feat(analytics): add posthog-react-native integration and session management 2025-06-30 19:44:25 +08:00
tsconfig.json refactor: remove unused files and clean up project structure 2025-04-28 20:58:51 +08:00