Add CN host configuration - #7
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
Changes are straightforward, consistent across spec/docs/demos, and the code updates correctly generalize environment handling for the new production-cn option.
Pull request overview
Updates the temi OpenAPI spec, docs, and demo clients to explicitly support both global Production (api.robotemi.com) and China Production (api.robotemi.cn) hosts, so users select the correct production environment for their organization’s region.
Changes:
- Added
Production-CNserver/host references across the OpenAPI spec and repository/demos documentation. - Extended demo environment selection and base URL mappings to include
production-cn. - Updated scenario runner environment handling to initialize environment transport state dynamically from the supported environment list, and expanded CSP
connect-srcto allow the CN API origin.
File summaries
| File | Description |
|---|---|
| temi-partner.openapi.yaml | Adds Production-CN server entry and clarifies production host selection guidance in the API description. |
| README.md | Documents both production OpenAPI base URLs and instructs choosing the host matching org region. |
| demos/temi-openapi-scenario-runner/src/main.ts | Refactors environment transport initialization to support all environments and adds localized labels for production-cn. |
| demos/temi-openapi-scenario-runner/src/api.ts | Adds production-cn to ENVIRONMENTS/base URLs and makes isEnvironment dynamic over the environment list. |
| demos/temi-openapi-scenario-runner/README.md | Updates environment documentation to include Production-CN and reinforces region-matching guidance. |
| demos/temi-openapi-scenario-runner/index.html | Expands CSP connect-src to allow https://api.robotemi.cn. |
| demos/README.md | Updates demo token-handling guidance to mention both production hosts. |
| demos/mvp-frontend-only/README.md | Updates host list and guidance for selecting the correct production region host. |
| demos/mvp-frontend-only/js/config.js | Adds production-cn OpenAPI base URL to the environment config map. |
| demos/mvp-frontend-only/index.html | Adds production-cn option to the environment selector UI. |
| .cursor/rules/demos-pages.mdc | Updates internal rules to include the CN production host and region-matching guidance. |
Review details
- Files reviewed: 11/11 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request updates the documentation, configuration, and client code for the temi OpenAPI demos to support both the global production API (
api.robotemi.com) and the China production API (api.robotemi.cn). It emphasizes using the production host that matches the organization's region and ensures that all relevant files, including code and documentation, reflect the availability of both production environments.Documentation updates:
README.mdfiles and OpenAPI spec (temi-partner.openapi.yaml) to mention bothapi.robotemi.com(Production) andapi.robotemi.cn(Production-CN), instructing users to select the host that matches their organization's region. [1] [2] [3] [4] [5] [6] [7] [8]Frontend and demo code changes:
production-cnenvironment in the environment selectors, API host configuration (ENVIRONMENTS), and CSP headers in both themvp-frontend-onlyandtemi-openapi-scenario-runnerdemos. [1] [2] [3] [4]Scenario runner logic improvements:
production-cn, and updated labels and state initialization logic to handle the new environment. [1] [2] [3] [4]These changes ensure that users and developers can select the correct production environment for their region, improving clarity and correctness when integrating with the temi OpenAPI.