diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index eb237d4..d2018f5 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -1066,7 +1066,6 @@ export const rawWriteInterpretationSchema = z.object({ scheduleFields: rawScheduleFieldsSchema.nullable(), taskFields: rawTaskFieldsSchema.nullable(), }), - confidence: z.record(z.string(), z.number().min(0).max(1)), unresolvedFields: z.array(z.string().min(1)), }); diff --git a/packages/core/src/write-commit.ts b/packages/core/src/write-commit.ts index 9ae16db..4e5803f 100644 --- a/packages/core/src/write-commit.ts +++ b/packages/core/src/write-commit.ts @@ -161,7 +161,7 @@ function commitScheduleFields(input: { continue; } - const fieldConfidence = interpretation.confidence[fieldPath] ?? 0; + const fieldConfidence = interpretation.confidence[fieldPath] ?? 1; if (fieldConfidence < CONFIDENCE_THRESHOLD) { needsClarification.push(fieldPath); continue; @@ -217,7 +217,7 @@ function commitTaskFields(input: { continue; } - const fieldConfidence = interpretation.confidence[fieldPath] ?? 0; + const fieldConfidence = interpretation.confidence[fieldPath] ?? 1; if (fieldConfidence < CONFIDENCE_THRESHOLD) { needsClarification.push(fieldPath); continue; diff --git a/packages/core/src/write-interpretation.ts b/packages/core/src/write-interpretation.ts index 2d5786f..91dce7e 100644 --- a/packages/core/src/write-interpretation.ts +++ b/packages/core/src/write-interpretation.ts @@ -74,7 +74,7 @@ export function normalizeRawWriteInterpretation( taskName: raw.taskName, fields: resolvedFields, sourceText, - confidence: raw.confidence, + confidence: {}, unresolvedFields: raw.unresolvedFields, }; }