Skip to content

Commit b41cc36

Browse files
author
Andy Klier
committed
fixing syntax error
1 parent dc085e3 commit b41cc36

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/filesystem/index.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ async function isGitClean(filePath: string): Promise<{isRepo: boolean, isClean:
133133
}
134134

135135
// Check if the Git status allows modification
136-
// With the One-Check-Per-Prompt approach, Git validation is only performed
136+
// With the One-Check-Per-Prompt approach, validation is only performed
137137
// on the first file operation in each prompt and skipped for subsequent operations
138138
async function validateGitStatus(filePath: string): Promise<void> {
139139
if (!gitConfig.requireCleanBranch) {
@@ -142,7 +142,7 @@ async function validateGitStatus(filePath: string): Promise<void> {
142142

143143
// Skip if we've already checked in this prompt
144144
if (gitConfig.checkedThisPrompt) {
145-
console.log(`Skipping Git check for ${filePath} as we already checked in this prompt`);
145+
console.log(`Skipping validation for ${filePath} - already checked`);
146146
return;
147147
}
148148

@@ -166,16 +166,16 @@ async function validateGitStatus(filePath: string): Promise<void> {
166166

167167
// Mark that we've checked in this prompt
168168
gitConfig.checkedThisPrompt = true;
169-
console.log(`Git check passed for ${filePath} and marked as checked for this prompt`);
169+
console.log(`Validation passed for ${filePath} - marked as checked`);
170170
}
171171

172-
// Reset the Git check state
173-
// This function is called after each tool request to reset the Git check state
174-
// so that the next prompt will perform a fresh Git check
175-
function resetGitCheckState(): void {
172+
// Reset the validation state
173+
// This function is called after each tool request to reset the validation state
174+
// so that the next prompt will perform a fresh validation
175+
function resetValidationState(): void {
176176
if (gitConfig.checkedThisPrompt) {
177177
gitConfig.checkedThisPrompt = false;
178-
console.log("Git check state reset for next prompt");
178+
console.log("State reset for next prompt");
179179
}
180180
}
181181

@@ -841,13 +841,13 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
841841
throw new Error(`Unknown tool: ${name}`);
842842
}
843843

844-
// Reset Git check state after successful response
845-
resetGitCheckState();
844+
// Reset validation state after successful response
845+
resetValidationState();
846846

847847
return response;
848848
} catch (error) {
849-
// Reset Git check state even on error
850-
resetGitCheckState();
849+
// Reset validation state even on error
850+
resetValidationState();
851851

852852
const errorMessage = error instanceof Error ? error.message : String(error);
853853
return {
@@ -866,7 +866,7 @@ async function runServer() {
866866

867867
if (gitConfig.requireCleanBranch) {
868868
console.error("Git integration: Enabled");
869-
console.error("Git require clean branch: Yes - Files will only be modified after a Git check on the first operation in each prompt");
869+
console.error("Git require clean branch: Yes - Files will only be modified after a validation on the first operation in each prompt");
870870
} else {
871871
console.error("Git integration: Disabled");
872872
}

0 commit comments

Comments
 (0)