Feature proposal: TDesign React Chat UI, homepage chat entry, and admin-configurable AI assistant content
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 35/100
调研方向
先从 AI 设置页面和 /answer/api/v1/chat/completions SSE 端点开始,然后检查现有的 assistant UI 以及 TDesign React Chat 的集成要求。当首页入口、访客行为、可配置的欢迎文本、suggestions 和 prompts、streaming/thinking 显示、投票行为以及 semantic_search fallback 都能正常工作,且不改变后端契约时,即视为完成。
由索引模型根据 Issue 内容生成。
描述
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_searchtool 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
-
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 mapsdelta.contentto a markdown block anddelta.reasoning_contentto a thinking block, and keeps per-message voting/replay working. -
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.
-
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,
%sas the question placeholder). The backend already storesprompt_config; only the admin UI is missing. Saving the form will also stop silently resetting stored prompts to the built-in defaults.
-
Small related fix: strip the
semantic_searchline 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.
- 主要语言
- Go
- 星标
- 15.7k
- 派生
- 1.4k
- 平均合并
- 1 天 20 小时
- 30 天内合并 PR
- 6
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
apache/answer 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 65/100
-
Hardening: cap the invite_user list size in UpdateQuestionInviteUser to bound notification fan-out 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 84/100
-
难度 2/5 1-3 小时 新手友好度 88/100
-
Gravatar hash is computed from the un-lowercased email, so mixed-case accounts render an identicon 未关闭
难度 2/5 1-3 小时 新手友好度 85/100
相似的 Issue
-
bug github_actions
难度 2/5 1-3 小时 新手友好度 75/100
registrystack/registry-stack#1393 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
JakeChampion/lang#10213 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
oasisprotocol/oasis-sdk#2523 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 70/100