Skip to content

Conversation

@johnlanni
Copy link
Collaborator

Ⅰ. Describe what this PR did

Lack of uniformity here would be very confusing.

Ⅱ. Does this pull request fix one issue?

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@johnlanni johnlanni requested review from CH3CHO and rinfx as code owners June 12, 2025 06:43
@lingma-agents
Copy link

lingma-agents bot commented Jun 12, 2025

标准化SSE消息中的换行符并调整代码格式

变更概述

重构 - 统一SSE消息格式的换行符规范:

  • 修改plugins/golang-filter/mcp-session/common/sse.go中的初始事件构造逻辑:
    • \r\n\r\n替换为\n\n以符合SSE协议标准(事件分隔符要求LF换行)
    • 该调整确保跨平台环境下事件分隔符的统一性,避免因操作系统换行差异导致的解析问题

代码格式优化 - 修正代码缩进与语法格式:

  • HandleMessage方法的条件判断中:
    • 调整if语句括号位置从if cond{变为if cond {(增加空格对齐)
    • 保持原有逻辑不变,仅提升代码可读性与格式统一性
变更统计
  • 📁 修改文件: 1 个文件

  • ✅ 新增代码: +2 行

  • ❌ 删除代码: -2 行

变更文件
文件路径 变更说明
plugins/​golang-filter/​mcp-session/​common/​sse.​go 将SSE消息换行符从CRLF改为LF,并修正条件语句格式

💡 小贴士

与 lingma-agents 交流的方式

📜 直接回复评论
直接回复本条评论,lingma-agents 将自动处理您的请求。例如:

  • 在当前代码中添加详细的注释说明。

  • 请详细介绍一下你说的 LRU 改造方案,并使用伪代码加以说明。

📜 在代码行处标记
在文件的特定位置创建评论并 @lingma-agents。例如:

  • @lingma-agents 分析这个方法的性能瓶颈并提供优化建议。

  • @lingma-agents 对这个方法生成优化代码。

📜 在讨论中提问
在任何讨论中 @lingma-agents 来获取帮助。例如:

  • @lingma-agents 请总结上述讨论并提出解决方案。

  • @lingma-agents 请根据讨论内容生成优化代码。

@johnlanni johnlanni changed the title opt: end-of-line in the unified MCP session filter opt: unify the end-of-line markers in the MCP session filter. Jun 12, 2025
@codecov-commenter
Copy link

codecov-commenter commented Jun 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 46.05%. Comparing base (ef31e09) to head (5f9fa34).
Report is 560 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #2403       +/-   ##
===========================================
+ Coverage   35.91%   46.05%   +10.14%     
===========================================
  Files          69       81       +12     
  Lines       11576    13018     +1442     
===========================================
+ Hits         4157     5995     +1838     
+ Misses       7104     6678      -426     
- Partials      315      345       +30     

see 78 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Collaborator

@CH3CHO CH3CHO left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@CH3CHO CH3CHO merged commit 087cb48 into alibaba:main Jun 12, 2025
12 checks passed
@lingma-agents lingma-agents bot mentioned this pull request Jul 18, 2025
ink-hz pushed a commit to ink-hz/higress-ai-capability-auth that referenced this pull request Nov 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants