@tencent-adp/portal-cli 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/acp/agent.js +1 -1
- package/dist/auth/login.js +4 -1
- package/package.json +1 -1
package/dist/acp/agent.js
CHANGED
|
@@ -10,7 +10,7 @@ import { runAcpTurn } from './turn.js';
|
|
|
10
10
|
export function portalInitialize(needsLogin = false) {
|
|
11
11
|
return {
|
|
12
12
|
protocolVersion: PROTOCOL_VERSION,
|
|
13
|
-
agentInfo: { name: 'portal', title: 'Portal', version: '0.0.
|
|
13
|
+
agentInfo: { name: 'portal', title: 'Portal', version: '0.0.4' },
|
|
14
14
|
agentCapabilities: {
|
|
15
15
|
loadSession: true,
|
|
16
16
|
sessionCapabilities: { list: {} },
|
package/dist/auth/login.js
CHANGED
|
@@ -59,12 +59,15 @@ async function login(saved, showUrl) {
|
|
|
59
59
|
});
|
|
60
60
|
console.error('请在浏览器打开这个地址,登录 Portal,并选择要授权的空间。');
|
|
61
61
|
console.error(url);
|
|
62
|
-
openBrowser(url);
|
|
63
62
|
if (showUrl) {
|
|
63
|
+
// Zed shows its own Open button. Opening the browser here races that prompt.
|
|
64
64
|
void Promise.resolve(showUrl(url)).catch((error) => {
|
|
65
65
|
console.error(errorText(error));
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
|
+
else {
|
|
69
|
+
openBrowser(url);
|
|
70
|
+
}
|
|
68
71
|
const code = await withTimeout(callback.code, 5 * 60 * 1000);
|
|
69
72
|
const tokens = await exchangeCode({
|
|
70
73
|
tokenEndpoint: endpoints.tokenEndpoint,
|