You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
vscode-extension/src/commands/init.ts: The path path.join(workspacePath, ".github", "copilot-instructions.md") was computed 4 times across the function body (3 times as instructionsPath and once as instrPath — a different name for the same value). Hoisting it to a single declaration at the top of the withProgress callback removes this repetition and makes the code easier to maintain.
Removed Unnecessary Intermediate Variable
packages/core/src/services/evalScaffold.ts: The normalized variable was assigned and immediately returned on the next line. Inlining it into the return statement makes the intent clearer.
⚠️node_modules was not available in the execution environment, so npm test, npm run typecheck, npm run lint, and npm run build could not be executed. The changes are purely mechanical refactorings (hoisting a const declaration and removing a single-use intermediate variable) with no semantic impact.
This was originally intended as a pull request, but GitHub Actions is not permitted to create or approve pull requests in this repository.
The changes have been pushed to branch code-simplifier/2026-03-23-93d60e765e7fbcc8.
Code Simplification - 2026-03-23
This PR simplifies recently modified code from PR #79 to improve clarity and reduce duplication while preserving all functionality.
Files Simplified
vscode-extension/src/commands/init.ts— Extracted repeatedinstructionsPathpath computation to a singleconstdeclarationpackages/core/src/services/evalScaffold.ts— Inlined single-usenormalizedintermediate variableImprovements Made
Eliminated Duplication (DRY)
vscode-extension/src/commands/init.ts: The pathpath.join(workspacePath, ".github", "copilot-instructions.md")was computed 4 times across the function body (3 times asinstructionsPathand once asinstrPath— a different name for the same value). Hoisting it to a single declaration at the top of thewithProgresscallback removes this repetition and makes the code easier to maintain.Removed Unnecessary Intermediate Variable
packages/core/src/services/evalScaffold.ts: Thenormalizedvariable was assigned and immediately returned on the next line. Inlining it into thereturnstatement makes the intent clearer.Changes Based On
Recent changes from:
Testing
node_moduleswas not available in the execution environment, sonpm test,npm run typecheck,npm run lint, andnpm run buildcould not be executed. The changes are purely mechanical refactorings (hoisting aconstdeclaration and removing a single-use intermediate variable) with no semantic impact.Note
This was originally intended as a pull request, but GitHub Actions is not permitted to create or approve pull requests in this repository.
The changes have been pushed to branch
code-simplifier/2026-03-23-93d60e765e7fbcc8.Click here to create the pull request
To fix the permissions issue, go to Settings → Actions → General and enable Allow GitHub Actions to create and approve pull requests.
Show patch preview (86 of 86 lines)