Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

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

未关闭
#1,598 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
go, react, typescript
领域
ai, api, backend, frontend

调研方向

先从 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_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.

主要语言
Go
星标
15.7k
派生
1.4k
平均合并
1 天 20 小时
30 天内合并 PR
6

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

apache/answer 的其他 Issue

查看 apache/answer 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。