style: use optionalEnv fallback param instead of ?? operator
小橘 🍊
This commit is contained in:
@@ -322,7 +322,7 @@ const adapter = createCursorAgent({
|
|||||||
|
|
||||||
// ✅ CORRECT — use \`which cursor-agent\` to find the path, then write it in
|
// ✅ CORRECT — use \`which cursor-agent\` to find the path, then write it in
|
||||||
const adapter = createCursorAgent({
|
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";
|
import { buildDevelopDescriptor, developWorkflowDefinition } from "./src/index.js";
|
||||||
|
|
||||||
const cursorAdapter = createCursorAgent({
|
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"),
|
model: optionalEnv("WORKFLOW_CURSOR_MODEL"),
|
||||||
timeout: optionalEnv("WORKFLOW_CURSOR_TIMEOUT")
|
timeout: optionalEnv("WORKFLOW_CURSOR_TIMEOUT")
|
||||||
? Number(optionalEnv("WORKFLOW_CURSOR_TIMEOUT"))
|
? Number(optionalEnv("WORKFLOW_CURSOR_TIMEOUT"))
|
||||||
@@ -20,7 +20,7 @@ const cursorAdapter = createCursorAgent({
|
|||||||
});
|
});
|
||||||
|
|
||||||
const hermesAdapter = createHermesAgent({
|
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"),
|
model: optionalEnv("WORKFLOW_HERMES_MODEL"),
|
||||||
timeout: optionalEnv("WORKFLOW_HERMES_TIMEOUT")
|
timeout: optionalEnv("WORKFLOW_HERMES_TIMEOUT")
|
||||||
? Number(optionalEnv("WORKFLOW_HERMES_TIMEOUT"))
|
? Number(optionalEnv("WORKFLOW_HERMES_TIMEOUT"))
|
||||||
|
|||||||
Reference in New Issue
Block a user