999 Commits

Author SHA1 Message Date
Duansg 2c0ced322d fix: use TagStatusDeleted instead of QuestionStatusDeleted in tag permission
Lint / Lint (ubuntu-latest) (push) Has been cancelled
2026-08-17 12:23:24 +08:00
LinkinStars 9d9f5d06a8 fix: enhance user admin service to manage API keys and filter answer visibility 2026-07-10 10:19:39 +08:00
LinkinStars c589b59dd5 fix: enhance answer visibility checks for user permissions 2026-07-10 10:19:39 +08:00
LinkinStars 0705ea6bae fix(tests): add mock methods for cache OAuth state in new question notification tests 2026-07-10 10:19:39 +08:00
LinkinStars 88c288fdda fix(tests): update goroutine handling in new question email worker tests 2026-07-10 10:19:39 +08:00
LinkinStars f5e25dcb8d fix(notification): remove buffer size parameter from new question email worker for test 2026-07-10 10:19:39 +08:00
Artur Iusupov e06311a514 fix(notification): make new question email queue configurable 2026-07-10 10:19:39 +08:00
Artur Iusupov cb97394211 fix(notification): move new question email throttling to worker 2026-07-10 10:19:39 +08:00
Artur Iusupov dda51232b9 feat(notification): add interval for new question emails 2026-07-10 10:19:39 +08:00
LinkinStars a00cb2d38c fix: update goroutine handling and context imports for consistency 2026-07-10 10:19:39 +08:00
LinkinStars b575fe893b Harden avatar cleanup ownership checks 2026-07-10 10:19:39 +08:00
LinkinStars 54b1b35df5 Align revision audit permission checks 2026-07-10 10:19:39 +08:00
LinkinStars 06a0f742f2 fix external login account binding 2026-07-10 10:19:39 +08:00
Artur Iusupov 3a5a15fe77 fix(site): require explicit email verification setting
Replace OptionalBool with an explicit require_email_verification value for the login settings save request while keeping legacy read defaults intact.

Use positive RequireEmailVerification naming through the registration flow and inline the site setting mapping.

Add validation, save-path, and registration coverage for the explicit email verification setting.
2026-07-10 10:19:39 +08:00
Artur Iusupov 7123326515 feat(site): allow disabling email verification 2026-07-10 10:19:39 +08:00
hgaol 4aa52a6b52 fix: accept answer fails when short links enabled (#1541)
The ownership check added to AcceptAnswer compared the answer's QuestionID
against the request's QuestionID directly. When short links are enabled,
answerRepo.GetByID re-encodes QuestionID to its short form while the
controller de-shorts req.QuestionID to its long form, so the two encodings
of the same question never matched and every accept returned "Answer do not
found". Normalize both ids via uid.DeShortID before comparing, preserving the
privilege-escalation guard for answers that truly belong to another question.
2026-07-10 10:19:39 +08:00
Luke Gao 09eaa5b7e3 feat: add reasoning content to AI conversation records and update related components (#1530)
Fix #1524 

Root cause

DeepSeek's reasoning models stream reasoning_content alongside content.
Answer ignored it, so follow-up requests failed with 400: The
reasoning_content in the thinking mode must be passed back to the API,
and the thinking text was never shown or saved.

Fix

- Capture reasoning_content from the stream and pass it back to theAPI
on subsequent rounds.
 - Persist it with the conversation (new DB column via migrationv2.0.2).
- Render it in the chat UI as a collapsible "Thinking…/Thoughts"panel
above the answer.

Compatibility

Nullable column, omitempty field, UI hides the panel when empty — old
conversations and non-reasoning models behave exactly as before.

Demo



https://github.com/user-attachments/assets/49b1a2a1-9133-4ac2-bbeb-860215a50285
2026-07-10 10:19:39 +08:00
LinkinStars b1da65fbe4 Merge remote-tracking branch 'origin/fix/2.0.1/chat' into test 2026-05-11 12:16:58 +08:00
LinkinStars 11091244f6 fix(user): enhance avatar validation by adding checks for custom avatars and file ownership 2026-05-11 12:05:18 +08:00
LinkinStars d1a4092c61 fix(email): enhance email templates by escaping HTML characters in dynamic content 2026-05-09 16:07:09 +08:00
LinkinStars 11c80384f1 fix(chat): enhance visibility checks by adding admin moderator support in answer and comment services 2026-05-09 15:13:50 +08:00
LinkinStars 97924574c4 Merge remote-tracking branch 'origin/dev' into test 2026-05-08 19:58:22 +08:00
hgaol e3831b6f52 refactor: streamline plugin initialization by removing redundant search syncer registration 2026-05-08 19:57:19 +08:00
hgaol c93f3bc5c3 refactor: simplify SaveSiteAI method by removing unnecessary error handling 2026-05-08 19:57:19 +08:00
hgaol 278fdfd8c3 refactor: rename UpdateSearch to updateSearch for consistency 2026-05-08 19:57:19 +08:00
hgaol 2836d0ea81 chore: add Apache License header to multiple files 2026-05-08 19:57:19 +08:00
hgaol ac7bdda074 fix lint 2026-05-08 19:57:19 +08:00
hgaol 5d923f8ca3 feat: add vector sync service and integrate with answer and question services 2026-05-08 19:57:19 +08:00
hgaol 22c2a5c276 feat: implement vector search plugin and syncer for question/answer embeddings
- Added a new vector search syncer to aggregate questions and answers with comments for vector embedding.
- Introduced a new VectorSearch interface and related structures for managing vector storage and similarity search.
- Refactored embedding service to delegate semantic search to the new vector search plugin.
- Removed embedding-related fields from SiteAIProvider and UI forms as part of the transition to the new vector search architecture.
- Updated plugin registration to include vector search capabilities.
- Cleaned up embedding service methods and removed unused dependencies.
2026-05-08 19:57:19 +08:00
hgaol dea18f997c feat: support semantic search in AI chat and embedding ability 2026-05-08 19:57:19 +08:00
LinkinStars 869b040e92 fix(auth): enhance admin user cache management and add status checks for email verification and suspension 2026-02-06 20:31:54 +08:00
LinkinStars 92994b4997 fix: add IsAdminModerator field to request structs and implement visibility checks for timeline objects 2026-02-06 15:32:45 +08:00
LinkinStars 90022ce039 fix: integrate API key authentication into existing services and routes 2026-01-29 16:50:25 +08:00
LinkinStars b522a168e3 feat: add GetConfigByKeyFromDB method to retrieve config directly 2026-01-29 11:15:38 +08:00
LinkinStars 8b61cad014 fix(lint): resolve the lint issue 2026-01-27 17:49:29 +08:00
LinkinStars 9ea13af860 feat(revision): enhance revision management with object status handling 2026-01-27 17:38:47 +08:00
LinkinStars f403eadb2c feat: add AI conversation management endpoints and update related schemas 2026-01-23 17:28:19 +08:00
LinkinStars ce5aadf30d feat: add AI configuration support with related controllers and services 2026-01-23 17:25:42 +08:00
kumfo 6369056914 feat(siteinfo): fix GetSiteTag method to correctly assign response from siteInfoCommonService 2026-01-22 12:25:37 +08:00
kumfo 128c44f5a3 feat(menu): update schema to remove deprecated min_tags and add MinimumTags to SiteQuestionsReq 2026-01-22 12:25:37 +08:00
kumfo 3264fdd1d9 feat(siteinfo): refactor site legal and security settings to use new policies and security endpoints 2026-01-22 12:25:37 +08:00
kumfo c2a0bee7dc feat(siteinfo): add users settings endpoint and update interface settings structure 2026-01-22 12:25:37 +08:00
kumfo f05f1eb80d feat(menu): update admin menu settings to include questions, tags, and advanced options 2026-01-22 12:25:32 +08:00
LinkinStars 6b834c745a Merge remote-tracking branch 'origin/dev' into test 2026-01-14 11:31:17 +08:00
ferhat elmas 5ff6106d37 fix: address comments and add a test
Signed-off-by: ferhat elmas <elmas.ferhat@gmail.com>
2026-01-14 11:22:53 +08:00
ferhat elmas 26d868b123 refactor(queue): improve queues
* fix race condition for registering handler
* add close method
* use generics to reduce duplication
* rename packages to drop underscore for go convention
* rename interface to drop stutter with package name

Signed-off-by: ferhat elmas <elmas.ferhat@gmail.com>
2026-01-14 11:22:53 +08:00
LinkinStars d5c07f18ad Merge remote-tracking branch 'origin/dev' into test 2025-12-29 14:45:52 +08:00
Douglas Cortez c8908b7b34 fix(review): notifications from the specific external system will take precedence 2025-12-29 10:27:00 +08:00
Douglas Cortez 42f8947e7c fix(notification): use SSO provider for external_id lookup in notifications 2025-12-29 10:27:00 +08:00
liqiang46 61d9bf34d3 修复最佳评论越权问题
在AcceptAnswer方法中添加了安全检查,确保要设置为最佳答案的回答确实属于该问题。
这可以防止攻击者将其他问题的回答设置为当前问题的最佳答案。

安全问题:越权设置最佳评论
修复方法:验证acceptedAnswerInfo.QuestionID == req.QuestionID
2025-12-29 10:24:01 +08:00