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/ide/detect-ide.test.ts
packages/core/src/ide/detect-ide.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { describe, it, expect, vi, afterEach, beforeEach } from 'vitest'; import { detectIde, IDE_DEFINITIONS } from './detect-ide.js'; beforeEach(() => { // Ensure Antigravity detection doesn't interfere with other tests vi.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/ide/ide-client.ts
packages/core/src/ide/ide-client.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import * as fs from 'node:fs'; import { isSubpath } from '../utils/paths.js'; import { detectIde, type IdeInfo } from '../ide/detect-ide.js'; import { ideContextStore } from './ideContext.js'; import { IdeContextNotificationSchem...
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.test.ts
packages/core/src/ide/ideContext.test.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 { describe, it, expect, beforeEach, vi, afterEach } from 'vitest'; import { IdeContextStore } from './ideContext.js'; import { type Id...
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/constants.ts
packages/core/src/ide/constants.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ export const GEMINI_CLI_COMPANION_EXTENSION_NAME = 'Gemini CLI Companion'; export const IDE_MAX_OPEN_FILES = 10; export const IDE_MAX_SELECTED_TEXT_LENGTH = 16384; // 16 KiB limit export const IDE_REQUEST_TIMEOUT_MS = 10 * 60 * 100...
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-client.test.ts
packages/core/src/ide/ide-client.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 { IdeClient, IDEConnectionStatus } from './ide-client.js'; import * as fs from 'node:fs'; import { getIdeProc...
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/detect-ide.ts
packages/core/src/ide/detect-ide.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ export const IDE_DEFINITIONS = { devin: { name: 'devin', displayName: 'Devin' }, replit: { name: 'replit', displayName: 'Replit' }, cursor: { name: 'cursor', displayName: 'Cursor' }, cloudshell: { name: 'cloudshell', displa...
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/types.ts
packages/core/src/ide/types.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { z } from 'zod'; /** * A file that is open in the IDE. */ export const FileSchema = z.object({ /** * The absolute path to the file. */ path: z.string(), /** * The unix timestamp of when the file was last 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/ide/ide-installer.test.ts
packages/core/src/ide/ide-installer.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { vi } from 'vitest'; vi.mock('node:child_process', async (importOriginal) => { const actual = await importOriginal(); return { ...(actual as object), execSync: vi.fn(), spawnSync: vi.fn(() => ({ status: 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/output/json-formatter.ts
packages/core/src/output/json-formatter.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import stripAnsi from 'strip-ansi'; import type { SessionMetrics } from '../telemetry/uiTelemetry.js'; import type { JsonError, JsonOutput } from './types.js'; export class JsonFormatter { format( sessionId?: string, res...
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/output/json-formatter.test.ts
packages/core/src/output/json-formatter.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { expect, describe, it } from 'vitest'; import type { SessionMetrics } from '../telemetry/uiTelemetry.js'; import { JsonFormatter } from './json-formatter.js'; import type { JsonError } from './types.js'; describe('JsonForm...
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/output/stream-json-formatter.test.ts
packages/core/src/output/stream-json-formatter.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'; import { StreamJsonFormatter } from './stream-json-formatter.js'; import { JsonStreamEventType } from './types.js'; import type { InitEvent, MessageEvent...
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/output/stream-json-formatter.ts
packages/core/src/output/stream-json-formatter.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import type { JsonStreamEvent, StreamStats } from './types.js'; import type { SessionMetrics } from '../telemetry/uiTelemetry.js'; /** * Formatter for streaming JSON output. * Emits newline-delimited JSON (JSONL) events to stdou...
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/output/types.ts
packages/core/src/output/types.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import type { SessionMetrics } from '../telemetry/uiTelemetry.js'; export enum OutputFormat { TEXT = 'text', JSON = 'json', STREAM_JSON = 'stream-json', } export interface JsonError { type: string; message: string; co...
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/policy/config.ts
packages/core/src/policy/config.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import * as fs from 'node:fs/promises'; import * as path from 'node:path'; import { fileURLToPath } from 'node:url'; import { Storage } from '../config/storage.js'; import { type PolicyEngineConfig, PolicyDecision, type Polic...
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/policy/policy-engine.test.ts
packages/core/src/policy/policy-engine.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { describe, it, expect, beforeEach, beforeAll, vi } from 'vitest'; import { PolicyEngine } from './policy-engine.js'; import { PolicyDecision, type PolicyRule, type PolicyEngineConfig, type SafetyCheckerRule, InPro...
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/policy/policy-engine.ts
packages/core/src/policy/policy-engine.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { type FunctionCall } from '@google/genai'; import { PolicyDecision, type PolicyEngineConfig, type PolicyRule, type SafetyCheckerRule, type HookCheckerRule, type HookExecutionContext, getHookSource, ApprovalM...
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/policy/shell-safety.test.ts
packages/core/src/policy/shell-safety.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { describe, it, expect, beforeEach } from 'vitest'; import { PolicyEngine } from './policy-engine.js'; import { PolicyDecision, ApprovalMode } from './types.js'; import type { FunctionCall } from '@google/genai'; describe('...
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/policy/utils.ts
packages/core/src/policy/utils.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ /** * Escapes a string for use in a regular expression. */ export function escapeRegex(text: string): string { return text.replace(/[-[\]{}()*+?.,\\^$|#\s"]/g, '\\$&'); } /** * Builds a list of args patterns for policy matchi...
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/policy/toml-loader.test.ts
packages/core/src/policy/toml-loader.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { describe, it, expect, beforeEach, afterEach } from 'vitest'; import { PolicyDecision } from './types.js'; import * as fs from 'node:fs/promises'; import * as path from 'node:path'; import * as os from 'node:os'; import { l...
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/policy/persistence.test.ts
packages/core/src/policy/persistence.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 * as fs from 'node:fs/promises'; import * as path from 'node:path'; import { createPolicyUpdater } from './config.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/policy/utils.test.ts
packages/core/src/policy/utils.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { describe, it, expect } from 'vitest'; import { escapeRegex, buildArgsPatterns } from './utils.js'; describe('policy/utils', () => { describe('escapeRegex', () => { it('should escape special regex characters', () => ...
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/policy/types.ts
packages/core/src/policy/types.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import type { SafetyCheckInput } from '../safety/protocol.js'; export enum PolicyDecision { ALLOW = 'allow', DENY = 'deny', ASK_USER = 'ask_user', } /** * Valid sources for hook execution */ export type HookSource = 'proj...
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/policy/policy-updater.test.ts
packages/core/src/policy/policy-updater.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'; import * as fs from 'node:fs/promises'; import { createPolicyUpdater } from './config.js'; import { PolicyEngine } from './policy-engine.js'; import { Messag...
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/policy/index.ts
packages/core/src/policy/index.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ export * from './policy-engine.js'; export * from './types.js'; export * from './toml-loader.js'; export * from './config.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/policy/stable-stringify.ts
packages/core/src/policy/stable-stringify.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ /** * Produces a stable, deterministic JSON string representation with sorted keys. * * This method is critical for security policy matching. It ensures that the same * object always produces the same string representation, reg...
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/policy/toml-loader.ts
packages/core/src/policy/toml-loader.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { type PolicyRule, PolicyDecision, ApprovalMode, type SafetyCheckerConfig, type SafetyCheckerRule, InProcessCheckerType, } from './types.js'; import { buildArgsPatterns } from './utils.js'; import fs from 'node: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/policy/config.test.ts
packages/core/src/policy/config.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { describe, it, expect, vi, afterEach, beforeEach } from 'vitest'; import nodePath from 'node:path'; import type { PolicySettings } from './types.js'; import { ApprovalMode, PolicyDecision, InProcessCheckerType } from './t...
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/cli/vitest.config.ts
packages/cli/vitest.config.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ /// <reference types="vitest" /> import { defineConfig } from 'vitest/config'; import { fileURLToPath } from 'node:url'; import * as path from 'node:path'; const __dirname = path.dirname(fileURLToPath(import.meta.url)); export de...
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/cli/test-setup.ts
packages/cli/test-setup.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { vi, beforeEach, afterEach } from 'vitest'; import { format } from 'node:util'; global.IS_REACT_ACT_ENVIRONMENT = true; // Unset NO_COLOR environment variable to ensure consistent theme behavior between local and CI test ...
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/cli/index.ts
packages/cli/index.ts
#!/usr/bin/env node /** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { main } from './src/gemini.js'; import { FatalError, writeToStderr } from '@google/gemini-cli-core'; import { runExitCleanup } from './src/utils/cleanup.js'; // --- Global Entry Point --- main().catch(...
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/cli/src/gemini_cleanup.test.tsx
packages/cli/src/gemini_cleanup.test.tsx
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'; import { main } from './gemini.js'; import { debugLogger } from '@google/gemini-cli-core'; import { type Config } from '@google/gemini-cli-core'; // Custom ...
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/cli/src/gemini.test.tsx
packages/cli/src/gemini.test.tsx
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { describe, it, expect, vi, beforeEach, afterEach, type MockInstance, } from 'vitest'; import { main, setupUnhandledRejectionHandler, validateDnsResolutionOrder, startInteractiveUI, getNodeMemoryArgs,...
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/cli/src/nonInteractiveCli.ts
packages/cli/src/nonInteractiveCli.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import type { Config, ToolCallRequestInfo, ResumedSessionData, CompletedToolCall, UserFeedbackPayload, } from '@google/gemini-cli-core'; import { isSlashCommand } from './ui/utils/commandUtils.js'; import type { LoadedSet...
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/cli/src/validateNonInterActiveAuth.ts
packages/cli/src/validateNonInterActiveAuth.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import type { Config } from '@google/gemini-cli-core'; import { AuthType, debugLogger, OutputFormat, ExitCodes, } from '@google/gemini-cli-core'; import { USER_SETTINGS_PATH } from './config/settings.js'; import { validateA...
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/cli/src/nonInteractiveCli.test.ts
packages/cli/src/nonInteractiveCli.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import type { Config, ToolRegistry, ServerGeminiStreamEvent, SessionMetrics, AnyDeclarativeTool, AnyToolInvocation, UserFeedbackPayload, } from '@google/gemini-cli-core'; import { executeToolCall, ToolErrorType, ...
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/cli/src/validateNonInterActiveAuth.test.ts
packages/cli/src/validateNonInterActiveAuth.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { describe, it, expect, vi, beforeEach, afterEach, type MockInstance, } from 'vitest'; import { validateNonInteractiveAuth } from './validateNonInterActiveAuth.js'; import { AuthType, OutputFormat, makeFa...
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/cli/src/nonInteractiveCliCommands.ts
packages/cli/src/nonInteractiveCliCommands.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import type { PartListUnion } from '@google/genai'; import { parseSlashCommand } from './utils/commands.js'; import { FatalInputError, Logger, uiTelemetryService, type Config, } from '@google/gemini-cli-core'; import { Comm...
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/cli/src/gemini.tsx
packages/cli/src/gemini.tsx
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import React from 'react'; import { render } from 'ink'; import { AppContainer } from './ui/AppContainer.js'; import { loadCliConfig, parseArguments } from './config/config.js'; import * as cliConfig from './config/config.js'; impo...
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/cli/src/services/BuiltinCommandLoader.ts
packages/cli/src/services/BuiltinCommandLoader.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { isDevelopment } from '../utils/installationInfo.js'; import type { ICommandLoader } from './types.js'; import type { SlashCommand } from '../ui/commands/types.js'; import type { Config } from '@google/gemini-cli-core'; 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/cli/src/services/CommandService.test.ts
packages/cli/src/services/CommandService.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { vi, describe, it, expect, beforeEach, afterEach } from 'vitest'; import { CommandService } from './CommandService.js'; import { type ICommandLoader } from './types.js'; import { CommandKind, type SlashCommand } from '../ui...
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/cli/src/services/BuiltinCommandLoader.test.ts
packages/cli/src/services/BuiltinCommandLoader.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ vi.mock('../ui/commands/profileCommand.js', async () => { const { CommandKind } = await import('../ui/commands/types.js'); return { profileCommand: { name: 'profile', description: 'Profile command', kind: ...
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/cli/src/services/FileCommandLoader.ts
packages/cli/src/services/FileCommandLoader.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { promises as fs } from 'node:fs'; import path from 'node:path'; import toml from '@iarna/toml'; import { glob } from 'glob'; import { z } from 'zod'; import type { Config } from '@google/gemini-cli-core'; import { Storage, ...
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/cli/src/services/FileCommandLoader.test.ts
packages/cli/src/services/FileCommandLoader.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import * as glob from 'glob'; import * as path from 'node:path'; import type { Config } from '@google/gemini-cli-core'; import { GEMINI_DIR, Storage } from '@google/gemini-cli-core'; import mock from 'mock-fs'; import { FileCommand...
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/cli/src/services/types.ts
packages/cli/src/services/types.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import type { SlashCommand } from '../ui/commands/types.js'; /** * Defines the contract for any class that can load and provide slash commands. * This allows the CommandService to be extended with new command sources * (e.g., 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/cli/src/services/McpPromptLoader.test.ts
packages/cli/src/services/McpPromptLoader.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { McpPromptLoader } from './McpPromptLoader.js'; import type { Config } from '@google/gemini-cli-core'; import type { PromptArgument } from '@modelcontextprotocol/sdk/types.js'; import { describe, it, expect, vi, 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/cli/src/services/McpPromptLoader.ts
packages/cli/src/services/McpPromptLoader.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import type { Config } from '@google/gemini-cli-core'; import { getErrorMessage, getMCPServerPrompts } from '@google/gemini-cli-core'; import type { CommandContext, SlashCommand, SlashCommandActionReturn, } from '../ui/comman...
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/cli/src/services/CommandService.ts
packages/cli/src/services/CommandService.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { debugLogger } from '@google/gemini-cli-core'; import type { SlashCommand } from '../ui/commands/types.js'; import type { ICommandLoader } from './types.js'; /** * Orchestrates the discovery and loading of all slash comma...
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/cli/src/services/prompt-processors/shellProcessor.ts
packages/cli/src/services/prompt-processors/shellProcessor.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { ApprovalMode, checkCommandPermissions, escapeShellArg, getShellConfiguration, ShellExecutionService, flatMapTextParts, } from '@google/gemini-cli-core'; import type { CommandContext } from '../../ui/commands/t...
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/cli/src/services/prompt-processors/shellProcessor.test.ts
packages/cli/src/services/prompt-processors/shellProcessor.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { describe, it, expect, beforeEach, vi, type Mock } from 'vitest'; import { ConfirmationRequiredError, ShellProcessor } from './shellProcessor.js'; import { createMockCommandContext } from '../../test-utils/mockCommandContex...
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/cli/src/services/prompt-processors/atFileProcessor.ts
packages/cli/src/services/prompt-processors/atFileProcessor.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { debugLogger, flatMapTextParts, readPathFromWorkspace, } from '@google/gemini-cli-core'; import type { CommandContext } from '../../ui/commands/types.js'; import { MessageType } from '../../ui/types.js'; import { AT...
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/cli/src/services/prompt-processors/argumentProcessor.ts
packages/cli/src/services/prompt-processors/argumentProcessor.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { appendToLastTextPart } from '@google/gemini-cli-core'; import type { IPromptProcessor, PromptPipelineContent } from './types.js'; import type { CommandContext } from '../../ui/commands/types.js'; /** * Appends the user'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/cli/src/services/prompt-processors/injectionParser.ts
packages/cli/src/services/prompt-processors/injectionParser.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ /** * Represents a single detected injection site in a prompt string. */ export interface Injection { /** The content extracted from within the braces (e.g., the command or path), trimmed. */ content: string; /** The starti...
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/cli/src/services/prompt-processors/argumentProcessor.test.ts
packages/cli/src/services/prompt-processors/argumentProcessor.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { DefaultArgumentProcessor } from './argumentProcessor.js'; import { createMockCommandContext } from '../../test-utils/mockCommandContext.js'; import { describe, it, expect } from 'vitest'; describe('Argument Processors', (...
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/cli/src/services/prompt-processors/types.ts
packages/cli/src/services/prompt-processors/types.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import type { CommandContext } from '../../ui/commands/types.js'; import type { PartUnion } from '@google/genai'; /** * Defines the input/output type for prompt processors. */ export type PromptPipelineContent = PartUnion[]; /*...
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/cli/src/services/prompt-processors/injectionParser.test.ts
packages/cli/src/services/prompt-processors/injectionParser.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { describe, it, expect } from 'vitest'; import { extractInjections } from './injectionParser.js'; describe('extractInjections', () => { const SHELL_TRIGGER = '!{'; const AT_FILE_TRIGGER = '@{'; describe('Basic Functi...
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/cli/src/services/prompt-processors/atFileProcessor.test.ts
packages/cli/src/services/prompt-processors/atFileProcessor.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { describe, it, expect, beforeEach, vi } from 'vitest'; import { createMockCommandContext } from '../../test-utils/mockCommandContext.js'; import { type CommandContext } from '../../ui/commands/types.js'; import { AtFileProc...
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/cli/src/commands/extensions.test.tsx
packages/cli/src/commands/extensions.test.tsx
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { describe, it, expect, vi } from 'vitest'; import { extensionsCommand } from './extensions.js'; // Mock subcommands vi.mock('./extensions/install.js', () => ({ installCommand: { command: 'install' }, })); vi.mock('./exte...
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/cli/src/commands/utils.ts
packages/cli/src/commands/utils.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { runExitCleanup } from '../utils/cleanup.js'; export async function exitCli(exitCode = 0) { await runExitCleanup(); process.exit(exitCode); }
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/cli/src/commands/extensions.tsx
packages/cli/src/commands/extensions.tsx
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import type { CommandModule } from 'yargs'; import { installCommand } from './extensions/install.js'; import { uninstallCommand } from './extensions/uninstall.js'; import { listCommand } from './extensions/list.js'; import { update...
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/cli/src/commands/utils.test.ts
packages/cli/src/commands/utils.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'; import { exitCli } from './utils.js'; import { runExitCleanup } from '../utils/cleanup.js'; vi.mock('../utils/cleanup.js', () => ({ runExitCleanup: vi.fn(...
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/cli/src/commands/mcp.test.ts
packages/cli/src/commands/mcp.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { describe, it, expect, vi } from 'vitest'; import { mcpCommand } from './mcp.js'; import { type Argv } from 'yargs'; import yargs from 'yargs'; describe('mcp command', () => { it('should have correct command definition',...
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/cli/src/commands/mcp.ts
packages/cli/src/commands/mcp.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ // File for 'gemini mcp' command import type { CommandModule, Argv } from 'yargs'; import { addCommand } from './mcp/add.js'; import { removeCommand } from './mcp/remove.js'; import { listCommand } from './mcp/list.js'; import { in...
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/cli/src/commands/hooks.tsx
packages/cli/src/commands/hooks.tsx
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import type { CommandModule } from 'yargs'; import { migrateCommand } from './hooks/migrate.js'; import { initializeOutputListenersAndFlush } from '../gemini.js'; export const hooksCommand: CommandModule = { command: 'hooks <com...
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/cli/src/commands/extensions/validate.test.ts
packages/cli/src/commands/extensions/validate.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import * as fs from 'node:fs'; import { describe, it, expect, vi, beforeEach, afterEach, type MockInstance, } from 'vitest'; import { handleValidate, validateCommand } from './validate.js'; import yargs from 'yargs'; ...
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/cli/src/commands/extensions/install.test.ts
packages/cli/src/commands/extensions/install.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { describe, it, expect, vi, beforeEach, afterEach, type MockInstance, type Mock, } from 'vitest'; import { handleInstall, installCommand } from './install.js'; import yargs from 'yargs'; import { 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/cli/src/commands/extensions/disable.ts
packages/cli/src/commands/extensions/disable.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { type CommandModule } from 'yargs'; import { loadSettings, SettingScope } from '../../config/settings.js'; import { getErrorMessage } from '../../utils/errors.js'; import { debugLogger } from '@google/gemini-cli-core'; impo...
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/cli/src/commands/extensions/uninstall.test.ts
packages/cli/src/commands/extensions/uninstall.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { vi, describe, it, expect, beforeEach, afterEach, type Mock, } from 'vitest'; import { format } from 'node:util'; import { type Argv } from 'yargs'; import { handleUninstall, uninstallCommand } from './uninsta...
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/cli/src/commands/extensions/update.test.ts
packages/cli/src/commands/extensions/update.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { vi, describe, it, expect, beforeEach, afterEach, type Mock, } from 'vitest'; import { format } from 'node:util'; import { type Argv } from 'yargs'; import { handleUpdate, updateCommand } from './update.js'; i...
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/cli/src/commands/extensions/link.ts
packages/cli/src/commands/extensions/link.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import type { CommandModule } from 'yargs'; import { debugLogger, type ExtensionInstallMetadata, } from '@google/gemini-cli-core'; import { getErrorMessage } from '../../utils/errors.js'; import { INSTALL_WARNING_MESSAGE, ...
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/cli/src/commands/extensions/install.ts
packages/cli/src/commands/extensions/install.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import type { CommandModule } from 'yargs'; import { debugLogger } from '@google/gemini-cli-core'; import { getErrorMessage } from '../../utils/errors.js'; import { INSTALL_WARNING_MESSAGE, requestConsentNonInteractive, } 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/cli/src/commands/extensions/enable.ts
packages/cli/src/commands/extensions/enable.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { type CommandModule } from 'yargs'; import { loadSettings, SettingScope } from '../../config/settings.js'; import { requestConsentNonInteractive } from '../../config/extensions/consent.js'; import { ExtensionManager } 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/cli/src/commands/extensions/utils.ts
packages/cli/src/commands/extensions/utils.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { ExtensionManager } from '../../config/extension-manager.js'; import { promptForSetting } from '../../config/extensions/extensionSettings.js'; import { loadSettings } from '../../config/settings.js'; import { requestConsent...
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/cli/src/commands/extensions/list.test.ts
packages/cli/src/commands/extensions/list.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { vi, describe, it, expect, beforeEach, afterEach } from 'vitest'; import { format } from 'node:util'; import { handleList, listCommand } from './list.js'; import { ExtensionManager } from '../../config/extension-manager.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/cli/src/commands/extensions/new.test.ts
packages/cli/src/commands/extensions/new.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import { newCommand } from './new.js'; import yargs from 'yargs'; import * as fsPromises from 'node:fs/promises'; import path from 'node:path'; vi.mock('node:fs/promis...
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/cli/src/commands/extensions/update.ts
packages/cli/src/commands/extensions/update.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import type { CommandModule } from 'yargs'; import { updateAllUpdatableExtensions, type ExtensionUpdateInfo, checkForAllExtensionUpdates, updateExtension, } from '../../config/extensions/update.js'; import { checkForExtensi...
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/cli/src/commands/extensions/link.test.ts
packages/cli/src/commands/extensions/link.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { vi, describe, it, expect, beforeEach, afterEach, type Mock, } from 'vitest'; import { format } from 'node:util'; import { type Argv } from 'yargs'; import { handleLink, linkCommand } from './link.js'; 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/cli/src/commands/extensions/disable.test.ts
packages/cli/src/commands/extensions/disable.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { vi, describe, it, expect, beforeEach, afterEach, type Mock, } from 'vitest'; import { format } from 'node:util'; import { type Argv } from 'yargs'; import { handleDisable, disableCommand } from './disable.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/cli/src/commands/extensions/settings.ts
packages/cli/src/commands/extensions/settings.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import type { CommandModule } from 'yargs'; import { updateSetting, promptForSetting, ExtensionSettingScope, getScopedEnvContents, } from '../../config/extensions/extensionSettings.js'; import { getExtensionAndManager } fro...
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/cli/src/commands/extensions/uninstall.ts
packages/cli/src/commands/extensions/uninstall.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import type { CommandModule } from 'yargs'; import { getErrorMessage } from '../../utils/errors.js'; import { debugLogger } from '@google/gemini-cli-core'; import { requestConsentNonInteractive } from '../../config/extensions/conse...
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/cli/src/commands/extensions/enable.test.ts
packages/cli/src/commands/extensions/enable.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { vi, describe, it, expect, beforeEach, afterEach, type Mock, } from 'vitest'; import { format } from 'node:util'; import { type Argv } from 'yargs'; import { handleEnable, enableCommand } from './enable.js'; i...
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/cli/src/commands/extensions/validate.ts
packages/cli/src/commands/extensions/validate.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import type { CommandModule } from 'yargs'; import { debugLogger } from '@google/gemini-cli-core'; import * as fs from 'node:fs'; import * as path from 'node:path'; import semver from 'semver'; import { getErrorMessage } 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/cli/src/commands/extensions/list.ts
packages/cli/src/commands/extensions/list.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import type { CommandModule } from 'yargs'; import { getErrorMessage } from '../../utils/errors.js'; import { debugLogger } from '@google/gemini-cli-core'; import { ExtensionManager } from '../../config/extension-manager.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/cli/src/commands/extensions/new.ts
packages/cli/src/commands/extensions/new.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { access, cp, mkdir, readdir, writeFile } from 'node:fs/promises'; import { join, dirname, basename } from 'node:path'; import type { CommandModule } from 'yargs'; import { fileURLToPath } from 'node:url'; import { debugLogg...
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/cli/src/commands/extensions/examples/mcp-server/example.test.ts
packages/cli/src/commands/extensions/examples/mcp-server/example.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'; import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'; 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/cli/src/commands/extensions/examples/mcp-server/example.ts
packages/cli/src/commands/extensions/examples/mcp-server/example.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'; import { z } from 'zod'; const server = new McpServer({ name: 'prompt-server'...
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/cli/src/commands/hooks/migrate.ts
packages/cli/src/commands/hooks/migrate.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import type { CommandModule } from 'yargs'; import * as fs from 'node:fs'; import * as path from 'node:path'; import { debugLogger, getErrorMessage } from '@google/gemini-cli-core'; import { loadSettings, SettingScope } 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/cli/src/commands/hooks/migrate.test.ts
packages/cli/src/commands/hooks/migrate.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { describe, it, expect, vi, beforeEach, afterEach, type Mock, type MockInstance, } from 'vitest'; import * as fs from 'node:fs'; import { loadSettings, SettingScope } from '../../config/settings.js'; 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/cli/src/commands/mcp/add.test.ts
packages/cli/src/commands/mcp/add.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { describe, it, expect, vi, beforeEach, type Mock, type MockInstance, } from 'vitest'; import yargs, { type Argv } from 'yargs'; import { addCommand } from './add.js'; import { loadSettings, SettingScope } 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/cli/src/commands/mcp/list.test.ts
packages/cli/src/commands/mcp/list.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { vi, describe, it, expect, beforeEach, type Mock } from 'vitest'; import { listMcpServers } from './list.js'; import { loadSettings } from '../../config/settings.js'; import { createTransport, debugLogger } 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/cli/src/commands/mcp/remove.ts
packages/cli/src/commands/mcp/remove.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ // File for 'gemini mcp remove' command import type { CommandModule } from 'yargs'; import { loadSettings, SettingScope } from '../../config/settings.js'; import { debugLogger } from '@google/gemini-cli-core'; import { exitCli } fr...
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/cli/src/commands/mcp/add.ts
packages/cli/src/commands/mcp/add.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ // File for 'gemini mcp add' command import type { CommandModule } from 'yargs'; import { loadSettings, SettingScope } from '../../config/settings.js'; import { debugLogger, type MCPServerConfig } from '@google/gemini-cli-core'; im...
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/cli/src/commands/mcp/remove.test.ts
packages/cli/src/commands/mcp/remove.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { vi, describe, it, expect, beforeEach, afterEach, type Mock, } from 'vitest'; import yargs, { type Argv } from 'yargs'; import { SettingScope, type LoadedSettings } from '../../config/settings.js'; import { re...
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/cli/src/commands/mcp/list.ts
packages/cli/src/commands/mcp/list.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ // File for 'gemini mcp list' command import type { CommandModule } from 'yargs'; import { loadSettings } from '../../config/settings.js'; import type { MCPServerConfig } from '@google/gemini-cli-core'; import { MCPServerStatus, ...
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/cli/src/zed-integration/zedIntegration.test.ts
packages/cli/src/zed-integration/zedIntegration.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { describe, it, expect, vi, beforeEach, afterEach, type Mock, type Mocked, } from 'vitest'; import { GeminiAgent, Session } from './zedIntegration.js'; import * as acp from '@agentclientprotocol/sdk'; 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/cli/src/zed-integration/fileSystemService.test.ts
packages/cli/src/zed-integration/fileSystemService.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { describe, it, expect, vi, beforeEach, type Mocked } from 'vitest'; import { AcpFileSystemService } from './fileSystemService.js'; import type { AgentSideConnection } from '@agentclientprotocol/sdk'; import type { FileSyste...
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/cli/src/zed-integration/zedIntegration.ts
packages/cli/src/zed-integration/zedIntegration.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import type { Config, GeminiChat, ToolResult, ToolCallConfirmationDetails, FilterFilesOptions, } from '@google/gemini-cli-core'; import { AuthType, logToolCall, convertToFunctionResponse, ToolConfirmationOutcome, ...
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/cli/src/zed-integration/fileSystemService.ts
packages/cli/src/zed-integration/fileSystemService.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import type { FileSystemService } from '@google/gemini-cli-core'; import type * as acp from '@agentclientprotocol/sdk'; /** * ACP client-based implementation of FileSystemService */ export class AcpFileSystemService implements 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/cli/src/utils/math.test.ts
packages/cli/src/utils/math.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { describe, it, expect } from 'vitest'; import { lerp } from './math.js'; describe('math', () => { describe('lerp', () => { it.each([ [0, 10, 0, 0], [0, 10, 1, 10], [0, 10, 0.5, 5], [10, 20, 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/cli/src/utils/sessionUtils.ts
packages/cli/src/utils/sessionUtils.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import type { Config, ConversationRecord, MessageRecord, } from '@google/gemini-cli-core'; import { partListUnionToString, SESSION_FILE_PREFIX, } from '@google/gemini-cli-core'; import * as fs from 'node:fs/promises'; 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/cli/src/utils/events.test.ts
packages/cli/src/utils/events.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { describe, it, expect, vi } from 'vitest'; import { appEvents, AppEvent } from './events.js'; describe('events', () => { it('should allow registering and emitting events', () => { const callback = vi.fn(); appEve...
typescript
Apache-2.0
d3c206c6770d320953dff80c01d555ad64df5b8b
2026-01-04T15:25:31.833747Z
false