style: use optionalEnv fallback param instead of ?? operator

小橘 🍊
This commit is contained in:
2026-05-15 09:52:07 +00:00
parent 241bfbf6d9
commit 2b8707a706
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -322,7 +322,7 @@ const adapter = createCursorAgent({
// ✅ CORRECT — use \`which cursor-agent\` to find the path, then write it in
const adapter = createCursorAgent({
command: optionalEnv("WORKFLOW_CURSOR_COMMAND") ?? "/home/azureuser/.local/bin/cursor-agent",
command: optionalEnv("WORKFLOW_CURSOR_COMMAND", "/home/you/.local/bin/cursor-agent"),
...
});
\`\`\`
@@ -11,7 +11,7 @@ import { optionalEnv } from "@uncaged/workflow-util";
import { buildDevelopDescriptor, developWorkflowDefinition } from "./src/index.js";
const cursorAdapter = createCursorAgent({
command: optionalEnv("WORKFLOW_CURSOR_COMMAND") ?? "/home/azureuser/.local/bin/cursor-agent",
command: optionalEnv("WORKFLOW_CURSOR_COMMAND", "/home/azureuser/.local/bin/cursor-agent"),
model: optionalEnv("WORKFLOW_CURSOR_MODEL"),
timeout: optionalEnv("WORKFLOW_CURSOR_TIMEOUT")
? Number(optionalEnv("WORKFLOW_CURSOR_TIMEOUT"))
@@ -20,7 +20,7 @@ const cursorAdapter = createCursorAgent({
});
const hermesAdapter = createHermesAgent({
command: optionalEnv("WORKFLOW_HERMES_COMMAND") ?? "/home/azureuser/.local/bin/hermes",
command: optionalEnv("WORKFLOW_HERMES_COMMAND", "/home/azureuser/.local/bin/hermes"),
model: optionalEnv("WORKFLOW_HERMES_MODEL"),
timeout: optionalEnv("WORKFLOW_HERMES_TIMEOUT")
? Number(optionalEnv("WORKFLOW_HERMES_TIMEOUT"))