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 |
|---|---|---|---|---|---|---|---|---|
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/auth/providers/ClineAuthProvider.ts | src/services/auth/providers/ClineAuthProvider.ts | import axios from "axios"
import { type JwtPayload } from "jwt-decode"
import { ClineEnv, EnvironmentConfig } from "@/config"
import { Controller } from "@/core/controller"
import { HostProvider } from "@/hosts/host-provider"
import { AuthInvalidTokenError, AuthNetworkError } from "@/services/error/ClineError"
import {... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/auth/oca/OcaAuthService.ts | src/services/auth/oca/OcaAuthService.ts | import { type EmptyRequest, String as ProtoString } from "@shared/proto/cline/common"
import { OcaAuthState, OcaUserInfo } from "@shared/proto/cline/oca_account"
import type { Controller } from "@/core/controller"
import { getRequestRegistry, type StreamingResponseHandler } from "@/core/controller/grpc-handler"
import ... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/auth/oca/utils/utils.ts | src/services/auth/oca/utils/utils.ts | import crypto from "crypto"
import fs from "fs"
import { type JwtPayload, jwtDecode } from "jwt-decode"
import { HostProvider } from "@/hosts/host-provider"
import { ExtensionRegistryInfo } from "@/registry"
import {
DEFAULT_EXTERNAL_IDCS_CLIENT_ID,
DEFAULT_EXTERNAL_IDCS_URL,
DEFAULT_EXTERNAL_IDSC_SCOPES,
DEFAULT_I... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/auth/oca/utils/constants.ts | src/services/auth/oca/utils/constants.ts | import os from "os"
import path from "path"
export const OCA_CONFIG_PATH = path.join(os.homedir(), ".oca", "config.json")
export const DEFAULT_INTERNAL_IDCS_CLIENT_ID = "a8331954c0cf48ba99b5dd223a14c6ea"
export const DEFAULT_INTERNAL_IDCS_URL = "https://idcs-9dc693e80d9b469480d7afe00e743931.identity.oraclecloud.com"
... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/auth/oca/utils/types.ts | src/services/auth/oca/utils/types.ts | export interface OcaConfig {
internal: {
client_id: string
idcs_url: string
scopes: string
}
external: {
client_id: string
idcs_url: string
scopes: string
}
}
| typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/auth/oca/providers/OcaAuthProvider.ts | src/services/auth/oca/providers/OcaAuthProvider.ts | import { OcaAuthState, OcaUserInfo } from "@shared/proto/cline/oca_account"
import axios from "axios"
import { jwtDecode } from "jwt-decode"
import { Controller } from "@/core/controller"
import { getAxiosSettings } from "@/shared/net"
import type { OcaConfig } from "../utils/types"
import { generateCodeVerifier, gener... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/error/ClineError.ts | src/services/error/ClineError.ts | import { serializeError } from "serialize-error"
import { CLINE_ACCOUNT_AUTH_ERROR_MESSAGE } from "../../shared/ClineAccount"
export enum ClineErrorType {
Auth = "auth",
Network = "network",
RateLimit = "rateLimit",
Balance = "balance",
}
interface ErrorDetails {
/**
* The HTTP status code of the error, if app... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/error/ErrorProviderFactory.ts | src/services/error/ErrorProviderFactory.ts | import { isPostHogConfigValid, PostHogClientConfig, posthogConfig } from "@/shared/services/config/posthog-config"
import { ClineError } from "./ClineError"
import { IErrorProvider } from "./providers/IErrorProvider"
import { PostHogErrorProvider } from "./providers/PostHogErrorProvider"
/**
* Supported error provide... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/error/ErrorService.ts | src/services/error/ErrorService.ts | import { ClineError } from "./ClineError"
import { ErrorProviderFactory } from "./ErrorProviderFactory"
import { IErrorProvider } from "./providers/IErrorProvider"
/**
* ErrorService handles error logging and tracking for the Cline extension
* Uses an abstracted error provider to support multiple error tracking back... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/error/index.ts | src/services/error/index.ts | import { ErrorSettings } from "./providers/IErrorProvider"
export { ClineError, ClineErrorType } from "./ClineError"
export { type ErrorProviderConfig, ErrorProviderFactory, type ErrorProviderType } from "./ErrorProviderFactory"
export { ErrorService } from "./ErrorService"
export type { ErrorSettings, IErrorProvider ... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/error/providers/PostHogErrorProvider.ts | src/services/error/providers/PostHogErrorProvider.ts | import { PostHog } from "posthog-node"
import { HostProvider } from "@/hosts/host-provider"
import { getDistinctId } from "@/services/logging/distinctId"
import { PostHogClientProvider } from "@/services/telemetry/providers/posthog/PostHogClientProvider"
import { Setting } from "@/shared/proto/index.host"
import * as p... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/error/providers/IErrorProvider.ts | src/services/error/providers/IErrorProvider.ts | /**
* Interface for error providers
* Allows switching between different error tracking providers (PostHog, Sentry, etc.)
*/
import type { ClineError } from "../ClineError"
/**
* Error settings that control when and how errors are logged
*/
export interface ErrorSettings {
/** Whether error logging is enabled *... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/logging/Logger.ts | src/services/logging/Logger.ts | import { HostProvider } from "@/hosts/host-provider"
import { ErrorService } from "../error"
/**
* Simple logging utility for the extension's backend code.
*/
export class Logger {
public readonly channelName = "Cline Dev Logger"
static error(message: string, error?: Error) {
Logger.#output("ERROR", message, err... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/logging/distinctId.test.ts | src/services/logging/distinctId.test.ts | import { expect } from "chai"
import { afterEach, beforeEach, describe, it } from "mocha"
import * as nodeMachineId from "node-machine-id"
import * as sinon from "sinon"
import * as vscode from "vscode"
import { _GENERATED_MACHINE_ID_KEY, getDistinctId, initializeDistinctId, setDistinctId } from "@/services/logging/dis... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/logging/distinctId.ts | src/services/logging/distinctId.ts | import { machineId } from "node-machine-id"
import { v4 as uuidv4 } from "uuid"
import { ExtensionContext } from "vscode"
/*
* Unique identifier for the current installation.
*/
let _distinctId: string = ""
/**
* Some environments don't return a value for the machine ID. For these situations we generated
* a uniq... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/test/TestServer.ts | src/services/test/TestServer.ts | import { getSavedApiConversationHistory, getSavedClineMessages } from "@core/storage/disk"
import { WebviewProvider } from "@core/webview"
import { Logger } from "@services/logging/Logger"
import { AutoApprovalSettings, DEFAULT_AUTO_APPROVAL_SETTINGS } from "@shared/AutoApprovalSettings"
import { ApiProvider } from "@s... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/test/GitHelper.ts | src/services/test/GitHelper.ts | import { Logger } from "@services/logging/Logger"
import { execa } from "execa"
import * as path from "path"
/**
* Validates that the workspace path is valid and writable for Git operations
* @param workspacePath The workspace path to validate
* @throws Error if the workspace path is invalid or not writable
*/
exp... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/test/TestMode.ts | src/services/test/TestMode.ts | /**
* Module for managing test mode state across the extension
* This provides a centralized way to check if the extension is running in test mode
* instead of relying on process.env which may not be consistent across different parts of the extension
*/
import * as fs from "fs"
import * as path from "path"
import ... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/dictation/VoiceTranscriptionService.ts | src/services/dictation/VoiceTranscriptionService.ts | import { Logger } from "@services/logging/Logger"
import axios from "axios"
import { ClineAccountService } from "@/services/account/ClineAccountService"
// Network error matchers using Map for O(1) lookup
const NETWORK_ERROR_MAP = new Map<string, string>([
["enotfound", "No internet connection. Please check your netw... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/dictation/AudioRecordingService.ts | src/services/dictation/AudioRecordingService.ts | import { ChildProcess, spawn } from "node:child_process"
import * as fs from "node:fs"
import * as os from "node:os"
import * as path from "node:path"
import { Logger } from "@services/logging/Logger"
import { AUDIO_PROGRAM_CONFIG } from "@/shared/audioProgramConstants"
function isExecutable(filePath: string): boolean... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/account/ClineAccountService.ts | src/services/account/ClineAccountService.ts | import type {
BalanceResponse,
OrganizationBalanceResponse,
OrganizationUsageTransaction,
PaymentTransaction,
UsageTransaction,
UserResponse,
} from "@shared/ClineAccount"
import axios, { AxiosRequestConfig, AxiosResponse } from "axios"
import { ClineEnv } from "@/config"
import { CLINE_API_ENDPOINT } from "@/sha... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/banner/BannerService.ts | src/services/banner/BannerService.ts | import type { Banner, BannerRules, BannersResponse } from "@shared/ClineBanner"
import axios from "axios"
import { ClineEnv } from "@/config"
import type { Controller } from "@/core/controller"
import { HostProvider } from "@/hosts/host-provider"
import { getAxiosSettings } from "@/shared/net"
import { AuthService } fr... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/banner/BannerService.test.ts | src/services/banner/BannerService.test.ts | /**
* Tests for BannerService
* Tests API fetching, caching, and client-side provider filtering
*/
import type { BannerRules } from "@shared/ClineBanner"
import axios from "axios"
import { expect } from "chai"
import { afterEach, beforeEach, describe, it } from "mocha"
import * as sinon from "sinon"
import type { C... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/feature-flags/FeatureFlagsService.ts | src/services/feature-flags/FeatureFlagsService.ts | import { clearOnboardingModelsCache, getClineOnboardingModels } from "@/core/controller/models/getClineOnboardingModels"
import type { OnboardingModel } from "@/shared/proto/cline/state"
import { FEATURE_FLAGS, FeatureFlag, FeatureFlagDefaultValue } from "@/shared/services/feature-flags/feature-flags"
import type { Fea... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/feature-flags/index.ts | src/services/feature-flags/index.ts | export {
type FeatureFlagsProviderConfig,
FeatureFlagsProviderFactory,
type FeatureFlagsProviderType,
} from "./FeatureFlagsProviderFactory"
export { FeatureFlagsService } from "./FeatureFlagsService"
export type { FeatureFlagsSettings, IFeatureFlagsProvider } from "./providers/IFeatureFlagsProvider"
export { PostHo... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/feature-flags/FeatureFlagsProviderFactory.ts | src/services/feature-flags/FeatureFlagsProviderFactory.ts | import { isPostHogConfigValid, posthogConfig } from "@/shared/services/config/posthog-config"
import { Logger } from "../logging/Logger"
import { PostHogClientProvider } from "../telemetry/providers/posthog/PostHogClientProvider"
import type { IFeatureFlagsProvider } from "./providers/IFeatureFlagsProvider"
import { Po... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/feature-flags/providers/IFeatureFlagsProvider.ts | src/services/feature-flags/providers/IFeatureFlagsProvider.ts | /**
* Interface for feature flags providers
* Allows switching between different feature flag providers (PostHog, etc.)
*/
/**
* Feature flags settings that control how feature flags are retrieved
*/
export interface FeatureFlagsSettings {
/** Whether feature flags are enabled */
enabled: boolean
/** Optional ... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/feature-flags/providers/PostHogFeatureFlagsProvider.ts | src/services/feature-flags/providers/PostHogFeatureFlagsProvider.ts | import { PostHog } from "posthog-node"
import { getDistinctId } from "@/services/logging/distinctId"
import { posthogConfig } from "../../../shared/services/config/posthog-config"
import type { FeatureFlagPayload, FeatureFlagsSettings, IFeatureFlagsProvider } from "./IFeatureFlagsProvider"
/**
* PostHog implementatio... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/glob/list-files.ts | src/services/glob/list-files.ts | import { workspaceResolver } from "@core/workspace"
import { arePathsEqual } from "@utils/path"
import { globby, Options } from "globby"
import * as os from "os"
import * as path from "path"
// Constants
const DEFAULT_IGNORE_DIRECTORIES = [
"node_modules",
"__pycache__",
"env",
"venv",
"target/dependency",
"buil... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/search/file-search.ts | src/services/search/file-search.ts | import type { WorkspaceRoot } from "@shared/multi-root/types"
import * as childProcess from "child_process"
import * as fs from "fs"
import type { FzfResultItem } from "fzf"
import * as path from "path"
import * as readline from "readline"
import { WorkspaceRootManager } from "@/core/workspace"
import { HostProvider } ... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/ripgrep/index.ts | src/services/ripgrep/index.ts | import { ClineIgnoreController } from "@core/ignore/ClineIgnoreController"
import * as childProcess from "child_process"
import * as path from "path"
import * as readline from "readline"
import { getBinaryLocation } from "@/utils/fs"
/*
This file provides functionality to perform regex searches on files using ripgrep.... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/browser/BrowserSession.ts | src/services/browser/BrowserSession.ts | import { setTimeout as setTimeoutPromise } from "node:timers/promises"
import { Controller } from "@core/controller"
import { BrowserActionResult } from "@shared/ExtensionMessage"
import { fileExistsAtPath } from "@utils/fs"
import axios from "axios"
import { spawn } from "child_process"
import * as chromeLauncher from... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/browser/utils.ts | src/services/browser/utils.ts | import { fileExistsAtPath } from "@utils/fs"
import * as fs from "fs/promises"
import * as path from "path"
// @ts-ignore
import PCR from "puppeteer-chromium-resolver"
import { launch } from "puppeteer-core"
import { HostProvider } from "@/hosts/host-provider"
interface PCRStats {
puppeteer: { launch: typeof launch }... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/browser/UrlContentFetcher.ts | src/services/browser/UrlContentFetcher.ts | import { BrowserSettings, DEFAULT_BROWSER_SETTINGS } from "@shared/BrowserSettings" // Import the interface and defaults
import * as cheerio from "cheerio"
// @ts-ignore
import { Browser, Page } from "puppeteer-core"
import TurndownService from "turndown"
import * as vscode from "vscode"
import { ensureChromiumExists }... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/browser/BrowserDiscovery.ts | src/services/browser/BrowserDiscovery.ts | import axios from "axios"
import * as net from "net"
/**
* Check if a port is open on a given host
*/
export async function isPortOpen(host: string, port: number, timeout = 1000): Promise<boolean> {
return new Promise((resolve) => {
const socket = new net.Socket()
let status = false
// Set timeout
socket.s... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/telemetry/TelemetryService.ts | src/services/telemetry/TelemetryService.ts | import { HostProvider } from "@hosts/host-provider"
import type { BrowserSettings } from "@shared/BrowserSettings"
import { ShowMessageType } from "@shared/proto/host/window"
import type { TaskFeedbackType } from "@shared/WebviewMessage"
import * as os from "os"
import { ClineAccountUserInfo } from "@/services/auth/Aut... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | true |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/telemetry/TelemetryService.test.ts | src/services/telemetry/TelemetryService.test.ts | /**
* Tests for the abstracted multi-provider telemetry system
* This demonstrates the multi-provider architecture that supports dual tracking,
* validates provider switching capabilities, and ensures NoOpTelemetryProvider functionality
* Tests for the abstracted multi-provider telemetry system
* This demonstrates... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/telemetry/index.ts | src/services/telemetry/index.ts | export type {
ITelemetryProvider,
TelemetrySettings,
} from "./providers/ITelemetryProvider"
export { PostHogTelemetryProvider } from "./providers/posthog/PostHogTelemetryProvider"
export {
type TelemetryProviderConfig,
TelemetryProviderFactory,
type TelemetryProviderType,
} from "./TelemetryProviderFactory"
// Ex... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/telemetry/TelemetryProviderFactory.ts | src/services/telemetry/TelemetryProviderFactory.ts | import { getValidOpenTelemetryConfig } from "@/shared/services/config/otel-config"
import { isPostHogConfigValid, posthogConfig } from "@/shared/services/config/posthog-config"
import { Logger } from "../logging/Logger"
import type { ITelemetryProvider, TelemetryProperties, TelemetrySettings } from "./providers/ITeleme... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/telemetry/__tests__/TelemetryService.metrics.test.ts | src/services/telemetry/__tests__/TelemetryService.metrics.test.ts | import * as assert from "assert"
import type { ITelemetryProvider, TelemetryProperties, TelemetrySettings } from "../providers/ITelemetryProvider"
import { TelemetryMetadata, TelemetryService } from "../TelemetryService"
class FakeProvider implements ITelemetryProvider {
readonly name = "FakeProvider"
public counter... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/telemetry/providers/ITelemetryProvider.ts | src/services/telemetry/providers/ITelemetryProvider.ts | /**
* Interface for telemetry providers
* Allows switching between different analytics providers (PostHog, etc.)
*/
import type { ClineAccountUserInfo } from "../../auth/AuthService"
/**
* JSON-serializable primitive types for telemetry properties
*/
export type TelemetryPrimitive = string | number | boolean | n... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/telemetry/providers/opentelemetry/OpenTelemetryExporterFactory.ts | src/services/telemetry/providers/opentelemetry/OpenTelemetryExporterFactory.ts | import { credentials as grpcCredentials } from "@grpc/grpc-js"
import { OTLPLogExporter as OTLPLogExporterGRPC } from "@opentelemetry/exporter-logs-otlp-grpc"
import { OTLPLogExporter as OTLPLogExporterHTTP } from "@opentelemetry/exporter-logs-otlp-http"
import { OTLPLogExporter as OTLPLogExporterProto } from "@opentel... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/telemetry/providers/opentelemetry/OpenTelemetryTelemetryProvider.ts | src/services/telemetry/providers/opentelemetry/OpenTelemetryTelemetryProvider.ts | import { Meter } from "@opentelemetry/api"
import type { Logger as OTELLogger } from "@opentelemetry/api-logs"
import { LoggerProvider } from "@opentelemetry/sdk-logs"
import { MeterProvider } from "@opentelemetry/sdk-metrics"
import { HostProvider } from "@/hosts/host-provider"
import { getErrorLevelFromString } from ... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/telemetry/providers/opentelemetry/otel-exporter-diagnostics.ts | src/services/telemetry/providers/opentelemetry/otel-exporter-diagnostics.ts | /**
* OpenTelemetry Exporter Diagnostic Utilities
*
* Provides minimal diagnostic logging for OTLP exporters when debug mode is enabled.
* Enable with: TEL_DEBUG_DIAGNOSTICS=true or IS_DEV=true
*/
/**
* Wraps a metrics exporter with minimal diagnostic logging
*/
export function wrapMetricsExporterWithDiagnostic... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/telemetry/providers/opentelemetry/OpenTelemetryClientProvider.ts | src/services/telemetry/providers/opentelemetry/OpenTelemetryClientProvider.ts | import { metrics } from "@opentelemetry/api"
import { logs } from "@opentelemetry/api-logs"
import { Resource } from "@opentelemetry/resources"
import { BatchLogRecordProcessor, LoggerProvider } from "@opentelemetry/sdk-logs"
import { MeterProvider } from "@opentelemetry/sdk-metrics"
import { ATTR_SERVICE_NAME, ATTR_SE... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/telemetry/providers/posthog/PostHogClientProvider.ts | src/services/telemetry/providers/posthog/PostHogClientProvider.ts | import { EventMessage, PostHog } from "posthog-node"
import { posthogConfig } from "@/shared/services/config/posthog-config"
export class PostHogClientProvider {
private static _instance: PostHogClientProvider | null = null
public static getInstance(): PostHogClientProvider {
if (!PostHogClientProvider._instance)... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/telemetry/providers/posthog/PostHogTelemetryProvider.ts | src/services/telemetry/providers/posthog/PostHogTelemetryProvider.ts | import { PostHog } from "posthog-node"
import { HostProvider } from "@/hosts/host-provider"
import { getErrorLevelFromString } from "@/services/error"
import { getDistinctId, setDistinctId } from "@/services/logging/distinctId"
import { Setting } from "@/shared/proto/index.host"
import { posthogConfig } from "../../../... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/telemetry/events/EventHandlerBase.ts | src/services/telemetry/events/EventHandlerBase.ts | import type { TelemetryObject } from "../providers/ITelemetryProvider"
import type { TelemetryService } from "../TelemetryService"
/**
* Base class for telemetry event handlers
* Provides common functionality for event capture with metadata enrichment
*/
export abstract class EventHandlerBase {
/** Event prefix fo... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/mcp/schemas.ts | src/services/mcp/schemas.ts | import { DEFAULT_MCP_TIMEOUT_SECONDS, MIN_MCP_TIMEOUT_SECONDS } from "@shared/mcp"
import { z } from "zod"
import { TYPE_ERROR_MESSAGE } from "./constants"
export const AutoApproveSchema = z.array(z.string()).default([])
export const BaseConfigSchema = z.object({
autoApprove: AutoApproveSchema.optional(),
disabled:... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/mcp/McpHub.ts | src/services/mcp/McpHub.ts | import { setTimeout as setTimeoutPromise } from "node:timers/promises"
import { sendMcpServersUpdate } from "@core/controller/mcp/subscribeToMcpServers"
import { GlobalFileNames } from "@core/storage/disk"
import { StateManager } from "@core/storage/StateManager"
import { UnauthorizedError } from "@modelcontextprotocol... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | true |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/mcp/constants.ts | src/services/mcp/constants.ts | /**
* Default timeout for internal MCP data requests in milliseconds.
* This is not the same as the user facing timeout stored as DEFAULT_MCP_TIMEOUT_SECONDS.
*/
export const DEFAULT_REQUEST_TIMEOUT_MS = 5000
/**
* Custom error message for better user feedback when server type validation fails.
*/
export const TY... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/mcp/types.ts | src/services/mcp/types.ts | import { OAuthClientProvider } from "@modelcontextprotocol/sdk/client/auth.js"
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { SSEClientTransport } from "@modelcontextprotocol/sdk/client/sse.js"
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js"
import { Streama... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/mcp/McpOAuthManager.ts | src/services/mcp/McpOAuthManager.ts | import { StateManager } from "@core/storage/StateManager"
import { OAuthClientProvider } from "@modelcontextprotocol/sdk/client/auth.js"
import type { OAuthClientInformationFull, OAuthClientMetadata, OAuthTokens } from "@modelcontextprotocol/sdk/shared/auth.js"
import crypto from "crypto"
import { HostProvider } from "... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/tree-sitter/languageParser.ts | src/services/tree-sitter/languageParser.ts | import * as path from "path"
import Parser from "web-tree-sitter"
import {
cppQuery,
cQuery,
csharpQuery,
goQuery,
javaQuery,
javascriptQuery,
kotlinQuery,
phpQuery,
pythonQuery,
rubyQuery,
rustQuery,
swiftQuery,
typescriptQuery,
} from "./queries"
export interface LanguageParser {
[key: string]: {
par... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/tree-sitter/index.ts | src/services/tree-sitter/index.ts | import { ClineIgnoreController } from "@core/ignore/ClineIgnoreController"
import { listFiles } from "@services/glob/list-files"
import { fileExistsAtPath } from "@utils/fs"
import * as fs from "fs/promises"
import * as path from "path"
import { LanguageParser, loadRequiredLanguageParsers } from "./languageParser"
// ... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/tree-sitter/queries/php.ts | src/services/tree-sitter/queries/php.ts | /*
- class declarations
- function definitions
- method declarations
*/
export default `
(class_declaration
name: (name) @name.definition.class) @definition.class
(function_definition
name: (name) @name.definition.function) @definition.function
(method_declaration
name: (name) @name.definition.function) @defini... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/tree-sitter/queries/javascript.ts | src/services/tree-sitter/queries/javascript.ts | /*
- class definitions
- method definitions
- named function declarations
- arrow functions and function expressions assigned to variables
*/
export default `
(
(comment)* @doc
.
(method_definition
name: (property_identifier) @name) @definition.method
(#not-eq? @name "constructor")
(#strip! @doc "^[\\s\\*... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/tree-sitter/queries/rust.ts | src/services/tree-sitter/queries/rust.ts | /*
- struct definitions
- method definitions
- function definitions
*/
export default `
(struct_item
name: (type_identifier) @name.definition.class) @definition.class
(declaration_list
(function_item
name: (identifier) @name.definition.method)) @definition.method
(function_item
name: (identifier) ... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/tree-sitter/queries/c.ts | src/services/tree-sitter/queries/c.ts | /*
- struct declarations
- union declarations
- function declarations
- typedef declarations
*/
export default `
(struct_specifier name: (type_identifier) @name.definition.class body:(_)) @definition.class
(declaration type: (union_specifier name: (type_identifier) @name.definition.class)) @definition.class
(function... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/tree-sitter/queries/java.ts | src/services/tree-sitter/queries/java.ts | /*
- class declarations
- method declarations
- interface declarations
*/
export default `
(class_declaration
name: (identifier) @name.definition.class) @definition.class
(method_declaration
name: (identifier) @name.definition.method) @definition.method
(interface_declaration
name: (identifier) @name.definition... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/tree-sitter/queries/kotlin.ts | src/services/tree-sitter/queries/kotlin.ts | export default `
(class_declaration
name: (simple_identifier) @name.definition.class) @definition.class
(function_declaration
name: (simple_identifier) @name.definition.function) @definition.function
(interface_declaration
name: (simple_identifier) @name.definition.interface) @definition.interface
(object_decl... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/tree-sitter/queries/go.ts | src/services/tree-sitter/queries/go.ts | /*
- function declarations (with associated comments)
- method declarations (with associated comments)
- type specifications
*/
export default `
(
(comment)* @doc
.
(function_declaration
name: (identifier) @name.definition.function) @definition.function
(#strip! @doc "^//\\s*")
(#set-adjacent! @doc @defin... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/tree-sitter/queries/typescript.ts | src/services/tree-sitter/queries/typescript.ts | /*
- function signatures and declarations
- method signatures and definitions
- abstract method signatures
- class declarations (including abstract classes)
- module declarations
*/
export default `
(function_signature
name: (identifier) @name.definition.function) @definition.function
(method_signature
name: (prop... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/tree-sitter/queries/cpp.ts | src/services/tree-sitter/queries/cpp.ts | /*
- struct declarations
- union declarations
- function declarations
- method declarations (with namespace scope)
- typedef declarations
- class declarations
*/
export default `
(struct_specifier name: (type_identifier) @name.definition.class body:(_)) @definition.class
(declaration type: (union_specifier name: (type... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/tree-sitter/queries/python.ts | src/services/tree-sitter/queries/python.ts | /*
- class definitions
- function definitions
*/
export default `
(class_definition
name: (identifier) @name.definition.class) @definition.class
(function_definition
name: (identifier) @name.definition.function) @definition.function
`
| typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/tree-sitter/queries/ruby.ts | src/services/tree-sitter/queries/ruby.ts | /*
- method definitions (including singleton methods and aliases, with associated comments)
- class definitions (including singleton classes, with associated comments)
- module definitions
*/
export default `
(
(comment)* @doc
.
[
(method
name: (_) @name.definition.method) @definition.method
(single... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/tree-sitter/queries/index.ts | src/services/tree-sitter/queries/index.ts | export { default as cQuery } from "./c"
export { default as csharpQuery } from "./c-sharp"
export { default as cppQuery } from "./cpp"
export { default as goQuery } from "./go"
export { default as javaQuery } from "./java"
export { default as javascriptQuery } from "./javascript"
export { default as kotlinQuery } from ... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/tree-sitter/queries/swift.ts | src/services/tree-sitter/queries/swift.ts | /*
- class declarations
- method declarations (including initializers and deinitializers)
- property declarations
- function declarations
*/
export default `
(class_declaration
name: (type_identifier) @name) @definition.class
(protocol_declaration
name: (type_identifier) @name) @definition.interface
(class_declar... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/tree-sitter/queries/c-sharp.ts | src/services/tree-sitter/queries/c-sharp.ts | /*
- class declarations
- interface declarations
- method declarations
- namespace declarations
*/
export default `
(class_declaration
name: (identifier) @name.definition.class
) @definition.class
(interface_declaration
name: (identifier) @name.definition.interface
) @definition.interface
(method_declaration
name:... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/integrations/misc/extract-images.ts | src/integrations/misc/extract-images.ts | import { Anthropic } from "@anthropic-ai/sdk"
import fs from "fs/promises"
import sizeOf from "image-size"
import { getMimeType } from "./process-files"
/**
* Extract image content without VSCode dependencies
* Returns success/error result to avoid throwing exceptions
*/
export async function extractImageContent(
... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/integrations/misc/process-files.ts | src/integrations/misc/process-files.ts | import fs from "fs/promises"
import sizeOf from "image-size"
import * as path from "path"
import { HostProvider } from "@/hosts/host-provider"
import { ShowMessageType } from "@/shared/proto/host/window"
/**
* Supports processing of images and other file types
* For models which don't support images, will not allow ... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/integrations/misc/export-markdown.ts | src/integrations/misc/export-markdown.ts | import { Anthropic } from "@anthropic-ai/sdk"
/**
* Formats a content block to markdown for display in API request messages.
* Used by Task class to format user content for the api_req_started message.
*/
export function formatContentBlockToMarkdown(block: Anthropic.ContentBlockParam): string {
switch (block.type)... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/integrations/misc/extract-text.ts | src/integrations/misc/extract-text.ts | import ExcelJS from "exceljs"
import fs from "fs/promises"
import * as iconv from "iconv-lite"
import { isBinaryFile } from "isbinaryfile"
import * as chardet from "jschardet"
import mammoth from "mammoth"
import * as path from "path"
// @ts-ignore-next-line
import pdf from "pdf-parse/lib/pdf-parse"
export async funct... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/integrations/misc/extract-file-content.ts | src/integrations/misc/extract-file-content.ts | import { Anthropic } from "@anthropic-ai/sdk"
import fs from "fs/promises"
import * as path from "path"
import { extractImageContent } from "./extract-images"
import { callTextExtractionFunctions } from "./extract-text"
export type FileContentResult = {
text: string
imageBlock?: Anthropic.ImageBlockParam
}
/**
* E... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/integrations/misc/link-preview.ts | src/integrations/misc/link-preview.ts | import axios from "axios"
import ogs from "open-graph-scraper"
import { fetch, getAxiosSettings } from "@/shared/net"
export interface OpenGraphData {
title?: string
description?: string
image?: string
url?: string
siteName?: string
type?: string
}
/**
* Fetches Open Graph metadata from a URL
* @param url The... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/integrations/misc/open-file.ts | src/integrations/misc/open-file.ts | import { writeFile } from "@utils/fs"
import * as os from "os"
import * as path from "path"
import { HostProvider } from "@/hosts/host-provider"
import { ShowMessageType } from "@/shared/proto/host/window"
export async function openImage(dataUri: string) {
const matches = dataUri.match(/^data:image\/([a-zA-Z]+);base6... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/integrations/checkpoints/CheckpointExclusions.ts | src/integrations/checkpoints/CheckpointExclusions.ts | import { fileExistsAtPath } from "@utils/fs"
import fs from "fs/promises"
import { join } from "path"
import { GIT_DISABLED_SUFFIX } from "./CheckpointGitOperations"
/**
* CheckpointExclusions Module
*
* A specialized module within Cline's Checkpoints system that manages file exclusion rules
* for the checkpoint t... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/integrations/checkpoints/MultiRootCheckpointManager.ts | src/integrations/checkpoints/MultiRootCheckpointManager.ts | /**
* TODO: MULTI-ROOT CHECKPOINT MANAGER - NOT YET IN USE
*
* This MultiRootCheckpointManager class has been implemented as part of Phase 1
* of the multi-workspace support initiative, but it is NOT currently being used
* anywhere in the codebase.
*
* Current Status:
* - The infrastructure is complete and read... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/integrations/checkpoints/CheckpointTracker.ts | src/integrations/checkpoints/CheckpointTracker.ts | import { sendCheckpointEvent } from "@core/controller/checkpoints/subscribeToCheckpoints"
import fs from "fs/promises"
import { isBinaryFile } from "isbinaryfile"
import * as path from "path"
import simpleGit from "simple-git"
import type { FolderLockWithRetryResult } from "@/core/locks/types"
import { telemetryService... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/integrations/checkpoints/CheckpointGitOperations.ts | src/integrations/checkpoints/CheckpointGitOperations.ts | import { fileExistsAtPath } from "@utils/fs"
import fs from "fs/promises"
import { globby } from "globby"
import * as path from "path"
import simpleGit, { type SimpleGit } from "simple-git"
import { telemetryService } from "@/services/telemetry"
import { getLfsPatterns, writeExcludesFile } from "./CheckpointExclusions"... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/integrations/checkpoints/initializer.ts | src/integrations/checkpoints/initializer.ts | import type { ICheckpointManager } from "@integrations/checkpoints/types"
import pTimeout from "p-timeout"
/**
* Ensures a checkpoint manager is initialized, handling both single-root and multi-root implementations.
* - TaskCheckpointManager exposes `checkpointTrackerCheckAndInit()`
* - MultiRootCheckpointManager e... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/integrations/checkpoints/CheckpointLockUtils.ts | src/integrations/checkpoints/CheckpointLockUtils.ts | import { releaseFolderLock, tryAcquireFolderLockWithRetry } from "@/core/locks/FolderLockUtils"
import type { FolderLockOptions, FolderLockWithRetryResult } from "@/core/locks/types"
/**
* Base path for checkpoint folders
*/
const CHECKPOINTS_BASE_PATH = "~/.cline/data/checkpoints"
/**
* Attempt to acquire checkpo... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/integrations/checkpoints/CheckpointUtils.ts | src/integrations/checkpoints/CheckpointUtils.ts | import { access, constants, mkdir } from "fs/promises"
import os from "os"
import * as path from "path"
import { HostProvider } from "@/hosts/host-provider"
import { getCwd, getDesktopDir } from "@/utils/path"
/**
* Gets the path to the shadow Git repository in globalStorage.
*
* Checkpoints path structure:
* glob... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/integrations/checkpoints/factory.ts | src/integrations/checkpoints/factory.ts | import type { FileContextTracker } from "@core/context/context-tracking/FileContextTracker"
import type { MessageStateHandler } from "@core/task/message-state"
import type { TaskState } from "@core/task/TaskState"
import { isMultiRootEnabled } from "@core/workspace/multi-root-utils"
import { WorkspaceRootManager } from... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/integrations/checkpoints/types.ts | src/integrations/checkpoints/types.ts | /**
* Common interface for checkpoint managers
* Allows single-root and multi-root managers to be used interchangeably
*/
export interface ICheckpointManager {
saveCheckpoint(isAttemptCompletionMessage?: boolean, completionMessageTs?: number): Promise<void>
restoreCheckpoint(messageTs: number, restoreType: any, o... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/integrations/checkpoints/index.ts | src/integrations/checkpoints/index.ts | import { ContextManager } from "@core/context/context-management/ContextManager"
import { FileContextTracker } from "@core/context/context-tracking/FileContextTracker"
import { sendRelinquishControlEvent } from "@core/controller/ui/subscribeToRelinquishControl"
import { ensureTaskDirectoryExists } from "@core/storage/d... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | true |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/integrations/checkpoints/CheckpointMigration.ts | src/integrations/checkpoints/CheckpointMigration.ts | import { fileExistsAtPath } from "@utils/fs"
import fs from "fs/promises"
import * as path from "path"
import { HostProvider } from "@/hosts/host-provider"
/**
* Cleans up legacy checkpoints from task folders.
* This is a one-time operation that runs when the extension is updated to use the new checkpoint system.
*... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/integrations/checkpoints/__tests__/factory.test.ts | src/integrations/checkpoints/__tests__/factory.test.ts | import type { StateManager } from "@core/storage/StateManager"
import type { WorkspaceRootManager } from "@core/workspace/WorkspaceRootManager"
import { expect } from "chai"
import { shouldUseMultiRoot } from "../factory"
describe("shouldUseMultiRoot", () => {
const makeWr = (roots: { path: string }[]): WorkspaceRoot... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/integrations/editor/FileEditProvider.ts | src/integrations/editor/FileEditProvider.ts | import { DiffViewProvider } from "@integrations/editor/DiffViewProvider"
import * as fs from "fs/promises"
/**
* A file-system-based implementation of DiffViewProvider that performs direct file operations
* without visual editor integration. This provider uses the Node.js fs package to handle
* file edits in-memory... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/integrations/editor/DiffViewProvider.ts | src/integrations/editor/DiffViewProvider.ts | import { formatResponse } from "@core/prompts/responses"
import { workspaceResolver } from "@core/workspace"
import { createDirectoriesForFile } from "@utils/fs"
import { getCwd } from "@utils/path"
import * as diff from "diff"
import * as fs from "fs/promises"
import * as iconv from "iconv-lite"
import { HostProvider ... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/integrations/editor/CommentReviewController.ts | src/integrations/editor/CommentReviewController.ts | /**
* Represents a review comment from the AI
*/
export interface ReviewComment {
/** Absolute path to the file */
filePath: string
/** 0-indexed start line of the code this comment applies to */
startLine: number
/** 0-indexed end line of the code this comment applies to */
endLine: number
/** The comment tex... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/integrations/editor/detect-omission.ts | src/integrations/editor/detect-omission.ts | import { HostProvider } from "@hosts/host-provider"
import { ShowMessageType } from "@shared/proto/host/window"
import { openExternal } from "@utils/env"
/**
* Detects potential AI-generated code omissions in the given file content.
* @param originalFileContent The original content of the file.
* @param newFileCont... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/integrations/terminal/CommandExecutor.ts | src/integrations/terminal/CommandExecutor.ts | /**
* CommandExecutor - Unified command execution for all terminal modes.
*
* This class handles command execution for both VSCode terminal mode and
* standalone/CLI mode. It uses the shared CommandOrchestrator for the
* common orchestration logic (buffering, user interaction, result formatting).
*
* The differe... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/integrations/terminal/constants.ts | src/integrations/terminal/constants.ts | /**
* Terminal Constants
*
* Central location for all terminal-related constants.
* This makes it easy to understand and tune terminal behavior.
*/
// =============================================================================
// Process "Hot" State Timeouts
// ==================================================... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/integrations/terminal/CommandOrchestrator.ts | src/integrations/terminal/CommandOrchestrator.ts | /**
* CommandOrchestrator - Shared command execution orchestration logic.
*
* This module contains the common orchestration logic for command execution
* that is shared between VSCode and Standalone terminal modes. It handles:
* - Output buffering and chunking
* - User interaction (ask/say callbacks)
* - "Procee... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/integrations/terminal/types.ts | src/integrations/terminal/types.ts | /**
* Shared terminal types and interfaces for both VSCode and Standalone terminal managers.
* These types ensure compatibility between the VSCode-based TerminalManager and
* the StandaloneTerminalManager used in CLI/JetBrains environments.
*/
import type { ClineToolResponseContent } from "@shared/messages"
import... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/integrations/terminal/index.ts | src/integrations/terminal/index.ts | /**
* Shared terminal module for both VSCode and Standalone environments.
*
* This module provides terminal management functionality that works across:
* - VSCode Extension (using VSCode's terminal API or background execution)
* - CLI (using StandaloneTerminalManager)
* - JetBrains (using StandaloneTerminalManage... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/integrations/terminal/standalone/StandaloneTerminalRegistry.ts | src/integrations/terminal/standalone/StandaloneTerminalRegistry.ts | /**
* StandaloneTerminalRegistry - Manages terminal instances in standalone environments.
*
* This class tracks and manages multiple terminal instances, providing
* functionality to create, retrieve, update, and remove terminals.
*/
import type { ITerminal, StandaloneTerminalOptions, TerminalInfo } from "../types... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/integrations/terminal/standalone/StandaloneTerminalProcess.ts | src/integrations/terminal/standalone/StandaloneTerminalProcess.ts | /**
* StandaloneTerminalProcess - Manages command execution in standalone environments.
*
* This class handles subprocess management for terminal commands when running
* outside of VSCode (CLI, JetBrains). It spawns child processes and streams
* their output through events.
*
* Implements ITerminalProcess interf... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/integrations/terminal/standalone/StandaloneTerminal.ts | src/integrations/terminal/standalone/StandaloneTerminal.ts | /**
* StandaloneTerminal - A terminal wrapper for standalone environments.
*
* This class provides a terminal abstraction that works outside of VSCode,
* implementing the ITerminal interface for compatibility with the terminal manager.
*/
import type { ChildProcess } from "child_process"
import type { ITerminal,... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.