Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
b26d8d7
chore(core.utils): :rotating_light: 修正错误Lint
Dt8333 Nov 1, 2025
9163c8c
chore(core.provider): :rotating_light: 修复基类错误Lint
Dt8333 Nov 1, 2025
918960a
chore(core.utils): 补全session_get()的重载
Dt8333 Nov 1, 2025
339f904
chore(core.provider): :rotating_light: 修正实现错误Lint
Dt8333 Oct 31, 2025
11eb0b9
chore(core.platform): :rotating_light: 修正platform基类和webchat的错误Lint
Dt8333 Oct 31, 2025
2796fab
chore(core.platform): 修正错误实现Lint
Dt8333 Nov 3, 2025
e3b9473
Merge branch 'master' into chore-pyright-fix
Dt8333 Nov 6, 2025
2d5b171
fix(core.provider): 修复循环调用和错误assert
Dt8333 Nov 7, 2025
c14f49f
chore(core.platform): 修复部分实现Lint
Dt8333 Nov 7, 2025
4ae7d29
chore(core.provider): 补充Dify.text_chat_stream的参数类型
Dt8333 Nov 7, 2025
53035cd
chore(core.pipeline): :rotating_light: 修复错误Lint
Dt8333 Nov 7, 2025
0a5f616
Merge remote-tracking branch 'Astrbot/master' into chore-pyright-fix
Dt8333 Nov 7, 2025
3b5faac
fix(core.slack): 补充遗漏导入
Dt8333 Nov 9, 2025
8e21175
Merge branch 'master' into chore-pyright-fix
Dt8333 Nov 9, 2025
40aa519
Merge branch 'master' into chore-pyright-fix
Dt8333 Nov 14, 2025
a05f8a9
Merge branch 'master' into chore-pyright-fix
Dt8333 Nov 14, 2025
44da4d4
chore(core.utils): 修复错误的session_get声明
Dt8333 Nov 14, 2025
c6a44c0
chore(core.platform): 移除Lark adapter import中的wildcard
Dt8333 Nov 14, 2025
5e11fdb
chore(core.db): 修复声明和部分逻辑
Dt8333 Nov 14, 2025
a2274cb
chore(core.db): 添加typings,使faiss参数能被正确识别。
Dt8333 Nov 14, 2025
99566a8
chore(core): 修复声明
Dt8333 Nov 14, 2025
fe67c48
Merge branch 'master' into chore-pyright-fix
Dt8333 Nov 17, 2025
8e36282
chore(core): 修改声明
Dt8333 Nov 17, 2025
b539c1a
chore: 补充faiss声明
Dt8333 Nov 17, 2025
6b8cc99
chore(dashboard): 修改实现,减少报错
Dt8333 Nov 17, 2025
3c7e7ef
chore(package): 修改部分声明与实现,减少报错
Dt8333 Nov 17, 2025
cc02dd0
Merge branch 'master' into chore-pyright-fix
Dt8333 Nov 26, 2025
53beaeb
Merge branch 'master' into chore-pyright-fix
Dt8333 Nov 30, 2025
2fcceab
chore(core): 添加Handler的overload,以去除部分assert同时通过类型检查
Dt8333 Nov 30, 2025
e3f4b3c
chore(core.pipeline): 修改Pipeline Scheduler的execute,将判断属性改为判断类型,通过静态类型检查
Dt8333 Nov 30, 2025
3d1dcde
chore(core.config): 添加类型标注,通过类型检查
Dt8333 Nov 30, 2025
a71d62a
chore(core.message): 为File._download_file添加检查,通过类型检查
Dt8333 Nov 30, 2025
98fa240
fix: 将断言改为条件判断以实现优雅关闭的容错性
Dt8333 Nov 30, 2025
3350922
refactor: 移除 discord 客户端中的 assert,改用 if None 判断并抛出异常
Dt8333 Nov 30, 2025
9652dde
fix: DiscordPlatformAdapter 对 self.client.user 为 None 做日志并返回,移除断言
Dt8333 Nov 30, 2025
2ba0574
fix: 增强 Lark 相关空值/异常检查并完善日志输出
Dt8333 Nov 30, 2025
6c06320
refactor: 将断言替换为条件检查并加入日志与错误处理
Dt8333 Nov 30, 2025
48eae07
chore: 移除LLM生成的无用注释
Dt8333 Nov 30, 2025
2b3d8a2
refactor: 使用 File.get_file 替换下载逻辑并移除 assert,提供默认 filename
Dt8333 Nov 30, 2025
01bf416
fix: Slack Socket 未初始化抛出运行时异常,图片 URL 判空改为非空判断
Dt8333 Nov 30, 2025
4082bfc
refactor: 将 WeChatPadProAdapter 的断言改为空值判断并添加日志
Dt8333 Nov 30, 2025
eaf5b6a
refactor: 使用 isinstance 替代断言实现类型判断,便于静态检查
Dt8333 Nov 30, 2025
1cbfdf9
fix: 去除cast,直接使用字段与字典访问,修正端口解析
Dt8333 Nov 30, 2025
f61e70d
refactor: 使用 match-case 重构 ProviderManager 加载并通过类型检查抛出 TypeError
Dt8333 Nov 30, 2025
d1821ae
fix: group_name_display 时若 group 对象为空则记录错误并返回
Dt8333 Dec 1, 2025
a817d28
fix: 将 _get_current_persona_id 的 assert 替换成 if guard 并返回 None
Dt8333 Dec 1, 2025
67eb422
fix: 优化插件目录存在性检查及图片URL非空验证,更新JSON排序配置
Dt8333 Dec 1, 2025
d805414
fix: 将 datetime_str 的 assert 替换为显式检查并抛出异常
Dt8333 Dec 1, 2025
11fbfbb
refactor: 移除 cast,改为运行时检查并在找不到调度器时跳过
Dt8333 Dec 1, 2025
80683f8
refactor: 移除 cast,改用 isinstance 检查 FaissVecDB 并警告
Dt8333 Dec 1, 2025
23ff3a2
fix: 删除 typing.cast 导入,并在获取文件绝对路径前校验 file_
Dt8333 Dec 1, 2025
5c23382
refactor: 移除 typing.cast,简化内容安全检查调用
Dt8333 Dec 1, 2025
b3a3776
refactor: 将 PlatformMetadata.id 设为必填并在注册时传入 id,移除 cast
Dt8333 Dec 1, 2025
09c2825
refactor: 移除 cast,改用 HasInitialize 与 isinstance 进行初始化
Dt8333 Dec 1, 2025
45d5526
fix: 为 ProviderManager.initialize 增加ID类型判断,避免 None 导致 get 失败
Dt8333 Dec 1, 2025
4c51cba
refactor: 为 OTTSProvider 与 AzureNativeProvider 引入 _client 与 client 属性…
Dt8333 Dec 1, 2025
525652c
fix: 为 Whisper 自托管源添加模型未初始化校验并直接调用 transcribe
Dt8333 Dec 1, 2025
5b4aecf
refactor: 移除未使用的 cast 导入并简化 platform_name 赋值
Dt8333 Dec 1, 2025
1b319a4
refactor: 引入 cast 并对 id 使用 cast(str, ...) 提升类型安全
Dt8333 Dec 1, 2025
1aa1ea5
fix: 将 _id_to_sid 返回改为 str,空值返回空串;对 id 与 message_id 使用 cast
Dt8333 Dec 1, 2025
35d735d
refactor: 重构 Discord 处理逻辑:强制 类型转换、优先斜杠指令并优化提及判断
Dt8333 Dec 1, 2025
55710ab
fix: 统一对 id 获取执行 cast,并在微信消息解析失败时抛错
Dt8333 Dec 1, 2025
e21691d
Revert "fix: 去除cast,直接使用字段与字典访问,修正端口解析"
Dt8333 Dec 1, 2025
d53ae29
fix: 百炼 Rerank 会话关闭时返回空结果;初始化 request.prompt 避免空值拼接
Dt8333 Dec 1, 2025
53b31c9
fix: 统一处理搜索结果链接为字符串,新增 _get_url 助手并适配 Bing/Sogo
Dt8333 Dec 1, 2025
2f30e68
refactor: 调整 call_handler 泛型、Discord 通道注解及 FishAudioTTS API 请求类型
Dt8333 Dec 1, 2025
66024f3
Merge branch 'master' into chore-pyright-fix
Dt8333 Dec 1, 2025
57ec21d
Merge branch 'master' into chore-pyright-fix
Dt8333 Dec 1, 2025
e1c66b0
Merge branch 'master' into chore-pyright-fix
Dt8333 Dec 6, 2025
8af69d2
refactor: 使用 col(...) 替代列引用并对结果进行 CursorResult 强转
Dt8333 Dec 6, 2025
186624b
chore: ruff format
Dt8333 Dec 6, 2025
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: 0 additions & 1 deletion astrbot/core/agent/runners/tool_loop_agent_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ async def step(self):
llm_resp_result = None

async for llm_response in self._iter_llm_responses():
assert isinstance(llm_response, LLMResponse)
if llm_response.is_chunk:
if llm_response.result_chain:
yield AgentResponse(
Expand Down
9 changes: 7 additions & 2 deletions astrbot/core/agent/tool.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from collections.abc import Awaitable, Callable
from collections.abc import AsyncGenerator, Awaitable, Callable
from typing import Any, Generic

import jsonschema
Expand All @@ -7,6 +7,8 @@
from pydantic import Field, model_validator
from pydantic.dataclasses import dataclass

from astrbot.core.message.message_event_result import MessageEventResult

from .run_context import ContextWrapper, TContext

ParametersType = dict[str, Any]
Expand Down Expand Up @@ -38,7 +40,10 @@ def validate_parameters(self) -> "ToolSchema":
class FunctionTool(ToolSchema, Generic[TContext]):
"""A callable tool, for function calling."""

handler: Callable[..., Awaitable[Any]] | None = None
handler: (
Callable[..., Awaitable[str | None] | AsyncGenerator[MessageEventResult, None]]
| None
) = None
"""a callable that implements the tool's functionality. It should be an async function."""

handler_module_path: str | None = None
Expand Down
6 changes: 5 additions & 1 deletion astrbot/core/astr_agent_tool_exec.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,11 @@ async def _execute_mcp(

async def call_local_llm_tool(
context: ContextWrapper[AstrAgentContext],
handler: T.Callable[..., T.Awaitable[T.Any]],
handler: T.Callable[
...,
T.Awaitable[MessageEventResult | mcp.types.CallToolResult | str | None]
| T.AsyncGenerator[MessageEventResult | CommandResult | str | None, None],
],
method_name: str,
*args,
**kwargs,
Expand Down
4 changes: 4 additions & 0 deletions astrbot/core/config/astrbot_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ class AstrBotConfig(dict):
- 如果传入了 schema,将会通过 schema 解析出 default_config,此时传入的 default_config 会被忽略。
"""

config_path: str
default_config: dict
schema: dict | None

def __init__(
self,
config_path: str = ASTRBOT_CONFIG_PATH,
Expand Down
2 changes: 1 addition & 1 deletion astrbot/core/core_lifecycle.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def _load(self) -> None:
# 把插件中注册的所有协程函数注册到事件总线中并执行
extra_tasks = []
for task in self.star_context._register_tasks:
extra_tasks.append(asyncio.create_task(task, name=task.__name__))
extra_tasks.append(asyncio.create_task(task, name=task.__name__)) # type: ignore

tasks_ = [event_bus_task, *extra_tasks]
for task in tasks_:
Expand Down
5 changes: 2 additions & 3 deletions astrbot/core/db/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
from dataclasses import dataclass

from deprecated import deprecated
from sqlalchemy.ext.asyncio import AsyncSession, create_async_engine
from sqlalchemy.orm import sessionmaker
from sqlalchemy.ext.asyncio import AsyncSession, async_sessionmaker, create_async_engine

from astrbot.core.db.po import (
Attachment,
Expand All @@ -32,7 +31,7 @@ def __init__(self) -> None:
echo=False,
future=True,
)
self.AsyncSessionLocal = sessionmaker(
self.AsyncSessionLocal = async_sessionmaker(
self.engine,
class_=AsyncSession,
expire_on_commit=False,
Expand Down
2 changes: 2 additions & 0 deletions astrbot/core/db/migration/migra_3_to_4.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ async def migration_conversation_table(
logger.info(
f"未找到该条旧会话对应的具体数据: {conversation}, 跳过。",
)
continue
if ":" not in conv.user_id:
continue
session = MessageSesion.from_str(session_str=conv.user_id)
Expand Down Expand Up @@ -207,6 +208,7 @@ async def migration_webchat_data(
logger.info(
f"未找到该条旧会话对应的具体数据: {conversation}, 跳过。",
)
continue
if ":" in conv.user_id:
continue
platform_id = "webchat"
Expand Down
10 changes: 6 additions & 4 deletions astrbot/core/db/migration/sqlite_v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def _get_conn(self, db_path: str) -> sqlite3.Connection:
conn.text_factory = str
return conn

def _exec_sql(self, sql: str, params: tuple = None):
def _exec_sql(self, sql: str, params: tuple | None = None):
conn = self.conn
try:
c = self.conn.cursor()
Expand Down Expand Up @@ -224,9 +224,11 @@ def get_grouped_base_stats(self, offset_sec: int = 86400) -> Stats:

c.close()

return Stats(platform, [], [])
return Stats(platform)

def get_conversation_by_user_id(self, user_id: str, cid: str) -> Conversation:
def get_conversation_by_user_id(
self, user_id: str, cid: str
) -> Conversation | None:
try:
c = self.conn.cursor()
except sqlite3.ProgrammingError:
Expand Down Expand Up @@ -258,7 +260,7 @@ def new_conversation(self, user_id: str, cid: str):
(user_id, cid, history, updated_at, created_at),
)

def get_conversations(self, user_id: str) -> tuple:
def get_conversations(self, user_id: str) -> list[Conversation]:
try:
c = self.conn.cursor()
except sqlite3.ProgrammingError:
Expand Down
31 changes: 16 additions & 15 deletions astrbot/core/db/po.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class PlatformStat(SQLModel, table=True):
Note: In astrbot v4, we moved `platform` table to here.
"""

__tablename__ = "platform_stats" # type: ignore
__tablename__: str = "platform_stats"

id: int = Field(primary_key=True, sa_column_kwargs={"autoincrement": True})
timestamp: datetime = Field(nullable=False)
Expand All @@ -31,9 +31,10 @@ class PlatformStat(SQLModel, table=True):


class ConversationV2(SQLModel, table=True):
__tablename__ = "conversations" # type: ignore
__tablename__: str = "conversations"

inner_conversation_id: int = Field(
inner_conversation_id: int | None = Field(
default=None,
primary_key=True,
sa_column_kwargs={"autoincrement": True},
)
Expand Down Expand Up @@ -68,7 +69,7 @@ class Persona(SQLModel, table=True):
It can be used to customize the behavior of LLMs.
"""

__tablename__ = "personas" # type: ignore
__tablename__: str = "personas"

id: int | None = Field(
primary_key=True,
Expand Down Expand Up @@ -98,7 +99,7 @@ class Persona(SQLModel, table=True):
class Preference(SQLModel, table=True):
"""This class represents preferences for bots."""

__tablename__ = "preferences" # type: ignore
__tablename__: str = "preferences"

id: int | None = Field(
default=None,
Expand Down Expand Up @@ -134,7 +135,7 @@ class PlatformMessageHistory(SQLModel, table=True):
or platform-specific messages.
"""

__tablename__ = "platform_message_history" # type: ignore
__tablename__: str = "platform_message_history"

id: int | None = Field(
primary_key=True,
Expand Down Expand Up @@ -162,7 +163,7 @@ class PlatformSession(SQLModel, table=True):
Each session can have multiple conversations (对话) associated with it.
"""

__tablename__ = "platform_sessions" # type: ignore
__tablename__: str = "platform_sessions"

inner_id: int | None = Field(
primary_key=True,
Expand Down Expand Up @@ -203,7 +204,7 @@ class Attachment(SQLModel, table=True):
Attachments can be images, files, or other media types.
"""

__tablename__ = "attachments" # type: ignore
__tablename__: str = "attachments"

inner_attachment_id: int | None = Field(
primary_key=True,
Expand Down Expand Up @@ -261,17 +262,17 @@ class Personality(TypedDict):
在 v4.0.0 版本及之后,推荐使用上面的 Persona 类。并且, mood_imitation_dialogs 字段已被废弃。
"""

prompt: str = ""
name: str = ""
begin_dialogs: list[str] = []
mood_imitation_dialogs: list[str] = []
prompt: str
name: str
begin_dialogs: list[str]
mood_imitation_dialogs: list[str]
"""情感模拟对话预设。在 v4.0.0 版本及之后,已被废弃。"""
tools: list[str] | None = None
tools: list[str] | None
"""工具列表。None 表示使用所有工具,空列表表示不使用任何工具"""

# cache
_begin_dialogs_processed: list[dict] = []
_mood_imitation_dialogs_processed: str = ""
_begin_dialogs_processed: list[dict]
_mood_imitation_dialogs_processed: str


# ====
Expand Down
7 changes: 4 additions & 3 deletions astrbot/core/db/sqlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import typing as T
from datetime import datetime, timedelta, timezone

from sqlalchemy import CursorResult
from sqlalchemy.ext.asyncio import AsyncSession
from sqlmodel import col, delete, desc, func, or_, select, text, update

Expand Down Expand Up @@ -489,7 +490,7 @@ async def get_attachments(self, attachment_ids: list[str]) -> list:
async with self.get_db() as session:
session: AsyncSession
query = select(Attachment).where(
Attachment.attachment_id.in_(attachment_ids)
col(Attachment.attachment_id).in_(attachment_ids)
)
result = await session.execute(query)
return list(result.scalars().all())
Expand All @@ -505,7 +506,7 @@ async def delete_attachment(self, attachment_id: str) -> bool:
query = delete(Attachment).where(
col(Attachment.attachment_id) == attachment_id
)
result = await session.execute(query)
result = T.cast(CursorResult, await session.execute(query))
return result.rowcount > 0

async def delete_attachments(self, attachment_ids: list[str]) -> int:
Expand All @@ -521,7 +522,7 @@ async def delete_attachments(self, attachment_ids: list[str]) -> int:
query = delete(Attachment).where(
col(Attachment.attachment_id).in_(attachment_ids)
)
result = await session.execute(query)
result = T.cast(CursorResult, await session.execute(query))
return result.rowcount

async def insert_persona(
Expand Down
2 changes: 2 additions & 0 deletions astrbot/core/db/vec_db/faiss_impl/embedding_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,6 @@ async def save_index(self):
path (str): 保存索引的路径
"""
if self.index is None:
return
faiss.write_index(self.index, self.path)
7 changes: 6 additions & 1 deletion astrbot/core/event_bus.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def __init__(
self,
event_queue: Queue,
pipeline_scheduler_mapping: dict[str, PipelineScheduler],
astrbot_config_mgr: AstrBotConfigManager = None,
astrbot_config_mgr: AstrBotConfigManager,
):
self.event_queue = event_queue # 事件队列
# abconf uuid -> scheduler
Expand All @@ -40,6 +40,11 @@ async def dispatch(self):
conf_info = self.astrbot_config_mgr.get_conf_info(event.unified_msg_origin)
self._print_event(event, conf_info["name"])
scheduler = self.pipeline_scheduler_mapping.get(conf_info["id"])
if not scheduler:
logger.error(
f"PipelineScheduler not found for id: {conf_info['id']}, event ignored."
)
continue
asyncio.create_task(scheduler.execute(event))

def _print_event(self, event: AstrMessageEvent, conf_name: str):
Expand Down
6 changes: 5 additions & 1 deletion astrbot/core/knowledge_base/retrieval/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,11 @@ async def retrieve(
# 5. Rerank
first_rerank = None
for kb_id in kb_ids:
vec_db: FaissVecDB = kb_options[kb_id]["vec_db"]
vec_db = kb_options[kb_id]["vec_db"]
if not isinstance(vec_db, FaissVecDB):
logger.warning(f"vec_db for kb_id {kb_id} is not FaissVecDB")
continue

rerank_pi = kb_options[kb_id]["rerank_provider_id"]
if (
vec_db
Expand Down
12 changes: 9 additions & 3 deletions astrbot/core/message/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ class ComponentType(str, Enum):
class BaseMessageComponent(BaseModel):
type: ComponentType

def __init__(self, **kwargs):
super().__init__(**kwargs)

def toDict(self):
data = {}
for k, v in self.__dict__.items():
Expand Down Expand Up @@ -551,7 +554,7 @@ class Node(BaseMessageComponent):
id: int | None = 0 # 忽略
name: str | None = "" # qq昵称
uin: str | None = "0" # qq号
content: list[BaseMessageComponent] | None = []
content: list[BaseMessageComponent] = []
seq: str | list | None = "" # 忽略
time: int | None = 0 # 忽略

Expand Down Expand Up @@ -615,7 +618,7 @@ def toDict(self):
ret["messages"].append(d)
return ret

async def to_dict(self):
async def to_dict(self) -> dict:
"""将 Nodes 转换为字典格式,适用于 OneBot JSON 格式"""
ret = {"messages": []}
for node in self.nodes:
Expand Down Expand Up @@ -714,12 +717,15 @@ async def get_file(self, allow_return_url: bool = False) -> str:

if self.url:
await self._download_file()
return os.path.abspath(self.file_)
if self.file_:
return os.path.abspath(self.file_)

return ""

async def _download_file(self):
"""下载文件"""
if not self.url:
raise ValueError("Download failed: No URL provided in File component.")
download_dir = os.path.join(get_astrbot_data_path(), "temp")
os.makedirs(download_dir, exist_ok=True)
if self.name:
Expand Down
4 changes: 2 additions & 2 deletions astrbot/core/persona_mgr.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ async def create_persona(
self,
persona_id: str,
system_prompt: str,
begin_dialogs: list[str] = None,
tools: list[str] = None,
begin_dialogs: list[str] | None = None,
tools: list[str] | None = None,
) -> Persona:
"""创建新的 persona。tools 参数为 None 时表示使用所有工具,空列表表示不使用任何工具"""
if await self.db.get_persona_by_id(persona_id):
Expand Down
2 changes: 1 addition & 1 deletion astrbot/core/pipeline/content_safety_check/stage.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async def process(
self,
event: AstrMessageEvent,
check_text: str | None = None,
) -> None | AsyncGenerator[None, None]:
) -> AsyncGenerator[None, None]:
"""检查内容安全"""
text = check_text if check_text else event.get_message_str()
ok, info = self.strategy_selector.check(text)
Expand Down
3 changes: 2 additions & 1 deletion astrbot/core/pipeline/context_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

async def call_handler(
event: AstrMessageEvent,
handler: T.Callable[..., T.Awaitable[T.Any]],
handler: T.Callable[..., T.Awaitable[T.Any] | T.AsyncGenerator[T.Any, None]],
*args,
**kwargs,
) -> T.AsyncGenerator[T.Any, None]:
Expand Down Expand Up @@ -91,6 +91,7 @@ async def call_event_hook(
)
for handler in handlers:
try:
assert inspect.iscoroutinefunction(handler.handler)
logger.debug(
f"hook({hook_type.name}) -> {star_map[handler.handler_module_path].name} - {handler.handler_name}",
)
Expand Down
2 changes: 1 addition & 1 deletion astrbot/core/pipeline/process_stage/method/star_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async def initialize(self, ctx: PipelineContext) -> None:
async def process(
self,
event: AstrMessageEvent,
) -> AsyncGenerator[None, None]:
) -> AsyncGenerator[Any, None]:
activated_handlers: list[StarHandlerMetadata] = event.get_extra(
"activated_handlers",
)
Expand Down
Loading