cherry-studio/src/main
beyondkmp 4a62bb6ad7
refactor: replace axios and node fetch with electron's net module (#9212)
* refactor: replace axios and node fetch with electron's net module for network requests in preprocess providers

- Updated Doc2xPreprocessProvider and MineruPreprocessProvider to use net.fetch instead of axios for making HTTP requests.
- Improved error handling for network responses across various methods.
- Removed unnecessary AxiosRequestConfig and related code to streamline the implementation.

* lint

* refactor(Doc2xPreprocessProvider): enhance file validation and upload process

- Added file size validation to prevent loading files larger than 300MB into memory.
- Implemented file size check before reading the PDF to ensure efficient memory usage.
- Updated the file upload method to use a stream, setting the 'Content-Length' header for better handling of large files.

* refactor(brave-search): update net.fetch calls to use url.toString()

- Modified all instances of net.fetch to use url.toString() for better URL handling.
- Ensured consistency in how URLs are passed to the fetch method across various functions.

* refactor(MCPService): improve URL handling in net.fetch calls

- Updated net.fetch to use url.toString() for better type handling of URLs.
- Ensured consistent URL processing across the MCPService class.

* feat(ProxyManager): integrate axios with fetch proxy support

- Added axios as a dependency to enable fetch proxy usage.
- Implemented logic to set axios's adapter to 'fetch' for proxy handling.
- Preserved original axios adapter for restoration when disabling the proxy.
2025-08-15 22:48:22 +08:00
..
configs fix[SelectionAssistant]: shift+click behavior in macOS and clipboard behavior in Windows (#8390) 2025-07-23 17:24:26 +08:00
integration/nutstore/sso/lib build: remove sentry integration 2025-04-24 11:48:53 +08:00
knowledge refactor: replace axios and node fetch with electron's net module (#9212) 2025-08-15 22:48:22 +08:00
mcpServers refactor: replace axios and node fetch with electron's net module (#9212) 2025-08-15 22:48:22 +08:00
services refactor: replace axios and node fetch with electron's net module (#9212) 2025-08-15 22:48:22 +08:00
utils refactor: replace axios and node fetch with electron's net module (#9212) 2025-08-15 22:48:22 +08:00
bootstrap.ts refactor: move initAppDataDir function to a new utils module (#8337) 2025-07-21 15:46:14 +08:00
config.ts feat: new ui (#8322) 2025-07-23 14:36:39 +08:00
constant.ts feat: support portable config dir (#5039) 2025-04-24 17:23:56 +08:00
electron.d.ts feat: add the ability to display the application in tray #297 2024-11-09 08:42:09 +08:00
env.d.ts feat: added vite_main_bundle_id config and improved code cleanliness 2024-09-15 10:35:02 +08:00
index.ts feat: enable additional GPU channel features and improve crash reportdetails in renderer (#8819) 2025-08-04 18:45:17 +08:00
ipc.ts refactor(AppUpdater): remove mainWindow dependency and utilize windowService (#9091) 2025-08-12 23:09:37 +08:00