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 |
|---|---|---|---|---|---|---|---|---|
freeCodeCamp/freeCodeCamp | https://github.com/freeCodeCamp/freeCodeCamp/blob/7d58ef2062b457d9370a7f730fc875f92ad28a80/client/src/client-only-routes/show-user.test.tsx | client/src/client-only-routes/show-user.test.tsx | /* eslint-disable */
import React from 'react';
import { render, screen } from '@testing-library/react';
import { describe, it, expect, vi } from 'vitest';
import { Provider } from 'react-redux';
import type * as I18next from 'i18next';
import { createStore } from '../redux/create-store';
import { ShowUser } from './s... | typescript | BSD-3-Clause | 7d58ef2062b457d9370a7f730fc875f92ad28a80 | 2026-01-04T15:25:31.297347Z | false |
freeCodeCamp/freeCodeCamp | https://github.com/freeCodeCamp/freeCodeCamp/blob/7d58ef2062b457d9370a7f730fc875f92ad28a80/client/src/client-only-routes/show-settings.test.tsx | client/src/client-only-routes/show-settings.test.tsx | import React from 'react';
import { render } from '@testing-library/react';
import { describe, it, expect, vi, beforeAll } from 'vitest';
import { Provider } from 'react-redux';
import envData from '../../config/env.json';
import ShowSettings from './show-settings';
import { createStore } from '../redux/create-store';... | typescript | BSD-3-Clause | 7d58ef2062b457d9370a7f730fc875f92ad28a80 | 2026-01-04T15:25:31.297347Z | false |
freeCodeCamp/freeCodeCamp | https://github.com/freeCodeCamp/freeCodeCamp/blob/7d58ef2062b457d9370a7f730fc875f92ad28a80/client/src/client-only-routes/show-daily-coding-challenge.tsx | client/src/client-only-routes/show-daily-coding-challenge.tsx | import React, { useEffect, useState } from 'react';
import { useParams } from '@gatsbyjs/reach-router';
import store from 'store';
import ShowClassic from '../templates/Challenges/classic/show';
import { Loader } from '../components/helpers';
import {
DailyCodingChallengeLanguages,
DailyCodingChallengeNode,
Daily... | typescript | BSD-3-Clause | 7d58ef2062b457d9370a7f730fc875f92ad28a80 | 2026-01-04T15:25:31.297347Z | false |
freeCodeCamp/freeCodeCamp | https://github.com/freeCodeCamp/freeCodeCamp/blob/7d58ef2062b457d9370a7f730fc875f92ad28a80/client/src/client-only-routes/show-project-links.tsx | client/src/client-only-routes/show-project-links.tsx | import { find } from 'lodash-es';
import React, { useState } from 'react';
import { Trans, useTranslation } from 'react-i18next';
import { connect } from 'react-redux';
import { Table, Spacer } from '@freecodecamp/ui';
import { Link } from '../components/helpers';
import ProjectModal from '../components/SolutionViewer... | typescript | BSD-3-Clause | 7d58ef2062b457d9370a7f730fc875f92ad28a80 | 2026-01-04T15:25:31.297347Z | false |
freeCodeCamp/freeCodeCamp | https://github.com/freeCodeCamp/freeCodeCamp/blob/7d58ef2062b457d9370a7f730fc875f92ad28a80/client/src/client-only-routes/show-certification.tsx | client/src/client-only-routes/show-certification.tsx | import { isEmpty } from 'lodash-es';
import { QRCodeSVG } from 'qrcode.react';
import React, { useEffect, useState } from 'react';
import { Trans, useTranslation } from 'react-i18next';
import { connect } from 'react-redux';
import { bindActionCreators, Dispatch } from 'redux';
import { createSelector } from 'reselect'... | typescript | BSD-3-Clause | 7d58ef2062b457d9370a7f730fc875f92ad28a80 | 2026-01-04T15:25:31.297347Z | false |
freeCodeCamp/freeCodeCamp | https://github.com/freeCodeCamp/freeCodeCamp/blob/7d58ef2062b457d9370a7f730fc875f92ad28a80/client/src/client-only-routes/show-profile-or-four-oh-four.tsx | client/src/client-only-routes/show-profile-or-four-oh-four.tsx | import { isEmpty } from 'lodash-es';
import React, { useEffect } from 'react';
import { connect } from 'react-redux';
import { isBrowser } from '../../utils/index';
import FourOhFour from '../components/FourOhFour';
import Loader from '../components/helpers/loader';
import Profile from '../components/profile/profile';... | typescript | BSD-3-Clause | 7d58ef2062b457d9370a7f730fc875f92ad28a80 | 2026-01-04T15:25:31.297347Z | false |
freeCodeCamp/freeCodeCamp | https://github.com/freeCodeCamp/freeCodeCamp/blob/7d58ef2062b457d9370a7f730fc875f92ad28a80/client/src/analytics/call-ga.ts | client/src/analytics/call-ga.ts | import {
DonationAmount,
DonationDuration
} from '../../../shared-dist/config/donation-settings';
import { ChallengeFiles } from '../redux/prop-types';
import TagManager from '.';
type DonationEventAction =
| 'Donate Page PayPal Payment Submission'
| 'Donate Page Stripe Card Payment Submission'
| 'Donate Pag... | typescript | BSD-3-Clause | 7d58ef2062b457d9370a7f730fc875f92ad28a80 | 2026-01-04T15:25:31.297347Z | false |
freeCodeCamp/freeCodeCamp | https://github.com/freeCodeCamp/freeCodeCamp/blob/7d58ef2062b457d9370a7f730fc875f92ad28a80/client/src/analytics/index.ts | client/src/analytics/index.ts | import TagManager from 'react-gtm-module';
import {
devAnalyticsId,
prodAnalyticsId
} from '../../config/analytics-settings';
import envData from '../../config/env.json';
const { deploymentEnv } = envData;
const analyticsIDSelector = () => {
if (deploymentEnv === 'staging') return devAnalyticsId;
else retur... | typescript | BSD-3-Clause | 7d58ef2062b457d9370a7f730fc875f92ad28a80 | 2026-01-04T15:25:31.297347Z | false |
freeCodeCamp/freeCodeCamp | https://github.com/freeCodeCamp/freeCodeCamp/blob/7d58ef2062b457d9370a7f730fc875f92ad28a80/client/src/analytics/__mocks__/index.tsx | client/src/analytics/__mocks__/index.tsx | const analytics = {
event: function (): void {
// comment necessary for linting.
}
};
export default analytics;
| typescript | BSD-3-Clause | 7d58ef2062b457d9370a7f730fc875f92ad28a80 | 2026-01-04T15:25:31.297347Z | false |
freeCodeCamp/freeCodeCamp | https://github.com/freeCodeCamp/freeCodeCamp/blob/7d58ef2062b457d9370a7f730fc875f92ad28a80/client/i18n/config-for-tests.ts | client/i18n/config-for-tests.ts | import i18n from 'i18next';
import { initReactI18next } from 'react-i18next';
i18n
.use(initReactI18next)
.init({
debug: true,
defaultNS: 'translations',
fallbackLng: 'en',
interpolation: {
escapeValue: false
},
lng: 'en',
ns: ['intro', 'translations'],
resources: { en: { intr... | typescript | BSD-3-Clause | 7d58ef2062b457d9370a7f730fc875f92ad28a80 | 2026-01-04T15:25:31.297347Z | false |
freeCodeCamp/freeCodeCamp | https://github.com/freeCodeCamp/freeCodeCamp/blob/7d58ef2062b457d9370a7f730fc875f92ad28a80/client/i18n/schema-validation.ts | client/i18n/schema-validation.ts | import path from 'path';
import { readFile } from 'fs/promises';
import { availableLangs } from '../../shared-dist/config/i18n';
import introSchema from './locales/english/intro.json';
import linksSchema from './locales/english/links.json';
import metaTagsSchema from './locales/english/meta-tags.json';
import motivatio... | typescript | BSD-3-Clause | 7d58ef2062b457d9370a7f730fc875f92ad28a80 | 2026-01-04T15:25:31.297347Z | false |
freeCodeCamp/freeCodeCamp | https://github.com/freeCodeCamp/freeCodeCamp/blob/7d58ef2062b457d9370a7f730fc875f92ad28a80/client/i18n/locales.test.ts | client/i18n/locales.test.ts | import fs from 'fs';
import { dirname } from 'path';
import { fileURLToPath } from 'url';
import { describe, test, expect } from 'vitest';
import {
availableLangs,
LangNames,
LangCodes
} from '../../shared-dist/config/i18n';
import {
catalogSuperBlocks,
SuperBlocks
} from '../../shared-dist/config/curriculu... | typescript | BSD-3-Clause | 7d58ef2062b457d9370a7f730fc875f92ad28a80 | 2026-01-04T15:25:31.297347Z | false |
freeCodeCamp/freeCodeCamp | https://github.com/freeCodeCamp/freeCodeCamp/blob/7d58ef2062b457d9370a7f730fc875f92ad28a80/client/utils/tags.tsx | client/utils/tags.tsx | import i18next from 'i18next';
import React from 'react';
import { isMathJaxAllowed, mathJaxSrc } from '../src/utils/math-jax';
export function getheadTagComponents(): JSX.Element[] {
const socialImage =
'https://cdn.freecodecamp.org/platform/universal/fcc_meta_1920X1080-indigo.png';
const headTags = [
<... | typescript | BSD-3-Clause | 7d58ef2062b457d9370a7f730fc875f92ad28a80 | 2026-01-04T15:25:31.297347Z | false |
freeCodeCamp/freeCodeCamp | https://github.com/freeCodeCamp/freeCodeCamp/blob/7d58ef2062b457d9370a7f730fc875f92ad28a80/client/utils/declarations.d.ts | client/utils/declarations.d.ts | declare global {
interface Window {
// This is a feature Gatsby adds to the `window` object.
// https://github.com/gatsbyjs/gatsby/blob/deb41cdfefbefe0c170b5dd7c10a19ba2b338f6e/packages/gatsby/cache-dir/production-app.js#L28
___loader: {
enqueue: () => void;
hovering: (path: string | null) => ... | typescript | BSD-3-Clause | 7d58ef2062b457d9370a7f730fc875f92ad28a80 | 2026-01-04T15:25:31.297347Z | false |
freeCodeCamp/freeCodeCamp | https://github.com/freeCodeCamp/freeCodeCamp/blob/7d58ef2062b457d9370a7f730fc875f92ad28a80/client/utils/test-utils.tsx | client/utils/test-utils.tsx | import React, { type ReactElement } from 'react';
import { render as rtlRender } from '@testing-library/react';
import { Provider } from 'react-redux';
import type { Store } from 'redux';
function render(ui: ReactElement, store: Store) {
function Wrapper({ children }: { children: ReactElement }) {
return <Provid... | typescript | BSD-3-Clause | 7d58ef2062b457d9370a7f730fc875f92ad28a80 | 2026-01-04T15:25:31.297347Z | false |
freeCodeCamp/freeCodeCamp | https://github.com/freeCodeCamp/freeCodeCamp/blob/7d58ef2062b457d9370a7f730fc875f92ad28a80/client/utils/sort-challengefiles.ts | client/utils/sort-challengefiles.ts | export function sortChallengeFiles<File extends { fileKey: string }>(
challengeFiles: File[]
): File[] {
return challengeFiles.toSorted((a, b) => {
if (a.fileKey === 'indexjsx') return -1;
if (b.fileKey === 'indexjsx') return 1;
if (a.fileKey === 'indextsx') return -1;
if (b.fileKey === 'indextsx') ... | typescript | BSD-3-Clause | 7d58ef2062b457d9370a7f730fc875f92ad28a80 | 2026-01-04T15:25:31.297347Z | false |
freeCodeCamp/freeCodeCamp | https://github.com/freeCodeCamp/freeCodeCamp/blob/7d58ef2062b457d9370a7f730fc875f92ad28a80/client/utils/sort-challengefiles.test.ts | client/utils/sort-challengefiles.test.ts | import { describe, it, expect } from 'vitest';
import { challengeFiles } from './__fixtures__/challenges';
import { sortChallengeFiles } from './sort-challengefiles';
describe('sort-files', () => {
describe('sortChallengeFiles', () => {
it('should return an array', () => {
const sorted = sortChallengeFiles... | typescript | BSD-3-Clause | 7d58ef2062b457d9370a7f730fc875f92ad28a80 | 2026-01-04T15:25:31.297347Z | false |
freeCodeCamp/freeCodeCamp | https://github.com/freeCodeCamp/freeCodeCamp/blob/7d58ef2062b457d9370a7f730fc875f92ad28a80/client/utils/index.ts | client/utils/index.ts | import { Certification } from '../../shared-dist/config/certification-settings';
const idToPath = new Map(
Object.entries({
'561add10cb82ac38a17523bc': Certification.BackEndDevApis,
'5a553ca864b52e1d8bceea14': Certification.DataVis,
'561acd10cb82ac38a17513bc': Certification.FrontEndDevLibs,
'5e611829... | typescript | BSD-3-Clause | 7d58ef2062b457d9370a7f730fc875f92ad28a80 | 2026-01-04T15:25:31.297347Z | false |
freeCodeCamp/freeCodeCamp | https://github.com/freeCodeCamp/freeCodeCamp/blob/7d58ef2062b457d9370a7f730fc875f92ad28a80/client/utils/gatsby/layout-selector.tsx | client/utils/gatsby/layout-selector.tsx | import React from 'react';
import CertificationLayout from '../../src/components/layouts/certification';
import DefaultLayout from '../../src/components/layouts/default';
import FourOhFourPage from '../../src/pages/404';
interface LayoutSelectorProps {
element: JSX.Element;
props: {
data: { challengeNode?: { ... | typescript | BSD-3-Clause | 7d58ef2062b457d9370a7f730fc875f92ad28a80 | 2026-01-04T15:25:31.297347Z | false |
freeCodeCamp/freeCodeCamp | https://github.com/freeCodeCamp/freeCodeCamp/blob/7d58ef2062b457d9370a7f730fc875f92ad28a80/client/utils/gatsby/page-loading.ts | client/utils/gatsby/page-loading.ts | /**
* The function is useful in cases where we want to preload a page
* but the link of the page isn't rendered on the screen.
* For more details, see https://github.com/freeCodeCamp/freeCodeCamp/pull/55472.
*/
export const preloadPage = (path?: string) => {
if (!window.___loader || !path) return;
window.___lo... | typescript | BSD-3-Clause | 7d58ef2062b457d9370a7f730fc875f92ad28a80 | 2026-01-04T15:25:31.297347Z | false |
freeCodeCamp/freeCodeCamp | https://github.com/freeCodeCamp/freeCodeCamp/blob/7d58ef2062b457d9370a7f730fc875f92ad28a80/client/utils/gatsby/layout-selector.test.tsx | client/utils/gatsby/layout-selector.test.tsx | /* eslint-disable @typescript-eslint/no-unsafe-member-access */
import React from 'react';
import { Provider } from 'react-redux';
import ShallowRenderer from 'react-test-renderer/shallow';
import { describe, test, expect, vi } from 'vitest';
import FourOhFourPage from '../../src/pages/404';
import Certification from ... | typescript | BSD-3-Clause | 7d58ef2062b457d9370a7f730fc875f92ad28a80 | 2026-01-04T15:25:31.297347Z | false |
freeCodeCamp/freeCodeCamp | https://github.com/freeCodeCamp/freeCodeCamp/blob/7d58ef2062b457d9370a7f730fc875f92ad28a80/client/utils/__fixtures__/challenges.ts | client/utils/__fixtures__/challenges.ts | import { ChallengeFile } from "../../src/redux/prop-types";
export const challengeFiles: ChallengeFile[] = [
{
contents: 'some ts',
error: null,
ext: 'ts',
head: '',
history: ['index.ts'],
fileKey: 'indexts',
name: 'index',
seed: 'some ts',
tail: '',
editableRegionBoundaries: ... | typescript | BSD-3-Clause | 7d58ef2062b457d9370a7f730fc875f92ad28a80 | 2026-01-04T15:25:31.297347Z | false |
freeCodeCamp/freeCodeCamp | https://github.com/freeCodeCamp/freeCodeCamp/blob/7d58ef2062b457d9370a7f730fc875f92ad28a80/client/config/misc.ts | client/config/misc.ts | export const MAX_MOBILE_WIDTH = 767;
export const EX_SMALL_VIEWPORT_HEIGHT = 300;
export const TOOL_PANEL_HEIGHT = 37;
export const SEARCH_EXPOSED_WIDTH = 980;
| typescript | BSD-3-Clause | 7d58ef2062b457d9370a7f730fc875f92ad28a80 | 2026-01-04T15:25:31.297347Z | false |
freeCodeCamp/freeCodeCamp | https://github.com/freeCodeCamp/freeCodeCamp/blob/7d58ef2062b457d9370a7f730fc875f92ad28a80/client/config/cert-and-project-map.ts | client/config/cert-and-project-map.ts | import {
Certification,
legacyCertifications,
upcomingCertifications,
currentCertifications
} from '../../shared-dist/config/certification-settings';
import config from '../config/env.json';
const { showUpcomingChanges } = config;
const responsiveWebBase =
'/learn/responsive-web-design/responsive-web-design... | typescript | BSD-3-Clause | 7d58ef2062b457d9370a7f730fc875f92ad28a80 | 2026-01-04T15:25:31.297347Z | true |
freeCodeCamp/freeCodeCamp | https://github.com/freeCodeCamp/freeCodeCamp/blob/7d58ef2062b457d9370a7f730fc875f92ad28a80/client/config/analytics-settings.ts | client/config/analytics-settings.ts | export const prodAnalyticsId = 'GTM-57R6KJM';
export const devAnalyticsId = 'GTM-WSS47LM';
| typescript | BSD-3-Clause | 7d58ef2062b457d9370a7f730fc875f92ad28a80 | 2026-01-04T15:25:31.297347Z | false |
freeCodeCamp/freeCodeCamp | https://github.com/freeCodeCamp/freeCodeCamp/blob/7d58ef2062b457d9370a7f730fc875f92ad28a80/client/__mocks__/react-spinkit.tsx | client/__mocks__/react-spinkit.tsx | import React from 'react';
// eslint-disable-next-line react/display-name
export default () => <div>Spinner</div>;
| typescript | BSD-3-Clause | 7d58ef2062b457d9370a7f730fc875f92ad28a80 | 2026-01-04T15:25:31.297347Z | false |
freeCodeCamp/freeCodeCamp | https://github.com/freeCodeCamp/freeCodeCamp/blob/7d58ef2062b457d9370a7f730fc875f92ad28a80/client/__mocks__/gatsby.ts | client/__mocks__/gatsby.ts | import React from 'react';
import type { GatsbyLinkProps } from 'gatsby';
import { vi } from 'vitest';
import gatsby from 'gatsby';
import envData from '../config/env.json';
const { clientLocale } = envData;
export const navigate = vi.fn();
export const graphql = vi.fn();
export const Link = vi
.fn()
.mockImpleme... | typescript | BSD-3-Clause | 7d58ef2062b457d9370a7f730fc875f92ad28a80 | 2026-01-04T15:25:31.297347Z | false |
freeCodeCamp/freeCodeCamp | https://github.com/freeCodeCamp/freeCodeCamp/blob/7d58ef2062b457d9370a7f730fc875f92ad28a80/shared/utils/validate.test.ts | shared/utils/validate.test.ts | import { describe, it, expect } from 'vitest';
import {
isValidUsername,
usernameTooShort,
validationSuccess,
usernameIsHttpStatusCode,
invalidCharError,
isMicrosoftTranscriptLink
} from './validate';
function inRange(num: number, range: number[]) {
return num >= range[0] && num <= range[1];
}
describe(... | typescript | BSD-3-Clause | 7d58ef2062b457d9370a7f730fc875f92ad28a80 | 2026-01-04T15:25:31.297347Z | false |
freeCodeCamp/freeCodeCamp | https://github.com/freeCodeCamp/freeCodeCamp/blob/7d58ef2062b457d9370a7f730fc875f92ad28a80/shared/utils/is-audited.ts | shared/utils/is-audited.ts | import { type SuperBlocks, getAuditedSuperBlocks } from '../config/curriculum';
export function isAuditedSuperBlock(language: string, superblock: SuperBlocks) {
// TODO: when all the consumers of this function use TypeScript we can remove
// this check
if (!language || !superblock)
throw Error('Both argument... | typescript | BSD-3-Clause | 7d58ef2062b457d9370a7f730fc875f92ad28a80 | 2026-01-04T15:25:31.297347Z | false |
freeCodeCamp/freeCodeCamp | https://github.com/freeCodeCamp/freeCodeCamp/blob/7d58ef2062b457d9370a7f730fc875f92ad28a80/shared/utils/polyvinyl.test.ts | shared/utils/polyvinyl.test.ts | import { describe, it, expect } from 'vitest';
import { createPoly, createSource } from './polyvinyl';
const polyData = {
name: 'test',
ext: 'js',
contents: 'var hello = world;',
history: ['test.js']
};
describe('createSource', () => {
it('should return a vinyl object with a source matching the contents', (... | typescript | BSD-3-Clause | 7d58ef2062b457d9370a7f730fc875f92ad28a80 | 2026-01-04T15:25:31.297347Z | false |
freeCodeCamp/freeCodeCamp | https://github.com/freeCodeCamp/freeCodeCamp/blob/7d58ef2062b457d9370a7f730fc875f92ad28a80/shared/utils/get-lines.ts | shared/utils/get-lines.ts | export function getLines(contents: string, range?: number[]): string {
if (!range) {
return '';
}
const lines = contents.split('\n');
const editableLines =
range[1] <= range[0] ? [] : lines.slice(range[0], range[1] - 1);
return editableLines.join('\n');
}
| typescript | BSD-3-Clause | 7d58ef2062b457d9370a7f730fc875f92ad28a80 | 2026-01-04T15:25:31.297347Z | false |
freeCodeCamp/freeCodeCamp | https://github.com/freeCodeCamp/freeCodeCamp/blob/7d58ef2062b457d9370a7f730fc875f92ad28a80/shared/utils/polyvinyl.ts | shared/utils/polyvinyl.ts | const exts = ['js', 'html', 'css', 'jsx', 'ts', 'tsx', 'py'] as const;
export type Ext = (typeof exts)[number];
export interface IncompleteChallengeFile {
fileKey: string;
ext: Ext;
name: string;
contents: string;
head?: string;
tail?: string;
}
export interface ChallengeFile extends IncompleteChallengeFi... | typescript | BSD-3-Clause | 7d58ef2062b457d9370a7f730fc875f92ad28a80 | 2026-01-04T15:25:31.297347Z | false |
freeCodeCamp/freeCodeCamp | https://github.com/freeCodeCamp/freeCodeCamp/blob/7d58ef2062b457d9370a7f730fc875f92ad28a80/shared/utils/shuffle-array.ts | shared/utils/shuffle-array.ts | /** Shuffle array using the Fisher–Yates shuffle algorithm */
export const shuffleArray = <T>(arrToShuffle: Array<T>) => {
const arr = [...arrToShuffle];
for (let i = arr.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1));
// We know that i and j are within the bounds of the array, TS... | typescript | BSD-3-Clause | 7d58ef2062b457d9370a7f730fc875f92ad28a80 | 2026-01-04T15:25:31.297347Z | false |
freeCodeCamp/freeCodeCamp | https://github.com/freeCodeCamp/freeCodeCamp/blob/7d58ef2062b457d9370a7f730fc875f92ad28a80/shared/utils/get-lines.test.ts | shared/utils/get-lines.test.ts | import { describe, it, expect } from 'vitest';
import { getLines } from './get-lines';
const content = 'one\ntwo\nthree';
describe('dasherize', () => {
it('returns a string', () => {
expect(getLines('')).toBe('');
});
it("returns '' when the second arg is empty", () => {
expect(getLines(content)).toBe('... | typescript | BSD-3-Clause | 7d58ef2062b457d9370a7f730fc875f92ad28a80 | 2026-01-04T15:25:31.297347Z | false |
freeCodeCamp/freeCodeCamp | https://github.com/freeCodeCamp/freeCodeCamp/blob/7d58ef2062b457d9370a7f730fc875f92ad28a80/shared/utils/validate.ts | shared/utils/validate.ts | type Valid = {
valid: true;
error: null;
};
type Invalid = {
valid: false;
error: string;
};
type Validated = Valid | Invalid;
export const invalidCharError: Invalid = {
valid: false,
error: 'contains invalid characters'
};
export const validationSuccess: Valid = { valid: true, error: null };
export cons... | typescript | BSD-3-Clause | 7d58ef2062b457d9370a7f730fc875f92ad28a80 | 2026-01-04T15:25:31.297347Z | false |
freeCodeCamp/freeCodeCamp | https://github.com/freeCodeCamp/freeCodeCamp/blob/7d58ef2062b457d9370a7f730fc875f92ad28a80/shared/config/curriculum.test.ts | shared/config/curriculum.test.ts | import { describe, it, expect } from 'vitest';
import { Languages } from './i18n';
import {
SuperBlocks,
SuperBlockStage,
superBlockStages,
notAuditedSuperBlocks,
generateSuperBlockList,
getAuditedSuperBlocks
} from './curriculum';
describe('superBlockOrder', () => {
it('should contain all SuperBlocks', ... | typescript | BSD-3-Clause | 7d58ef2062b457d9370a7f730fc875f92ad28a80 | 2026-01-04T15:25:31.297347Z | false |
freeCodeCamp/freeCodeCamp | https://github.com/freeCodeCamp/freeCodeCamp/blob/7d58ef2062b457d9370a7f730fc875f92ad28a80/shared/config/catalog.test.ts | shared/config/catalog.test.ts | import { describe, it, expect } from 'vitest';
import { catalogSuperBlocks } from './curriculum';
import { catalog } from './catalog';
describe('catalog', () => {
it('should have exactly one entry for each superblock in SuperBlockStage.Catalog', () => {
expect(catalog.map(course => course.superBlock.toString()).... | typescript | BSD-3-Clause | 7d58ef2062b457d9370a7f730fc875f92ad28a80 | 2026-01-04T15:25:31.297347Z | false |
freeCodeCamp/freeCodeCamp | https://github.com/freeCodeCamp/freeCodeCamp/blob/7d58ef2062b457d9370a7f730fc875f92ad28a80/shared/config/certification-settings.ts | shared/config/certification-settings.ts | import { SuperBlocks } from '../config/curriculum.js';
/**
* Certifications are not equivalent to superblocks. Each superblock corresponds
* to 0 or 1 certifications, but a certification may not correspond to a
* superblock.
*
* As an example of the former: the CodingInterviewPrep superblock does not
* correspon... | typescript | BSD-3-Clause | 7d58ef2062b457d9370a7f730fc875f92ad28a80 | 2026-01-04T15:25:31.297347Z | false |
freeCodeCamp/freeCodeCamp | https://github.com/freeCodeCamp/freeCodeCamp/blob/7d58ef2062b457d9370a7f730fc875f92ad28a80/shared/config/certification-settings.test.ts | shared/config/certification-settings.test.ts | import { describe, it, expect } from 'vitest';
import {
Certification,
linkedInCredentialIds,
certToTitleMap,
certToIdMap,
certSlugTypeMap,
isCertified
} from './certification-settings';
describe('linkedInCredentialIds', () => {
it('should contain a value for all certifications', () => {
const allCer... | typescript | BSD-3-Clause | 7d58ef2062b457d9370a7f730fc875f92ad28a80 | 2026-01-04T15:25:31.297347Z | false |
freeCodeCamp/freeCodeCamp | https://github.com/freeCodeCamp/freeCodeCamp/blob/7d58ef2062b457d9370a7f730fc875f92ad28a80/shared/config/modules.ts | shared/config/modules.ts | import { BlockLabel } from './blocks';
export interface Module {
dashedName: string;
comingSoon?: boolean;
blocks: string[];
moduleType?: BlockLabel;
}
| typescript | BSD-3-Clause | 7d58ef2062b457d9370a7f730fc875f92ad28a80 | 2026-01-04T15:25:31.297347Z | false |
freeCodeCamp/freeCodeCamp | https://github.com/freeCodeCamp/freeCodeCamp/blob/7d58ef2062b457d9370a7f730fc875f92ad28a80/shared/config/constants.test.ts | shared/config/constants.test.ts | import { describe, it, expect } from 'vitest';
import { blocklistedUsernames } from './constants';
describe('constants', () => {
describe('blocklistedUsernames', () => {
it('should not contain duplicate values', () => {
const uniqueValues = new Set(blocklistedUsernames);
expect(blocklistedUsernames.l... | typescript | BSD-3-Clause | 7d58ef2062b457d9370a7f730fc875f92ad28a80 | 2026-01-04T15:25:31.297347Z | false |
freeCodeCamp/freeCodeCamp | https://github.com/freeCodeCamp/freeCodeCamp/blob/7d58ef2062b457d9370a7f730fc875f92ad28a80/shared/config/chapters.ts | shared/config/chapters.ts | import type { Module } from './modules';
// TODO: Dynamically create these from intro.json or full-stack.json
export enum FsdChapters {
// original FSD
Welcome = 'freecodecamp',
Javascript = 'javascript',
FrontendLibraries = 'frontend-libraries',
BackendJavascript = 'backend-javascript',
Career = 'career',... | typescript | BSD-3-Clause | 7d58ef2062b457d9370a7f730fc875f92ad28a80 | 2026-01-04T15:25:31.297347Z | false |
freeCodeCamp/freeCodeCamp | https://github.com/freeCodeCamp/freeCodeCamp/blob/7d58ef2062b457d9370a7f730fc875f92ad28a80/shared/config/challenge-types.ts | shared/config/challenge-types.ts | const html = 0;
const js = 1;
const backend = 2;
const zipline = 3;
const frontEndProject = 3;
const backEndProject = 4;
const jsProject = 5;
const modern = 6;
const step = 7;
const quiz = 8;
const invalid = 9;
const pythonProject = 10;
const video = 11;
const codeAllyPractice = 12;
const codeAllyCert = 13;
const multi... | typescript | BSD-3-Clause | 7d58ef2062b457d9370a7f730fc875f92ad28a80 | 2026-01-04T15:25:31.297347Z | false |
freeCodeCamp/freeCodeCamp | https://github.com/freeCodeCamp/freeCodeCamp/blob/7d58ef2062b457d9370a7f730fc875f92ad28a80/shared/config/donation-settings.ts | shared/config/donation-settings.ts | // Configuration for client side
export type DonationAmount = 500 | 1000 | 2000 | 2500 | 4000;
export type DonationDuration = 'one-time' | 'month';
export interface DonationConfig {
donationAmount: DonationAmount;
donationDuration: DonationDuration;
}
export const subscriptionAmounts: DonationAmount[] = [500, 100... | typescript | BSD-3-Clause | 7d58ef2062b457d9370a7f730fc875f92ad28a80 | 2026-01-04T15:25:31.297347Z | false |
freeCodeCamp/freeCodeCamp | https://github.com/freeCodeCamp/freeCodeCamp/blob/7d58ef2062b457d9370a7f730fc875f92ad28a80/shared/config/blocks.ts | shared/config/blocks.ts | export enum BlockLabel {
lecture = 'lecture',
workshop = 'workshop',
lab = 'lab',
review = 'review',
quiz = 'quiz',
exam = 'exam',
certProject = 'cert-project',
/* The tags below refer to the Language Curricula chapter based certifications*/
warmup = 'warm-up',
learn = 'learn',
practice = 'practic... | typescript | BSD-3-Clause | 7d58ef2062b457d9370a7f730fc875f92ad28a80 | 2026-01-04T15:25:31.297347Z | false |
freeCodeCamp/freeCodeCamp | https://github.com/freeCodeCamp/freeCodeCamp/blob/7d58ef2062b457d9370a7f730fc875f92ad28a80/shared/config/constants.ts | shared/config/constants.ts | const alphabet = [
'a',
'b',
'c',
'd',
'e',
'f',
'g',
'h',
'i',
'j',
'k',
'l',
'm',
'n',
'o',
'p',
'q',
'r',
's',
't',
'u',
'v',
'w',
'x',
'y',
'z'
] as const;
export const i18nConstants = [
// reserved paths for localizations
'afrikaans',
'arabic',
'bengali'... | typescript | BSD-3-Clause | 7d58ef2062b457d9370a7f730fc875f92ad28a80 | 2026-01-04T15:25:31.297347Z | false |
freeCodeCamp/freeCodeCamp | https://github.com/freeCodeCamp/freeCodeCamp/blob/7d58ef2062b457d9370a7f730fc875f92ad28a80/shared/config/i18n.ts | shared/config/i18n.ts | export enum Languages {
English = 'english',
Espanol = 'espanol',
Chinese = 'chinese',
ChineseTraditional = 'chinese-traditional',
Italian = 'italian',
Portuguese = 'portuguese',
Ukrainian = 'ukrainian',
Japanese = 'japanese',
German = 'german',
Swahili = 'swahili',
Korean = 'korean'
}
/*
* List... | typescript | BSD-3-Clause | 7d58ef2062b457d9370a7f730fc875f92ad28a80 | 2026-01-04T15:25:31.297347Z | false |
freeCodeCamp/freeCodeCamp | https://github.com/freeCodeCamp/freeCodeCamp/blob/7d58ef2062b457d9370a7f730fc875f92ad28a80/shared/config/catalog.ts | shared/config/catalog.ts | import { SuperBlocks } from './curriculum';
enum Levels {
Beginner = 'beginner',
Intermediate = 'intermediate',
Advanced = 'advanced'
}
interface Catalog {
superBlock: SuperBlocks;
level: Levels;
hours: number;
}
export const catalog: Catalog[] = [
{
superBlock: SuperBlocks.BasicHtml,
level: Le... | typescript | BSD-3-Clause | 7d58ef2062b457d9370a7f730fc875f92ad28a80 | 2026-01-04T15:25:31.297347Z | false |
freeCodeCamp/freeCodeCamp | https://github.com/freeCodeCamp/freeCodeCamp/blob/7d58ef2062b457d9370a7f730fc875f92ad28a80/shared/config/curriculum.ts | shared/config/curriculum.ts | // TODO: eventually this should all flow from the curriculum service, since it
// defines the top-level structure of the curriculum.
import { Languages } from './i18n.js';
// all superblocks
export enum SuperBlocks {
RespWebDesignNew = '2022/responsive-web-design',
RespWebDesign = 'responsive-web-design',
JsAlgo... | typescript | BSD-3-Clause | 7d58ef2062b457d9370a7f730fc875f92ad28a80 | 2026-01-04T15:25:31.297347Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/playwright.config.ts | playwright.config.ts | import { defineConfig } from "@playwright/test"
const isCI = !!process?.env?.CI
const isWindow = process?.platform?.startsWith("win")
export default defineConfig({
workers: 1,
retries: 1,
forbidOnly: isCI,
testDir: "src/test/e2e",
testMatch: /.*\.test\.ts/,
timeout: isCI || isWindow ? 40000 : 20000,
expect: {
... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/scripts/testing-platform-orchestrator.ts | scripts/testing-platform-orchestrator.ts | #!/usr/bin/env npx tsx
/**
* Test Orchestrator
*
* Automates server lifecycle for running spec files against the standalone server.
*
* Prerequisites:
* Build standalone first: `npm run compile-standalone`
*
* Usage:
* - Single file: `npm run test:tp-orchestrator path/to/spec.json`
* - All specs dir: ... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/scripts/test-hostbridge-server.ts | scripts/test-hostbridge-server.ts | #!/usr/bin/env npx tsx
import * as grpc from "@grpc/grpc-js"
import { ReflectionService } from "@grpc/reflection"
import * as health from "grpc-health-check"
import * as os from "os"
import { type DiffServiceServer, DiffServiceService } from "../src/generated/grpc-js/host/diff"
import { type EnvServiceServer, EnvServic... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/scripts/test-standalone-core-api-server.ts | scripts/test-standalone-core-api-server.ts | #!/usr/bin/env npx tsx
/**
* Simple Cline gRPC Server
*
* This script provides a minimal way to run the Cline core gRPC service
* without requiring the full installation, while automatically mocking all external services. Simply run:
*
* # One-time setup (generates protobuf files)
* npm run compile-standalon... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/scripts/interactive-playwright.ts | scripts/interactive-playwright.ts | #!/usr/bin/env npx tsx
/**
* Interactive Playwright launcher for the Cline VS Code extension.
*
* Overview:
* - Starts the mock Cline API server (from the e2e test fixtures).
* - Downloads a stable build of VS Code (via @vscode/test-electron).
* - Creates a temporary VS Code user profile directory.
* - Inst... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/testing-platform/index.ts | testing-platform/index.ts | #!/usr/bin/env ts-node
import fs from "fs"
import path from "path"
import "tsconfig-paths/register"
import { GrpcAdapter } from "@adapters/grpcAdapter"
import { NON_DETERMINISTIC_FIELDS } from "@harness/config"
import { SpecFile } from "@harness/types"
import { compareResponse, loadJson, retry } from "@harness/utils"... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/testing-platform/harness/config.ts | testing-platform/harness/config.ts | // Note: This list is temporary. Some items may remain in the long run,
// but our goal is to reduce it over time by continuously improving
// how we prepare the testing-platform environment.
export const NON_DETERMINISTIC_FIELDS = [
"stateJson.version",
"stateJson.distinctId",
"stateJson.shouldShowAnnouncement",
"... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/testing-platform/harness/utils.ts | testing-platform/harness/utils.ts | import fs from "fs"
import { diff } from "jest-diff"
import _ from "lodash"
import path from "path"
export function loadJson(filePath: string): any {
return JSON.parse(fs.readFileSync(path.resolve(filePath), "utf-8"))
}
export function pretty(obj: any): string {
return JSON.stringify(obj, null, 2)
}
/**
* Recursi... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/testing-platform/harness/types.ts | testing-platform/harness/types.ts | import { ServiceClients } from "@adapters/grpcAdapter"
export interface Meta {
synthetic: boolean
/**
* Optional subset of the expected response to validate.
* Only the fields specified here will be compared against the actual response.
* Useful for partial validation of nested objects or arrays.
*/
expecte... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/testing-platform/adapters/grpcAdapter.ts | testing-platform/adapters/grpcAdapter.ts | import { AccountServiceClient } from "@cline-grpc/account"
import { BrowserServiceClient } from "@cline-grpc/browser"
import { CheckpointsServiceClient } from "@cline-grpc/checkpoints"
import { CommandsServiceClient } from "@cline-grpc/commands"
import { FileServiceClient } from "@cline-grpc/file"
import { McpServiceCl... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/evals/cli/src/index.ts | evals/cli/src/index.ts | #!/usr/bin/env node
import chalk from "chalk"
import { Command } from "commander"
import { reportHandler } from "./commands/report"
import { runHandler } from "./commands/run"
import { runDiffEvalHandler } from "./commands/runDiffEval"
import { setupHandler } from "./commands/setup"
// Create the CLI program
const pro... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/evals/cli/src/commands/run.ts | evals/cli/src/commands/run.ts | import chalk from "chalk"
import ora from "ora"
import { v4 as uuidv4 } from "uuid"
import { getAdapter } from "../adapters"
import { ResultsDatabase } from "../db"
import { storeTaskResult } from "../utils/results"
interface RunOptions {
benchmark?: string
count?: number
}
/**
* Handler for the run command
* @pa... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/evals/cli/src/commands/report.ts | evals/cli/src/commands/report.ts | import chalk from "chalk"
import * as fs from "fs"
import ora from "ora"
import * as path from "path"
import { ResultsDatabase } from "../db"
import { generateMarkdownReport } from "../utils/markdown"
interface ReportOptions {
format?: "json" | "markdown"
output?: string
}
/**
* Handler for the report command
* @... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/evals/cli/src/commands/setup.ts | evals/cli/src/commands/setup.ts | import * as path from "path"
import * as fs from "fs"
import execa from "execa"
import chalk from "chalk"
import ora from "ora"
import { getAllAdapters } from "../adapters/index"
import { BenchmarkAdapter } from "../adapters/types"
interface SetupOptions {
benchmarks: string
}
/**
* Handler for the setup command
*... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/evals/cli/src/commands/runDiffEval.ts | evals/cli/src/commands/runDiffEval.ts | import execa from "execa"
import chalk from "chalk"
import path from "path"
interface RunDiffEvalOptions {
modelIds: string
systemPromptName: string
validAttemptsPerCase: number
maxAttemptsPerCase?: number
parsingFunction: string
diffEditFunction: string
thinkingBudget: number
provider: string
parallel: boole... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/evals/cli/src/db/schema.ts | evals/cli/src/db/schema.ts | /**
* SQL schema for the evaluation database
*/
export const SCHEMA = `
CREATE TABLE IF NOT EXISTS runs (
id TEXT PRIMARY KEY,
timestamp INTEGER NOT NULL,
benchmark TEXT NOT NULL,
completed INTEGER NOT NULL DEFAULT 0
);
CREATE TABLE IF NOT EXISTS tasks (
id TEXT PRIMARY KEY,
run_id TEXT NOT NULL,
task_... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/evals/cli/src/db/index.ts | evals/cli/src/db/index.ts | import Database from "better-sqlite3"
import * as fs from "fs"
import * as path from "path"
import { SCHEMA } from "./schema"
const EVALS_DIR = path.resolve(__dirname, "../../../")
/**
* Database class for storing evaluation results
*/
export class ResultsDatabase {
db: Database.Database
constructor() {
// Ens... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/evals/cli/src/utils/markdown.ts | evals/cli/src/utils/markdown.ts | import * as fs from "fs"
/**
* Generate a markdown report from evaluation results
* @param summary Overall summary
* @param benchmarkReports Benchmark-specific reports
* @param outputPath Output file path
*/
export function generateMarkdownReport(summary: any, benchmarkReports: Record<string, any>, outputPath: st... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/evals/cli/src/utils/results.ts | evals/cli/src/utils/results.ts | import { v4 as uuidv4 } from "uuid"
import { ResultsDatabase } from "../db"
import { Task } from "../adapters/types"
/**
* Store task result in the database
* @param runId The run ID
* @param task The task that was executed
* @param result The result from the test server
* @param verification The verification res... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/evals/cli/src/adapters/types.ts | evals/cli/src/adapters/types.ts | /**
* Represents a task to be executed
*/
export interface Task {
id: string
name: string
description: string
workspacePath: string
setupCommands: string[]
verificationCommands: string[]
metadata: Record<string, any>
}
/**
* Result of verifying a task execution
*/
export interface VerificationResult {
succ... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/evals/cli/src/adapters/index.ts | evals/cli/src/adapters/index.ts | import { ExercismAdapter } from "./exercism"
import { BenchmarkAdapter } from "./types"
// Registry of all available adapters
const adapters: Record<string, BenchmarkAdapter> = {
exercism: new ExercismAdapter(),
}
/**
* Get a specific adapter by name
* @param name The name of the adapter to get
* @returns The req... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/evals/cli/src/adapters/exercism.ts | evals/cli/src/adapters/exercism.ts | import chalk from "chalk"
import execa from "execa"
import * as fs from "fs"
import * as path from "path"
import { BenchmarkAdapter, Task, VerificationResult } from "./types"
const EVALS_DIR = path.resolve(__dirname, "../../../")
/**
* Adapter for the modified Exercism benchmark
*/
export class ExercismAdapter impl... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/evals/diff-edits/ClineWrapper.ts | evals/diff-edits/ClineWrapper.ts | import { OpenRouterHandler } from "../../src/api/providers/openrouter"
import { OpenAiNativeHandler } from "../../src/api/providers/openai-native"
import { Anthropic } from "@anthropic-ai/sdk"
import {
parseAssistantMessageV2,
AssistantMessageContent,
} from "./parsing/parse-assistant-message-06-06-25" // "../../src... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/evals/diff-edits/TestRunner.ts | evals/diff-edits/TestRunner.ts | import { runSingleEvaluation, TestInput, TestResult } from "./ClineWrapper"
import { parseAssistantMessageV2, AssistantMessageContent } from "./parsing/parse-assistant-message-06-06-25"
import { constructNewFileContent as constructNewFileContent_06_06_25 } from "./diff-apply/diff-06-06-25"
import { constructNewFileCont... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | true |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/evals/diff-edits/helpers.ts | evals/diff-edits/helpers.ts | import { Anthropic } from "@anthropic-ai/sdk"
const formatImagesIntoBlocks = (images?: string[]): Anthropic.ImageBlockParam[] => {
return images
? images.map((dataUrl) => {
// data:image/png;base64,base64string
const [rest, base64] = dataUrl.split(",")
const mimeType = rest.split(":")[1].split(";")[0]
... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/evals/diff-edits/types.ts | evals/diff-edits/types.ts | import { Anthropic } from "@anthropic-ai/sdk"
import { ToolParamName } from "../../src/core/assistant-message"
import { ClineDefaultTool } from "../../src/shared/tools"
export interface InputMessage {
role: "user" | "assistant"
text: string
images?: string[]
}
export interface ProcessedTestCase {
test_id: string
... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/evals/diff-edits/openRouterModelsHelper.ts | evals/diff-edits/openRouterModelsHelper.ts | import axios from "axios";
import path from "path";
import fs from "fs/promises";
// Minimal type for what we need from OpenRouter model info in evals
export interface EvalOpenRouterModelInfo {
id: string;
contextWindow: number;
inputPrice?: number; // Price per million tokens
outputPrice?: number; // ... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/evals/diff-edits/diff-apply/diff-06-06-25.ts | evals/diff-edits/diff-apply/diff-06-06-25.ts | const SEARCH_BLOCK_START = "------- SEARCH"
const SEARCH_BLOCK_END = "======="
const REPLACE_BLOCK_END = "+++++++ REPLACE"
const SEARCH_BLOCK_CHAR = "-"
const REPLACE_BLOCK_CHAR = "+"
/**
* Attempts a line-trimmed fallback match for the given search content in the original content.
* It tries to match `searchConten... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/evals/diff-edits/diff-apply/diff-06-23-25.ts | evals/diff-edits/diff-apply/diff-06-23-25.ts | const SEARCH_BLOCK_START = "------- SEARCH"
const SEARCH_BLOCK_END = "======="
const REPLACE_BLOCK_END = "+++++++ REPLACE"
const SEARCH_BLOCK_CHAR = "-"
const REPLACE_BLOCK_CHAR = "+"
const LEGACY_SEARCH_BLOCK_CHAR = "<"
const LEGACY_REPLACE_BLOCK_CHAR = ">"
// Replace the exact string constants with flexible regex p... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/evals/diff-edits/diff-apply/diff-06-25-25.ts | evals/diff-edits/diff-apply/diff-06-25-25.ts | const SEARCH_BLOCK_START = "------- SEARCH"
const SEARCH_BLOCK_END = "======="
const REPLACE_BLOCK_END = "+++++++ REPLACE"
const SEARCH_BLOCK_CHAR = "-"
const REPLACE_BLOCK_CHAR = "+"
const LEGACY_SEARCH_BLOCK_CHAR = "<"
const LEGACY_REPLACE_BLOCK_CHAR = ">"
// Replace the exact string constants with flexible regex p... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/evals/diff-edits/diff-apply/diff-06-26-25.ts | evals/diff-edits/diff-apply/diff-06-26-25.ts | const SEARCH_BLOCK_START = "------- SEARCH"
const SEARCH_BLOCK_END = "======="
const REPLACE_BLOCK_END = "+++++++ REPLACE"
const SEARCH_BLOCK_CHAR = "-"
const REPLACE_BLOCK_CHAR = "+"
const LEGACY_SEARCH_BLOCK_CHAR = "<"
const LEGACY_REPLACE_BLOCK_CHAR = ">"
// Replace the exact string constants with flexible regex p... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | true |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/evals/diff-edits/parsing/parse-assistant-message-06-06-25.ts | evals/diff-edits/parsing/parse-assistant-message-06-06-25.ts | export type AssistantMessageContent = TextContent | ToolUse
export interface TextContent {
type: "text"
content: string
partial: boolean
}
export const toolUseNames = [
"execute_command",
"read_file",
"write_to_file",
"replace_in_file",
"search_files",
"list_files",
"list_code_definition_names",
"browser_a... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/evals/diff-edits/prompts/claude4SystemPrompt-06-06-25.ts | evals/diff-edits/prompts/claude4SystemPrompt-06-06-25.ts | /**
* Use all standard prompt values to construct prompt
*/
export const claude4SystemPrompt = (
cwdFormatted: string,
supportsBrowserUse: boolean,
browserWidth: number,
browserHeight: number,
os: string,
shell: string,
homeFormatted: string,
mcpHubString: string,
userCustomInstructions: string,
) => {
retu... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | true |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/evals/diff-edits/prompts/basicSystemPrompt-06-06-25.ts | evals/diff-edits/prompts/basicSystemPrompt-06-06-25.ts | /**
* Use all standard prompt values to construct prompt
*/
export const basicSystemPrompt = (
cwdFormatted: string,
supportsBrowserUse: boolean,
browserWidth: number,
browserHeight: number,
os: string,
shell: string,
homeFormatted: string,
mcpHubString: string,
userCustomInstructions: string,
) => {
return... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | true |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/evals/diff-edits/database/test.ts | evals/diff-edits/database/test.ts | // Simple test to verify database functionality
import { getDatabase } from './client';
import { upsertSystemPrompt, createBenchmarkRun, getDatabaseSummary } from './index';
async function testDatabase() {
console.log('Testing database functionality...');
try {
// Test database connection
const db = get... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/evals/diff-edits/database/client.ts | evals/diff-edits/database/client.ts | import Database from 'better-sqlite3';
import * as fs from 'fs';
import * as path from 'path';
import * as crypto from 'crypto';
export class DatabaseClient {
private static instance: DatabaseClient;
private db: Database.Database;
private dbPath: string;
private constructor() {
// Get database path from e... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/evals/diff-edits/database/operations.ts | evals/diff-edits/database/operations.ts | import { DatabaseClient } from './client';
import {
SystemPrompt,
ProcessingFunctions,
FileRecord,
BenchmarkRun,
Case,
Result,
CreateSystemPromptInput,
CreateProcessingFunctionsInput,
CreateFileInput,
CreateBenchmarkRunInput,
CreateCaseInput,
CreateResultInput
} from './types';
const db = Datab... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/evals/diff-edits/database/queries.ts | evals/diff-edits/database/queries.ts | import { DatabaseClient } from './client';
import {
ModelSuccessRate,
ModelLatency,
CostAnalysis,
ErrorDistribution,
FailedCase,
PerformanceTrend,
ModelComparison
} from './types';
const db = DatabaseClient.getInstance();
// Performance analysis queries
export async function getSuccessRatesByModel(): Pr... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/evals/diff-edits/database/types.ts | evals/diff-edits/database/types.ts | // Database type definitions for diff-edits evaluation system
export interface SystemPrompt {
hash: string;
name: string;
content: string;
created_at: string;
}
export interface ProcessingFunctions {
hash: string;
name: string;
parsing_function: string;
diff_edit_function: string;
created_at: string... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/evals/diff-edits/database/index.ts | evals/diff-edits/database/index.ts | // Main database module exports
export { DatabaseClient, getDatabase } from './client';
export * from './types';
export * from './operations';
export * from './queries';
// Re-export commonly used functions for convenience
export {
upsertSystemPrompt,
upsertProcessingFunctions,
upsertFile,
createBenchmarkRun,
... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/config.ts | src/config.ts | export enum Environment {
production = "production",
staging = "staging",
local = "local",
}
export interface EnvironmentConfig {
environment: Environment
appBaseUrl: string
apiBaseUrl: string
mcpBaseUrl: string
}
class ClineEndpoint {
public static instance = new ClineEndpoint()
public static get config() {... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/common.ts | src/common.ts | import * as vscode from "vscode"
import {
cleanupMcpMarketplaceCatalogFromGlobalState,
migrateCustomInstructionsToGlobalRules,
migrateHooksEnabledToBoolean,
migrateTaskHistoryToFile,
migrateWelcomeViewCompleted,
migrateWorkspaceToGlobalStorage,
} from "./core/storage/state-migrations"
import { WebviewProvider } f... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/extension.ts | src/extension.ts | // The module 'vscode' contains the VS Code extensibility API
// Import the module and reference it with the alias vscode in your code below
import assert from "node:assert"
import { DIFF_VIEW_URI_SCHEME } from "@hosts/vscode/VscodeDiffViewProvider"
import * as vscode from "vscode"
import { sendAccountButtonClickedEve... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/registry.ts | src/registry.ts | import { name, publisher, version } from "../package.json"
const prefix = name === "claude-dev" ? "cline" : name
/**
* List of commands with the name of the extension they are registered under.
* These should match the command IDs defined in package.json.
* For Nightly build, the publish script has updated all the... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/EnvUtils.ts | src/services/EnvUtils.ts | import { isMultiRootWorkspace } from "@/core/workspace/utils/workspace-detection"
import { HostProvider } from "@/hosts/host-provider"
import { ExtensionRegistryInfo } from "@/registry"
import { EmptyRequest } from "@/shared/proto/cline/common"
// Canonical header names for extra client/host context
export const Cline... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/uri/SharedUriHandler.test.ts | src/services/uri/SharedUriHandler.test.ts | import { expect } from "chai"
import { afterEach, beforeEach, describe, it } from "mocha"
import * as sinon from "sinon"
import { WebviewProvider } from "@/core/webview"
import { ErrorService } from "../error"
import { Logger } from "../logging/Logger"
import { SharedUriHandler } from "./SharedUriHandler"
describe("Sh... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/uri/SharedUriHandler.ts | src/services/uri/SharedUriHandler.ts | import { WebviewProvider } from "@/core/webview"
import { Logger } from "../logging/Logger"
/**
* Shared URI handler that processes both VSCode URI events and HTTP server callbacks
*/
export class SharedUriHandler {
/**
* Processes a URI and routes it to the appropriate handler
* @param url The URI to process (... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/auth/AuthService.ts | src/services/auth/AuthService.ts | import { AuthState, UserInfo } from "@shared/proto/cline/account"
import { type EmptyRequest, String } from "@shared/proto/cline/common"
import { ClineEnv } from "@/config"
import { Controller } from "@/core/controller"
import { getRequestRegistry, type StreamingResponseHandler } from "@/core/controller/grpc-handler"
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/AuthServiceMock.ts | src/services/auth/AuthServiceMock.ts | import { String } from "@shared/proto/cline/common"
import { ClineEnv } from "@/config"
import { Controller } from "@/core/controller"
import { setWelcomeViewCompleted } from "@/core/controller/state/setWelcomeViewCompleted"
import { WebviewProvider } from "@/core/webview"
import { CLINE_API_ENDPOINT } from "@/shared/c... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/auth/types.ts | src/services/auth/types.ts | /**
* Enum defining different reasons why a user might be logged out
* Used for telemetry tracking to understand logout patterns
*/
export enum LogoutReason {
/** User explicitly clicked logout button in UI */
USER_INITIATED = "user_initiated",
/** Auth tokens were cleared in another VSCode window (cross-window s... | typescript | Apache-2.0 | 0d04205dc4194c54e4bf424d2dc80f2fe1697e98 | 2026-01-04T15:28:48.884804Z | false |
cline/cline | https://github.com/cline/cline/blob/0d04205dc4194c54e4bf424d2dc80f2fe1697e98/src/services/auth/providers/IAuthProvider.ts | src/services/auth/providers/IAuthProvider.ts | import { EnvironmentConfig } from "@/config"
import { Controller } from "@/core/controller"
import { ClineAuthInfo } from "../AuthService"
export interface IAuthProvider {
readonly name: string
config: EnvironmentConfig
shouldRefreshIdToken(token: string, expiresAt?: number): Promise<boolean>
retrieveClineAuthInfo... | 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.