fix(chat): 修复流式响应中搜索结果引用和文本处理问题#2
Closed
bilieebiliee1-design wants to merge 3 commits intoxiaoY233:masterfrom
Closed
fix(chat): 修复流式响应中搜索结果引用和文本处理问题#2bilieebiliee1-design wants to merge 3 commits intoxiaoY233:masterfrom
bilieebiliee1-design wants to merge 3 commits intoxiaoY233:masterfrom
Conversation
- 将 SIGN_SECRET 改为优先从环境变量读取,提高密钥配置灵活性 - 添加 User-Agent 池并在每次请求时随机选择,降低被风控风险
重构流式响应处理逻辑,使用缓存机制提升性能并支持分块处理 添加 reasoning_content 字段到消息接口用于返回推理过程 改进搜索结果显示格式并优化代码块处理
- 将搜索结果摘要从 `partText` 移至 `partReasoning`,避免污染用户可见文本 - 优化缓存更新逻辑,直接替换 `cachedParts` 以避免 `logic_id` 变更导致的重复内容 - 扩展正则表达式以匹配更多搜索引用模式(如 `turnXsearchY`) - 使用 `TextDecoder` 处理流数据缓冲区,防止多字节字符被截断
xiaoY233
added a commit
that referenced
this pull request
Feb 5, 2026
- 支持从环境变量配置 SIGN_SECRET,添加格式验证 - 添加 User-Agent 池并随机化,降低风控风险 - 添加 reasoning_content 字段支持推理过程 - 优化流式响应处理,使用 TextDecoder 防止多字节字符截断 - 改进搜索结果缓存机制,避免重复内容 - 添加 package-lock.json 到 .gitignore - 删除调试文件和文档文件 安全审计:✅ 未发现恶意代码或后门
Owner
|
已合并并修复安全问题 ✅ 已完成的工作:
�� 修改统计:
�� 安全审计结果:
PR 已安全合并到 master 分支。 |
xiaoY233
added a commit
that referenced
this pull request
Feb 5, 2026
- 更新模型列表,添加 GLM-4.7、GLM-4.6v、GLM-4.6 - 移除 GLM-4.5 系列模型(已弃用) - 合并 PR #2 并修复安全问题 - 支持从环境变量配置 SIGN_SECRET,添加格式验证 - 添加 User-Agent 池并随机化,降低风控风险 - 添加 reasoning_content 字段支持推理过程 - 优化流式响应处理,使用 TextDecoder 防止多字节字符截断 - 改进搜索结果缓存机制,避免重复内容
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
partText移至partReasoning,避免污染用户可见文本cachedParts以避免logic_id变更导致的重复内容turnXsearchY)TextDecoder处理流数据缓冲区,防止多字节字符被截断