@gitsense/gsc-utils 0.2.13 → 0.2.15

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.
@@ -11673,7 +11673,9 @@ async function getAnalyzerInstructionsContent$2(analyzeMessagesBasePath, analyze
11673
11673
 
11674
11674
  try {
11675
11675
  const fileContent = await fs$3.readFile(instructionsFilePath, 'utf8');
11676
- return fileContent;
11676
+ const parts = fileContent.split('\n\n\n');
11677
+ parts.shift();
11678
+ return parts.join('\n\n\n');
11677
11679
  } catch (error) {
11678
11680
  if (error.code === 'ENOENT') {
11679
11681
  console.warn(`Analyzer instructions file not found: ${instructionsFilePath}`);
@@ -11719,7 +11721,9 @@ async function getSystemMessageContent$2(analyzeMessagesBasePath) {
11719
11721
 
11720
11722
  try {
11721
11723
  const fileContent = await fs$2.readFile(systemMessageFilePath, 'utf8');
11722
- return fileContent.split('\n\n\n').pop();
11724
+ const parts = fileContent.split('\n\n\n');
11725
+ parts.shift();
11726
+ return parts.join('\n\n\n');
11723
11727
  } catch (error) {
11724
11728
  if (error.code === 'ENOENT') {
11725
11729
  console.warn(`Default system message file not found: ${systemMessageFilePath}.`);
@@ -11747,7 +11751,9 @@ async function getStartMessageContent$2(analyzeMessagesBasePath) {
11747
11751
 
11748
11752
  try {
11749
11753
  const fileContent = await fs$2.readFile(startMessageFilePath, 'utf8');
11750
- return fileContent.split('\n\n\n').pop();
11754
+ const parts = fileContent.split('\n\n\n');
11755
+ parts.shift();
11756
+ return parts.join('\n\n\n');
11751
11757
  } catch (error) {
11752
11758
  if (error.code === 'ENOENT') {
11753
11759
  console.warn(`Default start message file not found: ${startMessageFilePath}.`);
@@ -11671,7 +11671,9 @@ async function getAnalyzerInstructionsContent$2(analyzeMessagesBasePath, analyze
11671
11671
 
11672
11672
  try {
11673
11673
  const fileContent = await fs$3.readFile(instructionsFilePath, 'utf8');
11674
- return fileContent;
11674
+ const parts = fileContent.split('\n\n\n');
11675
+ parts.shift();
11676
+ return parts.join('\n\n\n');
11675
11677
  } catch (error) {
11676
11678
  if (error.code === 'ENOENT') {
11677
11679
  console.warn(`Analyzer instructions file not found: ${instructionsFilePath}`);
@@ -11717,7 +11719,9 @@ async function getSystemMessageContent$2(analyzeMessagesBasePath) {
11717
11719
 
11718
11720
  try {
11719
11721
  const fileContent = await fs$2.readFile(systemMessageFilePath, 'utf8');
11720
- return fileContent.split('\n\n\n').pop();
11722
+ const parts = fileContent.split('\n\n\n');
11723
+ parts.shift();
11724
+ return parts.join('\n\n\n');
11721
11725
  } catch (error) {
11722
11726
  if (error.code === 'ENOENT') {
11723
11727
  console.warn(`Default system message file not found: ${systemMessageFilePath}.`);
@@ -11745,7 +11749,9 @@ async function getStartMessageContent$2(analyzeMessagesBasePath) {
11745
11749
 
11746
11750
  try {
11747
11751
  const fileContent = await fs$2.readFile(startMessageFilePath, 'utf8');
11748
- return fileContent.split('\n\n\n').pop();
11752
+ const parts = fileContent.split('\n\n\n');
11753
+ parts.shift();
11754
+ return parts.join('\n\n\n');
11749
11755
  } catch (error) {
11750
11756
  if (error.code === 'ENOENT') {
11751
11757
  console.warn(`Default start message file not found: ${startMessageFilePath}.`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitsense/gsc-utils",
3
- "version": "0.2.13",
3
+ "version": "0.2.15",
4
4
  "description": "Utilities for GitSense Chat (GSC)",
5
5
  "main": "dist/gsc-utils.cjs.js",
6
6
  "module": "dist/gsc-utils.esm.js",
@@ -29,7 +29,9 @@ async function getSystemMessageContent(analyzeMessagesBasePath) {
29
29
 
30
30
  try {
31
31
  const fileContent = await fs.readFile(systemMessageFilePath, 'utf8');
32
- return fileContent.split('\n\n\n').pop();
32
+ const parts = fileContent.split('\n\n\n');
33
+ parts.shift();
34
+ return parts.join('\n\n\n');
33
35
  } catch (error) {
34
36
  if (error.code === 'ENOENT') {
35
37
  console.warn(`Default system message file not found: ${systemMessageFilePath}.`);
@@ -57,7 +59,9 @@ async function getStartMessageContent(analyzeMessagesBasePath) {
57
59
 
58
60
  try {
59
61
  const fileContent = await fs.readFile(startMessageFilePath, 'utf8');
60
- return fileContent.split('\n\n\n').pop();
62
+ const parts = fileContent.split('\n\n\n');
63
+ parts.shift();
64
+ return parts.join('\n\n\n');
61
65
  } catch (error) {
62
66
  if (error.code === 'ENOENT') {
63
67
  console.warn(`Default start message file not found: ${startMessageFilePath}.`);
@@ -41,7 +41,9 @@ async function getAnalyzerInstructionsContent(analyzeMessagesBasePath, analyzerI
41
41
 
42
42
  try {
43
43
  const fileContent = await fs.readFile(instructionsFilePath, 'utf8');
44
- return fileContent;
44
+ const parts = fileContent.split('\n\n\n');
45
+ parts.shift();
46
+ return parts.join('\n\n\n');
45
47
  } catch (error) {
46
48
  if (error.code === 'ENOENT') {
47
49
  console.warn(`Analyzer instructions file not found: ${instructionsFilePath}`);