fix(web): _resolve_workspace_id 未匹配时兜底返回 default 而非 None
host_workspaces.json 存在但不匹配时,不应返回 None 导致 对话目录指向 conversations_root 而丢失 conversations_root/default/ 下的所有对话。
This commit is contained in:
parent
f31f8d6fd7
commit
55b7b7deea
@ -108,8 +108,8 @@ class ConversationManager:
|
||||
if project_path == workspace_path or self._path_is_relative_to(project_path, workspace_path):
|
||||
matches.append((len(str(workspace_path)), item.get("workspace_id")))
|
||||
if not matches:
|
||||
# Docker/无工作区配置场景:只有一个工作区时使用 default;宿主机配置存在但不匹配时返回 None。
|
||||
return "default" if not self.host_workspaces else None
|
||||
# 未匹配任何工作区时兜底使用 "default"(web 模式 / 空配置均适用)
|
||||
return "default"
|
||||
matches.sort(reverse=True)
|
||||
return str(matches[0][1])
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user