Skip to content

feat: add OpenCSG CSGHub login and AI Gateway model provider#230

Merged
RussellLuo merged 3 commits into
OpenCSGs:mainfrom
jialudev:feat/csghub-login
Jun 24, 2026
Merged

feat: add OpenCSG CSGHub login and AI Gateway model provider#230
RussellLuo merged 3 commits into
OpenCSGs:mainfrom
jialudev:feat/csghub-login

Conversation

@jialudev

@jialudev jialudev commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator
  • Add the OpenCSG CSGHub login flow and account status UI.
  • Add the CSGHub model provider backed by CSGHub AI Gateway models.

- Added functions to fetch CSGHub authentication status, initiate login, and logout.
- Integrated CSGHub authentication into the workspace sidebar, displaying user information and login/logout buttons.
- Implemented fallback to CSGHub authentication store for credentials if environment variables are not set.
- Created hooks for managing CSGHub authentication state and actions.
- Updated UI components to reflect authentication status and provide user feedback during login/logout processes.
- Added tests for CSGHub authentication logic and UI components.
- Updated translations for CSGHub related messages.
@jialudev jialudev changed the title feat: add CSGHub login and model provider feat: add OpenCSG CSGHub login and AI Gateway model provider Jun 23, 2026
@jialudev jialudev requested a review from RussellLuo June 23, 2026 11:49
@jialudev

Copy link
Copy Markdown
Collaborator Author
img_v3_0212u_fb630b58-bebd-44e9-aa26-eb428b62a34g img_v3_0212u_6c6b9746-9df9-45c0-a425-46028bac6fdg img_v3_0212u_88c37ce1-cfd4-4c69-ad83-a45c0d45139g

Comment thread internal/csghubauth/store.go Outdated
Avatar string `json:"avatar"`
CSGHubBaseURL string `json:"csghub_base_url"`
PortalURL string `json:"portal_url"`
LoggedInAt time.Time `json:"logged_in_at"`

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 login metadata probably should not live in auth/csghub.json. That directory is currently the model-provider credential store, while logged_in_at and the other account display fields are more like top-level auth state. Consider moving this state into ~/.csgclaw/auth.json, similar to Codex, and keep auth/ scoped to provider-specific credentials only.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done, I've addressed this. PTAL

@jialudev

jialudev commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator Author
image

Add login success toast

@RussellLuo RussellLuo merged commit 583c1c6 into OpenCSGs:main Jun 24, 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