refactor(chat): 统一事件触发器中的stream_id来源

将`cycle_processor`中事件触发的`stream_id`来源从`self.chat_stream.stream_id`更改为`self.context.stream_id`,以保持代码库中的一致性。

在`default_generator.py`中初始化了`llm_response`变量,以避免潜在的引用前赋值错误。
This commit is contained in:
tt-P607
2025-08-25 19:09:04 +08:00
parent 084a425a4f
commit 75b878d692
2 changed files with 2 additions and 1 deletions

View File

@@ -353,6 +353,7 @@ class DefaultReplyer:
prompt = None
if available_actions is None:
available_actions = {}
llm_response = None
try:
# 3. 构建 Prompt
with Timer("构建Prompt", {}): # 内部计时器,可选保留