Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/core/src/adapter/base/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export abstract class AdapterBase<T = any> implements AdapterType<T> {
platform: 'qq',
standard: 'other',
protocol: 'console',
protocolVersion: '',
communication: 'other',
address: '',
secret: null,
Expand Down
7 changes: 6 additions & 1 deletion packages/core/src/types/adapter/info.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/**
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

文件开头包含了不可见的 BOM (Byte Order Mark) 字符(\ufeff)。在 UTF-8 编码的 TypeScript 项目中,通常不需要 BOM,且它可能会导致某些构建工具、编辑器或环境出现解析异常。建议移除该字符。

Suggested change
/**
/**

* 适配器所属平台
* - `qq`: QQ
* - `wechat`: 微信
Expand Down Expand Up @@ -87,8 +87,11 @@ export type AdapterCommunication = 'http'
| 'other'
| (string & {})

// TODO: 太乱了,后续需要重新设计适配器信息结构,分为适配器基本信息和协议实现(或者协议SDK)信息两部分
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

此处添加了重复的 TODO 注释。在下方的 JSDoc(第 94 行)中已经包含了相同的说明。建议移除此处的单行注释,以保持代码简洁并避免冗余。

/**
* 适配器基本信息
*
* TODO: 太乱了,后续需要重新设计适配器信息结构,分为适配器基本信息和协议实现(或者协议SDK)信息两部分
*/
export interface AdapterInfo {
/** 适配器索引 默认为-1 在注册适配器时会自动更改为对应的索引 */
Expand All @@ -103,6 +106,8 @@ export interface AdapterInfo {
standard: AdapterStandard
/** 适配器协议实现 如gocq、napcat */
protocol: AdapterProtocol
/** 适配器协议实现版本 */
protocolVersion: string
/** 适配器通信方式 */
communication: AdapterCommunication
/**
Expand Down
Loading