Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Feature proposal: TDesign React Chat UI, homepage chat entry, and admin-configurable AI assistant content

Đang mở
#1,598 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go, react, typescript
Lĩnh vực
ai, api, backend, frontend

Hướng nghiên cứu

Bắt đầu với trang cài đặt AI và endpoint SSE /answer/api/v1/chat/completions, sau đó xem xét assistant UI hiện có cùng các yêu cầu tích hợp của TDesign React Chat. Công việc được xem là hoàn tất khi mục truy cập từ homepage, hành vi đối với khách, văn bản chào mừng có thể cấu hình, suggestions và prompts, hiển thị streaming/thinking, hành vi bình chọn và fallback của semantic_search đều hoạt động mà không thay đổi hợp đồng backend.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Is your feature request related to a problem? Please describe

We self-host Answer as a community FAQ assistant. The current AI assistant works, but:

  • The chat UI is minimal: no thinking-process display, no starter-question entry points, plain text bubbles.
  • The assistant's opening content (welcome text, starter questions) is hardcoded in the frontend and cannot be adjusted by admins.
  • The default system prompt advertises a semantic_search tool even when no vector search plugin is installed, so the model may call a tool that does not exist.
  • Visitors cannot use the assistant without an account, even when the admin would like to allow it on a public community site.

Describe the solution you'd like

  1. New chat UI built on TDesign React Chat (@tdesign-react/chat, MIT-licensed): streaming markdown answers, a collapsible thinking block for reasoning models, tappable suggestion chips, and a sender with a stop button. Answer's backend contract (/answer/api/v1/chat/completions, SSE) stays unchanged — a thin adapter maps delta.content to a markdown block and delta.reasoning_content to a thinking block, and keeps per-message voting/replay working.

  2. Admin switches on the AI settings page

    • Show AI assistant on homepage: a floating chat entry that reuses the same component.
    • Allow guests to use the homepage AI assistant: chat completions moves behind a guest gate; guest conversations stay client-side only and voting is disabled for them.
  3. Admin-configurable assistant content (AI settings page)

    • Welcome text shown when a conversation starts.
    • A suggested-questions list (one per line) rendered as chips; empty falls back to built-in i18n defaults.
    • The system prompt (zh/en, %s as the question placeholder). The backend already stores prompt_config; only the admin UI is missing. Saving the form will also stop silently resetting stored prompts to the built-in defaults.
  4. Small related fix: strip the semantic_search line from the default prompt when no vector search plugin is enabled.

Describe the alternatives you've considered

Incrementally extending the existing custom UI. That is possible, but a maintained chat component library provides streaming, thinking and suggestion primitives out of the box and reduces the custom code Answer has to maintain. Vision/image input is intentionally out of scope for this feature.

I have a working implementation on my fork and will submit a PR referencing this issue.

Ngôn ngữ chính
Go
Star
15.7k
Fork
1.4k
Merge trung bình
1 ngày 20 giờ
Pull request đã merge (30 ngày)
6

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của apache/answer

Tất cả issue của apache/answer

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.