Commit Graph

5003 Commits

Author SHA1 Message Date
defi-failure
ff8e5ddd27 fix: close prompt stream when finish or error chunk received 2025-11-06 17:27:03 +08:00
defi-failure
530e6516fd chore: code cleanup 2025-11-06 17:19:53 +08:00
kangfenmao
ab21c0d56c feat(SessionItem): implement auto-rename feature for sessions and improve context menu handling
- Added a new context menu option to automatically rename sessions based on topics.
- Introduced useDeferredValue for managing target session state.
- Updated imports to include necessary thunk actions and components.
- Enhanced API service to handle optional assistant model in message summary fetching.
- Exported renameAgentSessionIfNeeded function for better accessibility in the store.
2025-11-06 16:15:06 +08:00
kangfenmao
21ea8ccf37 Merge branch 'main' of github.com:CherryHQ/cherry-studio into refactor/heroui-antd
# Conflicts:
#	src/renderer/src/pages/home/Tabs/components/AddButton.tsx
#	src/renderer/src/pages/home/Tabs/components/SessionItem.tsx
#	src/renderer/src/pages/home/Tabs/components/Sessions.tsx
#	src/renderer/src/pages/home/Tabs/components/Topics.tsx
#	src/renderer/src/pages/paintings/NewApiPage.tsx
2025-11-06 15:29:09 +08:00
kangfenmao
ab7b207d29 refactor: streamline event listener management in useAppInit and update ToolPermissionRequestCard styling 2025-11-06 14:50:05 +08:00
Jake Jia
816a92c609
feat(app-menu): add full i18n support and sync lanuage with app language settings (#11131)
Previously, the macOS menu bar was always displayed in English regardless of
system language or in-app language settings. This change enables the menu bar
to dynamically follow the application's language preference.

Key changes:
- Add language change listener to automatically update menu when user switches language
- Refactor AppMenuService with proper subscription management and cleanup
- Add appMenu translations for en-us, zh-cn, and zh-tw locales
- Implement destroy method to prevent memory leaks from config subscriptions
- Convert all menu items (File, Edit, View, Window, Help) to use localized labels

The menu bar now respects the in-app language setting and updates in real-time
when users change their preferences, providing a consistent multilingual experience.
2025-11-06 14:46:42 +08:00
kangfenmao
3834c5d402 refactor: enhance API server state management and remove unused initialization in useAppInit 2025-11-06 14:21:25 +08:00
kangfenmao
a64b94a41f refactor: update OpenAPI documentation paths to include subdirectories for better route coverage 2025-11-06 13:21:58 +08:00
kangfenmao
2e0ff28505 refactor: center align columns in InstalledPluginsList and set AntTable size to small 2025-11-06 12:27:32 +08:00
defi-failure
84bf94e2ff refactor: align create agent model selection with edit agent 2025-11-06 12:06:09 +08:00
kangfenmao
84f2281506 refactor: integrate API server functionality into various components and enhance user notifications 2025-11-06 11:29:32 +08:00
kangfenmao
4e01210df4 refactor: replace ContextMenu with Dropdown in AgentItem and SessionItem components for improved context menu handling 2025-11-06 10:56:38 +08:00
beyondkmp
83e4d4363f
fix: add Perplexity provider support and update API host formatting (#11162)
* feat: add Perplexity provider support and update API host formatting

- Introduced `isPerplexityProvider` function to identify Perplexity providers.
- Updated `formatProviderApiHost` to handle Perplexity provider API host formatting.
- Added unit tests for Perplexity provider configuration to ensure correct API host formatting behavior.

* fix: add 'perplexity' to unsupported API version providers list
2025-11-06 10:43:33 +08:00
kangfenmao
9df38c7e83 refactor: update AddButton styling to use CSS variable for border radius and remove unused settings hook 2025-11-06 10:27:30 +08:00
kangfenmao
251c269ab3 refactor: remove unused error handling alerts from AssistantsTab component 2025-11-06 10:14:35 +08:00
kangfenmao
9b9640d8d1 refactor: adjust margin styling for UnifiedAddButton component 2025-11-06 10:07:26 +08:00
kangfenmao
edd6b11aa7 refactor: update AddButton styling based on topic position and clean up CSS for root element 2025-11-06 10:04:01 +08:00
kangfenmao
1c0de625d8 fix: update assistant addition messages for multiple languages 2025-11-06 09:56:42 +08:00
dev
0ea4dd4e3a fix: init message api err 2025-11-05 21:01:24 +08:00
dev
f3bbd4ed44 refactor: remove heroui 2025-11-05 20:42:49 +08:00
dev
d01609fc36 refactor: migrate heroui/toast to antd message 2025-11-05 20:12:07 +08:00
kangfenmao
f4b14dfc10 refactor: enhance Sessions component layout with styled Scrollbar and adjust UnifiedAddButton margins 2025-11-05 18:51:29 +08:00
kangfenmao
6ae5f69163 refactor: update PluginSettings and ToolingSettings for improved layout and functionality 2025-11-05 18:44:13 +08:00
kangfenmao
fcb0020787 wip 2025-11-05 18:29:52 +08:00
dev
02265f369e fix: error block related 2025-11-05 17:26:39 +08:00
dev
5e22d9d36f fix: note head nav related 2025-11-05 17:14:25 +08:00
dev
3f52b7766a chore: remove dead code 2025-11-05 16:45:49 +08:00
dev
484622f12b chore: remove dead code 2025-11-05 16:43:12 +08:00
dev
2bceb302e0 fix: tool setting related 2025-11-05 15:33:25 +08:00
Phantom
1103449a4f
fix: wrong migration in #10727 (#11151) 2025-11-05 14:33:07 +08:00
beyondkmp
56c7a7f066
🐛 fix: resolve TypeScript type conflicts and React hooks warnings (#11148)
* 🐛 fix: resolve TypeScript type conflicts and React hooks warnings

- Add @smithy/types@4.7.1 to resolutions to unify AWS SDK dependencies
- Wrap updatePaintingState in useCallback to fix exhaustive-deps warning
- Fix AWS Bedrock client type incompatibility issues

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(i18n): Auto update translations for PR #11148

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: GitHub Action <action@github.com>
2025-11-05 14:19:14 +08:00
Phantom
caa59c4c50
refactor(Topics & Sessions): Style and code structure adjustments (#10868)
* refactor(Tabs): extract shared styled components into separate file

Move common styled components (ListItem, ListItemNameContainer, ListItemName, ListItemEditInput) from SessionItem.tsx and Topics.tsx into shared.tsx to improve code reuse and maintainability

* refactor(components): extract ListContainer component for shared tab layouts

Create reusable ListContainer component to standardize layout styling across tabs
Replace manual div containers in Sessions and Topics components with new ListContainer

* refactor(ListItem): convert styled component to Tailwind CSS function component

- Convert ListItem from styled-components to Tailwind CSS function component
- Maintain all original styling and hover/active states
- Use HTMLDivElement props interface for proper TypeScript typing
- Preserve CSS custom properties for theme variables

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* refactor(ListItemNameContainer): convert styled component to Tailwind CSS function component

- Convert ListItemNameContainer from styled-components to Tailwind CSS function component
- Simplify layout styles using Tailwind's utility classes
- Use HTMLDivElement props interface for proper TypeScript typing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* refactor(ListItemName): convert styled component to Tailwind CSS function component

- Convert ListItemName from styled-components to Tailwind CSS function component
- Use inline styles for webkit-specific line clamping properties
- Remove complex animations from component definition (can be added via CSS classes)
- Use HTMLDivElement props interface for proper TypeScript typing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* refactor(ListItemEditInput): convert styled component to Tailwind CSS function component

- Convert ListItemEditInput from styled-components to Tailwind CSS function component
- Use proper InputHTMLAttributes type for input elements
- Remove styled-components import as no longer needed
- Maintain all original styling using Tailwind utility classes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* refactor(components): improve type safety and class ordering in shared components

- Replace HTMLAttributes with more specific ComponentProps types
- Reorder class names for better readability and consistency

* refactor(components): update styling and class handling in list items

- Replace deprecated classNames utility with cn from @heroui/react
- Consolidate style properties into className using cn
- Improve CSS selector syntax for better specificity
- Standardize padding and border radius values

* Revert "refactor(ListItemName): convert styled component to Tailwind CSS function component"

This reverts commit 196136068d.

* style(shared): increase font size and remove redundant padding

The font size was increased from 13px to 14px for better readability. Redundant padding in ListItemEditInput was removed to maintain consistent styling.

* refactor(AddButton): simplify component by removing FC type and inline props

Remove unnecessary FC type declaration and inline the Props interface with ButtonProps. Also clean up prop spreading by moving it to the end of the component.

* style(Topics): remove redundant className and add overflow styles

* refactor(components): extract MenuButton to shared components

Move MenuButton implementation from individual components to shared module to reduce code duplication and improve maintainability

* refactor(PendingIndicator): convert styled component to Tailwind CSS function component

- Convert PendingIndicator from styled-components to Tailwind CSS function component
- Use ComponentPropsWithoutRef<'div'> for consistent TypeScript typing
- Replace styled-components attrs with Tailwind animate-pulse class
- Use CSS custom properties for pulse-size variable
- Remove styled-components import as no longer needed

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* refactor(components): replace styled indicators with shared StatusIndicator

Consolidate PendingIndicator and FulfilledIndicator into a single StatusIndicator component with variant support

* style(shared.tsx): adjust border styles for singlealone active state

* refactor: use type-only imports for react props

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-05 14:14:40 +08:00
dev
5c455f25eb chore: remove dead code 2025-11-05 13:59:33 +08:00
dev
d1d1dbc046 fix: tool permission card related 2025-11-05 13:51:41 +08:00
fullex
2546dfbe5d chore: update Node.js version to 22 and Yarn version to 4.9.1 across workflows and documentation 2025-11-05 12:54:30 +08:00
dev
bf4ec23ef7 fix: remove button and modal renaming 2025-11-05 12:22:53 +08:00
dev
47db5baeb1 fix: plugin setting related 2025-11-05 12:20:36 +08:00
kangfenmao
81fecce552 refactor: enhance ChatNavbarContent structure by replacing Breadcrumbs with custom layout and adding separators 2025-11-05 12:16:42 +08:00
kangfenmao
fc64b6c611 refactor: simplify MessageAgentTools component structure by removing unnecessary wrapper div 2025-11-05 12:10:48 +08:00
kangfenmao
e0f383a050 fix: update button classes in AddAssistantOrAgentPopup for improved cursor behavior 2025-11-05 12:08:32 +08:00
kangfenmao
720284262f refactor: update AgentModal to use TopView for improved modal management and enhance form structure 2025-11-05 12:06:58 +08:00
kangfenmao
b334a2c5be refactor: replace UpdateDialog with UpdateDialogPopup for better modal handling 2025-11-05 11:40:47 +08:00
dev
468aebd632 fix: plugins related wip 2025-11-05 10:56:40 +08:00
beyondkmp
5fea202a7d
fix: add PowerMonitorService for system shutdown handling (#11115)
* feat: add PowerMonitorService for system shutdown handling

- Add PowerMonitorService to monitor system shutdown events
- Use @paymoapp/electron-shutdown-handler for Windows platform
- Use Electron's powerMonitor for macOS and Linux platforms
- Support registering multiple shutdown handlers via dependency injection
- Register shutdown handlers in ipc.ts to disable auto-update and save data

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* format code

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-04 18:56:09 +08:00
dev
bd4a979f62 fix: add button related 2025-11-04 17:46:14 +08:00
dev
b3316a4dc8 fix: agent tool result related components 2025-11-04 17:18:31 +08:00
fullex
7dce1d776b
feat: app's version history log (#11097)
* feat: integrate version tracking in app initialization

- Added versionService to record the current version during app startup.
- This change prepares for upcoming data refactoring in version 2.

* fix: lint from other PRs & format

* feat: enhance version tracking with meaningful change detection

- Updated VersionService to check for changes in version, OS, environment, packaged status, and install mode before recording a new entry.
- Improved logging to reflect whether version information has changed or remained the same.
2025-11-04 14:13:07 +08:00
beyondkmp
346af4d338
fix: add CherryAI provider support and update API host formatting (#11135)
* fix: add CherryAI provider support and update API host formatting

* format code

* add ut

* format code
2025-11-04 12:59:14 +08:00
dev
6ca7597a98 fix: lint 2025-11-04 11:12:01 +08:00
kangfenmao
7d0f0b38a6 wip 2025-11-04 09:56:32 +08:00