@gitsense/gsc-utils 0.2.9 → 0.2.10

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.
@@ -10750,14 +10750,14 @@ function formatContextContent$1(items, contentType, contentOption) {
10750
10750
  // Always include metadata for batch analysis context
10751
10751
  result +=
10752
10752
  `- Repo: ${itemRepo.fullName || 'N/A'}\n`+
10753
- `- Path: ${itemMeta.path || 'N/A'}\n`;
10753
+ `- Path: ${item.path || 'N/A'}\n`;
10754
10754
 
10755
10755
  // Size and Tokens are specific to 'file content'
10756
10756
  if (contentType === 'file content') {
10757
- result += `- Size: ${_formatBytes(itemMeta.size)}\n`;
10758
- result += `- Tokens: ${itemMeta.tokens?.content?.estimate || 'N/A'}\n`;
10757
+ result += `- Size: ${_formatBytes(item.size)}\n`;
10758
+ result += `- Tokens: ${item.tokenCount || 'N/A'}\n`;
10759
10759
  } else {
10760
- const type = itemMeta.type || 'unknown';
10760
+ const type = item.type || 'unknown';
10761
10761
  result += `- Type: ${type === 'git-blob' ? 'file' : type === 'git-tree' || type === 'git-ref' ? 'directory' : type }\n`;
10762
10762
  result += `- Tokens: ${itemMeta.tokens?.analysis?.[contentOption.toLowerCase()]?.estimate || 'N/A'}\n`;
10763
10763
  }
@@ -10789,7 +10789,7 @@ var ContextUtils$2 = {
10789
10789
  parseContextSection: parseContextSection$1,
10790
10790
  extractContextSections: extractContextSections$1,
10791
10791
  extractContextItemsOverviewTableRows: extractContextItemsOverviewTableRows$1,
10792
- formatContextContent: formatContextContent$1, // Export the new method
10792
+ formatContextContent: formatContextContent$1,
10793
10793
  };
10794
10794
 
10795
10795
  /*
@@ -10748,14 +10748,14 @@ function formatContextContent$1(items, contentType, contentOption) {
10748
10748
  // Always include metadata for batch analysis context
10749
10749
  result +=
10750
10750
  `- Repo: ${itemRepo.fullName || 'N/A'}\n`+
10751
- `- Path: ${itemMeta.path || 'N/A'}\n`;
10751
+ `- Path: ${item.path || 'N/A'}\n`;
10752
10752
 
10753
10753
  // Size and Tokens are specific to 'file content'
10754
10754
  if (contentType === 'file content') {
10755
- result += `- Size: ${_formatBytes(itemMeta.size)}\n`;
10756
- result += `- Tokens: ${itemMeta.tokens?.content?.estimate || 'N/A'}\n`;
10755
+ result += `- Size: ${_formatBytes(item.size)}\n`;
10756
+ result += `- Tokens: ${item.tokenCount || 'N/A'}\n`;
10757
10757
  } else {
10758
- const type = itemMeta.type || 'unknown';
10758
+ const type = item.type || 'unknown';
10759
10759
  result += `- Type: ${type === 'git-blob' ? 'file' : type === 'git-tree' || type === 'git-ref' ? 'directory' : type }\n`;
10760
10760
  result += `- Tokens: ${itemMeta.tokens?.analysis?.[contentOption.toLowerCase()]?.estimate || 'N/A'}\n`;
10761
10761
  }
@@ -10787,7 +10787,7 @@ var ContextUtils$2 = {
10787
10787
  parseContextSection: parseContextSection$1,
10788
10788
  extractContextSections: extractContextSections$1,
10789
10789
  extractContextItemsOverviewTableRows: extractContextItemsOverviewTableRows$1,
10790
- formatContextContent: formatContextContent$1, // Export the new method
10790
+ formatContextContent: formatContextContent$1,
10791
10791
  };
10792
10792
 
10793
10793
  /*
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitsense/gsc-utils",
3
- "version": "0.2.9",
3
+ "version": "0.2.10",
4
4
  "description": "Utilities for GitSense Chat (GSC)",
5
5
  "main": "dist/gsc-utils.cjs.js",
6
6
  "module": "dist/gsc-utils.esm.js",
@@ -295,14 +295,14 @@ function formatContextContent(items, contentType, contentOption) {
295
295
  // Always include metadata for batch analysis context
296
296
  result +=
297
297
  `- Repo: ${itemRepo.fullName || 'N/A'}\n`+
298
- `- Path: ${itemMeta.path || 'N/A'}\n`;
298
+ `- Path: ${item.path || 'N/A'}\n`;
299
299
 
300
300
  // Size and Tokens are specific to 'file content'
301
301
  if (contentType === 'file content') {
302
- result += `- Size: ${_formatBytes(itemMeta.size)}\n`;
303
- result += `- Tokens: ${itemMeta.tokens?.content?.estimate || 'N/A'}\n`;
302
+ result += `- Size: ${_formatBytes(item.size)}\n`;
303
+ result += `- Tokens: ${item.tokenCount || 'N/A'}\n`;
304
304
  } else {
305
- const type = itemMeta.type || 'unknown';
305
+ const type = item.type || 'unknown';
306
306
  result += `- Type: ${type === 'git-blob' ? 'file' : type === 'git-tree' || type === 'git-ref' ? 'directory' : type }\n`;
307
307
  result += `- Tokens: ${itemMeta.tokens?.analysis?.[contentOption.toLowerCase()]?.estimate || 'N/A'}\n`;
308
308
  }
@@ -334,5 +334,5 @@ module.exports = {
334
334
  parseContextSection,
335
335
  extractContextSections,
336
336
  extractContextItemsOverviewTableRows,
337
- formatContextContent, // Export the new method
337
+ formatContextContent,
338
338
  };