diff --git a/autoload/hanzo.vim b/autoload/hanzo.vim index 42ad046..622b9b4 100644 --- a/autoload/hanzo.vim +++ b/autoload/hanzo.vim @@ -727,20 +727,22 @@ function! hanzo#Login(...) abort if empty(l:vendor) let l:choice = inputlist([ - \ 'Select AI login:', - \ '1) Claude (Anthropic API key)', + \ 'Select AI login (Enter = Hanzo ID):', + \ '1) Hanzo ID (hanzo.id OAuth, device-code) [default]', \ '2) ChatGPT (OpenAI OAuth, device-code)', - \ '3) Hanzo (hanzo.id OAuth, device-code)', + \ '3) Claude (Anthropic API key)', \ '4) API key (active provider)', + \ '5) Cancel', \]) echo "\n" - if l:choice == 1 - let l:vendor = 'claude' + if l:choice == 0 || l:choice == 1 + " Enter / no selection defaults to Hanzo ID. + let l:vendor = 'hanzo' elseif l:choice == 2 let l:vendor = 'chatgpt' elseif l:choice == 3 - let l:vendor = 'hanzo' + let l:vendor = 'claude' elseif l:choice == 4 let l:vendor = 'apikey' else diff --git a/doc/hanzo.txt b/doc/hanzo.txt index e997f8a..1c05dae 100644 --- a/doc/hanzo.txt +++ b/doc/hanzo.txt @@ -17,7 +17,7 @@ CONTENTS *hanzo-contents* 1. AI Login *hanzo-ailogin* `:AILogin` is a unified, multi-vendor login. It is NOT vendor-locked: you can -log in with Claude, ChatGPT, or Hanzo, or just paste an API key. +log in with Hanzo ID, ChatGPT, or Claude, or just paste an API key. It does NOT reimplement OAuth. The OAuth/device-code flows are delegated to the already-installed `dev` CLI (Hanzo Dev), and the AI provider reads the SAME @@ -29,8 +29,8 @@ authenticated. `:AILogin` [{vendor}] *:AILogin* - With no argument, shows a menu: - 1) Claude 2) ChatGPT 3) Hanzo 4) API key + With no argument, shows a menu (Enter defaults to Hanzo ID): + 1) Hanzo ID 2) ChatGPT 3) Claude 4) API key 5) Cancel With an argument, logs in directly. {vendor} is one of: claude | chatgpt | hanzo | apikey