Repository navigation
fix: report no auth modes for credential-free TextTarget - #3777
Open
alexcastgonz (pcbeingused333) wants to merge 1 commit into
Open
alexcastgonz (pcbeingused333) wants to merge 1 commit into
alexcastgonz (pcbeingused333) wants to merge 1 commit into
Conversation
TextTarget writes to a local stream and never contacts a service, but it inherited the default supported_auth_modes of (api_key,), so the target picker described it as 'Supported authentication: API key'. Declare an empty tuple and have the dialog say 'No authentication required' when the registry reports no auth modes.
This branch has not been deployed
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.
Fixes #3712
Description
TextTargetwrites prompts to a local text stream and never contacts a service, but it inherited the defaultsupported_auth_modesof("api_key",), so New Target described it as "Supported authentication: API key".TextTargetdeclaressupported_auth_modes = (), so the registry metadata and/targets/typessay it takes no credentials.CreateTargetDialogshows "No authentication required" when the registry metadata is loaded and a target reports an empty mode list. The built-in fallback entries (used when the registry is unavailable) also carry[], so they keep showing nothing rather than a claim the dialog can't back.Tests and Documentation
tests/unit/registry/test_target_registry.pyandtests/unit/backend/test_target_service.pyassert the empty list forTextTarget(2 fail onmain, pass with the change); the existing api-key-only assertion now usesGitHubCopilotTarget.CreateTargetDialog.test.tsx: new test for the "No authentication required" text (fails onmain); the target-list test gets the extraTextTargetentry.This change was prepared with an AI coding assistant (Claude Code) and submitted by Alex Castillo González.