pinokiod 6.0.85 → 6.0.88
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/bin/cli.js +1 -1
- package/package.json +1 -1
- package/server/index.js +37 -0
- package/server/views/shell.ejs +3 -0
- package/server/views/terminals.ejs +8 -8
package/kernel/bin/cli.js
CHANGED
package/package.json
CHANGED
package/server/index.js
CHANGED
|
@@ -7734,6 +7734,23 @@ class Server {
|
|
|
7734
7734
|
if (typeof startCommand !== "string" || startCommand.trim().length === 0) {
|
|
7735
7735
|
failStart(500, `No start command configured for ${provider.label || provider.key || "provider"}.`)
|
|
7736
7736
|
}
|
|
7737
|
+
const managedLaunchOverrides = {
|
|
7738
|
+
shell: null,
|
|
7739
|
+
env: {}
|
|
7740
|
+
}
|
|
7741
|
+
const isWindowsPlatform = (this.kernel && typeof this.kernel.platform === "string"
|
|
7742
|
+
? this.kernel.platform
|
|
7743
|
+
: process.platform) === "win32"
|
|
7744
|
+
if (isWindowsPlatform && (provider.key === "codex" || provider.key === "claude")) {
|
|
7745
|
+
const gitBashPath = this.kernel.path("bin/miniconda/Library/bin/bash.exe")
|
|
7746
|
+
const bashExists = await fs.promises.access(gitBashPath, fs.constants.F_OK).then(() => true).catch(() => false)
|
|
7747
|
+
if (bashExists) {
|
|
7748
|
+
managedLaunchOverrides.shell = gitBashPath
|
|
7749
|
+
if (provider.key === "claude") {
|
|
7750
|
+
managedLaunchOverrides.env.CLAUDE_CODE_GIT_BASH_PATH = gitBashPath
|
|
7751
|
+
}
|
|
7752
|
+
}
|
|
7753
|
+
}
|
|
7737
7754
|
const now = new Date()
|
|
7738
7755
|
const pad = (value) => String(value).padStart(2, "0")
|
|
7739
7756
|
const timestamp = `${now.getFullYear()}${pad(now.getMonth() + 1)}${pad(now.getDate())}-${pad(now.getHours())}${pad(now.getMinutes())}${pad(now.getSeconds())}`
|
|
@@ -7920,6 +7937,17 @@ class Server {
|
|
|
7920
7937
|
params.set("terminal_id", terminalId)
|
|
7921
7938
|
params.set("message", startCommand)
|
|
7922
7939
|
params.set("input", "1")
|
|
7940
|
+
if (managedLaunchOverrides.shell) {
|
|
7941
|
+
params.set("shell", managedLaunchOverrides.shell)
|
|
7942
|
+
}
|
|
7943
|
+
const managedLaunchEnvEntries = Object.entries(managedLaunchOverrides.env)
|
|
7944
|
+
for (let i = 0; i < managedLaunchEnvEntries.length; i++) {
|
|
7945
|
+
const [key, value] = managedLaunchEnvEntries[i]
|
|
7946
|
+
if (typeof key !== "string" || typeof value !== "string" || !key || !value) {
|
|
7947
|
+
continue
|
|
7948
|
+
}
|
|
7949
|
+
params.set(`env.${key}`, value)
|
|
7950
|
+
}
|
|
7923
7951
|
const safeWorkspaceName = workspaceFolderName && workspaceFolderName.trim().length > 0
|
|
7924
7952
|
? workspaceFolderName.replace(/[^A-Za-z0-9._-]+/g, "-")
|
|
7925
7953
|
: "workspace"
|
|
@@ -8993,6 +9021,14 @@ class Server {
|
|
|
8993
9021
|
}
|
|
8994
9022
|
//let message = req.query.message ? req.query.message : null
|
|
8995
9023
|
let venv = req.query.venv ? decodeURIComponent(req.query.venv) : null
|
|
9024
|
+
let launchShell = null
|
|
9025
|
+
if (typeof req.query.shell === "string" && req.query.shell.length > 0) {
|
|
9026
|
+
try {
|
|
9027
|
+
launchShell = decodeURIComponent(req.query.shell)
|
|
9028
|
+
} catch (error) {
|
|
9029
|
+
launchShell = req.query.shell
|
|
9030
|
+
}
|
|
9031
|
+
}
|
|
8996
9032
|
let input = req.query.input ? true : false
|
|
8997
9033
|
let callback = req.query.callback ? decodeURIComponent(req.query.callback) : null
|
|
8998
9034
|
let callback_target = req.query.callback_target ? decodeURIComponent(req.query.callback_target) : null
|
|
@@ -9037,6 +9073,7 @@ class Server {
|
|
|
9037
9073
|
message,
|
|
9038
9074
|
restart_message: restartMessage,
|
|
9039
9075
|
venv,
|
|
9076
|
+
launch_shell: launchShell,
|
|
9040
9077
|
conda: (conda_exists ? conda: null),
|
|
9041
9078
|
env,
|
|
9042
9079
|
// pattern,
|
package/server/views/shell.ejs
CHANGED
|
@@ -568,6 +568,9 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
568
568
|
<% if (venv) { %>
|
|
569
569
|
venv: "<%-JSON.stringify(venv).slice(1, -1)%>",
|
|
570
570
|
<% } %>
|
|
571
|
+
<% if (launch_shell) { %>
|
|
572
|
+
shell: "<%-JSON.stringify(launch_shell).slice(1, -1)%>",
|
|
573
|
+
<% } %>
|
|
571
574
|
<% if (kill) { %>
|
|
572
575
|
on: [{
|
|
573
576
|
event: "<%=kill%>",
|
|
@@ -9415,16 +9415,16 @@ body.dark .swal2-popup.pinokio-diff-modal .pinokio-modal-footer--commit .pinokio
|
|
|
9415
9415
|
</div>
|
|
9416
9416
|
</header>` : ""}
|
|
9417
9417
|
<div class="terminals-chooser-content">
|
|
9418
|
+
<section class="terminals-workspaces-header" aria-label="Agent workspaces intro">
|
|
9419
|
+
<div class="terminals-workspace-header-actions terminals-workspaces-header-actions" data-workspaces-header-actions></div>
|
|
9420
|
+
</section>
|
|
9421
|
+
<section class="terminals-workspace-sessions-header hidden" aria-label="Workspace sessions intro">
|
|
9422
|
+
<div class="terminals-list-intro-breadcrumb terminals-workspace-header-breadcrumb" data-workspace-header-breadcrumb aria-label="Workspace breadcrumb"></div>
|
|
9423
|
+
<p data-workspace-header-path></p>
|
|
9424
|
+
<div class="terminals-workspace-header-actions" data-workspace-header-actions></div>
|
|
9425
|
+
</section>
|
|
9418
9426
|
<div class="terminals-empty" data-state="loading" aria-live="polite"></div>
|
|
9419
9427
|
<div class="terminals-list-wrap">
|
|
9420
|
-
<section class="terminals-workspaces-header" aria-label="Agent workspaces intro">
|
|
9421
|
-
<div class="terminals-workspace-header-actions terminals-workspaces-header-actions" data-workspaces-header-actions></div>
|
|
9422
|
-
</section>
|
|
9423
|
-
<section class="terminals-workspace-sessions-header hidden" aria-label="Workspace sessions intro">
|
|
9424
|
-
<div class="terminals-list-intro-breadcrumb terminals-workspace-header-breadcrumb" data-workspace-header-breadcrumb aria-label="Workspace breadcrumb"></div>
|
|
9425
|
-
<p data-workspace-header-path></p>
|
|
9426
|
-
<div class="terminals-workspace-header-actions" data-workspace-header-actions></div>
|
|
9427
|
-
</section>
|
|
9428
9428
|
<div class="terminals-list"></div>
|
|
9429
9429
|
</div>
|
|
9430
9430
|
</div>
|