@sourcegraph/cody-web 0.35.0 → 0.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3114,41 +3114,6 @@ function catchError(handler) {
3114
3114
  };
3115
3115
  });
3116
3116
  }
3117
- function withLatestFrom(other) {
3118
- return (source) => new Observable((observer) => {
3119
- let latest;
3120
- let hasLatest = false;
3121
- const otherSubscription = other.subscribe({
3122
- next(value) {
3123
- latest = value;
3124
- hasLatest = true;
3125
- },
3126
- error(err) {
3127
- observer.error(err);
3128
- }
3129
- });
3130
- const scheduler = new AsyncSerialScheduler_1(observer);
3131
- const sourceSubscription = source.subscribe({
3132
- next(value) {
3133
- scheduler.schedule(async (next) => {
3134
- if (hasLatest) {
3135
- next([value, latest]);
3136
- }
3137
- });
3138
- },
3139
- error(err) {
3140
- scheduler.error(err);
3141
- },
3142
- complete() {
3143
- scheduler.complete();
3144
- }
3145
- });
3146
- return () => {
3147
- unsubscribe(sourceSubscription);
3148
- unsubscribe(otherSubscription);
3149
- };
3150
- });
3151
- }
3152
3117
  function defer(observableFactory) {
3153
3118
  return new Observable((observer) => {
3154
3119
  let subscription;
@@ -3249,11 +3214,6 @@ const cenv = defineEnvBuilder({
3249
3214
  * Disable fetching of Ollama models
3250
3215
  */
3251
3216
  CODY_OVERRIDE_DISABLE_OLLAMA: (envValue, _2) => bool(envValue) ?? assigned(getEnv("VITEST")) ?? assigned(getEnv("PW")) ?? false,
3252
- /**
3253
- * Forces a specific URL to be the DotCom API endpoint
3254
- */
3255
- CODY_OVERRIDE_DOTCOM_URL: (envValue, _2) => str(envValue) ?? /* LEGACY */
3256
- str(getEnv("TESTING_DOTCOM_URL")),
3257
3217
  /**
3258
3218
  * Disables the default console logging
3259
3219
  */
@@ -3360,6 +3320,9 @@ const consoleLogger = {
3360
3320
  logDebug(filterLabel, text, ...args) {
3361
3321
  console.log(`${filterLabel}: ${text}`, ...args);
3362
3322
  },
3323
+ logInfo(filterLabel, text, ...args) {
3324
+ console.info(`${filterLabel}: ${text}`, ...args);
3325
+ },
3363
3326
  logError(filterLabel, text, ...args) {
3364
3327
  console.error(`${filterLabel}: ${text}`, ...args);
3365
3328
  }
@@ -3367,6 +3330,8 @@ const consoleLogger = {
3367
3330
  const noopLogger = {
3368
3331
  logDebug() {
3369
3332
  },
3333
+ logInfo() {
3334
+ },
3370
3335
  logError() {
3371
3336
  }
3372
3337
  };
@@ -3508,46 +3473,6 @@ async function firstResultFromOperation(observable, signal) {
3508
3473
  }
3509
3474
  return result;
3510
3475
  }
3511
- const DOTCOM_URL = new URL(cenv.CODY_OVERRIDE_DOTCOM_URL || "https://sourcegraph.com/");
3512
- function isDotCom(arg) {
3513
- const url = typeof arg === "string" ? arg : arg == null ? void 0 : arg.endpoint;
3514
- if (url === void 0) {
3515
- return false;
3516
- }
3517
- try {
3518
- return new URL(url).origin === DOTCOM_URL.origin;
3519
- } catch {
3520
- return false;
3521
- }
3522
- }
3523
- const S2_URL = new URL("https://sourcegraph.sourcegraph.com/");
3524
- function isS2(arg) {
3525
- const url = typeof arg === "string" ? arg : arg == null ? void 0 : arg.endpoint;
3526
- if (url === void 0) {
3527
- return false;
3528
- }
3529
- try {
3530
- return new URL(url).origin === S2_URL.origin;
3531
- } catch {
3532
- return false;
3533
- }
3534
- }
3535
- new URL("https://sourcegraph.com/cody/manage");
3536
- const Workspaces_Host_Prod = ".sourcegraph.app";
3537
- const Workspaces_Host_Dev = ".sourcegraphdev.app";
3538
- const Workspaces_Host_Local = ".sourcegraphapp.test:3443";
3539
- function isWorkspaceInstance(arg) {
3540
- const url = typeof arg === "string" ? arg : arg == null ? void 0 : arg.endpoint;
3541
- if (url === void 0) {
3542
- return false;
3543
- }
3544
- try {
3545
- const parsedUrl = new URL(url);
3546
- return parsedUrl.host.endsWith(Workspaces_Host_Prod) || parsedUrl.host.endsWith(Workspaces_Host_Dev) || parsedUrl.host.endsWith(Workspaces_Host_Local);
3547
- } catch {
3548
- return false;
3549
- }
3550
- }
3551
3476
  const AUTH_STATUS_FIXTURE_AUTHED = {
3552
3477
  endpoint: "https://example.com",
3553
3478
  authenticated: true,
@@ -3558,9 +3483,6 @@ const AUTH_STATUS_FIXTURE_AUTHED_DOTCOM = {
3558
3483
  ...AUTH_STATUS_FIXTURE_AUTHED,
3559
3484
  endpoint: "https://sourcegraph.com"
3560
3485
  };
3561
- function isEnterpriseUser(authStatus2) {
3562
- return !isDotCom(authStatus2);
3563
- }
3564
3486
  const _authStatus = fromLateSetSource();
3565
3487
  let hasSetAuthStatusObservable = false;
3566
3488
  function setAuthStatusObservable(input) {
@@ -5310,7 +5232,7 @@ function formatRetryAfterDate(retryAfterDate) {
5310
5232
  )} at ${format(retryAfterDate, "p")})`;
5311
5233
  }
5312
5234
  const _RateLimitError = class _RateLimitError extends Error {
5313
- constructor(feature, message, upgradeIsAvailable, limit, retryAfter) {
5235
+ constructor(feature, message, limit, retryAfter) {
5314
5236
  super(message);
5315
5237
  __publicField(this, "name", _RateLimitError.errorName);
5316
5238
  __publicField(this, "userMessage");
@@ -5318,10 +5240,9 @@ const _RateLimitError = class _RateLimitError extends Error {
5318
5240
  __publicField(this, "retryMessage");
5319
5241
  this.feature = feature;
5320
5242
  this.message = message;
5321
- this.upgradeIsAvailable = upgradeIsAvailable;
5322
5243
  this.limit = limit;
5323
5244
  this.retryAfter = retryAfter;
5324
- this.userMessage = `You've used all of your ${feature} for ${upgradeIsAvailable ? "the month" : "today"}.`;
5245
+ this.userMessage = `You've used all of your ${feature} for today.`;
5325
5246
  this.retryAfterDate = retryAfter ? /^\d+$/.test(retryAfter) ? new Date(Date.now() + Number.parseInt(retryAfter, 10) * 1e3) : new Date(retryAfter) : void 0;
5326
5247
  this.retryMessage = this.retryAfterDate ? formatRetryAfterDate(this.retryAfterDate) : void 0;
5327
5248
  }
@@ -5386,6 +5307,7 @@ class AuthError extends Error {
5386
5307
  __publicField(this, "title");
5387
5308
  __publicField(this, "content");
5388
5309
  __publicField(this, "showTryAgain", false);
5310
+ __publicField(this, "showSignOut", true);
5389
5311
  this.content = content;
5390
5312
  this.title = title;
5391
5313
  }
@@ -5399,14 +5321,7 @@ class AvailabilityError extends AuthError {
5399
5321
  class InvalidAccessTokenError extends AuthError {
5400
5322
  constructor() {
5401
5323
  super("Invalid Access Token", "The access token is invalid or has expired");
5402
- }
5403
- }
5404
- class EnterpriseUserDotComError extends AuthError {
5405
- constructor(enterprise) {
5406
- super(
5407
- "Enterprise User Authentication Error",
5408
- `Based on your email address we think you may be an employee of ${enterprise}. To get access to all your features please sign in through your organization's enterprise instance instead. If you need assistance please contact your Sourcegraph admin.`
5409
- );
5324
+ this.showSignOut = false;
5410
5325
  }
5411
5326
  }
5412
5327
  class AuthConfigError extends AuthError {
@@ -5439,9 +5354,6 @@ function isAvailabilityError(error2) {
5439
5354
  function isInvalidAccessTokenError(error2) {
5440
5355
  return error2 instanceof InvalidAccessTokenError;
5441
5356
  }
5442
- function isEnterpriseUserDotComError(error2) {
5443
- return error2 instanceof EnterpriseUserDotComError;
5444
- }
5445
5357
  var define_process_default$a = { env: {} };
5446
5358
  const externalAuthRefresh = new MulticastSubject();
5447
5359
  function normalizeServerEndpointURL(url) {
@@ -5452,7 +5364,7 @@ async function executeCommand(cmd) {
5452
5364
  throw new Error("Command execution is only supported in Node.js environments");
5453
5365
  }
5454
5366
  const { exec: exec2 } = await Promise.resolve().then(() => child_process);
5455
- const { promisify: promisify2 } = await import("./util-C44wiTt8.mjs").then((n) => n.u);
5367
+ const { promisify: promisify2 } = await import("./util-D8ltdME7.mjs").then((n) => n.u);
5456
5368
  const execAsync = promisify2(exec2);
5457
5369
  const command = cmd.commandLine.join(" ");
5458
5370
  const { stdout } = await execAsync(command, {
@@ -5552,9 +5464,12 @@ async function resolveConfiguration({
5552
5464
  if (isReinstall) {
5553
5465
  await onReinstall();
5554
5466
  }
5555
- const serverEndpoint = clientConfiguration.overrideServerEndpoint || clientState.lastUsedEndpoint || DOTCOM_URL.toString();
5467
+ const serverEndpoint = clientConfiguration.overrideServerEndpoint || clientState.lastUsedEndpoint || void 0;
5556
5468
  try {
5557
- const auth = await resolveAuth(serverEndpoint, clientConfiguration, clientSecrets);
5469
+ const auth = serverEndpoint !== void 0 ? await resolveAuth(serverEndpoint, clientConfiguration, clientSecrets) : {
5470
+ credentials: void 0,
5471
+ serverEndpoint: void 0
5472
+ };
5558
5473
  return { configuration: clientConfiguration, clientState, auth, isReinstall };
5559
5474
  } catch (error2) {
5560
5475
  logError("resolveConfiguration", `Error resolving configuration: ${error2}`);
@@ -10209,7 +10124,7 @@ function extractContextFromTraceparent(traceparent) {
10209
10124
  return propagation.extract(ROOT_CONTEXT, carrier, getter);
10210
10125
  }
10211
10126
  async function getAuthHeaders(auth, url) {
10212
- if (auth.credentials && url.host === new URL(auth.serverEndpoint).host) {
10127
+ if (auth.serverEndpoint && auth.credentials && url.host === new URL(auth.serverEndpoint).host) {
10213
10128
  if ("token" in auth.credentials) {
10214
10129
  return { Authorization: `token ${auth.credentials.token}` };
10215
10130
  }
@@ -10398,24 +10313,6 @@ query CurrentUserRole {
10398
10313
  siteAdmin
10399
10314
  }
10400
10315
  }`;
10401
- const CURRENT_USER_CODY_PRO_ENABLED_QUERY = `
10402
- query CurrentUserCodyProEnabled {
10403
- currentUser {
10404
- codyProEnabled
10405
- }
10406
- }`;
10407
- const CURRENT_USER_CODY_SUBSCRIPTION_QUERY = `
10408
- query CurrentUserCodySubscription {
10409
- currentUser {
10410
- codySubscription {
10411
- status
10412
- plan
10413
- applyProRateLimits
10414
- currentPeriodStartAt
10415
- currentPeriodEndAt
10416
- }
10417
- }
10418
- }`;
10419
10316
  const DELETE_ACCESS_TOKEN_MUTATION = `
10420
10317
  mutation DeleteAccessToken($token: String!) {
10421
10318
  deleteAccessToken(byToken: $token) {
@@ -11406,26 +11303,6 @@ class SourcegraphGraphQLAPIClient {
11406
11303
  (response) => extractDataOrError(response, (data) => data.currentUser ? data.currentUser : null)
11407
11304
  );
11408
11305
  }
11409
- async getCurrentUserCodyProEnabled() {
11410
- return this.fetchSourcegraphAPI(
11411
- CURRENT_USER_CODY_PRO_ENABLED_QUERY,
11412
- {}
11413
- ).then(
11414
- (response) => extractDataOrError(response, (data) => data.currentUser ? { ...data.currentUser } : null)
11415
- );
11416
- }
11417
- async getCurrentUserCodySubscription(signal) {
11418
- return this.fetchSourcegraphAPI(
11419
- CURRENT_USER_CODY_SUBSCRIPTION_QUERY,
11420
- {},
11421
- signal
11422
- ).then(
11423
- (response) => extractDataOrError(response, (data) => {
11424
- var _a3;
11425
- return ((_a3 = data.currentUser) == null ? void 0 : _a3.codySubscription) ?? null;
11426
- })
11427
- );
11428
- }
11429
11306
  async getCurrentUserInfo(signal) {
11430
11307
  return this.fetchSourcegraphAPI(
11431
11308
  CURRENT_USER_INFO_QUERY,
@@ -12020,6 +11897,9 @@ class SourcegraphGraphQLAPIClient {
12020
11897
  }
12021
11898
  const config = await firstValueFrom(this.config);
12022
11899
  signal == null ? void 0 : signal.throwIfAborted();
11900
+ if (!config.auth.serverEndpoint) {
11901
+ return new Error("No server endpoint configured");
11902
+ }
12023
11903
  const headers = new Headers((_a3 = config.configuration) == null ? void 0 : _a3.customHeaders);
12024
11904
  if (config.clientState.anonymousUserID && false) {
12025
11905
  headers.set("X-Sourcegraph-Actor-Anonymous-UID", config.clientState.anonymousUserID);
@@ -12235,24 +12115,23 @@ class FeatureFlagProviderImpl {
12235
12115
  this.refreshes
12236
12116
  ).pipe(
12237
12117
  debounceTime(0),
12238
- switchMap(
12239
- ([authStatus2]) => promiseFactoryToObservable(
12240
- (signal) => define_process_default$7.env.DISABLE_FEATURE_FLAGS ? Promise.resolve({}) : graphqlClient.getEvaluatedFeatureFlags(Object.values(FeatureFlag), signal)
12241
- ).pipe(
12242
- map$1((resultOrError) => {
12243
- if (isError(resultOrError)) {
12244
- logError(
12245
- "FeatureFlagProvider",
12246
- "Failed to get all evaluated feature flags",
12247
- resultOrError
12248
- );
12249
- }
12250
- const result = isError(resultOrError) ? {} : resultOrError;
12251
- this.cache[authStatus2.endpoint] = result;
12252
- return result;
12253
- })
12254
- )
12255
- ),
12118
+ map$1(async ([authStatus2]) => {
12119
+ const endpoint = authStatus2.endpoint;
12120
+ if (!endpoint) {
12121
+ return {};
12122
+ }
12123
+ const resultOrError = define_process_default$7.env.DISABLE_FEATURE_FLAGS ? {} : await graphqlClient.getEvaluatedFeatureFlags(Object.values(FeatureFlag));
12124
+ if (isError(resultOrError)) {
12125
+ logError(
12126
+ "FeatureFlagProvider",
12127
+ "Failed to get all evaluated feature flags",
12128
+ resultOrError
12129
+ );
12130
+ }
12131
+ const result = isError(resultOrError) ? {} : resultOrError;
12132
+ this.cache[endpoint] = result;
12133
+ return result;
12134
+ }),
12256
12135
  distinctUntilChanged(),
12257
12136
  shareReplay()
12258
12137
  ));
@@ -12290,7 +12169,7 @@ class FeatureFlagProviderImpl {
12290
12169
  ([authStatus2]) => concat(
12291
12170
  promiseFactoryToObservable(async (signal) => {
12292
12171
  var _a3;
12293
- if (define_process_default$7.env.DISABLE_FEATURE_FLAGS) {
12172
+ if (define_process_default$7.env.DISABLE_FEATURE_FLAGS || !authStatus2.endpoint) {
12294
12173
  return false;
12295
12174
  }
12296
12175
  const cachedValue = (_a3 = this.cache[authStatus2.endpoint]) == null ? void 0 : _a3[flagName.toString()];
@@ -12332,53 +12211,45 @@ const noopFeatureFlagProvider = {
12332
12211
  }
12333
12212
  };
12334
12213
  const featureFlagProvider = define_process_default$7.env.DISABLE_FEATURE_FLAGS ? noopFeatureFlagProvider : new FeatureFlagProviderImpl();
12335
- const userProductSubscription = authStatus.pipe(
12336
- pick("authenticated", "endpoint", "pendingValidation"),
12337
- debounceTime(0),
12338
- switchMapReplayOperation(
12339
- (authStatus2) => {
12340
- if (authStatus2.pendingValidation) {
12341
- return Observable.of(pendingOperation);
12342
- }
12343
- if (!authStatus2.authenticated) {
12344
- return Observable.of(null);
12345
- }
12346
- if (!isDotCom(authStatus2)) {
12347
- return Observable.of(null);
12348
- }
12349
- return promiseFactoryToObservable(
12350
- (signal) => graphqlClient.getCurrentUserCodySubscription(signal)
12351
- ).pipe(
12352
- map$1((sub) => {
12353
- if (isError(sub)) {
12354
- logError(
12355
- "userProductSubscription",
12356
- `Failed to get the Cody product subscription info from ${authStatus2.endpoint}: ${sub}`
12357
- );
12358
- return null;
12359
- }
12360
- const isActiveProUser = sub !== null && "plan" in sub && sub.plan === "PRO" && sub.status !== "PENDING";
12361
- return {
12362
- userCanUpgrade: !isActiveProUser
12363
- };
12364
- })
12365
- );
12366
- }
12367
- ),
12368
- map$1((result) => isError(result) ? null : result)
12369
- // the operation catches its own errors, so errors will never get here
12370
- );
12371
- const userProductSubscriptionStorage = storeLastValue(userProductSubscription);
12372
- function currentUserProductSubscription() {
12373
- return firstResultFromOperation(userProductSubscriptionStorage.observable);
12214
+ const DOTCOM_URL = new URL("https://sourcegraph.com/");
12215
+ function isDotCom(arg) {
12216
+ const url = typeof arg === "string" ? arg : arg == null ? void 0 : arg.endpoint;
12217
+ if (url === void 0) {
12218
+ return false;
12219
+ }
12220
+ try {
12221
+ return new URL(url).origin === DOTCOM_URL.origin;
12222
+ } catch {
12223
+ return false;
12224
+ }
12374
12225
  }
12375
- async function checkIfEnterpriseUser() {
12376
- const authStatusValue = await firstValueFrom(authStatus);
12377
- return !isDotCom(authStatusValue);
12226
+ const S2_URL = new URL("https://sourcegraph.sourcegraph.com/");
12227
+ function isS2(arg) {
12228
+ const url = typeof arg === "string" ? arg : arg == null ? void 0 : arg.endpoint;
12229
+ if (url === void 0) {
12230
+ return false;
12231
+ }
12232
+ try {
12233
+ return new URL(url).origin === S2_URL.origin;
12234
+ } catch {
12235
+ return false;
12236
+ }
12378
12237
  }
12379
- function cachedUserProductSubscription() {
12380
- const value = userProductSubscriptionStorage.value.last;
12381
- return value === pendingOperation || !value ? null : value;
12238
+ new URL("https://sourcegraph.com/cody/manage");
12239
+ const Workspaces_Host_Prod = ".sourcegraph.app";
12240
+ const Workspaces_Host_Dev = ".sourcegraphdev.app";
12241
+ const Workspaces_Host_Local = ".sourcegraphapp.test:3443";
12242
+ function isWorkspaceInstance(arg) {
12243
+ const url = typeof arg === "string" ? arg : arg == null ? void 0 : arg.endpoint;
12244
+ if (url === void 0) {
12245
+ return false;
12246
+ }
12247
+ try {
12248
+ const parsedUrl = new URL(url);
12249
+ return parsedUrl.host.endsWith(Workspaces_Host_Prod) || parsedUrl.host.endsWith(Workspaces_Host_Dev) || parsedUrl.host.endsWith(Workspaces_Host_Local);
12250
+ } catch {
12251
+ return false;
12252
+ }
12382
12253
  }
12383
12254
  const CHAT_INPUT_TOKEN_BUDGET = 7e3;
12384
12255
  const FAST_CHAT_INPUT_TOKEN_BUDGET = 4096;
@@ -12386,112 +12257,6 @@ const CHAT_OUTPUT_TOKEN_BUDGET = 4e3;
12386
12257
  const CORPUS_CONTEXT_ALLOCATION = 0.6;
12387
12258
  const EXTENDED_USER_CONTEXT_TOKEN_BUDGET = 3e4;
12388
12259
  const EXTENDED_CHAT_INPUT_TOKEN_BUDGET = 15e3;
12389
- var ModelTag = /* @__PURE__ */ ((ModelTag2) => {
12390
- ModelTag2["Power"] = "power";
12391
- ModelTag2["Speed"] = "speed";
12392
- ModelTag2["Balanced"] = "balanced";
12393
- ModelTag2["Other"] = "other";
12394
- ModelTag2["Recommended"] = "recommended";
12395
- ModelTag2["Deprecated"] = "deprecated";
12396
- ModelTag2["Experimental"] = "experimental";
12397
- ModelTag2["Waitlist"] = "waitlist";
12398
- ModelTag2["OnWaitlist"] = "on-waitlist";
12399
- ModelTag2["EarlyAccess"] = "early-access";
12400
- ModelTag2["Internal"] = "internal";
12401
- ModelTag2["Pro"] = "pro";
12402
- ModelTag2["Free"] = "free";
12403
- ModelTag2["Enterprise"] = "enterprise";
12404
- ModelTag2["Gateway"] = "gateway";
12405
- ModelTag2["BYOK"] = "byok";
12406
- ModelTag2["Local"] = "local";
12407
- ModelTag2["Ollama"] = "ollama";
12408
- ModelTag2["Dev"] = "dev";
12409
- ModelTag2["StreamDisabled"] = "stream-disabled";
12410
- ModelTag2["Vision"] = "vision";
12411
- ModelTag2["Reasoning"] = "reasoning";
12412
- ModelTag2["Tools"] = "tools";
12413
- ModelTag2["Default"] = "default";
12414
- ModelTag2["Unlimited"] = "unlimited";
12415
- return ModelTag2;
12416
- })(ModelTag || {});
12417
- const ANSWER_TOKENS = 1e3;
12418
- const MAX_CURRENT_FILE_TOKENS = 1e3;
12419
- const SURROUNDING_LINES = 50;
12420
- function getProviderName(name2) {
12421
- const providerName = name2.toLowerCase();
12422
- switch (providerName) {
12423
- case "anthropic":
12424
- return "Anthropic";
12425
- case "openai":
12426
- return "OpenAI";
12427
- case "ollama":
12428
- return "Ollama";
12429
- case "google":
12430
- return "Google";
12431
- default:
12432
- return providerName;
12433
- }
12434
- }
12435
- function getModelInfo(modelID) {
12436
- const [providerID, ...rest] = modelID.split("/");
12437
- const provider = getProviderName(providerID);
12438
- const title = (rest.at(-1) || "").replace(/-/g, " ");
12439
- return { provider, title };
12440
- }
12441
- function isCodyProModel(model) {
12442
- return modelHasTag(model, ModelTag.Pro);
12443
- }
12444
- function isCustomModel(model) {
12445
- return modelHasTag(model, ModelTag.Local) || modelHasTag(model, ModelTag.Dev) || modelHasTag(model, ModelTag.BYOK);
12446
- }
12447
- function modelHasTag(model, modelTag) {
12448
- return model.tags.includes(modelTag);
12449
- }
12450
- function getEnterpriseContextWindow(chatModel, configOverwrites, configuration2) {
12451
- const { chatModelMaxTokens, smartContextWindow } = configOverwrites;
12452
- let contextWindow = {
12453
- input: chatModelMaxTokens ?? CHAT_INPUT_TOKEN_BUDGET,
12454
- output: getEnterpriseOutputLimit(chatModel)
12455
- };
12456
- if (smartContextWindow && isModelWithExtendedContextWindowSupport(chatModel)) {
12457
- contextWindow = {
12458
- input: EXTENDED_CHAT_INPUT_TOKEN_BUDGET,
12459
- output: CHAT_OUTPUT_TOKEN_BUDGET,
12460
- context: { user: EXTENDED_USER_CONTEXT_TOKEN_BUDGET }
12461
- };
12462
- }
12463
- return applyLocalTokenLimitOverwrite(configuration2, chatModel, contextWindow);
12464
- }
12465
- function applyLocalTokenLimitOverwrite({ providerLimitPrompt }, chatModel, contextWindow) {
12466
- if (providerLimitPrompt && providerLimitPrompt <= contextWindow.input) {
12467
- return { ...contextWindow, input: providerLimitPrompt };
12468
- }
12469
- if (providerLimitPrompt) {
12470
- logDebug(
12471
- "getEnterpriseContextWindow",
12472
- `Invalid token limit configured for ${chatModel}`,
12473
- providerLimitPrompt
12474
- );
12475
- }
12476
- return contextWindow;
12477
- }
12478
- const modelWithExpandedWindowSubStrings = [
12479
- "opus",
12480
- "sonnet",
12481
- // Covers claude 3 sonnet & 3.5 sonnet
12482
- "gemini-1.5",
12483
- "gpt-4o",
12484
- "gpt-4-turbo"
12485
- ];
12486
- function isModelWithExtendedContextWindowSupport(chatModel) {
12487
- return modelWithExpandedWindowSubStrings.some((keyword) => chatModel.toLowerCase().includes(keyword));
12488
- }
12489
- function getEnterpriseOutputLimit(model) {
12490
- if (model && isModelWithExtendedContextWindowSupport(model)) {
12491
- return CHAT_OUTPUT_TOKEN_BUDGET;
12492
- }
12493
- return ANSWER_TOKENS;
12494
- }
12495
12260
  var CodyIDE = /* @__PURE__ */ ((CodyIDE2) => {
12496
12261
  CodyIDE2["VSCode"] = "VSCode";
12497
12262
  CodyIDE2["JetBrains"] = "JetBrains";
@@ -19660,6 +19425,32 @@ const dedupeWith = (items, key) => {
19660
19425
  return result;
19661
19426
  }, []);
19662
19427
  };
19428
+ var ModelTag = /* @__PURE__ */ ((ModelTag2) => {
19429
+ ModelTag2["Power"] = "power";
19430
+ ModelTag2["Speed"] = "speed";
19431
+ ModelTag2["Balanced"] = "balanced";
19432
+ ModelTag2["Other"] = "other";
19433
+ ModelTag2["Recommended"] = "recommended";
19434
+ ModelTag2["Deprecated"] = "deprecated";
19435
+ ModelTag2["Experimental"] = "experimental";
19436
+ ModelTag2["EarlyAccess"] = "early-access";
19437
+ ModelTag2["Internal"] = "internal";
19438
+ ModelTag2["Pro"] = "pro";
19439
+ ModelTag2["Free"] = "free";
19440
+ ModelTag2["Enterprise"] = "enterprise";
19441
+ ModelTag2["Gateway"] = "gateway";
19442
+ ModelTag2["BYOK"] = "byok";
19443
+ ModelTag2["Local"] = "local";
19444
+ ModelTag2["Ollama"] = "ollama";
19445
+ ModelTag2["Dev"] = "dev";
19446
+ ModelTag2["StreamDisabled"] = "stream-disabled";
19447
+ ModelTag2["Vision"] = "vision";
19448
+ ModelTag2["Reasoning"] = "reasoning";
19449
+ ModelTag2["Tools"] = "tools";
19450
+ ModelTag2["Default"] = "default";
19451
+ ModelTag2["Unlimited"] = "unlimited";
19452
+ return ModelTag2;
19453
+ })(ModelTag || {});
19663
19454
  var dist = {};
19664
19455
  var validate = {};
19665
19456
  Object.defineProperty(validate, "__esModule", { value: true });
@@ -19977,8 +19768,8 @@ class GraphQLTelemetryExporter {
19977
19768
  }
19978
19769
  }
19979
19770
  }
19980
- function getTier(authStatus2, sub) {
19981
- return !authStatus2.authenticated ? 3 : !isDotCom(authStatus2) ? 2 : !sub || sub.userCanUpgrade ? 0 : 1;
19771
+ function getTier(authStatus2) {
19772
+ return !authStatus2.authenticated ? 3 : 2;
19982
19773
  }
19983
19774
  class TelemetryRecorderProvider extends dist.TelemetryRecorderProvider {
19984
19775
  constructor(config) {
@@ -20042,16 +19833,14 @@ class ConfigurationMetadataProcessor {
20042
19833
  event.parameters.metadata = [];
20043
19834
  }
20044
19835
  let authStatus2;
20045
- let sub = null;
20046
19836
  try {
20047
19837
  authStatus2 = currentAuthStatusOrNotReadyYet();
20048
- sub = cachedUserProductSubscription();
20049
19838
  } catch {
20050
19839
  }
20051
19840
  if (authStatus2) {
20052
19841
  event.parameters.metadata.push({
20053
19842
  key: "tier",
20054
- value: getTier(authStatus2, sub)
19843
+ value: getTier(authStatus2)
20055
19844
  });
20056
19845
  }
20057
19846
  }
@@ -34015,7 +33804,7 @@ function extractRangeFromFileMention(query) {
34015
33804
  }
34016
33805
  };
34017
33806
  }
34018
- const PUNCTUATION = `,\\+\\*\\$\\|#{}\\(\\)\\^\\[\\]!'"<>;`;
33807
+ const PUNCTUATION = `,\\*\\$\\|#{}\\(\\)\\^\\[\\]!'"<>;`;
34019
33808
  const TRIGGERS = "@";
34020
33809
  const MAX_LENGTH = 250;
34021
33810
  const RANGE_REGEXP = "(?::\\d+(?:-\\d*)?)?";
@@ -34983,7 +34772,6 @@ function createExtensionAPI(messageAPI, staticDefaultContext) {
34983
34772
  authStatus: proxyExtensionAPI(messageAPI, "authStatus"),
34984
34773
  transcript: proxyExtensionAPI(messageAPI, "transcript"),
34985
34774
  userHistory: proxyExtensionAPI(messageAPI, "userHistory"),
34986
- userProductSubscription: proxyExtensionAPI(messageAPI, "userProductSubscription"),
34987
34775
  repos: proxyExtensionAPI(messageAPI, "repos"),
34988
34776
  mcpSettings: proxyExtensionAPI(messageAPI, "mcpSettings")
34989
34777
  };
@@ -35514,10 +35302,6 @@ const sourcegraphTokenRegex = /(sgp_(?:[a-fA-F0-9]{16}|local)|sgp_)?[a-fA-F0-9]{
35514
35302
  function isSourcegraphToken(text) {
35515
35303
  return sourcegraphTokenRegex.test(text);
35516
35304
  }
35517
- const PLG_ES_ACCESS_DISABLE_DATE = /* @__PURE__ */ new Date("2025-07-24T18:00:00.000Z");
35518
- function isPlgEsAccessDisabled() {
35519
- return /* @__PURE__ */ new Date() > PLG_ES_ACCESS_DISABLE_DATE;
35520
- }
35521
35305
  const DeepCodyAgentID = "deep-cody";
35522
35306
  const ToolCodyModelName = "tool-cody";
35523
35307
  function stringify$1(values, options) {
@@ -36813,7 +36597,7 @@ async function getFileItem(repoName, filePath, rev = "HEAD") {
36813
36597
  var _a3, _b2;
36814
36598
  const { auth } = await currentResolvedConfig();
36815
36599
  const dataOrError = await graphqlClient.getFileContents(repoName, filePath, rev);
36816
- if (isError(dataOrError)) {
36600
+ if (!auth.serverEndpoint || isError(dataOrError)) {
36817
36601
  return [];
36818
36602
  }
36819
36603
  const file = (_b2 = (_a3 = dataOrError == null ? void 0 : dataOrError.repository) == null ? void 0 : _a3.commit) == null ? void 0 : _b2.file;
@@ -39913,7 +39697,6 @@ ril.default = RIL;
39913
39697
  super();
39914
39698
  this._onData = new api_12.Emitter();
39915
39699
  this._messageListener = (event) => {
39916
- console.log("[Cody] Message from web worker", event);
39917
39700
  this._onData.fire(event.data);
39918
39701
  };
39919
39702
  port.addEventListener("error", (event) => this.fireError(event));
@@ -39933,7 +39716,6 @@ ril.default = RIL;
39933
39716
  }
39934
39717
  write(msg) {
39935
39718
  try {
39936
- console.log("[Cody] Message to web worker", msg);
39937
39719
  this.port.postMessage(msg);
39938
39720
  return Promise.resolve();
39939
39721
  } catch (error2) {
@@ -41780,7 +41562,7 @@ const camelCase$1 = /* @__PURE__ */ getDefaultExportFromCjs(camelCase_1);
41780
41562
  const $schema = "package.schema.json";
41781
41563
  const name = "cody-ai";
41782
41564
  const displayName = "Cody: AI Code Assistant";
41783
- const version = "1.118.0";
41565
+ const version = "1.126.0";
41784
41566
  const publisher = "sourcegraph";
41785
41567
  const license = "Apache-2.0";
41786
41568
  const icon = "resources/sourcegraph.png";
@@ -44937,12 +44719,6 @@ let extensionConfiguration;
44937
44719
  function setExtensionConfiguration(newConfig) {
44938
44720
  extensionConfiguration = newConfig;
44939
44721
  }
44940
- function isTokenOrEndpointChange(newConfig) {
44941
- if (!extensionConfiguration) {
44942
- return true;
44943
- }
44944
- return extensionConfiguration.accessToken !== newConfig.accessToken || extensionConfiguration.serverEndpoint !== newConfig.serverEndpoint;
44945
- }
44946
44722
  const onDidChangeActiveTextEditor = new AgentEventEmitter();
44947
44723
  const onDidChangeConfiguration = new AgentEventEmitter();
44948
44724
  const onDidChangeTextDocument = new AgentEventEmitter();
@@ -45195,24 +44971,53 @@ ${workspaceFolders.map((wf) => ` - ${wf.uri.toString()}
45195
44971
  fs: workspaceFs
45196
44972
  };
45197
44973
  const workspace = _workspace;
45198
- const statusBarItem = {
45199
- show: () => {
45200
- },
45201
- dispose: () => {
45202
- },
45203
- alignment: StatusBarAlignment.Left,
45204
- hide: () => {
45205
- },
45206
- text: "",
45207
- id: "id",
45208
- priority: void 0,
45209
- tooltip: void 0,
45210
- accessibilityInformation: void 0,
45211
- backgroundColor: void 0,
45212
- color: void 0,
45213
- command: void 0,
45214
- name: void 0
45215
- };
44974
+ function createStatusBarItem() {
44975
+ let _text = "";
44976
+ let _tooltip = void 0;
44977
+ function notifyChange() {
44978
+ if (agent) {
44979
+ agent.notify("statusBar/didChange", {
44980
+ textWithIcon: _text,
44981
+ tooltip: typeof _tooltip === "string" ? _tooltip : (_tooltip == null ? void 0 : _tooltip.value) || void 0
44982
+ });
44983
+ }
44984
+ }
44985
+ return {
44986
+ show: () => {
44987
+ },
44988
+ dispose: () => {
44989
+ },
44990
+ alignment: StatusBarAlignment.Left,
44991
+ hide: () => {
44992
+ },
44993
+ get text() {
44994
+ return _text;
44995
+ },
44996
+ set text(value) {
44997
+ if (_text !== value) {
44998
+ _text = value;
44999
+ notifyChange();
45000
+ }
45001
+ },
45002
+ id: "id",
45003
+ priority: void 0,
45004
+ get tooltip() {
45005
+ return _tooltip;
45006
+ },
45007
+ set tooltip(value) {
45008
+ if (_tooltip !== value) {
45009
+ _tooltip = value;
45010
+ notifyChange();
45011
+ }
45012
+ },
45013
+ accessibilityInformation: void 0,
45014
+ backgroundColor: void 0,
45015
+ color: void 0,
45016
+ command: void 0,
45017
+ name: void 0
45018
+ };
45019
+ }
45020
+ const statusBarItem = createStatusBarItem();
45216
45021
  const visibleTextEditors = [];
45217
45022
  const tabGroups = new AgentTabGroups();
45218
45023
  let agent;
@@ -46011,7 +45816,6 @@ const vscode = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProper
46011
45816
  gitRepository,
46012
45817
  isIntegrationTesting,
46013
45818
  isTesting,
46014
- isTokenOrEndpointChange,
46015
45819
  languages,
46016
45820
  onDidChangeActiveTextEditor,
46017
45821
  onDidChangeConfiguration,
@@ -46078,7 +45882,7 @@ export {
46078
45882
  trace as Z,
46079
45883
  context$1 as _,
46080
45884
  REMOTE_FILE_PROVIDER_URI as a,
46081
- promiseFactoryToObservable as a$,
45885
+ graphqlClient as a$,
46082
45886
  svg as a0,
46083
45887
  html as a1,
46084
45888
  whitespace as a2,
@@ -46089,33 +45893,33 @@ export {
46089
45893
  CodyIDE as a7,
46090
45894
  CodyTaskState as a8,
46091
45895
  cryptoJsExports as a9,
46092
- UITerminalOutputType as aA,
46093
- isCodeSearchContextItem as aB,
46094
- v4 as aC,
46095
- lodashExports as aD,
46096
- deserializeContextItem as aE,
46097
- firstResultFromOperation as aF,
46098
- ChatHistoryType as aG,
46099
- S2_URL as aH,
46100
- ACCOUNT_USAGE_URL as aI,
46101
- CODY_DOC_QUICKSTART_URL as aJ,
46102
- isPlgEsAccessDisabled as aK,
46103
- isDefined as aL,
46104
- browser$1 as aM,
46105
- CodyAutoSuggestionMode as aN,
46106
- setDisplayPathEnvInfo as aO,
46107
- isErrorLike as aP,
46108
- PromptString as aQ,
46109
- createGuardrailsImpl as aR,
46110
- serialize as aS,
46111
- deserialize as aT,
46112
- unsubscribe as aU,
46113
- AsyncSerialScheduler$1 as aV,
46114
- authStatus as aW,
46115
- pick as aX,
46116
- distinctUntilChanged as aY,
46117
- switchMapReplayOperation as aZ,
46118
- pendingOperation as a_,
45896
+ isCodeSearchContextItem as aA,
45897
+ v4 as aB,
45898
+ lodashExports as aC,
45899
+ deserializeContextItem as aD,
45900
+ firstResultFromOperation as aE,
45901
+ ChatHistoryType as aF,
45902
+ ACCOUNT_USAGE_URL as aG,
45903
+ CODY_DOC_QUICKSTART_URL as aH,
45904
+ isDefined as aI,
45905
+ browser$1 as aJ,
45906
+ CodyAutoSuggestionMode as aK,
45907
+ setDisplayPathEnvInfo as aL,
45908
+ isErrorLike as aM,
45909
+ PromptString as aN,
45910
+ createGuardrailsImpl as aO,
45911
+ serialize as aP,
45912
+ deserialize as aQ,
45913
+ unsubscribe as aR,
45914
+ AsyncSerialScheduler$1 as aS,
45915
+ authStatus as aT,
45916
+ pick as aU,
45917
+ distinctUntilChanged as aV,
45918
+ switchMapReplayOperation as aW,
45919
+ pendingOperation as aX,
45920
+ promiseFactoryToObservable as aY,
45921
+ retry as aZ,
45922
+ logError as a_,
46119
45923
  GuardrailsCheckStatus as aa,
46120
45924
  LRUCache$1 as ab,
46121
45925
  isError as ac,
@@ -46129,330 +45933,313 @@ export {
46129
45933
  contextItemsFromPromptEditorValue as ak,
46130
45934
  filterContextItemsFromPromptEditorValue as al,
46131
45935
  View as am,
46132
- isCodyProModel as an,
46133
- isMacOS as ao,
46134
- ToolCodyModelName as ap,
46135
- CustomCommandType as aq,
46136
- textContentFromSerializedLexicalNode as ar,
46137
- firstValueFrom as as,
46138
- skipPendingOperation as at,
46139
- FAST_CHAT_INPUT_TOKEN_BUDGET as au,
46140
- webviewOpenURIForContextItem as av,
46141
- pluralize as aw,
46142
- UIToolStatus as ax,
46143
- getFileDiff as ay,
46144
- diffWithLineNum as az,
45936
+ isMacOS as an,
45937
+ ToolCodyModelName as ao,
45938
+ CustomCommandType as ap,
45939
+ textContentFromSerializedLexicalNode as aq,
45940
+ firstValueFrom as ar,
45941
+ skipPendingOperation as as,
45942
+ FAST_CHAT_INPUT_TOKEN_BUDGET as at,
45943
+ webviewOpenURIForContextItem as au,
45944
+ pluralize as av,
45945
+ UIToolStatus as aw,
45946
+ getFileDiff as ax,
45947
+ diffWithLineNum as ay,
45948
+ UITerminalOutputType as az,
46145
45949
  REMOTE_DIRECTORY_PROVIDER_URI as b,
46146
- window$1 as b$,
46147
- retry as b0,
46148
- logError as b1,
46149
- graphqlClient as b2,
46150
- semver$1 as b3,
46151
- debounceTime as b4,
46152
- interval as b5,
46153
- filter$1 as b6,
46154
- startWith as b7,
46155
- switchMap as b8,
46156
- logDebug as b9,
46157
- getEnterpriseContextWindow as bA,
46158
- ANSWER_TOKENS as bB,
46159
- currentAuthStatusOrNotReadyYet as bC,
46160
- mockAuthStatus as bD,
46161
- storeLastValue as bE,
46162
- resolvedConfig as bF,
46163
- userProductSubscription as bG,
46164
- currentAuthStatus as bH,
46165
- isEnterpriseUser as bI,
46166
- ps as bJ,
46167
- GuardrailsMode as bK,
46168
- currentResolvedConfig as bL,
46169
- CORPUS_CONTEXT_ALLOCATION as bM,
46170
- isCustomModel as bN,
46171
- recordErrorToSpan as bO,
46172
- addClientInfoParams as bP,
46173
- dependentAbortController as bQ,
46174
- isS2 as bR,
46175
- GIT_OPENCTX_PROVIDER_URI as bS,
46176
- CODE_SEARCH_PROVIDER_URI as bT,
46177
- currentOpenCtxController as bU,
46178
- MulticastSubject as bV,
46179
- AsyncSerialScheduler_1 as bW,
46180
- workspace as bX,
46181
- vscode as bY,
46182
- Range as bZ,
46183
- commands as b_,
46184
- isAbortError as ba,
46185
- getModelInfo as bb,
46186
- CHAT_INPUT_TOKEN_BUDGET as bc,
46187
- CHAT_OUTPUT_TOKEN_BUDGET as bd,
46188
- EXTENDED_CHAT_INPUT_TOKEN_BUDGET as be,
46189
- EXTENDED_USER_CONTEXT_TOKEN_BUDGET as bf,
46190
- expand$1 as bg,
46191
- TRANSIENT_REFETCH_INTERVAL_HINT as bh,
46192
- createSubscriber as bi,
46193
- fromVSCodeEvent as bj,
46194
- cenv as bk,
46195
- EXCLUDE_EVERYTHING_CONTEXT_FILTERS as bl,
46196
- isFileURI as bm,
46197
- INCLUDE_EVERYTHING_CONTEXT_FILTERS as bn,
46198
- onAbort as bo,
46199
- addCodyClientIdentificationHeaders as bp,
46200
- addTraceparent as bq,
46201
- addAuthHeaders as br,
46202
- fetch as bs,
46203
- verifyResponseCode as bt,
46204
- take as bu,
46205
- clientCapabilities as bv,
46206
- shareReplay as bw,
46207
- tap as bx,
46208
- featureFlagProvider as by,
46209
- telemetryRecorder as bz,
45950
+ UIKind as b$,
45951
+ semver$1 as b0,
45952
+ debounceTime as b1,
45953
+ interval as b2,
45954
+ filter$1 as b3,
45955
+ startWith as b4,
45956
+ switchMap as b5,
45957
+ logDebug as b6,
45958
+ isAbortError as b7,
45959
+ expand$1 as b8,
45960
+ TRANSIENT_REFETCH_INTERVAL_HINT as b9,
45961
+ ps as bA,
45962
+ GuardrailsMode as bB,
45963
+ currentResolvedConfig as bC,
45964
+ CORPUS_CONTEXT_ALLOCATION as bD,
45965
+ recordErrorToSpan as bE,
45966
+ addClientInfoParams as bF,
45967
+ dependentAbortController as bG,
45968
+ isS2 as bH,
45969
+ GIT_OPENCTX_PROVIDER_URI as bI,
45970
+ CODE_SEARCH_PROVIDER_URI as bJ,
45971
+ currentOpenCtxController as bK,
45972
+ MulticastSubject as bL,
45973
+ AsyncSerialScheduler_1 as bM,
45974
+ workspace as bN,
45975
+ vscode as bO,
45976
+ Range as bP,
45977
+ commands as bQ,
45978
+ window$1 as bR,
45979
+ Selection as bS,
45980
+ AgentEventEmitter as bT,
45981
+ MarkdownString as bU,
45982
+ Disposable as bV,
45983
+ TextEditorRevealType as bW,
45984
+ ThemeIcon as bX,
45985
+ StatusBarAlignment as bY,
45986
+ readFile as bZ,
45987
+ env as b_,
45988
+ createSubscriber as ba,
45989
+ fromVSCodeEvent as bb,
45990
+ cenv as bc,
45991
+ EXCLUDE_EVERYTHING_CONTEXT_FILTERS as bd,
45992
+ isFileURI as be,
45993
+ INCLUDE_EVERYTHING_CONTEXT_FILTERS as bf,
45994
+ onAbort as bg,
45995
+ CHAT_INPUT_TOKEN_BUDGET as bh,
45996
+ CHAT_OUTPUT_TOKEN_BUDGET as bi,
45997
+ EXTENDED_CHAT_INPUT_TOKEN_BUDGET as bj,
45998
+ EXTENDED_USER_CONTEXT_TOKEN_BUDGET as bk,
45999
+ addCodyClientIdentificationHeaders as bl,
46000
+ addTraceparent as bm,
46001
+ addAuthHeaders as bn,
46002
+ fetch as bo,
46003
+ verifyResponseCode as bp,
46004
+ take as bq,
46005
+ clientCapabilities as br,
46006
+ shareReplay as bs,
46007
+ tap as bt,
46008
+ featureFlagProvider as bu,
46009
+ telemetryRecorder as bv,
46010
+ currentAuthStatusOrNotReadyYet as bw,
46011
+ mockAuthStatus as bx,
46012
+ storeLastValue as by,
46013
+ resolvedConfig as bz,
46210
46014
  commonjsGlobal as c,
46211
- toLightweightChatTranscript as c$,
46212
- Selection as c0,
46213
- AgentEventEmitter as c1,
46214
- MarkdownString as c2,
46215
- Disposable as c3,
46216
- TextEditorRevealType as c4,
46217
- ThemeIcon as c5,
46218
- StatusBarAlignment as c6,
46219
- readFile as c7,
46220
- env as c8,
46221
- UIKind as c9,
46222
- pathBrowserify as cA,
46223
- stat as cB,
46224
- extensions as cC,
46225
- version as cD,
46226
- setExtensionVersion as cE,
46227
- withLatestFrom as cF,
46228
- NEVER as cG,
46229
- abortableOperation as cH,
46230
- isNeedsAuthChallengeError as cI,
46231
- EMPTY as cJ,
46232
- disposableSubscription as cK,
46233
- setAuthStatusObservable as cL,
46234
- DOTCOM_URL as cM,
46235
- isInvalidAccessTokenError as cN,
46236
- normalizeServerEndpointURL as cO,
46237
- isEnterpriseUserDotComError as cP,
46238
- ProgressLocation as cQ,
46239
- AuthConfigError as cR,
46240
- SourcegraphGraphQLAPIClient as cS,
46241
- isExternalProviderAuthError as cT,
46242
- isNetworkLikeError as cU,
46243
- NeedsAuthChallengeError as cV,
46244
- AvailabilityError as cW,
46245
- EnterpriseUserDotComError as cX,
46246
- resolveAuth as cY,
46247
- QuickPickItemKind as cZ,
46248
- getAuthHeaders as c_,
46249
- languages as ca,
46250
- InvalidAccessTokenError as cb,
46251
- _baseAssignValue as cc,
46252
- eq_1$1 as cd,
46253
- isArrayLike_1 as ce,
46254
- isObjectLike_1 as cf,
46255
- _copyObject as cg,
46256
- keysIn_1 as ch,
46257
- _cloneBufferExports as ci,
46258
- _cloneTypedArray as cj,
46259
- _copyArray as ck,
46260
- _initCloneObject as cl,
46261
- isArguments_1 as cm,
46262
- isArray_1 as cn,
46263
- isBufferExports as co,
46264
- isFunction_1 as cp,
46265
- isObject_1 as cq,
46266
- isPlainObject_1 as cr,
46267
- isTypedArray_1 as cs,
46268
- _Stack as ct,
46269
- identity_1 as cu,
46270
- _overRest as cv,
46271
- _setToString as cw,
46272
- _isIndex as cx,
46273
- CONFIG_KEY as cy,
46274
- ConfigurationTarget as cz,
46015
+ isRateLimitError as c$,
46016
+ languages as c0,
46017
+ InvalidAccessTokenError as c1,
46018
+ _baseAssignValue as c2,
46019
+ eq_1$1 as c3,
46020
+ isArrayLike_1 as c4,
46021
+ isObjectLike_1 as c5,
46022
+ _copyObject as c6,
46023
+ keysIn_1 as c7,
46024
+ _cloneBufferExports as c8,
46025
+ _cloneTypedArray as c9,
46026
+ externalAuthRefresh as cA,
46027
+ setAuthStatusObservable as cB,
46028
+ normalizeServerEndpointURL as cC,
46029
+ AuthConfigError as cD,
46030
+ SourcegraphGraphQLAPIClient as cE,
46031
+ isExternalProviderAuthError as cF,
46032
+ isNetworkLikeError as cG,
46033
+ NeedsAuthChallengeError as cH,
46034
+ AvailabilityError as cI,
46035
+ currentAuthStatus as cJ,
46036
+ resolveAuth as cK,
46037
+ QuickPickItemKind as cL,
46038
+ getAuthHeaders as cM,
46039
+ toLightweightChatTranscript as cN,
46040
+ SUPPORTED_URI_SCHEMAS as cO,
46041
+ RelativePattern as cP,
46042
+ _baseIsEqual as cQ,
46043
+ keys_1 as cR,
46044
+ _baseGet as cS,
46045
+ _castPath as cT,
46046
+ isLength_1 as cU,
46047
+ _toKey as cV,
46048
+ _isKey as cW,
46049
+ toNumber_1 as cX,
46050
+ _baseFindIndex as cY,
46051
+ require$$0 as cZ,
46052
+ NetworkError as c_,
46053
+ _copyArray as ca,
46054
+ _initCloneObject as cb,
46055
+ isArguments_1 as cc,
46056
+ isArray_1 as cd,
46057
+ isBufferExports as ce,
46058
+ isFunction_1 as cf,
46059
+ isObject_1 as cg,
46060
+ isPlainObject_1 as ch,
46061
+ isTypedArray_1 as ci,
46062
+ _Stack as cj,
46063
+ identity_1 as ck,
46064
+ _overRest as cl,
46065
+ _setToString as cm,
46066
+ _isIndex as cn,
46067
+ CONFIG_KEY as co,
46068
+ ConfigurationTarget as cp,
46069
+ pathBrowserify as cq,
46070
+ stat as cr,
46071
+ extensions as cs,
46072
+ version as ct,
46073
+ setExtensionVersion as cu,
46074
+ isInvalidAccessTokenError as cv,
46075
+ DOTCOM_URL as cw,
46076
+ isNeedsAuthChallengeError as cx,
46077
+ EMPTY as cy,
46078
+ disposableSubscription as cz,
46275
46079
  RULES_PROVIDER_URI as d,
46276
- CodeLens as d$,
46277
- SUPPORTED_URI_SCHEMAS as d0,
46278
- RelativePattern as d1,
46279
- _baseIsEqual as d2,
46280
- keys_1 as d3,
46281
- _baseGet as d4,
46282
- _castPath as d5,
46283
- isLength_1 as d6,
46284
- _toKey as d7,
46285
- _isKey as d8,
46286
- toNumber_1 as d9,
46287
- createGitDiff as dA,
46288
- AgentWorkspaceEdit as dB,
46289
- TextDocumentChangeReason as dC,
46290
- omit$1 as dD,
46291
- getEditorInsertSpaces as dE,
46292
- escapeRegExp$1 as dF,
46293
- TimeoutError as dG,
46294
- isNetworkError as dH,
46295
- displayPathWithoutWorkspaceFolderPrefix as dI,
46296
- http as dJ,
46297
- open as dK,
46298
- defer as dL,
46299
- merge$1 as dM,
46300
- ruleSearchPaths as dN,
46301
- isRuleFilename as dO,
46302
- parseRuleFile as dP,
46303
- languageFromFilename as dQ,
46304
- ruleTitle as dR,
46305
- debounce_1 as dS,
46306
- isWindows as dT,
46307
- GLOBAL_SEARCH_PROVIDER_URI as dU,
46308
- mentionProvidersMetadata as dV,
46309
- currentUserProductSubscription as dW,
46310
- checkIfEnterpriseUser as dX,
46311
- ThemeColor as dY,
46312
- QuickInputButtons as dZ,
46313
- GENERAL_HELP_LABEL as d_,
46314
- _baseFindIndex as da,
46315
- require$$0 as db,
46316
- NetworkError as dc,
46317
- isRateLimitError as dd,
46318
- FileType as de,
46319
- dedent as df,
46320
- FoldingRange as dg,
46321
- CancellationTokenSource2 as dh,
46322
- SymbolKind as di,
46323
- convertGitCloneURLToCodebaseName as dj,
46324
- pluck as dk,
46325
- toRangeData as dl,
46326
- Position as dm,
46327
- DefaultChatCommands as dn,
46328
- pathFunctionsForURI as dp,
46329
- uriParseNameAndExtension as dq,
46330
- uriDirname as dr,
46331
- Utils as ds,
46332
- uriExtname as dt,
46333
- uriBasename as du,
46334
- DefaultEditCommands as dv,
46335
- subscriptionDisposable as dw,
46336
- updateGlobalTelemetryInstances as dx,
46337
- TelemetryRecorderProvider as dy,
46338
- telemetryRecorderProvider as dz,
46080
+ main$1 as d$,
46081
+ FileType as d0,
46082
+ dedent as d1,
46083
+ FoldingRange as d2,
46084
+ CancellationTokenSource2 as d3,
46085
+ SymbolKind as d4,
46086
+ convertGitCloneURLToCodebaseName as d5,
46087
+ pluck as d6,
46088
+ toRangeData as d7,
46089
+ Position as d8,
46090
+ DefaultChatCommands as d9,
46091
+ ruleSearchPaths as dA,
46092
+ isRuleFilename as dB,
46093
+ parseRuleFile as dC,
46094
+ languageFromFilename as dD,
46095
+ ruleTitle as dE,
46096
+ debounce_1 as dF,
46097
+ isWindows as dG,
46098
+ GLOBAL_SEARCH_PROVIDER_URI as dH,
46099
+ mentionProvidersMetadata as dI,
46100
+ ThemeColor as dJ,
46101
+ QuickInputButtons as dK,
46102
+ GENERAL_HELP_LABEL as dL,
46103
+ CodeLens as dM,
46104
+ defaultWebviewPanel as dN,
46105
+ EndOfLine as dO,
46106
+ ViewColumn as dP,
46107
+ Location as dQ,
46108
+ onDidChangeActiveTextEditor as dR,
46109
+ tabGroups as dS,
46110
+ workspaceTextDocuments as dT,
46111
+ visibleTextEditors as dU,
46112
+ onDidChangeVisibleTextEditors as dV,
46113
+ fs as dW,
46114
+ onDidCloseTextDocument as dX,
46115
+ setCreateWebviewPanel as dY,
46116
+ getAugmentedNamespace as dZ,
46117
+ extensionConfiguration as d_,
46118
+ pathFunctionsForURI as da,
46119
+ uriParseNameAndExtension as db,
46120
+ uriDirname as dc,
46121
+ Utils as dd,
46122
+ uriExtname as de,
46123
+ uriBasename as df,
46124
+ DefaultEditCommands as dg,
46125
+ subscriptionDisposable as dh,
46126
+ updateGlobalTelemetryInstances as di,
46127
+ TelemetryRecorderProvider as dj,
46128
+ telemetryRecorderProvider as dk,
46129
+ createGitDiff as dl,
46130
+ AgentWorkspaceEdit as dm,
46131
+ TextDocumentChangeReason as dn,
46132
+ omit$1 as dp,
46133
+ getEditorInsertSpaces as dq,
46134
+ escapeRegExp$1 as dr,
46135
+ TimeoutError as ds,
46136
+ isNetworkError as dt,
46137
+ displayPathWithoutWorkspaceFolderPrefix as du,
46138
+ http as dv,
46139
+ open as dw,
46140
+ defer as dx,
46141
+ merge$1 as dy,
46142
+ abortableOperation as dz,
46339
46143
  displayPath as e,
46340
- TracedError as e$,
46341
- defaultWebviewPanel as e0,
46342
- EndOfLine as e1,
46343
- ViewColumn as e2,
46344
- Location as e3,
46345
- onDidChangeActiveTextEditor as e4,
46346
- tabGroups as e5,
46347
- workspaceTextDocuments as e6,
46348
- visibleTextEditors as e7,
46349
- onDidChangeVisibleTextEditors as e8,
46350
- fs as e9,
46351
- UriString as eA,
46352
- DiagnosticSeverity as eB,
46353
- diagnostics as eC,
46354
- isIntegrationTesting as eD,
46355
- TESTING_TELEMETRY_EXPORTER as eE,
46356
- dist as eF,
46357
- completionProvider as eG,
46358
- InlineCompletionTriggerKind as eH,
46359
- currentAuthStatusAuthed as eI,
46360
- waitUntilComplete as eJ,
46361
- setExtensionConfiguration as eK,
46362
- onDidChangeConfiguration as eL,
46363
- onDidChangeTextDocument as eM,
46364
- onDidChangeTextEditorSelection as eN,
46365
- isTokenOrEndpointChange as eO,
46366
- structuredPatch as eP,
46367
- dedupeWith as eQ,
46368
- AbortError as eR,
46369
- createDisposables as eS,
46370
- isNodeResponse as eT,
46371
- getClientInfoQueryParams as eU,
46372
- tracer as eV,
46373
- getActiveTraceAndSpanId as eW,
46374
- getClientIdentificationHeaders as eX,
46375
- setJSONAcceptContentTypeHeaders as eY,
46376
- logResponseHeadersToSpan as eZ,
46377
- isCustomAuthChallengeResponse as e_,
46378
- onDidCloseTextDocument as ea,
46379
- setCreateWebviewPanel as eb,
46380
- getAugmentedNamespace as ec,
46381
- extensionConfiguration as ed,
46382
- main$1 as ee,
46383
- setAgent as ef,
46384
- setWorkspaceDocuments as eg,
46385
- setLastOpenedWorkspaceFolder as eh,
46386
- onDidRegisterNewCodeActionProvider as ei,
46387
- onDidUnregisterNewCodeActionProvider as ej,
46388
- onDidRegisterNewCodeLensProvider as ek,
46389
- onDidUnregisterNewCodeLensProvider as el,
46390
- setClientInfo as em,
46391
- AgentWorkspaceConfiguration as en,
46392
- firstNonPendingAuthStatus as eo,
46393
- workspaceFolders as ep,
46394
- setWorkspaceFolders as eq,
46395
- onDidChangeWorkspaceFolders as er,
46396
- onDidChangeWindowState as es,
46397
- onDidOpenTextDocument as et,
46398
- onDidSaveTextDocument as eu,
46399
- onDidRenameFiles as ev,
46400
- packageJson as ew,
46401
- progressBars as ex,
46402
- CodeActionTriggerKind as ey,
46403
- CodeAction as ez,
46144
+ catchError as e$,
46145
+ setAgent as e0,
46146
+ setWorkspaceDocuments as e1,
46147
+ setLastOpenedWorkspaceFolder as e2,
46148
+ onDidRegisterNewCodeActionProvider as e3,
46149
+ onDidUnregisterNewCodeActionProvider as e4,
46150
+ onDidRegisterNewCodeLensProvider as e5,
46151
+ onDidUnregisterNewCodeLensProvider as e6,
46152
+ setClientInfo as e7,
46153
+ firstNonPendingAuthStatus as e8,
46154
+ workspaceFolders as e9,
46155
+ dedupeWith as eA,
46156
+ AbortError as eB,
46157
+ createDisposables as eC,
46158
+ isNodeResponse as eD,
46159
+ getClientInfoQueryParams as eE,
46160
+ tracer as eF,
46161
+ getActiveTraceAndSpanId as eG,
46162
+ getClientIdentificationHeaders as eH,
46163
+ setJSONAcceptContentTypeHeaders as eI,
46164
+ logResponseHeadersToSpan as eJ,
46165
+ isCustomAuthChallengeResponse as eK,
46166
+ TracedError as eL,
46167
+ capitalize$2 as eM,
46168
+ InlineCompletionItem as eN,
46169
+ createTwoFilesPatch as eO,
46170
+ vsCodeMocks as eP,
46171
+ getEditorTabSize as eQ,
46172
+ metrics as eR,
46173
+ _ as eS,
46174
+ editorStateFromPromptString as eT,
46175
+ _baseGetTag as eU,
46176
+ inputTextWithoutContextChipsFromPromptEditorState as eV,
46177
+ exec as eW,
46178
+ expandToLineRange as eX,
46179
+ openctxController as eY,
46180
+ openCtxProviderMetadata as eZ,
46181
+ CODY_PASSTHROUGH_VSCODE_OPEN_COMMAND_ID as e_,
46182
+ setWorkspaceFolders as ea,
46183
+ onDidChangeWorkspaceFolders as eb,
46184
+ onDidChangeWindowState as ec,
46185
+ onDidOpenTextDocument as ed,
46186
+ onDidSaveTextDocument as ee,
46187
+ onDidRenameFiles as ef,
46188
+ packageJson as eg,
46189
+ progressBars as eh,
46190
+ CodeActionTriggerKind as ei,
46191
+ CodeAction as ej,
46192
+ UriString as ek,
46193
+ DiagnosticSeverity as el,
46194
+ diagnostics as em,
46195
+ isIntegrationTesting as en,
46196
+ TESTING_TELEMETRY_EXPORTER as eo,
46197
+ ProgressLocation as ep,
46198
+ dist as eq,
46199
+ completionProvider as er,
46200
+ InlineCompletionTriggerKind as es,
46201
+ currentAuthStatusAuthed as et,
46202
+ waitUntilComplete as eu,
46203
+ setExtensionConfiguration as ev,
46204
+ onDidChangeConfiguration as ew,
46205
+ onDidChangeTextDocument as ex,
46206
+ onDidChangeTextEditorSelection as ey,
46207
+ structuredPatch as ez,
46404
46208
  displayLineRange as f,
46405
- capitalize$2 as f0,
46406
- InlineCompletionItem as f1,
46407
- createTwoFilesPatch as f2,
46408
- vsCodeMocks as f3,
46409
- getEditorTabSize as f4,
46410
- metrics as f5,
46411
- _ as f6,
46412
- editorStateFromPromptString as f7,
46413
- _baseGetTag as f8,
46414
- inputTextWithoutContextChipsFromPromptEditorState as f9,
46415
- CODY_FEEDBACK_URL as fA,
46416
- DISCORD_URL as fB,
46417
- globalAgentRef as fC,
46418
- VSCODE_CHANGELOG_URL as fD,
46419
- SG_CHANGELOG_URL as fE,
46420
- ACCOUNT_LIMITS_INFO_URL as fF,
46421
- assertUnreachable as fG,
46422
- promise as fH,
46423
- ExtensionMode as fI,
46424
- setLogger as fJ,
46425
- setClientCapabilities as fK,
46426
- setResolvedConfigurationObservable as fL,
46427
- setClientNameVersion as fM,
46428
- setOpenCtxControllerObservable as fN,
46429
- child_process as fO,
46430
- exec as fa,
46431
- expandToLineRange as fb,
46432
- openctxController as fc,
46433
- openCtxProviderMetadata as fd,
46434
- CODY_PASSTHROUGH_VSCODE_OPEN_COMMAND_ID as fe,
46435
- catchError as ff,
46436
- getPlatform as fg,
46437
- PromptMode as fh,
46438
- skip as fi,
46439
- extractContextFromTraceparent as fj,
46440
- isContextWindowLimitError as fk,
46441
- addMessageListenersForExtensionAPI as fl,
46442
- createMessageAPIForExtension as fm,
46443
- CodeActionKind as fn,
46444
- assertFileURI as fo,
46445
- createCodeSearchProvider as fp,
46446
- ProgrammingLanguage as fq,
46447
- MAX_CURRENT_FILE_TOKENS as fr,
46448
- psDedent as fs,
46449
- formatRuleForPrompt as ft,
46450
- posixFilePaths as fu,
46451
- DecorationRangeBehavior as fv,
46452
- SURROUNDING_LINES as fw,
46453
- diffLines as fx,
46454
- CODY_SUPPORT_URL as fy,
46455
- CODY_DOC_URL as fz,
46209
+ getPlatform as f0,
46210
+ PromptMode as f1,
46211
+ skip as f2,
46212
+ extractContextFromTraceparent as f3,
46213
+ isContextWindowLimitError as f4,
46214
+ addMessageListenersForExtensionAPI as f5,
46215
+ createMessageAPIForExtension as f6,
46216
+ NEVER as f7,
46217
+ CodeActionKind as f8,
46218
+ assertFileURI as f9,
46219
+ createCodeSearchProvider as fa,
46220
+ ProgrammingLanguage as fb,
46221
+ psDedent as fc,
46222
+ formatRuleForPrompt as fd,
46223
+ posixFilePaths as fe,
46224
+ DecorationRangeBehavior as ff,
46225
+ diffLines as fg,
46226
+ CODY_SUPPORT_URL as fh,
46227
+ CODY_DOC_URL as fi,
46228
+ CODY_FEEDBACK_URL as fj,
46229
+ DISCORD_URL as fk,
46230
+ globalAgentRef as fl,
46231
+ VSCODE_CHANGELOG_URL as fm,
46232
+ SG_CHANGELOG_URL as fn,
46233
+ ACCOUNT_LIMITS_INFO_URL as fo,
46234
+ assertUnreachable as fp,
46235
+ promise as fq,
46236
+ ExtensionMode as fr,
46237
+ setLogger as fs,
46238
+ setClientCapabilities as ft,
46239
+ setResolvedConfigurationObservable as fu,
46240
+ setClientNameVersion as fv,
46241
+ setOpenCtxControllerObservable as fw,
46242
+ child_process as fx,
46456
46243
  getDefaultExportFromCjs as g,
46457
46244
  displayPathDirname as h,
46458
46245
  displayPathBasename as i,