@thegitai/cli 1.0.0-beta.12 → 1.0.0-beta.13
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/src/ui/repl.js
CHANGED
|
@@ -997,7 +997,12 @@ export function getInputCommandToken(input) {
|
|
|
997
997
|
if (!trimmed.startsWith('/'))
|
|
998
998
|
return '';
|
|
999
999
|
const firstSpaceIndex = trimmed.indexOf(' ');
|
|
1000
|
-
|
|
1000
|
+
const token = firstSpaceIndex === -1 ? trimmed : trimmed.slice(0, firstSpaceIndex);
|
|
1001
|
+
// A token with a second '/' is a filesystem path (e.g. /home/user/repo),
|
|
1002
|
+
// not a slash command — no command contains a slash, so don't treat it as one.
|
|
1003
|
+
if (token.indexOf('/', 1) !== -1)
|
|
1004
|
+
return '';
|
|
1005
|
+
return token;
|
|
1001
1006
|
}
|
|
1002
1007
|
function shouldShowCommandPalette(state) {
|
|
1003
1008
|
const trimmed = String(state.input ?? '').trim();
|
|
@@ -1006,7 +1011,11 @@ function shouldShowCommandPalette(state) {
|
|
|
1006
1011
|
!state.modelPickerOpen &&
|
|
1007
1012
|
!state.resumePickerOpen &&
|
|
1008
1013
|
trimmed.startsWith('/') &&
|
|
1009
|
-
!trimmed.includes(' ')
|
|
1014
|
+
!trimmed.includes(' ') &&
|
|
1015
|
+
// A '/'-prefixed token with a second '/' is a filesystem path, not a
|
|
1016
|
+
// command — getInputCommandToken returns '' for it, so the palette stays
|
|
1017
|
+
// closed when a folder path is pasted.
|
|
1018
|
+
getInputCommandToken(trimmed) !== '');
|
|
1010
1019
|
}
|
|
1011
1020
|
export function shouldRemountLiveFrameForComposerInputChange(current, nextInput) {
|
|
1012
1021
|
const currentShowsCommands = shouldShowCommandPalette(current);
|
|
@@ -177,7 +177,12 @@ function buildModelPickerOptions(currentModelId, serverModels) {
|
|
|
177
177
|
function getInputCommandToken(input) {
|
|
178
178
|
const trimmed = String(input ?? '').trimStart();
|
|
179
179
|
const match = trimmed.match(/^\/[^\s]*/);
|
|
180
|
-
|
|
180
|
+
const token = match?.[0] ?? '';
|
|
181
|
+
// A token with a second '/' is a filesystem path (e.g. /home/user/repo),
|
|
182
|
+
// not a slash command — no command contains a slash, so don't treat it as one.
|
|
183
|
+
if (token.indexOf('/', 1) !== -1)
|
|
184
|
+
return '';
|
|
185
|
+
return token;
|
|
181
186
|
}
|
|
182
187
|
function scoreSlashCommand(option, token) {
|
|
183
188
|
if (option.command === token)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thegitai/cli",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.13",
|
|
4
4
|
"description": "TheGitAI CLI client (source-visible, proprietary)",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"homepage": "https://thegit.ai",
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
"@lydell/node-pty-linux-x64": "1.1.0",
|
|
26
26
|
"@lydell/node-pty-win32-arm64": "1.1.0",
|
|
27
27
|
"@lydell/node-pty-win32-x64": "1.1.0",
|
|
28
|
-
"@thegitai/tui-darwin-arm64": "1.0.0-beta.
|
|
29
|
-
"@thegitai/tui-darwin-x64": "1.0.0-beta.
|
|
30
|
-
"@thegitai/tui-linux-x64": "1.0.0-beta.
|
|
31
|
-
"@thegitai/tui-win32-x64": "1.0.0-beta.
|
|
28
|
+
"@thegitai/tui-darwin-arm64": "1.0.0-beta.13",
|
|
29
|
+
"@thegitai/tui-darwin-x64": "1.0.0-beta.13",
|
|
30
|
+
"@thegitai/tui-linux-x64": "1.0.0-beta.13",
|
|
31
|
+
"@thegitai/tui-win32-x64": "1.0.0-beta.13",
|
|
32
32
|
"@vscode/ripgrep": "1.18.0"
|
|
33
33
|
},
|
|
34
34
|
"publishConfig": {
|