Commit Graph

50 Commits

Author SHA1 Message Date
Arvin Xu
760105adb2 🐛 fix: fix db migration snapshot not align with db schema (#10399)
* fix db sql

* clean
2025-11-24 21:15:25 +08:00
René Wang
eea41dcb82 👷 build: Add slug to documents table (#10299)
* feat: Add SLUG

* fix: CI

* feat: Update constairnt

* fix: Remove slug from files

* fix: Test error
2025-11-21 17:56:08 +08:00
René Wang
10e44dfb6b 👷 build: Update schema for incoming folder (#10217)
* feat: Update schema

* fix: Circular deps

* feat: Add more validate

* fix: Vercel build error

* fix: Duplicated import

* fix: Circular deps

* feat: Set varchar from 30 to 255

* feat: Regenerate migration file

* feat: Regenerate migration

* feat: Regenerate migration
2025-11-18 16:42:13 +08:00
Arvin Xu
656a33359b 👷 build: add intervention tool column (#10163)
* add intervention tool

* update sql
2025-11-12 10:25:03 +08:00
Shinji-Li
a15eda7fbf 🔨 chore: add market_identifier into agents table schema (#10164)
chore: add market_identifier into agents table schema
2025-11-11 22:37:47 +08:00
sxjeru
7e1dd02d7c ♻️ refactor: add settings (jsonb) column to ai_models table (#10042)
* Refactor code structure for improved readability and maintainability

* edit dbml

* feat: 更新 AiInfraRepos 以支持用户设置覆盖内置设置

* Revert "Refactor code structure for improved readability and maintainability"

This reverts commit 81453d8dc3.

* Refactor code structure for improved readability and maintainability

* 添加 IF NOT EXISTS 选项以避免重复列添加

* format
2025-11-04 21:02:40 +08:00
Arvin Xu
0d8188c60b ️ perf: improve db query performance (#10036)
* improve db query performance

* Remove query timing log from hasMoreThanN

Removed timing log from hasMoreThanN method.
2025-11-04 14:29:11 +08:00
Arvin Xu
8abfdecd54 ️ perf: improve db query performance (#9946)
* fix db performance issue

* fix tests
2025-10-31 12:39:59 +08:00
Neko
6c5caf9184 👷 build(database): improve user memory schema (#9822)
chore(database): improve user memory schema
2025-10-28 15:50:15 +08:00
René Wang
bf53c116dd 👷 build: Add editorData column on document table (#9899)
feat: Add rawData column
2025-10-27 17:12:55 +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
Arvin Xu
d99a3a80f8 🐛 fix: pass threadId to messages in sendMessageInServer (#9808)
* fix dev hydration

* 🐛 fix: pass threadId to messages in sendMessageInServer

- Add threadId parameter to CreateMessageParams interface
- Pass threadId when creating user and assistant messages in aiChat router
- Add comprehensive tests for threadId handling and outputJSON method

This ensures thread context is properly maintained across message creation.

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

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

*  test: add comprehensive tests for addUserMessage

- Test early return when activeId is undefined
- Test message creation with files
- Test threadId propagation when activeThreadId is set
- Test input message clearing after message creation
- Test handling messages without fileList

This ensures the addUserMessage action correctly handles all scenarios including thread context.

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



* fix thread fix

* move

* baseline

*  test: fix and improve message integration tests

- Mock FileService to avoid S3 initialization issues
- Mock getServerDB to use test database instance
- Add test for threadId parameter in message creation
- Fix pagination test to handle variable message counts
- Fix batchCreate test to skip rowCount assertion (undefined in PGlite)
- Skip topicId validation test (not currently enforced)

All 15 integration tests now passing.

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


* refactor

* improve
2025-10-21 12:54:52 +08:00
Arvin Xu
eb708e04fe 📝 docs: fix outdated server-side database documentation (#9806)
- Update environment file setup instructions to use docker-compose/local/.env.example instead of .env.example.development
- Fix references to environment file locations in both English and Chinese documentation
- Align documentation with actual Docker Compose configuration that uses env_file: .env in docker-compose/local/ directory

Fixes #9525

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

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com>
2025-10-21 11:24:12 +08:00
YuTengjing
de7368bc25 feat: add new setting for default image num (#9618) 2025-10-12 23:56:17 +08:00
Neko
23d61aebc9 🔨 chore(database): add user memory db schemas (#9371)
*  feat(database): user memory db schemas

* feat: migrations

* fix: id

* fix: syntax id

* update

* revert

---------

Co-authored-by: arvinxx <arvinx@foxmail.com>
2025-10-10 17:41:14 +08:00
Daniel Hofheinz
7ce0d1fbc4 📝 docs(dev): clarify feature organization patterns in tutorial (#9608)
- Distinguish between global (src/features/) and page-specific features
- Update code example to show page-specific pattern
- Add explanatory note on when to use each pattern

Fixes #9585
2025-10-09 10:48:52 +08:00
Arvin Xu
c83d7afbe6 📝 docs: update app directory structure documentation (#9582)
- Update folder-structure.mdx and zh-CN version to reflect current Next.js 13+ App Router architecture
- Replace outdated simple desktop/mobile structure with actual complex structure
- Add documentation for (backend), [variants], @modal, and desktop route groups
- Include API architecture explanation with tRPC and REST endpoints
- Document platform organization and deployment targets

Fixes #9522

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

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Arvin Xu <arvinxx@users.noreply.github.com>
2025-10-06 12:13:28 +08:00
Daniel Hofheinz
210a41bb8b 📝 docs: update Zustand import syntax for v5 compatibility (#9581) 2025-10-06 05:53:44 +02:00
Arvin Xu
af274190a8 🔨 chore: add group-messages database schema (#9543)
* add group messages

* update

* add migrations

* ♻️ refactor: refactor message group

* fix

* fix

* update schema
2025-10-05 23:49:27 +08:00
René Wang
b0cb96e5c2 👷 build: Add virtual column to agent table (#9464) 2025-09-29 10:07:19 +02: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
cee555a0f0 ♻️ refactor: improve db sql performance (#9283)
* improve sql

* improve db index

* improve db index

* improve db index
2025-09-16 19:33:35 +08:00
Arvin Xu
c21c14e715 🐛 fix: fix azure ai runtime error (#9276)
* fix azure ai

* improve agent schema

* improve agent schema

* improve header size

* remove sentry

* remove sentry

* fix

* clean

* fix tests
2025-09-16 15:19:55 +08:00
Arvin Xu
b73d0972b2 ️ perf: fix search agent slow (#9261)
* try to fix search agent issue

* Update session.ts
2025-09-15 10:56:03 +08:00
Maple Gao
3eaeb6c531 📝 docs: consolidate image generation docs with server database setup (#9096)
♻️ refactor: consolidate image generation docs with server database setup

- Merge image-generation-setup content into work-with-server-side-database docs
- Remove duplicate image-generation-setup documentation files
- Add server-side database links to setup-development guides
- Add missing .env.development copy step to setup instructions
- Add .env.development to .gitignore for security

The setup script approach has been replaced by Docker Compose configuration
with .env.example.development file, eliminating documentation duplication
and providing a unified server-side development workflow.
2025-09-11 01:16:58 +08:00
Asuka109
d1c5645517 🔨 chore: add docker compose to setup local services for development (#8608)
* 👷 build: add docker compose to setup local services for development

* 👷 build: setup dotenv-expand for all the npm scripts

* 🐛 fix: remove useless comments

* 📚 docs: add server-side database setup guide with i18n support

- Add comprehensive server-side database setup documentation
- Include step-by-step Docker service configuration
- Add Chinese localization for better developer experience
- Cover environment setup, database migration, and verification steps
2025-09-02 17:06:01 +08:00
René Wang
17472aa7a5 👷 build: add group chat db schema (#8916)
* feat: merge database changes from group-chat feature

* fix

* fix

* fix

* fix tests

---------

Co-authored-by: arvinxx <arvinx@foxmail.com>
2025-08-27 23:49:22 +08:00
YuTengjing
9a6657e52e 📝 docs(workflow): optimize documentation structure and development setup (#8934) 2025-08-26 18:21:22 +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
Maple Gao
3ae5134984 📝 docs: Add image generation development environment setup (#8859)
* 🔨 chore: add image generation development environment setup

- Add setup-image-generation-dev.sh script for automated environment configuration
- Add English and Chinese documentation for image generation development setup
- Configure PostgreSQL and MinIO for local development with automatic bucket creation
- Include database migration and S3 environment variable configuration

* Update scripts/setup-image-generation-dev.sh
2025-08-21 23:44:21 +08:00
YuTengjing
a51b33f154 📝 docs: fix eslint irregular whitespace issues (#8777) 2025-08-12 23:30:40 +08:00
YuTengjing
82ca0074d4 🔨 chore: some ai image optimization (#8543) 2025-07-23 15:33:20 +08:00
YuTengjing
5d852be8a2 🐛 fix: some ai image bugs (#8490) 2025-07-18 23:00:56 +08:00
Arvin Xu
054ca5fd97 feat: refactor desktop oauth and use JWTs token to support remote chat (#8446)
* refactor the oauth

* refactor the oauth

* refactor the oauth

* improve oauth status

* fix desktop auth

* fix tests

* improve clean handoff

* try to fix handoff public issue

* fix route protection

* refactor anim

* refactor

* update to access token to jwt

* update to access token to jwt

* improve config

* refactor for JWKs token

* fix auto refresh issue

*  feat: support webapi proxy

* wip: 完成新流式接口

* wip: 跑通流式框架

* fix webhooks

* fix network proxy

* try to fix workflow

* fix proxy in remote sync

* fix tests

* fix tests

* fix oauth bypass route

* fix webapi proxy
2025-07-17 12:54:37 +08:00
YuTengjing
095de57675 feat: support AI Image (#8312)
Co-authored-by: canisminor1990 <i@canisminor.cc>
2025-07-14 20:29:57 +08:00
Arvin Xu
5bf0921246 feat: support OpenAI Responses API mode (#8048)
*  feat: support response api mode

* update

* support openai stream o series thinking

* add ui config for response api mode

* improve ui config for responses api mode

* update locale

* fix tests

* fix update issue

* update db schema

* fix openai Response Inputs

* fix tests
2025-06-08 16:53:46 +08:00
sxjeru
2a811d0a85 🔨 chore: Prettier & Add proxyUrl for all providers (#8061)
* migration: 添加移除 reasoning_effort 参数和删除 doubao 的迁移脚本

* Refactor code structure for improved readability and maintainability

* npx prettier --write "src/**/*"

* add proxyUrl for all providers

* npx prettier --write "docs/**/*"

* Revert

* Revert

* revert
2025-06-04 21:39:39 +08:00
Arvin Xu
39b790ec37 feat: support upload files direct into chat context (#7751)
* add document service

* add file item

* add file content for direct upload file

* fix tests

* fix tests

* fix tests

* add debug log for file-loaders

* add debug log and test

* improve loading

* update tests

* fix pdf parser

* fix pdf version

* fix pdf worker url

* fix pdf worker url

* fix test
2025-05-10 00:58:39 +08:00
YuTengjing
0bac348a29 🚚 docs: replace old development doc with new version (#7423) 2025-04-16 10:38:02 +08:00
YuTengjing
892a347c79 🚚 refactor: rename new feature development doc to mdx 2025-04-15 17:49:04 +08:00
YuTengjing
9097aba9e3 📝 docs: add new feature development doc 2025-04-15 17:39:52 +08:00
YuTengjing
961d6a1673 feat: regenerate migrate sql for new agent opening settings 2025-04-14 12:02:10 +08:00
YuTengjing
6002e823e2 Merge branch 'main' of github.com:lobehub/lobe-chat into tj/feat/guide-message 2025-04-14 11:34:06 +08:00
Arvin Xu
b12b24018e 🔨 chore: add OAuth 2.0 and OIDC core implement (#7380)
* add oidc implement

* add oidc implement

* update

* update

* migration db

* improve

* improve scripts

* update

* 解决 auth 302 跳转的问题

* 完成 policy 实现调试

* improve middleware log

* 初步完成 auth 授权实现

* 初步完成 auth 授权实现

* fix adapter

* add adapter tests

* refactor with http adapter

* refactor for oidc service

* finish oauth 授权基础实现

* 区分 backend 入口与 client 页面入口

* add i18n

* update db schema

* fix lint

* improve

* fix tests and update i18n

* improve db adaptor

* fix tests

* fix tests

* fix tests
2025-04-13 00:49:31 +08:00
YuTengjing
a614e3e53d feat: agent opening settings 2025-04-12 10:29:09 +08:00
YuTengjing
778912363e 📝 docs: some markdown format optimization 2025-04-09 20:26:39 +08:00
YuTengjing
6d22583d9c 📝 docs: remove table of contents from documentation files 2025-04-09 20:14:57 +08:00
YuTengjing
2e763f808c ♻️ chore: update database schema docs path from developer to development 2025-04-09 20:14:57 +08:00
YuTengjing
bab38e0bcc 📝 docs: move contributing docs to docs/development and deploy to lobehub (#7349)
* 🗑️ chore: remove unused helpers folder

* 📝 docs: Update Lobe Chat API to latest architecture

* 📝 docs: Update contributing guidelines to include style checking section and improve clarity

* 📝 docs: Update application description from "AI conversation" to "AI chat" for clarity in architecture documentation

* 📝 docs: Update State Management introduction to clarify merging process in useSessionStore hook

* 📝 docs: optimize content order

* ♻️ docs: move contributing folder to docs/development

* 📝 docs: unify TOC header format and fix relative links

* ♻️ docs: rename docs/development from md to mdx

* 📝 docs: remove useless .mdx extension in page link

* 📝 docs: fix relative links

*  chore: remove useless wiki-sync workflow
2025-04-09 19:17:12 +08:00