Skip to content

JiuwenSwarm is an intelligent AI Agent built on openJiuwen. It extends the powerful capabilities of large language models directly to your fingertips through various communication apps you use daily.

Python

fix:清理敏感日志打印

wangxine16c0c4b98d4
diff --git a/jiuwenclaw/channel/dingding.py b/jiuwenclaw/channel/dingding.py
index ffc4699f9a..d19080223a 100644
--- a/jiuwenclaw/channel/dingding.py
+++ b/jiuwenclaw/channel/dingding.py
@@ -334,9 +334,7 @@ class DingTalkChannel(BaseChannel):
def _initialize_stream_client(self) -> None:
"""初始化钉钉Stream客户端"""
- logger.info(
- f"正在初始化钉钉Stream客户端,客户端ID: {self.config.client_id}..."
- )
+ logger.info("正在初始化钉钉Stream客户端")
credential = Credential(self.config.client_id, self.config.client_secret)
self._client = DingTalkStreamClient(credential)
diff --git a/jiuwenclaw/channel/telegram_channel.py b/jiuwenclaw/channel/telegram_channel.py
index 688ab2ce75..dee4698bd4 100644
--- a/jiuwenclaw/channel/telegram_channel.py
+++ b/jiuwenclaw/channel/telegram_channel.py
@@ -127,11 +127,7 @@ class TelegramChannel(BaseChannel):
allowed_updates=Update.ALL_TYPES, drop_pending_updates=True
)
- logger.info(
- "Telegram Bot 已启动 (token: {}...{})".format(
- self.config.bot_token[:10], self.config.bot_token[-5:]
- )
- )
+ logger.info("Telegram Bot 已启动")
# 持续运行直到停止
while self._running:
@@ -397,7 +393,9 @@ class TelegramChannel(BaseChannel):
channel_id=self.channel_id,
source="telegram",
extra={
- "bot_token": f"{self.config.bot_token[:10]}...{self.config.bot_token[-5:]}",
+ "bot_token_configured": bool(
+ self.config.bot_token and self.config.bot_token.strip()
+ ),
"parse_mode": self.config.parse_mode,
},
)
diff --git a/jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/advanced-daily-report/SKILL.md b/jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/advanced-daily-report/SKILL.md
index 5c485a3167..6dd844a468 100644
--- a/jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/advanced-daily-report/SKILL.md
+++ b/jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/advanced-daily-report/SKILL.md
@@ -75,7 +75,7 @@ daily-report/
**脚本会自动采集以下数据**:
- **Git 提交记录**:通过 `git log` 命令读取 `D:/Download/jiuwenclaw` 仓库的提交历史
-- **邮箱邮件统计**:通过 IMAP 协议连接 `[email protected]` 读取邮件统计(需要邮箱授权码)
+- **邮箱邮件统计**:通过 IMAP 协议连接 `.env` 中配置的邮箱账户读取邮件统计(需要邮箱授权码)
- **记忆系统**:读取 `~/.jiuwenclaw/agent/memory/` 目录下的每日记忆文件
- **待办事项**:读取 `~/.jiuwenclaw/agent/sessions/` 下各会话的 `todo.md` 文件
@@ -209,8 +209,8 @@ python ~/.jiuwenclaw/agent/skills/daily-report/run_report.py monthly --year 2026
在 `.env` 文件中配置(本项目实际配置):
```env
-EMAIL_TOKEN=UFvBrE7ZDAsT2xdP
+EMAIL_ADDRESS=
+EMAIL_TOKEN=
EMAIL_PROVIDER=163
```
diff --git a/jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/advanced-daily-report/analyzers/ai_analyzer.py b/jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/advanced-daily-report/analyzers/ai_analyzer.py
index acbd156e7c..f4c86861fa 100644
--- a/jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/advanced-daily-report/analyzers/ai_analyzer.py
+++ b/jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/advanced-daily-report/analyzers/ai_analyzer.py
@@ -132,8 +132,8 @@ class AIAnalyzer:
client_config = react_config["model_client_config"]
config["api_base"] = client_config.get("api_base", config["api_base"])
config["api_key"] = client_config.get("api_key", config["api_key"])
- except Exception as e:
- print(f"[AIAnalyzer] 加载配置文件失败: {e}")
+ except Exception:
+ print(f"[AIAnalyzer] 加载配置文件失败")
return config
@@ -185,8 +185,8 @@ class AIAnalyzer:
try:
response = await model.invoke(messages=messages)
return response.content if hasattr(response, "content") else str(response)
- except Exception as e:
- print(f"[AIAnalyzer] LLM 调用失败: {e}")
+ except Exception:
+ print(f"[AIAnalyzer] LLM 调用失败")
return ""
def generate_summary_sync(self, data: dict) -> str: