Commit Graph

106 Commits

Author SHA1 Message Date
arvinxx
ca16a40a44 Merge remote-tracking branch 'origin/main' into sync/main-to-canary-20260326-v2
# Conflicts:
#	src/routes/(main)/agent/channel/detail/Body.tsx
2026-03-26 15:01:04 +08:00
Arvin Xu
b005a9c73b 👷 build: add agent task system database schema (#13280)
* 🗃️ chore: add agent task system database schema

Add 6 new tables for the Agent Task System:
- tasks: core task with tree structure, heartbeat, scheduling
- task_dependencies: inter-task dependency graph (blocks/relates)
- task_documents: MVP workspace document pinning
- task_topics: topic tracking with handoff (jsonb) and review results
- task_comments: user/agent comments with author tracking (text id: cmt_)
- briefs: unresolved notification system (text id: brf_)

All sub-tables include userId FK for row-level user isolation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* 🗃️ chore: add self-referential FK on tasks.parentTaskId (ON DELETE SET NULL)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* 🐛 fix: use foreignKey() for self-referential parentTaskId to avoid TS circular inference

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* 🗃️ chore: add FK on task_topics.topic_id → topics.id (ON DELETE SET NULL)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* 🐛 fix: resolve pre-existing TS type-check errors

- Fix i18next defaultValue type (string | null → string)
- Fix i18next options type mismatches
- Fix fieldTags.webhook possibly undefined

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* 🗃️ chore: add FK on tasks.currentTopicId → topics.id (ON DELETE SET NULL)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* 🗃️ chore: add FK constraints for assignee, author, topic, and parent fields

- tasks.assigneeUserId → users.id (ON DELETE SET NULL)
- tasks.assigneeAgentId → agents.id (ON DELETE SET NULL)
- tasks.parentTaskId → tasks.id (ON DELETE SET NULL)
- tasks.currentTopicId → topics.id (ON DELETE SET NULL)
- task_comments.authorUserId → users.id (ON DELETE SET NULL)
- task_comments.authorAgentId → agents.id (ON DELETE SET NULL)
- task_topics.topicId → topics.id (ON DELETE SET NULL)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* 🗃️ chore: change task_topics.topicId FK to ON DELETE CASCADE

Topic deleted → task_topic mapping row removed (not just nulled).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* ♻️ refactor: use inline .references() for currentTopicId FK

No circular inference issue — only parentTaskId (self-ref) needs foreignKey().

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* 🗃️ chore: add FK on task_comments.briefId and topicId (ON DELETE SET NULL)

- task_comments.briefId → briefs.id (SET NULL)
- task_comments.topicId → topics.id (SET NULL)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* ♻️ refactor: merge briefs table into task.ts to fix circular dependency

brief.ts imported task.ts (briefs.taskId FK) and task.ts imported
brief.ts (taskComments.briefId FK), causing circular dependency error.
Merged briefs into task.ts since briefs are part of the task system.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* 🗃️ chore: add FK on tasks.createdByAgentId → agents.id (ON DELETE SET NULL)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 13:56:01 +08:00
CanisMinor
3c5249eae7 📝 docs: fix agent usage typo (#13198)
docs: fix agent usage
2026-03-23 14:14:58 +08:00
Rdmclin2
e18855aa25 🔨 chore: bot architecture upgrade (#13096)
* chore: bot architecture upgrade

* chore: unify schema definition

* chore: adjust channel schema

* feat: add setting render page

* chore: add i18n files

* chore: tag use field.key

* chore: add i18n files

* chore: add dev mode

* chore: refactor body to header and footer with body

* chore: add dev portal dev

* chore: add showWebhookUrl config

* chore: optimize form render

* feat: add slack channel

* chore: add new bot platform docs

* chore: unify applicationId to replace appId

* chore: add instrumentation file logger

* fix: gateway client error

* feat: support usageStats

* fix: bot settings pass and add  invalidate

* chore: update delete modal title and description

* chore: adjust save and connect button

* chore: support canEdit function

* fix: platform specific config

* fix: enable logic reconnect

* feat: add connection mode

* chore: start  gateway service in local dev env

* chore: default add a thread in channel when on mention at discord

* chore: add necessary permissions for slack

* feat: support charLimt and debounceMS

* chore: add schema maximum and minimum

* chore: adjust debounceMs and charLimit default value

* feat: support reset to default settings

* chore: hide reset when collapse

* fix: create discord bot lost app url

* fix: registry test case

* fix: lint error
2026-03-20 20:34:48 +08:00
YuTengjing
715481c471 🐛 fix(portal): preserve artifacts code scroll while streaming (#13114) 2026-03-19 00:35:20 +08:00
lobehubbot
b894622dfe Merge remote-tracking branch 'origin/main' into canary 2026-03-18 04:29:39 +00:00
Arvin Xu
ae77fee1b8 👷 build: add settings column to agent_bot_providers (#13081) 2026-03-18 12:28:58 +08:00
Arvin Xu
adbf11dc11 📝 docs: update documents (#12982)
update document
2026-03-14 22:06:09 +08:00
YuTengjing
3091489695 👷 build: add description column to topics table (#12939) 2026-03-12 19:39:47 +08:00
CanisMinor
43578a9bcc 📝 docs: Polishing and improving product documentation (#12612)
* 🔖 chore(release): release version v2.1.34 [skip ci]

* 📝 docs: Polish documents

* 📝 docs: Fix typo

* 📝 docs: Update start

* 📝 docs: Fix style

* 📝 docs: Update start

* 📝 docs: Update layout

* 📝 docs: Fix typo

* 📝 docs: Fix typo

---------

Co-authored-by: lobehubbot <i@lobehub.com>
2026-03-03 16:01:41 +08:00
Arvin Xu
49a8f6b497 🐛 fix: fix benchmarks table schema not correctly (#12532)
* fix benchmark table issue

* add new db migration

* fix types
2026-02-28 21:05:32 +08:00
Arvin Xu
e7598fe90b feat: support agent benchmark (#12355)
* improve total

fix page size issue

fix error message handler

fix eval home page

try to fix batch run agent step issue

fix run list

fix dataset loading

fix abort issue

improve jump and table column

fix error streaming

try to fix error output in vercel

refactor qstash workflow client

improve passK

add evals to proxy

refactor metrics

try to fix build

refactor tests

improve detail page

fix passK issue

improve eval-rubric

fix types

support passK

fix type

update

fix db insert issue

improve dataset ui

improve run config

finish step limit now

add step limited

100% coverage to models

add failed tests todo

support interruptOperation

fix lint

improve report detail

improve pass rate

improve sort order issue

fix timeout issue

Update db schema

完整 case 跑通

update database

improve error handling

refactor to improve database

优化 test case 的处理流程

优化部分细节体验和实现

基本完成 Benchmark 全流程功能

优化 run case 展示

优化 run case 序号问题

优化 eval test case 页面

新增 eval test 模式

新增 dataset 页面

update schema

support

finish create test run

fix

update

improve import exp

refactor data flow

improve import workflow

rubric Benchmark detail 页面

improve import ux

update schema

finish eval home page

add eval workflow endpoint

implement benchmark run model

refactor RAG eval

implement backend

update db schema

update db migration

init benchmark

* support rerun error test case

* fix tests

* fix tests
2026-02-21 20:36:40 +08:00
YuTengjing
e112cd6f7f 🗃️ db: add video generation schema changes
- async_tasks: add inference_id column with index
- generation_topics: add type column (default 'image')
2026-02-13 12:09:18 +08:00
Neko
b0def6d711 👷 build(database): migrate id using seq and identity to text with nanoid (#12223)
* 🔨 chore(database): added id_nanoid to replace id using seq and identity

* 🔨 chore(database): assgin database id column value to id_nanoid

* 🔨 chore(database): update dbml

* 🔨 chore(database): add not null & unique index

* 🔨 chore(database): drop foreign key dependency, switch to depend on id_nanoid

* 🔨 chore(database): switch to use id_nanoid as primary key

* 🔨 chore(database): drop old id column

* 🔨 chore(database): rename id_nanoid to id

* 🔨 chore(database): remove unique constraint

* 🔨 chore(database): updated dbml

* 🔨 chore(database): incorrect --> statement-breakpoint
2026-02-09 22:27:46 +08:00
YuTengjing
463d6c8762 📝 docs: improve development guides to reflect current architecture (#12174)
* 🔧 chore(vscode): add typescript.tsdk and disable mdx server

Fix MDX extension crash caused by Cursor's bundled TypeScript version

* 🔧 chore(claude): add skills symlink to .claude directory

* 📝 docs: update development guides with current tech stack and architecture

- Update tech stack: Next.js 16 + React 19, hybrid routing (App Router + React Router DOM), tRPC, Drizzle ORM + PostgreSQL, react-i18next
- Update directory structure to reflect monorepo layout (apps/, packages/, e2e/, locales/)
- Expand src/server/ with detailed subdirectory descriptions
- Add complete SPA routing architecture with desktop and mobile route tables
- Add tRPC router grouping details (lambda, async, tools, mobile)
- Add data flow diagram
- Simplify dev setup section to link to setup-development guide
- Fix i18n default language description (English, not Chinese)
- Sync all changes between zh-CN and English versions

* 📝 docs: expand data flow diagram in folder structure guide

Replace the single-line data flow with a detailed layer-by-layer
flow diagram showing each layer's location and responsibility.

* 📝 docs: modernize feature development guide

- Remove outdated clientDB/pglite/indexDB references
- Update schema path to packages/database/src/schemas/
- Update types path to packages/types/src/
- Replace inline migration steps with link to db-migrations guide
- Add complete layered architecture table (Client Service, WebAPI,
  tRPC Router, Server Service, Server Module, Repository, DB Model)
- Clarify Client Service as frontend code
- Add i18n handling section with workflow and key naming convention
- Remove verbose CSS style code, keep core business logic only
- Expand testing section with commands, skill refs, and CI tip

* 🔥 docs: remove outdated frontend feature development guide

Content is superseded by the comprehensive feature-development guide
which covers the full chain from schema to testing.

* 📝 docs: add LobeHub ecosystem and community resources

Add official ecosystem packages (LobeUI, LobeIcons, LobeCharts,
LobeEditor, LobeTTS, LobeLint, Lobe i18n, MCP Mark) and community
platforms (Agent Market, MCP Market, YouTube, X, Discord).

* 📝 docs: improve contributing guidelines and resources

- Clarify semantic release triggers (feat/fix vs style/chore)
- Add testing section with Vitest/E2E/CI requirements
- Update contribution steps to include CI check
- Add LobeHub ecosystem packages and community platforms to resources

* 📝 docs: rewrite architecture guide to reflect current platform design

* 📝 docs: add code quality tools to architecture guide

* 📝 docs: rewrite chat-api guide to reflect current architecture

- Update sequence diagram with Agent Runtime loop as core execution engine
- Replace PluginGateway with ToolExecution layer (Builtin/MCP/Plugin)
- Update all path references (model-runtime, agent-runtime, fetch-sse packages)
- Split old AgentRuntime section into Model Runtime + Agent Runtime
- Add tool calling taxonomy: Builtin, MCP, and Plugin (deprecated)
- Add client-side vs server-side execution section
- Remove outdated adapter pseudo-code examples

* 📝 docs: update file paths in add-new-image-model guide

- src/libs/standard-parameters/ → packages/model-bank/src/standard-parameters/
- src/config/aiModels/ → packages/model-bank/src/aiModels/
- src/libs/model-runtime/ → packages/model-runtime/src/providers/

* 📝 docs: restore S3_PUBLIC_DOMAIN in deployment guides

The S3_PUBLIC_DOMAIN env var was incorrectly removed from all
documentation in commit 4a87b31. This variable is still required
by the code (src/server/services/file/impls/s3.ts) to generate
public URLs for uploaded files. Without it, image URLs sent to
vision models are just S3 keys instead of full URLs.

Closes #12161

* 📦 chore: pin @lobehub/ui to 4.33.4 to fix SortableList type errors

@lobehub/ui 4.34.0 introduced breaking type changes in SortableList
where SortableListItem became strict, causing type incompatibility
in onChange and renderItem callbacks across 6 files. Pin to 4.33.4
via pnpm overrides to enforce consistent version across monorepo.

* 🐛 fix: correct ReadableStream type annotations and add dom.asynciterable

- Add dom.asynciterable to tsconfig lib for ReadableStream async iteration
- Fix createCallbacksTransformer return type: TransformStream<string, Uint8Array>
- Update stream function return types from ReadableStream<string> to
  ReadableStream<Uint8Array> (llama.ts, ollama.ts, claude.ts)
- Remove @ts-ignore from for-await loops in test files
- Add explicit string[] type for chunks arrays

* Revert "📝 docs: restore S3_PUBLIC_DOMAIN in deployment guides"

This reverts commit 24073f83d3.
2026-02-07 22:29:14 +08:00
YuTengjing
7ba15cceba ♻️ refactor(docker-compose): restructure dev environment (#12132)
* 🔥 chore(docker-compose): remove Casdoor SSO dependency

Casdoor is no longer needed since BetterAuth now supports email/password registration natively.

LOBE-3907

* ♻️ refactor(docker-compose): restructure directories

- Rename local/ to dev/ for development dependencies
- Remove logto/ and zitadel/ from production/
- Restore Casdoor config in production/grafana/
- Simplify dev/ to core services only (postgresql, redis, rustfs, searxng)
- Update docker-compose.development.yml to use dev/
- Remove minio-bucket.config.json (switched to rustfs)

* ♻️ refactor(docker-compose): simplify dev environment setup

- Remove docker-compose.development.yml, use dev/docker-compose.yml directly
- Add npm scripts: dev:docker, dev:docker:down, dev:docker:reset
- Simplify .env.example.development (remove variable refs, redundant vars)
- Update docker-compose/dev/.env.example (consistent passwords)
- Add docker-compose/dev/data/ to .gitignore
- Update setup docs: use npm scripts, remove image generation section

* 🔧 chore: add SSRF_ALLOW_PRIVATE_IP_ADDRESS to dev env example

* 🔒 security: auto-generate KEY_VAULTS_SECRET and AUTH_SECRET in setup.sh

- Remove hardcoded secrets from docker-compose.yml
- Add placeholders to .env.example files
- Generate secrets dynamically in setup.sh using openssl rand -base64 32

* 🔧 chore(docker-compose): expose SearXNG port and improve dev scripts

- Add SearXNG port mapping (8180:8080) for host access
- Use --wait flag in dev:docker to ensure services are healthy
- Include db:migrate in dev:docker:reset for one-command reset
- Update MinIO reference to RustFS in zh-CN docs
- Add SearXNG to service URLs and port conflict docs
2026-02-06 12:21:30 +08:00
Arvin Xu
3f1fd102c5 👷 build: fix db index (#12090)
* build index

* update
2026-02-04 13:16:56 +08:00
YuTengjing
e2fd28eece 🐛 fix: hide password features when AUTH_DISABLE_EMAIL_PASSWORD is set (#12023) 2026-02-02 14:17:10 +08:00
Arvin Xu
338df4baf9 📝 docs: Update src directory structure to be more comprehensive (#12016)
* update e2e test

* 📝 docs: Update src directory structure to be more comprehensive

- Add missing directories: business, const, envs, helpers, tools
- Add missing root files: auth.ts, instrumentation.ts, instrumentation.node.ts, proxy.ts
- Update descriptions to be more accurate
- Sync changes across English and Chinese documentation

Fixes #9521
2026-01-31 22:42:30 +08:00
Arvin Xu
4a87b31246 📝 docs: improve docs (#12013)
Update docs
2026-01-31 19:46:44 +08:00
Arvin Xu
7496511917 📝 docs: improve self-hosting documents (#11994)
* update document

* update documents

* update auth

* move

* update database

* move auth

* move auth

* update
2026-01-30 20:50:05 +08:00
YuTengjing
e6cb6cb592 🐛 fix: rename docker image and update docs for v2 (#11911) 2026-01-27 22:14:58 +08:00
René Wang
3dfc86fd0f feat: Update user guide & changelog (#11518)
* feat: Redesign doc

* chore: uopdate site

* chore: uopdate site

* chore: uopdate site

* chore: uopdate site

* chore: uopdate site

* feat: Uopdate content

* chore: New doc

* chore: Update content

* chore: Update content

* chore: add images

* chore: add images

* chore: add images

* chore: add images

* feat: Add more images

* feat: Add more images

* fix: Cannot reach end

* chore: Update content

* chore: Update content

* chore: Update content

* chore: Update content

* chore: Update content

* Revise README content and structure

Updated README to reflect changes in project description and removed outdated notes.

* Revise 'Getting Started' and TOC in README

Updated the 'Getting Started' section and modified the table of contents.

* chore: Update content

* Revise README structure and content

Updated the Getting Started section and removed the Table of Contents. Adjusted the Local Development instructions.

* Remove custom themes section from README

Removed section about custom themes from README.

* Update README.md

* Refine introduction and highlight cloud version

Updated wording for clarity and added recommendation for cloud version.

* chore: Update content

* chore: Update content

* chore: Update content

* chore: Update content

* chore: Update content

* chore: Update content

* chore: Update content

* fix: add missing translation

* 🔀 chore: Move README changes to feat/readme branch

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

* fix: add missing translation

* chore: update cdn

* docs: add migration guide from v1.x local database to v2.x and update help sections

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

* fix: add missing translation

* fix: add missing images

* fix: add missing changelogs

* fix: add missing changelogs

* fix: add missing changelogs

* fix: add missing changelogs

* fix: add missing changelogs

* style: update cdn

---------

Signed-off-by: Innei <tukon479@gmail.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: canisminor1990 <i@canisminor.cc>
Co-authored-by: Innei <tukon479@gmail.com>
2026-01-26 15:28:33 +08:00
Neko
14adf995f7 feat(database): added user memory persona schema (#11833) 2026-01-26 01:50:56 +08:00
YuTengjing
5ed1cca355 🔨 chore: add account deletion feature with 72h cooling-off period (#11818) 2026-01-25 20:21:52 +08:00
Arvin Xu
09a00df38e feat: support history context auto compress (#11790)
* add compress implement

* push

* update

* update

* update

* fix auto scroll

* db schema update

* fix compress

* fix types

* fix lint

* update get compressedMessages

* update content

* update

* fix tests

* fix tests

* fix tests
2026-01-25 13:59:44 +08:00
Shinji-Li
a7dad9f3af 🔨 chore: add the market identifier in chat group (#11779)
* chore: add the market identifier in chatgroup

* fix: add IF NOT EXISTS in sql

* fix: add the ts onSucess
2026-01-24 21:07:56 +08:00
YuTengjing
1eff8646f7 feat: remove NextAuth (#11732) 2026-01-23 23:57:08 +08:00
Neko
31d2f26b6e feat(database): extended async task with metadata and parent id, added index (#11712) 2026-01-23 21:49:56 +08:00
Neko
0160fbde83 feat(database): added user memory activity (#11680) 2026-01-22 10:24:50 +08:00
YuTengjing
3110e2c356 📝 docs: update Better Auth documentation (#11679) 2026-01-21 18:44:44 +08:00
YuTengjing
2c1af8a728 feat(router-runtime): add fallback options (#11531) 2026-01-19 11:28:54 +08:00
YuTengjing
ddca1652bb feat(share): add topic sharing functionality (#11448) 2026-01-13 22:10:48 +08:00
Arvin Xu
a8c6b2cb92 ♻️ refactor(agentGroup): simplify LobeChatGroupChatConfig schema (#11431)
* ♻️ refactor(agentGroup): simplify LobeChatGroupChatConfig schema

- Remove unused config properties: enableSupervisor, orchestratorModel, orchestratorProvider, scene, maxResponseInRow, responseOrder, responseSpeed
- Keep only essential properties: allowDM, revealDM, openingMessage, openingQuestions, systemPrompt
- Delete GroupChatSettings feature component (no longer needed)
- Delete AgentTeamSettings mobile component
- Update InsertChatGroupSchema to use manual Zod schema instead of createInsertSchema
- Remove hostConfig and enableSupervisor parameters from GroupWizard and MemberSelectionModal interfaces
- Simplify callback signatures across the codebase
- Update all related tests to use new config structure

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

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

* update default provider

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-01-12 15:46:11 +08:00
Shinji-Li
eefb6cb185 feat: generate agent_cron_jobs in agents (#11349)
* feat: generate agent_cron_job in agents

* feat: update the db fields

* feat: add trigger/mode in topics table & add group id in cronjob

* feat: update sql

* fix: fixed db migration

* feat: update the test
2026-01-09 14:22:35 +08:00
Innei
8be32c2f32 feat: Add browser compatibility detection and fallback page (#11309)
*  feat: Add browser compatibility detection and fallback page

- Add automatic browser compatibility check in app layout
- Create standalone not-compatible.html fallback page with modern responsive design
- Support dark mode via prefers-color-scheme
- Include browser download links (Chrome, Firefox, Edge, Safari, Arc)
- Display minimum browser requirements
- Update feature development documentation

* 📝 docs(CLAUDE): Update PR Linear Issue Association guidelines

- Clarify the requirement to include magic keywords in PR body for Linear issues.
- Add instruction to summarize work done in the Linear issue comment and update the issue status to "In Review".

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

*  feat: Update browser compatibility page and layout

- Change favicon link to absolute path in not-compatible.html.
- Add Safari browser support with corresponding icon and link.
- Update minimum browser requirements to Chrome 99+, Safari 16.4+, and Edge 99+.
- Fix typo in layout.tsx comments from "serveral" to "several".

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

---------

Signed-off-by: Innei <tukon479@gmail.com>
2026-01-07 23:00:52 +08:00
Arvin Xu
e05375f796 feat: support notebook tool (#10902)
* add notebook builtin tool

* document init workflow

* gtd support plan mode

* add notebook tools
2025-12-24 12:55:09 +08:00
Innei
86dd27b0e1 chore: update references from react-layout-kit to @lobehub/ui for Flexbox and Center components in documentation and rules
Signed-off-by: Innei <tukon479@gmail.com>
2025-12-24 12:54:44 +08:00
Arvin Xu
9be0893dba 👷 build: improve document db schema (#10892)
* add document db schema update

* update migration sql

* update migration sql
2025-12-23 18:54:48 +08:00
Rdmclin2
8c42a934b3 feat: mobile native better auth support (#10871)
* feat: mobile native better auth support

* chore: add android assetlinks

* chore: add android assetlinks

* chore: add expo fingerpoint

* chore: add relation

* chore: add android origin hash

* chore: update passkey table

* chore: optimize version

* chore: remove as any

* fix: sql not exits problem

* fix: passkey statement

* fix:  passkey origin null

* chore: remove strict peer dependencies

* fix: test case

* chore: remove local passkey origin
2025-12-23 15:19:42 +08:00
Arvin Xu
5c489bc971 ♻️ refactor: refactor database schema (#10860)
* update data schema

* update data schema
2025-12-20 20:20:07 +08:00
Arvin Xu
5cc9141b52 🔨 chore: update config (#10857)
chore update config
2025-12-19 23:13:22 +08:00
Arvin Xu
81e56d462a ️ perf: add more sql to improve performance (#10777)
* Update sql

* fix user tests
2025-12-15 01:06:34 +08:00
René Wang
ec3aa6ba3b ️ perf(database): optimize document queries with indexes and field exclusion (#10740)
* ️ perf(database): optimize document queries with indexes and field exclusion

- Add database indexes for source_type and compound query optimization
- Exclude large JSONB fields (content, pages, editorData) in list queries
- Improve queryDocuments performance for better list view rendering

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

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

* feat: Add migration

* ️ perf(database): missing user_id and user_memory_id index

* refac: Use select

* fix: migration

* fix: Test error

* Update sql

* feat(userMemories): added captured_at column

* fix: not null default now

* fix: not null default now

* Update sql

* Update sql

---------

Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-authored-by: Neko Ayaka <neko@ayaka.moe>
Co-authored-by: arvinxx <arvinx@foxmail.com>
2025-12-12 20:09:08 +08:00
YuTengjing
458cbf4d5c 🔨 chore: track user last active time (#10733) 2025-12-11 17:14:25 +08:00
YuTengjing
f72a5e6cc1 feat: betterauth username signin (#10607) 2025-12-05 01:35:20 +08:00
Shinji-Li
c09f2474db 🔨 chore: add source type into user_install_plugins (#10603)
* chore: add source type into user_install_plugins

* fix: change the source type into varchar
2025-12-04 18:14:21 +08:00
Neko
d15c845213 feat(database): topic metadata for user memory extractor (#10569) 2025-12-03 19:14:29 +08:00
Arvin Xu
0d609d199a ♻️ refactor: refactor agent slug schema (#10561)
* fix agent schema

* fix snapshot
2025-12-02 23:23:42 +08:00
YuTengjing
2ab88c5dcf 🐛 fix: drop user.phoneNumber and reuse user.phone (#10531) 2025-12-01 19:00:29 +08:00