Commit Graph

54 Commits

Author SHA1 Message Date
Arvin Xu
a93cfcd703 feat: support nano banana pro (#10413)
* fix nanobanana

* add types

* 完成 fetch sse 和 google ai 侧转换

* thinking

* ui for part render

* support image in thinking

* fix issue

* support convert content part

* support nano banana pro image generation

* fix tests

* fix tests
2025-11-26 00:16:44 +08:00
LobeHub Bot
89a0fa5337 🌐 chore: translate non-English comments to English in packages/utils (#10351)
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-22 23:18:55 +08:00
YuTengjing
474af231b5 🔧 chore: sync cloud changes (#10307) 2025-11-19 19:05:38 +08:00
LobeHub Bot
992f4e5ad7 test: add unit tests for colorUtils (#10268)
Added comprehensive unit tests for convertAlphaToSolid function covering:
- Fully opaque and transparent colors
- Various opacity levels (25%, 50%, 75%, 99%)
- Different color formats (hex, rgba, named colors)
- Complex color blending scenarios
- Edge cases with very low/high alpha values
- Complementary colors blending
- Grayscale blending
- Input format consistency

Total: 21 test cases, all passing

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

Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-18 11:20:11 +08:00
renovate[bot]
b76e3c85b9 Update all non-major dependencies (#10177)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-17 09:56:56 +08:00
LobeHub Bot
39d91a86c0 test: add unit tests for validateRedirectHost (#10173)
Added comprehensive unit tests for the validateRedirectHost security function covering:
- Invalid input validation
- Exact host matching
- Localhost environment handling
- Subdomain validation
- Open redirect attack prevention
- Port handling with standard and custom ports
- Edge cases (IPv4, case sensitivity, malformed inputs)
- Real-world deployment scenarios

All 52 test cases pass successfully.
2025-11-13 20:05:50 +08:00
YuTengjing
4f7bc5acd2 🐛 fix: add SSRF protection (#10152) 2025-11-11 19:39:36 +08:00
YuTengjing
2f4c25d826 ♻️ refactor: edge to node runtime (#10149) 2025-11-10 23:44:10 +08:00
LobeHub Bot
88e376272c 🌐 chore: translate non-English comments to English in packages/utils and src/services (#10143)
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-10 11:34:19 +08:00
LobeHub Bot
5c817bc304 test: add unit tests for trace utilities (#10136)
- Added comprehensive unit tests for packages/utils/src/trace.ts
- Tests cover getTracePayload, getTraceId, and createTraceHeader functions
- Includes edge cases, Unicode handling, and round-trip encoding/decoding
- All 23 test cases pass successfully

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

Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-09 15:21:35 +08:00
LobeHub Bot
2b74d0be05 🌐 chore: translate non-English comments to English in packages/utils (#10133)
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-09 15:00:15 +08:00
Arvin Xu
b95e741717 feat: refactor to use agent runtime as the generation core and support branch mode (#10080)
* refactor

* refactor

* refactor message group

* wip

# Conflicts:
#	src/store/chat/slices/aiChat/actions/generateAIChatV2.ts

* refactor

* refactor agent mode

* fix style

* refactor agent executors

* finish the refactor

* remove gpt-tokenizer

* add metadata api

* add fix

* support branch

* fix branch render data

* fix send issue

* refactor style

* refactor style

* refactor tests

* refactor chatStore

* refactor from model to model

* fix tests

* refactor regenerate mode

* update style

* fix lint

* refactor

* refactor

* refactor

* fix delete

* refactor thread mode

* fix basic experience

* fix

* fix tests

* fix manual add

* fix tests

* fix group
2025-11-07 16:44:03 +08:00
LobeHub Bot
d17b07fda9 🌐 chore: translate non-English comments to English in utils/server (#10057)
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-05 10:55:53 +08:00
Arvin Xu
e6fc44be76 test: add unit tests for apiKey (#10031)
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-04 10:12:45 +08:00
LobeHub Bot
9c0ac419d0 🌐 chore: translate non-English comments to English in utils/client (#10029) 2025-11-04 09:13:48 +08:00
Arvin Xu
4ee4590630 ♻️ refactor: remove deperated code (#10001)
* remove

* improve

* remove chatModels

* remove user model list slice

* improve lab image

* remove deprecated code

* remove clerk_sign_up

* fix tests
2025-11-03 13:14:35 +08:00
Arvin Xu
7fa6c749db 🔨 chore: pre-merge message group code (#9896)
* update

* update
2025-10-27 13:42:50 +08:00
Shinji-Li
b59ee0aabe ♻️ refactor: change discover page from RSC to SPA to improve performance (#9828)
* feat: change discord page to spa

* fix: change locals

* feat: update router change

* fix: revert some files

* feat: add model provider detail page use link

* fix: add trpc back

* feat: update e2e timeout time

* feat: change discord page to spa

* fix: change locals

* feat: update router change

* fix: revert some files

* feat: add model provider detail page use link

* fix: add trpc back

* feat: update e2e timeout time

* fix: use reactrouter-dom link replace next link
2025-10-22 23:35:49 +08:00
Maple Gao
15ffe289f5 feat: add ComfyUI integration Phase1(RFC-128) (#9043)
Co-authored-by: YuTengjing <ytj2713151713@gmail.com>
2025-10-21 15:34:57 +08:00
YuTengjing
3b2a2c1c54 💄 style: add imagen model to vertex ai (#9699)
* ♻️ refactor: rename isLocalUrl to isDesktopLocalStaticServerUrl

Rename the function to better reflect its specific purpose of checking
desktop local static server URLs (127.0.0.1 only). Update all usages
across the codebase including imports, function calls, and test cases.

*  feat(model-bank): add Vertex AI image generation models

- Add Nano Banana (Gemini 2.5 Flash Image) models
- Add Imagen 4 series (Standard, Ultra, Fast, Preview variants)
- Export shared parameters for reuse across providers

*  test(context-engine): fix mock after function rename

Update test mock from isLocalUrl to isDesktopLocalStaticServerUrl

* ♻️ refactor: use submodule imports for @lobechat/utils

- Change from barrel imports to direct submodule imports
- Update test to mock only necessary functions (imageUrlToBase64)
- Fix test URL from localhost to 127.0.0.1 for isDesktopLocalStaticServerUrl
- Update package.json exports for utils submodules

*  test: update mocks after function rename

Update test mocks from isLocalUrl to isDesktopLocalStaticServerUrl

*  test(chat): fix mocks to use submodule imports
2025-10-14 18:15:58 +08:00
Arvin Xu
15ebcb414b 🐛 fix: fix mcp server connect issue and refactor web search implement (#9694)
* add

* clean

* refactor

* refactor

* add test

* fix style

* refactor to improve search performance

* refactor types

* refactor types

* refactor types

* fix mcp retry issue

* add more tests

* fix test and types

* fix test

* fix desktop remote streamable http

* add local

* fix tests

* update
2025-10-14 10:58:47 +08:00
Arvin Xu
cb986040d5 🐛 fix: fix tools calling long name length >64 issue (#9697)
* add ToolNameResolver

* fix ToolName generate tests

* fix tests
2025-10-14 10:54:40 +08:00
Tsuki
c609c77f24 🔧 chore: export plugin module and clean up imports in toolCall (#9619) 2025-10-09 18:48:21 +08:00
YuTengjing
08ea8561f9 fix: qwen image inside new api (#9587) 2025-10-06 21:46:22 +08:00
Arvin Xu
e10aa05a11 🔨 chore: improve github workflow (#9511)
* improve workflow file

* clean

* update
2025-10-02 04:56:34 +08:00
Arvin Xu
a194d48545 🐛 fix: fix frontend random API key config not work (#9477)
*  feat: add frontend random API key selection support

- Implement ClientApiKeyManager for random selection from comma-separated keys
- Update getProviderAuthPayload to use random key picking for all providers
- Add comprehensive tests for the new functionality
- Mirror existing server-side implementation for consistency

Closes #9255

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

Co-authored-by: LobeHub Bot <lobehubbot@users.noreply.github.com>

* fix tests

* fix implement

* fix test

* fix test
2025-10-01 05:46:24 +08:00
YuTengjing
49ea508cc4 🔨 chore: support chat api and create image cost caculate (#9492) 2025-09-30 21:09:56 +08:00
Arvin Xu
273e0277d1 🔨 chore: pre-merge group chat relative implement (#9432)
* pre-merge code

* fix tests

* fix circular

* remove redirectUri

* fix types

* improve sql

* fix docs

* fix lint

* update model runtime
2025-09-26 03:47:25 +08:00
Arvin Xu
f02d43b8d3 feat: support google video understanding (#8761)
* refactor

improve upload

fix tests

clean client mode

add video

support google image understand

* update

* fix tests
2025-09-21 21:37:06 +08:00
Arvin Xu
7dc000e10c ♻️ refactor: improve codebase (#9353)
refactor
2025-09-21 16:57:16 +08:00
Arvin Xu
70f52a3c1f 🐛 fix: fix oidc open direct issue (#9315)
* add tests

* fix open direct

* update
2025-09-18 20:47:49 +08:00
Arvin Xu
8711ea244c 🔨 chore: fix nextjs@15.5.x runtime warning (#9063)
* update

fix tools

Update route.ts

Update next dependency version to ^15.5.0

更新 package.json

test prebuild type-check

try

* Change 'next' dependency version in package.json

Updated 'next' dependency version from ^15.5.3 to ~15.3.5.
2025-09-18 19:13:36 +08:00
Arvin Xu
9f044edd07 🐛 fix: fix svg xss issue (#9313)
* fix svg xss

* fix svg xss

* update

* improve

* fix
2025-09-18 12:53:56 +08:00
YuTengjing
1762dc9148 ♻️ chore: refactor router runtime (#9306) 2025-09-17 23:30:04 +08:00
Arvin Xu
dacfffdb63 ♻️ refactor: refactor message proccesser to the context engine (#9230)
* init context engine

* refactor

* refactor

* move

* refactor

* refactor PlaceholderVariables

* refactor name

* refactor

* update

* fix tests

* update workflow

* clean code

* add test

* move from store into service

* implement the HistoryTruncate and Input Template into context engine

* fix history truncate

* clean
2025-09-13 00:12:53 +08:00
YuTengjing
26a743f3bd feat: Seedream 4.0 (#9198) 2025-09-10 19:51:43 +08:00
CanisMinor
8be822b0b7 🐛 fix: Fix editor key handling (#9189)
* 🐛 fix: Fix editor send key handling

* 🐛 fix: Fix editor key handle
2025-09-09 23:12:02 +08:00
Arvin Xu
6f87034303 ♻️ refactor: refactor to remove edge runtime and add more tests (#9133)
* refactor to add more tests

* refactor the add

* update

* remove edge runtime

* improve types

* remove edge runtime

* fix

* revert auth part

* revert auth part

* revert auth part
2025-09-06 18:44:19 +08:00
Arvin Xu
f813d0c429 test: add model runtime tests (#9128)
* fix

* refactor to remove model runtime alias in tests
2025-09-06 14:57:14 +08:00
Arvin Xu
f4c3002b55 test: refactor to improve utils tests and add more tests (#9124)
* refactor to improve utils code

* refactor to improve const code

* refactor to improve types code

* add web crawler tests

* refactor citation item

* add electron server ipc tests

* fix tests

* add more tests

* add timeout
2025-09-06 12:21:58 +08:00
CanisMinor
38d9d98b97 feat: ChatInput support rich text and support parallel send (#8964)
*  feat: Add LobeEditor

* fix tests

* fix mobile

---------

Co-authored-by: arvinxx <arvinx@foxmail.com>
2025-09-06 09:51:52 +08:00
Rylan Cai
411f88eca1 ♻️ refactor: make LobeNextAuthDBAdapter Edge Compatible (#9088)
* ♻️ refactor: make adapter edge compatible

* ♻️ refactor: cascade changes

* 🐛 fix: default callbackUrl

* ♻️ refactor: use adapter & strategy control

* ♻️ refactor: migreate

* ♻️ refactor: immediate return

* ♻️ refactor: improve codes & remove tests

*  test: update auth test

* 🐛 fix: date conversation err

* 🐛 fix: naming

* ♻️ refactor: cascade changes

*  test: no longer need not impl err

* 🐛 fix: only init db adapter in server service
2025-09-04 21:42:39 +08:00
Arvin Xu
7bd25d96fe 👷 build: Revert "♻️ refactor: make LobeNextAuthDBAdapter Edge Compatible" (#9086)
Revert "♻️ refactor: make LobeNextAuthDBAdapter Edge Compatible (#8188)"

This reverts commit f456e91d7b.
2025-09-04 19:36:03 +08:00
Rylan Cai
f456e91d7b ♻️ refactor: make LobeNextAuthDBAdapter Edge Compatible (#8188)
* ♻️ refactor: make adapter edge compatible

* ♻️ refactor: cascade changes

* 🐛 fix: default callbackUrl

* ♻️ refactor: use adapter & strategy control

* ♻️ refactor: migreate

* ♻️ refactor: immediate return

* ♻️ refactor: improve codes & remove tests

*  test: update auth test

* 🐛 fix: date conversation err

* 🐛 fix: naming

* ♻️ refactor: cascade changes

*  test: no longer need not impl err
2025-09-04 17:32:20 +08:00
Arvin Xu
4813b6df27 feat: refactor to speed up send message in server mode (#9046)
* refactor send message

* support message rag data

* fix

* fix tests

* fix lint

* add tests

* fix bug
2025-09-04 12:53:55 +08:00
YuTengjing
58e19f856c feat: add nano banana Chinese prompt notify (#9038) 2025-09-03 16:29:13 +08:00
Arvin Xu
2a5f8d712f ♻️ refactor: remove base path (#9015)
* clean

* remove

* fix

* move config to envs

* remove envs
2025-09-01 00:30:13 +08:00
Arvin Xu
9f7677d560 ♻️ refactor(model-runtime): refactor model-runtime dependencies and clean code (#8997)
* refactor and clean code

* refactor to remove circular deps

* refactor to clean code

* refactor to clean code

* refactor model-runtime

* refactor image const

* refactor model-runtime import

* fix lint circular

* refactor the @/lib/model-runtime

* fix tests

* refactor to clean code
2025-08-30 23:52:42 +08:00
Arvin Xu
c65eb095ba ♻️ refactor: refactor the model-bank package from src/config/aiModels (#8983)
* move

* refactor with model banks

* refactor with model banks

* refactor @/config/aiModels to model-bank

* refactor @/config/aiModels to model-bank

* fix model bank exports

* clean

* add test workflow

* try again

* fix

* add exports tests

* fix model bank alias

* Update tsconfig.json

* fix import issue

* clean unused code

* fix tests
2025-08-30 01:28:16 +08:00
YuTengjing
64b969ec35 feat: ai image support Gemini 2.5 Flash Image (#8966) 2025-08-29 01:48:01 +08:00