repo stringlengths 7 64 | file_url stringlengths 81 338 | file_path stringlengths 5 257 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:25:31 2026-01-05 01:50:38 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/core/client.test.ts | packages/core/src/core/client.test.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import {
describe,
it,
expect,
vi,
beforeEach,
afterEach,
type Mock,
} from 'vitest';
import type { Content, GenerateContentResponse, Part } from '@google/genai';
import { GeminiClient } from './client.js';
import {
... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | true |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/core/geminiChat.test.ts | packages/core/src/core/geminiChat.test.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
import type { Content, GenerateContentResponse } from '@google/genai';
import { ApiError, ThinkingLevel } from '@google/genai';
import type { ContentGenerato... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | true |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/core/logger.test.ts | packages/core/src/core/logger.test.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import {
describe,
it,
expect,
vi,
beforeEach,
afterEach,
afterAll,
} from 'vitest';
import type { LogEntry } from './logger.js';
import {
Logger,
MessageSenderType,
encodeTagName,
decodeTagName,
} from './log... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/core/baseLlmClient.test.ts | packages/core/src/core/baseLlmClient.test.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import {
describe,
it,
expect,
vi,
beforeEach,
afterEach,
type Mocked,
type Mock,
} from 'vitest';
import { BaseLlmClient, type GenerateJsonOptions } from './baseLlmClient.js';
import type { ContentGenerator } from... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/core/fakeContentGenerator.test.ts | packages/core/src/core/fakeContentGenerator.test.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { describe, it, expect, vi, beforeEach } from 'vitest';
import {
FakeContentGenerator,
type FakeResponse,
} from './fakeContentGenerator.js';
import { promises } from 'node:fs';
import {
GenerateContentResponse,
type... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/core/contentGenerator.ts | packages/core/src/core/contentGenerator.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import type {
CountTokensResponse,
GenerateContentResponse,
GenerateContentParameters,
CountTokensParameters,
EmbedContentResponse,
EmbedContentParameters,
} from '@google/genai';
import { GoogleGenAI } from '@google/ge... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/core/fakeContentGenerator.ts | packages/core/src/core/fakeContentGenerator.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import {
GenerateContentResponse,
type CountTokensResponse,
type GenerateContentParameters,
type CountTokensParameters,
EmbedContentResponse,
type EmbedContentParameters,
} from '@google/genai';
import { promises } from... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/core/loggingContentGenerator.test.ts | packages/core/src/core/loggingContentGenerator.test.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
const logApiRequest = vi.hoisted(() => vi.fn());
const logApiResponse = vi.hoisted(() => vi.fn());
const logApiError = vi.hoisted(() => vi.fn());
vi.mock('../telemetry/loggers.js', () => ({
logApiRequest,
logApiResponse,
log... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/core/loggingContentGenerator.ts | packages/core/src/core/loggingContentGenerator.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import type {
Candidate,
Content,
CountTokensParameters,
CountTokensResponse,
EmbedContentParameters,
EmbedContentResponse,
GenerateContentConfig,
GenerateContentParameters,
GenerateContentResponseUsageMetadata,
... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/core/tokenLimits.ts | packages/core/src/core/tokenLimits.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
type Model = string;
type TokenCount = number;
export const DEFAULT_TOKEN_LIMIT = 1_048_576;
export function tokenLimit(model: Model): TokenCount {
// Add other models as they become relevant or if specified by config
// Pull... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/config/config.ts | packages/core/src/config/config.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import * as path from 'node:path';
import { inspect } from 'node:util';
import process from 'node:process';
import type {
ContentGenerator,
ContentGeneratorConfig,
} from '../core/contentGenerator.js';
import {
AuthType,
cr... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | true |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/config/models.ts | packages/core/src/config/models.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
export const PREVIEW_GEMINI_MODEL = 'gemini-3-pro-preview';
export const PREVIEW_GEMINI_FLASH_MODEL = 'gemini-3-flash-preview';
export const DEFAULT_GEMINI_MODEL = 'gemini-2.5-pro';
export const DEFAULT_GEMINI_FLASH_MODEL = 'gemini... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/config/models.test.ts | packages/core/src/config/models.test.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { describe, it, expect } from 'vitest';
import {
resolveModel,
resolveClassifierModel,
isGemini2Model,
DEFAULT_GEMINI_MODEL,
PREVIEW_GEMINI_MODEL,
DEFAULT_GEMINI_FLASH_MODEL,
DEFAULT_GEMINI_FLASH_LITE_MODEL,
... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/config/flashFallback.test.ts | packages/core/src/config/flashFallback.test.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { describe, it, expect, beforeEach, vi } from 'vitest';
import { Config } from './config.js';
import { DEFAULT_GEMINI_MODEL, DEFAULT_GEMINI_FLASH_MODEL } from './models.js';
import { logFlashFallback } from '../telemetry/log... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/config/defaultModelConfigs.ts | packages/core/src/config/defaultModelConfigs.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { ThinkingLevel } from '@google/genai';
import type { ModelConfigServiceConfig } from '../services/modelConfigService.js';
import { DEFAULT_THINKING_MODE } from './models.js';
// The default model configs. We use `base` as ... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/config/storage.test.ts | packages/core/src/config/storage.test.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { describe, it, expect, vi } from 'vitest';
import * as os from 'node:os';
import * as path from 'node:path';
vi.mock('fs', async (importOriginal) => {
const actual = await importOriginal<typeof import('fs')>();
return ... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/config/constants.ts | packages/core/src/config/constants.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
export interface FileFilteringOptions {
respectGitIgnore: boolean;
respectGeminiIgnore: boolean;
}
// For memory files
export const DEFAULT_MEMORY_FILE_FILTERING_OPTIONS: FileFilteringOptions = {
respectGitIgnore: false,
r... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/config/storage.ts | packages/core/src/config/storage.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import * as path from 'node:path';
import * as os from 'node:os';
import * as crypto from 'node:crypto';
import * as fs from 'node:fs';
import { GEMINI_DIR } from '../utils/paths.js';
export const GOOGLE_ACCOUNTS_FILENAME = 'googl... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/config/config.test.ts | packages/core/src/config/config.test.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
import type { Mock } from 'vitest';
import type { ConfigParameters, SandboxConfig } from './config.js';
import { Config, DEFAULT_FILE_FILTERING_OPTIONS } fro... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | true |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/safety/context-builder.test.ts | packages/core/src/safety/context-builder.test.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { describe, it, expect, vi, beforeEach } from 'vitest';
import { ContextBuilder } from './context-builder.js';
import type { Config } from '../config/config.js';
import type { ConversationTurn } from './protocol.js';
descri... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/safety/context-builder.ts | packages/core/src/safety/context-builder.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import type { SafetyCheckInput, ConversationTurn } from './protocol.js';
import type { Config } from '../config/config.js';
/**
* Builds context objects for safety checkers, ensuring sensitive data is filtered.
*/
export class C... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/safety/checker-runner.ts | packages/core/src/safety/checker-runner.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { spawn } from 'node:child_process';
import type { FunctionCall } from '@google/genai';
import type {
SafetyCheckerConfig,
InProcessCheckerConfig,
ExternalCheckerConfig,
} from '../policy/types.js';
import type { Safet... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/safety/built-in.test.ts | packages/core/src/safety/built-in.test.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { describe, it, expect, beforeEach, afterEach } from 'vitest';
import * as fs from 'node:fs/promises';
import * as os from 'node:os';
import * as path from 'node:path';
import { AllowedPathChecker } from './built-in.js';
imp... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/safety/checker-runner.test.ts | packages/core/src/safety/checker-runner.test.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
import { spawn } from 'node:child_process';
import { CheckerRunner } from './checker-runner.js';
import { ContextBuilder } from './context-builder.js';
impor... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/safety/built-in.ts | packages/core/src/safety/built-in.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import * as path from 'node:path';
import * as fs from 'node:fs';
import type { SafetyCheckInput, SafetyCheckResult } from './protocol.js';
import { SafetyCheckDecision } from './protocol.js';
import type { AllowedPathConfig } from... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/safety/registry.ts | packages/core/src/safety/registry.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import * as path from 'node:path';
import * as fs from 'node:fs';
import { type InProcessChecker, AllowedPathChecker } from './built-in.js';
import { InProcessCheckerType } from '../policy/types.js';
/**
* Registry for managing s... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/safety/protocol.ts | packages/core/src/safety/protocol.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import type { FunctionCall } from '@google/genai';
/**
* Represents a single turn in the conversation between the user and the model.
* This provides semantic context for why a tool call might be happening.
*/
export interface ... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/safety/registry.test.ts | packages/core/src/safety/registry.test.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { describe, it, expect, beforeEach } from 'vitest';
import { CheckerRegistry } from './registry.js';
import { InProcessCheckerType } from '../policy/types.js';
import { AllowedPathChecker } from './built-in.js';
describe('C... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/telemetry/startupProfiler.test.ts | packages/core/src/telemetry/startupProfiler.test.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
import { StartupProfiler } from './startupProfiler.js';
import type { Config } from '../config/config.js';
import { debugLogger } from '../utils/debugLogger.... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/telemetry/config.ts | packages/core/src/telemetry/config.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import type { TelemetrySettings } from '../config/config.js';
import { FatalConfigError } from '../utils/errors.js';
import { TelemetryTarget } from './index.js';
/**
* Parse a boolean environment flag. Accepts 'true'/'1' as true... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/telemetry/activity-monitor.test.ts | packages/core/src/telemetry/activity-monitor.test.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
import {
ActivityMonitor,
DEFAULT_ACTIVITY_CONFIG,
initializeActivityMonitor,
getActivityMonitor,
recordGlobalActivity,
startGlobalActivityMonito... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/telemetry/telemetry-utils.test.ts | packages/core/src/telemetry/telemetry-utils.test.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { describe, it, expect } from 'vitest';
import { getProgrammingLanguage } from './telemetry-utils.js';
describe('getProgrammingLanguage', () => {
type ProgrammingLanguageTestCase = {
name: string;
args: Record<str... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/telemetry/semantic.test.ts | packages/core/src/telemetry/semantic.test.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { describe, it, expect } from 'vitest';
import {
toChatMessage,
toInputMessages,
toSystemInstruction,
toOutputMessages,
toFinishReasons,
OTelFinishReason,
toOutputType,
OTelOutputType,
} from './semantic.js';... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/telemetry/gcp-exporters.ts | packages/core/src/telemetry/gcp-exporters.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { type JWTInput } from 'google-auth-library';
import { TraceExporter } from '@google-cloud/opentelemetry-cloud-trace-exporter';
import { MetricExporter } from '@google-cloud/opentelemetry-cloud-monitoring-exporter';
import {... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/telemetry/rate-limiter.ts | packages/core/src/telemetry/rate-limiter.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
/**
* Rate limiter to prevent excessive telemetry recording
* Ensures we don't send metrics more frequently than specified limits
*/
export class RateLimiter {
private lastRecordTimes: Map<string, number> = new Map();
privat... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/telemetry/trace.ts | packages/core/src/telemetry/trace.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import {
diag,
SpanStatusCode,
trace,
type AttributeValue,
type SpanOptions,
} from '@opentelemetry/api';
import { safeJsonStringify } from '../utils/safeJsonStringify.js';
const TRACER_NAME = 'gemini-cli';
const TRACER_... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/telemetry/tool-call-decision.ts | packages/core/src/telemetry/tool-call-decision.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { ToolConfirmationOutcome } from '../tools/tools.js';
export enum ToolCallDecision {
ACCEPT = 'accept',
REJECT = 'reject',
MODIFY = 'modify',
AUTO_ACCEPT = 'auto_accept',
}
export function getDecisionFromOutcome(
... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/telemetry/uiTelemetry.ts | packages/core/src/telemetry/uiTelemetry.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { EventEmitter } from 'node:events';
import {
EVENT_API_ERROR,
EVENT_API_RESPONSE,
EVENT_TOOL_CALL,
} from './types.js';
import { ToolCallDecision } from './tool-call-decision.js';
import type {
ApiErrorEvent,
Api... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/telemetry/memory-monitor.test.ts | packages/core/src/telemetry/memory-monitor.test.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
import v8 from 'node:v8';
import process from 'node:process';
import {
MemoryMonitor,
initializeMemoryMonitor,
getMemoryMonitor,
recordCurrentMemoryU... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/telemetry/activity-monitor.ts | packages/core/src/telemetry/activity-monitor.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import type { Config } from '../config/config.js';
import { isPerformanceMonitoringActive } from './metrics.js';
import { getMemoryMonitor } from './memory-monitor.js';
import { ActivityType } from './activity-types.js';
import { d... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/telemetry/high-water-mark-tracker.test.ts | packages/core/src/telemetry/high-water-mark-tracker.test.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { describe, it, expect, beforeEach, vi } from 'vitest';
import { HighWaterMarkTracker } from './high-water-mark-tracker.js';
describe('HighWaterMarkTracker', () => {
let tracker: HighWaterMarkTracker;
beforeEach(() => ... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/telemetry/metrics.ts | packages/core/src/telemetry/metrics.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import type { Attributes, Meter, Counter, Histogram } from '@opentelemetry/api';
import { diag, metrics, ValueType } from '@opentelemetry/api';
import { SERVICE_NAME } from './constants.js';
import type { Config } from '../config/c... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | true |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/telemetry/sdk.test.ts | packages/core/src/telemetry/sdk.test.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
import type { Config } from '../config/config.js';
import {
initializeTelemetry,
shutdownTelemetry,
bufferTelemetryEvent,
} from './sdk.js';
import { O... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/telemetry/memory-monitor.ts | packages/core/src/telemetry/memory-monitor.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import v8 from 'node:v8';
import process from 'node:process';
import type { Config } from '../config/config.js';
import { bytesToMB } from '../utils/formatters.js';
import { isUserActive } from './activity-detector.js';
import { Hi... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/telemetry/telemetry.test.ts | packages/core/src/telemetry/telemetry.test.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
import {
initializeTelemetry,
shutdownTelemetry,
isTelemetrySdkInitialized,
} from './sdk.js';
import { Config } from '../config/config.js';
import { N... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/telemetry/telemetry-utils.ts | packages/core/src/telemetry/telemetry-utils.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { getLanguageFromFilePath } from '../utils/language-detection.js';
export function getProgrammingLanguage(
args: Record<string, unknown>,
): string | undefined {
const filePath = args['file_path'] || args['path'] || arg... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/telemetry/uiTelemetry.test.ts | packages/core/src/telemetry/uiTelemetry.test.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { describe, it, expect, vi, beforeEach } from 'vitest';
import { UiTelemetryService } from './uiTelemetry.js';
import { ToolCallDecision } from './tool-call-decision.js';
import type { ApiErrorEvent, ApiResponseEvent } from ... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/telemetry/gcp-exporters.test.ts | packages/core/src/telemetry/gcp-exporters.test.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { describe, it, expect, vi, beforeEach } from 'vitest';
import { ExportResultCode } from '@opentelemetry/core';
import type { ReadableLogRecord } from '@opentelemetry/sdk-logs';
import {
GcpTraceExporter,
GcpMetricExport... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/telemetry/file-exporters.ts | packages/core/src/telemetry/file-exporters.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import * as fs from 'node:fs';
import type { ExportResult } from '@opentelemetry/core';
import { ExportResultCode } from '@opentelemetry/core';
import type { ReadableSpan, SpanExporter } from '@opentelemetry/sdk-trace-base';
import... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/telemetry/sdk.ts | packages/core/src/telemetry/sdk.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import {
DiagLogLevel,
diag,
trace,
context,
metrics,
propagation,
} from '@opentelemetry/api';
import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-grpc';
import { OTLPLogExporter } from '@opentelemetr... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/telemetry/activity-types.ts | packages/core/src/telemetry/activity-types.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
/**
* Types of user activities that can be tracked
*/
export enum ActivityType {
USER_INPUT_START = 'user_input_start',
USER_INPUT_END = 'user_input_end',
MESSAGE_ADDED = 'message_added',
TOOL_CALL_SCHEDULED = 'tool_call_... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/telemetry/semantic.ts | packages/core/src/telemetry/semantic.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
/**
* This file contains functions and types for converting Gemini API request/response
* formats to the OpenTelemetry semantic conventions for generative AI.
*
* @see https://github.com/open-telemetry/semantic-conventions/blob... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/telemetry/activity-detector.ts | packages/core/src/telemetry/activity-detector.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
/**
* Tracks user activity state to determine when memory monitoring should be active
*/
export class ActivityDetector {
private lastActivityTime: number = Date.now();
private readonly idleThresholdMs: number;
constructor(... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/telemetry/constants.ts | packages/core/src/telemetry/constants.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
export const SERVICE_NAME = 'gemini-cli';
| typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/telemetry/rate-limiter.test.ts | packages/core/src/telemetry/rate-limiter.test.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { describe, it, expect, beforeEach, vi } from 'vitest';
import { RateLimiter } from './rate-limiter.js';
describe('RateLimiter', () => {
let rateLimiter: RateLimiter;
beforeEach(() => {
rateLimiter = new RateLimite... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/telemetry/sanitize.ts | packages/core/src/telemetry/sanitize.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
/**
* Sanitize hook name to remove potentially sensitive information.
* Extracts the base command name without arguments or full paths.
*
* This function protects PII by removing:
* - Full file paths that may contain usernames... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/telemetry/sanitize.test.ts | packages/core/src/telemetry/sanitize.test.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
/**
* Tests for telemetry sanitization functions.
*
* This test file focuses on validating PII protection through sanitization,
* particularly for hook names that may contain sensitive information like
* API keys, credentials,... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/telemetry/startupProfiler.ts | packages/core/src/telemetry/startupProfiler.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { performance } from 'node:perf_hooks';
import * as os from 'node:os';
import * as fs from 'node:fs';
import type { Config } from '../config/config.js';
import { recordStartupPerformance } from './metrics.js';
import { debug... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/telemetry/metrics.test.ts | packages/core/src/telemetry/metrics.test.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { describe, it, expect, vi, beforeEach, type Mock } from 'vitest';
import type {
Counter,
Meter,
Attributes,
Context,
Histogram,
} from '@opentelemetry/api';
import type { Config } from '../config/config.js';
impor... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | true |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/telemetry/loggers.test.ts | packages/core/src/telemetry/loggers.test.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import type {
AnyToolInvocation,
CompletedToolCall,
ContentGeneratorConfig,
ErroredToolCall,
} from '../index.js';
import {
AuthType,
EditTool,
GeminiClient,
ToolConfirmationOutcome,
ToolErrorType,
ToolRegistry,... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | true |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/telemetry/types.ts | packages/core/src/telemetry/types.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import type {
Candidate,
Content,
GenerateContentConfig,
GenerateContentResponseUsageMetadata,
} from '@google/genai';
import type { Config } from '../config/config.js';
import type { ApprovalMode } from '../policy/types.js... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | true |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/telemetry/loggers.ts | packages/core/src/telemetry/loggers.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import type { LogRecord } from '@opentelemetry/api-logs';
import { logs } from '@opentelemetry/api-logs';
import type { Config } from '../config/config.js';
import { SERVICE_NAME } from './constants.js';
import {
EVENT_API_ERROR,... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/telemetry/index.ts | packages/core/src/telemetry/index.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
export enum TelemetryTarget {
GCP = 'gcp',
LOCAL = 'local',
}
const DEFAULT_TELEMETRY_TARGET = TelemetryTarget.LOCAL;
const DEFAULT_OTLP_ENDPOINT = 'http://localhost:4317';
export { DEFAULT_TELEMETRY_TARGET, DEFAULT_OTLP_ENDP... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/telemetry/loggers.test.circular.ts | packages/core/src/telemetry/loggers.test.circular.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
/**
* Test to verify circular reference handling in telemetry logging
*/
import { describe, it, expect } from 'vitest';
import { logToolCall } from './loggers.js';
import { ToolCallEvent } from './types.js';
import type { Config... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/telemetry/telemetryAttributes.ts | packages/core/src/telemetry/telemetryAttributes.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import type { Attributes } from '@opentelemetry/api';
import type { Config } from '../config/config.js';
import { InstallationManager } from '../utils/installationManager.js';
import { UserAccountManager } from '../utils/userAccoun... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/telemetry/integration.test.circular.ts | packages/core/src/telemetry/integration.test.circular.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
/**
* Integration test to verify circular reference handling with proxy agents
*/
import { describe, it, expect } from 'vitest';
import { ClearcutLogger } from './clearcut-logger/clearcut-logger.js';
import type { Config } from ... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/telemetry/high-water-mark-tracker.ts | packages/core/src/telemetry/high-water-mark-tracker.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
/**
* High-water mark tracker for memory metrics
* Only triggers when memory usage increases by a significant threshold
*/
export class HighWaterMarkTracker {
private waterMarks: Map<string, number> = new Map();
private last... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/telemetry/config.test.ts | packages/core/src/telemetry/config.test.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { describe, it, expect } from 'vitest';
import {
parseBooleanEnvFlag,
parseTelemetryTargetValue,
resolveTelemetrySettings,
} from './config.js';
import { TelemetryTarget } from './index.js';
describe('telemetry/config... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/telemetry/activity-detector.test.ts | packages/core/src/telemetry/activity-detector.test.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
import {
ActivityDetector,
getActivityDetector,
recordUserActivity,
isUserActive,
} from './activity-detector.js';
describe('ActivityDetector', () =... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/telemetry/clearcut-logger/clearcut-logger.test.ts | packages/core/src/telemetry/clearcut-logger/clearcut-logger.test.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import 'vitest';
import {
vi,
describe,
it,
expect,
afterEach,
beforeAll,
afterAll,
beforeEach,
} from 'vitest';
import type { LogEvent, LogEventEntry } from './clearcut-logger.js';
import { ClearcutLogger, EventNam... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | true |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/telemetry/clearcut-logger/event-metadata-key.ts | packages/core/src/telemetry/clearcut-logger/event-metadata-key.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
// Defines valid event metadata keys for Clearcut logging.
export enum EventMetadataKey {
// Deleted enums: 24
// Next ID: 137
GEMINI_CLI_KEY_UNKNOWN = 0,
// ===============================================================... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/telemetry/clearcut-logger/clearcut-logger.ts | packages/core/src/telemetry/clearcut-logger/clearcut-logger.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { createHash } from 'node:crypto';
import { HttpsProxyAgent } from 'https-proxy-agent';
import type {
StartSessionEvent,
UserPromptEvent,
ToolCallEvent,
ApiRequestEvent,
ApiResponseEvent,
ApiErrorEvent,
LoopDet... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | true |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/resources/resource-registry.ts | packages/core/src/resources/resource-registry.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import type { Resource } from '@modelcontextprotocol/sdk/types.js';
const resourceKey = (serverName: string, uri: string): string =>
`${serverName}::${uri}`;
export interface MCPResource extends Resource {
serverName: string;... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/resources/resource-registry.test.ts | packages/core/src/resources/resource-registry.test.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { describe, expect, it, beforeEach } from 'vitest';
import type { Resource } from '@modelcontextprotocol/sdk/types.js';
import { ResourceRegistry } from './resource-registry.js';
describe('ResourceRegistry', () => {
let r... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/mcp/google-auth-provider.test.ts | packages/core/src/mcp/google-auth-provider.test.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { GoogleAuth } from 'google-auth-library';
import { GoogleCredentialProvider } from './google-auth-provider.js';
import type { Mock } from 'vitest';
import { vi, describe, beforeEach, it, expect } from 'vitest';
import type ... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/mcp/oauth-utils.test.ts | packages/core/src/mcp/oauth-utils.test.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
import type {
OAuthAuthorizationServerMetadata,
OAuthProtectedResourceMetadata,
} from './oauth-utils.js';
import { OAuthUtils } from './oauth-utils.js';... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/mcp/google-auth-provider.ts | packages/core/src/mcp/google-auth-provider.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import type { McpAuthProvider } from './auth-provider.js';
import type {
OAuthClientInformation,
OAuthClientInformationFull,
OAuthClientMetadata,
OAuthTokens,
} from '@modelcontextprotocol/sdk/shared/auth.js';
import { Goog... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/mcp/auth-provider.ts | packages/core/src/mcp/auth-provider.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import type { OAuthClientProvider } from '@modelcontextprotocol/sdk/client/auth.js';
/**
* Extension of OAuthClientProvider that allows providers to inject custom headers
* into the transport request.
*/
export interface McpAut... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/mcp/oauth-utils.ts | packages/core/src/mcp/oauth-utils.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import type { MCPOAuthConfig } from './oauth-provider.js';
import { getErrorMessage } from '../utils/errors.js';
import { debugLogger } from '../utils/debugLogger.js';
/**
* Error thrown when the discovered resource metadata does... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/mcp/oauth-provider.test.ts | packages/core/src/mcp/oauth-provider.test.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { vi } from 'vitest';
// Mock dependencies AT THE TOP
const mockOpenBrowserSecurely = vi.hoisted(() => vi.fn());
vi.mock('../utils/secure-browser-launcher.js', () => ({
openBrowserSecurely: mockOpenBrowserSecurely,
}));
v... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | true |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/mcp/oauth-token-storage.ts | packages/core/src/mcp/oauth-token-storage.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { coreEvents } from '../utils/events.js';
import { promises as fs } from 'node:fs';
import * as path from 'node:path';
import { Storage } from '../config/storage.js';
import { getErrorMessage } from '../utils/errors.js';
imp... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/mcp/sa-impersonation-provider.ts | packages/core/src/mcp/sa-impersonation-provider.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import type {
OAuthClientInformation,
OAuthClientInformationFull,
OAuthClientMetadata,
OAuthTokens,
} from '@modelcontextprotocol/sdk/shared/auth.js';
import { GoogleAuth } from 'google-auth-library';
import { OAuthUtils, F... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/mcp/oauth-token-storage.test.ts | packages/core/src/mcp/oauth-token-storage.test.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { coreEvents } from '../utils/events.js';
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
import { promises as fs } from 'node:fs';
import * as path from 'node:path';
import { MCPOAuthTokenStorage }... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/mcp/sa-impersonation-provider.test.ts | packages/core/src/mcp/sa-impersonation-provider.test.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { describe, it, expect, vi, beforeEach } from 'vitest';
import { ServiceAccountImpersonationProvider } from './sa-impersonation-provider.js';
import type { MCPServerConfig } from '../config/config.js';
const mockRequest = v... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/mcp/oauth-provider.ts | packages/core/src/mcp/oauth-provider.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import * as http from 'node:http';
import * as crypto from 'node:crypto';
import type * as net from 'node:net';
import { URL } from 'node:url';
import type { EventEmitter } from 'node:events';
import { openBrowserSecurely } from '.... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | true |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/mcp/token-storage/base-token-storage.test.ts | packages/core/src/mcp/token-storage/base-token-storage.test.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { describe, it, expect, beforeEach } from 'vitest';
import { BaseTokenStorage } from './base-token-storage.js';
import type { OAuthCredentials, OAuthToken } from './types.js';
class TestTokenStorage extends BaseTokenStorage... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/mcp/token-storage/keychain-token-storage.test.ts | packages/core/src/mcp/token-storage/keychain-token-storage.test.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
import type { KeychainTokenStorage } from './keychain-token-storage.js';
import type { OAuthCredentials } from './types.js';
import { coreEvents } from '../.... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/mcp/token-storage/hybrid-token-storage.test.ts | packages/core/src/mcp/token-storage/hybrid-token-storage.test.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
import { HybridTokenStorage } from './hybrid-token-storage.js';
import { KeychainTokenStorage } from './keychain-token-storage.js';
import { FileTokenStorage... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/mcp/token-storage/base-token-storage.ts | packages/core/src/mcp/token-storage/base-token-storage.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import type { TokenStorage, OAuthCredentials } from './types.js';
export abstract class BaseTokenStorage implements TokenStorage {
protected readonly serviceName: string;
constructor(serviceName: string) {
this.serviceNam... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/mcp/token-storage/keychain-token-storage.ts | packages/core/src/mcp/token-storage/keychain-token-storage.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import * as crypto from 'node:crypto';
import { BaseTokenStorage } from './base-token-storage.js';
import type { OAuthCredentials, SecretStorage } from './types.js';
import { coreEvents } from '../../utils/events.js';
interface Ke... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/mcp/token-storage/types.ts | packages/core/src/mcp/token-storage/types.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
/**
* Interface for OAuth tokens.
*/
export interface OAuthToken {
accessToken: string;
refreshToken?: string;
expiresAt?: number;
tokenType: string;
scope?: string;
}
/**
* Interface for stored OAuth credentials.
*/... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/mcp/token-storage/index.ts | packages/core/src/mcp/token-storage/index.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
export * from './types.js';
export * from './base-token-storage.js';
export * from './file-token-storage.js';
export * from './hybrid-token-storage.js';
export const DEFAULT_SERVICE_NAME = 'gemini-cli-oauth';
export const FORCE_EN... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/mcp/token-storage/hybrid-token-storage.ts | packages/core/src/mcp/token-storage/hybrid-token-storage.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { BaseTokenStorage } from './base-token-storage.js';
import { FileTokenStorage } from './file-token-storage.js';
import type { TokenStorage, OAuthCredentials } from './types.js';
import { TokenStorageType } from './types.js'... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/mcp/token-storage/file-token-storage.ts | packages/core/src/mcp/token-storage/file-token-storage.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { promises as fs } from 'node:fs';
import * as path from 'node:path';
import * as os from 'node:os';
import * as crypto from 'node:crypto';
import { BaseTokenStorage } from './base-token-storage.js';
import type { OAuthCrede... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/mcp/token-storage/file-token-storage.test.ts | packages/core/src/mcp/token-storage/file-token-storage.test.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
import { promises as fs } from 'node:fs';
import * as path from 'node:path';
import { FileTokenStorage } from './file-token-storage.js';
import type { OAuthC... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/__mocks__/fs/promises.ts | packages/core/src/__mocks__/fs/promises.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { vi } from 'vitest';
import * as actualFsPromises from 'node:fs/promises';
const readFileMock = vi.fn();
// Export a control object so tests can access and manipulate the mock
export const mockControl = {
mockReadFile: ... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/ide/process-utils.ts | packages/core/src/ide/process-utils.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { exec } from 'node:child_process';
import { promisify } from 'node:util';
import os from 'node:os';
import path from 'node:path';
const execAsync = promisify(exec);
const MAX_TRAVERSAL_DEPTH = 32;
interface ProcessInfo {... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/ide/ideContext.ts | packages/core/src/ide/ideContext.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import {
IDE_MAX_OPEN_FILES,
IDE_MAX_SELECTED_TEXT_LENGTH,
} from './constants.js';
import type { IdeContext } from './types.js';
type IdeContextSubscriber = (ideContext?: IdeContext) => void;
export class IdeContextStore {
... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/ide/ide-installer.ts | packages/core/src/ide/ide-installer.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import * as child_process from 'node:child_process';
import * as process from 'node:process';
import * as path from 'node:path';
import * as fs from 'node:fs';
import * as os from 'node:os';
import { IDE_DEFINITIONS, type IdeInfo }... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
google-gemini/gemini-cli | https://github.com/google-gemini/gemini-cli/blob/d3c206c6770d320953dff80c01d555ad64df5b8b/packages/core/src/ide/process-utils.test.ts | packages/core/src/ide/process-utils.test.ts | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import {
describe,
it,
expect,
vi,
afterEach,
beforeEach,
type Mock,
} from 'vitest';
import { getIdeProcessInfo } from './process-utils.js';
import os from 'node:os';
const mockedExec = vi.hoisted(() => vi.fn());
vi... | typescript | Apache-2.0 | d3c206c6770d320953dff80c01d555ad64df5b8b | 2026-01-04T15:25:31.833747Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.