auth check: use CheckAutomationEnabled instead of HasAuthentication - #1
Open
Fraser-Isbester wants to merge 2 commits into
Open
auth check: use CheckAutomationEnabled instead of HasAuthentication#1Fraser-Isbester wants to merge 2 commits into
Fraser-Isbester wants to merge 2 commits into
Conversation
auth check was reporting "not configured" even when commands worked fine, because it only checked for ITERM2_COOKIE in the environment. Commands succeed as long as the API is enabled (auth is requested dynamically at connect time), so align auth check with the same logic. Also removes redundant min helper now covered by built-in. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Implements FindSimilarCommands and FormatSuggestions used for "did you mean?" hints on unknown commands. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
auth checkwas reporting "Authentication is not configured" even when commands likesession listworked fineauth checkonly tested forITERM2_COOKIEin the environment (transient, not set in a fresh shell), while commands succeed as long as the iTerm2 API is enabled — auth is requested dynamically via AppleScript at connection timeauth checkwith the sameCheckAutomationEnabled()logic used byclient.Connect()minhelper now covered by the Go built-inTest plan
it2 auth checkreturns "Authentication is configured" when iTerm2 API is enabled (even withoutITERM2_COOKIEset)it2 auth checkreturns "Authentication is not configured" and exits non-zero when API is disabledit2 session listand other commands continue to work as before🤖 Generated with Claude Code