Commit graph

30 commits

Author SHA1 Message Date
arvinxx
2da0691d4e 🔧 chore: update basic config 2025-12-24 12:54:35 +08:00
Innei
f74befadc9
♻️ refactor(electron-main): client ipc decorate (#10679)
* refactor: client ipc

* refactor: server ipc

refactor: update IPC method names for consistency

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

fix: cast IPC return type to DesktopIpcServices for type safety

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

chore: add new workspace for desktop application in package.json

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

fix: export FileMetadata interface for improved accessibility

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

refactor: unify IPC mocking across test files for consistency

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

feat: enhance type-safe IPC flow with context propagation and service registry

- Introduced `getIpcContext()` and `runWithIpcContext()` for improved context management in IPC handlers.
- Updated `BrowserWindowsCtr` methods to utilize the new context handling.
- Added `McpInstallCtr` to the IPC constructors registry.
- Enhanced README with details on the new type-safe IPC features.

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

refactor: enhance IPC method registration for improved type safety

- Updated `registerMethod` in `IpcHandler` and `IpcService` to accept variable argument types, enhancing flexibility in method signatures.
- Simplified the `ExtractMethodSignature` type to support multiple arguments.

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

chore: add global type definitions and refactor import statements

- Introduced a new global type definition file to support Vite client imports.
- Refactored import statements in `App.ts` and `App.test.ts` to remove unnecessary type casting for `import.meta.glob`, improving code clarity.

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

* refactor: make groupName in BrowserWindowsCtr readonly for better encapsulation

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

* refactor: update IPC method registration and usage for improved type safety and consistency

- Replaced `@ipcClientEvent` with `@IpcMethod()` in various controllers to standardize IPC method definitions.
- Enhanced the usage of `ensureElectronIpc()` for type-safe IPC calls in service layers.
- Updated `BrowserWindowsCtr` and `NotificationCtr` to utilize the new IPC method structure, improving encapsulation and clarity.
- Refactored service methods to eliminate manual string concatenation for IPC event names, ensuring better maintainability.

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

---------

Signed-off-by: Innei <tukon479@gmail.com>
2025-12-09 15:01:18 +08:00
YuTengjing
44776b40bc
👷 build: nodejs 24 (#10003)
* build: upgrade node 24

* build: run pnpm update

* fix: tsgo not support baseUrl
2025-11-03 12:56:15 +08:00
Arvin Xu
abb71ec846
feat: upgrade to Next 16 (#9851)
* upgrade next 16

* try to fix

* try to fix

* upgrade

* fix sitemap build

* try to fix build

* try to fix build with next 16

* fix docker permission

* 🔒 fix(ci): fix code injection vulnerability and permissions in docker workflow

- Add pull-requests: write permission to allow PR comments
- Fix code injection vulnerability by using env variables instead of direct interpolation
- Prevent potential security risks from malicious branch names in pull_request_target events

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

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

* 🔧 chore(ci): change desktop pr build to use pull_request_target

- Change from pull_request to pull_request_target to access secrets and write permissions
- Update permissions from read-all to specific write permissions for contents and pull-requests
- This allows PR builds to create releases and comment on PRs from forks

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

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

* add comment

* fix on

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-02 00:53:13 +08:00
Rdmclin2
61bbd596f0
🔨 chore: mobile related server implementation pick from mobile app (#9691)
* server: sync from feat/mobile-app (exclude apps/mobile)

* Update package.json

* chore(mobile): update mobile router imports to use lambda

* chore(mobile): refactor mobile router

* chore: format tsconfig.json

* chore(mobile): simplify mobile router

---------

Co-authored-by: Arvin Xu <arvinx@foxmail.com>
Co-authored-by: Tsuki <976499226@qq.com>
2025-10-16 11:32:58 +07:00
Arvin Xu
8693d95e0d
🔨 chore: add e2e workflow (#9677)
* add e2e test

* Potential fix for code scanning alert no. 137: Workflow does not contain permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* remove

* update

* fix tests

* add e2e

* update

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-10-14 13:32:52 +08:00
Arvin Xu
7fe17e4028
♻️ refactor: refactor model runtime folder structure and add more tests (#9210)
* add test

* fix tests

* fix tests

* revert tests

* refactor model runtime folder

* refactor model runtime folder and remove @/libs/model-runtime

* fix lint

* move

* fix tests
2025-09-11 11:22:05 +08:00
Arvin Xu
f900f7ce4e
test: add unit tests for @lobechat/prompts (#8967)
* add test and refactor

* update

* move

* fix test

* improve config

* refactor utils server import

* move

* refactor @/utils/server to @lobechat/utils/server

* improve config

* fix tests
2025-08-28 20:44:28 +08:00
YuTengjing
0efe28d122
feat(image): polish ai image (#8915) 2025-08-25 22:38:41 +08:00
Arvin Xu
8dedc2d3e1
♻️ refactor: move utils to separate package (#8889)
* move utils

* move utils

* move utils

* update

* update

* update

* update

* update

* refactor to clean the tests

* fix release workflow

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* try to fix client db migration issue

* fix tests
2025-08-22 14:05:01 +08:00
Arvin Xu
af1f71572f
♻️ refactor: move database to packages (#8874)
* move db

* refactor db import

* refactor eval types

* fix tests

* fix tests

* fix tests

* fix db migration issues

* fix docker issue

* fix tests

* update alias

* fix tests

* update db test for client and server

* refactor db

* update codecov

* update codecov

* update codecov

* add docker pr comments
2025-08-22 11:09:03 +08:00
Maple Gao
79c81bb954
🔨 chore: update lint and TypeScript configs to exclude temporary directories (#8856)
- Add tmp, temp, .temp directories to .eslintignore
- Add .local, .cache, .claude, .serena directories to .eslintignore
- Create .stylelintignore with same ignore patterns
- Update tsconfig.json to exclude temporary directories from type checking
- Prevents linting and type checking of temporary and AI tool directories
2025-08-20 11:06:24 +08:00
Arvin Xu
30a4734577
♻️ refactor: refactor const folder to a new package (#8756)
* refactor

* update

* refactor
2025-08-16 20:04:21 +08:00
Arvin Xu
e5eb7a280d
♻️ refactor: refactor model-runtime to a seperated package (#8763)
* move model-runtime

* refactor import from @/libs/model-runtime to @lobechat/model-runtime

* move deps

* refactor types
2025-08-12 00:08:52 +08:00
Arvin Xu
3dcc5da11a
🐛 fix: fix fail to fetch aihubmix model on client mode (#8689)
* fix dockerfile

* update gitignore

* refactor some @/types to @lobechat/types

* improve apikey url

* fix aihubmix provider
2025-08-06 16:52:21 +08:00
Arvin Xu
3cc4a54d6f
♻️ refactor: move types to separate package (#8635)
* move types

* fix tests

* fix tests
2025-08-03 00:22:49 +08:00
Arvin Xu
a63e1f0ab7
🔨 chore: pre-merge some desktop relative code to check stable (#7294)
* pre some electron update code

* update chat test

* update i18n

* update code

* fix desktop hotkey display

* fix test ahead
2025-04-04 22:33:48 +08:00
Arvin Xu
b40caee32c
🔨 chore: add desktop pre-code to validate build process (#7261)
* add code

* fix lint

* fix tests
2025-04-02 09:31:08 +08:00
Arvin Xu
7e3aa09510
️ perf: refactor pwa implement to have better performance (#4124)
* test remove serwist

* 尝试优化 pwa install 实现

* Update next.config.mjs

* fix lint

* delay the service worker register

* only enabled on prod

* when isShowPWAGuide update, trigger guide too
2024-09-25 22:00:28 +08:00
Johnson
675902f5a8
feat(ollama): improve connection check method and provide selector for user to control model options (#1397)
* 🐛 fix(ollama): change checker with ollama's tags api

* feat(ollama): add error card to pull model

* 🚚 chore: move files

* 💄 style: update llava logo

* 🐛 fix: add ollama service unavailable error type

* 🐛 fix: ollama show passed with error message exists

*  feat(ollama): add download moniter to show speed and eta remaining time

* 🚨 ci: fix lint

* 💄 style: improve download style

* 🌐 style: add i18n

---------

Co-authored-by: shijianyue <shijianyue@bytedance.com>
Co-authored-by: arvinxx <arvinx@foxmail.com>
2024-03-15 22:47:21 +08:00
小云丨Arale
060969098c
feat: support login & session authentication via OAuth 2.0 (Auth0) (#1143)
*  feat: adding OAuth2 support

* 🐛 fix: translation for OAuth2

* ♻️ refactor: refactor OAuth 2.0

- clean up code under /api/openai
- update middleware.ts to use custom middleware
- clean up unnessary type definitions

* ♻️ refactor(config): Use server config to enable/disable OAuth 2.0

* 🐛 fix: Adapt OAuth 2.0 middleware to new authentication methods

* 📝 docs(config): Environment variables for Authentication Service Providers

* 📝 docs: Add authentication setup guides for LobeChat

docs: Add authentication setup guides for LobeChat
```

Added detailed documentation for setting up the authentication services in LobeChat, with a focus on integrating Auth0. This includes guides for creating an Auth0 application, adding users, and configuring environment variables. Advanced topics cover connecting to existing single sign-on services and setting up social logins. This effort enhances the platform's security and provides clear instructions for enterprise users on authentication procedures.

* 📝 docs: Add authentication integration guide for LobeChat

docs: Add authentication integration guide with Auth.js

Adds a comprehensive guide on integrating a new authentication provider
using Auth.js in both English and Chinese documentation. The guide
includes pre-requisites, step-by-step code integration, server
configuration updates, frontend changes, and environment variable setup.
```

The changes introduce a new guide in the documentation for integrating new authentication providers using Auth.js. The guide is provided in both English and Chinese, ensuring broad accessibility. It covers the necessary pre-requisites, detailed instructions for adding the core authentication code, updating server configuration, modifying frontend components, and setting up the required environment variables. This will aid developers in implementing authentication features using Auth.js in the LobeChat application.
2024-02-08 16:04:10 +08:00
Arvin Xu
615e796357
♻️ refactor: refactor the setting storage from localStorage to indexedDB (#1180)
* 🚧 wip: add user schema

* ♻️ refactor: refactor the copy with new api

* ♻️ refactor: refactor a preference slice

* ♻️ refactor: refactor the settings store

*  test: fix test

* 🎨 chore: clean code

* 🎨 chore: clean code

* 🎨 chore: clean code

* 🎨 chore: clean code

* 🐛 fix: fix update default agent

* 🐛 fix: fix update default agent
2024-01-30 22:38:25 +08:00
Arvin Xu
bb8085e707
♻️ refactor(migration): Next.js app router (#220) 2023-09-25 14:33:53 +08:00
arvinxx
fdb3a3fc68 ♻️ refactor: 优化 edit 代码结构 2023-07-22 17:24:13 +08:00
canisminor1990
c511964d96 feat: Introduce FOLDER_WIDTH constant and update components
- Add new constant FOLDER_WIDTH and use it in different components
- Import various components and libraries
- Define new functions and components
- Modify layout and structure of components in some files
- Update tsconfig.json to include new paths in the project
2023-07-20 14:34:39 +08:00
canisminor1990
e18fc57aaa feat: Add i18n auto flow pnpm run i18n 2023-07-18 11:38:10 +08:00
canisminor1990
53cd87c8ba feat(i18n): Add i18next and lobe-i18n internationalization configuration files and update dependencies
This commit introduces new configuration files for internationalization,
deletes one file, modifies existing files, and adds new files. The changes
also involve importing dependencies and updating app and document pages.
Additional libraries and modules are used in a React application. The Header
component is modified, the index page is updated for server-side translations,
and the tsconfig.json file is modified.

Description:
- Added configuration files for internationalization
- Deleted one file
- Modified existing files
- Added new files
- Imported dependencies
- Updated app and document pages
- Used additional libraries and modules in a React application
- Modified the Header component
- Updated the index page for server-side translations
- Modified the tsconfig.json file.
2023-07-15 18:22:47 +08:00
canisminor1990
4e522a6e2b 🔧 chore: Update setting
This commit introduces new components, modules, and features related to chat, sessions, and settings. It includes modifications to configuration files, updates to dependencies, adjustments to styles and layouts, and additions of new components and modules. The changes also involve updates to functions, interfaces, selectors, actions, and reducers. Additionally, there are modifications to TypeScript interfaces and types, as well as changes to parameters and functions in certain files.
2023-07-15 15:48:20 +08:00
Arvin Xu
3db700a3b0
sparkles: feat: Chat v0.1 (#7)
---------

Co-authored-by: canisminor1990 <i@canisminor.cc>
2023-07-11 19:46:11 +08:00
arvinxx
7861f97152 🎉 chore: 初始化项目配置 2023-05-21 15:34:04 +08:00