Skip to content

feat(hub): lazy load official template workspaces#246

Merged
RussellLuo merged 3 commits into
OpenCSGs:mainfrom
wanghaojie124:dev
Jun 26, 2026
Merged

feat(hub): lazy load official template workspaces#246
RussellLuo merged 3 commits into
OpenCSGs:mainfrom
wanghaojie124:dev

Conversation

@wanghaojie124

Copy link
Copy Markdown
Collaborator
  • Switch the official template registry to the OpenCSG hub API and add staging override support.
  • Load hub template workspace directories and file previews on demand instead of during template detail fetches.

wanghj added 2 commits June 26, 2026 09:33
- switch the official template registry to the OpenCSG hub API and add staging override support
- load hub template workspace directories and file previews on demand instead of during template detail fetches
if err != nil {
return nil, fmt.Errorf("invalid remote hub template path %q: %w", repository.Path, err)
}
item, err := s.getTemplate(ctx, id, repository)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This turns any single bad repository or invalid agent.toml into a failure for the entire official registry listing, because List() now returns immediately on the first per-repo error. That means one non-template repo or one broken manifest can make the whole Hub template list disappear. Consider logging and skipping invalid repositories here so the registry can still return partial results.

@RussellLuo RussellLuo merged commit 3d64b34 into OpenCSGs:main Jun 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants