Context-Aware Switching
Chau7 automatically switches profiles based on directory, git branch, and running processes. Rules fire on every directory change.
What is Context-Aware Switching in Chau7?
Context-Aware Switching in Chau7 is a rule engine for automatic profile switching. The ProfileAutoSwitcher is a shared singleton whose evaluateRules() method fires on every directory change from TerminalSessionModel. Each rule maps to a target profile.
Rules are evaluated with the current directory, git branch, and running processes as context. Profile auto-switching rules can be configured in the settings panel.
What rule triggers does Chau7 support?
Chau7's ProfileSwitchRule supports five trigger types: current directory, git branch, SSH host, running process name, and environment variable. Each rule maps to a specific Chau7 profile.
The evaluateRules() method fires on every directory change with the current directory, git branch, and running processes as context. Rules can be created and configured in the settings panel.
Is the auto-switching feature active?
Yes. The ProfileAutoSwitcher is a shared singleton whose evaluateRules() method fires on every directory change from TerminalSessionModel. Rules configured in settings are evaluated automatically with directory, git branch, and running processes as context.
When a rule matches, Chau7 switches to the target profile automatically. This makes each environment visually distinct, reducing the risk of running the wrong command in the wrong context.
Can I configure rules in Chau7 settings?
Yes. Chau7's settings panel lets you create ProfileSwitchRule entries. Each rule specifies a trigger type (directory, git branch, SSH host, process, or environment variable) and a target profile.
Rules are evaluated automatically on every directory change. The ProfileAutoSwitcher singleton uses the current directory, git branch, and running processes as context for rule matching.
Why does Context-Aware Switching matter?
Running a destructive command on the wrong server is one of the most expensive mistakes in operations. Automatic profile switching based on context makes each environment visually distinct, reducing the risk of mistakes.
Chau7's ProfileAutoSwitcher evaluates rules on every directory change, using the current directory, git branch, and running processes as context. When a rule matches, Chau7 switches to the target profile automatically, giving you instant visual feedback about your current environment.
Questions this answers
- What is Context-Aware Switching in Chau7 terminal?
- What rule triggers does Chau7 support?
- Is the auto-switching feature active?
- Can I configure rules in Chau7 settings?
Frequently asked questions
What is Context-Aware Switching in Chau7 terminal?
Context-Aware Switching in Chau7 is a rule engine for automatic profile switching. The ProfileAutoSwitcher evaluates rules on every directory change from TerminalSessionModel, using directory, git branch, and running processes as context. Each rule maps to a specific Chau7 profile.
What rule triggers does Chau7 support?
Chau7's ProfileSwitchRule supports triggers for: current directory, git branch, SSH host, running process name, and environment variable. The evaluateRules() method fires on every directory change with the current directory, git branch, and running processes as context.
Is the auto-switching feature active?
Yes. The ProfileAutoSwitcher is a shared singleton whose evaluateRules() method fires on every directory change from TerminalSessionModel. Rules configured in settings are evaluated automatically with directory, git branch, and running processes as context.
Can I configure rules in Chau7 settings?
Yes. Chau7's settings panel lets you create ProfileSwitchRule entries with triggers for directory, git branch, SSH host, running process, and environment variable. Each rule maps to a target profile and is evaluated automatically on every directory change.