fix: windows path and encoding adaptation

This commit is contained in:
zhayujie
2026-02-06 18:37:05 +08:00
parent bea95d4fae
commit 051ffd78a3
20 changed files with 87 additions and 26 deletions

View File

@@ -140,7 +140,9 @@ class Agent:
if self.runtime_info.get("model"):
runtime_parts.append(f"模型={self.runtime_info['model']}")
if self.runtime_info.get("workspace"):
runtime_parts.append(f"工作空间={self.runtime_info['workspace']}")
# Replace backslashes with forward slashes for Windows paths
workspace_path = str(self.runtime_info['workspace']).replace('\\', '/')
runtime_parts.append(f"工作空间={workspace_path}")
if self.runtime_info.get("channel") and self.runtime_info.get("channel") != "web":
runtime_parts.append(f"渠道={self.runtime_info['channel']}")