mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-13 05:12:55 -07:00
refactor(vscode-ide-companion): Reduce VSIX size and improve build process (#9118)
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
import {
|
||||
IdeDiffAcceptedNotificationSchema,
|
||||
IdeDiffClosedNotificationSchema,
|
||||
} from '@google/gemini-cli-core';
|
||||
} from '@google/gemini-cli-core/src/ide/types.js';
|
||||
import { type JSONRPCNotification } from '@modelcontextprotocol/sdk/types.js';
|
||||
import * as path from 'node:path';
|
||||
import * as vscode from 'vscode';
|
||||
|
||||
@@ -7,10 +7,15 @@
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
import * as vscode from 'vscode';
|
||||
import { activate } from './extension.js';
|
||||
import { IDE_DEFINITIONS, detectIdeFromEnv } from '@google/gemini-cli-core';
|
||||
import {
|
||||
IDE_DEFINITIONS,
|
||||
detectIdeFromEnv,
|
||||
} from '@google/gemini-cli-core/src/ide/detect-ide.js';
|
||||
|
||||
vi.mock('@google/gemini-cli-core', async () => {
|
||||
const actual = await vi.importActual('@google/gemini-cli-core');
|
||||
vi.mock('@google/gemini-cli-core/src/ide/detect-ide.js', async () => {
|
||||
const actual = await vi.importActual(
|
||||
'@google/gemini-cli-core/src/ide/detect-ide.js',
|
||||
);
|
||||
return {
|
||||
...actual,
|
||||
detectIdeFromEnv: vi.fn(() => IDE_DEFINITIONS.vscode),
|
||||
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
detectIdeFromEnv,
|
||||
IDE_DEFINITIONS,
|
||||
type IdeInfo,
|
||||
} from '@google/gemini-cli-core';
|
||||
} from '@google/gemini-cli-core/src/ide/detect-ide.js';
|
||||
|
||||
const CLI_IDE_COMPANION_IDENTIFIER = 'Google.gemini-cli-vscode-ide-companion';
|
||||
const INFO_MESSAGE_SHOWN_KEY = 'geminiCliInfoMessageShown';
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
CloseDiffRequestSchema,
|
||||
IdeContextNotificationSchema,
|
||||
OpenDiffRequestSchema,
|
||||
} from '@google/gemini-cli-core';
|
||||
} from '@google/gemini-cli-core/src/ide/types.js';
|
||||
import { isInitializeRequest } from '@modelcontextprotocol/sdk/types.js';
|
||||
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
||||
import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js';
|
||||
|
||||
@@ -5,7 +5,10 @@
|
||||
*/
|
||||
|
||||
import * as vscode from 'vscode';
|
||||
import type { File, IdeContext } from '@google/gemini-cli-core';
|
||||
import type {
|
||||
File,
|
||||
IdeContext,
|
||||
} from '@google/gemini-cli-core/src/ide/types.js';
|
||||
|
||||
export const MAX_FILES = 10;
|
||||
const MAX_SELECTED_TEXT_LENGTH = 16384; // 16 KiB limit
|
||||
|
||||
Reference in New Issue
Block a user