Send X-CS-CLI header and allow selection for Response mode via search-list#170
Send X-CS-CLI header and allow selection for Response mode via search-list#170chhavi-mandowara-cstk wants to merge 11 commits into
Conversation
fix: send populated X-CS-CLI header from launch commands at runtime
feat: prompt for streaming/buffered response mode via text input
Send X-CS-CLI header and Enhance prompt for Response mode
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
There was a problem hiding this comment.
Pull request overview
This PR improves runtime analytics/header propagation for Launch commands by reconstructing the X-CS-CLI value when context.analyticsInfo is unavailable, and updates the interactive flow to choose streaming vs buffered response mode via text input.
Changes:
- Add
getAnalyticsInfo()helper to reconstructX-CS-CLIand use it inBaseCommandand Launch adapter construction. - Replace the streaming confirm prompt with an input-based “Response Mode” prompt (GitHub + FileUpload adapters), and expand unit tests for mapping/validation.
- Bump package version to
1.10.1(and update lockfile/talisman checksum).
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/unit/util/common-utility.test.ts | Adds Mocha/Chai/Sinon unit tests for getAnalyticsInfo() reconstruction behavior. |
| src/util/common-utility.ts | Introduces getAnalyticsInfo() to rebuild X-CS-CLI from oclif config + config store values. |
| src/commands/launch/index.ts | Passes reconstructed analytics info into adapter/precheck inputs. |
| src/base-command.ts | Ensures GraphQL headers and CMA SDK init receive a populated X-CS-CLI value at runtime. |
| src/adapters/github.ts | Switches response-mode prompting to a validated text input and normalizes values. |
| src/adapters/github.test.ts | Updates tests to match the new response-mode input prompt and adds mapping/validation tests. |
| src/adapters/file-upload.ts | Mirrors the GitHub adapter response-mode input prompt behavior. |
| src/adapters/file-upload.test.ts | Updates tests to match the new prompt and adds mapping/validation tests. |
| package.json | Version bump to 1.10.1. |
| package-lock.json | Updates resolved dependency versions and lockfile metadata. |
| .talismanrc | Updates checksum for the modified lockfile. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
feat: use inquirer select prompt for response mode instead of text input
Use inquirer prompt to select response mode
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
feat: use search-list prompt for response mode instead of list
Enhance prompt by using search-list for Response Mode
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
fix: send populated X-CS-CLI header from launch commands at runtime
feat: prompt for streaming/buffered response mode via text input
feat: use inquirer select prompt for response mode instead of text input[
feat: use inquirer select prompt for response mode instead of text input