feat(weather): 添加明天天气规则支持#1746
Merged
HelloWRC merged 4 commits intoApr 12, 2026
Merged
Conversation
laoshuikaixue
commented
Apr 6, 2026
Contributor
- 在服务注册中添加明天天气规则处理器
- 创建 TomorrowWeatherRuleSettings 模型类
- 实现 TomorrowWeatherRuleSettingsControl 界面控件
- 添加明天天气规则处理逻辑
- 实现天气代码匹配和扩展功能
- 支持天气代码范围匹配算法
- 在服务注册中添加明天天气规则处理器 - 创建 TomorrowWeatherRuleSettings 模型类 - 实现 TomorrowWeatherRuleSettingsControl 界面控件 - 添加明天天气规则处理逻辑 - 实现天气代码匹配和扩展功能 - 支持天气代码范围匹配算法
Contributor
Author
|
@gemini-code-assist review |
HelloWRC
reviewed
Apr 11, 2026
HelloWRC
left a comment
Member
There was a problem hiding this comment.
考虑到明日天气规则与当前天气规则的设置模型和界面相同,应该考虑直接复用当前天气规则的设置模型和界面。
- 将 TomorrowWeatherRuleSettings 替换为 CurrentWeatherRuleSettings - 删除 TomorrowWeatherRuleSettingsControl 控件类 - 更新 WeatherService 中的明天天气规则处理器逻辑 - 移除未使用的明天天气规则设置模型文件
HelloWRC
reviewed
Apr 12, 2026
| private static HashSet<string> ExpandWeatherCode(string weatherCode) | ||
| { | ||
| return weatherCode switch | ||
| { |
Member
There was a problem hiding this comment.
这里引入对天气的模糊匹配可能会改变先前规则集的行为,除非确实有必要,否则不应该改变匹配行为。
Contributor
Author
There was a problem hiding this comment.
这里引入对天气的模糊匹配可能会改变先前规则集的行为,除非确实有必要,否则不应该改变匹配行为。
那加入一个显式可选?
Contributor
Author
There was a problem hiding this comment.
这里引入对天气的模糊匹配可能会改变先前规则集的行为,除非确实有必要,否则不应该改变匹配行为。
因为我希望能用“雨”这类词覆盖所有下雨情况来做带伞提醒
- 在 CurrentWeatherRuleSettings 中添加 IsFuzzyMatch 属性 - 在界面控件中添加复选框以启用模糊匹配选项 - 修改当前天气规则处理器以支持精确匹配和模糊匹配两种模式 - 更新明日天气规则处理器以实现相同的匹配逻辑 - 当启用模糊匹配时使用 IsWeatherCodeMatched 方法进行匹配 - 当禁用模糊匹配时使用直接字符串比较进行精确匹配
HelloWRC
approved these changes
Apr 12, 2026
Member
Koharu-Mizuki
pushed a commit
to Koharu-Mizuki/ClassIsland-RB
that referenced
this pull request
May 24, 2026
* feat(weather): 添加明天天气规则支持 - 在服务注册中添加明天天气规则处理器 - 创建 TomorrowWeatherRuleSettings 模型类 - 实现 TomorrowWeatherRuleSettingsControl 界面控件 - 添加明天天气规则处理逻辑 - 实现天气代码匹配和扩展功能 - 支持天气代码范围匹配算法 * refactor(weather): 将明天天气规则替换为当前天气规则 - 将 TomorrowWeatherRuleSettings 替换为 CurrentWeatherRuleSettings - 删除 TomorrowWeatherRuleSettingsControl 控件类 - 更新 WeatherService 中的明天天气规则处理器逻辑 - 移除未使用的明天天气规则设置模型文件 * feat(weather): 添加天气规则模糊匹配功能 - 在 CurrentWeatherRuleSettings 中添加 IsFuzzyMatch 属性 - 在界面控件中添加复选框以启用模糊匹配选项 - 修改当前天气规则处理器以支持精确匹配和模糊匹配两种模式 - 更新明日天气规则处理器以实现相同的匹配逻辑 - 当启用模糊匹配时使用 IsWeatherCodeMatched 方法进行匹配 - 当禁用模糊匹配时使用直接字符串比较进行精确匹配
Koharu-Mizuki
pushed a commit
to Koharu-Mizuki/ClassIsland-RB
that referenced
this pull request
Jun 19, 2026
* feat(weather): 添加明天天气规则支持 - 在服务注册中添加明天天气规则处理器 - 创建 TomorrowWeatherRuleSettings 模型类 - 实现 TomorrowWeatherRuleSettingsControl 界面控件 - 添加明天天气规则处理逻辑 - 实现天气代码匹配和扩展功能 - 支持天气代码范围匹配算法 * refactor(weather): 将明天天气规则替换为当前天气规则 - 将 TomorrowWeatherRuleSettings 替换为 CurrentWeatherRuleSettings - 删除 TomorrowWeatherRuleSettingsControl 控件类 - 更新 WeatherService 中的明天天气规则处理器逻辑 - 移除未使用的明天天气规则设置模型文件 * feat(weather): 添加天气规则模糊匹配功能 - 在 CurrentWeatherRuleSettings 中添加 IsFuzzyMatch 属性 - 在界面控件中添加复选框以启用模糊匹配选项 - 修改当前天气规则处理器以支持精确匹配和模糊匹配两种模式 - 更新明日天气规则处理器以实现相同的匹配逻辑 - 当启用模糊匹配时使用 IsWeatherCodeMatched 方法进行匹配 - 当禁用模糊匹配时使用直接字符串比较进行精确匹配
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.

