mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-13 13:22:35 -07:00
feat(config): enable JIT context loading by default (#22736)
This commit is contained in:
@@ -1190,7 +1190,7 @@ their corresponding top-level category object in your `settings.json` file.
|
|||||||
|
|
||||||
- **`experimental.jitContext`** (boolean):
|
- **`experimental.jitContext`** (boolean):
|
||||||
- **Description:** Enable Just-In-Time (JIT) context loading.
|
- **Description:** Enable Just-In-Time (JIT) context loading.
|
||||||
- **Default:** `false`
|
- **Default:** `true`
|
||||||
- **Requires restart:** Yes
|
- **Requires restart:** Yes
|
||||||
|
|
||||||
- **`experimental.useOSC52Paste`** (boolean):
|
- **`experimental.useOSC52Paste`** (boolean):
|
||||||
|
|||||||
@@ -814,7 +814,9 @@ describe('Hierarchical Memory Loading (config.ts) - Placeholder Suite', () => {
|
|||||||
|
|
||||||
it('should pass extension context file paths to loadServerHierarchicalMemory', async () => {
|
it('should pass extension context file paths to loadServerHierarchicalMemory', async () => {
|
||||||
process.argv = ['node', 'script.js'];
|
process.argv = ['node', 'script.js'];
|
||||||
const settings = createTestMergedSettings();
|
const settings = createTestMergedSettings({
|
||||||
|
experimental: { jitContext: false },
|
||||||
|
});
|
||||||
vi.spyOn(ExtensionManager.prototype, 'getExtensions').mockReturnValue([
|
vi.spyOn(ExtensionManager.prototype, 'getExtensions').mockReturnValue([
|
||||||
{
|
{
|
||||||
path: '/path/to/ext1',
|
path: '/path/to/ext1',
|
||||||
@@ -865,6 +867,7 @@ describe('Hierarchical Memory Loading (config.ts) - Placeholder Suite', () => {
|
|||||||
process.argv = ['node', 'script.js'];
|
process.argv = ['node', 'script.js'];
|
||||||
const includeDir = path.resolve(path.sep, 'path', 'to', 'include');
|
const includeDir = path.resolve(path.sep, 'path', 'to', 'include');
|
||||||
const settings = createTestMergedSettings({
|
const settings = createTestMergedSettings({
|
||||||
|
experimental: { jitContext: false },
|
||||||
context: {
|
context: {
|
||||||
includeDirectories: [includeDir],
|
includeDirectories: [includeDir],
|
||||||
loadMemoryFromIncludeDirectories: true,
|
loadMemoryFromIncludeDirectories: true,
|
||||||
@@ -892,6 +895,7 @@ describe('Hierarchical Memory Loading (config.ts) - Placeholder Suite', () => {
|
|||||||
it('should NOT pass includeDirectories to loadServerHierarchicalMemory when loadMemoryFromIncludeDirectories is false', async () => {
|
it('should NOT pass includeDirectories to loadServerHierarchicalMemory when loadMemoryFromIncludeDirectories is false', async () => {
|
||||||
process.argv = ['node', 'script.js'];
|
process.argv = ['node', 'script.js'];
|
||||||
const settings = createTestMergedSettings({
|
const settings = createTestMergedSettings({
|
||||||
|
experimental: { jitContext: false },
|
||||||
context: {
|
context: {
|
||||||
includeDirectories: ['/path/to/include'],
|
includeDirectories: ['/path/to/include'],
|
||||||
loadMemoryFromIncludeDirectories: false,
|
loadMemoryFromIncludeDirectories: false,
|
||||||
|
|||||||
@@ -494,7 +494,7 @@ export async function loadCliConfig(
|
|||||||
.getExtensions()
|
.getExtensions()
|
||||||
.find((ext) => ext.isActive && ext.plan?.directory)?.plan;
|
.find((ext) => ext.isActive && ext.plan?.directory)?.plan;
|
||||||
|
|
||||||
const experimentalJitContext = settings.experimental?.jitContext ?? false;
|
const experimentalJitContext = settings.experimental.jitContext;
|
||||||
|
|
||||||
let extensionRegistryURI =
|
let extensionRegistryURI =
|
||||||
process.env['GEMINI_CLI_EXTENSION_REGISTRY_URI'] ??
|
process.env['GEMINI_CLI_EXTENSION_REGISTRY_URI'] ??
|
||||||
|
|||||||
@@ -1894,7 +1894,7 @@ const SETTINGS_SCHEMA = {
|
|||||||
label: 'JIT Context Loading',
|
label: 'JIT Context Loading',
|
||||||
category: 'Experimental',
|
category: 'Experimental',
|
||||||
requiresRestart: true,
|
requiresRestart: true,
|
||||||
default: false,
|
default: true,
|
||||||
description: 'Enable Just-In-Time (JIT) context loading.',
|
description: 'Enable Just-In-Time (JIT) context loading.',
|
||||||
showInDialog: false,
|
showInDialog: false,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -994,7 +994,7 @@ export class Config implements McpContext, AgentLoopContext {
|
|||||||
modelConfigServiceConfig ?? DEFAULT_MODEL_CONFIGS,
|
modelConfigServiceConfig ?? DEFAULT_MODEL_CONFIGS,
|
||||||
);
|
);
|
||||||
|
|
||||||
this.experimentalJitContext = params.experimentalJitContext ?? false;
|
this.experimentalJitContext = params.experimentalJitContext ?? true;
|
||||||
this.topicUpdateNarration = params.topicUpdateNarration ?? false;
|
this.topicUpdateNarration = params.topicUpdateNarration ?? false;
|
||||||
this.modelSteering = params.modelSteering ?? false;
|
this.modelSteering = params.modelSteering ?? false;
|
||||||
this.injectionService = new InjectionService(() =>
|
this.injectionService = new InjectionService(() =>
|
||||||
|
|||||||
@@ -2013,8 +2013,8 @@
|
|||||||
"jitContext": {
|
"jitContext": {
|
||||||
"title": "JIT Context Loading",
|
"title": "JIT Context Loading",
|
||||||
"description": "Enable Just-In-Time (JIT) context loading.",
|
"description": "Enable Just-In-Time (JIT) context loading.",
|
||||||
"markdownDescription": "Enable Just-In-Time (JIT) context loading.\n\n- Category: `Experimental`\n- Requires restart: `yes`\n- Default: `false`",
|
"markdownDescription": "Enable Just-In-Time (JIT) context loading.\n\n- Category: `Experimental`\n- Requires restart: `yes`\n- Default: `true`",
|
||||||
"default": false,
|
"default": true,
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"useOSC52Paste": {
|
"useOSC52Paste": {
|
||||||
|
|||||||
Reference in New Issue
Block a user