Skip to content

Integrate with CSGHub-lite#5

Merged
RussellLuo merged 2 commits intoOpenCSGs:mainfrom
xxx7xxxx:dev
Apr 17, 2026
Merged

Integrate with CSGHub-lite#5
RussellLuo merged 2 commits intoOpenCSGs:mainfrom
xxx7xxxx:dev

Conversation

@xxx7xxxx
Copy link
Copy Markdown
Collaborator

@xxx7xxxx xxx7xxxx commented Apr 17, 2026

Implemented CSGHub-lite integration for csgclaw onboard and serve.

  • Added --provider csghub-lite|custom while preserving existing non-interactive flags.
  • Made interactive onboard provider-aware: fresh configs default to CSGHub-lite, existing configs default to keeping the current provider.
  • Added CSGHub-lite /v1/models discovery, configurable base URL prompt, and local defaults: http://127.0.0.1:11435/v1 + API key local.
  • Added startup/preflight checks before serve creates the manager when the default provider is local CSGHub-lite.
  • Added stdin abstraction for testable interactive prompts.
  • Updated README/README.zh and Makefile onboard example.
  • Added tests for interactive onboard flows, CSGHub-lite model discovery, config persistence, and serve preflight.

@xxx7xxxx xxx7xxxx requested a review from RussellLuo April 17, 2026 08:32
Comment thread cli/app.go Outdated
stdin := a.stdin
if stdin == nil {
stdin = os.Stdin
}
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.

Shouldn't a.stdin always be os.Stdin?

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.

Updated. New() already initializes a.stdin to os.Stdin, so I removed the redundant nil fallback and now pass a.stdin directly in both CLI app variants.

Comment thread cli/csgclawcli/app.go Outdated
stdin := a.stdin
if stdin == nil {
stdin = os.Stdin
}
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.

Same question here.

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.

Ditto

@RussellLuo
Copy link
Copy Markdown
Collaborator

LGTM

@RussellLuo RussellLuo merged commit 381dad3 into OpenCSGs:main Apr 17, 2026
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