@@ -133,7 +133,7 @@ async function isGitClean(filePath: string): Promise<{isRepo: boolean, isClean:
133
133
}
134
134
135
135
// 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
137
137
// on the first file operation in each prompt and skipped for subsequent operations
138
138
async function validateGitStatus ( filePath : string ) : Promise < void > {
139
139
if ( ! gitConfig . requireCleanBranch ) {
@@ -142,7 +142,7 @@ async function validateGitStatus(filePath: string): Promise<void> {
142
142
143
143
// Skip if we've already checked in this prompt
144
144
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` ) ;
146
146
return ;
147
147
}
148
148
@@ -166,16 +166,16 @@ async function validateGitStatus(filePath: string): Promise<void> {
166
166
167
167
// Mark that we've checked in this prompt
168
168
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` ) ;
170
170
}
171
171
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 {
176
176
if ( gitConfig . checkedThisPrompt ) {
177
177
gitConfig . checkedThisPrompt = false ;
178
- console . log ( "Git check state reset for next prompt" ) ;
178
+ console . log ( "State reset for next prompt" ) ;
179
179
}
180
180
}
181
181
@@ -841,13 +841,13 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
841
841
throw new Error ( `Unknown tool: ${ name } ` ) ;
842
842
}
843
843
844
- // Reset Git check state after successful response
845
- resetGitCheckState ( ) ;
844
+ // Reset validation state after successful response
845
+ resetValidationState ( ) ;
846
846
847
847
return response ;
848
848
} catch ( error ) {
849
- // Reset Git check state even on error
850
- resetGitCheckState ( ) ;
849
+ // Reset validation state even on error
850
+ resetValidationState ( ) ;
851
851
852
852
const errorMessage = error instanceof Error ? error . message : String ( error ) ;
853
853
return {
@@ -866,7 +866,7 @@ async function runServer() {
866
866
867
867
if ( gitConfig . requireCleanBranch ) {
868
868
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" ) ;
870
870
} else {
871
871
console . error ( "Git integration: Disabled" ) ;
872
872
}
0 commit comments