Skip to content

Commit 18fb57b

Browse files
committed
debug workflow dispatch for dax
1 parent ad41138 commit 18fb57b

2 files changed

Lines changed: 9 additions & 36 deletions

File tree

.github/workflows/compare-models.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@ name: Compare Models
22
on:
33
workflow_dispatch:
44
inputs:
5-
# Codex agent models
65
codex_gpt_5_codex:
76
description: codex:gpt-5-codex
87
type: boolean
98
default: false
10-
# Opencode agent models
119
opencode_opencode_gpt_5_codex:
1210
description: opencode:opencode/gpt-5-codex
1311
type: boolean
@@ -16,7 +14,6 @@ on:
1614
description: opencode:opencode/claude-sonnet-4-5
1715
type: boolean
1816
default: false
19-
__comment_claude-code: Claude-code agent models
2017
claude_code_claude_sonnet_4_5:
2118
description: claude-code:claude-sonnet-4-5
2219
type: boolean

scripts/sync-workflow-inputs.ts

Lines changed: 9 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -56,50 +56,26 @@ async function main(): Promise<void> {
5656
}
5757

5858
// Build new inputs
59-
const newInputs: WorkflowInputs = {};
59+
const inputs: WorkflowInputs = {};
6060

61-
// Group by agent for organization
62-
const byAgent = new Map<string, string[]>();
6361
for (const { agent, model } of combinations) {
64-
if (!byAgent.has(agent)) {
65-
byAgent.set(agent, []);
66-
}
67-
byAgent.get(agent)!.push(model);
68-
}
69-
70-
// Build inputs with comments
71-
const inputsWithComments: any = {};
72-
73-
for (const [agent, models] of byAgent.entries()) {
74-
// Add comment for agent group
75-
const agentKey = `__comment_${agent}`;
76-
inputsWithComments[agentKey] = `${agent.charAt(0).toUpperCase() + agent.slice(1)} agent models`;
77-
78-
for (const model of models) {
79-
const inputId = toInputId(agent, model);
80-
inputsWithComments[inputId] = {
81-
description: toDescription(agent, model),
82-
type: "boolean",
83-
default: false,
84-
};
85-
}
62+
const inputId = toInputId(agent, model);
63+
inputs[inputId] = {
64+
description: toDescription(agent, model),
65+
type: "boolean",
66+
default: false,
67+
};
8668
}
8769

8870
// Update the workflow
89-
workflow.on.workflow_dispatch.inputs = inputsWithComments;
71+
workflow.on.workflow_dispatch.inputs = inputs;
9072

9173
// Convert back to YAML with proper formatting
92-
let yamlOutput = YAML.stringify(workflow, {
74+
const yamlOutput = YAML.stringify(workflow, {
9375
indent: 2,
9476
lineWidth: 0,
9577
});
9678

97-
// Replace comment placeholders with actual YAML comments
98-
yamlOutput = yamlOutput.replace(
99-
/__comment_(\w+):\s*["']?([^"'\n]+)["']?\n/g,
100-
"# $2\n",
101-
);
102-
10379
// Write back to file
10480
writeFileSync(workflowPath, yamlOutput, "utf8");
10581

0 commit comments

Comments
 (0)