Skip to content

Comments

1.1.0#1

Merged
BingZi-233 merged 7 commits intomasterfrom
dev
Aug 13, 2025
Merged

1.1.0#1
BingZi-233 merged 7 commits intomasterfrom
dev

Conversation

@BingZi-233
Copy link
Owner

No description provided.

BingZi-233 and others added 7 commits August 13, 2025 10:14
- 移除 OneBotAPI 中所有同步方法(sendPrivateMessage、sendGroupMessage 等)
- 所有 API 方法改为回调模式,避免阻塞主线程
- 使用 CompletableFuture.handle() 替代 .get() 调用
- 更新命令类中的方法调用以适配新的异步 API
- 确保所有网络操作都在异步线程中执行,回调在主线程执行

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- 更新 README.md 中的API使用示例,展示新的异步回调模式
- 修改功能特性描述,突出完全异步的API设计
- 更新 README_EN.md 英文文档的功能特性说明
- 在 CLAUDE.md 中添加异步编程规范和最佳实践
- 更新架构设计说明,强调异步化的实现方式

所有文档现在准确反映了项目不再包含同步方法的现状。

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- 为所有硬编码消息添加国际化支持
- 新增 API、配置、事件处理、WebSocket调试等消息的国际化条目
- 使用 TabooLib 的 sendInfo/sendWarn/sendError 替代 sendMessage
- 语言文件采用小驼峰命名规范,保持扁平化结构
- 支持中文和英文两种语言

更改内容:
- OneBotAPI.kt: 所有错误消息国际化
- OneBotConfig.kt: 配置相关消息国际化
- EventFactory.kt: 事件处理错误消息国际化
- OneBotWebSocketClient.kt: WebSocket调试消息国际化
- ActionFactory.kt: API调用调试消息国际化
- 语言文件: 新增 30+ 国际化条目

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- 将原有的MessageEvents.kt、NoticeEvents.kt、RequestEvents.kt拆分为独立文件
- 每个事件类型都有自己的文件,便于维护和扩展
- 保持事件基类MessageEvent、NoticeEvent、RequestEvent的统一结构
- 优化了代码组织,提高了可读性和可维护性
- 更新了CLAUDE.md文档以反映新的包结构

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- 更新 README.md 中的架构设计,详细展示新的事件包结构
- 更新 README_EN.md 中的架构描述和开发使用示例
- 完善 CLAUDE.md 中的事件系统设计说明,增加包结构细节
- 反映按功能模块重新组织的事件类结构
- 提供更清晰的开发者使用指南

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
## 主要变更

### 包结构重新设计
- **api 包** - 对外接口和事件,供其他插件使用
  - `api/OneBotAPI.kt` - 公共API接口
  - `api/event/` - 完整的事件系统(消息、通知、请求)

- **internal 包** - 内部实现,不对外暴露
  - `internal/manager/` - 连接生命周期管理
  - `internal/client/` - WebSocket客户端实现
  - `internal/action/` - API调用处理
  - `internal/event/` - 事件工厂和解析
  - `internal/config/` - 配置管理
  - `internal/command/` - 命令处理

### 为其他插件提供的功能
- **清晰的API接口** - 异步回调模式,不阻塞主线程
- **丰富的事件系统** - 可监听消息、通知、请求事件
- **类型安全** - 所有事件都有明确的类型和属性
- **良好的封装** - 内部实现对外不可见

### 技术改进
- 更新所有导入路径以使用新的包结构
- 增强代码组织性和可维护性
- 保持向后兼容的公共API
- 完善的文档更新

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
按照语义化版本号规范 (SemVer) 进行版本更新:

## 版本变更说明
- 从 `1.0.0` 升级至 `1.1.0`
- 类型:MINOR 版本更新(新增功能)

## 新增功能
- 新的 api 包结构供其他插件使用
- 完整的事件系统供其他插件监听
- 更好的代码组织和模块化设计

## 向后兼容性
- ✅ 保持对现有用户的完全兼容
- ✅ 不破坏现有的API接口
- ✅ 原有功能正常工作

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@BingZi-233 BingZi-233 self-assigned this Aug 13, 2025
@BingZi-233 BingZi-233 merged commit cead85d into master Aug 13, 2025
1 check passed
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.

1 participant