@theia/ai-terminal 1.71.0-next.32 → 1.71.0-next.36
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shell-execution-input-parser.d.ts","sourceRoot":"","sources":["../../src/common/shell-execution-input-parser.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shell-execution-input-parser.d.ts","sourceRoot":"","sources":["../../src/common/shell-execution-input-parser.ts"],"names":[],"mappings":"AAkBA,MAAM,WAAW,mBAAmB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,mBAAmB,CAUtF"}
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
// *****************************************************************************
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.parseShellExecutionInput = parseShellExecutionInput;
|
|
19
|
+
const toolcall_utils_1 = require("@theia/ai-chat-ui/lib/common/toolcall-utils");
|
|
19
20
|
/**
|
|
20
21
|
* Parses shell execution input from potentially incomplete JSON.
|
|
21
22
|
* During streaming, extracts partial command value via regex when JSON.parse fails.
|
|
@@ -28,9 +29,7 @@ function parseShellExecutionInput(args) {
|
|
|
28
29
|
return JSON.parse(args);
|
|
29
30
|
}
|
|
30
31
|
catch {
|
|
31
|
-
|
|
32
|
-
const match = /"command"\s*:\s*"([^"]*)"?/.exec(args);
|
|
33
|
-
return { command: match?.[1] ?? '' };
|
|
32
|
+
return { command: (0, toolcall_utils_1.extractJsonStringField)(args, 'command') ?? '' };
|
|
34
33
|
}
|
|
35
34
|
}
|
|
36
35
|
//# sourceMappingURL=shell-execution-input-parser.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shell-execution-input-parser.js","sourceRoot":"","sources":["../../src/common/shell-execution-input-parser.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;
|
|
1
|
+
{"version":3,"file":"shell-execution-input-parser.js","sourceRoot":"","sources":["../../src/common/shell-execution-input-parser.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;AAchF,4DAUC;AAtBD,gFAAqF;AAQrF;;;GAGG;AACH,SAAgB,wBAAwB,CAAC,IAAwB;IAC7D,IAAI,CAAC,IAAI,EAAE,CAAC;QACR,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IAC3B,CAAC;IAED,IAAI,CAAC;QACD,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;IAAC,MAAM,CAAC;QACL,OAAO,EAAE,OAAO,EAAE,IAAA,uCAAsB,EAAC,IAAI,EAAE,SAAS,CAAC,IAAI,EAAE,EAAE,CAAC;IACtE,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/ai-terminal",
|
|
3
|
-
"version": "1.71.0-next.
|
|
3
|
+
"version": "1.71.0-next.36+d93a0bb1a",
|
|
4
4
|
"description": "Theia - AI Terminal Extension",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@theia/ai-chat": "1.71.0-next.
|
|
7
|
-
"@theia/ai-chat-ui": "1.71.0-next.
|
|
8
|
-
"@theia/ai-core": "1.71.0-next.
|
|
9
|
-
"@theia/core": "1.71.0-next.
|
|
10
|
-
"@theia/terminal": "1.71.0-next.
|
|
11
|
-
"@theia/workspace": "1.71.0-next.
|
|
6
|
+
"@theia/ai-chat": "1.71.0-next.36+d93a0bb1a",
|
|
7
|
+
"@theia/ai-chat-ui": "1.71.0-next.36+d93a0bb1a",
|
|
8
|
+
"@theia/ai-core": "1.71.0-next.36+d93a0bb1a",
|
|
9
|
+
"@theia/core": "1.71.0-next.36+d93a0bb1a",
|
|
10
|
+
"@theia/terminal": "1.71.0-next.36+d93a0bb1a",
|
|
11
|
+
"@theia/workspace": "1.71.0-next.36+d93a0bb1a",
|
|
12
12
|
"zod": "^4.3.6"
|
|
13
13
|
},
|
|
14
14
|
"publishConfig": {
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"nyc": {
|
|
51
51
|
"extends": "../../configs/nyc.json"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "d93a0bb1abcecbe4da7d25a0250918080375bd7d"
|
|
54
54
|
}
|
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
|
+
import { extractJsonStringField } from '@theia/ai-chat-ui/lib/common/toolcall-utils';
|
|
18
|
+
|
|
17
19
|
export interface ShellExecutionInput {
|
|
18
20
|
command: string;
|
|
19
21
|
cwd?: string;
|
|
@@ -32,8 +34,6 @@ export function parseShellExecutionInput(args: string | undefined): ShellExecuti
|
|
|
32
34
|
try {
|
|
33
35
|
return JSON.parse(args);
|
|
34
36
|
} catch {
|
|
35
|
-
|
|
36
|
-
const match = /"command"\s*:\s*"([^"]*)"?/.exec(args);
|
|
37
|
-
return { command: match?.[1] ?? '' };
|
|
37
|
+
return { command: extractJsonStringField(args, 'command') ?? '' };
|
|
38
38
|
}
|
|
39
39
|
}
|