@cydm/pie 4.5.0 → 4.6.0

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.
@@ -13,7 +13,7 @@ function probeWindows(pid, exec) {
13
13
  for (const spec of windowsProbeSpecs(pid)) {
14
14
  let out;
15
15
  try {
16
- out = exec(spec.file, spec.args, { encoding: "utf8", timeout: 3e3, stdio: ["ignore", "pipe", "pipe"] });
16
+ out = exec(spec.file, spec.args, { encoding: "utf8", timeout: 3e3, stdio: ["ignore", "pipe", "pipe"], windowsHide: true });
17
17
  } catch (error) {
18
18
  const code = error.code;
19
19
  if (code === "ENOENT") continue;
@@ -0,0 +1,30 @@
1
+ import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
2
+ import "./chunk-LZQXQOPJ.js";
3
+
4
+ // src/app/host-image-fallback.ts
5
+ import * as os from "node:os";
6
+ async function describeImageViaUnderstandingChain(options) {
7
+ try {
8
+ const { understandReadFile } = await import("./read-file-understanding-FMPXR6EJ.js");
9
+ const ext = options.filePath.toLowerCase().split(".").pop() ?? "";
10
+ const mimeType = ext === "png" ? "image/png" : ext === "gif" ? "image/gif" : ext === "webp" ? "image/webp" : "image/jpeg";
11
+ const result = await understandReadFile(
12
+ {
13
+ configDir: process.env.PIE_CODING_AGENT_DIR || os.homedir() + "/.pie",
14
+ cwd: process.cwd(),
15
+ getAgentModel: options.getAgentModel,
16
+ getSessionId: () => void 0,
17
+ resolveToolModel: (purpose, current) => options.modelRegistry.resolveToolModel(purpose, current),
18
+ resolveToolModelCandidates: (purpose, current) => options.modelRegistry.resolveToolModelCandidates(purpose, current)
19
+ },
20
+ { absolutePath: options.filePath, displayPath: options.displayName, mimeType, kind: "image" }
21
+ );
22
+ if (result.isError) return void 0;
23
+ return result.content.filter((block) => block.type === "text").map((block) => block.text).join("\n").trim() || void 0;
24
+ } catch {
25
+ return void 0;
26
+ }
27
+ }
28
+ export {
29
+ describeImageViaUnderstandingChain
30
+ };