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/cli/src/ui/utils/bracketedPaste.ts
packages/cli/src/ui/utils/bracketedPaste.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { writeToStdout } from '@google/gemini-cli-core'; const ENABLE_BRACKETED_PASTE = '\x1b[?2004h'; const DISABLE_BRACKETED_PASTE = '\x1b[?2004l'; export const enableBracketedPaste = () => { writeToStdout(ENABLE_BRACKETED_PA...
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/ui/utils/CodeColorizer.test.tsx
packages/cli/src/ui/utils/CodeColorizer.test.tsx
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { describe, it, expect } from 'vitest'; import { colorizeCode } from './CodeColorizer.js'; import { renderWithProviders } from '../../test-utils/render.js'; import { LoadedSettings } from '../../config/settings.js'; describ...
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/ui/utils/terminalSetup.test.ts
packages/cli/src/ui/utils/terminalSetup.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'; import { terminalSetup, VSCODE_SHIFT_ENTER_SEQUENCE } from './terminalSetup.js'; // Mock dependencies const mocks = vi.hoisted(() => ({ exec: vi.fn(), m...
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/ui/utils/CodeColorizer.tsx
packages/cli/src/ui/utils/CodeColorizer.tsx
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import React from 'react'; import { Text, Box } from 'ink'; import { common, createLowlight } from 'lowlight'; import type { Root, Element, Text as HastText, ElementContent, RootContent, } from 'hast'; import { themeManag...
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/ui/utils/computeStats.ts
packages/cli/src/ui/utils/computeStats.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import type { SessionMetrics, ComputedSessionStats, ModelMetrics, } from '../contexts/SessionContext.js'; export function calculateErrorRate(metrics: ModelMetrics): number { if (metrics.api.totalRequests === 0) { retur...
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/ui/utils/commandUtils.test.ts
packages/cli/src/ui/utils/commandUtils.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import type { Mock } from 'vitest'; import { vi, describe, it, expect, beforeEach } from 'vitest'; import { EventEmitter } from 'node:events'; import clipboardy from 'clipboardy'; import { isAtCommand, isSlashCommand, copyToC...
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/ui/utils/highlight.test.ts
packages/cli/src/ui/utils/highlight.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { describe, it, expect } from 'vitest'; import { parseInputForHighlighting } from './highlight.js'; describe('parseInputForHighlighting', () => { it('should handle an empty string', () => { expect(parseInputForHighlig...
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/ui/utils/clipboardUtils.windows.test.ts
packages/cli/src/ui/utils/clipboardUtils.windows.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 { saveClipboardImage } from './clipboardUtils.js'; // Mock dependencies vi.mock('node:fs/promises'); vi.mock(...
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/ui/utils/markdownUtilities.ts
packages/cli/src/ui/utils/markdownUtilities.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ /* **Background & Purpose:** The `findSafeSplitPoint` function is designed to address the challenge of displaying or processing large, potentially streaming, pieces of Markdown text. When content (e.g., from an LLM like Gemini) ar...
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/ui/utils/InlineMarkdownRenderer.test.ts
packages/cli/src/ui/utils/InlineMarkdownRenderer.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { getPlainTextLength } from './InlineMarkdownRenderer.js'; import { describe, it, expect } from 'vitest'; describe('getPlainTextLength', () => { it.each([ ['**Primary Go', 12], ['*Primary Go', 11], ['**Primary...
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/ui/utils/displayUtils.test.ts
packages/cli/src/ui/utils/displayUtils.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { describe, it, expect } from 'vitest'; import { getStatusColor, TOOL_SUCCESS_RATE_HIGH, TOOL_SUCCESS_RATE_MEDIUM, USER_AGREEMENT_RATE_HIGH, USER_AGREEMENT_RATE_MEDIUM, CACHE_EFFICIENCY_HIGH, CACHE_EFFICIENCY_M...
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/ui/utils/InlineMarkdownRenderer.tsx
packages/cli/src/ui/utils/InlineMarkdownRenderer.tsx
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import React from 'react'; import { Text } from 'ink'; import { theme } from '../semantic-colors.js'; import stringWidth from 'string-width'; import { debugLogger } from '@google/gemini-cli-core'; // Constants for Markdown parsing...
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/ui/utils/textUtils.test.ts
packages/cli/src/ui/utils/textUtils.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { describe, it, expect } from 'vitest'; import type { ToolCallConfirmationDetails, ToolEditConfirmationDetails, } from '@google/gemini-cli-core'; import { escapeAnsiCtrlCodes, stripUnsafeCharacters } from './textUtils.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/ui/utils/updateCheck.test.ts
packages/cli/src/ui/utils/updateCheck.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { vi, describe, it, expect, beforeEach, afterEach } from 'vitest'; import { checkForUpdates } from './updateCheck.js'; import type { LoadedSettings } from '../../config/settings.js'; const getPackageJson = vi.hoisted(() => ...
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/ui/utils/TableRenderer.tsx
packages/cli/src/ui/utils/TableRenderer.tsx
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import React from 'react'; import { Text, Box } from 'ink'; import { theme } from '../semantic-colors.js'; import { RenderInline, getPlainTextLength } from './InlineMarkdownRenderer.js'; interface TableRendererProps { headers: 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/ui/utils/ui-sizing.ts
packages/cli/src/ui/utils/ui-sizing.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { lerp } from '../../utils/math.js'; import { type LoadedSettings } from '../../config/settings.js'; import { isAlternateBufferEnabled } from '../hooks/useAlternateBuffer.js'; const getMainAreaWidthInternal = (terminalWidth...
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/ui/utils/markdownUtilities.test.ts
packages/cli/src/ui/utils/markdownUtilities.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { describe, it, expect } from 'vitest'; import { findLastSafeSplitPoint } from './markdownUtilities.js'; describe('markdownUtilities', () => { describe('findLastSafeSplitPoint', () => { it('should split at the last do...
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/ui/utils/terminalCapabilityManager.ts
packages/cli/src/ui/utils/terminalCapabilityManager.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import * as fs from 'node:fs'; import { debugLogger, enableKittyKeyboardProtocol, disableKittyKeyboardProtocol, enableModifyOtherKeys, disableModifyOtherKeys, } from '@google/gemini-cli-core'; export type TerminalBackgro...
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/ui/utils/ui-sizing.test.ts
packages/cli/src/ui/utils/ui-sizing.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { describe, it, expect, vi } from 'vitest'; import { calculateMainAreaWidth } from './ui-sizing.js'; import { type LoadedSettings } from '../../config/settings.js'; // Mock dependencies const mocks = vi.hoisted(() => ({ 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/ui/utils/terminalSetup.ts
packages/cli/src/ui/utils/terminalSetup.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ /** * Terminal setup utility for configuring Shift+Enter and Ctrl+Enter support. * * This module provides automatic detection and configuration of various terminal * emulators to support multiline input through modified Enter k...
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/ui/utils/commandUtils.ts
packages/cli/src/ui/utils/commandUtils.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { debugLogger } from '@google/gemini-cli-core'; import clipboardy from 'clipboardy'; import type { SlashCommand } from '../commands/types.js'; import fs from 'node:fs'; import type { Writable } from 'node:stream'; /** * Ch...
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/ui/utils/formatters.test.ts
packages/cli/src/ui/utils/formatters.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { describe, it, expect } from 'vitest'; import { formatDuration, formatMemoryUsage } from './formatters.js'; describe('formatters', () => { describe('formatMemoryUsage', () => { it('should format bytes into KB', () =>...
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/ui/utils/directoryUtils.test.ts
packages/cli/src/ui/utils/directoryUtils.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { vi, describe, it, expect, beforeEach } from 'vitest'; import { expandHomeDir, getDirectorySuggestions } from './directoryUtils.js'; import type * as osActual from 'node:os'; import * as path from 'node:path'; import * as 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/ui/utils/computeStats.test.ts
packages/cli/src/ui/utils/computeStats.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { describe, it, expect } from 'vitest'; import { calculateAverageLatency, calculateCacheHitRate, calculateErrorRate, computeSessionStats, } from './computeStats.js'; import type { ModelMetrics, SessionMetrics, } ...
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/ui/utils/mouse.test.ts
packages/cli/src/ui/utils/mouse.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { describe, it, expect } from 'vitest'; import { parseSGRMouseEvent, parseX11MouseEvent, isIncompleteMouseSequence, parseMouseEvent, } from './mouse.js'; import { ESC } from './input.js'; describe('mouse utils', () ...
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/ui/utils/displayUtils.ts
packages/cli/src/ui/utils/displayUtils.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { theme } from '../semantic-colors.js'; // --- Thresholds --- export const TOOL_SUCCESS_RATE_HIGH = 95; export const TOOL_SUCCESS_RATE_MEDIUM = 85; export const USER_AGREEMENT_RATE_HIGH = 75; export const USER_AGREEMENT_RA...
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/ui/utils/clipboardUtils.test.ts
packages/cli/src/ui/utils/clipboardUtils.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { describe, it, expect } from 'vitest'; import { clipboardHasImage, saveClipboardImage, cleanupOldClipboardImages, splitEscapedPaths, parsePastedPaths, } from './clipboardUtils.js'; describe('clipboardUtils', () =...
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/ui/utils/input.test.ts
packages/cli/src/ui/utils/input.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { couldBeSGRMouseSequence, SGR_MOUSE_REGEX, ESC } from './input.js'; describe('input utils', () => { describe('SGR_MOUSE_REGEX', () => { it('should match valid SGR mouse sequences', () => { // Press left button ...
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/ui/utils/textUtils.ts
packages/cli/src/ui/utils/textUtils.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import stripAnsi from 'strip-ansi'; import ansiRegex from 'ansi-regex'; import { stripVTControlCharacters } from 'node:util'; import stringWidth from 'string-width'; /** * Calculates the maximum width of a multi-line ASCII art st...
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/ui/utils/input.ts
packages/cli/src/ui/utils/input.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ export const ESC = '\u001B'; export const SGR_EVENT_PREFIX = `${ESC}[<`; export const X11_EVENT_PREFIX = `${ESC}[M`; // eslint-disable-next-line no-control-regex export const SGR_MOUSE_REGEX = /^\x1b\[<(\d+);(\d+);(\d+)([mM])/; //...
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/ui/utils/mouse.ts
packages/cli/src/ui/utils/mouse.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { enableMouseEvents, disableMouseEvents } from '@google/gemini-cli-core'; import { SGR_MOUSE_REGEX, X11_MOUSE_REGEX, SGR_EVENT_PREFIX, X11_EVENT_PREFIX, couldBeMouseSequence as inputCouldBeMouseSequence, } 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/ui/utils/MarkdownDisplay.tsx
packages/cli/src/ui/utils/MarkdownDisplay.tsx
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import React from 'react'; import { Text, Box } from 'ink'; import { theme } from '../semantic-colors.js'; import { colorizeCode } from './CodeColorizer.js'; import { TableRenderer } from './TableRenderer.js'; import { RenderInline...
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/ui/utils/formatters.ts
packages/cli/src/ui/utils/formatters.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ export const formatMemoryUsage = (bytes: number): string => { const gb = bytes / (1024 * 1024 * 1024); if (bytes < 1024 * 1024) { return `${(bytes / 1024).toFixed(1)} KB`; } if (bytes < 1024 * 1024 * 1024) { 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/cli/src/ui/utils/highlight.ts
packages/cli/src/ui/utils/highlight.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import type { Transformation } from '../components/shared/text-buffer.js'; import { cpLen, cpSlice } from './textUtils.js'; export type HighlightToken = { text: string; type: 'default' | 'command' | 'file'; }; // Matches slas...
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/ui/utils/MarkdownDisplay.test.tsx
packages/cli/src/ui/utils/MarkdownDisplay.test.tsx
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import { MarkdownDisplay } from './MarkdownDisplay.js'; import { LoadedSettings } from '../../config/settings.js'; import { renderWithProviders } from '../../test-utils...
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/ui/utils/terminalCapabilityManager.test.ts
packages/cli/src/ui/utils/terminalCapabilityManager.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'; import { TerminalCapabilityManager } from './terminalCapabilityManager.js'; import { EventEmitter } from 'node:events'; // Mock fs vi.mock('node:fs', () => ...
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/ui/utils/directoryUtils.ts
packages/cli/src/ui/utils/directoryUtils.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import * as os from 'node:os'; import * as path from 'node:path'; import * as fs from 'node:fs'; import { opendir } from 'node:fs/promises'; const MAX_SUGGESTIONS = 50; const MATCH_BUFFER_MULTIPLIER = 3; export function expandHom...
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/ui/utils/updateCheck.ts
packages/cli/src/ui/utils/updateCheck.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import latestVersion from 'latest-version'; import semver from 'semver'; import { getPackageJson, debugLogger } from '@google/gemini-cli-core'; import type { LoadedSettings } from '../../config/settings.js'; import { fileURLToPath ...
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/ui/utils/textOutput.ts
packages/cli/src/ui/utils/textOutput.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ /** * A utility to manage writing text to stdout, ensuring that newlines * are handled consistently and robustly across the application. */ import stripAnsi from 'strip-ansi'; export class TextOutput { private atStartOfLine ...
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/ui/utils/isNarrowWidth.ts
packages/cli/src/ui/utils/isNarrowWidth.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ export function isNarrowWidth(width: number): boolean { return width < 80; }
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/ui/layouts/ScreenReaderAppLayout.tsx
packages/cli/src/ui/layouts/ScreenReaderAppLayout.tsx
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import type React from 'react'; import { Box } from 'ink'; import { Notifications } from '../components/Notifications.js'; import { MainContent } from '../components/MainContent.js'; import { DialogManager } from '../components/Dia...
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/ui/layouts/DefaultAppLayout.tsx
packages/cli/src/ui/layouts/DefaultAppLayout.tsx
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import type React from 'react'; import { Box } from 'ink'; import { Notifications } from '../components/Notifications.js'; import { MainContent } from '../components/MainContent.js'; import { DialogManager } from '../components/Dia...
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/ui/editors/editorSettingsManager.ts
packages/cli/src/ui/editors/editorSettingsManager.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { allowEditorTypeInSandbox, checkHasEditorType, type EditorType, EDITOR_DISPLAY_NAMES, } from '@google/gemini-cli-core'; export interface EditorDisplay { name: string; type: EditorType | 'not_set'; disabled: b...
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/ui/themes/ayu-light.ts
packages/cli/src/ui/themes/ayu-light.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { type ColorsTheme, Theme } from './theme.js'; import { interpolateColor } from './color-utils.js'; const ayuLightColors: ColorsTheme = { type: 'light', Background: '#f8f9fa', Foreground: '#5c6166', LightBlue: '#55b...
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/ui/themes/googlecode.ts
packages/cli/src/ui/themes/googlecode.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { type ColorsTheme, Theme, lightTheme } from './theme.js'; import { interpolateColor } from './color-utils.js'; const googleCodeColors: ColorsTheme = { type: 'light', Background: 'white', Foreground: '#444', LightBl...
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/ui/themes/shades-of-purple.ts
packages/cli/src/ui/themes/shades-of-purple.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ /** * Shades of Purple Theme — for Highlight.js. * @author Ahmad Awais <https://twitter.com/mrahmadawais/> */ import { type ColorsTheme, Theme } from './theme.js'; import { interpolateColor } from './color-utils.js'; const shad...
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/ui/themes/ansi.ts
packages/cli/src/ui/themes/ansi.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { type ColorsTheme, Theme } from './theme.js'; import { darkSemanticColors } from './semantic-tokens.js'; const ansiColors: ColorsTheme = { type: 'dark', Background: 'black', Foreground: '', LightBlue: 'bluebright',...
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/ui/themes/github-light.ts
packages/cli/src/ui/themes/github-light.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { type ColorsTheme, Theme } from './theme.js'; import { interpolateColor } from './color-utils.js'; const githubLightColors: ColorsTheme = { type: 'light', Background: '#f8f8f8', Foreground: '#24292E', LightBlue: '#...
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/ui/themes/holiday.ts
packages/cli/src/ui/themes/holiday.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { type ColorsTheme, Theme } from './theme.js'; import { interpolateColor } from './color-utils.js'; const holidayColors: ColorsTheme = { type: 'dark', Background: '#00210e', Foreground: '#F0F8FF', LightBlue: '#B0E0E...
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/ui/themes/ayu.ts
packages/cli/src/ui/themes/ayu.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { type ColorsTheme, Theme } from './theme.js'; import { interpolateColor } from './color-utils.js'; const ayuDarkColors: ColorsTheme = { type: 'dark', Background: '#0b0e14', Foreground: '#aeaca6', LightBlue: '#59C2F...
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/ui/themes/default.ts
packages/cli/src/ui/themes/default.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { darkTheme, Theme } from './theme.js'; export const DefaultDark: Theme = new Theme( 'Default', 'dark', { hljs: { display: 'block', overflowX: 'auto', padding: '0.5em', background: darkThem...
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/ui/themes/color-utils.test.ts
packages/cli/src/ui/themes/color-utils.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { describe, it, expect } from 'vitest'; import { isValidColor, resolveColor, interpolateColor, CSS_NAME_TO_HEX_MAP, INK_SUPPORTED_NAMES, getThemeTypeFromBackgroundColor, } from './color-utils.js'; describe('Colo...
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/ui/themes/xcode.ts
packages/cli/src/ui/themes/xcode.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { type ColorsTheme, Theme } from './theme.js'; import { interpolateColor } from './color-utils.js'; const xcodeColors: ColorsTheme = { type: 'light', Background: '#fff', Foreground: '#444', LightBlue: '#0E0EFF', A...
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/ui/themes/atom-one-dark.ts
packages/cli/src/ui/themes/atom-one-dark.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { type ColorsTheme, Theme } from './theme.js'; import { interpolateColor } from './color-utils.js'; const atomOneDarkColors: ColorsTheme = { type: 'dark', Background: '#282c34', Foreground: '#abb2bf', LightBlue: '#6...
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/ui/themes/github-dark.ts
packages/cli/src/ui/themes/github-dark.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { type ColorsTheme, Theme } from './theme.js'; import { interpolateColor } from './color-utils.js'; const githubDarkColors: ColorsTheme = { type: 'dark', Background: '#24292e', Foreground: '#c0c4c8', LightBlue: '#79...
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/ui/themes/semantic-tokens.ts
packages/cli/src/ui/themes/semantic-tokens.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { lightTheme, darkTheme, ansiTheme } from './theme.js'; export interface SemanticColors { text: { primary: string; secondary: string; link: string; accent: string; response: string; }; background: ...
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/ui/themes/theme-manager.ts
packages/cli/src/ui/themes/theme-manager.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { AyuDark } from './ayu.js'; import { AyuLight } from './ayu-light.js'; import { AtomOneDark } from './atom-one-dark.js'; import { Dracula } from './dracula.js'; import { GitHubDark } from './github-dark.js'; import { GitHub...
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/ui/themes/ansi-light.ts
packages/cli/src/ui/themes/ansi-light.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { type ColorsTheme, Theme } from './theme.js'; import { lightSemanticColors } from './semantic-tokens.js'; const ansiLightColors: ColorsTheme = { type: 'light', Background: 'white', Foreground: '', LightBlue: 'blue'...
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/ui/themes/default-light.ts
packages/cli/src/ui/themes/default-light.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { lightTheme, Theme } from './theme.js'; export const DefaultLight: Theme = new Theme( 'Default Light', 'light', { hljs: { display: 'block', overflowX: 'auto', padding: '0.5em', background:...
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/ui/themes/theme.test.ts
packages/cli/src/ui/themes/theme.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { describe, it, expect } from 'vitest'; import * as themeModule from './theme.js'; import { themeManager } from './theme-manager.js'; const { validateCustomTheme, createCustomTheme } = themeModule; type CustomTheme = themeM...
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/ui/themes/theme.ts
packages/cli/src/ui/themes/theme.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import type { CSSProperties } from 'react'; import type { SemanticColors } from './semantic-tokens.js'; import { resolveColor, interpolateColor, getThemeTypeFromBackgroundColor, } from './color-utils.js'; export type ThemeTy...
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/ui/themes/dracula.ts
packages/cli/src/ui/themes/dracula.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { type ColorsTheme, Theme } from './theme.js'; import { interpolateColor } from './color-utils.js'; const draculaColors: ColorsTheme = { type: 'dark', Background: '#282a36', Foreground: '#a3afb7', LightBlue: '#8be9f...
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/ui/themes/no-color.ts
packages/cli/src/ui/themes/no-color.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import type { ColorsTheme } from './theme.js'; import { Theme } from './theme.js'; import type { SemanticColors } from './semantic-tokens.js'; const noColorColorsTheme: ColorsTheme = { type: 'ansi', Background: '', Foregroun...
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/ui/themes/theme-manager.test.ts
packages/cli/src/ui/themes/theme-manager.test.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ // Patch: Unset NO_COLOR at the very top before any imports if (process.env['NO_COLOR'] !== undefined) { delete process.env['NO_COLOR']; } import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest'; import { themeM...
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/ui/themes/color-utils.ts
packages/cli/src/ui/themes/color-utils.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { debugLogger } from '@google/gemini-cli-core'; import tinygradient from 'tinygradient'; // Mapping from common CSS color names (lowercase) to hex codes (lowercase) // Excludes names directly supported by Ink export const 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/cli/src/ui/constants/wittyPhrases.ts
packages/cli/src/ui/constants/wittyPhrases.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ export const WITTY_LOADING_PHRASES = [ "I'm Feeling Lucky", 'Shipping awesomeness... ', 'Painting the serifs back on...', 'Navigating the slime mold...', 'Consulting the digital spirits...', 'Reticulating splines...', ...
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/ui/constants/tips.ts
packages/cli/src/ui/constants/tips.ts
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ export const INFORMATIVE_TIPS = [ //Settings tips start here 'Set your preferred editor for opening files (/settings)...', 'Toggle Vim mode for a modal editing experience (/settings)...', 'Disable automatic updates if you p...
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/ui/contexts/ConfigContext.tsx
packages/cli/src/ui/contexts/ConfigContext.tsx
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import React, { useContext } from 'react'; import { type Config } from '@google/gemini-cli-core'; export const ConfigContext = React.createContext<Config | undefined>(undefined); export const useConfig = () => { const context =...
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/ui/contexts/StreamingContext.tsx
packages/cli/src/ui/contexts/StreamingContext.tsx
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import React, { createContext } from 'react'; import type { StreamingState } from '../types.js'; export const StreamingContext = createContext<StreamingState | undefined>( undefined, ); export const useStreamingContext = (): St...
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/ui/contexts/SessionContext.test.tsx
packages/cli/src/ui/contexts/SessionContext.test.tsx
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { type MutableRefObject, Component, type ReactNode } from 'react'; import { render } from '../../test-utils/render.js'; import { act } from 'react'; import type { SessionMetrics } from './SessionContext.js'; import { Sessio...
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/ui/contexts/ShellFocusContext.tsx
packages/cli/src/ui/contexts/ShellFocusContext.tsx
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { createContext, useContext } from 'react'; export const ShellFocusContext = createContext<boolean>(true); export const useShellFocusState = () => useContext(ShellFocusContext);
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/ui/contexts/KeypressContext.test.tsx
packages/cli/src/ui/contexts/KeypressContext.test.tsx
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { debugLogger } from '@google/gemini-cli-core'; import type React from 'react'; import { act } from 'react'; import { renderHook } from '../../test-utils/render.js'; import { waitFor } from '../../test-utils/async.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/ui/contexts/MouseContext.tsx
packages/cli/src/ui/contexts/MouseContext.tsx
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { useStdin } from 'ink'; import type React from 'react'; import { createContext, useCallback, useContext, useEffect, useRef, } from 'react'; import { ESC } from '../utils/input.js'; import { debugLogger } from '@go...
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/ui/contexts/ScrollProvider.tsx
packages/cli/src/ui/contexts/ScrollProvider.tsx
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import type React from 'react'; import { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState, } from 'react'; import { getBoundingBox, type DOMElement } from 'ink'; import { useMouse, type Mou...
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/ui/contexts/KeypressContext.tsx
packages/cli/src/ui/contexts/KeypressContext.tsx
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { debugLogger, type Config } from '@google/gemini-cli-core'; import { useStdin } from 'ink'; import type React from 'react'; import { createContext, useCallback, useContext, useEffect, useRef, } from 'react'; 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/ui/contexts/OverflowContext.tsx
packages/cli/src/ui/contexts/OverflowContext.tsx
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import type React from 'react'; import { createContext, useContext, useState, useCallback, useMemo, } from 'react'; interface OverflowState { overflowingIds: ReadonlySet<string>; } interface OverflowActions { addOve...
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/ui/contexts/ScrollProvider.test.tsx
packages/cli/src/ui/contexts/ScrollProvider.test.tsx
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { render } from '../../test-utils/render.js'; import { ScrollProvider, useScrollable, type ScrollState, } from './ScrollProvider.js'; import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'; import { u...
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/ui/contexts/VimModeContext.tsx
packages/cli/src/ui/contexts/VimModeContext.tsx
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { createContext, useCallback, useContext, useEffect, useState, } from 'react'; import type { LoadedSettings } from '../../config/settings.js'; import { SettingScope } from '../../config/settings.js'; export type 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/cli/src/ui/contexts/MouseContext.test.tsx
packages/cli/src/ui/contexts/MouseContext.test.tsx
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { renderHook } from '../../test-utils/render.js'; import { act } from 'react'; import { MouseProvider, useMouseContext, useMouse } from './MouseContext.js'; import { vi, type Mock } from 'vitest'; import type React from 'rea...
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/ui/contexts/UIActionsContext.tsx
packages/cli/src/ui/contexts/UIActionsContext.tsx
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { createContext, useContext } from 'react'; import { type Key } from '../hooks/useKeypress.js'; import { type IdeIntegrationNudgeResult } from '../IdeIntegrationNudge.js'; import { type FolderTrustChoice } from '../component...
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/ui/contexts/SessionContext.tsx
packages/cli/src/ui/contexts/SessionContext.tsx
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import type React from 'react'; import { createContext, useCallback, useContext, useState, useMemo, useEffect, } from 'react'; import type { SessionMetrics, ModelMetrics, ToolCallStats, } from '@google/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/cli/src/ui/contexts/AppContext.tsx
packages/cli/src/ui/contexts/AppContext.tsx
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { createContext, useContext } from 'react'; export interface AppState { version: string; startupWarnings: string[]; } export const AppContext = createContext<AppState | null>(null); export const useAppContext = () => ...
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/ui/contexts/SettingsContext.tsx
packages/cli/src/ui/contexts/SettingsContext.tsx
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import React, { useContext } from 'react'; import type { LoadedSettings } from '../../config/settings.js'; export const SettingsContext = React.createContext<LoadedSettings | undefined>( undefined, ); export const useSettings =...
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/ui/contexts/UIStateContext.tsx
packages/cli/src/ui/contexts/UIStateContext.tsx
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { createContext, useContext } from 'react'; import type { HistoryItem, ThoughtSummary, ConsoleMessageItem, ShellConfirmationRequest, ConfirmationRequest, LoopDetectionConfirmationRequest, HistoryItemWithoutId, ...
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/ui/contexts/ScrollProvider.drag.test.tsx
packages/cli/src/ui/contexts/ScrollProvider.drag.test.tsx
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { render } from '../../test-utils/render.js'; import { ScrollProvider, useScrollable, type ScrollState, } from './ScrollProvider.js'; import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'; import { u...
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/examples/scrollable-list-demo.tsx
packages/cli/examples/scrollable-list-demo.tsx
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { useState, useEffect, useRef } from 'react'; import { render, Box, Text, useInput, useStdout } from 'ink'; import { ScrollableList, type ScrollableListRef, } from '../src/ui/components/shared/ScrollableList.js'; import ...
typescript
Apache-2.0
d3c206c6770d320953dff80c01d555ad64df5b8b
2026-01-04T15:25:31.833747Z
false
microsoft/playwright
https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/.github/workflows/merge.config.ts
.github/workflows/merge.config.ts
export default { testDir: '../../tests', reporter: [[require.resolve('../../tests/config/ghaMarkdownReporter')], ['html']] };
typescript
Apache-2.0
1359b5fbf7087a8b72d7ee25ad16ff2751195300
2026-01-04T15:25:31.902420Z
false
microsoft/playwright
https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/third_party/proxy/index.ts
tests/third_party/proxy/index.ts
import assert from 'assert'; import * as net from 'net'; import * as http from 'http'; import * as os from 'os'; import { pipeline } from 'stream/promises'; const pkg = { version: '1.0.0' } import createDebug from 'debug'; // log levels const debug = { request: createDebug('proxy ← ← ←'), response: createDebug('pr...
typescript
Apache-2.0
1359b5fbf7087a8b72d7ee25ad16ff2751195300
2026-01-04T15:25:31.902420Z
false
microsoft/playwright
https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/playwright-test/command-line-filter.spec.ts
tests/playwright-test/command-line-filter.spec.ts
/** * Copyright (c) Microsoft Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
typescript
Apache-2.0
1359b5fbf7087a8b72d7ee25ad16ff2751195300
2026-01-04T15:25:31.902420Z
false
microsoft/playwright
https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/playwright-test/match-grep.spec.ts
tests/playwright-test/match-grep.spec.ts
/** * Copyright (c) Microsoft Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
typescript
Apache-2.0
1359b5fbf7087a8b72d7ee25ad16ff2751195300
2026-01-04T15:25:31.902420Z
false
microsoft/playwright
https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/playwright-test/decorators.spec.ts
tests/playwright-test/decorators.spec.ts
/** * Copyright (c) Microsoft Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
typescript
Apache-2.0
1359b5fbf7087a8b72d7ee25ad16ff2751195300
2026-01-04T15:25:31.902420Z
false
microsoft/playwright
https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/playwright-test/playwright.artifacts.spec.ts
tests/playwright-test/playwright.artifacts.spec.ts
/** * Copyright (c) Microsoft Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
typescript
Apache-2.0
1359b5fbf7087a8b72d7ee25ad16ff2751195300
2026-01-04T15:25:31.902420Z
false
microsoft/playwright
https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/playwright-test/types-2.spec.ts
tests/playwright-test/types-2.spec.ts
/** * Copyright Microsoft Corporation. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ...
typescript
Apache-2.0
1359b5fbf7087a8b72d7ee25ad16ff2751195300
2026-01-04T15:25:31.902420Z
false
microsoft/playwright
https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/playwright-test/ui-mode-test-filters.spec.ts
tests/playwright-test/ui-mode-test-filters.spec.ts
/** * Copyright (c) Microsoft Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
typescript
Apache-2.0
1359b5fbf7087a8b72d7ee25ad16ff2751195300
2026-01-04T15:25:31.902420Z
false
microsoft/playwright
https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/playwright-test/reporter-json.spec.ts
tests/playwright-test/reporter-json.spec.ts
/** * Copyright (c) Microsoft Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
typescript
Apache-2.0
1359b5fbf7087a8b72d7ee25ad16ff2751195300
2026-01-04T15:25:31.902420Z
false
microsoft/playwright
https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/playwright-test/playwright.fetch.spec.ts
tests/playwright-test/playwright.fetch.spec.ts
/** * Copyright (c) Microsoft Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
typescript
Apache-2.0
1359b5fbf7087a8b72d7ee25ad16ff2751195300
2026-01-04T15:25:31.902420Z
false
microsoft/playwright
https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/playwright-test/playwright.reuse.browser.spec.ts
tests/playwright-test/playwright.reuse.browser.spec.ts
/** * Copyright (c) Microsoft Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
typescript
Apache-2.0
1359b5fbf7087a8b72d7ee25ad16ff2751195300
2026-01-04T15:25:31.902420Z
false
microsoft/playwright
https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/playwright-test/playwright.config.ts
tests/playwright-test/playwright.config.ts
/** * Copyright (c) Microsoft Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
typescript
Apache-2.0
1359b5fbf7087a8b72d7ee25ad16ff2751195300
2026-01-04T15:25:31.902420Z
false
microsoft/playwright
https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/playwright-test/ui-mode-test-ct.spec.ts
tests/playwright-test/ui-mode-test-ct.spec.ts
/** * Copyright (c) Microsoft Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
typescript
Apache-2.0
1359b5fbf7087a8b72d7ee25ad16ff2751195300
2026-01-04T15:25:31.902420Z
false
microsoft/playwright
https://github.com/microsoft/playwright/blob/1359b5fbf7087a8b72d7ee25ad16ff2751195300/tests/playwright-test/test-tag.spec.ts
tests/playwright-test/test-tag.spec.ts
/** * Copyright (c) Microsoft Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
typescript
Apache-2.0
1359b5fbf7087a8b72d7ee25ad16ff2751195300
2026-01-04T15:25:31.902420Z
false