This commit is contained in:
朱潮 2026-04-01 10:27:21 +08:00
parent 85a262257e
commit fd0fbc422d

View File

@ -165,11 +165,11 @@ async def _execute_command(skill_path: str, command: str, hook_type: str, config
try:
# 设置环境变量,传递给子进程
env = os.environ.copy()
env['ASSISTANT_ID'] = getattr(config, 'bot_id', '')
env['USER_IDENTIFIER'] = getattr(config, 'user_identifier', '')
env['TRACE_ID'] = getattr(config, 'trace_id', '')
env['SESSION_ID'] = getattr(config, 'session_id', '')
env['LANGUAGE'] = getattr(config, 'language', '')
env['ASSISTANT_ID'] = str(getattr(config, 'bot_id', ''))
env['USER_IDENTIFIER'] = str(getattr(config, 'user_identifier', ''))
env['TRACE_ID'] = str(getattr(config, 'trace_id', ''))
env['SESSION_ID'] = str(getattr(config, 'session_id', ''))
env['LANGUAGE'] = str(getattr(config, 'language', ''))
env['HOOK_TYPE'] = hook_type
# 合并 config 中的自定义 shell 环境变量