fix: install core dependencies for cli

This commit is contained in:
Dallin Romney 2025-08-21 15:43:35 -07:00
parent c920351c89
commit fe16983203
4 changed files with 13 additions and 3 deletions

View file

@ -25,6 +25,11 @@ jobs:
cache: "npm"
cache-dependency-path: extensions/cli/package-lock.json
- name: Install core dependencies
run: |
cd core
npm i
- name: Install dependencies
run: |
cd extensions/cli
@ -53,6 +58,11 @@ jobs:
cache: "npm"
cache-dependency-path: extensions/cli/package-lock.json
- name: Install core dependencies
run: |
cd core
npm i
- name: Install dependencies
run: |
cd extensions/cli

View file

@ -251,7 +251,7 @@ export function isSecurityConcern(filePathOrUri: string) {
return defaultFileAndFolderSecurityIgnores.ignores(filepath);
}
export async function throwIfFileIsSecurityConcern(filepath: string) {
export function throwIfFileIsSecurityConcern(filepath: string) {
if (isSecurityConcern(filepath)) {
throw new Error(
`Reading or Editing ${filepath} is not allowed because it is a security concern. Do not attempt to read or edit this file in any way.`,

View file

@ -8,7 +8,7 @@ export const readCurrentlyOpenFileImpl: ToolImpl = async (_, extras) => {
const result = await extras.ide.getCurrentFile();
if (result) {
await throwIfFileIsSecurityConcern(result.path);
throwIfFileIsSecurityConcern(result.path);
await throwIfFileExceedsHalfOfContext(
result.path,
result.contents,

View file

@ -8,7 +8,7 @@ import { throwIfFileExceedsHalfOfContext } from "./readFileLimit";
export const readFileImpl: ToolImpl = async (args, extras) => {
const filepath = getStringArg(args, "filepath");
await throwIfFileIsSecurityConcern(filepath);
throwIfFileIsSecurityConcern(filepath);
const firstUriMatch = await resolveRelativePathInDir(filepath, extras.ide);
if (!firstUriMatch) {