Document the pre-chat form
维护者通常 1 天内回复
@masyarakatai 已经在做这个了。
开始于 2026年10月16日。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 88/100
- Issue 类型
- 文档
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
调研方向
阅读 packages/widget/src/widget.ts 和 packages/widget/src/dom/prechat-form.ts 以了解配置和行为,然后检查 packages/widget/dev.html 作为示例。添加 website/src/content/docs/widget/pre-chat-form.mdx,并更新 website/src/content/docs/widget/configuration.mdx 以及 website/astro.config.mjs 中的侧边栏;当列出的选项、行为、事件和回调都已记录在文档中,且 pnpm --filter @chatcops/website build 成功时,即完成。
由索引模型根据 Issue 内容生成。
描述
The widget now has a configurable pre-chat form that collects details like name and email before the conversation starts. It shipped in @chatcops/widget 0.4.0, but the docs site only mentions it in the request schema on the Server Setup page. The WidgetConfig reference on the Configuration page also leaves out preChatForm, onLeadCaptured and onPreChatSubmit.
Where to look
packages/widget/src/widget.ts(PreChatField,PreChatFormConfig,WidgetConfig,handlePreChatSubmit,showChatView)packages/widget/src/dom/prechat-form.ts(field types and validation)packages/widget/dev.html(a working example config)website/src/content/docs/widget/configuration.mdxwebsite/astro.config.mjs(sidebar)
Acceptance criteria
- New page
website/src/content/docs/widget/pre-chat-form.mdx, added to the Widget section of the sidebar - Documents
enabled,title,subtitle,submitLabel, and each field option:name,type(text,email,selectortextarea),label,placeholder,required,options - Explains how the form behaves:
- it only shows when there is no saved conversation and it hasn't been submitted in this browser session
- required fields and email format are validated
- a field named
namepersonalizes the welcome message - a field named
messageis sent as the first chat message - answers go to the server as
userData(up to 50 fields, names up to 100 characters, each value up to 500 characters) with the next chat request, are re-sent if that request fails, and the server adds them to the system prompt for that request
- Documents
onPreChatSubmitand thepreChatSubmitevent - Notes that the form can only be configured from JavaScript (there are no
data-*attributes for it) -
WidgetConfiginconfiguration.mdxincludespreChatForm,onLeadCapturedandonPreChatSubmit -
pnpm --filter @chatcops/website buildsucceeds - Docs only, no changeset needed
Want to work on this? Comment below and I'll assign it to you. Please take one issue at a time, branch off dev, and open your PR against dev with Closes #<this issue number>. Setup notes (pnpm, build before test) are in CONTRIBUTING.md.
- 主要语言
- TypeScript
- 星标
- 13
- 派生
- 7
- 平均合并
- 4 小时 11 分钟
- 30 天内合并 PR
- 122
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
codercops/chatcops 的其他 Issue
-
enhancement hacktoberfest help wanted server
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
enhancement hacktoberfest help wanted server
难度 5/5 一周以上 新手友好度 25/100
维护者通常 1 天内回复
-
Create @chatcops/store-redis for Upstash and other Redis clients可能已有人在做 @bhushan4work 于 1 天前认领。 未关闭enhancement hacktoberfest help wanted server
codercops/chatcops#248 · 2 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
enhancement hacktoberfest help wanted server
难度 5/5 一周以上 新手友好度 35/100
维护者通常 1 天内回复
-
core enhancement hacktoberfest help wanted
难度 3/5 1-2 天 新手友好度 78/100
维护者通常 1 天内回复
查看 codercops/chatcops 的全部 Issue
相似的 Issue
-
frontend
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 86/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
ranxianglei/billion-context#4172 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
awslabs/threat-composer#362 ·
维护者通常 1 天内回复
-
Area/Cloud Needs Triage Type/Bug
难度 1/5 1-3 小时 新手友好度 86/100
wso2/product-integrator#2847 ·
维护者通常 1 天内回复