Skip to content

Commit e7a80b4

Browse files
committed
fix: merge context into fullInput in runEncodeAction to match runGateAction pattern
The context parameter was accepted but never used in runEncodeAction, silently discarding supplementary context provided by callers. This restores the fullInput merging pattern used by runGateAction so that context is included in type detection, artifact parsing, and quality scoring.
1 parent 121dd07 commit e7a80b4

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

workers/src/orchestrate.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1415,12 +1415,13 @@ async function runEncodeAction(
14151415
state?: OddkitState,
14161416
): Promise<ActionResult> {
14171417
const startMs = Date.now();
1418+
const fullInput = context ? `${input}\n${context}` : input;
14181419

14191420
const types = await discoverEncodingTypes(fetcher, canonUrl);
1420-
const structured = isStructuredInput(input);
1421+
const structured = isStructuredInput(fullInput);
14211422
const artifacts = structured
1422-
? parseStructuredInput(input, types)
1423-
: parseUnstructuredInput(input, types);
1423+
? parseStructuredInput(fullInput, types)
1424+
: parseUnstructuredInput(fullInput, types);
14241425

14251426
// Score each artifact using its type's quality criteria
14261427
const scoredArtifacts = artifacts.map((a) => {

0 commit comments

Comments
 (0)