pinokiod 6.0.21 → 6.0.23

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "6.0.21",
3
+ "version": "6.0.23",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/server/index.js CHANGED
@@ -8322,8 +8322,11 @@ class Server {
8322
8322
  if (entry.provider === "gemini" && typeof entry.source === "string" && entry.source.length > 0) {
8323
8323
  forkCapable = Boolean(entry.fork_capable)
8324
8324
  if (forkCapable) {
8325
- const geminiForkResumeScript = path.resolve(__dirname, "scripts", "gemini_fork_and_resume.js")
8326
- const cloneAndResume = `node ${JSON.stringify(geminiForkResumeScript)} ${JSON.stringify(entry.source)} ${JSON.stringify(entry.id)}`
8325
+ const geminiForkScript = path.resolve(__dirname, "scripts", "fork_gemini_session.js")
8326
+ const forkSessionCommand = `node ${JSON.stringify(geminiForkScript)} ${JSON.stringify(entry.source)} ${JSON.stringify(entry.id)}`
8327
+ const cloneAndResume = process.platform === "win32"
8328
+ ? `for /f "usebackq delims=" %I in (\`${forkSessionCommand}\`) do ${resumeBaseCommand} --resume "%I"`
8329
+ : `FORK_SESSION_ID=$(${forkSessionCommand}) && ${resumeBaseCommand} --resume "$FORK_SESSION_ID"`
8327
8330
  forkCommand = cloneAndResume
8328
8331
  } else {
8329
8332
  forkCommand = ""
@@ -1,50 +0,0 @@
1
- #!/usr/bin/env node
2
- "use strict";
3
-
4
- const path = require("path");
5
- const { execFileSync, spawn } = require("child_process");
6
-
7
- const sourcePath = process.argv[2];
8
- const expectedSessionId = process.argv[3];
9
-
10
- if (!sourcePath) {
11
- process.exit(1);
12
- }
13
-
14
- const forkScriptPath = path.resolve(__dirname, "fork_gemini_session.js");
15
-
16
- let forkedSessionId = "";
17
- try {
18
- forkedSessionId = execFileSync(
19
- process.execPath,
20
- [forkScriptPath, sourcePath, expectedSessionId || ""],
21
- {
22
- encoding: "utf8",
23
- stdio: ["ignore", "pipe", "inherit"]
24
- }
25
- ).trim();
26
- } catch (error) {
27
- if (typeof error.status === "number") {
28
- process.exit(error.status);
29
- }
30
- process.exit(1);
31
- }
32
-
33
- if (!forkedSessionId) {
34
- process.exit(1);
35
- }
36
-
37
- const npxBinary = process.platform === "win32" ? "npx.cmd" : "npx";
38
- const child = spawn(
39
- npxBinary,
40
- ["-y", "@google/gemini-cli@latest", "--resume", forkedSessionId],
41
- { stdio: "inherit" }
42
- );
43
-
44
- child.on("error", () => {
45
- process.exit(1);
46
- });
47
-
48
- child.on("exit", (code) => {
49
- process.exit(typeof code === "number" ? code : 1);
50
- });