chore: Fix quit exit alias and compact prompt spacing#104
Merged
F16shen merged 1 commit intoAI-Shell-Team:mainfrom Apr 14, 2026
Merged
Conversation
Add a dedicated shell-exit alias set so runtime exit detection and tool-context rejection stay aligned around exit and quit, while explicitly dropping logout from the interactive shell exit path. Normalize user-entered quit commands to the backend exit builtin before they are sent through the PTY layer. This preserves existing bash exit behavior, keeps quit 7 semantics intact, and avoids treating quit as an external command. Update prompt echo filtering to use the command actually sent to the backend so the __AISH_ACTIVE_COMMAND_SEQ/__AISH_ACTIVE_COMMAND_TEXT prefix is fully suppressed when quit is translated to exit. Remove the unintended leading space from the compact script prompt mode label so scripted prompt rendering no longer shows a blank before the mode badge when scripts are enabled. Tests added and updated: - cover quit echo filtering and explicit quit PTY shutdown behavior - verify quit is normalized to exit for backend submission, including exit-code arguments - verify tool-context rejection messaging for quit and confirm logout is no longer treated as a shell-exit alias - verify the compact theme no longer renders a leading space Validation: /home/lixin/workspace/aishell/aish/.venv/bin/python -m pytest tests/shell/runtime/test_shell_pty_core.py tests/shell/commands/test_builtin_registry.py tests/shell/ui/test_shell_editor.py
Contributor
|
Thanks for the pull request. A maintainer will review it when available. Please keep the PR focused, explain the why in the description, and make sure local checks pass before requesting review. Contribution guide: https://github.com/AI-Shell-Team/aish/blob/main/CONTRIBUTING.md |
Contributor
|
This pull request description looks incomplete. Please update the missing sections below before review. Missing items:
|
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.
Summary
1.新增quit命令退出
2.修改自定义脚本模式字符串前有冗余空格的问题