diff --git a/extensions/cli/src/systemMessage.test.ts b/extensions/cli/src/systemMessage.test.ts index e419d0bac..1ebab348b 100644 --- a/extensions/cli/src/systemMessage.test.ts +++ b/extensions/cli/src/systemMessage.test.ts @@ -46,7 +46,6 @@ describe("constructSystemMessage", () => { expect(result).toContain("You are an agent in the Continue CLI"); expect(result).toContain(""); - expect(result).toContain(''); expect(result).toContain(''); }); diff --git a/extensions/cli/src/systemMessage.ts b/extensions/cli/src/systemMessage.ts index b3277975e..6e3a74762 100644 --- a/extensions/cli/src/systemMessage.ts +++ b/extensions/cli/src/systemMessage.ts @@ -2,14 +2,10 @@ import { execSync } from "child_process"; import * as fs from "fs"; import * as path from "path"; -import pkg from "ignore-walk"; -import { Minimatch } from "minimatch"; - import { processRule } from "./hubLoader.js"; import { PermissionMode } from "./permissions/types.js"; import { serviceContainer } from "./services/ServiceContainer.js"; import { ConfigServiceState, SERVICE_NAMES } from "./services/types.js"; -const { WalkerSync } = pkg; /** * Check if current directory is a git repository @@ -23,39 +19,6 @@ function isGitRepo(): boolean { } } -/** - * Get basic directory structure - */ -function getDirectoryStructure(): string { - try { - const walker = new WalkerSync({ - path: process.cwd(), - includeEmpty: false, - follow: false, - ignoreFiles: [".gitignore", ".continueignore", ".customignore"], - }); - - (walker.ignoreRules as any)[".customignore"] = [ - new Minimatch(".git/*", { - matchBase: true, - dot: true, - flipNegate: true, - nocase: true, - }), - ]; - - const files = walker.start().result as string[]; - - const filteredFiles = files - .slice(0, 500) - .map((file: string) => `./${file}`); - - return filteredFiles.join("\n") || "No structure available"; - } catch { - return "Directory structure not available"; - } -} - /** * Get git status */ @@ -89,10 +52,6 @@ Today's date: ${new Date().toISOString().split("T")[0]} As you answer the user's questions, you can use the following context: -Below is a snapshot of this project's file structure at the start of the conversation. This snapshot will NOT update during the conversation. It skips over .gitignore patterns. - -${getDirectoryStructure()} - This is the git status at the start of the conversation. Note that this status is a snapshot in time, and will not update during the conversation. ${getGitStatus()}