fix(cosh): clarify cosh-switch post-switch guidance#1424
Open
samchu-zsl wants to merge 1 commit into
Open
Conversation
After yum swap succeeds, the current session still runs the old mode and cannot hot-switch, but the raw yum "Complete!" output left users unsure whether the switch worked. Emit bilingual (zh/en) guidance naming the target package and instructing the user to reopen the shell and run cosh. Applied to both /usr/bin/cosh-switch and the /cosh-switch slash command. Closes alibaba#1352 Assisted-by: Qoder Signed-off-by: shenglongzhu <samchu.zsl@alibaba-inc.com>
Collaborator
Author
|
Caution This PR was generated and submitted by AI. |
Collaborator
Author
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.

Description
After
/cosh-switch(orcosh-switchin bash) runs a successfulyum swap, the only feedback was yum's rawComplete!output, leaving users unsure whether the switch worked — the current session still runs the old mode because a live shell process cannot hot-switch. This adds clear, bilingual (zh/en) post-switch guidance that names the target package and instructs the user to reopen the shell (or reconnect the session) and runcoshto enter the new mode. The message is applied consistently to both the standalone/usr/bin/cosh-switchscript and the/cosh-switchslash command, with language selected from$LANG.Related Issue
closes #1352
Type of Change
Scope
cosh(copilot-shell)Checklist
cosh: Lint passes, type check passes, and tests passpackage-lock.json/Cargo.lock)Testing
The change is confined to the RPM packaging shell script in
copilot-shell.spec.in; there is no TypeScript code path, so vitest cannot cover it. Verified via:The
yum swapstep itself requires a live RPM environment and root, so it cannot be exercised in CI/unit tests.Additional Notes
Issue #1352 is labeled
component:coshbut is framed as an enhancement rather than a Bug; implemented per user request. The two switch script definitions in the spec remain duplicated (pre-existing); this PR keeps them in sync rather than refactoring.