mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-25 19:30:17 +08:00
09f2fb6538
294 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
d9d8bae2d6 | Merge remote-tracking branch 'origin/main' into feat/agents-new | ||
|
|
422ba52093 |
⬆️ chore: migrate from Claude Code SDK to Claude Agent SDK v0.1.1
- Replace @anthropic-ai/claude-code with @anthropic-ai/claude-agent-sdk@0.1.1 - Update all import statements across 4 files - Migrate patch for Electron compatibility (fork vs spawn) - Handle breaking changes: replace appendSystemPrompt with systemPrompt preset - Add settingSources configuration for filesystem settings - Update vendor path in build scripts - Update package name mapping in CodeToolsService |
||
|
|
db4fcac768 |
feat: enhance Selector component with SearchableSelector and update exports
- Introduced a new SearchableSelector component for improved item selection with search functionality. - Updated the Selector component to streamline item selection and added type exports for better type safety. - Refactored the preferenceSchemas to use the new MathEngine type for better clarity. - Added comprehensive README documentation for the Selector component detailing usage and features. - Updated various components and stories to utilize the new Selector and SearchableSelector components. |
||
|
|
27c31d6e0c |
feat(file): add showInFolder IPC channel to reveal files in explorer
Implement functionality to show files/folders in system explorer through IPC. Includes channel definition, preload API, main handler, and error handling for non-existent paths. |
||
|
|
6c71b92d1d |
refactor: remove ProviderAvatar component and related files
- Deleted the ProviderAvatar component and its associated utility functions and stories to streamline the codebase. - Updated index.ts to remove the export of ProviderAvatar, ensuring a cleaner component structure. |
||
|
|
961ee22327
|
feat: add new provider intel OVMS(openvino model server) (#9853)
* add new provider: OVMS(openvino model server) Signed-off-by: Ma, Kejiang <kj.ma@intel.com> * remove useless comments * add note: support windows only * fix eslint error; add migrate for ovms provider Signed-off-by: Ma, Kejiang <kj.ma@intel.com> * fix ci error after rebase Signed-off-by: Ma, Kejiang <kj.ma@intel.com> * modifications base on reviewers' comments Signed-off-by: Ma, Kejiang <kj.ma@intel.com> * show intel-ovms provider only on windows and intel cpu Signed-off-by: Ma, Kejiang <kj.ma@intel.com> * complete i18n for intel ovms Signed-off-by: Ma, Kejiang <kj.ma@intel.com> * update ovms 2025.3; apply patch for model qwen3-8b on local Signed-off-by: Ma, Kejiang <kj.ma@intel.com> * fix lint issues Signed-off-by: Ma, Kejiang <kj.ma@intel.com> * fix issues for format, type checking Signed-off-by: Ma, Kejiang <kj.ma@intel.com> * remove test code Signed-off-by: Ma, Kejiang <kj.ma@intel.com> * fix issues after rebase Signed-off-by: Ma, Kejiang <kj.ma@intel.com> --------- Signed-off-by: Ma, Kejiang <kj.ma@intel.com> |
||
|
|
99962b740c |
feat: add EmojiAvatar component and update component exports
- Introduced a new EmojiAvatar component for enhanced avatar functionality. - Updated index.ts to export the new EmojiAvatar alongside existing components. - Removed the old display/EmojiAvatar component to streamline the codebase. - Adjusted various components to utilize the new Avatar structure and styling. |
||
|
|
cff9068359 | ♻️ refactor: standardize string quotes and improve logging in Anthropic integration | ||
|
|
cc871b7a72 | ♻️ refactor: enhance logging and provider handling for Anthropic integration | ||
|
|
ef4bede062 |
feat: introduce DescriptionSwitch component and update component exports
- Added a new DescriptionSwitch component to enhance the Switch functionality with a description feature. - Updated the exports in index.ts to include the new DescriptionSwitch alongside existing components. - Refactored the SettingsTab to utilize DescriptionSwitch for improved UI consistency. - Removed the InfoPopover component as part of the cleanup process. |
||
|
|
e6e1fb0404
|
refactor(button): migrate button from antd to heroui (#10292)
* fix(eslint): add Button to restricted antd imports * feat(ui): add Button component with Storybook stories Implement a reusable Button component wrapping HeroUIButton with proper TypeScript props. Add comprehensive Storybook stories demonstrating all button variants, colors, sizes and states. * refactor(components): update ActionIconButton implementation and usage Replace onClick with onPress prop and move icon into icon prop Update component to use @cherrystudio/ui Button instead of antd Simplify props interface and add displayName * refactor(ui): migrate antd buttons to @cherrystudio/ui components update button components across multiple files to use @cherrystudio/ui's Button component replace antd button props with equivalent @cherrystudio/ui props * refactor(InputEmbeddingDimension): replace antd Button with custom Button component Update the Button component to use the custom @cherrystudio/ui Button with updated props for better consistency and maintainability * refactor(components): migrate buttons from antd to @cherrystudio/ui Update button components in LocalBackupModals and LocalBackupManager to use @cherrystudio/ui instead of antd Add flex styling to modal footers for better button alignment * refactor(ProviderSetting): migrate Button components from antd to @cherrystudio/ui Update Button components to use @cherrystudio/ui implementation with new props like variant, color, and startContent Replace onClick handlers with onPress and adjust disabled states * refactor(ui): migrate antd buttons to cherrystudio ui buttons Update button components across multiple files to use @cherrystudio/ui Button instead of antd Button Standardize button props and behavior while maintaining existing functionality * refactor(NutstorePathSelector): update button props to use cherrystudio ui Replace antd Button with cherrystudio ui Button component and update props * refactor(S3BackupManager): migrate antd buttons to @cherrystudio/ui Update button components from antd to @cherrystudio/ui library Change button props to match new library's API (variant, color, onPress, etc) Adjust table props for consistency with new component library * refactor(TranslateButton): replace styled Button with cherrystudio Button component The custom styled Button was replaced with the cherrystudio Button component to maintain consistency across the UI and reduce custom styling code. The functionality remains the same but uses the library's built-in props for styling. * refactor(WebdavBackupManager): replace antd buttons with cherrystudio ui buttons Update button components to use cherrystudio ui library for consistency * refactor(ui): migrate buttons from antd to @cherrystudio/ui Update button components across multiple editor components to use @cherrystudio/ui's Button component instead of antd's. This includes updating props like size, variant, and event handlers to match the new component's API. * refactor(components): migrate buttons from antd to @cherrystudio/ui Update button components in HtmlArtifactsCard and HtmlArtifactsPopup to use @cherrystudio/ui's Button component instead of antd's Button. This includes updating props like icon to startContent, onClick to onPress, and type to variant/color. * refactor(ui): migrate button components from antd to hero ui - replace antd Button with hero ui Button component - update button props interface to extend hero ui props - adjust button props in OAuthButton and MinappPopupContainer * refactor(MultiSelectionPopup): migrate button components to @cherrystudio/ui Update button props to match new component library requirements * refactor(ApiKeyItem): migrate antd buttons to cherrystudio ui components Update button components in ApiKeyItem to use cherrystudio ui library instead of antd * refactor(ApiKeyListPopup): update button props to use new UI library syntax Update button components to use the new syntax from @cherrystudio/ui library, replacing antd Button props with the new variant, color, and isDisabled props. Also adjust icon placement and button types to match the new library's API. * refactor(SelectModelButton): replace antd Button with custom Button component Simplify button implementation by using custom Button component from ui library instead of antd. Remove unused styled component and event handling. * refactor(Preview): migrate ImageToolButton to use @cherrystudio/ui Update ImageToolButton component to use Button from @cherrystudio/ui instead of antd Change onClick prop to onPress to match new Button component API Update related usage in ImageToolbar component * refactor(ui): migrate buttons from antd to cherrystudio ui components Update button components across multiple files to use cherrystudio's Button component instead of antd's. This includes updating props like onClick to onPress and adjusting button styling props to match the new component's API. * refactor(ui): migrate antd buttons to @cherrystudio/ui buttons Update button components from antd to @cherrystudio/ui library Adjust button props to match new component API * refactor(components): update prop names and component usage - Rename onClick to onPress in ImageToolButton test props - Update isLoading to loading in S3BackupManager table props - Change ghost to variant in ProviderSetting button props - Replace antd Button with cherrystudio Button in PreferenceBasicTests * refactor(ImageToolButton): migrate from antd to @cherrystudio/ui * refactor(FilesPage): migrate Button components from antd to @cherrystudio/ui * refactor(SearchMessage): migrate Button components from antd to @cherrystudio/ui * refactor(TopicMessages): migrate Button components from antd to @cherrystudio/ui * refactor(TopicsHistory): migrate Button components from antd to @cherrystudio/ui * refactor(ChatNavigation): migrate Button components from antd to @cherrystudio/ui * refactor(CitationsList): migrate Button components from antd to @cherrystudio/ui * refactor(MessageGroupMenuBar): migrate Button components from antd to @cherrystudio/ui * refactor: reorganize button imports and adjust class order Consolidate Button imports from @cherrystudio/ui to be grouped with other imports Standardize className order for consistency across components * refactor(SelectModelPopup): replace HStack with Flex component for layout * feat: migrate PrivacyPopup from antd Button to @cherrystudio/ui Button - Replace antd Button import with @cherrystudio/ui Button - Update onClick to onPress event handler - Update type="primary" to variant="solid" color="primary" - Maintain existing functionality while following Hero UI API 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * feat: migrate NewTopicButton from antd Button to @cherrystudio/ui Button - Replace antd Button import with @cherrystudio/ui Button - Update size="small" to size="sm" - Update icon prop to startContent for Hero UI API - Update onClick to onPress event handler - Maintain existing styled-components with StyledButton wrapper 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * feat: migrate MessageMcpTool Buttons from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Update two Button components with Hero UI API: - size="small" to size="sm" - onClick to onPress - variant="filled" to variant="solid" - Move icons to startContent prop - Maintain Dropdown.Button as antd component (not migrated) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * feat: migrate SettingsTab Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Update settings icon button with Hero UI API: - type="text" to variant="light" - size="small" to size="sm" - icon prop to isIconOnly with child content - onClick to onPress event handler 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * feat: migrate AssistantTagsPopup Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Update delete tag button with Hero UI API: - type="text" to variant="light" - danger prop to color="danger" - icon prop to isIconOnly with child content - onClick to onPress event handler 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * feat: migrate UpdateAppButton from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Update styled Button component with Hero UI API: - onClick to onPress event handler - icon prop to startContent - color="orange" to color="warning" (closest equivalent) - variant="outlined" to variant="bordered" - size="small" to size="sm" 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(NewTopicButton): replace styled-components with cn utility Simplify component styling by removing styled-components in favor of the cn utility * refactor: organize imports and remove unused event handlers remove duplicate Button imports and clean up stopPropagation handlers * feat: migrate KnowledgeContent Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Update settings icon Button with Hero UI API: - type="text" to variant="light" - size="small" to size="sm" - icon prop to isIconOnly with child content - onClick to onPress event handler - Update ResponsiveButton styled component selector: - .ant-btn-icon + span to [data-slot="icon"] + [data-slot="label"] 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * feat: migrate KnowledgeDirectories Buttons from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Update three Button components with Hero UI API: - Refresh button: type="text" to variant="light", icon to isIconOnly, onClick to onPress - Delete button: type="text" danger to variant="light" color="danger", icon to isIconOnly, onClick to onPress - Add directory button: type="primary" to variant="solid" color="primary", icon to startContent, disabled to isDisabled - Remove stopPropagation from add directory button as not needed with onPress 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * feat: migrate KnowledgeFiles Buttons from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Update three Button components with Hero UI API: - Add file button: type="primary" to variant="solid" color="primary", icon to startContent, disabled to isDisabled - Refresh button: type="text" to variant="light", icon to isIconOnly, onClick to onPress - Delete button: type="text" danger to variant="light" color="danger", icon to isIconOnly, onClick to onPress - Remove stopPropagation from add file button as not needed with onPress 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * feat: migrate KnowledgeNotes Buttons from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Update three Button components with Hero UI API: - Add note button: type="primary" to variant="solid" color="primary", icon to startContent, disabled to isDisabled - Edit button: type="text" to variant="light", icon to isIconOnly, onClick to onPress - Delete button: type="text" danger to variant="light" color="danger", icon to isIconOnly, onClick to onPress - Remove stopPropagation from add note button as not needed with onPress 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * feat: migrate KnowledgeSitemaps Buttons from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Update three Button components with Hero UI API: - Add sitemap button: type="primary" to variant="solid" color="primary", icon to startContent, disabled to isDisabled - Refresh button: type="text" to variant="light", icon to isIconOnly, onClick to onPress - Delete button: type="text" danger to variant="light" color="danger", icon to isIconOnly, onClick to onPress - Remove stopPropagation from add sitemap button as not needed with onPress 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * feat: migrate KnowledgeUrls Buttons from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Update three Button components with Hero UI API: - Add URL button: type="primary" to variant="solid" color="primary", icon to startContent, disabled to isDisabled - Refresh button: type="text" to variant="light", icon to isIconOnly, onClick to onPress - Delete button: type="text" danger to variant="light" color="danger", icon to isIconOnly, onClick to onPress - Remove stopPropagation from add URL button as not needed with onPress 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * feat: migrate KnowledgeVideos Buttons from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Update three Button components with Hero UI API: - Add video button: type="primary" to variant="solid" color="primary", icon to startContent, disabled to isDisabled - Refresh button: type="text" to variant="light", icon to isIconOnly, onClick to onPress - Delete button: type="text" danger to variant="light" color="danger", icon to isIconOnly, onClick to onPress - Remove stopPropagation from add video button as not needed with onPress 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * feat: migrate MinAppsPage Buttons from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Update two settings Button components with Hero UI API: - type="text" to variant="light" - icon prop to isIconOnly with child content - onClick to onPress event handler - Maintain className="nodrag" for draggable interface 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * feat: migrate MiniAppSettings Buttons from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Update two Button components with Hero UI API: - Swap button: onClick to onPress event handler - Reset button: onClick to onPress event handler - Buttons use default Hero UI styling without additional props 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * feat: migrate NewAppButton from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Update two Button components with Hero UI API: - Upload button: icon to startContent - Save button: type="primary" htmlType="submit" to variant="solid" color="primary" type="submit" - Maintain form submission functionality with type="submit" 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor: standardize button imports from @cherrystudio/ui * refactor(KnowledgeContent): replace icon prop with startContent in Button Improve consistency with component library by using startContent prop instead of children for icons * refactor(KnowledgeVideos): update button components to use startContent prop Use startContent prop for icons in buttons to improve consistency with the design system * refactor(MinAppsPage): improve button component structure by using startContent prop * feat: migrate AihubmixPage Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Update Button props with Hero UI API: - size="small" to size="sm" - icon to startContent - onClick to onPress 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * feat: migrate DmxapiPage Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Update Button props with Hero UI API: - size="small" to size="sm" - icon to startContent - onClick to onPress 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * feat: migrate NewApiPage Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Update Button props with Hero UI API: - size="small" to size="sm" - icon to startContent - onClick to onPress - type="primary" to variant="solid" color="primary" 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * feat: migrate SiliconPage Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Update Button props with Hero UI API: - size="small" to size="sm" - icon to startContent - onClick to onPress 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * feat: migrate TokenFluxPage Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Update Button props with Hero UI API: - size="small" to size="sm" - icon to startContent - onClick to onPress 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * feat: migrate ZhipuPage Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Update Button props with Hero UI API: - type="text" to variant="light" - icon to startContent - onClick to onPress - disabled to isDisabled 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * feat: migrate Artboard Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Update Button props with Hero UI API: - onClick to onPress for NavigationButton and CancelButton - type="link" to variant="light" - Maintain styled-components usage for NavigationButton and CancelButton 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * feat: migrate DynamicFormRender Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Update Button props with Hero UI API: - icon to startContent - onClick to onPress - size="small" to size="sm" - danger to color="danger" 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor: convert Button inline styles to Tailwind CSS - Replace style={{borderTopLeftRadius: 0, borderBottomLeftRadius: 0, height: '32px'}} with className="rounded-l-none h-8" - Replace style={{flexShrink: 0, minWidth: 'auto', padding: '0 8px'}} with className="shrink-0 min-w-0 px-2" 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * feat: migrate ImageUploader Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Update Button props with Hero UI API: - size="small" to size="sm" - onClick to onPress 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(Artboard): replace inline styles with tailwind classes Use tailwind classes for consistent styling of navigation buttons instead of inline styles * feat: migrate AboutSettings Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Update Button props with Hero UI API: - onClick to onPress for all Button components - loading to isLoading for CheckUpdateButton - disabled to isDisabled for CheckUpdateButton - Maintain CheckUpdateButton styled component 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * feat: migrate AssistantMemorySettings Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Update Button props with Hero UI API: - type="text" to variant="light" + isIconOnly - icon to startContent - onClick to onPress - size="small" to size="sm" 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * feat: migrate AssistantModelSettings Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Update Button props with Hero UI API: - icon to startContent - onClick to onPress - variant="filled" to variant="solid" - danger + type="primary" to color="danger" variant="solid" - Add isIconOnly for icon-only buttons - Maintain ModelSelectButton styled component 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * feat: migrate AssistantPromptSettings Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Update Button props with Hero UI API: - type="primary" to variant="solid" color="primary" - icon to startContent - onClick to onPress - Convert inline styles to Tailwind CSS: - style={{fontSize: 18, padding: '4px', minWidth: '28px', height: '28px'}} to className="text-lg p-1 min-w-7 h-7" 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor: consolidate Button imports from @cherrystudio/ui Move all Button imports from @cherrystudio/ui to be grouped with other imports from the same package for better consistency and maintainability * feat: migrate AssistantRegularPromptsSettings Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Update Button props with Hero UI API: - type="text" to variant="light" - icon to startContent - onClick to onPress - Add isIconOnly for icon-only buttons - danger to color="danger" 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * feat: migrate DataSettings Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Update Button props with Hero UI API: - onClick to onPress for all buttons - icon to startContent for backup/restore buttons - danger to color="danger" for reset button 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(NutstoreSettings): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Convert onClick to onPress handlers - Update type/danger props to variant/color system - Convert loading to isLoading prop - Convert disabled to isDisabled prop - Update ghost prop to variant="ghost" - Add isIconOnly for folder icon button - Migrate startContent pattern for icons 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(S3Settings): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Convert onClick to onPress handlers - Convert icon props to startContent pattern - Convert loading to isLoading prop - Convert disabled to isDisabled prop 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(SiyuanSettings): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Convert onClick to onPress handler 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(WebDavSettings): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Convert onClick to onPress handlers - Convert icon props to startContent pattern - Convert loading to isLoading prop - Convert disabled to isDisabled prop 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(YuqueSettings): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Convert onClick to onPress handler 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(DisplaySettings): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Convert onClick to onPress handlers - Convert icon props to startContent pattern - Convert variant="text" to variant="light" - Add isIconOnly for icon-only buttons - Replace inline styles with Tailwind CSS classes 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(PreprocessProviderSettings): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Convert onClick to onPress handler - Convert type="text" to variant="light" - Convert size="small" to size="sm" - Convert icon to startContent pattern - Add isIconOnly for icon-only button 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(NotionSettings): replace antd Button with cherrystudio Button and update prop Update the Button import to use cherrystudio's component instead of antd's * refactor(settings): migrate Button props to use startContent and isDisabled Update Button components in LocalBackupSettings to use startContent instead of icon and isDisabled instead of disabled for consistency with the updated UI library * refactor(JoplinSettings): replace Button import and update onPress prop Use Button component from @cherrystudio/ui instead of antd Update onClick to onPress for consistency with component API * refactor(MarkdownExportSettings): replace antd Button with cherrystudio Button in markdown export Update the Button component import and props to use the cherrystudio UI library version instead of antd for consistency * refactor: organize imports in settings components Move Button import from cherrystudio/ui to be grouped with other imports from the same package for better consistency and readability * refactor(AddMcpServerModal): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Convert icon prop to startContent pattern 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(BuiltinMCPServerList): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Convert onClick to onPress handler - Convert type="text" to variant="light" - Convert size="small" to size="sm" - Convert icon to startContent pattern - Convert disabled to isDisabled prop - Add isIconOnly for icon-only button 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(InstallNpxUv): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Convert onClick to onPress handlers - Convert type="primary" to variant="solid" color="primary" - Convert type="link" to variant="light" - Convert shape="circle" to radius="full" - Convert size="small" to size="sm" - Convert loading/disabled to isLoading/isDisabled - Convert icon to startContent pattern - Add isIconOnly for icon-only button - Convert green color to success color 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(McpServerCard): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Convert onClick to onPress handlers (removing e.stopPropagation) - Convert type="text" to variant="light" - Convert size="small" to size="sm" - Convert shape="circle" to radius="full" - Convert danger to color="danger" - Convert icon to startContent pattern - Add isIconOnly for icon-only buttons 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(MCPSettings): reorder Button imports for consistency Move Button imports to be grouped with other UI component imports for better readability and maintainability * refactor(McpServersList): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Convert onClick to onPress handlers - Convert type="default" to variant="solid" - Convert shape="round" to radius="full" - Convert icon to startContent pattern 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(McpServerCard): remove unused event parameter from click handlers The event parameter was not being used in handleOpenUrl and onClickDetails handlers, so it was removed to simplify the code. * refactor(McpServerCard): remove data-no-dnd attribute from Button * refactor(McpSettings): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Convert onClick to onPress handlers - Convert danger to color="danger" - Convert type="text" to variant="light" - Convert type="primary" to variant="solid" color="primary" - Convert shape="round" to radius="full" - Convert loading/disabled to isLoading/isDisabled - Convert icon to startContent pattern - Add isIconOnly for icon-only button 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(McpSettingsNavbar): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Convert onClick to onPress handler - Convert type="text" to variant="light" - Convert size="small" to size="sm" - Convert icon to startContent pattern - Replace inline styles with Tailwind CSS classes 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(NpxSearch): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Convert onClick to onPress handler - Convert type="text" to variant="light" - Convert size="small" to size="sm" - Convert icon to startContent pattern - Add isIconOnly for icon-only button 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(SyncServersPopup): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Convert onClick to onPress handlers - Convert type="default" to variant="solid" - Convert type="primary" to variant="solid" color="primary" - Convert loading/disabled to isLoading/isDisabled 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(MCPSettings/index): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Convert type="default" to variant="solid" - Convert shape="circle" to radius="full" - Convert icon to startContent pattern - Add isIconOnly for icon-only button 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(MemorySettings): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Convert onClick to onPress handlers - Convert type="text" to variant="light" - Convert type="primary" to variant="solid" color="primary" - Convert size="large" to size="lg" - Convert size="small" to size="sm" - Convert loading/disabled to isLoading/isDisabled - Convert danger to color="danger" - Convert icon to startContent pattern - Add isIconOnly for icon-only buttons 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(UserSelector): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Convert onClick to onPress handler - Convert type="default" to variant="solid" - Convert icon to startContent pattern - Add isIconOnly for icon-only button 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(DefaultAssistantSettings): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Convert onClick to onPress handler - Convert type="text" to variant="light" - Convert icon to startContent pattern - Add isIconOnly for icon-only button - Replace inline styles with Tailwind CSS classes 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(QuickModelPopup): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Convert onClick to onPress handler - Change icon prop to startContent - Update type="text" to variant="light" - Add isIconOnly prop for icon-only button 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(NotesSettings): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Convert onClick to onPress handler for all buttons - Change type="default" to variant="solid" - Change type="primary" to color="primary" - Update loading to isLoading prop - Update disabled to isDisabled prop - Change icon prop to startContent - Replace inline style with Tailwind CSS class (ml-2) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(AnthropicSettings): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Convert onClick to onPress handler - Change type="primary" to color="primary" - Update loading to isLoading prop 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(ModelEditContent): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Convert onClick to onPress handler for all buttons - Change size="small" to size="sm" - Update icon prop to startContent for save and reset buttons - Change iconPosition="end" to endContent for more settings toggle - Update type="text" to variant="light" and add isIconOnly for reset button - Change type="primary" to color="primary" - Replace htmlType="submit" with type="submit" - Update variant="filled" to variant="solid" 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(ModelTypeSelector): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Convert onClick to onPress handler - Change size="small" to size="sm" 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(GithubCopilotSettings): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Convert onClick to onPress handler for all buttons - Change type="primary" to color="primary" - Change type="primary" danger to color="danger" - Update size="small" to size="sm" - Update loading to isLoading prop - Update disabled to isDisabled prop - Change icon prop to startContent for copy button 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(AddModelPopup): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Change type="primary" to color="primary" - Replace htmlType="submit" with type="submit" - Change size="middle" to size="md" 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(ModelList): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Convert onClick to onPress handler for all buttons - Change type="text" to variant="light" and add isIconOnly for icon button - Change type="primary" to color="primary" - Change type="default" to variant="solid" - Update disabled to isDisabled prop - Change icon prop to startContent for all buttons 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(ModelListGroup): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Convert onClick to onPress handler - Change type="text" to variant="light" - Update disabled to isDisabled prop - Change icon prop to startContent - Remove e.stopPropagation() as no longer needed - Add isIconOnly prop for icon-only button 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(ModelListItem): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Convert onClick to onPress handler for both buttons - Change type="text" to variant="light" - Update disabled to isDisabled prop - Change icon prop to startContent for both buttons - Add isIconOnly prop for icon-only buttons 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(NewApiAddModelPopup): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Change type="primary" to color="primary" - Replace htmlType="submit" with type="submit" - Change size="middle" to size="md" 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(NewApiBatchAddModelPopup): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Change type="primary" to color="primary" - Replace htmlType="submit" with type="submit" - Change size="middle" to size="md" 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(ProviderList): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Convert onClick to onPress handler - Update disabled to isDisabled prop - Change icon prop to startContent - Keep existing style attributes for custom styling 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(ProviderOAuth): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Convert onClick to onPress handler for both buttons - Change shape="round" to radius="full" - Change icon prop to startContent for both buttons 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(UrlSchemaInfoPopup): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Convert onClick to onPress handler - Change type="link" to variant="light" - Change size="small" to size="sm" - Change icon prop to startContent - Add isIconOnly prop for icon-only button 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(QuickAssistantSettings): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Convert onClick to onPress handler for both styled buttons - Change type="primary" to color="primary" - Change type="default" to color="default" - Update styled component to use new Button from @cherrystudio/ui 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(QuickPhraseSettings): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Convert onClick to onPress handler for all buttons - Change type="text" to variant="light" - Change icon prop to startContent for all buttons - Change danger prop to color="danger" - Add isIconOnly prop for all icon-only buttons 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(SelectionAssistantSettings): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Convert onClick to onPress handler for both buttons - Change type="link" to variant="light" - Change icon prop to startContent - Keep existing style attributes for custom styling 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(ActionsListItem): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Convert onClick to onPress handler for all buttons - Change type="link" to variant="light" - Change size="small" to size="sm" - Change danger prop to color="danger" - Add isIconOnly prop for all icon-only buttons 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(MacProcessTrustHintModal): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Convert onClick to onPress handler for both buttons - Change type="link" to variant="light" - Change type="primary" to color="primary" - Keep existing style attributes for custom styling 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(SelectionActionSearchModal): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Convert onClick to onPress handler - Change type="link" to variant="light" - Change size="small" to size="sm" - Keep existing style attributes for custom styling 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(SelectionFilterListModal): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Convert onClick to onPress handler for both modal buttons - Change type="primary" to color="primary" - Keep existing key attributes for modal footer 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(SettingsActionsListHeader): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Convert onClick to onPress handlers - Update icon prop to startContent with Plus icon - Change disabled to isDisabled - Add color="primary" for primary button style - Update styled ResetButton to use variant="light" 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(ShortcutSettings): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Convert onClick to onPress handlers for all buttons - Update icon prop to startContent for icon buttons - Change disabled to isDisabled - Convert size="small" to size="sm" - Replace shape="circle" with isIconOnly for circular buttons - Migrate reset undo button, clear button, and reset all button 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(ApiServerSettings): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Convert onClick to onPress handlers for all buttons - Update icon prop to startContent for documentation and copy buttons - Change type="primary" to color="primary" - Convert type="link" to variant="light" for regenerate button - Change disabled to isDisabled for input button and regenerate button 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(CustomLanguageModal): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Convert onClick to onPress handlers for modal footer buttons - Change type="primary" to color="primary" for save button - Convert icon prop to startContent with isIconOnly for emoji button - Migrate cancel, save, and emoji picker buttons to Hero UI API 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(CustomLanguageSettings): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Convert onClick to onPress handlers for all buttons - Update icon prop to startContent for edit, delete, and add buttons - Change type="primary" to color="primary" for add button - Convert danger prop to color="danger" for delete button - Migrate table action buttons and primary add button to Hero UI API 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(AddSubscribePopup): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Convert type="primary" to color="primary" for submit button - Change htmlType="submit" to type="submit" following Hero UI API - Migrate form submit button from antd to Hero UI 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(BlacklistSettings): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Convert onClick to onPress handlers for all buttons - Change type="primary" to color="primary" for subscribe buttons - Convert ghost prop to variant="ghost" - Change disabled to isDisabled for all button states - Migrate save, add subscribe, update subscribe, and delete buttons 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(WebSearchProviderSetting): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Convert onClick to onPress handlers for API key list and check buttons - Change type="text" to variant="light" for API key list button - Convert icon prop to startContent with isIconOnly for list button - Update size="small" to size="sm" - Change ghost prop to variant="ghost" and type to color for check button - Convert disabled to isDisabled for API checking state 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(TranslateSettings): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Convert onClick to onPress for more settings button - Simple migration for modal footer button 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(MigrateApp): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Convert onClick to onPress handlers for all migration buttons - Change type="primary" to color="primary" for primary buttons - Convert disabled to isDisabled for migration in progress button - Change size="small" to size="sm" for debug button - Convert type="dashed" to variant="bordered" for styled buttons - Migrate all buttons in migration workflow stages 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor(SelectionActionApp): migrate Button from antd to @cherrystudio/ui - Replace antd Button import with @cherrystudio/ui Button - Convert onClick to onPress handlers for all window control buttons - Change type="text" to variant="light" for all title bar buttons - Update icon prop to startContent for pin, opacity, minimize, and close buttons - Add isIconOnly prop for all icon-only buttons in the title bar - Migrate styled WinButton component to use Hero UI Button as base 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * style(ActionIconButton): remove fixed dimensions and add size prop Simplify button styling by removing fixed height/width and using size="sm" prop instead * refactor(AssistantPromptSettings): migrate from antd Popover to hero-ui components Replace antd Popover with hero-ui Popover and Tooltip components for better consistency Rename EmojiButtonWrapper to EmojiDeleteButtonWrapper for clarity * style(AssistantModelSettings): add size prop to delete button in model settings * style(settings): standardize button sizes and replace Space.Compact with Flex Consistently apply 'sm' size to buttons across settings components and replace deprecated Space.Compact with Flex component for better layout consistency * refactor(ApiServerSettings): replace custom buttons with standard Button component remove custom styled InputButton and RegenerateButton components in favor of using the standard Button component with appropriate props * style(ProviderSetting): make settings button icon-only for consistency * style(ui): update icon styling and button props remove global lucide icon color override update button components to use consistent props * style(ProviderList): adjust button size to match design * feat(theme): add foreground color calculation for primary theme Calculate and set foreground color based on primary theme color to ensure proper contrast * style(KnowledgeFiles): make button size consistent with other buttons * test: update test snapshots for button components Update test snapshots to reflect changes in button styling and accessibility attributes. The changes include updated class names, ripple effects, and focus states. --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: fullex <106392080+0xfullex@users.noreply.github.com> Co-authored-by: MyPrototypeWhat <daoquqiexing@gmail.com> |
||
|
|
e5a3363021 | Merge branch 'main' of github.com:CherryHQ/cherry-studio into v2 | ||
|
|
027d6ea2b2 | Merge remote-tracking branch 'origin/main' into feat/agents-new | ||
|
|
483b4e090e
|
feat(toolUsePlugin): separate provider-defined tools from prompt tool (#10428)
* feat(toolUsePlugin): separate provider-defined tools from prompt tools in context - Enhanced the `createPromptToolUsePlugin` function to distinguish between provider-defined tools and other tools, ensuring only non-provider-defined tools are saved in the context. - Updated the handling of tools in the transformed parameters to retain provider-defined tools while removing others. - Improved error handling in `ToolExecutor` by logging tool and tool use details for better debugging. - Refactored various components to use `NormalToolResponse` instead of `MCPToolResponse`, aligning with the new response structure across multiple message components. * refactor(toolUsePlugin): streamline tool handling in createPromptToolUsePlugin - Updated the `createPromptToolUsePlugin` function to improve type handling for tools, ensuring proper type inference and reducing the use of type assertions. - Enhanced clarity in the separation of provider-defined tools and prompt tools, maintaining functionality while improving code readability. * refactor(ToolExecutor): remove debug logging for tool and tool use - Removed console logging for tool and tool use details in the ToolExecutor class to clean up the code and improve performance. This change enhances the clarity of the code without affecting functionality. |
||
|
|
cfdeb124b9 | Merge branch 'main' of github.com:CherryHQ/cherry-studio into feat/agents-new | ||
|
|
228ed474ce |
chore: update @ai-sdk/google patch and modify getModelPath function
- Updated the resolution and checksum for the @ai-sdk/google patch in yarn.lock. - Removed the patch reference from package.json for @ai-sdk/google. - Modified the getModelPath function to simplify its implementation, removing the baseURL parameter. |
||
|
|
4d133d59ea |
feat: enhance Anthropic API support for compatible providers
- Add support for anthropicApiHost configuration in providers - Improve model filtering for Anthropic-compatible providers - Add isAnthropicModel function to validate Anthropic models - Update ClaudeCode service to support compatible providers - Enhance logging and error handling in API routes - Fix model transformation and validation logic |
||
|
|
35b885798b |
Add Anthropic API Host support for compatible providers
- Add `anthropicApiHost` field to Provider type - Update provider config and migration to set Anthropic endpoints - Add UI for configuring Anthropic API Host in provider settings - Update SDK client logic to use Anthropic API Host when available - Add i18n strings for Anthropic API Host configuration |
||
|
|
45961d2eda | Merge remote-tracking branch 'origin/main' into feat/agents-new | ||
|
|
b85040f579 |
chore: update dependencies and versioning
- Bump version to 1.6.1 in package.json. - Add patch for @ai-sdk/google@2.0.14 to address specific issues. - Update yarn.lock to reflect the new dependency resolution for @ai-sdk/google. - Modify getModelPath function to accept baseURL parameter for improved flexibility. |
||
|
|
499cb52e28
|
feat: enhance terminal command handling for macOS (#10362)
- Introduced a helper function to escape strings for AppleScript to ensure proper command execution. - Updated terminal command definitions to utilize the new escape function, improving compatibility with special characters. - Adjusted command parameters to use double quotes for directory paths, enhancing consistency and reliability. |
||
|
|
8a9b633af2 | Merge branch 'main' of github.com:CherryHQ/cherry-studio into v2 | ||
|
|
ac3dfcbfbe | Merge branch 'main' of github.com:CherryHQ/cherry-studio into v2 | ||
|
|
8e163b8f17 | Merge branch 'main' of github.com:CherryHQ/cherry-studio into feat/agents-new | ||
|
|
37218eef4f | feat: enable cherryin provider | ||
|
|
183b46be9e |
feat(ipc): add App_Quit channel and update related handlers
- Introduced a new IPC channel for quitting the application. - Updated ipc.ts to handle the App_Quit channel, allowing the app to quit when invoked. - Added corresponding quit method in the preload API for client-side access. - Fixed a minor URL check in WindowService to ensure proper navigation handling. |
||
|
|
1d5761b1fd
|
WIP | ||
|
|
335bf47dbd
|
Merge branch 'feat/agents-new' of https://github.com/CherryHQ/cherry-studio into feat/agents-new | ||
|
|
26ac9e3c2e | fix(getSdkClient): add authToken to anthropic client initialization for claude code | ||
|
|
6f6944d003
|
chunk type | ||
|
|
a32fad06a0 | Merge remote-tracking branch 'origin/main' into feat/agents-new | ||
|
|
a09c52424f | 💄 style: format code with yarn format | ||
|
|
b869869e26 |
✨ feat: implement comprehensive Claude Code OAuth integration and API enhancements
- Add shared Anthropic utilities package with OAuth and API key client creation - Implement provider-specific message routing alongside existing v1 API - Enhance authentication middleware with priority handling (API key > Bearer token) - Add comprehensive auth middleware test suite with timing attack protection - Update session handling and message transformation for Claude Code integration - Improve error handling and validation across message processing pipeline - Standardize import formatting and code structure across affected modules This establishes the foundation for Claude Code OAuth authentication while maintaining backward compatibility with existing API key authentication methods. |
||
|
|
5ac09d5311
|
refactor: migrate to toast from antd message (#10233)
* style(eslint): reorganize eslint config comments and rules Move comments to consistent positions above their corresponding rules Update antd import restriction to include 'message' component * fix(eslint): reorganize eslint config to enable custom rules * fix(eslint): update antd import restriction to include message Prevent direct imports of both Flex and message from antd, enforcing usage of custom components * feat(migration): add toast utilities to migrate and test apps Initialize toast utilities on window object for both migration and test applications to enable toast notifications * build(ui): add path aliases for types and utils modules * refactor(toast): move toast utilities to ui package for better reusability Centralize toast utilities in the @cherrystudio/ui package to improve code organization and reuse across multiple components. This change includes: - Moving toast implementation to ui package - Updating all imports to use the new location - Adding proper type definitions * refactor: replace antd message with window.toast for consistency Replace all instances of antd's message component with window.toast throughout the application to maintain consistent notification behavior. Also add an ignore rule for dataRefactorTest files in eslint config. |
||
|
|
36f86ff2b9
|
Refactor/agent align (#10276)
* Refactor agent streaming from EventEmitter to ReadableStream Replaced EventEmitter-based agent streaming with ReadableStream for better compatibility with AI SDK patterns. Modified SessionMessageService to return stream/completion pair instead of event emitter, updated HTTP handlers to use stream pumping, and added IPC contract for renderer-side message persistence. * Add accessible paths management to agent configuration Move accessible paths functionality from session modal to agent modal, add validation requiring at least one path, and update form handling to inherit agent paths in sessions. * Add provider_name field to model objects and improve display - Add provider_name field to ApiModel schema and transformation logic - Update model options to include providerName for better display - Improve provider label fallback chain in model transformation - Fix agent hook to use proper SWR key and conditional fetching - Enhance option rendering with better truncation and provider display * fix(i18n): Auto update translations for PR #10276 * Optimize chat components with memoization and shared layout - Wrap `SessionMessages` and `SessionInputBar` in `useMemo` to prevent unnecessary re-renders - Refactor `AgentSessionMessages` to use shared layout components and message grouping - Extract common styled components to `shared.tsx` for reuse across message components * Add smooth animations to SessionsTab and Sessions components - Replace static conditional rendering with Framer Motion animations for no-agent and session states - Animate session list items with staggered entrance and exit transitions - Add loading spinner animation with fade effect - Apply motion to session creation button with delayed entrance * Add loading state with spinner and i18n support to SessionsTab - Replace static "No active agent" message with a spinner and loading text - Integrate react-i18next for translation of loading message - Adjust animation timing and styling for smoother loading state transition * Support API models with provider_name field in getModelName - Add ApiModel type import and update function signature to accept ApiModel - Return formatted name using provider_name field for API models - Maintain backward compatibility for legacy models by looking up provider in store * Simplify provider display name logic and add debug logging - Replace complex fallback chain for provider display name with direct provider name access - Add console.log for model debugging in getModelName function * Extract model name from session model string - Use split and pop to isolate the model name after the colon - Fall back to the full model string if no colon is present - Maintain provider and group identifiers for model object consistency * Improve model name resolution for agent sessions - Extract actual model ID from session model string and resolve model details - Use resolved model name, provider, and group when available instead of defaults - Remove redundant API model handling in getModelName function * Set default active agent and session on load - Automatically select first agent if none active after loading - Automatically select first session per agent if none active after loading - Prevent empty selection states in UI components --------- Co-authored-by: GitHub Action <action@github.com> |
||
|
|
d4fd8ffdcc |
refactor(SettingsTab): update Selector component usage for consistency
- Simplified Selector component usage in SettingsTab by removing deprecated props and updating to the new API. - Added size and label props to enhance accessibility and user experience. - Ensured consistent handling of selected keys and selection change events across multiple instances of Selector. |
||
|
|
84274d9d85 | Merge branches 'v2' and 'main' of github.com:CherryHQ/cherry-studio into v2 | ||
|
|
a72feebead
|
refactor: migrate Switch from antd to heroui (#10237)
* refactor(eslint): reorganize eslint config for better maintainability Move ignores section and oxlint configs to be grouped with other configurations * fix(eslint): update antd import restriction to include Switch Add Switch to restricted imports from antd to enforce using custom components * feat(ui): add Switch component wrapper and update imports Add a wrapper for the Switch component from @heroui/react and export it through @cherrystudio/ui. Update eslint rules to prevent direct imports from @heroui/react and update imports in TranslateSettings to use the new wrapper * refactor(ui): replace antd Switch with custom Switch component Migrate all instances of antd Switch component to the custom Switch component from @cherrystudio/ui. This includes updating props from `checked` to `isSelected` and `onChange` to `onValueChange` to match the new component's API. Also updates size prop from `small` to `sm` where applicable. The change ensures consistency across the UI and reduces dependency on antd components. All affected files have been updated to use the new Switch component with proper prop mappings. * feat(ui): enhance Switch component with loading state Add loading state support to Switch component by showing a spinner when isLoading is true and disabling interaction during loading. Update all Switch component usages to use the new isLoading prop instead of loading. * fix(Switch): prevent thumbIcon override when isLoading is true Implement type constraints to disallow thumbIcon when isLoading is true Add ref forwarding support and export enhanced props type * fix(settings): update Switch component props to use consistent naming Change deprecated 'defaultChecked' and 'disabled' props to 'defaultSelected' and 'isDisabled' respectively to match component library updates * refactor(Switch): simplify type definition by removing redundant ref prop * refactor(Switch): simplify props type definition for loading state Remove complex union type in favor of simpler interface extending SwitchProps * docs(ui): add jsdoc for CustomizedSwitch component Add documentation for the CustomizedSwitch component to clarify its purpose and the isLoading prop usage * fix(eslint): comment out heroui import restriction rule Temporarily disable the heroui import restriction to allow direct imports while wrapped components are being updated * style: fix formatting and spacing in settings components |
||
|
|
5dac1f5867
|
feat: support more terminal in code tools (#10192)
* feat(CodeTools): add support for terminal selection on macOS - Introduced terminal selection functionality in CodeTools, allowing users to choose from available terminal applications. - Implemented caching for terminal availability checks to enhance performance. - Updated CodeToolsService to preload available terminals and check their availability. - Enhanced UI in CodeToolsPage to display terminal options and handle user selection. - Added new IPC channel for retrieving available terminals from the main process. * lint errs * format * support wezterm * support terminal * support ghostty * support warp kitty * fix github scanner issues * fix all github issues * support windows * support windows * suppport hyper * Refactor terminal command execution for macOS applications to use shell scripts instead of AppleScript, improving compatibility and performance. * Remove Hyper terminal configuration from shared constants * update lint * fix(i18n): Auto update translations for PR #10192 * fix platform checking * format * feat: add Tabby terminal configuration for macOS * fix wrap terminal * delete warp --------- Co-authored-by: GitHub Action <action@github.com> |
||
|
|
89d5bd817b
|
fix: Add AWS Bedrock reasoning extraction middleware (#10231)
* Add AWS Bedrock reasoning extraction middleware - Add 'reasoning' tag to tagNameArray for broader reasoning support - Add AWS Bedrock case with gpt-oss model-specific reasoning extraction - Add openai-chat and openrouter cases to provider options switch - Remove unused zod import * Add OpenRouter provider support Updates ai-core to version alpha.18 with OpenRouter integration and improves provider ID resolution for OpenAI API hosts. |
||
|
|
ecc9923050 | Merge remote-tracking branch 'origin/main' into v2 | ||
|
|
e469016775 |
style(Selector.stories): simplify Selector component stories by condensing JSX structure
- Refactored the Selector component stories to use a more concise JSX format, improving readability. - Ensured consistent formatting across size variations for better maintainability. |
||
|
|
15569387c7 |
feat(ui): implement new Selector component with enhanced functionality
- Replaced the existing Selector component with a new implementation using HeroUI's Select and SelectItem. - Updated the props structure to support items and selection change handling. - Added a new story file for the Selector component, showcasing various use cases including single and multiple selection modes, size variations, and disabled states. - Improved type definitions for better clarity and usability. |
||
|
|
4f746842a5
|
refactor: migrate Flex from antd to custom Flex component (#10083)
* refactor(components): rename HStack and VStack to RowFlex and ColFlex for clarity rename HStack to RowFlex and VStack to ColFlex across all components to better reflect their purpose as flex containers with row and column directions. This improves code readability and maintainability while keeping the same functionality. All references to these components have been updated accordingly. * refactor(layout): migrate layout components from .ts to .tsx The layout components have been moved from TypeScript (.ts) to TypeScript with JSX (.tsx) to better support JSX syntax and improve type safety. The functionality remains unchanged. * refactor(Layout): convert styled Box component to functional component Improve maintainability by converting styled-component to a functional component with explicit style props. This provides better type safety through CSSProperties interface and makes the component easier to debug. * refactor(Layout): restructure Box component and convert styled components to functional - Replace styled-components with functional components for Stack and Center - Rename style variable to _style in Box component to avoid naming conflict - Add style prop to Box component to allow external style overrides * refactor(components): rename HSpaceBetweenStack to SpaceBetweenRowFlex for clarity * refactor(Layout): pass through props in Stack components Allow additional props to be passed to Stack and its variants for better flexibility. Convert RowFlex from styled component to regular component for consistency. * refactor(Layout): convert SpaceBetweenRowFlex from styled to component Improve maintainability by converting styled component to a regular component that explicitly passes justifyContent prop * refactor(Layout): convert ColFlex to component and type RowFlex props Improve type safety by explicitly omitting flexDirection from StackProps and convert ColFlex from styled component to regular component for consistency * refactor(Layout): convert BaseTypography from styled to component Improve type safety and maintainability by converting styled component to regular React component with TypeScript interface * refactor(Layout): remove unused BaseTypography component * refactor(Layout): remove unused Container component and interface * refactor(layout): rename Stack to Flex and use CSSProperties types The Stack component was renamed to Flex to better reflect its purpose and align with common naming conventions. The interface properties were also updated to use CSSProperties types for better type safety and consistency with CSS standards. * refactor(Layout): move FlexProps interface and comment out unused ButtonProps Clean up component interfaces by moving FlexProps closer to its usage and commenting out unused ButtonProps interface to reduce clutter * refactor(layout): standardize flex props from alignItems/justifyContent to align/justify The changes standardize the flex-related props in the Layout component and across multiple files from using alignItems/justifyContent to the shorter align/justify. This improves consistency and reduces verbosity in the codebase while maintaining the same functionality. All instances of alignItems have been replaced with align and justifyContent with justify in Flex, RowFlex, ColFlex and related components. The changes are purely syntactic and do not affect the actual layout behavior. This refactoring makes the code more maintainable by using a consistent naming convention for flex properties throughout the application. * refactor(Layout): extend BoxProps with React div props * feat(Layout): add flexWrap prop to Flex component interface Add flexWrap property to FlexProps interface to support CSS flex-wrap functionality. Also replace antd Flex with custom Flex component in TagFilterSection. * refactor(components): replace antd Flex with custom Layout components Consolidate Flex component usage across multiple files by replacing antd's Flex with custom Layout components (Flex, ColFlex, RowFlex) for better maintainability and consistency * refactor(components): migrate antd Flex tu custom Flex * refactor(components): update layout component usage for consistency replace RowFlex with ColFlex where appropriate and align prop names * refactor(tests): rename HStack to RowFlex in test components Update test snapshots and mock components to reflect the component name change from HStack to RowFlex Remove unused data-vertical attribute from preview container * refactor(Layout): pass through props and merge styles in Box and Flex components Improve component flexibility by allowing additional props to pass through and properly merging style objects in both Box and Flex components * refactor(Layout): make Flex component props optional with undefined defaults * test: update TagFilterSection snapshot to include wrap style * perf(Layout): optimize Box component style calculation with useMemo * docs: fix typo in Layout component comment * refactor(Layout): update BoxProps to use CSSProperties types Standardize prop types by using CSSProperties for style-related props to improve type safety and consistency with React's style system * feat(Layout): add wrap prop to Flex component * style(TagFilterSection): update snapshot styling to use flex-wrap property * refactor(Layout): simplify layout components by using Tailwind CSS classes Remove custom style calculations and props in favor of Tailwind utility classes * refactor: replace inline styles with Tailwind CSS classes for consistent styling style: update spacing and alignment utilities across components * refactor(tests): update test snapshots to use tailwind classes Replace inline styles with tailwind classes in test snapshots and update test assertions to match. This improves consistency with the codebase's styling approach. * style: adjust spacing and gaps in UI components for consistency * style: replace inline styles with tailwind classes for consistency Refactor various components to use tailwind classes instead of inline styles to maintain consistency and improve readability. Changes include: - Replacing style attributes with tailwind classes for spacing, margins, and padding - Standardizing gap sizes across components - Using tailwind for width, height, and other layout properties - Updating test files to match new class names * style(settings): replace inline styles with tailwind classes for consistency Refactor settings components to use tailwind gap utility instead of inline styles for better maintainability and consistency across the codebase * refactor(styles): replace inline styles with tailwind classes for consistency * feat(eslint): add rule to restrict antd Flex imports Enforce using custom Layout components instead of antd's Flex by adding a restricted import rule * refactor: migrate flex layout from antd props to tailwind classes - Replace antd Flex component props with tailwind classes for consistency - Update gap and alignment values to use tailwind's spacing scale - Remove unused antd Flex imports to clean up dependencies * style(settings): adjust spacing and layout in various settings components - Add gap spacing between elements in multiple settings components - Remove redundant flex class in some components - Standardize gap sizes across related components * refactor(ui): replace inline styles with tailwind classes for consistency Replace various inline style attributes with equivalent tailwind classes across multiple components to maintain consistent styling approach. Changes include margin, padding, width, and flex properties. - Convert style attributes to tailwind classes - Standardize spacing values using tailwind's spacing scale - Improve maintainability by using utility classes * style(ui): adjust spacing in model list group header * style(css): wrap base styles in @layer for better organization * style(css): fix indentation and nesting in global styles * style(settings): adjust spacing in model list and convert subtitle to cn Refactor SettingSubtitle to use cn utility for better className handling Add gap spacing between model list items for improved layout * style(css): move some styles from base layer to outer in index.css * refactor(components): replace HStack with RowFlex for consistency Update layout components to use RowFlex instead of HStack to maintain consistent naming * style: reorder imports in useAppInit and BaseApiClient files * fix(MinAppTabsPool): wrong import path * refactor: update style file extensions from scss to css Update file extensions and comments to reflect the change from SCSS to CSS stylesheets * feat(layout): add Flex component and its variants Introduce new Flex component with Box, RowFlex, SpaceBetweenRowFlex, ColFlex and Center variants to provide reusable layout components * refactor: migrate layout components to @cherrystudio/ui package This commit updates all imports of layout components (Box, Flex, RowFlex, ColFlex, etc.) from '@renderer/components/Layout' to '@cherrystudio/ui' across the codebase. The change also includes updating related test files and eslint configuration to reflect this migration. This refactoring aims to centralize layout components in a shared package for better maintainability and consistency. * docs(eslint): update comment and restricted imports rule Update comment to clarify the purpose of the rule and add a TODO note for future migration * docs(ui): update migration status for layout components Mark Layout/* components as migrated and refactored in both Chinese and English documentation * docs: update migration status for Layout components |
||
|
|
aab941d89c
|
refactor: migrate sortable (#10204)
* refactor: rename sortable dir * refactor: migrate Sortable to the ui package * feat: add stories for Sortable * refactor: add scroller to the vertical story * refactor: improve hints and width * refactor: simplify item style * fix: lint errors * chore: dependencies * refactor: move hooks * fix: import errors * style: format * style: format |
||
|
|
1b04fd065d |
refactor(ui): enhance CustomCollapse and ToolsCallingIcon components
- Refactored CustomCollapse to utilize Accordion and AccordionItem from HeroUI, simplifying props and improving functionality. - Updated ToolsCallingIcon to accept TooltipProps for better customization. - Revised stories for CustomCollapse to reflect new prop structure and added examples for various use cases. - Cleaned up unnecessary props and improved documentation in story files. |
||
|
|
a8bf55abc2
|
refactor: 将网络搜索参数用于模型内置搜索 (#10213)
* Remove local provider option files and use external packages Replace local implementation of XAI and OpenRouter provider options with external packages (@ai-sdk/xai and @openrouter/ai-sdk-provider). Update web search plugin to support additional providers including OpenAI Chat and OpenRouter, with improved configuration mapping. * Bump @cherrystudio/ai-core to v1.0.0-alpha.17 fix i18n * fix(i18n): Auto update translations for PR #10213 --------- Co-authored-by: GitHub Action <action@github.com> |
||
|
|
76b3ba5d7e |
feat(ui): integrate @storybook/addon-themes and enhance CustomCollapse component
- Added @storybook/addon-themes to package.json and yarn.lock for theme support in Storybook. - Updated CustomCollapse component to utilize HeroUI's Accordion and AccordionItem for improved functionality and styling. - Removed the ReasoningIcon component as it was deemed unnecessary. - Enhanced ProviderAvatar component to ensure consistent className handling. - Added new stories for FileIcons, SvgSpinners180Ring, and ToolsCallingIcon to showcase their usage and variations. |
||
|
|
355e5b269d | Merge branch 'main' of github.com:CherryHQ/cherry-studio into v2 | ||
|
|
d4b0272fe7
|
refactor: prefer import type (#10190)
* style(linter): enable consistent-type-imports rule in typescript * chore: add biome to lint script for improved code formatting * chore: add oxlint-specific lint script for faster linting * refactor: use type-only imports for better type safety and clarity |
||
|
|
ee95fad7e5
|
feat: add support for iflow cli (#10198)
Signed-off-by: 本x <liyuyun.lyy@alibaba-inc.com> |
||
|
|
59bf94b118 |
refactor(ui): update migration status and enhance component implementations
- Increased the refactored component count to 18 and reduced pending migrations to 184 in the migration status files. - Improved the Ellipsis, ListItem, MaxContextCount, and ThinkingEffect components by simplifying their structure and enhancing styling. - Updated the tsconfig.json to adjust the root directory for better project organization. - Removed unnecessary alias configurations in tsdown.config.ts for cleaner setup. - Added new stories for Ellipsis and ListItem components to improve documentation and showcase their usage. |
||
|
|
bd7cd22220 |
refactor: update data management documentation and structure
- Renamed "State Management" to "Data Management" in CLAUDE.md for clarity. - Enhanced data management section with detailed descriptions of Cache System, Preference System, and User Data API. - Updated README.md in shared/data to reflect new directory structure and provide clearer organization of type definitions and schemas. - Added guidelines for selecting appropriate data access patterns based on data characteristics. |
||
|
|
f48674b2c7 |
refactor(ui): clean up component code and improve styling
- Refactored EmojiIcon, ExpandableText, and ProviderAvatar components for better readability and consistency. - Simplified JSX structure and improved styling in ExpandableText and EmojiAvatar stories. - Enhanced code formatting in various files for improved maintainability. |
||
|
|
56af6f43c0 |
refactor(ui): update button elements to include type attribute
- Added type="button" to button elements in DividerWithText and Icon stories for better accessibility and to prevent unintended form submissions. - Improved code consistency across button components in the UI stories. |
||
|
|
f83c3e171e |
chore(ui): update migration status and component files
- Updated migration status to reflect the migration of additional components, reducing the total migrated count to 34 and increasing the refactored count to 14. - Enhanced component files by refactoring several components to improve structure and styling, including CopyButton, CustomTag, and IndicatorLight. - Added new stories for components such as CopyButton, CustomCollapse, and DividerWithText to improve documentation and showcase usage. - Adjusted TypeScript configuration to include story files for better type checking. |
||
|
|
d397a43806 |
fix: typecheck/test:lint/format:check
feat: add data related test |
||
|
|
8cc6b08831 |
chore(ui): update package.json and migration status files
- Reformatted keywords and files array in package.json for better readability. - Updated migration status to reflect the migration of additional components, increasing the total migrated count to 46 and reducing pending migrations to 190. - Added new components to the migration status table, including ErrorBoundary and ProviderAvatar, while removing deprecated components like ErrorTag, SuccessTag, and WarnTag. |
||
|
|
ffe897d58c |
chore: update yarn.lock and refactor SettingsTab component
- Added "@typescript-eslint/visitor-keys@npm:8.43.0" to yarn.lock. - Refactored getVirtualIndexes in DraggableVirtualList to use item.index. - Replaced useSettings with usePreference for codeFancyBlock in SettingsTab. - Updated Switch component to use setCodeFancyBlock directly. |
||
|
|
182ac3bc98 | Merge branch 'main' of github.com:CherryHQ/cherry-studio into v2 | ||
|
|
c0cca4ae44 |
chore: update configuration and improve cache management
- Added "packages/ui/scripts/**" to .oxlintrc.json for linting. - Excluded ".claude/**" from biome.jsonc. - Refactored API path types in apiPaths.ts for better clarity. - Updated error handling in errorCodes.ts to ensure stack trace is always available. - Modified preferenceSchemas.ts to include new features and updated generated timestamp. - Cleaned up tsconfig.json for better organization. - Adjusted CustomTag component to improve rendering logic. - Enhanced CodeEditor utility functions for better type safety. - Improved Scrollbar story for better readability. - Refactored CacheService to streamline comments and improve documentation. - Updated useCache and useSharedCache hooks for better clarity and functionality. - Cleaned up selectionStore and settings.ts by commenting out deprecated actions. - Updated DataApiHookTests for better optimistic update handling. |
||
|
|
5451e2f34a
|
Perf/tsgo (#10188)
* feat: update tsgo * chore: update alpha.15 * feat: add script * chore: update ai-core version to alpha.16 and add npm registry settings * chore |
||
|
|
8981d0a09d
|
refactor(CodeEditor): decouple CodeEditor and global settings (#10163)
* refactor(CodeEditor): decouple CodeEditor and global settings * refactor: improve language extension fallbacks * refactor: make a copy of CodeEditor in the ui package * refactor: update ui CodeEditor and language list * refactor: use CodeEditor from the ui package * feat: add a story for CodeEditor |
||
|
|
75d5dcf275 | Merge branch 'main' of github.com:CherryHQ/cherry-studio into v2 | ||
|
|
d8f4825e5e | Merge branch 'v2' of github.com:CherryHQ/cherry-studio into v2 | ||
|
|
c242abd81a |
feat: refactor cache management and update component dependencies
- Updated package.json to version 2.0.0-alpha, reflecting significant changes. - Refactored cache management by integrating useCache hooks across various components, enhancing state management and performance. - Replaced useRuntime references with useMinapps in multiple components to streamline minapp state handling. - Improved type safety in cache schemas and updated related components to utilize new types. - Removed deprecated runtime actions and streamlined the codebase for better maintainability. |
||
|
|
79c9ed963f |
feat: update UI package with Storybook integration and Tailwind CSS v4 configuration
- Added Storybook scripts for development and building the UI components. - Updated package.json to include new dependencies for Storybook and styled-components. - Revised README to reflect changes in Tailwind CSS configuration, transitioning to v4 and removing the tailwind.config.js file. - Enhanced the tsdown configuration to mark additional peer dependencies as external. - Removed outdated Tailwind CSS configuration file to streamline the setup. |
||
|
|
e5ccf68476
|
feat: use biome to format files (#10170)
* build: add @biomejs/biome as a dependency * chore: add biome extension to vscode recommendations * chore: migrate from prettier to biome for code formatting Update VSCode settings to use Biome as the default formatter for multiple languages Add Biome to code actions on save and reorder search exclude patterns * build: add biome.json configuration file for code formatting * build: migrate from prettier to biome for formatting Update package.json scripts and biome.json configuration to use biome instead of prettier for code formatting. Adjust biome formatter includes/excludes patterns for better file matching. * refactor(eslint): remove unused prettier config and imports * chore: update biome.json configuration - Enable linter and set custom rules - Change jsxQuoteStyle to single quotes - Add json parser configuration - Set formatWithErrors to true * chore: migrate biome config from json to jsonc format The new jsonc format allows for comments in the configuration file, making it more maintainable and easier to document configuration choices. * style(biome): update ignore patterns and jsx quote style Update file ignore patterns from `/*` to `/**` for consistency Change jsxQuoteStyle from single to double quotes for alignment with project standards * refactor: simplify error type annotations from Error | any to any The change standardizes error handling by using 'any' type instead of union types with Error | any, making the code more consistent and reducing unnecessary type complexity. * chore: exclude tailwind.css from biome formatting * style: standardize quote usage and fix JSX formatting - Replace single quotes with double quotes in CSS imports and selectors - Fix JSX element closing bracket alignment and formatting - Standardize JSON formatting in package.json files * Revert "style: standardize quote usage and fix JSX formatting" This reverts commit |
||
|
|
04ef5edea2 |
feat: update migration status and add new UI components
- Updated migration status documentation to reflect the migration of 43 components, with 193 pending. - Enhanced the component status table with new entries for MaxContextCount, CollapsibleSearchBar, ImageToolButton, and InfoPopover. - Added implementations for the new components, improving the UI library's functionality. - Updated index.ts to export the newly added components for better accessibility. |
||
|
|
046ed3edef |
feat: update migration status and add ListItem and EditableNumber components
- Updated migration status documentation to reflect the migration of 38 components, with 198 pending. - Enhanced the component status table with new entries for ListItem and EditableNumber. - Added ListItem and EditableNumber components with their respective implementations and styles. - Updated index.ts to export the newly added components for improved accessibility. |
||
|
|
6eb9ab30b0 |
feat: update migration status and add new UI components
- Updated migration status documentation to reflect the migration of 36 components, with 200 pending. - Enhanced the component status table with new entries for CustomCollapse, EmojiAvatar, ResetIcon, OcrIcon, ToolIcon, WrapIcon, UnWrapIcon, HelpTooltip, Selector, and WarnTooltip. - Updated index.ts to export the newly added components for improved accessibility. |
||
|
|
1c27481813 |
feat: update migration status and add new UI components
- Updated migration status documentation to reflect the migration of 26 components, with 210 pending. - Enhanced the component status table with detailed descriptions and categorized components. - Introduced new components: CustomTag, ErrorTag, SuccessTag, WarnTag, CopyIcon, DeleteIcon, EditIcon, and RefreshIcon. - Updated index.ts to export the newly added components for improved accessibility. |
||
|
|
6d89f94335 | feat: CacheService & useCache Hooks | ||
|
|
2e07b4ea58 |
feat: add migration status documentation and new UI components
- Introduced migration status documentation in both English and Chinese to track the progress of the UI component library migration. - Added new UI components including CopyButton, DividerWithText, EmojiIcon, IndicatorLight, Spinner, TextBadge, and various display and icon components. - Updated the index.ts file to export the newly added components for easier access. - Enhanced the directory structure and component classification guidelines for better organization and clarity. |
||
|
|
c936bddfe7 |
feat: add index.ts type definitions for UI components
- Introduced a new TypeScript definition file (index.ts) to support the newly added UI component library. - This file will facilitate better type checking and autocompletion for developers using the library. |
||
|
|
d3028f1dd1 |
feat: add @cherrystudio/ui component library
- Introduced a new UI component library for Cherry Studio, including various components such as buttons, inputs, and layout elements. - Updated configuration files to include the new library and its dependencies. - Enhanced the project structure to support modular imports and TypeScript definitions for better development experience. |
||
|
|
78a8ebc777 |
feat(preferences): update user theme settings and add new preferences
- Updated preferences configuration with new user theme options including font family and code font family. - Added new preferences for chat and export menus. - Adjusted default preferences to include new settings for user theme. - Enhanced useUserTheme hook to manage new font family preferences. |
||
|
|
57fd73e51a | Merge branch 'main' of github.com:CherryHQ/cherry-studio into wip/data-refactor | ||
|
|
993d497aad
|
feature: add option to change font (#10133)
* feature: add option to change font 1. set app global font 2. set code block font Signed-off-by: Albert Abdilim <albert.abdilim@foxmail.com> * formatted code with Prettier * fix ci errors 1.add migration in `migrate.ts` 2.add to-be-translated strings by running `yarn sync:i18n` * chore: update yarn.lock to include font-list package version 2.0.0 * fix migration issue --------- Signed-off-by: Albert Abdilim <albert.abdilim@foxmail.com> Co-authored-by: suyao <sy20010504@gmail.com> |
||
|
|
bd448b5108 |
refactor: remove AbortSignal support from DataApiService and related components
- Eliminated AbortSignal handling from ApiClient interface and DataApiService to streamline request processing. - Updated IpcAdapter to remove event sender logic for responses, aligning with the new direct IPC approach. - Adjusted tests to reflect the removal of cancellation capabilities, emphasizing that direct IPC requests cannot be cancelled. - Cleaned up related code and comments to enhance clarity and maintainability. |
||
|
|
a7d12abd1f |
feat: add Data API channels and integrate swr for data fetching
- Introduced new IPC channels for Data API requests and responses in IpcChannel. - Added swr library to package.json for improved data fetching capabilities. - Updated preload API to include Data API related methods for handling requests and subscriptions. - Removed deprecated pending_default_values.ts file as part of data refactor. |
||
|
|
8f36c4e793
|
fix: referer (#10124)
* fix: referer * fix(i18n): Auto update translations for PR #10124 --------- Co-authored-by: GitHub Action <action@github.com> |
||
|
|
5e19e7ac6c
|
fix(toolUsePlugin): handle empty tools case in prompt generation (#10111)
Return null when no tools are available and skip tool section in system prompt |
||
|
|
871565c687
|
feat: add data limit warning notification (#8866)
* feat: add disk space checking functionality - Introduced a new IPC channel for retrieving disk information. - Integrated the 'check-disk-space' package to fetch available and total disk space. - Updated the preload API to expose the new disk info retrieval method to the renderer. * feat: implement disk space warning and data limit checks - Added functionality to check available disk space and display warnings when storage is low. - Updated IPC methods to pass directory paths for disk info retrieval. - Introduced periodic checks for app data disk quota and internal storage quota. - Enhanced user notifications with localized messages for low storage warnings. * fix: enhance disk space warning logic and improve logging - Added additional conditions for displaying disk space warnings based on free percentage thresholds. - Improved logging format for app data disk quota, providing clearer output in GB. - Refactored the checkDataLimit function to be asynchronous for better performance. * format code * update log format * fix: improve error handling and logging in disk quota checks - Added try-catch block in checkAppDataDiskQuota to handle potential errors when retrieving disk information. - Ensured that errors are logged for better debugging and visibility. - Updated checkDataLimit to await the checkAppDataDiskQuota function for proper asynchronous handling. * fix comments * fix: remove redundant appStorageQuota message from localization files * lint * fix: enhance disk space warning logic for USB disks - Added a condition to warn users when free space on USB disks falls below 5% of total capacity. - Improved the existing logic for displaying disk space warnings based on total disk size thresholds. * update i18n * Refactor data limit notification logic and update i18n messages for disk space warnings. Adjusted check intervals and improved toast notifications for low disk space alerts. * Fix disk quota check logic in useDataLimit hook to correctly compare free space against 1GB threshold. * refactor: update styles and improve navbar handling - Removed unnecessary margin-bottom style from bubble markdown. - Adjusted margin in Prompt component for better layout. - Enhanced useAppInit hook to include navbar position logic for background styling. - Added alignment to ErrorBlock alert for improved visual consistency. * refactor: relocate checkDataLimit function to utils and update import in useAppInit hook - Moved checkDataLimit function from useDataLimit hook to utils for better organization. - Updated import path in useAppInit to reflect the new location of checkDataLimit. - Removed the now obsolete useDataLimit hook file. * refactor: update getDiskInfo API to specify return type - Enhanced getDiskInfo function to explicitly define the return type as a Promise containing disk information or null. * lint err * fix: handle null response from getDiskInfo in checkAppDataDiskQuota - Added a check for null response from getDiskInfo to prevent errors. - Updated the logic to extract the free disk space only if diskInfo is valid. --------- Co-authored-by: kangfenmao <kangfenmao@qq.com> |
||
|
|
6104b7803b
|
refactor: MCPService for improved error handling and header management (#10100)
* refactor MCPService for improved error handling and header management * refactor MCPService: reorder header preparation for improved clarity * refactor: enhance MCP server type determination and clean up error handling |
||
|
|
2e31a5bbcb
|
Feat/api server (#9855)
* feat: add api server
This reverts commit
|
||
|
|
e10042a433
|
Feat/provider options and built-in tools (#10068)
* refactor(RuntimeExecutor, PluginEngine): streamline parameter handling and improve type definitions for model operations - Updated parameter handling in RuntimeExecutor methods to use specific types for generate and stream functions. - Refactored PluginEngine methods to enhance type safety and reduce redundancy in model resolution. - Introduced new type definitions for generate and stream parameters in types.ts for better clarity and maintainability. - Adjusted provider options mapping in buildProviderOptions to accommodate new provider types. * feat(googleToolsPlugin): enhance Google tools integration and update dependencies - Updated the `ai` package version to `5.0.38` and `@ai-sdk/gateway` to `1.0.20` in `package.json` and `yarn.lock`. - Introduced `googleToolsPlugin` with improved parameter handling and configuration options for Google tools. - Added support for `urlContext` in middleware configuration and plugin builder. - Refactored web search tool to streamline response handling and citation formatting. - Updated various service methods to include `enableUrlContext` capability. * fix: update tool response handling and clean up unused code - Modified the `processKnowledgeReferences` function to accept the full response object instead of just `knowledgeReferences`. - Cleaned up the `searchOrchestrationPlugin` by removing unnecessary blank lines. - Removed commented-out code in `telemetryPlugin` to improve readability. - Updated `KnowledgeSearchTool` to streamline the execution flow and return results more efficiently. - Adjusted `MessageKnowledgeSearch` components to reflect changes in the data structure returned from the knowledge search tool. - Enhanced `MemorySearchTool` by simplifying error handling and removing redundant code. * refactor: clean up KnowledgeSearchTool and WebSearchTool by removing commented-out code - Removed unnecessary commented-out code in `KnowledgeSearchTool` and `WebSearchTool` to improve code readability and maintainability. - Simplified the `processKnowledgeReferences` function by eliminating the console log statement for cleaner output. * chore: bump version to 1.0.0-alpha.14 in aiCore package.json * chore: update @ai-sdk/google-vertex to version 3.0.25 and add @ai-sdk/anthropic@2.0.15 to dependencies - Bumped the version of `@ai-sdk/google-vertex` in `package.json` and `yarn.lock` to 3.0.25. - Added `@ai-sdk/anthropic` version 2.0.15 to `yarn.lock` with updated dependencies. - Refactored `parameterBuilder.ts` to integrate new tools from `@ai-sdk/google-vertex` for enhanced functionality. |
||
|
|
9e3618bc17 |
refactor: update selection preferences and enums for improved consistency
- Removed deprecated selection IPC channels from IpcChannel. - Replaced string literals with enums for SelectionTriggerMode and SelectionFilterMode in preference management. - Updated the SelectionService and selectionStore to utilize the new enum types for better type safety and clarity. - Marked selectionStore as deprecated for future removal after data refactoring. |
||
|
|
f6ffd574bf
|
refactor(ToolCall): refactor:mcp-tool-state-management (#10028) | ||
|
|
4b65dfa6ea
|
feat: integrate HeroUI and Tailwind CSS for enhanced styling (#9973) | ||
|
|
0187f1780e
|
Refactor/migrate zod v4 (#10002)
* build: 更新 zod 依赖至 v4.1.5 * refactor: 将zod导入从'zod/v4'更新为'zod' 统一使用zod主包而非v4子路径,简化依赖管理 * refactor: 统一使用命名导入方式导入zod库 * refactor(mcpServers): 更新RequestPayloadSchema的url和headers类型定义 * refactor(mcp): 将默认值从pipe移动到string以简化schema 默认值'stdio'从pipe操作中移动到string操作,使schema定义更清晰 * refactor(Markdown): 简化 CitationSchema 中 url 的验证方式 * refactor: 将类型断言改为使用 satisfies 操作符 * build: 更新 aiCore 的 zod 依赖至 v4.1.5 * refactor: 更新zod导入方式并简化基础provider类型定义 将zod从'zod/v4'更新为'zod'导入 将baseProviderSchema替换为更简洁的接口类型定义 * fix(providers): 优化provider配置的schema定义并添加注释 调整creator函数的类型定义,增加输入输出类型约束 |
||
|
|
2931e558b3 | Merge branch 'main' of github.com:CherryHQ/cherry-studio into wip/data-refactor | ||
|
|
c940e0bc92
|
feat: add Anthropic OAuth settings UI and logic (#8905)
* feat: add Anthropic OAuth settings UI and logic Introduces AnthropicSettings component for managing Anthropic OAuth authentication in provider settings. Adds Anthropic OAuth logic in a new anthropicOAuth.ts file, including PKCE flow, token exchange, and credential management stubs. Integrates AnthropicSettings into ProviderSetting to enable UI for login, logout, and code entry. * feat: add Anthropic OAuth authentication support Introduces OAuth authentication for Anthropic provider, including UI changes for selecting authentication method and handling authorization code input. Updates i18n files with new Anthropic OAuth-related strings in multiple languages and adds the 'authType' property to the Provider type. * fix: oauth * refactor: Anthropic OAuth to main process service Moved Anthropic OAuth logic from renderer to main process as a singleton service. Updated IPC channels and preload API to support Anthropic OAuth actions. Refactored AnthropicSettings component to use new IPC-based API for authentication flow. * fix: add 'authenticating' translation and update AnthropicSettings Added the 'authenticating' key to Anthropic provider translations across multiple languages. Updated AnthropicSettings.tsx to remove the unused 'authenticating_detail' description and set the modal to be centered. * fix: add reference * Update AnthropicAPIClient.ts * fix: update credentials path and improve OAuth handling in AnthropicAPIClient * feat: add support for Anthropic OAuth provider handling in ProviderSetting * feat: enhance OAuth authentication messages in multiple languages * feat: add support for Anthropic provider with OAuth authentication and system message handling for new aisdk provider * fix: update credential path and use net.fetch for OAuth token requests * fix: setting page ui --------- Co-authored-by: Vaayne <liu.vaayne@gmail.com> |
||
|
|
86e3776fff
|
fix(mcp): enhance progress event structure to include callId for specific tool tracking (#9946)
* fix(mcp): enhance progress event structure to include callId for specific tool tracking * refactor(mcp): add MCP progress event with callId and progress percentage |
||
|
|
b1a39e9b38
|
feat: support custom minimize, maximize and close (#9847)
* feat: add window control functionality for Windows and Linux - Introduced new IPC channels for window management: minimize, maximize, unmaximize, close, and check maximized state. - Implemented window control buttons in the UI, allowing users to minimize, maximize, and close the application. - Enhanced Navbar and TabContainer components to include window controls, improving user experience on non-Mac platforms. - Styled window control buttons for better visual integration. This update enhances the application's usability by providing essential window management features. * add tooltip * fix macos * lint error * update i18n * lint * fix: add WindowControls to MinApp popup and improve hover styles - Add WindowControls component to MinappPopupContainer title bar for Windows/Linux - Fix ButtonsGroup overlap with WindowControls by adding proper margin - Improve WindowControls hover background visibility by using rgba(128,128,128,0.3) - Ensure WindowControls is positioned at the right edge of title bar 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * lint * add types --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
b6d10656f9
|
feat: refactor Knowledge Base (#8384)
Co-authored-by: icarus <eurfelux@gmail.com> Co-authored-by: eeee0717 <chentao020717@outlook.com> |
||
|
|
a227f6dcb9
|
Feat/aisdk package (#7404)
* feat: enhance AI SDK middleware integration and support
- Added AiSdkMiddlewareBuilder for dynamic middleware construction based on various conditions.
- Updated ModernAiProvider to utilize new middleware configuration, improving flexibility in handling completions.
- Refactored ApiService to pass middleware configuration during AI completions, enabling better control over processing.
- Introduced new README documentation for the middleware builder, outlining usage and supported conditions.
* feat: enhance AI core functionality with smoothStream integration
- Added smoothStream to the middleware exports in index.ts for improved streaming capabilities.
- Updated PluginEnabledAiClient to conditionally apply middlewares, removing the default simulateStreamingMiddleware.
- Modified ModernAiProvider to utilize smoothStream in streamText, enhancing text processing with configurable chunking and delay options.
* feat: enhance AI SDK documentation and client functionality
- Added detailed usage examples for the native provider registry in the README.md, demonstrating how to create and utilize custom provider registries.
- Updated ApiClientFactory to enforce type safety for model instances.
- Refactored PluginEnabledAiClient methods to support both built-in logic and custom registry usage for text and object generation, improving flexibility and usability.
* refactor: update AiSdkToChunkAdapter and middleware for improved chunk handling
- Modified convertAndEmitChunk method to handle new chunk types and streamline processing.
- Adjusted thinkingTimeMiddleware to remove unnecessary parameters and enhance clarity.
- Updated middleware integration in AiSdkMiddlewareBuilder for better middleware management.
* feat: add Cherry Studio transformation and settings plugins
- Introduced cherryStudioTransformPlugin for converting Cherry Studio messages to AI SDK format, enhancing compatibility.
- Added cherryStudioSettingsPlugin to manage Assistant settings like temperature and TopP.
- Implemented createCherryStudioContext function for preparing context metadata for Cherry Studio calls.
* fix: refine experimental_transform handling and improve chunking logic
- Updated PluginEnabledAiClient to streamline the handling of experimental_transform parameters.
- Adjusted ModernAiProvider's smoothStream configuration for better chunking of text, enhancing processing efficiency.
- Re-enabled block updates in messageThunk for improved state management.
* refactor: update ApiClientFactory and index_new for improved type handling and provider mapping
- Changed the type of options in ClientConfig to 'any' for flexibility.
- Overloaded createImageClient method to support different provider settings.
- Added vertexai mapping to the provider type mapping in index_new.ts for enhanced compatibility.
* feat: enhance AI SDK documentation and client functionality
- Added detailed usage examples for the native provider registry in the README.md, demonstrating how to create and utilize custom provider registries.
- Updated ApiClientFactory to enforce type safety for model instances.
- Refactored PluginEnabledAiClient methods to support both built-in logic and custom registry usage for text and object generation, improving flexibility and usability.
* feat: add openai-compatible provider and enhance provider configuration
- Introduced the @ai-sdk/openai-compatible package to support compatibility with OpenAI.
- Added a new ProviderConfigFactory and ProviderConfigBuilder for streamlined provider configuration.
- Updated the provider registry to include the new Google Vertex AI import path.
- Enhanced the index.ts to export new provider configuration utilities for better type safety and usability.
- Refactored ApiService and middleware to integrate the new provider configurations effectively.
* feat: enhance Vertex AI provider integration and configuration
- Added support for Google Vertex AI credentials in the provider configuration.
- Refactored the VertexAPIClient to handle both standard and VertexProvider types.
- Implemented utility functions to check Vertex AI configuration completeness and create VertexProvider instances.
- Updated provider mapping in index_new.ts to ensure proper handling of Vertex AI settings.
* feat: enhance provider options and examples for AI SDK
- Introduced new utility functions for creating and merging provider options, improving type safety and usability.
- Added comprehensive examples for OpenAI, Anthropic, Google, and generic provider options to demonstrate usage.
- Refactored existing code to streamline provider configuration and enhance clarity in the options management.
- Updated the PluginEnabledAiClient to simplify the handling of model parameters and improve overall functionality.
* feat: add patch for Google Vertex AI and enhance private key handling
- Introduced a patch for the @ai-sdk/google-vertex package to improve URL handling based on region.
- Added a new utility function to format private keys, ensuring correct PEM structure and validation.
- Updated the ProviderConfigBuilder to utilize the new private key formatting function for Google credentials.
- Created a pnpm workspace configuration to manage patched dependencies effectively.
* feat: add OpenAI Compatible provider and enhance provider configuration
- Introduced a new OpenAI Compatible provider to the AiProviderRegistry, allowing for integration with the @ai-sdk/openai-compatible package.
- Updated provider configuration logic to support the new provider, including adjustments to API host formatting and options management.
- Refactored middleware to streamline handling of OpenAI-specific configurations.
* fix: enhance anthropic provider configuration and middleware handling
- Updated providerToAiSdkConfig to support both OpenAI and Anthropic providers, improving flexibility in API host formatting.
- Refactored thinkingTimeMiddleware to ensure all chunks are correctly enqueued, enhancing middleware functionality.
- Corrected parameter naming in getAnthropicReasoningParams for consistency and clarity in configuration.
* feat: enhance AI SDK chunk handling and tool call processing
- Introduced ToolCallChunkHandler for managing tool call events and results, improving the handling of tool interactions.
- Updated AiSdkToChunkAdapter to utilize the new handler, streamlining the processing of tool call chunks.
- Refactored transformParameters to support dynamic tool integration and improved parameter handling.
- Adjusted provider mapping in factory.ts to include new provider types, enhancing compatibility with various AI services.
- Removed obsolete cherryStudioTransformPlugin to clean up the codebase and focus on more relevant functionality.
* feat: enhance provider ID resolution in AI SDK
- Updated getAiSdkProviderId function to include mapping for provider types, improving compatibility with third-party SDKs.
- Refined return logic to ensure correct provider ID resolution, enhancing overall functionality and support for various providers.
* refactor: restructure AI Core architecture and enhance client functionality
- Updated the AI Core documentation to reflect the new architecture and design principles, emphasizing modularity and type safety.
- Refactored the client structure by removing obsolete files and consolidating client creation logic into a more streamlined format.
- Introduced a new core module for managing execution and middleware, improving the overall organization of the codebase.
- Enhanced the orchestration layer to provide a clearer API for users, integrating the creation and execution processes more effectively.
- Added comprehensive type definitions and utility functions for better type safety and usability across the SDK.
* refactor: simplify AI Core architecture and enhance runtime execution
- Restructured the AI Core documentation to reflect a simplified two-layer architecture, focusing on clear responsibilities between models and runtime layers.
- Removed the orchestration layer and consolidated its functionality into the runtime layer, streamlining the API for users.
- Introduced a new runtime executor for managing plugin-enhanced AI calls, improving the handling of execution and middleware.
- Updated the core modules to enhance type safety and usability, including comprehensive type definitions for model creation and execution configurations.
- Removed obsolete files and refactored existing code to improve organization and maintainability across the SDK.
* feat: enhance AI Core runtime with advanced model handling and middleware support
- Introduced new high-level APIs for model creation and configuration, improving usability for advanced users.
- Enhanced the RuntimeExecutor to support both direct model usage and model ID resolution, allowing for more flexible execution options.
- Updated existing methods to accept middleware configurations, streamlining the integration of custom processing logic.
- Refactored the plugin system to better accommodate middleware, enhancing the overall extensibility of the AI Core.
- Improved documentation to reflect the new capabilities and usage patterns for the runtime APIs.
* feat: enhance plugin system with new reasoning and text plugins
- Introduced `reasonPlugin` and `textPlugin` to improve chunk processing and handling of reasoning content.
- Updated `transformStream` method signatures for better type safety and usability.
- Enhanced `ThinkingTimeMiddleware` to accurately track thinking time using `performance.now()`.
- Refactored `ThinkingBlock` component to utilize block thinking time directly, improving performance and clarity.
- Added logging for middleware builder to assist in debugging and monitoring middleware configurations.
* refactor: update RuntimeExecutor and introduce MCP Prompt Plugin
- Changed `pluginClient` to `pluginEngine` in `RuntimeExecutor` for clarity and consistency.
- Updated method calls in `RuntimeExecutor` to use the new `pluginEngine`.
- Enhanced `AiSdkMiddlewareBuilder` to include `mcpTools` in the middleware configuration.
- Added `MCPPromptPlugin` to support tool calls within prompts, enabling recursive processing and improved handling of tool interactions.
- Updated `ApiService` to pass `mcpTools` during chat completion requests, enhancing integration with the new plugin system.
* feat: enhance MCP Prompt plugin and recursive call capabilities
- Updated `tsconfig.web.json` to support wildcard imports for `@cherrystudio/ai-core`.
- Enhanced `package.json` to include type definitions and imports for built-in plugins.
- Introduced recursive call functionality in `PluginManager` and `PluginEngine`, allowing for improved handling of tool interactions.
- Added `MCPPromptPlugin` to facilitate tool calls within prompts, enabling recursive processing of tool results.
- Refactored `transformStream` methods across plugins to accommodate new parameters and improve type safety.
* <type>: <subject>
<body>
<footer>
用來簡要描述影響本次變動,概述即可
* feat: enhance MCP Prompt plugin with recursive call support and context handling
- Updated `AiRequestContext` to enforce `recursiveCall` and added `isRecursiveCall` for better state management.
- Modified `createContext` to initialize `recursiveCall` with a placeholder function.
- Enhanced `MCPPromptPlugin` to utilize a custom `createSystemMessage` function for improved message handling during recursive calls.
- Refactored `PluginEngine` to manage recursive call states, ensuring proper execution flow and context integrity.
* feat: update package dependencies and introduce new patches for AI SDK tools
- Added patches for `@ai-sdk/google-vertex` and `@ai-sdk/openai-compatible` to enhance functionality and fix issues.
- Updated `package.json` to reflect new dependency versions and patch paths.
- Refactored `transformParameters` and `ApiService` to support new tool configurations and improve parameter handling.
- Introduced utility functions for setting up tools and managing options, enhancing the overall integration of tools within the AI SDK.
* refactor: disable console logging in MCP Prompt plugin for cleaner output
- Commented out console log statements in the `createMCPPromptPlugin` to reduce noise during execution.
- Maintained the structure and functionality of the plugin while improving readability and performance.
* feat: enhance ModernAiProvider with new reasoning plugins and dynamic middleware construction
- Introduced `reasoningTimePlugin` and `smoothReasoningPlugin` to improve reasoning content handling and processing.
- Refactored `ModernAiProvider` to dynamically build plugin arrays based on middleware configuration, enhancing flexibility.
- Removed the obsolete `ThinkingTimeMiddleware` to streamline middleware management.
- Updated `buildAiSdkMiddlewares` to reflect changes in middleware handling and improve clarity in the configuration process.
- Enhanced logging for better visibility into plugin and middleware configurations during execution.
* feat: introduce MCP Prompt Plugin and refactor built-in plugin structure
- Added `mcpPromptPlugin.ts` to encapsulate MCP Prompt functionality, providing a structured approach for tool calls within prompts.
- Updated `index.ts` to reference the new `mcpPromptPlugin`, enhancing modularity and clarity in the built-in plugins.
- Removed the outdated `example-plugins.ts` file to streamline the plugin directory and focus on essential components.
* refactor: rename and restructure message handling in Conversation and Orchestrate services
- Renamed `prepareMessagesForLlm` to `prepareMessagesForModel` in `ConversationService` for clarity.
- Updated `OrchestrationService` to use the new method name and introduced a new function `transformMessagesAndFetch` for improved message processing.
- Adjusted imports in `messageThunk` to reflect the changes in the orchestration service, enhancing code readability and maintainability.
* refactor: streamline error handling and logging in ModernAiProvider
- Commented out the try-catch block in the `ModernAiProvider` class to simplify the code structure.
- Enhanced readability by removing unnecessary error logging while maintaining the core functionality of the AI processing flow.
- Updated `messageThunk` to incorporate an abort controller for improved request management during message processing.
* fix: update reasoningTimePlugin and smoothReasoningPlugin for improved performance tracking
- Changed the invocation of `reasoningTimePlugin` to a direct reference in `ModernAiProvider`.
- Initialized `thinkingStartTime` with `performance.now()` in `reasoningTimePlugin` for accurate timing.
- Removed `thinking_millsec` from the enqueued chunks in `smoothReasoningPlugin` to streamline data handling.
- Added console logging for performance tracking in `reasoningTimePlugin` to aid in debugging.
* feat: extend buildStreamTextParams to include capabilities for enhanced AI functionality
- Updated the return type of `buildStreamTextParams` to include `capabilities` for reasoning, web search, and image generation.
- Modified `fetchChatCompletion` to utilize the new capabilities structure, improving middleware configuration based on model capabilities.
* refactor: simplify provider validation and enhance plugin configuration
- Commented out the provider support check in `RuntimeExecutor` to streamline initialization.
- Updated `providerToAiSdkConfig` to utilize `AiCore.isSupported` for improved provider validation.
- Enhanced middleware configuration in `ModernAiProvider` to ensure tools are only added when enabled and available.
- Added comments in `transformParameters` for clarity on parameter handling and plugin activation.
* refactor: remove OpenRouter provider support and streamline reasoning logic
- Commented out the OpenRouter provider in `registry.ts` and related configurations due to excessive bugs.
- Simplified reasoning logic in `transformParameters.ts` and `options.ts` by removing unnecessary checks for `enableReasoning`.
- Enhanced logging in `transformParameters.ts` to provide better insights into reasoning capabilities.
- Updated `getReasoningEffort` to handle cases where reasoning effort is not defined, improving model compatibility.
* chore: update OpenRouter provider to version 0.7.2 and add support functions
- Updated the OpenRouter provider dependency in `package.json` and `yarn.lock` to version 0.7.2.
- Added a new function `createOpenRouterOptions` in `factory.ts` for creating OpenRouter provider options.
- Updated type definitions in `types.ts` and `registry.ts` to include OpenRouter provider settings, enhancing provider management.
* refactor: streamline reasoning plugins and remove unused components
- Removed the `reasoningTimePlugin` and `mcpPromptPlugin` to simplify the plugin architecture.
- Updated the `smoothReasoningPlugin` to enhance its functionality and reduce delay in processing.
- Adjusted the `textPlugin` to align with the new delay settings for smoother output.
- Modified the `ModernAiProvider` to utilize the updated `smoothReasoningPlugin` without the removed plugins.
* refactor: update reasoning plugins and enhance performance
- Replaced `smoothReasoningPlugin` with `reasoningTimePlugin` to improve reasoning time tracking.
- Commented out the unused `textPlugin` in the plugin list for better clarity.
- Adjusted delay settings in both `smoothReasoningPlugin` and `textPlugin` for optimized processing.
- Enhanced logging in reasoning plugins for better debugging and performance insights.
* feat: implement useSmoothStream hook for dynamic text rendering
- Added a new custom hook `useSmoothStream` to manage smooth text streaming with adjustable delays.
- Integrated the `useSmoothStream` hook into the `Markdown` component to enhance content display during streaming.
- Improved state management for displayed content and stream completion status in the `Markdown` component.
* feat: enhance OpenAI provider handling and add providerParams utility module
- Updated the `createBaseModel` function to handle OpenAI provider responses in strict mode.
- Modified `providerToAiSdkConfig` to include specific options for OpenAI when in strict mode.
- Introduced a new utility module `providerParams.ts` for managing provider-specific parameters, including OpenAI, Anthropic, and Gemini configurations.
- Added functions to retrieve service tiers, specific parameters, and reasoning efforts for various providers, improving overall provider management.
* feat: enhance OpenAI model handling with utility function
- Introduced `isOpenAIChatCompletionOnlyModel` utility function to determine if a model ID corresponds to OpenAI's chat completion-only models.
- Updated `createBaseModel` function to utilize the new utility for improved handling of OpenAI provider responses in strict mode.
- Refactored reasoning parameters in `getOpenAIReasoningParams` for consistency and clarity.
* refactor: remove providerParams utility module
* feat: add web search plugin for enhanced AI provider capabilities
- Introduced a new `webSearchPlugin` to provide unified web search functionality across multiple AI providers.
- Added helper functions for adapting web search parameters for OpenAI, Gemini, and Anthropic providers.
- Updated the built-in plugin index to export the new web search plugin and its configuration type.
- Created a new `helper.ts` file to encapsulate web search adaptation logic and support checks for provider compatibility.
* chore: migrate to v5
* refactor: migrate to v5 patch-1
* fix: unexpected chunk
* refactor: streamline model configuration and factory functions
- Updated the `createModel` function to accept a simplified `ModelConfig` interface, enhancing clarity and usability.
- Refactored `createBaseModel` to destructure parameters for better readability and maintainability.
- Removed the `ModelCreator.ts` file as its functionality has been integrated into the factory functions.
- Adjusted type definitions in `types.ts` to reflect changes in model configuration structure, ensuring consistency across the codebase.
* refactor: migrate to v5 patch-2
* fix(provider): config error
* fix(provider): config error patch-1
* feat: support image
* refactor: enhance model configuration and plugin execution
- Simplified the `createModel` function to directly accept the `ModelConfig` object, improving clarity.
- Updated `createBaseModel` to include `extraModelConfig` for extended configuration options.
- Introduced `executeConfigureContext` method in `PluginManager` to handle context configuration for plugins.
- Adjusted type definitions in `types.ts` to ensure consistency with the new configuration structure.
- Refactored plugin execution methods in `PluginEngine` to utilize the resolved model directly, enhancing the flow of data through the plugin system.
* fix: openai-gemini support
* refactor: update type exports and enhance web search functionality
- Added `ReasoningPart`, `FilePart`, and `ImagePart` to type exports in `index.ts`.
- Refactored `transformParameters.ts` to include `enableWebSearch` option and integrate web search tools.
- Introduced new utility `getWebSearchTools` in `websearch.ts` to manage web search tool configurations based on model type.
- Commented out deprecated code in `smoothReasoningPlugin.ts` and `textPlugin.ts` for potential removal.
* fix: format apihost
* feat: add XAI provider options and enhance web search plugin
- Introduced `createXaiOptions` function for XAI provider configuration.
- Added `XaiProviderOptions` type and validation schema in `xai.ts`.
- Updated `ProviderOptionsMap` to include XAI options.
- Enhanced `webSearchPlugin` to support XAI-specific search parameters.
- Refactored helper functions to integrate new XAI options into provider configurations.
* feat: conditionally enable web search plugin based on configuration
- Updated the logic to add the `webSearchPlugin` only if `middlewareConfig.enableWebSearch` is true.
- Added comments to clarify the use of default search parameters and configuration options.
* feat: aihubmix support
* refactor: improve web search plugin and middleware integration
- Cleaned up the web search plugin code by commenting out unused sections for clarity.
- Enhanced middleware handling for the OpenAI provider by wrapping the logic in a block for better readability.
- Removed redundant imports from various files to streamline the codebase.
- Added `enableWebSearch` parameter to the fetchChatCompletion function for improved functionality.
* fix: azure-openai provider
* feat: enhance web search plugin configuration
- Added `sources` array to the default web search configuration, allowing for multiple source types including 'web', 'x', and 'news'.
- This update improves the flexibility and functionality of the web search plugin.
* chore: update ai package version to 5.0.0-beta.9 in package.json and yarn.lock
* feat: enhance model handling and provider integration
- Updated `createBaseModel` to differentiate between OpenAI chat and response models.
- Introduced new utility functions for model identification: `isOpenAIReasoningModel`, `isOpenAILLMModel`, and `getModelToProviderId`.
- Improved `transformParameters` to conditionally set the system prompt based on the assistant's prompt.
- Refactored `getAiSdkProviderIdForAihubmix` to simplify provider identification logic.
- Enhanced `getAiSdkProviderId` to support provider type checks.
* feat: enhance web search plugin and tool handling
- Refactored `helper.ts` to export new types `AnthropicSearchInput` and `AnthropicSearchOutput` for better integration with the web search plugin.
- Updated `index.ts` to include the new types in the exports for improved type safety.
- Modified `AiSdkToChunkAdapter.ts` to handle tool calls more flexibly by introducing a `GenericProviderTool` type, allowing for better differentiation between MCP tools and provider-executed tools.
- Adjusted `handleTooCallChunk.ts` to accommodate the new tool type structure, enhancing the handling of tool call responses.
- Updated type definitions in `index.ts` to reflect changes in tool handling logic.
* feat: enhance provider settings and model configuration
- Updated `ModelConfig` to include a `mode` property for better differentiation between 'chat' and 'responses'.
- Modified `createBaseModel` to conditionally set the provider based on the new `mode` property in `providerSettings`.
- Refactored `RuntimeExecutor` to utilize the updated `ModelConfig` for improved type safety and clarity in provider settings.
- Adjusted imports in `executor.ts` and `types.ts` to align with the new model configuration structure.
* feat: enhance AiSdkToChunkAdapter for web search results handling
- Updated `AiSdkToChunkAdapter` to include `webSearchResults` in the final output structure for improved web search integration.
- Modified `convertAndEmitChunk` method to handle `finish-step` events, differentiating between Google and other web search results.
- Adjusted the handling of `source` events to accumulate web search results for better processing.
- Enhanced citation formatting in `messageBlock.ts` to support new web search result structures.
* feat: integrate web search tool and enhance tool handling
- Added `webSearchTool` to facilitate web search functionality within the SDK.
- Updated `AiSdkToChunkAdapter` to utilize `BaseTool` for improved type handling.
- Refactored `transformParameters` to support `webSearchProviderId` for enhanced web search integration.
- Introduced new `BaseTool` type structure to unify tool definitions across the codebase.
- Adjusted imports and type definitions to align with the new tool handling logic.
* feat: enhance web search functionality and tool integration
- Introduced `extractSearchKeywords` function to facilitate keyword extraction from user messages for web searches.
- Updated `webSearchTool` to streamline the execution of web searches without requiring a request ID.
- Enhanced `WebSearchService` methods to be static for improved accessibility and clarity.
- Modified `ApiService` to pass `webSearchProviderId` for better integration with the web search functionality.
- Improved `ToolCallChunkHandler` to handle built-in tools more effectively.
* feat: add type property to server tools in MCPService
- Enhanced the server tool structure by adding a `type` property set to 'mcp' for better identification and handling of tools within the MCPService.
* chore: update dependencies and versions in package.json and yarn.lock
- Upgraded various SDK packages to their latest beta versions for improved functionality and compatibility.
- Updated `@ai-sdk/provider-utils` to version 3.0.0-beta.3.
- Adjusted dependencies in `package.json` to reflect the latest versions, including `@ai-sdk/amazon-bedrock`, `@ai-sdk/anthropic`, `@ai-sdk/azure`, and others.
- Removed outdated versions from `yarn.lock` and ensured consistency across the project.
* fix: update provider identification logic in aiCore
- Refactored the provider identification in `index_new.ts` to use `actualProvider.type` instead of `actualProvider.id` for better clarity and accuracy in determining OpenAI response modes.
- Removed redundant type checks in `factory.ts` to streamline the provider ID retrieval process.
* chore: update package dependencies and improve AI SDK chunk handling
- Bumped versions of several dependencies in package.json, including `@swc/plugin-styled-components` to 8.0.4 and `@vitejs/plugin-react-swc` to 3.10.2.
- Enhanced `AiSdkToChunkAdapter` to streamline chunk processing, including better handling of text and reasoning events.
- Added console logging for debugging in `BlockManager` and `messageThunk` to track state changes and callback executions.
- Updated integration tests to reflect changes in message structure and types.
* refactor: reorganize AiSdkToChunkAdapter and enhance tool call handling
- Moved AiSdkToChunkAdapter to a new directory structure for better organization.
- Implemented detailed handling for tool call events in ToolCallChunkHandler, including creation, updates, and completions.
- Added a new method to handle tool call creation and improved state management for active tool calls.
- Updated StreamProcessingService to support new chunk types and callbacks for block creation.
- Enhanced type definitions and added comments for clarity in the new chunk handling logic.
* refactor: enhance provider settings and update web search plugin configuration
- Updated providerSettings to allow optional 'mode' parameter for various providers, enhancing flexibility in model configuration.
- Refactored web search plugin to integrate Google search capabilities and streamline provider options handling.
- Removed deprecated code and improved type definitions for better clarity and maintainability.
- Added console logging for debugging purposes in the provider configuration process.
* chore: add repository metadata and homepage to package.json
- Included repository URL, bugs URL, and homepage in package.json for better project visibility and issue tracking.
- This update enhances the package's metadata, making it easier for users to find relevant resources and report issues.
* chore: remove deprecated patches for @ai-sdk/google-vertex and @ai-sdk/openai-compatible
- Deleted outdated patch files for @ai-sdk/google-vertex and @ai-sdk/openai-compatible from the project.
- Updated package.json to reflect the removal of these patches, streamlining dependency management.
* chore: update package.json and add tsdown configuration for build process
- Changed the main and types entries in package.json to point to the dist directory for better output management.
- Added a new tsdown.config.ts file to define the build configuration, specifying entry points, output directory, and formats for the project.
* chore(aiCore/version): update version to 1.0.0-alpha.0
* feat: enhance AI core functionality and introduce new tool components
- Updated README to reflect the addition of a powerful plugin system and built-in web search capabilities.
- Refactored tool call handling in `ToolCallChunkHandler` to improve state management and response formatting.
- Introduced new components `MessageMcpTool`, `MessageTool`, and `MessageTools` for better handling of tool responses and user interactions.
- Updated type definitions to support new tool response structures and improved overall code organization.
- Enhanced spinner component to accept React nodes for more flexible content rendering.
* feat: add React Native support to aiCore package
Add React Native compatibility configuration to package.json, including the
react-native field and updated exports mapping. Include documentation for
React Native usage with metro.config.js setup instructions.
* chore: bump @cherrystudio/ai-core version to 1.0.0-alpha.1
* chore: bump @cherrystudio/ai-core version to 1.0.0-alpha.2 and update exports
- Updated version in package.json to 1.0.0-alpha.2.
- Added new path mapping for @cherrystudio/ai-core in tsconfig.web.json.
- Refactored export paths in tsdown.config.ts and index.ts for consistency.
- Cleaned up type exports in index.ts and types.ts for better organization.
* refactor: reorganize provider and model exports for improved structure
- Updated exports in index.ts and related files to streamline provider and model management.
- Introduced a new ModelCreator module for better encapsulation of model creation logic.
- Refactored type imports to enhance clarity and maintainability across the codebase.
- Removed deprecated provider configurations and cleaned up unused code for better performance.
* chore: update @cherrystudio/ai-core version to 1.0.0-alpha.4 and clean up dependencies
- Bumped version in package.json to 1.0.0-alpha.4.
- Removed deprecated dependencies from package.json and yarn.lock for improved clarity.
- Updated README to reflect changes in supported providers and installation instructions.
- Refactored provider registration and usage examples for better clarity and usability.
* refactor: streamline AI provider registration by replacing dynamic imports with direct creator functions
- Updated the AiProviderRegistry to use direct references to creator functions for each AI provider, improving clarity and performance.
- Removed dynamic import statements for providers, simplifying the registration process and enhancing maintainability.
* chore: bump @cherrystudio/ai-core version to 1.0.0-alpha.5
- Updated version in package.json to 1.0.0-alpha.5.
- Enhanced provider configuration validation in createProvider function for improved error handling.
* docs: update AI SDK architecture and README for enhanced clarity and new features
- Revised AI SDK architecture diagram to reflect changes in component relationships, replacing PluginEngine with RuntimeExecutor.
- Updated README to highlight core features, including a refined plugin system, improved architecture design, and new built-in plugins.
- Added detailed examples for using built-in plugins and creating custom plugins, enhancing documentation for better usability.
- Included future version roadmap and related resources for user reference.
* feat: enhance web search tool functionality and type definitions
- Introduced new `WebSearchToolOutputSchema` type to standardize output from web search tools.
- Updated `webSearchTool` and `webSearchToolWithExtraction` to utilize Zod for input and output schema validation.
- Refactored tool execution logic to improve error handling and response formatting.
- Cleaned up unused type imports and comments for better code clarity.
* fix: conditionally enable reasoning middleware for OpenAI and Azure providers
- Added a check to enable the 'thinking-tag-extraction' middleware only if reasoning is enabled in the configuration for OpenAI and Azure providers.
- Commented out the provider type check in `getAiSdkProviderId` to prevent issues with retrieving provider options.
* feat: update OpenAI provider integration and enhance type definitions
- Bumped version of `@ai-sdk/openai-compatible` to 1.0.0-beta.8 in package.json.
- Introduced a new provider configuration for 'OpenAI Responses' in AiProviderRegistry, allowing for more flexible response handling.
- Updated type definitions to include 'openai-responses' in ProviderSettingsMap for improved type safety.
- Refactored getModelToProviderId function to return a more specific ProviderId type.
* feat: enhance ToolCallChunkHandler with detailed chunk handling and remove unused plugins
- Updated `handleToolCallCreated` method to support additional chunk types with optional provider metadata.
- Removed deprecated `smoothReasoningPlugin` and `textPlugin` files to clean up the codebase.
- Cleaned up unused type imports in `tool.ts` for improved clarity and maintainability.
* <type>: <subject>
<body>
<footer>
用來簡要描述影響本次變動,概述即可
* refactor: update message handling in searchOrchestrationPlugin for improved type safety
- Replaced `Message` type with `ModelMessage` in various functions to enhance type consistency.
- Refactored `getMessageContent` function to utilize the new `ModelMessage` type for better content extraction.
- Updated `storeConversationMemory` and `analyzeSearchIntent` functions to align with the new type definitions, ensuring clearer memory storage and intent analysis processes.
* chore: bump @cherrystudio/ai-core version to 1.0.0-alpha.6 and refactor web search tool
- Updated version in package.json to 1.0.0-alpha.6.
- Simplified response structure in ToolCallChunkHandler by removing unnecessary nesting.
- Refactored input schema for web search tool to enhance type safety and clarity.
- Cleaned up commented-out code in MessageTool for improved readability.
* refactor: consolidate queue utility imports in messageThunk.ts
- Combined separate imports of `getTopicQueue` and `waitForTopicQueue` from the queue utility into a single import statement for improved code clarity and organization.
* feat: implement knowledge search tool and enhance search orchestration logic
- Added a new `knowledgeSearchTool` to facilitate knowledge base searches based on user queries and intent analysis.
- Refactored `analyzeSearchIntent` to simplify message context construction and improve prompt formatting.
- Introduced a flag to prevent concurrent analysis processes in `searchOrchestrationPlugin`.
- Updated tool configuration logic to conditionally add the knowledge search tool based on the presence of knowledge bases and user settings.
- Cleaned up commented-out code for better readability and maintainability.
* refactor: enhance search orchestration and web search tool integration
- Updated `searchOrchestrationPlugin` to improve handling of assistant configurations and prevent concurrent analysis.
- Refactored `webSearchTool` to utilize pre-extracted keywords for more efficient web searches.
- Introduced a new `MessageKnowledgeSearch` component for displaying knowledge search results.
- Cleaned up commented-out code and improved type safety across various components.
- Enhanced the integration of web search results in the UI for better user experience.
* refactor: streamline async function syntax and enhance plugin event handling
- Simplified async function syntax in `RuntimeExecutor` and `PluginEngine` for improved readability.
- Updated `AiSdkToChunkAdapter` to refine condition checks for Google metadata.
- Enhanced `searchOrchestrationPlugin` to log conversation messages and improve memory storage logic.
- Improved memory processing by ensuring fallback for existing memories.
- Added new citation block handling in `toolCallbacks` for better integration with web search results.
* feat: integrate image generation capabilities and enhance testing framework
- Added support for image generation in the `RuntimeExecutor` with a new `generateImage` method.
- Updated `aiCore` package to include `vitest` for testing, with new test scripts added.
- Enhanced type definitions to accommodate image model handling in plugins.
- Introduced new methods for resolving and executing image generation with plugins.
- Updated package dependencies in `package.json` to include `vitest` and ensure compatibility with new features.
* refactor: enhance image generation handling and tool integration
- Updated image generation logic to support new model types and improved size handling.
- Refactored middleware configuration to better manage tool usage and reasoning capabilities.
- Introduced new utility functions for checking model compatibility with image generation.
- Enhanced the integration of plugins for improved functionality during image generation processes.
- Removed deprecated knowledge search tool to streamline the codebase.
* refactor: migrate to v5 patch-1
* fix: migrate to v5-patch2
* refactor: restructure aiCore for improved modularity and legacy support
- Introduced a new `index_new.ts` file to facilitate the modern AI provider while maintaining backward compatibility with the legacy `index.ts`.
- Created a `legacy` directory to house existing clients and middleware, ensuring a clear separation from new implementations.
- Updated import paths across various modules to reflect the new structure, enhancing code organization and maintainability.
- Added comprehensive middleware and utility functions to support the new architecture, improving overall functionality and extensibility.
- Enhanced plugin management with a dedicated `PluginBuilder` for better integration and configuration of AI plugins.
* chore(yarn.lock): remove deprecated provider entries and clean up dependencies
* chore(package.json): bump version to 1.0.0-alpha.7
* feat(tests): add unit tests for utility functions in utils.test.ts
- Implemented tests for `createErrorChunk`, `capitalize`, and `isAsyncIterable` functions.
- Ensured comprehensive coverage for various input scenarios, including error handling and edge cases.
* feat(aiCore): enhance AI SDK with tracing and telemetry support
- Integrated tracing capabilities into the ModernAiProvider, allowing for better tracking of AI completions and image generation processes.
- Added a new TelemetryPlugin to inject telemetry data into AI SDK requests, ensuring compatibility with existing tracing systems.
- Updated middleware and plugin configurations to support topic-based tracing, improving the overall observability of AI interactions.
- Introduced comprehensive logging throughout the AI SDK processes to facilitate debugging and performance monitoring.
- Added unit tests for new functionalities to ensure reliability and maintainability.
* fix: update MessageKnowledgeSearch to use knowledgeReferences
- Modified MessageKnowledgeSearch component to display additional context from toolInput.
- Updated the fetch complete message to reflect the count of knowledgeReferences instead of toolOutput.
- Adjusted the mapping of results to iterate over knowledgeReferences for rendering.
* refactor(aiCore): update ModernAiProvider constructor and clean up unused code
- Modified the constructor of ModernAiProvider to accept an optional provider parameter, enhancing flexibility in provider selection.
- Removed deprecated and unused functions related to search keyword extraction and search summary fetching, streamlining the codebase.
- Updated import statements and adjusted related logic to reflect the removal of obsolete functions, improving maintainability.
* feat(Dropdown): replace RightOutlined with ChevronRight icon and update useIcons to use ChevronDown
- Introduced a patch to replace the RightOutlined icon with ChevronRight in the Dropdown component for improved visual consistency.
- Updated the useIcons hook to utilize ChevronDown instead of DownOutlined, enhancing the icon set with Lucide icons.
- Adjusted icon properties for better customization and styling options.
* feat(aiCore): add enableUrlContext capability and new support function
- Enhanced the buildStreamTextParams function to include enableUrlContext in the capabilities object, improving the parameter set for AI interactions.
- Introduced a new isSupportedFlexServiceTier function to streamline model support checks, enhancing code clarity and maintainability.
* chore: update dependencies and remove unused patches
- Updated various package versions in yarn.lock for improved compatibility and performance.
- Removed obsolete patches for antd and openai, streamlining the dependency management.
- Adjusted icon imports in Dropdown and useIcons to utilize Lucide icons for better visual consistency.
* refactor(types): update ProviderId type definition for better compatibility
- Changed ProviderId type from a union of keyof ExtensibleProviderSettingsMap and string to an intersection, enhancing type safety.
- Renamed appendTrace method to appendMessageTrace in SpanManagerService for clarity and consistency.
- Updated references to appendTrace in useMessageOperations and ApiService to use the new method name.
- Added a new appendTrace method in SpanManagerService to bind existing traces, improving trace management.
- Adjusted topicId handling in fetchMessagesSummary to default to an empty string for better consistency.
* refactor(types): modify ProviderId type definition for improved flexibility
- Updated ProviderId type from an intersection of keyof ExtensibleProviderSettingsMap and string to a union, allowing for greater compatibility with dynamic provider settings.
* fix: file name
* fix: missing dependencies
* fix: remove default renderer from MessageTool
* feat(provider): enhance provider registration and validation system
- Introduced a new Zod-based schema for provider validation, improving type safety and consistency.
- Added support for dynamic provider IDs and enhanced the provider registration process.
- Updated the AiProviderRegistry to utilize the new validation functions, ensuring robust provider management.
- Added tests for the provider registry to validate dynamic imports and functionality.
- Updated yarn.lock to reflect the latest dependency versions.
* feat(toolUsePlugin): enhance tool parsing and extraction functionality
- Updated the `defaultParseToolUse` function to return both parsed results and remaining content, improving usability.
- Introduced a new `TagExtractor` class for flexible tag extraction, supporting various tag formats.
- Modified type definitions to reflect changes in parsing function signatures.
- Enhanced handling of tool call events in the `ToolCallChunkHandler` for better integration with the new parsing logic.
- Added `isBuiltIn` property to the `MCPTool` interface for clearer tool categorization.
* feat(aiCore): update vitest version and enhance provider validation
- Upgraded `vitest` dependency to version 3.2.4 in package.json and yarn.lock for improved testing capabilities.
- Removed console error logging in provider validation functions to streamline error handling.
- Added comprehensive tests for the AiProviderRegistry functionality, ensuring robust provider management and dynamic registration.
- Introduced new test cases for provider schemas to validate configurations and IDs.
- Deleted outdated registry test file to maintain a clean test suite.
* feat(toolUsePlugin): refactor tool execution and event management
- Extracted `StreamEventManager` and `ToolExecutor` classes from `promptToolUsePlugin.ts` to improve code organization and reduce complexity.
- Enhanced tool execution logic with better error handling and event management.
- Updated the `createPromptToolUsePlugin` function to utilize the new classes for cleaner implementation.
- Improved recursive call handling and result formatting for tool executions.
- Streamlined the overall flow of tool calls and event emissions within the plugin.
* feat(dependencies): update ai-sdk packages and improve logging
- Upgraded `@ai-sdk/gateway` to version 1.0.8 and `@ai-sdk/provider-utils` to version 3.0.4 in yarn.lock for enhanced functionality.
- Updated `ai` dependency in package.json to version ^5.0.16 for better compatibility.
- Added logging functionality in `AiSdkToChunkAdapter` to track chunk types and improve debugging.
- Refactored plugin imports to streamline code and enhance readability.
- Removed unnecessary console logs in `searchOrchestrationPlugin` to clean up the codebase.
* feat(dependencies): update ai-sdk packages and improve type safety
- Upgraded multiple `@ai-sdk` packages in `yarn.lock` and `package.json` to their latest versions for enhanced functionality and compatibility.
- Improved type safety in `searchOrchestrationPlugin` by adding optional chaining to handle potential undefined values in knowledge bases.
- Cleaned up dependency declarations to use caret (^) for versioning, ensuring compatibility with future updates.
* feat(aiCore): enhance tool response handling and type definitions
- Updated the ToolCallChunkHandler to support both MCPTool and NormalToolResponse types, improving flexibility in tool response management.
- Refactored type definitions for MCPToolResponse and introduced NormalToolResponse to better differentiate between tool response types.
- Enhanced logging in MCP utility functions for improved error tracking and debugging.
- Cleaned up type imports and ensured consistent handling of tool responses across various chunks.
* feat(tools): refactor MemorySearchTool and WebSearchTool for improved response handling
- Updated MemorySearchTool to utilize aiSdk for better integration and removed unused imports.
- Refactored WebSearchTool to streamline search results handling, changing from an array to a structured object for clarity.
- Adjusted MessageTool and MessageWebSearchTool components to reflect changes in tool response structure.
- Enhanced error handling and logging in tool callbacks for improved debugging and user feedback.
* feat(aiCore): update ai-sdk-provider and enhance message conversion logic
- Upgraded `@openrouter/ai-sdk-provider` to version ^1.1.2 in package.json and yarn.lock for improved functionality.
- Enhanced `convertMessageToSdkParam` and related functions to support additional model parameters, improving message conversion for various AI models.
- Integrated logging for error handling in file processing functions to aid in debugging and user feedback.
- Added support for native PDF input handling based on model capabilities, enhancing file processing features.
* feat(dependencies): update @ai-sdk/openai and @ai-sdk/provider-utils versions
- Upgraded `@ai-sdk/openai` to version 2.0.19 in `yarn.lock` and `package.json` for improved functionality and compatibility.
- Updated `@ai-sdk/provider-utils` to version 3.0.5, enhancing dependency management.
- Added `TypedToolError` type export in `index.ts` for better error handling.
- Removed unnecessary console logs in `webSearchPlugin` for cleaner code.
- Refactored type handling in `createProvider` to ensure proper type assertions.
- Enforced `topicId` as a required field in the `ModernAiProvider` configuration for stricter validation.
* [WIP]refactor(aiCore): restructure models and introduce ModelResolver
- Removed outdated ConfigManager and factory files to streamline model management.
- Added ModelResolver for improved model ID resolution, supporting both traditional and namespaced formats.
- Introduced DynamicProviderRegistry for dynamic provider management, enhancing flexibility in model handling.
- Updated index exports to reflect the new structure and maintain compatibility with existing functionality.
* feat(aiCore): introduce Hub Provider and enhance provider management
- Added a new example file demonstrating the usage of the Hub Provider for routing to multiple underlying providers.
- Implemented the Hub Provider to support model ID parsing and routing based on a specified format.
- Refactored provider management by introducing a Registry Management class for better organization and retrieval of provider instances.
- Updated the Provider Initializer to streamline the initialization and registration of providers, enhancing overall flexibility and usability.
- Removed outdated files related to provider creation and dynamic registration to simplify the codebase.
* feat(aiCore): enhance dynamic provider registration and refactor HubProvider
- Introduced dynamic provider registration functionality, allowing for flexible management of providers through a new registry system.
- Refactored HubProvider to streamline model resolution and improve error handling for unsupported models.
- Added utility functions for managing dynamic providers, including registration, cleanup, and alias resolution.
- Updated index exports to include new dynamic provider APIs, enhancing overall usability and integration.
- Removed outdated provider files and simplified the provider management structure for better maintainability.
* chore(aiCore): bump version to 1.0.0-alpha.9 in package.json
* feat(aiCore): add MemorySearchTool and WebSearchTool components
- Introduced MessageMemorySearch and MessageWebSearch components for handling memory and web search tool responses.
- Updated MemorySearchTool and WebSearchTool to improve response handling and integrate with the new components.
- Removed unused console logs and streamlined code for better readability and maintainability.
- Added new dependencies in package.json for enhanced functionality.
* refactor(aiCore): improve type handling and response structures
- Updated AiSdkToChunkAdapter to refine web search result handling.
- Modified McpToolChunkMiddleware to ensure consistent type usage for tool responses.
- Enhanced type definitions in chunk.ts and index.ts for better clarity and type safety.
- Adjusted MessageWebSearch styles for improved UI consistency.
- Refactored parseToolUse function to align with updated MCPTool response structures.
* feat(aiCore): enhance provider management and registration system
- Added support for a new provider configuration structure in package.json, enabling better integration of provider types.
- Updated tsdown.config.ts to include new entry points for provider modules, improving build organization.
- Refactored index.ts to streamline exports and enhance type handling for provider-related functionalities.
- Simplified provider initialization and registration processes, allowing for more flexible provider management.
- Improved type definitions and removed deprecated methods to enhance code clarity and maintainability.
* chore(aiCore): bump version to 1.0.0-alpha.10 in package.json
* fix(aiCore): update tool call status and enhance execution flow
- Changed tool call status from 'invoking' to 'pending' for better clarity in execution state.
- Updated the tool execution logic to include user confirmation for non-auto-approved tools, improving user interaction.
- Refactored the handling of experimental context in the tool execution parameters to support chunk streaming.
- Commented out unused tool input event cases in AiSdkToChunkAdapter for cleaner code.
* feat(types): add VertexProvider type for Google Cloud integration
Introduced a new VertexProvider type that includes properties for Google credentials and project details, enhancing type safety and support for Google Cloud functionalities.
* refactor(logging): 将console替换为logger以统一日志管理
* fix(i18n): 更新多语言文件中 websearch.fetch_complete 的翻译格式
统一将“已完成 X 次搜索”改为“X 个搜索结果”格式,并添加 avatar.builtin 字段翻译
* refactor(aiCore): streamline type exports and enhance provider registration
Removed unused type exports from the aiCore module and consolidated type definitions for better clarity. Updated provider registration tests to reflect new configurations and improved error handling for non-existent providers. Enhanced the overall structure of the provider management system, ensuring better type safety and consistency across the codebase.
* chore(dependencies): update ai and related packages to version 5.0.26 and 1.0.15
Updated the 'ai' package to version 5.0.26 and '@ai-sdk/gateway' to version 1.0.15. Also, updated '@ai-sdk/provider-utils' to version 3.0.7 and 'eventsource-parser' to version 3.0.5. Adjusted type definitions in aiCore for better type safety in plugin parameters and results.
* chore(config): add new aliases for ai-core in Vite and TypeScript configuration
Updated the Vite and TypeScript configuration files to include new path aliases for the ai-core package, enhancing module resolution for core providers and built-in plugins. This change improves the organization and accessibility of the ai-core components within the project.
* feat(release): update version to 1.6.0-beta.1 and enhance release notes with new features, improvements, and bug fixes
- Integrated a new AI SDK architecture for better performance
- Added OCR functionality for image text recognition
- Introduced a code tools page with environment variable settings
- Enhanced the MCP server list with search capabilities
- Improved SVG preview and HTML content rendering
- Fixed multiple issues including document preprocessing failures and path handling on Windows
- Optimized performance and memory usage across various components
* refactor(modelResolver): replace ':' with '|' as the default separator for model IDs
Updated the ModelResolver and related components to use '|' as the default separator instead of ':'. This change improves compatibility and resolves potential conflicts with model ID suffixes. Adjusted model resolution logic accordingly to ensure consistent behavior across the application.
* feat(aihubmix): add 'type' property to provider configuration for Gemini integration
* refactor(errorHandling): improve error serialization and update error handling in callbacks
- Updated the error handling in the `onError` callback to use `AISDKError` type for better type safety.
- Introduced a new `serializeError` function to standardize error serialization.
- Modified the `ErrorBlock` component to directly access the error message.
- Removed deprecated error formatting functions to streamline the error utility module.
* feat(i18n): add error detail translations and enhance error handling UI
- Added new translation keys for error details in multiple languages, including 'detail', 'details', 'message', 'requestBody', 'requestUrl', 'stack', and 'status'.
- Updated the ErrorBlock component to display a modal with detailed error information, allowing users to view and copy error details easily.
- Improved the user experience by providing a clear and accessible way to understand error messages and their context.
* feat(inputbar): enhance MCP tools visibility with prompt tool support
- Updated the Inputbar component to include the `isPromptToolUse` function, allowing for better visibility of MCP tools based on the assistant's capabilities.
- This change improves user experience by expanding the conditions under which MCP tools are displayed.
* refactor(aiCore): enhance completions methods with developer mode support
- Introduced a check for developer mode in the completions methods to enable tracing capabilities when a topic ID is provided.
- Updated the method signatures and internal calls to streamline the handling of completions with and without tracing.
- Improved code organization by making the completionsForTrace method private and renaming it for clarity.
* feat(ErrorBlock): add centered modal display for error details
- Updated the ErrorBlock component to include a centered modal for displaying error details, enhancing the user interface and accessibility of error information.
* chore(aiCore): update version to 1.0.0-alpha.11 and refactor model resolution logic
- Bumped the version of the ai-core package to 1.0.0-alpha.11.
- Removed the `isOpenAIChatCompletionOnlyModel` utility function to simplify model resolution.
- Adjusted the `providerToAiSdkConfig` function to accept a model parameter for improved configuration handling.
- Updated the `ModernAiProvider` class to utilize the new model parameter in its configuration.
- Cleaned up deprecated code related to search keyword extraction and reasoning parameters.
* fix(inputbar): conditionally display knowledge icon based on MCP tools visibility
- Updated the Inputbar component to conditionally show the knowledge icon only when both `showKnowledgeIcon` and `showMcpTools` are true. This change enhances the visibility logic for the knowledge icon, improving the user interface based on the current context.
* feat(aiCore): introduce provider configuration enhancements and initialization
- Added a new provider configuration module to handle special provider logic and formatting.
- Implemented asynchronous preparation of special provider configurations in the ModernAiProvider class.
- Refactored provider initialization logic to support dynamic registration of new AI providers.
- Updated utility functions to streamline provider option building and improve compatibility with new provider configurations.
* refactor(aiCore): streamline provider options and enhance OpenAI handling
- Simplified the OpenAI mode handling in the provider configuration.
- Added service tier settings to provider-specific options for better configuration management.
- Refactored the `buildOpenAIProviderOptions` function to remove redundant parameters and improve clarity.
* refactor(aiCore): enhance temperature and TopP parameter handling
- Updated `getTemperature` and `getTopP` functions to incorporate reasoning effort checks for Claude models.
- Refactored logic to ensure temperature and TopP settings are only returned when applicable.
- Improved clarity and maintainability of parameter retrieval functions.
* feat(releaseNotes): update release notes with new features and improvements
- Added a modal for detailed error information with multi-language support.
- Enhanced AI Core with version upgrade and improved parameter handling.
- Refactored error handling for better type safety and performance.
- Removed deprecated code and improved provider initialization logic.
* refactor(aiCore): clean up KnowledgeSearchTool and searchOrchestrationPlugin
- Commented out unused parameters and code in the KnowledgeSearchTool to improve clarity and maintainability.
- Removed the tool choice assignment in searchOrchestrationPlugin to streamline the logic.
- Updated instructions handling in KnowledgeSearchTool to eliminate unnecessary fields.
* chore(package): bump version to 1.6.0-beta.2
* refactor(transformParameters): 移除DEFAULT_MAX_TOKENS并替换console.log为logger.debug
移除未使用的DEFAULT_MAX_TOKENS常量,直接使用传入的maxTokens参数
将调试日志输出从console.log改为更规范的logger.debug
* docs(OrchestrateService): 添加注释说明暂时未使用的类和函数用途
* feat(OrchestrateService): 添加提示变量替换功能
在调用API前替换assistant.prompt中的变量,以支持动态提示内容
* refactor(providers): 重构基础 providers 定义和类型导出
将基础 provider IDs 和 schema 定义移到文件顶部
移除从 baseProviders 动态生成 IDs 的逻辑
使用 satisfies 约束 baseProviders 类型
* refactor(aiCore): 重构provider选项构建逻辑以支持更多provider类型
重构buildProviderOptions函数,使用schema验证providerId并分为基础provider和自定义provider处理
新增对deepseek、openai-compatible等provider的支持
* feat(reasoning): 增强模型推理控制逻辑,支持更多提供商和模型类型
添加对Hunyuan、DeepSeek混合推理等模型的支持
优化OpenRouter、Qwen等提供商的推理控制逻辑
统一不同提供商的思考控制方式
添加日志记录和错误处理
* refactor(aiCore): improve provider registration and model resolution logic
- Enhanced the model resolution logic to support dynamic provider IDs for chat modes.
- Updated provider registration to handle both OpenAI and Azure with a unified approach for chat variants.
- Refactored the `buildOpenAIProviderOptions` function to streamline parameter handling and removed unnecessary parameters.
- Added configuration options for Azure to manage API versions and deployment URLs effectively.
* feat(aiCore): 添加对智谱AI模型的支持
在getReasoningEffort函数中新增对智谱AI模型的支持逻辑,包括判断模型类型及设置对应的推理参数
* feat(翻译): 添加对Qwen MT模型翻译选项的特殊处理
添加对Qwen MT模型的支持,当助手类型为翻译时设置翻译选项。若目标语言不支持则抛出错误
* refactor(aiCore): 将console.log替换为logger.debug以改进日志记录
* refactor(aiCore): 提取 ModernAiProviderConfig 类型以复用
将多处重复的配置类型定义提取为 ModernAiProviderConfig 类型,提高代码可维护性
* refactor(services): 提取 FetchChatCompletionOptions 类型以提升代码可维护性
* refactor(ApiService): 重构 fetchChatCompletion 参数类型定义
将参数类型提取为独立的类型定义,支持 messages 或 prompt 两种参数形式
* fix(ApiService): 使FetchChatCompletionOptions参数变为可选
为了增加接口的灵活性,将options参数改为可选
* fix(ApiService): 修复prompt参数类型并添加消息转换逻辑
根据vercel/ai#8363问题,将prompt参数类型从StreamTextParams['prompt']改为string
当传入prompt参数时自动转换为messages格式
* refactor(translate): 重构语言检测功能,使用通用聊天接口替代专用接口
- 移除专用的语言检测接口 fetchLanguageDetection
- 使用现有的 fetchChatCompletion 接口实现语言检测功能
- 处理 QwenMT 模型的特殊逻辑
- 优化语言检测的提示词和参数处理
* refactor(TranslateService): 重构翻译服务使用新的API接口
移除旧的翻译逻辑,改用新的fetchChatCompletion接口实现翻译功能
简化代码结构并移除不再需要的依赖
* feat(abortController): 添加readyToAbort函数用于创建并注册AbortController
提供便捷方法创建AbortController并自动注册到全局映射中,简化取消操作的流程
* feat(aiCore): 添加对文本增量累积的可配置支持
根据模型是否支持文本增量来决定是否累积文本内容,新增accumulate参数控制行为
* fix(translate): 修复翻译过程中中止控制器的错误处理
修正abortController.ts中中止控制器的回调函数调用方式
统一翻译错误消息的格式化处理
改进翻译服务的中止逻辑和错误传播
* docs(i18n): 添加请求路径的国际化翻译
* fix(api): 修复API检查时的错误处理和取消逻辑
添加对API检查过程中错误的处理,并支持通过abortController取消请求
避免空系统提示词导致的报错,优化检查流程的健壮性
* feat(mini窗口): 添加ErrorBoundary组件包裹内容
为mini窗口内容添加错误边界组件,防止未捕获错误导致整个应用崩溃
* feat(release): 更新版本至1.6.0-beta.3并添加新功能和优化
- 新增多个功能,包括ErrorBoundary组件、智谱AI模型支持、系统OCR功能、文件页面批量删除等
- 重构翻译服务和语言检测功能,提升扩展性和类型安全
- 修复多个问题,改善API检查和翻译过程中的错误处理
- 优化构建配置和性能,提升初始化效率
* test: 更新ApiService测试中ApiClientFactory的模拟路径
* refactor(vertexai): 将VertexAI配置检查从ApiClientFactory移至VertexAPIClient
重构VertexAI客户端的配置检查逻辑,将其从工厂类移动到具体的客户端实现类中
* test(aiCore): 更新客户端兼容性测试的mock数据
添加isOpenAIModel等mock函数用于测试
修复AnthropicVertexClient的mock路径
添加注释说明服务层不应调用React Hook
* fix: 添加注释说明redux设置状态不应被服务层使用
* test(ActionUtils): 添加对ConversationService和models模块的mock测试
* test(Spinner): 更新快照
* test(ThinkingBlock): 移除不再需要的实时计时测试用例
* refactor(ThinkingBlock): 优化条件渲染逻辑以提高可读性
* test(streamCallback): 添加serializeError的mock实现
* fix(registry): enhance provider config validation and update error handling in tests
- Added a check for null or undefined config in registerProviderConfig function.
- Updated tests to ensure proper error messages are thrown when no providers are registered.
- Adjusted mock implementations in generateImage tests to reflect changes in provider model identifiers.
* refactor(aiCore): consolidate StreamTextParams type imports and enhance type definitions
- Moved StreamTextParams type definition to a new file for better organization.
- Updated imports across multiple files to reference the new location.
- Adjusted related type definitions in ApiService and ConversationService for consistency.
* feat(providerConfig): add AWS Bedrock support in provider configuration
- Implemented AWS Bedrock integration by adding access key, region, and secret access key retrieval.
- Enhanced providerToAiSdkConfig function to handle Bedrock-specific options.
* fix(providerConfig): update Google Vertex AI import and creator function name
- Changed the import path for Google Vertex AI to '@ai-sdk/google-vertex/edge'.
- Updated the creator function name from 'createGoogleVertex' to 'createVertex' for consistency.
* feat(providerConfig): implement API key rotation logic for providers
- Added a new function to handle rotating API keys for providers, reusing legacy multi-key logic.
- Updated the providerToAiSdkConfig function to utilize the new key rotation mechanism.
- Enhanced TranslateService imports for better organization.
* fix(aiCore): update file data and mediaType extraction in convertFileBlockToFilePart function
- Modified the conversion logic to correctly extract base64 data and MIME type from the API response.
- Ensured that the filename remains unchanged during the conversion process.
* feat(aiCore): enhance file processing logic in convertFileBlockToFilePart function
- Added support for handling image files and document types beyond PDF.
- Implemented file size limit checks and fallback mechanisms for text extraction.
- Improved logging for file processing outcomes, including success and failure cases.
- Introduced functions to check model support for image input and large file uploads.
* chore(release): update version to 1.6.0-beta.4 and enhance release notes
- Updated version in package.json to 1.6.0-beta.4.
- Revised release notes in electron-builder.yml to reflect new features, improvements, and bug fixes, including API key rotation, AWS Bedrock support, and enhanced file processing capabilities.
* refactor(aiCore): restructure parameter handling and file processing modules
- Removed the transformParameters module and replaced it with a more organized structure under prepareParams.
- Introduced new modules for file processing, model capabilities, and parameter handling to improve code maintainability and clarity.
- Updated relevant imports across services to reflect the new module structure.
- Enhanced logging and error handling in file processing functions.
* refactor(providerConfig): improve provider handling and configuration logic
- Introduced formatPrivateKey utility for better private key management.
- Updated handleSpecialProviders function to streamline provider type checks and error handling.
- Enhanced providerToAiSdkConfig function to include Google Vertex AI configuration with private key formatting.
- Removed commented-out code for clarity and maintainability.
* chore(dependencies): update ai package version and enhance aiCore functionality
- Updated the 'ai' package version from 5.0.26 to 5.0.29 in package.json and yarn.lock.
- Refactored aiCore's provider schemas to introduce new provider types and improve type safety.
- Enhanced the RuntimeExecutor class to streamline model handling and plugin execution for various AI tasks.
- Updated tests to reflect changes in parameter handling and ensure compatibility with new provider configurations.
* refactor(AiSdkToChunkAdapter): streamline web search result handling
- Replaced the switch statement with a source mapping object for improved readability and maintainability.
- Enhanced handling of various web search providers by mapping them to their respective sources.
- Simplified the logic for processing web search results in the onChunk method.
* chore: update release notes and version to 1.6.0-beta.5
- Enhanced web search functionality and optimized knowledge base settings for better performance.
- Added automatic image generation for Gemini 2.5 Flash Image model and improved OCR service compatibility on Linux.
- Refactored AI core architecture and improved message retry mechanisms.
- Fixed various UI component issues and improved overall stability.
* feat: enhance provider configuration and stream text parameters
- Added maxRetries option to buildStreamTextParams for improved error handling.
- Implemented custom fetch logic for 'cherryin' provider to include signature generation in requests.
* chore: update release notes and version to 1.6.0-beta.6
- Refined performance optimizations for AI services and improved compatibility with various providers.
- Enhanced error handling and stability in the ModernAiProvider class.
- Updated version in package.json to 1.6.0-beta.6.
* refactor(ErrorBlock): simplify CodeViewer component usage
- Removed unnecessary props from CodeViewer in ErrorBlock for cleaner code and improved readability.
* refactor(CodeViewer): change children prop type to React.ReactNode
- Updated the children prop type in CodeViewer from string to React.ReactNode for improved flexibility in rendering various content types.
* chore: update migration version and add migration logic for version 147
- Incremented migration version from 146 to 147.
- Implemented migration logic to trim trailing slashes from the apiHost of the anthropic provider.
* feat(错误处理): 增强AI SDK错误处理并添加国际化支持
添加AiSdkErrorUnion类型用于统一处理AI SDK错误
实现safeToString函数安全转换任意值为字符串
添加formatAiSdkError和formatError函数格式化错误信息
在ErrorBlock中重构错误详情展示逻辑,支持多种错误类型
补充国际化字段用于错误信息展示
* feat(i18n): 添加错误相关的多语言翻译字段
* feat(错误处理): 统一使用SerializedError类型处理错误并增强类型安全
重构错误处理逻辑,使用@reduxjs/toolkit的SerializedError类型统一处理错误
新增错误类型定义文件并扩展SerializedError接口
更新相关组件和工具函数以适配新的错误类型
* refactor(CodeViewer): make children prop optional for improved flexibility
* feat(ErrorBlock): add success message on clipboard copy action
* refactor(types): 重构错误类型定义并添加序列化功能
- 将 SerializedError 从 @reduxjs/toolkit 移至本地定义
- 添加 Serializable 类型和序列化工具函数
- 更新相关文件中的错误类型引用
- 实现安全序列化功能用于错误处理
* fix(错误处理): 修复错误块中显示错误信息的问题
修正错误块组件中错误信息的显示问题:
1. 修复BuiltinError组件中错误名称显示为消息的问题
2. 修复AiSdkError组件中原因显示为消息的问题
3. 修复AiApiCallError组件中各种字段显示为消息的问题
4. 使用CodeViewer组件正确显示JSON格式数据
5. 移除CodeViewer组件中不必要的children属性
6. 设置serialize默认pretty为true
* feat(错误处理): 添加序列化错误类型检查函数并更新错误格式化逻辑
添加 isSerializedError 类型检查函数用于判断序列化错误
更新 formatError 和 formatAiSdkError 函数以处理序列化错误类型
修改 ErrorBlock 组件使用新的类型检查函数替代 instanceof 检查
* fix: 使用 SerializedError 类型替换 errorData 的 Record 类型
* fix: 为错误对象添加name和stack字段
在工具执行失败和数据库升级时,为错误对象补充name和stack字段以提供更完整的错误信息
* fix(错误处理): 使用JSON.stringify格式化响应头信息以提高可读性
* fix(ErrorBlock): 修复错误状态码检查逻辑以支持statusCode字段
* fix(ErrorBlock): 修复错误状态码检查逻辑以支持statusCode字段
* feat(AI Provider): Update image generation handling to use legacy implementation for enhanced features
- Refactor image generation logic to utilize legacy completions for better support of image editing.
- Introduce uiMessages as a required parameter for image generation endpoints.
- Update related types and middleware configurations to accommodate new message structures.
- Adjust ConversationService and OrchestrateService to handle model and UI messages separately.
* docs(types): 添加prompt类型的注释
* feat: Update message handling to include optional uiMessages parameter
- Modify BaseParams type to make uiMessages optional.
- Refactor message preparation in HomeWindow and ActionUtils to handle modelMessages and uiMessages separately.
- Ensure compatibility with updated message structures in fetchChatCompletion calls.
* refactor(types): Enhance Serializable type to include SerializableValue for improved serialization handling
- Updated Serializable type to use SerializableValue for better clarity and structure.
- Ensured compatibility with nested objects and arrays in serialization logic.
* refactor(serialize): 重命名 SerializableValue 为 SerializablePrimitive 以提高可读性
将 SerializableValue 类型重命名为 SerializablePrimitive 以更准确地反映其用途,仅包含基本类型
* Revert "refactor(serialize): 重命名 SerializableValue 为 SerializablePrimitive 以提高可读性"
This reverts commit
|
||
|
|
c2a1178dff |
refactor: update preferences management and enhance PreferenceService documentation
- Updated preferences types in preferences.ts to use PreferenceTypes for better type safety. - Added new preference keys related to notes features in preferences.ts. - Enhanced documentation in PreferenceService.ts and usePreference.ts to clarify usage and update strategies. - Improved caching and subscription mechanisms in PreferenceService for better performance and reliability. |
||
|
|
566dd14fed |
refactor: enhance preference management and streamline component integrations
- Updated various components to utilize the usePreference hook, replacing previous useSettings references for improved consistency and maintainability. - Introduced new preference types for ChatMessageStyle, ChatMessageNavigationMode, and MultiModelMessageStyle to enhance type safety. - Refactored preference handling in multiple files, ensuring a more streamlined approach to managing user preferences. - Cleaned up unused code and comments related to previous settings for better clarity and maintainability. - Updated auto-generated preference mappings to reflect recent changes in preference structure. |
||
|
|
68cd87e069 |
refactor: update UpgradeChannel handling and improve preference integration
- Commented out the UpgradeChannel enum in constant.ts and moved it to preferenceTypes.ts for better organization. - Updated various components to utilize the new UpgradeChannel type from preferenceTypes, enhancing type safety and consistency. - Refactored preference handling across multiple files to streamline the use of the usePreference hook, replacing previous settings references. - Cleaned up unused code and comments related to previous settings for improved maintainability. - Updated auto-generated preference mappings to reflect recent changes in preference structure. |