mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-21 18:44:30 -07:00
feat(core): instrument file system tools for JIT context discovery (#22082)
This commit is contained in:
@@ -57,6 +57,7 @@ import levenshtein from 'fast-levenshtein';
|
||||
import { EDIT_DEFINITION } from './definitions/coreTools.js';
|
||||
import { resolveToolDeclaration } from './definitions/resolver.js';
|
||||
import { detectOmissionPlaceholders } from './omissionPlaceholderDetector.js';
|
||||
import { discoverJitContext, appendJitContext } from './jit-context.js';
|
||||
|
||||
const ENABLE_FUZZY_MATCH_RECOVERY = true;
|
||||
const FUZZY_MATCH_THRESHOLD = 0.1; // Allow up to 10% weighted difference
|
||||
@@ -937,8 +938,18 @@ ${snippet}`);
|
||||
);
|
||||
}
|
||||
|
||||
// Discover JIT subdirectory context for the edited file path
|
||||
const jitContext = await discoverJitContext(
|
||||
this.config,
|
||||
this.resolvedPath,
|
||||
);
|
||||
let llmContent = llmSuccessMessageParts.join(' ');
|
||||
if (jitContext) {
|
||||
llmContent = appendJitContext(llmContent, jitContext);
|
||||
}
|
||||
|
||||
return {
|
||||
llmContent: llmSuccessMessageParts.join(' '),
|
||||
llmContent,
|
||||
returnDisplay: displayResult,
|
||||
};
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user