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.
功能概述
为 Calendar 插件新增社团事务临期提醒功能,帮助社团成员更好地管理即将到期的事务,避免遗漏重要事项,提高事务处理的及时性。
实现的功能
1. 📢 每周汇总预告
在每周一上午 9:00(可配置)发送一条汇总消息,列出接下来一周内即将到期的所有社团事务。
示例输出:
2. ⏰ 每日临期提醒
在每天上午 9:00(可配置)发送单条提醒消息,提醒明天即将截止的具体事务。
示例输出:
技术实现
新增文件
ClubAffairsReminder.cs(339 行):核心提醒功能类ClubAffairsReminder.README.md(101 行):详细的功能文档和配置说明ClubAffairsReminderTest.cs(111 行):单元测试,覆盖核心逻辑修改文件
PluginMain.cs(+56/-1 行):ClubAffairsReminderConfig配置类配置选项
在插件配置文件中新增
ClubAffairsReminder配置节点:{ "ClubAffairsReminder": { "EnableWeeklySummary": true, // 是否启用每周汇总提醒 "EnableDailyReminder": true, // 是否启用每日提醒 "WeeklySummaryHour": 9, // 每周汇总发送时间(小时,0-23) "DailyReminderHour": 9, // 每日提醒发送时间(小时,0-23) "WeeklySummaryDayOfWeek": 1 // 每周汇总发送日期(0=周日,1=周一,...) } }所有配置项都有合理的默认值,开箱即用。
主要特性
✅ 独立设计:与现有
ReminderTask并行运行,互不影响✅ 完全可配置:支持自定义发送时间、启用/禁用特定提醒类型
✅ 智能提取:自动从事务描述中提取负责人信息(支持"负责人:"、"责任人:"等多种格式)
✅ 过滤集成:完全兼容现有
ReminderGroups配置的白名单/黑名单/默认模式✅ 防重复机制:使用日期记录防止同一天重复发送
✅ 类型安全:统一使用
DateTimeOffset处理时间,保持时区信息一致性✅ 错误处理:完善的异常捕获和日志记录,确保插件稳定运行
✅ 单元测试:覆盖日期计算、时间判断、emoji 映射等核心逻辑
兼容性
代码统计
测试
包含单元测试,验证以下核心功能:
Closes #[issue_number]
Original prompt
Fixes #12
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.