fix: route PAT login through pi LoginDialog callbacks

The custom ctx.ui.custom login menu stole focus from pi's built-in
LoginDialog, so onPrompt never received keystrokes and PAT login
silently failed with 'No API key found'. Drive login via the provided
onPrompt/onAuth/onProgress callbacks instead, and drop login-ui.ts and
the now-unused pi-tui dependency. Also clears remaining lint warnings
by removing any-casts in models/oauth/stream/transform.
This commit is contained in:
Simon Shi
2026-06-16 13:39:16 +08:00
parent 842bec6eb2
commit bcaa66091e
10 changed files with 139 additions and 303 deletions
-41
View File
@@ -12,7 +12,6 @@
"@biomejs/biome": "2.4.2",
"@earendil-works/pi-ai": "^0.75.5",
"@earendil-works/pi-coding-agent": "^0.75.5",
"@earendil-works/pi-tui": "^0.75.5",
"esbuild": "^0.25.0",
"typescript": "^5.7.0"
}
@@ -2647,20 +2646,6 @@
"zod": "^3.25.28 || ^4"
}
},
"node_modules/@earendil-works/pi-tui": {
"version": "0.75.5",
"resolved": "https://registry.npmjs.org/@earendil-works/pi-tui/-/pi-tui-0.75.5.tgz",
"integrity": "sha512-LkXUM1/49pvzzeI39Y5wjBMlgafcCf67HCLhB9Z7yuXHy4XgT+VqxWcZVW5hBdhQsHZd0znjJotfGH1BzxMfiA==",
"dev": true,
"license": "MIT",
"dependencies": {
"get-east-asian-width": "1.6.0",
"marked": "15.0.12"
},
"engines": {
"node": ">=22.19.0"
}
},
"node_modules/@esbuild/aix-ppc64": {
"version": "0.25.12",
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.12.tgz",
@@ -3633,19 +3618,6 @@
"node": ">=18"
}
},
"node_modules/get-east-asian-width": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.6.0.tgz",
"integrity": "sha512-QRbvDIbx6YklUe6RxeTeleMR0yv3cYH6PsPZHcnVn7xv7zO1BHN8r0XETu8n6Ye3Q+ahtSarc3WgtNWmehIBfA==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=18"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/google-auth-library": {
"version": "10.7.0",
"resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-10.7.0.tgz",
@@ -3756,19 +3728,6 @@
"dev": true,
"license": "Apache-2.0"
},
"node_modules/marked": {
"version": "15.0.12",
"resolved": "https://registry.npmjs.org/marked/-/marked-15.0.12.tgz",
"integrity": "sha512-8dD6FusOQSrpv9Z1rdNMdlSgQOIP880DHqnohobOmYLElGEqAL/JvxvuxZO16r4HtjTlfPRDC1hbvxC9dPN2nA==",
"dev": true,
"license": "MIT",
"bin": {
"marked": "bin/marked.js"
},
"engines": {
"node": ">= 18"
}
},
"node_modules/ms": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",