@gitsense/gsc-utils 0.2.20 → 0.2.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -283,7 +283,9 @@ function createPatchFromCodeBlocks(CodeBlockUtils, sourceCodeBlockText, targetCo
283
283
  const targetContent = targetContentTemp.join('\n\n');
284
284
 
285
285
  // Get the number of lines in the header + two blank lines
286
- const sourceHeaderLineCount = sourceHeaderText.split('\n').length;
286
+ // Note, before the code block header format was solidified, we use to include 'Updated-at' but no more so
287
+ // we need to filter it out from the source header
288
+ const sourceHeaderLineCount = sourceHeaderText.split('\n').filter(line => !line.includes('Updated-at')).length;
287
289
  const targetHeaderLineCount = targetHeaderText.split('\n').length;
288
290
 
289
291
  // To keep things simple we are going to require the source and target header line count to be the same.
@@ -291,7 +293,7 @@ function createPatchFromCodeBlocks(CodeBlockUtils, sourceCodeBlockText, targetCo
291
293
  if (sourceHeaderLineCount !== targetHeaderLineCount) {
292
294
  // Some LLMs will not generate a Parent-UUID for the first version so we won't make this
293
295
  // fatal if the sourceHeader does not have a Parent-UUID
294
- if (sourceHeaderLineCount.includes('Parent-UUID')) {
296
+ if (sourceHeaderText.includes('Parent-UUID')) {
295
297
  throw new Error('Source and target header line count must be the same');
296
298
  }
297
299
  }