| 1167 | } |
| 1168 | |
| 1169 | func (h *HostAPIHandler) resolveSandboxWorkspaceFilter( |
| 1170 | ctx context.Context, |
| 1171 | workspace string, |
| 1172 | ) (string, string, error) { |
| 1173 | workspace = strings.TrimSpace(workspace) |
| 1174 | if workspace == "" { |
| 1175 | return "", "", nil |
| 1176 | } |
| 1177 | if h.workspaces == nil { |
| 1178 | return workspace, workspace, nil |
| 1179 | } |
| 1180 | resolved, err := h.workspaces.Resolve(ctx, workspace) |
| 1181 | if err != nil { |
| 1182 | return "", "", err |
| 1183 | } |
| 1184 | workspaceID, err := hostAPIResolvedWorkspaceID(&resolved) |
| 1185 | if err != nil { |
| 1186 | return "", "", err |
| 1187 | } |
| 1188 | return workspaceID, strings.TrimSpace(resolved.RootDir), nil |
| 1189 | } |
| 1190 | |
| 1191 | func hostAPISandboxSyncState(meta *store.SessionSandboxMeta) string { |
| 1192 | if meta == nil { |