Skip to content

Commit

Permalink
remove duplicate package.json in workspace context
Browse files Browse the repository at this point in the history
  • Loading branch information
codybrom committed Apr 18, 2023
1 parent f8ba1f5 commit b4bd7e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "gpt-context-generator",
"displayName": "GPT Context Generator",
"description": "Generate GPT-friendly context for files or workspaces",
"version": "0.1.0",
"version": "0.1.1",
"engines": {
"vscode": "^1.77.0"
},
Expand Down Expand Up @@ -65,7 +65,7 @@
"gpt-context-generator.includePackageJson": {
"type": "boolean",
"default": true,
"description": "Include package.json as part of the context."
"description": "Include package.json as part of the context (Open File Only)."
}
}
}
Expand Down
8 changes: 0 additions & 8 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,6 @@ async function createGPTFriendlyContext(
}
};

if (includePackageJson) {
const packageJsonPath = path.join(workspacePath, 'package.json');
if (fs.existsSync(packageJsonPath)) {
const packageJsonContent = fs.readFileSync(packageJsonPath).toString();
gptContext.push(`File: package.json\n\n${packageJsonContent}\n\n`);
}
}

await processDirectory(workspacePath);
return gptContext.join('\n');
}
Expand Down

0 comments on commit b4bd7e7

Please sign in to comment.