Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
ai
/
ai-workflow
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 59958799
authored
May 26, 2026
by
jimchenqj
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat(agent_hub): 调整IM推理钩子的内容截断与替换逻辑
增加内容展示长度至25字符以提供更多上下文,同时将"下载"替换为"点击"优化表述
1 parent
eb0705bc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
1 deletions
workspace/agent-admin/backend/app/service/agent_hub.py
workspace/agent-admin/backend/app/service/agent_hub.py
View file @
5995879
...
@@ -41,7 +41,7 @@ async def _im_post_reasoning_hook(
...
@@ -41,7 +41,7 @@ async def _im_post_reasoning_hook(
if
not
content
:
if
not
content
:
return
None
return
None
# 中间过程只发前10个字符 + 省略号
# 中间过程只发前10个字符 + 省略号
content
=
content
[:
10
]
+
"..."
if
len
(
content
)
>
10
else
content
content
=
content
[:
25
]
+
"..."
if
len
(
content
)
>
10
else
content
# 删除"下载"这个词
# 删除"下载"这个词
content
=
content
.
replace
(
"下载"
,
"点击"
)
content
=
content
.
replace
(
"下载"
,
"点击"
)
logger
.
info
(
f
"[Hook 发送 IM] agent={self.name} bot_id={bot_id} content={content[:50]}..."
)
logger
.
info
(
f
"[Hook 发送 IM] agent={self.name} bot_id={bot_id} content={content[:50]}..."
)
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment