@thegitai/cli 1.0.0-preview.27 → 1.0.0-preview.28
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/README.md +1 -1
- package/dist/src/api/browser-login.js +2 -2
- package/dist/src/help-text.js +2 -2
- package/dist/src/signin.js +5 -3
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -37,7 +37,7 @@ also be listed while signed out or offline.
|
|
|
37
37
|
Signing in opens your browser. The same screen also prints a URL you can open on
|
|
38
38
|
any other device and a box for an authorization code, so SSH and headless
|
|
39
39
|
machines need no separate command: open the URL wherever you have a browser,
|
|
40
|
-
choose "
|
|
40
|
+
choose "On another computer" on that page, and paste the code it shows.
|
|
41
41
|
|
|
42
42
|
CLI login tokens use a rolling 48-hour inactivity timeout. If one expires during
|
|
43
43
|
any server request, the CLI removes the expired credential and signs you in
|
|
@@ -6,7 +6,7 @@ import os from 'node:os';
|
|
|
6
6
|
import { openUrl } from '../core/open-url.js';
|
|
7
7
|
import { ServerApiError, createTraceContext, failureCode, failureMessage, normalizeServerUrl, readJsonResponse, } from './http.js';
|
|
8
8
|
import { DEFAULT_THEGITAI_HOST } from './default-host.js';
|
|
9
|
-
const DEFAULT_TIMEOUT_MS =
|
|
9
|
+
const DEFAULT_TIMEOUT_MS = 10 * 60 * 1000;
|
|
10
10
|
function shutDownServer(server) {
|
|
11
11
|
server.closeAllConnections?.();
|
|
12
12
|
server.close();
|
|
@@ -179,7 +179,7 @@ export async function loginViaBrowser(options) {
|
|
|
179
179
|
const codePromise = new Promise((resolve, reject) => {
|
|
180
180
|
timer = setTimeout(() => {
|
|
181
181
|
shutDownServer(server);
|
|
182
|
-
reject(new Error('
|
|
182
|
+
reject(new Error('Sign-in timed out. Authorization codes last 10 minutes — run `ai` again to start over.'));
|
|
183
183
|
}, options.timeoutMs ?? DEFAULT_TIMEOUT_MS);
|
|
184
184
|
server.on('request', (req, res) => {
|
|
185
185
|
const requestUrl = new URL(req.url ?? '/', 'http://127.0.0.1');
|
package/dist/src/help-text.js
CHANGED
|
@@ -142,8 +142,8 @@ const HELP_MARKDOWN = [
|
|
|
142
142
|
'- Signed in with the wrong account → `/logout` (or `ai logout`), then run',
|
|
143
143
|
' `ai` and sign in as the account you intended to use.',
|
|
144
144
|
'- The browser did not open, or opened on the wrong machine → open the URL',
|
|
145
|
-
|
|
146
|
-
'
|
|
145
|
+
' printed on the sign-in screen anywhere you like, choose "On another',
|
|
146
|
+
' computer" on that page, and paste the code back into the terminal.',
|
|
147
147
|
'- A local session was used with a different sign-in → sign in with the',
|
|
148
148
|
' account you used for that session or start a new session.',
|
|
149
149
|
'- For anything else, re-run the command and report the printed error',
|
package/dist/src/signin.js
CHANGED
|
@@ -21,8 +21,8 @@ export function formatSignInScreen({ url }) {
|
|
|
21
21
|
'',
|
|
22
22
|
` ${hyperlink(url, chalk.cyan('→ Click here to authenticate'))}`,
|
|
23
23
|
'',
|
|
24
|
-
|
|
25
|
-
chalk.
|
|
24
|
+
' If this terminal is not on the computer where that page opened, choose',
|
|
25
|
+
` ${chalk.bold('"On another computer"')} there and paste the code it gives you below.`,
|
|
26
26
|
'',
|
|
27
27
|
].join('\n');
|
|
28
28
|
}
|
|
@@ -46,7 +46,9 @@ export async function runSignIn({ env = process.env, login = loginViaBrowser, wr
|
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
48
|
promptCode: promptForCode,
|
|
49
|
-
onPasteRejected: (message) => log(chalk.red(
|
|
49
|
+
onPasteRejected: (message) => log(` ${chalk.red('✖')} ${message}\n` +
|
|
50
|
+
' Codes last 10 minutes. If that page has been open a while, run `ai`\n' +
|
|
51
|
+
' again for a fresh one.'),
|
|
50
52
|
});
|
|
51
53
|
write(result, env);
|
|
52
54
|
log('');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thegitai/cli",
|
|
3
|
-
"version": "1.0.0-preview.
|
|
3
|
+
"version": "1.0.0-preview.28",
|
|
4
4
|
"description": "TheGitAI is an AI coding agent for your terminal. It indexes your repository, writes and edits files, runs commands, and builds features with you.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
"@lydell/node-pty-linux-x64": "1.1.0",
|
|
38
38
|
"@lydell/node-pty-win32-arm64": "1.1.0",
|
|
39
39
|
"@lydell/node-pty-win32-x64": "1.1.0",
|
|
40
|
-
"@thegitai/tui-darwin-arm64": "1.0.0-preview.
|
|
41
|
-
"@thegitai/tui-darwin-x64": "1.0.0-preview.
|
|
42
|
-
"@thegitai/tui-linux-x64": "1.0.0-preview.
|
|
43
|
-
"@thegitai/tui-win32-x64": "1.0.0-preview.
|
|
40
|
+
"@thegitai/tui-darwin-arm64": "1.0.0-preview.28",
|
|
41
|
+
"@thegitai/tui-darwin-x64": "1.0.0-preview.28",
|
|
42
|
+
"@thegitai/tui-linux-x64": "1.0.0-preview.28",
|
|
43
|
+
"@thegitai/tui-win32-x64": "1.0.0-preview.28",
|
|
44
44
|
"@vscode/ripgrep": "1.18.0"
|
|
45
45
|
},
|
|
46
46
|
"publishConfig": {
|