pinokiod 3.2.89 → 3.2.91
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/kernel/shell.js +6 -1
- package/package.json +1 -1
package/kernel/shell.js
CHANGED
|
@@ -110,6 +110,7 @@ class Shell {
|
|
|
110
110
|
delete this.env.CUDA_PATH
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
+
this.env.PINOKIO_SHELL_START = Date.now()
|
|
113
114
|
this.env.CMAKE_OBJECT_PATH_MAX = 1024
|
|
114
115
|
this.env.PYTORCH_ENABLE_MPS_FALLBACK = 1
|
|
115
116
|
// this.env.NPM_CONFIG_USERCONFIG = this.kernel.path("user_npmrc")
|
|
@@ -453,8 +454,10 @@ class Shell {
|
|
|
453
454
|
let delimiter
|
|
454
455
|
if (this.platform === "win32") {
|
|
455
456
|
delimiter = " && "; // must use &&. & doesn't necessariliy wait until the curruent command finishes
|
|
457
|
+
params.message.push(`echo "--- pinokio shell.run finished: %PINOKIO_SHELL_START% ---"`)
|
|
456
458
|
} else {
|
|
457
459
|
delimiter = " ; ";
|
|
460
|
+
params.message.push('echo "--- pinokio shell.run finished $PINOKIO_SHELL_START ---"')
|
|
458
461
|
}
|
|
459
462
|
return params.message.filter((m) => {
|
|
460
463
|
return m && !/^\s+$/.test(m)
|
|
@@ -841,9 +844,11 @@ ${cleaned}
|
|
|
841
844
|
// Decide whether to kill or continue
|
|
842
845
|
if (this.ready) {
|
|
843
846
|
// when ready, watch out for the prompt pattern that terminates with [\r\n ]
|
|
844
|
-
let termination_prompt_re = new RegExp(this.prompt_pattern + "[ \r\n]*$", "g")
|
|
847
|
+
//let termination_prompt_re = new RegExp(this.prompt_pattern + "[ \r\n]*$", "g")
|
|
848
|
+
let termination_prompt_re = new RegExp(".*--- pinokio shell.run finished: [0-9]+ ---.*", "g")
|
|
845
849
|
let line = cleaned.replaceAll(/[\r\n]/g, "")
|
|
846
850
|
let test = line.match(termination_prompt_re)
|
|
851
|
+
console.log({ line, test, termination_prompt_re })
|
|
847
852
|
if (test) {
|
|
848
853
|
let cache = cleaned
|
|
849
854
|
let cached_msg = msg
|