@sourcegraph/cody-web 0.34.0 → 0.35.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.
@@ -18,8 +18,8 @@ var __privateWrapper = (obj, member, setter2, getter) => ({
18
18
  }
19
19
  });
20
20
  var _root, _hasMagic, _uflag, _parts, _parent, _parentIndex, _negs, _filledNegs, _options, _toString, _emptyExt, _AST_instances, fillNegs_fn, _AST_static, parseAST_fn, partsToRegExp_fn, parseGlob_fn, _a2, _b, _c, _d, _e, _constructing, _f, _g, _max, _maxSize, _dispose, _disposeAfter, _fetchMethod, _size, _calculatedSize, _keyMap, _keyList, _valList, _next, _prev, _head, _tail, _free, _disposed, _sizes, _starts, _ttls, _hasDispose, _hasFetchMethod, _hasDisposeAfter, _LRUCache_instances, initializeTTLTracking_fn, _updateItemAge, _statusTTL, _setItemTTL, _isStale, initializeSizeTracking_fn, _removeItemSize, _addItemSize, _requireSize, indexes_fn, rindexes_fn, isValidIndex_fn, evict_fn, backgroundFetch_fn, isBackgroundFetch_fn, connect_fn2, moveToTail_fn, _h, _i, _j, _k, _l;
21
- import { O as Observable, aV as unsubscribe, aW as AsyncSerialScheduler, aX as authStatus, aY as pick, aZ as distinctUntilChanged$1, a_ as switchMapReplayOperation, a$ as pendingOperation, b0 as promiseFactoryToObservable, J as map$1, ad as isError$3, P as isDotCom, b1 as retry$1, b2 as logError$2, aG as firstResultFromOperation, b3 as graphqlClient, b4 as semver, b5 as debounceTime, b6 as interval, b7 as filter$3, b8 as startWith$1, b9 as switchMap$1, at as firstValueFrom$1, au as skipPendingOperation, ba as logDebug$1, bb as isAbortError, ai as ModelTag, bc as getModelInfo, bd as CHAT_INPUT_TOKEN_BUDGET, be as CHAT_OUTPUT_TOKEN_BUDGET, bf as EXTENDED_CHAT_INPUT_TOKEN_BUDGET, bg as EXTENDED_USER_CONTEXT_TOKEN_BUDGET, bh as expand, ac as LRUCache$1, bi as TRANSIENT_REFETCH_INTERVAL_HINT, bj as createSubscriber, bk as fromVSCodeEvent, D as isEqual, bl as cenv, aE as lodashExports, bm as EXCLUDE_EVERYTHING_CONTEXT_FILTERS, bn as isFileURI, w as wrapInActiveSpan, bo as INCLUDE_EVERYTHING_CONTEXT_FILTERS, bp as onAbort, bq as addCodyClientIdentificationHeaders, br as addTraceparent, bs as addAuthHeaders, bt as fetch$2, bu as verifyResponseCode, H as combineLatest$1, bv as take$2, bw as clientCapabilities, bx as shareReplay$1, by as tap$2, bz as featureFlagProvider, af as FeatureFlag, a7 as isCodyProUser, bA as isFreeUser, bB as telemetryRecorder, bC as getEnterpriseContextWindow, bD as ANSWER_TOKENS, bE as currentAuthStatusOrNotReadyYet, bF as mockAuthStatus, bG as storeLastValue, bH as resolvedConfig, bI as userProductSubscription, bJ as currentAuthStatus, bK as isEnterpriseUser, bL as ps, bM as GuardrailsMode, bN as currentResolvedConfig, aR as PromptString, a8 as CodyIDE, bO as CORPUS_CONTEXT_ALLOCATION, bP as isCustomModel, bQ as recordErrorToSpan, bR as addClientInfoParams, bS as dependentAbortController, F as FILE_CONTEXT_MENTION_PROVIDER, S as SYMBOL_CONTEXT_MENTION_PROVIDER, R as REMOTE_REPOSITORY_PROVIDER_URI, a as REMOTE_FILE_PROVIDER_URI, b as REMOTE_DIRECTORY_PROVIDER_URI, W as WEB_PROVIDER_URI, C as ContextItemSource, bT as isS2, bU as GIT_OPENCTX_PROVIDER_URI, bV as CODE_SEARCH_PROVIDER_URI, aa as cryptoJsExports, bW as currentOpenCtxController, m as URI, bX as MulticastSubject, bY as AsyncSerialScheduler_1, g as getDefaultExportFromCjs, bZ as workspace, p as path$1, b_ as vscode, b$ as Range, c0 as commands$1, c1 as window$1, c2 as Selection, U as Uri, c3 as AgentEventEmitter, c4 as MarkdownString, c5 as Disposable, c6 as TextEditorRevealType, c7 as ThemeIcon, c8 as StatusBarAlignment, c9 as readFile, ca as env, cb as UIKind, cc as languages$1, c as commonjsGlobal, cd as InvalidAccessTokenError, ce as _baseAssignValue, cf as eq_1, cg as isArrayLike_1, ch as isObjectLike_1, ci as _copyObject, cj as keysIn_1, ck as _cloneBufferExports, cl as _cloneTypedArray, cm as _copyArray, cn as _initCloneObject, co as isArguments_1, cp as isArray_1, cq as isBufferExports, cr as isFunction_1, cs as isObject_1, ct as isPlainObject_1, cu as isTypedArray_1, cv as _Stack, cw as identity_1, cx as _overRest, cy as _setToString, cz as _isIndex, Y as isSourcegraphToken, aD as v4, cA as CONFIG_KEY, aO as CodyAutoSuggestionMode, cB as ConfigurationTarget, cC as pathBrowserify, cD as stat, cE as extensions, cF as version$2, cG as setExtensionVersion, cH as withLatestFrom, cI as NEVER$1, cJ as abortableOperation, cK as isNeedsAuthChallengeError, cL as EMPTY$1, cM as disposableSubscription, cN as setAuthStatusObservable, cO as DOTCOM_URL, X as isAvailabilityError, cP as isInvalidAccessTokenError, cQ as normalizeServerEndpointURL, cR as isEnterpriseUserDotComError, cS as ProgressLocation, cT as AuthConfigError, cU as SourcegraphGraphQLAPIClient, cV as isExternalProviderAuthError, cW as isNetworkLikeError, cX as NeedsAuthChallengeError, cY as AvailabilityError, cZ as EnterpriseUserDotComError, c_ as resolveAuth, c$ as QuickPickItemKind, Q as isWorkspaceInstance, d0 as getAuthHeaders, d1 as toLightweightChatTranscript, d2 as SUPPORTED_URI_SCHEMAS, d3 as RelativePattern, d4 as _baseIsEqual, d5 as keys_1, d6 as _baseGet, d7 as _castPath, d8 as isLength_1, d9 as _toKey, da as _isKey, db as toNumber_1, dc as _baseFindIndex, dd as require$$0$2, de as NetworkError, df as isRateLimitError, V as isAuthError, dg as FileType, dh as dedent$1, di as FoldingRange, dj as CancellationTokenSource, dk as SymbolKind, dl as convertGitCloneURLToCodebaseName, aM as isDefined, dm as pluck, dn as toRangeData, dp as Position, dq as DefaultChatCommands, dr as pathFunctionsForURI, ds as uriParseNameAndExtension, dt as uriDirname, du as Utils$1, dv as uriExtname, dw as uriBasename, dx as DefaultEditCommands, dy as subscriptionDisposable, dz as updateGlobalTelemetryInstances, dA as TelemetryRecorderProvider, dB as telemetryRecorderProvider, dC as createGitDiff, dD as catchError$1, dE as AgentWorkspaceEdit, dF as TextDocumentChangeReason, dG as omit$1, dH as displayPathWithoutWorkspaceFolderPrefix, dI as getEditorInsertSpaces, dJ as escapeRegExp$1, dK as TimeoutError, dL as isNetworkError, dM as http, dN as open, dO as defer$2, dP as merge$2, dQ as ruleSearchPaths, dR as isRuleFilename, dS as parseRuleFile, dT as languageFromFilename, f as displayLineRange, e as displayPath, dU as ruleTitle, ao as isCodyProModel, dV as debounce_1, aQ as isErrorLike, dW as isWindows, dX as GLOBAL_SEARCH_PROVIDER_URI, dY as mentionProvidersMetadata, dZ as currentUserProductSubscription, d_ as checkIfEnterpriseUser, d$ as ThemeColor, e0 as QuickInputButtons, E as scanForMentionTriggerInUserTextInput, u as parseMentionQuery, L as LARGE_FILE_WARNING_LABEL, e1 as GENERAL_HELP_LABEL, a9 as CodyTaskState, e2 as CodeLens, e3 as defaultWebviewPanel, x as createExtensionAPI, y as createMessageAPIForWebview, e4 as EndOfLine, e5 as ViewColumn, e6 as Location, e7 as onDidChangeActiveTextEditor, e8 as tabGroups, e9 as workspaceTextDocuments, ea as visibleTextEditors, eb as onDidChangeVisibleTextEditors, ec as fs, ed as onDidCloseTextDocument, ee as setCreateWebviewPanel, ef as getAugmentedNamespace, eg as extensionConfiguration, eh as main$1, ei as setAgent, ej as setWorkspaceDocuments, ek as setLastOpenedWorkspaceFolder, el as onDidRegisterNewCodeActionProvider, em as onDidUnregisterNewCodeActionProvider, en as onDidRegisterNewCodeLensProvider, eo as onDidUnregisterNewCodeLensProvider, ep as setClientInfo, eq as AgentWorkspaceConfiguration, er as firstNonPendingAuthStatus, es as workspaceFolders$1, et as setWorkspaceFolders, eu as onDidChangeWorkspaceFolders, ev as onDidChangeWindowState, ew as onDidOpenTextDocument, ex as onDidSaveTextDocument, ey as onDidRenameFiles, ez as packageJson, eA as progressBars, eB as CodeActionTriggerKind, eC as CodeAction, eD as UriString, eE as DiagnosticSeverity, eF as diagnostics, eG as isIntegrationTesting, eH as TESTING_TELEMETRY_EXPORTER, eI as dist, eJ as completionProvider, eK as InlineCompletionTriggerKind, eL as currentAuthStatusAuthed, eM as waitUntilComplete, eN as setExtensionConfiguration, eO as onDidChangeConfiguration, eP as onDidChangeTextDocument, eQ as onDidChangeTextEditorSelection, eR as isTokenOrEndpointChange, ap as isMacOS, ar as CustomCommandType, aP as setDisplayPathEnvInfo, aJ as ACCOUNT_USAGE_URL, z as debounce$1, eS as structuredPatch, eT as isDotComAuthed, eU as dedupeWith$1, eV as AbortError, eW as createDisposables, eX as isNodeResponse, eY as getClientInfoQueryParams, eZ as tracer, e_ as getActiveTraceAndSpanId, e$ as getClientIdentificationHeaders, f0 as setJSONAcceptContentTypeHeaders, f1 as logResponseHeadersToSpan, f2 as isCustomAuthChallengeResponse, f3 as TracedError, $ as SpanStatusCode, ae as RateLimitError$1, f4 as capitalize, f5 as InlineCompletionItem, f6 as createTwoFilesPatch, f7 as vsCodeMocks, a2 as whitespace, a0 as svg, a3 as find$1, a4 as stringify$1, a5 as stringify$2, a6 as ccount, a1 as html$3, f8 as getEditorTabSize$1, f9 as metrics, fa as _, aF as deserializeContextItem, fb as editorStateFromPromptString, fc as _baseGetTag, ah as isAbortErrorOrSocketHangUp, fd as inputTextWithoutContextChipsFromPromptEditorState, aj as DeepCodyAgentID, fe as exec, s as spawn, ay as UIToolStatus, i as displayPathBasename, ff as expandToLineRange, fg as openctxController, fh as openCtxProviderMetadata, fi as CODY_PASSTHROUGH_VSCODE_OPEN_COMMAND_ID, aA as diffWithLineNum, aB as UITerminalOutputType, fj as getPlatform$1, fk as PromptMode, fl as skip$1, _ as context, fm as extractContextFromTraceparent, fn as isContextWindowLimitError, q as serializeContextItem, K as forceHydration, ag as reformatBotMessageForChat, M as hydrateAfterPostMessage, fo as addMessageListenersForExtensionAPI, fp as createMessageAPIForExtension, an as View, aH as ChatHistoryType, fq as CodeActionKind, ax as pluralize, fr as assertFileURI, d as RULES_PROVIDER_URI, fs as createCodeSearchProvider, ft as ProgrammingLanguage, fu as MAX_CURRENT_FILE_TOKENS, fv as psDedent, fw as formatRuleForPrompt, fx as posixFilePaths, fy as DecorationRangeBehavior, fz as SURROUNDING_LINES, fA as diffLines, fB as CODY_SUPPORT_URL, fC as CODY_DOC_URL, fD as CODY_FEEDBACK_URL, fE as DISCORD_URL, fF as globalAgentRef, fG as VSCODE_CHANGELOG_URL, fH as SG_CHANGELOG_URL, fI as ACCOUNT_LIMITS_INFO_URL, fJ as assertUnreachable, fK as promise, fL as ExtensionMode, fM as setLogger, fN as setClientCapabilities, fO as setResolvedConfigurationObservable, fP as setClientNameVersion, fQ as setOpenCtxControllerObservable, aL as isPlgEsAccessDisabled, aN as browser$4 } from "./vscode-shim-DpWxvTpJ.mjs";
22
- import { r as requireUtil, i as inherits_browserExports, a as utilExports } from "./util-CCLzYWyF.mjs";
21
+ import { O as Observable, aU as unsubscribe, aV as AsyncSerialScheduler, aW as authStatus, aX as pick, aY as distinctUntilChanged$1, aZ as switchMapReplayOperation, a_ as pendingOperation, a$ as promiseFactoryToObservable, J as map$1, ac as isError$3, b0 as retry$1, b1 as logError$2, aF as firstResultFromOperation, b2 as graphqlClient, P as isDotCom, b3 as semver, b4 as debounceTime, b5 as interval, b6 as filter$3, b7 as startWith$1, b8 as switchMap$1, as as firstValueFrom$1, at as skipPendingOperation, b9 as logDebug$1, ba as isAbortError, ah as ModelTag, bb as getModelInfo, bc as CHAT_INPUT_TOKEN_BUDGET, bd as CHAT_OUTPUT_TOKEN_BUDGET, be as EXTENDED_CHAT_INPUT_TOKEN_BUDGET, bf as EXTENDED_USER_CONTEXT_TOKEN_BUDGET, bg as expand, ab as LRUCache$1, bh as TRANSIENT_REFETCH_INTERVAL_HINT, bi as createSubscriber, bj as fromVSCodeEvent, D as isEqual, bk as cenv, aD as lodashExports, bl as EXCLUDE_EVERYTHING_CONTEXT_FILTERS, bm as isFileURI, w as wrapInActiveSpan, bn as INCLUDE_EVERYTHING_CONTEXT_FILTERS, bo as onAbort, bp as addCodyClientIdentificationHeaders, bq as addTraceparent, br as addAuthHeaders, bs as fetch$2, bt as verifyResponseCode, H as combineLatest$1, bu as take$2, bv as clientCapabilities, bw as shareReplay$1, bx as tap$2, by as featureFlagProvider, ae as FeatureFlag, bz as telemetryRecorder, bA as getEnterpriseContextWindow, bB as ANSWER_TOKENS, bC as currentAuthStatusOrNotReadyYet, bD as mockAuthStatus, bE as storeLastValue, bF as resolvedConfig, bG as userProductSubscription, bH as currentAuthStatus, bI as isEnterpriseUser, bJ as ps, bK as GuardrailsMode, bL as currentResolvedConfig, aQ as PromptString, a7 as CodyIDE, bM as CORPUS_CONTEXT_ALLOCATION, bN as isCustomModel, bO as recordErrorToSpan, bP as addClientInfoParams, bQ as dependentAbortController, F as FILE_CONTEXT_MENTION_PROVIDER, S as SYMBOL_CONTEXT_MENTION_PROVIDER, R as REMOTE_REPOSITORY_PROVIDER_URI, a as REMOTE_FILE_PROVIDER_URI, b as REMOTE_DIRECTORY_PROVIDER_URI, W as WEB_PROVIDER_URI, C as ContextItemSource, bR as isS2, bS as GIT_OPENCTX_PROVIDER_URI, bT as CODE_SEARCH_PROVIDER_URI, a9 as cryptoJsExports, bU as currentOpenCtxController, m as URI, bV as MulticastSubject, bW as AsyncSerialScheduler_1, g as getDefaultExportFromCjs, bX as workspace, p as path$1, bY as vscode, bZ as Range, b_ as commands$1, b$ as window$1, c0 as Selection, U as Uri, c1 as AgentEventEmitter, c2 as MarkdownString, c3 as Disposable, c4 as TextEditorRevealType, c5 as ThemeIcon, c6 as StatusBarAlignment, c7 as readFile, c8 as env, c9 as UIKind, ca as languages$1, c as commonjsGlobal, cb as InvalidAccessTokenError, cc as _baseAssignValue, cd as eq_1, ce as isArrayLike_1, cf as isObjectLike_1, cg as _copyObject, ch as keysIn_1, ci as _cloneBufferExports, cj as _cloneTypedArray, ck as _copyArray, cl as _initCloneObject, cm as isArguments_1, cn as isArray_1, co as isBufferExports, cp as isFunction_1, cq as isObject_1, cr as isPlainObject_1, cs as isTypedArray_1, ct as _Stack, cu as identity_1, cv as _overRest, cw as _setToString, cx as _isIndex, Y as isSourcegraphToken, aC as v4, cy as CONFIG_KEY, aN as CodyAutoSuggestionMode, cz as ConfigurationTarget, cA as pathBrowserify, cB as stat, cC as extensions, cD as version$2, cE as setExtensionVersion, cF as withLatestFrom, cG as NEVER$1, cH as abortableOperation, cI as isNeedsAuthChallengeError, cJ as EMPTY$1, cK as disposableSubscription, cL as setAuthStatusObservable, cM as DOTCOM_URL, X as isAvailabilityError, cN as isInvalidAccessTokenError, cO as normalizeServerEndpointURL, cP as isEnterpriseUserDotComError, cQ as ProgressLocation, cR as AuthConfigError, cS as SourcegraphGraphQLAPIClient, cT as isExternalProviderAuthError, cU as isNetworkLikeError, cV as NeedsAuthChallengeError, cW as AvailabilityError, cX as EnterpriseUserDotComError, cY as resolveAuth, cZ as QuickPickItemKind, Q as isWorkspaceInstance, c_ as getAuthHeaders, c$ as toLightweightChatTranscript, d0 as SUPPORTED_URI_SCHEMAS, d1 as RelativePattern, d2 as _baseIsEqual, d3 as keys_1, d4 as _baseGet, d5 as _castPath, d6 as isLength_1, d7 as _toKey, d8 as _isKey, d9 as toNumber_1, da as _baseFindIndex, db as require$$0$2, dc as NetworkError, dd as isRateLimitError, V as isAuthError, de as FileType, df as dedent$1, dg as FoldingRange, dh as CancellationTokenSource, di as SymbolKind, dj as convertGitCloneURLToCodebaseName, aL as isDefined, dk as pluck, dl as toRangeData, dm as Position, dn as DefaultChatCommands, dp as pathFunctionsForURI, dq as uriParseNameAndExtension, dr as uriDirname, ds as Utils$1, dt as uriExtname, du as uriBasename, dv as DefaultEditCommands, dw as subscriptionDisposable, dx as updateGlobalTelemetryInstances, dy as TelemetryRecorderProvider, dz as telemetryRecorderProvider, dA as createGitDiff, dB as AgentWorkspaceEdit, dC as TextDocumentChangeReason, dD as omit$1, dE as getEditorInsertSpaces, dF as escapeRegExp$1, dG as TimeoutError, dH as isNetworkError, dI as displayPathWithoutWorkspaceFolderPrefix, dJ as http, dK as open, dL as defer$2, dM as merge$2, dN as ruleSearchPaths, dO as isRuleFilename, dP as parseRuleFile, dQ as languageFromFilename, f as displayLineRange, e as displayPath, dR as ruleTitle, an as isCodyProModel, dS as debounce_1, aP as isErrorLike, dT as isWindows, dU as GLOBAL_SEARCH_PROVIDER_URI, dV as mentionProvidersMetadata, dW as currentUserProductSubscription, dX as checkIfEnterpriseUser, dY as ThemeColor, dZ as QuickInputButtons, E as scanForMentionTriggerInUserTextInput, u as parseMentionQuery, L as LARGE_FILE_WARNING_LABEL, d_ as GENERAL_HELP_LABEL, a8 as CodyTaskState, d$ as CodeLens, e0 as defaultWebviewPanel, x as createExtensionAPI, y as createMessageAPIForWebview, e1 as EndOfLine, e2 as ViewColumn, e3 as Location, e4 as onDidChangeActiveTextEditor, e5 as tabGroups, e6 as workspaceTextDocuments, e7 as visibleTextEditors, e8 as onDidChangeVisibleTextEditors, e9 as fs, ea as onDidCloseTextDocument, eb as setCreateWebviewPanel, ec as getAugmentedNamespace, ed as extensionConfiguration, ee as main$1, ef as setAgent, eg as setWorkspaceDocuments, eh as setLastOpenedWorkspaceFolder, ei as onDidRegisterNewCodeActionProvider, ej as onDidUnregisterNewCodeActionProvider, ek as onDidRegisterNewCodeLensProvider, el as onDidUnregisterNewCodeLensProvider, em as setClientInfo, en as AgentWorkspaceConfiguration, eo as firstNonPendingAuthStatus, ep as workspaceFolders$1, eq as setWorkspaceFolders, er as onDidChangeWorkspaceFolders, es as onDidChangeWindowState, et as onDidOpenTextDocument, eu as onDidSaveTextDocument, ev as onDidRenameFiles, ew as packageJson, ex as progressBars, ey as CodeActionTriggerKind, ez as CodeAction, eA as UriString, eB as DiagnosticSeverity, eC as diagnostics, eD as isIntegrationTesting, eE as TESTING_TELEMETRY_EXPORTER, eF as dist, eG as completionProvider, eH as InlineCompletionTriggerKind, eI as currentAuthStatusAuthed, eJ as waitUntilComplete, eK as setExtensionConfiguration, eL as onDidChangeConfiguration, eM as onDidChangeTextDocument, eN as onDidChangeTextEditorSelection, eO as isTokenOrEndpointChange, ao as isMacOS, aq as CustomCommandType, aO as setDisplayPathEnvInfo, aI as ACCOUNT_USAGE_URL, z as debounce$1, eP as structuredPatch, eQ as dedupeWith$1, eR as AbortError, eS as createDisposables, eT as isNodeResponse, eU as getClientInfoQueryParams, eV as tracer, eW as getActiveTraceAndSpanId, eX as getClientIdentificationHeaders, eY as setJSONAcceptContentTypeHeaders, eZ as logResponseHeadersToSpan, e_ as isCustomAuthChallengeResponse, e$ as TracedError, $ as SpanStatusCode, ad as RateLimitError$1, f0 as capitalize, f1 as InlineCompletionItem, f2 as createTwoFilesPatch, f3 as vsCodeMocks, a2 as whitespace, a0 as svg, a3 as find$1, a4 as stringify$1, a5 as stringify$2, a6 as ccount, a1 as html$3, f4 as getEditorTabSize$1, f5 as metrics, f6 as _, aE as deserializeContextItem, f7 as editorStateFromPromptString, f8 as _baseGetTag, ag as isAbortErrorOrSocketHangUp, f9 as inputTextWithoutContextChipsFromPromptEditorState, ai as DeepCodyAgentID, fa as exec, s as spawn, ax as UIToolStatus, i as displayPathBasename, fb as expandToLineRange, fc as openctxController, fd as openCtxProviderMetadata, fe as CODY_PASSTHROUGH_VSCODE_OPEN_COMMAND_ID, ff as catchError$1, az as diffWithLineNum, aA as UITerminalOutputType, fg as getPlatform$1, fh as PromptMode, fi as skip$1, _ as context, fj as extractContextFromTraceparent, fk as isContextWindowLimitError, q as serializeContextItem, K as forceHydration, af as reformatBotMessageForChat, M as hydrateAfterPostMessage, fl as addMessageListenersForExtensionAPI, fm as createMessageAPIForExtension, am as View, aG as ChatHistoryType, fn as CodeActionKind, aw as pluralize, fo as assertFileURI, d as RULES_PROVIDER_URI, fp as createCodeSearchProvider, fq as ProgrammingLanguage, fr as MAX_CURRENT_FILE_TOKENS, fs as psDedent, ft as formatRuleForPrompt, fu as posixFilePaths, fv as DecorationRangeBehavior, fw as SURROUNDING_LINES, fx as diffLines, fy as CODY_SUPPORT_URL, fz as CODY_DOC_URL, fA as CODY_FEEDBACK_URL, fB as DISCORD_URL, fC as globalAgentRef, fD as VSCODE_CHANGELOG_URL, fE as SG_CHANGELOG_URL, fF as ACCOUNT_LIMITS_INFO_URL, fG as assertUnreachable, fH as promise, fI as ExtensionMode, fJ as setLogger, fK as setClientCapabilities, fL as setResolvedConfigurationObservable, fM as setClientNameVersion, fN as setOpenCtxControllerObservable, aK as isPlgEsAccessDisabled, aM as browser$4 } from "./vscode-shim-H_ThTWLs.mjs";
22
+ import { r as requireUtil, i as inherits_browserExports, a as utilExports } from "./util-C44wiTt8.mjs";
23
23
  var NOTHING = Symbol.for("immer-nothing");
24
24
  var DRAFTABLE = Symbol.for("immer-draftable");
25
25
  var DRAFT_STATE = Symbol.for("immer-state");
@@ -733,7 +733,7 @@ const siteVersion = authStatus.pipe(
733
733
  map$1((siteVersion2) => {
734
734
  return isError$3(siteVersion2) ? siteVersion2 : {
735
735
  siteVersion: siteVersion2,
736
- codyAPIVersion: inferCodyApiVersion(siteVersion2, isDotCom(authStatus2))
736
+ codyAPIVersion: inferCodyApiVersion(siteVersion2)
737
737
  };
738
738
  })
739
739
  );
@@ -762,7 +762,7 @@ async function currentSiteVersion() {
762
762
  }
763
763
  return {
764
764
  siteVersion: siteVersion2,
765
- codyAPIVersion: inferCodyApiVersion(siteVersion2, isDotComUser)
765
+ codyAPIVersion: inferCodyApiVersion(siteVersion2)
766
766
  };
767
767
  }
768
768
  async function isValidVersion({ minimumVersion }) {
@@ -785,8 +785,8 @@ const LOCAL_BUILD_VERSION_NUMBER = "0.0.0+dev";
785
785
  function serverSupportsPromptCaching() {
786
786
  return _LatestCodyAPIVersion >= 7;
787
787
  }
788
- function inferCodyApiVersion(version2, isDotCom2) {
789
- if (isDotCom2 || version2 === LOCAL_BUILD_VERSION_NUMBER) {
788
+ function inferCodyApiVersion(version2) {
789
+ if (version2 === LOCAL_BUILD_VERSION_NUMBER) {
790
790
  if (_LatestCodyAPIVersion && _LatestCodyAPIVersion >= LastKnownCodyAPIVersion) {
791
791
  return _LatestCodyAPIVersion;
792
792
  }
@@ -968,7 +968,7 @@ const _ClientConfigSingleton = class _ClientConfigSingleton {
968
968
  smartContextWindowEnabled: smartContextWindow,
969
969
  // Things that did not exist before logically default to disabled.
970
970
  modelsAPIEnabled: false,
971
- userShouldUseEnterprise: false,
971
+ userShouldUseEnterprise: true,
972
972
  notices: [],
973
973
  omniBoxEnabled: false,
974
974
  codeSearchEnabled: false
@@ -8029,10 +8029,6 @@ const _ContextFiltersProvider = class _ContextFiltersProvider {
8029
8029
  if (!uri || allowedSchemes.has(uri.scheme)) {
8030
8030
  return false;
8031
8031
  }
8032
- const path2 = uri.path.toLowerCase();
8033
- if (path2.includes("main.java") || path2.includes("index.html") || path2.includes("var.go") || path2.includes("visualize.go") || path2.includes("buzz.ts")) {
8034
- return false;
8035
- }
8036
8032
  await this.fetchIfNeeded();
8037
8033
  if (_ContextFiltersProvider.excludePatternGetter) {
8038
8034
  if (await this.isExcludedByPatterns(uri)) {
@@ -8368,11 +8364,9 @@ function syncModels({
8368
8364
  if (!authStatus22.authenticated) {
8369
8365
  return Observable.of({ primaryModels: [], preferences: null });
8370
8366
  }
8371
- const isDotComUser = isDotCom(authStatus22);
8372
- const isCodyFreeUser = userProductSubscription22 == null || userProductSubscription22.userCanUpgrade === true;
8373
8367
  const serverModelsConfig = clientConfig.pipe(
8374
8368
  switchMapReplayOperation((maybeServerSideClientConfig) => {
8375
- if (isDotComUser || (maybeServerSideClientConfig == null ? void 0 : maybeServerSideClientConfig.modelsAPIEnabled)) {
8369
+ if (maybeServerSideClientConfig == null ? void 0 : maybeServerSideClientConfig.modelsAPIEnabled) {
8376
8370
  logDebug$1("ModelsService", "new models API enabled");
8377
8371
  return promiseFactoryToObservable(
8378
8372
  (signal2) => fetchServerSideModels_(config, signal2)
@@ -8409,15 +8403,12 @@ function syncModels({
8409
8403
  ]) => {
8410
8404
  if (serverModelsConfig2) {
8411
8405
  const filteredModels = serverModelsConfig2 == null ? void 0 : serverModelsConfig2.models.filter(
8412
- (m) => m.status !== "deprecated" && (isDotComUser || m.status !== "waitlist")
8406
+ (m) => m.status !== "deprecated" && m.status !== "waitlist"
8413
8407
  );
8414
8408
  data.primaryModels = maybeAdjustContextWindows(
8415
8409
  filteredModels,
8416
8410
  {
8417
- tier: isDotComUser ? isCodyProUser(
8418
- authStatus22,
8419
- userProductSubscription22
8420
- ) ? "pro" : "free" : "enterprise",
8411
+ tier: "enterprise",
8421
8412
  enhancedContextWindowFlagEnabled: enhancedContextWindowFlag
8422
8413
  }
8423
8414
  ).map(
@@ -8430,35 +8421,13 @@ function syncModels({
8430
8421
  serverModelsConfig2
8431
8422
  );
8432
8423
  }
8433
- if (isDotComUser && hasEarlyAccess) {
8434
- data.primaryModels = data.primaryModels.map(
8435
- (model2) => {
8436
- if (model2.tags.includes(ModelTag.Waitlist)) {
8437
- const newTags = model2.tags.filter(
8438
- (tag2) => tag2 !== ModelTag.Waitlist
8439
- );
8440
- newTags.push(
8441
- hasEarlyAccess ? ModelTag.EarlyAccess : ModelTag.OnWaitlist
8442
- );
8443
- return { ...model2, tags: newTags };
8444
- }
8445
- return model2;
8446
- }
8447
- );
8448
- }
8449
- const isVisionSupported = !isDotComUser && hasEarlyAccess;
8424
+ const isVisionSupported = hasEarlyAccess;
8450
8425
  data.primaryModels = data.primaryModels.map((m) => ({
8451
8426
  ...m,
8452
8427
  // Gateway doesn't suppoort vision models for Google yet
8453
8428
  tags: isVisionSupported && m.provider !== "google" ? m.tags : m.tags.filter((t) => t !== ModelTag.Vision)
8454
8429
  }));
8455
- const haikuModel = data.primaryModels.find(
8456
- (m) => m.id.includes("5-haiku")
8457
- );
8458
- if (isDotComUser && isCodyFreeUser && defaultToHaiku && haikuModel) {
8459
- data.preferences.defaults.chat = haikuModel.id;
8460
- }
8461
- if (fallbackToFlashFlag && !isFreeUser(authStatus22, userProductSubscription22)) {
8430
+ if (fallbackToFlashFlag) {
8462
8431
  if (authStatus22.rateLimited) {
8463
8432
  const hasUnlimitedModels = data.primaryModels.some(
8464
8433
  (model2) => model2.tags.includes(ModelTag.Unlimited)
@@ -8855,7 +8824,7 @@ class ModelsService {
8855
8824
  }
8856
8825
  models = models.filter((model2) => !model2.tags.includes(ModelTag.Deprecated));
8857
8826
  const firstModelUserCanUse = models.find(
8858
- (m) => this._isModelAvailable(modelsData, authStatus2, userProductSubscription2, m) === true && !m.tags.includes(ModelTag.Reasoning)
8827
+ (m) => this._isModelAvailable(modelsData, authStatus2, m) === true && !m.tags.includes(ModelTag.Reasoning)
8859
8828
  );
8860
8829
  if (modelsData.preferences) {
8861
8830
  const selected = this.resolveModel(
@@ -8863,12 +8832,7 @@ class ModelsService {
8863
8832
  modelsData.preferences.selected[type] ?? modelsData.preferences.defaults[type]
8864
8833
  );
8865
8834
  if (selected && // Don't set default model for ModelUsage.Edit if the model has certain tags
8866
- !(type === ModelUsage.Edit && (selected.tags.includes(ModelTag.Reasoning) || selected.tags.includes(ModelTag.Deprecated))) && this._isModelAvailable(
8867
- modelsData,
8868
- authStatus2,
8869
- userProductSubscription2,
8870
- selected
8871
- ) === true) {
8835
+ !(type === ModelUsage.Edit && (selected.tags.includes(ModelTag.Reasoning) || selected.tags.includes(ModelTag.Deprecated))) && this._isModelAvailable(modelsData, authStatus2, selected) === true) {
8872
8836
  return selected;
8873
8837
  }
8874
8838
  }
@@ -8930,23 +8894,23 @@ class ModelsService {
8930
8894
  isModelAvailable(model2) {
8931
8895
  return combineLatest$1(authStatus, this.modelsChanges, userProductSubscription).pipe(
8932
8896
  map$1(
8933
- ([authStatus2, modelsData, userProductSubscription2]) => modelsData === pendingOperation || userProductSubscription2 === pendingOperation ? pendingOperation : this._isModelAvailable(modelsData, authStatus2, userProductSubscription2, model2)
8897
+ ([authStatus2, modelsData, userProductSubscription2]) => modelsData === pendingOperation || userProductSubscription2 === pendingOperation ? pendingOperation : this._isModelAvailable(modelsData, authStatus2, model2)
8934
8898
  ),
8935
8899
  distinctUntilChanged$1()
8936
8900
  );
8937
8901
  }
8938
- _isModelAvailable(modelsData, authStatus2, sub2, model2) {
8902
+ _isModelAvailable(modelsData, authStatus2, model2) {
8939
8903
  const resolved = this.resolveModel(modelsData, model2);
8940
8904
  if (!resolved) {
8941
8905
  return false;
8942
8906
  }
8907
+ if (resolved.tags.includes(ModelTag.Waitlist) || resolved.tags.includes(ModelTag.OnWaitlist)) {
8908
+ return false;
8909
+ }
8943
8910
  const tier = modelTier(resolved);
8944
8911
  if (isEnterpriseUser(authStatus2)) {
8945
8912
  return true;
8946
8913
  }
8947
- if (isCodyProUser(authStatus2, sub2)) {
8948
- return tier !== "enterprise" && !resolved.tags.includes(ModelTag.Waitlist) && !resolved.tags.includes(ModelTag.OnWaitlist);
8949
- }
8950
8914
  return tier === "free";
8951
8915
  }
8952
8916
  // does an approximate match on the model id, seeing if there are any models in the
@@ -9542,7 +9506,7 @@ async function getTokenCounterUtils() {
9542
9506
  const browser2 = detect();
9543
9507
  if (browser2 && browser2.name === "safari") {
9544
9508
  _tokenCounterUtilsPromise = import("./cl100k_base-B4kyDDRQ.mjs").then(async (tokenizer2) => {
9545
- const tiktoken = await import("./lite-BobkBW3_.mjs");
9509
+ const tiktoken = await import("./lite-b2NFi2v9.mjs");
9546
9510
  return createTokenCounterUtils(new tiktoken.Tiktoken(tokenizer2.default));
9547
9511
  });
9548
9512
  } else {
@@ -13467,7 +13431,7 @@ class SourcegraphBrowserCompletionsClient extends SourcegraphCompletionsClient {
13467
13431
  try {
13468
13432
  await addAuthHeaders(config.auth, headersInstance, url);
13469
13433
  } catch (error) {
13470
- cb.onError(error.message);
13434
+ cb.onError(error instanceof Error ? error : new Error(String(error)));
13471
13435
  abort2.abort();
13472
13436
  console.error(error);
13473
13437
  return;
@@ -13489,7 +13453,10 @@ class SourcegraphBrowserCompletionsClient extends SourcegraphCompletionsClient {
13489
13453
  async onopen(response) {
13490
13454
  if (!response.ok && response.headers.get("content-type") !== "text/event-stream") {
13491
13455
  const error = await verifyResponseCode(response).catch((err2) => err2);
13492
- cb.onError(error, response.status);
13456
+ cb.onError(
13457
+ error instanceof Error ? error : new Error(String(error)),
13458
+ response.status
13459
+ );
13493
13460
  abort2.abort();
13494
13461
  return;
13495
13462
  }
@@ -13522,21 +13489,21 @@ class SourcegraphBrowserCompletionsClient extends SourcegraphCompletionsClient {
13522
13489
  }
13523
13490
  this.sendEvents(events2, cb);
13524
13491
  } catch (error) {
13525
- cb.onError(error.message);
13492
+ cb.onError(error instanceof Error ? error : new Error(String(error)));
13526
13493
  abort2.abort();
13527
13494
  console.error(error);
13528
13495
  throw error;
13529
13496
  }
13530
13497
  },
13531
13498
  onerror(error) {
13532
- cb.onError(error.message);
13499
+ cb.onError(error instanceof Error ? error : new Error(String(error)));
13533
13500
  abort2.abort();
13534
13501
  console.error(error);
13535
13502
  throw error;
13536
13503
  },
13537
13504
  fetch: globalThis.fetch
13538
13505
  }).catch((error) => {
13539
- cb.onError(error.message);
13506
+ cb.onError(error instanceof Error ? error : new Error(String(error)));
13540
13507
  abort2.abort();
13541
13508
  console.error(error);
13542
13509
  });
@@ -13572,7 +13539,7 @@ class SourcegraphBrowserCompletionsClient extends SourcegraphCompletionsClient {
13572
13539
  }
13573
13540
  } catch (error) {
13574
13541
  console.error(error);
13575
- cb.onError(error instanceof Error ? error : new Error(`${error}`));
13542
+ cb.onError(error instanceof Error ? error : new Error(String(error)));
13576
13543
  }
13577
13544
  }
13578
13545
  }
@@ -13697,6 +13664,7 @@ const events$2 = [
13697
13664
  // Flag indicating this is a transcript event to go through ML data pipeline. Not for enterprise users
13698
13665
  // See https://github.com/sourcegraph/sourcegraph/pull/59524
13699
13666
  recordsPrivateMetadataTranscript: 0,
13667
+ // todo(mk): remove in the scope of PLG sunsetting
13700
13668
  isPublicRepo: params.repoIsPublic ? 1 : 0,
13701
13669
  // TODO: Remove this field when the transition from commands to prompts is complete
13702
13670
  isCommand: params.command ? 1 : 0,
@@ -13711,6 +13679,7 @@ const events$2 = [
13711
13679
  sessionID: params.sessionID,
13712
13680
  traceId: params.traceId,
13713
13681
  promptText: void 0,
13682
+ // todo(mk): remove in the scope of PLG sunsetting
13714
13683
  gitMetadata: void 0,
13715
13684
  chatAgent: params.chatAgent
13716
13685
  },
@@ -15485,7 +15454,7 @@ async function groqChatClient({
15485
15454
  log2 == null ? void 0 : log2.onComplete(completionResponse);
15486
15455
  }).catch((error) => {
15487
15456
  log2 == null ? void 0 : log2.onError(error);
15488
- cb.onError(error);
15457
+ cb.onError(error instanceof Error ? error : new Error(String(error)));
15489
15458
  });
15490
15459
  }
15491
15460
  const getContextForChatMessage = async (message, parentSignal) => {
@@ -26755,10 +26724,11 @@ async function readIgnoreFile(uri) {
26755
26724
  if (line.endsWith("/")) {
26756
26725
  line = line.slice(0, -1);
26757
26726
  }
26758
- if (!line.startsWith("/") && !line.startsWith("**/")) {
26759
- line = `**/${line}`;
26727
+ if (!line.includes("*") && !line.includes("/")) {
26728
+ ignore[`${line}/**`] = true;
26729
+ } else {
26730
+ ignore[line] = true;
26760
26731
  }
26761
- ignore[line] = true;
26762
26732
  }
26763
26733
  } catch (error) {
26764
26734
  }
@@ -36433,11 +36403,6 @@ class RepoNameResolver {
36433
36403
  authStatus
36434
36404
  ).pipe(
36435
36405
  switchMapReplayOperation(([remoteUrls, authStatus2]) => {
36436
- if (isDotCom(authStatus2)) {
36437
- return Observable.of(
36438
- remoteUrls.map(convertGitCloneURLToCodebaseName).filter(isDefined)
36439
- );
36440
- }
36441
36406
  if (remoteUrls.length === 0) {
36442
36407
  return Observable.of([]);
36443
36408
  }
@@ -37651,200 +37616,6 @@ class PersistenceTracker {
37651
37616
  }
37652
37617
  }
37653
37618
  }
37654
- const MAX_REPO_COUNT = 10;
37655
- const workspaceFolders = fromVSCodeEvent(
37656
- workspace.onDidChangeWorkspaceFolders
37657
- ).pipe(
37658
- startWith$1(void 0),
37659
- map$1(() => workspace.workspaceFolders)
37660
- );
37661
- const remoteReposForAllWorkspaceFolders = combineLatest$1(
37662
- workspaceFolders.pipe(
37663
- // The vscode.git extension has a delay before we can fetch a workspace folder's remote.
37664
- debounceTime(vscodeGitAPI ? 2e3 : 0)
37665
- ),
37666
- authStatus
37667
- ).pipe(
37668
- switchMapReplayOperation(
37669
- ([workspaceFolders2]) => {
37670
- if (!workspaceFolders2 || workspaceFolders2.length === 0) {
37671
- return Observable.of([]);
37672
- }
37673
- return combineLatest$1(
37674
- ...workspaceFolders2.map((folder2) => repoNameResolver.getRepoNamesContainingUri(folder2.uri))
37675
- ).pipe(
37676
- map$1((repoNamesLists) => {
37677
- const completedResults = repoNamesLists.filter((names) => Array.isArray(names)).flat().filter((name2) => typeof name2 === "string");
37678
- return completedResults.length > 0 ? completedResults : [];
37679
- }),
37680
- abortableOperation(async (repoNames, signal2) => {
37681
- if (repoNames.length === 0) {
37682
- return [];
37683
- }
37684
- const reposOrError = await graphqlClient.getRepoIds(
37685
- repoNames,
37686
- MAX_REPO_COUNT,
37687
- signal2
37688
- );
37689
- if (isError$3(reposOrError)) {
37690
- throw reposOrError;
37691
- }
37692
- return reposOrError;
37693
- })
37694
- );
37695
- }
37696
- )
37697
- );
37698
- async function remoteReposForWorkspaceFolder(folder2) {
37699
- return firstValueFrom$1(
37700
- repoNameResolver.getRepoNamesContainingUri(folder2.uri).pipe(skipPendingOperation())
37701
- );
37702
- }
37703
- async function workspaceFolderForRepo(repoName) {
37704
- for (const folder2 of workspace.workspaceFolders ?? []) {
37705
- const remoteRepos = await remoteReposForWorkspaceFolder(folder2);
37706
- if (remoteRepos.some((remoteRepo) => remoteRepo === repoName)) {
37707
- return folder2;
37708
- }
37709
- }
37710
- return void 0;
37711
- }
37712
- const _GitHubDotComRepoMetadata = class _GitHubDotComRepoMetadata {
37713
- constructor() {
37714
- __publicField2(this, "cache", /* @__PURE__ */ new Map());
37715
- this.cache.clear();
37716
- const localStorageData = localStorage.getGitHubRepoAccessibility();
37717
- for (const data of localStorageData) {
37718
- this.cache.set(data.repoName, data);
37719
- }
37720
- }
37721
- static getInstance() {
37722
- if (!_GitHubDotComRepoMetadata.instance) {
37723
- _GitHubDotComRepoMetadata.instance = new _GitHubDotComRepoMetadata();
37724
- }
37725
- return _GitHubDotComRepoMetadata.instance;
37726
- }
37727
- getRepoMetadataIfCached(repoBaseName) {
37728
- const normalizedRepoName = this.getNormalizedRepoNameFromBaseRepoName(repoBaseName);
37729
- if (!normalizedRepoName) {
37730
- return void 0;
37731
- }
37732
- return this.cache.get(normalizedRepoName);
37733
- }
37734
- async getRepoMetadataUsingRepoName(repoBaseName, signal2) {
37735
- const repoMetadata = this.getRepoMetadataIfCached(repoBaseName);
37736
- if (repoMetadata) {
37737
- return repoMetadata;
37738
- }
37739
- const repoMetaData = await this.ghMetadataFromGit(repoBaseName, signal2);
37740
- if (repoMetaData) {
37741
- this.updateCachedDataToLocalStorageIfNeeded(repoMetaData);
37742
- }
37743
- return repoMetaData;
37744
- }
37745
- async ghMetadataFromGit(repoBaseName, signal2) {
37746
- const ownerAndRepoName = this.parseOwnerAndRepoName(repoBaseName);
37747
- if (!ownerAndRepoName) {
37748
- return void 0;
37749
- }
37750
- const repoMetaData = await this.queryGitHubApi(
37751
- ownerAndRepoName.owner,
37752
- ownerAndRepoName.repoName,
37753
- signal2
37754
- );
37755
- return repoMetaData;
37756
- }
37757
- async queryGitHubApi(owner2, repoName, signal2) {
37758
- const apiUrl = `https://api.github.com/repos/${owner2}/${repoName}`;
37759
- const normalizedRepoName = this.getNormalizedRepoNameFromOwnerAndRepoName(owner2, repoName);
37760
- const metadata2 = { repoName: normalizedRepoName, isPublic: false, timestamp: Date.now() };
37761
- try {
37762
- const response = await fetch(apiUrl, { method: "HEAD", signal: signal2 });
37763
- metadata2.isPublic = response.ok;
37764
- } catch (error) {
37765
- if (!isAbortError(error)) {
37766
- logDebug(
37767
- "queryGitHubApi",
37768
- "error querying GitHub API (assuming repository is non-public",
37769
- `${owner2}/${repoName}`,
37770
- error
37771
- );
37772
- }
37773
- }
37774
- return metadata2;
37775
- }
37776
- getNormalizedRepoNameFromBaseRepoName(repoBaseName) {
37777
- const ownerAndRepoName = this.parseOwnerAndRepoName(repoBaseName);
37778
- if (!ownerAndRepoName) {
37779
- return void 0;
37780
- }
37781
- return this.getNormalizedRepoNameFromOwnerAndRepoName(
37782
- ownerAndRepoName.owner,
37783
- ownerAndRepoName.repoName
37784
- );
37785
- }
37786
- getNormalizedRepoNameFromOwnerAndRepoName(owner2, repoName) {
37787
- return `github.com/${owner2}/${repoName}`;
37788
- }
37789
- parseOwnerAndRepoName(repoBaseName) {
37790
- const match2 = repoBaseName == null ? void 0 : repoBaseName.match(/github\.com\/([^/]+)\/([^/]+?)(?:\.git)?$/);
37791
- if (!match2) {
37792
- return void 0;
37793
- }
37794
- const [, owner2, repoName] = match2;
37795
- return { owner: owner2, repoName };
37796
- }
37797
- updateCachedDataToLocalStorageIfNeeded(repoMetaData) {
37798
- var _a3;
37799
- if (((_a3 = this.cache.get(repoMetaData.repoName)) == null ? void 0 : _a3.isPublic) === repoMetaData.isPublic) {
37800
- return;
37801
- }
37802
- this.cache.set(repoMetaData.repoName, repoMetaData);
37803
- const repoAccessibilityData = Array.from(this.cache.values()).filter(isDefined);
37804
- localStorage.setGitHubRepoAccessibility(repoAccessibilityData);
37805
- }
37806
- };
37807
- // This class is used to get the metadata from the gitApi.
37808
- __publicField2(_GitHubDotComRepoMetadata, "instance", null);
37809
- let GitHubDotComRepoMetadata = _GitHubDotComRepoMetadata;
37810
- const NO_PUBLIC_METADATA = { isPublic: false, repoMetadata: void 0 };
37811
- const publicRepoMetadataIfAllWorkspaceReposArePublic = remoteReposForAllWorkspaceFolders.pipe(
37812
- map$1((remoteRepos) => isError$3(remoteRepos) ? [] : remoteRepos),
37813
- switchMap$1((remoteRepos) => {
37814
- if (remoteRepos === pendingOperation) {
37815
- return Observable.of(pendingOperation);
37816
- }
37817
- if (remoteRepos.length === 0) {
37818
- return Observable.of(NO_PUBLIC_METADATA);
37819
- }
37820
- return combineLatest$1(
37821
- ...remoteRepos.map(
37822
- (remoteRepo) => promiseFactoryToObservable(
37823
- (signal2) => (
37824
- // This is cached, so it's fast.
37825
- GitHubDotComRepoMetadata.getInstance().getRepoMetadataUsingRepoName(
37826
- remoteRepo.name,
37827
- signal2
37828
- )
37829
- )
37830
- )
37831
- )
37832
- ).pipe(
37833
- map$1((repoMetadatas) => {
37834
- const allReposArePublic = repoMetadatas.length >= 1 && repoMetadatas.every((repoMetadata) => (repoMetadata == null ? void 0 : repoMetadata.isPublic) ?? false);
37835
- return allReposArePublic ? { isPublic: true, repoMetadata: repoMetadatas.filter(isDefined) } : NO_PUBLIC_METADATA;
37836
- }),
37837
- catchError$1((error) => {
37838
- logDebug(
37839
- "publicRepoMetadataIfAllWorkspaceReposArePublic",
37840
- "error getting repository metadata",
37841
- error
37842
- );
37843
- return Observable.of(NO_PUBLIC_METADATA);
37844
- })
37845
- );
37846
- })
37847
- );
37848
37619
  const executeSmartApply = async (args2) => {
37849
37620
  return commands$1.executeCommand("cody.command.smart-apply", args2);
37850
37621
  };
@@ -38016,7 +37787,7 @@ async function getSmartApplyModel(authStatus2) {
38016
37787
  if (isInstantModeEnabled) {
38017
37788
  return SMART_APPLY_MODEL_IDENTIFIERS.FireworksQwenCodeDefault;
38018
37789
  }
38019
- if (isDotCom(authStatus2) || isS2(authStatus2)) {
37790
+ if (isS2(authStatus2)) {
38020
37791
  const defaultModel = "anthropic::2024-10-22::claude-3-5-sonnet-latest";
38021
37792
  return defaultModel;
38022
37793
  }
@@ -38447,17 +38218,6 @@ class UpstreamHealthProvider {
38447
38218
  span2.setAttribute("sampled", true);
38448
38219
  return measureLatencyToUri(upstreamHeaders, url.toString());
38449
38220
  });
38450
- if (isDotCom(auth2.serverEndpoint)) {
38451
- const gatewayHeaders = new Headers(sharedHeaders);
38452
- const uri = "https://cody-gateway.sourcegraph.com/-/__version";
38453
- const gatewayResult = await wrapInActiveSpan("upstream-latency.gateway", (span2) => {
38454
- span2.setAttribute("sampled", true);
38455
- return measureLatencyToUri(gatewayHeaders, uri);
38456
- });
38457
- if (!("error" in gatewayResult)) {
38458
- this.lastGatewayLatency = gatewayResult.latency;
38459
- }
38460
- }
38461
38221
  if ("error" in upstreamResult) {
38462
38222
  this.lastUpstreamLatency = void 0;
38463
38223
  logDebug$1("UpstreamHealth", "Failed to ping upstream host", {
@@ -38557,37 +38317,6 @@ class AutocompleteStageCounter {
38557
38317
  }
38558
38318
  }
38559
38319
  new AutocompleteStageCounter();
38560
- class GitMetadataForCurrentEditor {
38561
- constructor() {
38562
- __publicField2(this, "gitIdentifiersForFile");
38563
- window$1.onDidChangeActiveTextEditor(() => this.updateStatus());
38564
- }
38565
- getGitIdentifiersForFile() {
38566
- if (this.gitIdentifiersForFile === void 0) {
38567
- this.updateStatus().catch(() => {
38568
- });
38569
- }
38570
- return this.gitIdentifiersForFile;
38571
- }
38572
- async updateStatus() {
38573
- var _a3, _b2, _c2;
38574
- let newGitIdentifiersForFile = void 0;
38575
- const currentFile = (_c2 = (_b2 = (_a3 = getEditor()) == null ? void 0 : _a3.active) == null ? void 0 : _b2.document) == null ? void 0 : _c2.uri;
38576
- if (currentFile) {
38577
- const repoName = currentFile ? (await firstResultFromOperation(
38578
- repoNameResolver.getRepoNamesContainingUri(currentFile)
38579
- )).at(0) : void 0;
38580
- const commit2 = gitCommitIdFromGitExtension(currentFile);
38581
- newGitIdentifiersForFile = {
38582
- filePath: displayPathWithoutWorkspaceFolderPrefix(currentFile),
38583
- repoName,
38584
- commit: commit2
38585
- };
38586
- }
38587
- this.gitIdentifiersForFile = newGitIdentifiersForFile;
38588
- }
38589
- }
38590
- const gitMetadataForCurrentEditor = new GitMetadataForCurrentEditor();
38591
38320
  function getLanguageConfig(languageId) {
38592
38321
  switch (languageId) {
38593
38322
  case "astro":
@@ -44420,11 +44149,9 @@ function registerNativeWebviewHandlers(agent2, webviewBundleLocalPrefix, config)
44420
44149
  );
44421
44150
  webviewProtocolDelegate.registerWebview(panel2.handle, {
44422
44151
  didReceiveMessage(message) {
44423
- console.log("[Cody] webviewProtocolDelegate didReceiveMessage");
44424
44152
  panel2.webview.didReceiveMessageEmitter.fire(message);
44425
44153
  },
44426
44154
  didDispose() {
44427
- console.log("[Cody] webviewProtocolDelegate didDispose");
44428
44155
  panel2.didDispose();
44429
44156
  }
44430
44157
  });
@@ -44555,12 +44282,10 @@ class NativeWebviewPanel {
44555
44282
  this.delegate.reveal(this.handle, viewColumn, preserveFocus);
44556
44283
  }
44557
44284
  dispose() {
44558
- console.log("[Cody] dispose weview panel");
44559
44285
  this.delegate.dispose(this.handle);
44560
44286
  }
44561
44287
  // Called when the client disposes the webview.
44562
44288
  didDispose() {
44563
- console.log("[Cody] didDispose weview panel");
44564
44289
  this.disposeEmitter.fire();
44565
44290
  }
44566
44291
  }
@@ -48255,7 +47980,7 @@ class CommandsProvider {
48255
47980
  if (!isFileURI(uri)) {
48256
47981
  throw new Error("history only supported on local file paths");
48257
47982
  }
48258
- const { getContextFileFromGitLog } = await import("./git-log-7kbEzZhk.mjs");
47983
+ const { getContextFileFromGitLog } = await import("./git-log-C0C2_x8P.mjs");
48259
47984
  return getContextFileFromGitLog(uri, options);
48260
47985
  }
48261
47986
  dispose() {
@@ -150783,12 +150508,6 @@ const _ContextRetrieverDataCollection = class _ContextRetrieverDataCollection {
150783
150508
  }
150784
150509
  return dataLoggingContext;
150785
150510
  }
150786
- shouldCollectContextDatapoint() {
150787
- if (!isDotComAuthed() || this.dataCollectionRetrievers.length === 0) {
150788
- return false;
150789
- }
150790
- return true;
150791
- }
150792
150511
  createRetriever(config) {
150793
150512
  switch (config.identifier) {
150794
150513
  case RetrieverIdentifier.RecentEditsRetriever:
@@ -150984,17 +150703,9 @@ class ContextMixer {
150984
150703
  return resultsWithDataLogging.filter((result) => originalIdentifiers.has(result.identifier));
150985
150704
  }
150986
150705
  maybeAddDataLoggingRetrievers(originalRetrievers) {
150987
- const dataCollectionRetrievers = this.getDataCollectionRetrievers();
150988
- const combinedRetrievers = [...originalRetrievers, ...dataCollectionRetrievers];
150706
+ const combinedRetrievers = [...originalRetrievers];
150989
150707
  return dedupeWith$1(combinedRetrievers, "identifier");
150990
150708
  }
150991
- getDataCollectionRetrievers() {
150992
- var _a3;
150993
- if (!((_a3 = this.contextDataCollector) == null ? void 0 : _a3.shouldCollectContextDatapoint())) {
150994
- return [];
150995
- }
150996
- return this.contextDataCollector.dataCollectionRetrievers;
150997
- }
150998
150709
  dispose() {
150999
150710
  for (const disposable of this.disposables) {
151000
150711
  disposable.dispose();
@@ -152278,12 +151989,12 @@ const providerConfigs = {
152278
151989
  function getBaseProviderConfig() {
152279
151990
  const mode = isHotStreakEnabled() ? "hotStreak" : "standard";
152280
151991
  const config = providerModes[mode];
152281
- const authConfig = isDotComAuthed() ? providerConfigs.dotCom : providerConfigs.sgInstance;
151992
+ const authConfig = providerConfigs.sgInstance;
152282
151993
  return {
152283
151994
  ...authConfig,
152284
151995
  promptProvider: config.promptProvider,
152285
151996
  tokenLimit: config.tokenLimit,
152286
- model: isDotComAuthed() ? config.models.dotcom : config.models.sgInstance
151997
+ model: config.models.sgInstance
152287
151998
  };
152288
151999
  }
152289
152000
  function getAutoeditsProviderConfig() {
@@ -154658,8 +154369,8 @@ class AutoeditAnalyticsLogger {
154658
154369
  otherCompletionProviders: otherCompletionProviders2,
154659
154370
  upstreamLatency: upstreamHealthProvider.getUpstreamLatency(),
154660
154371
  gatewayLatency: upstreamHealthProvider.getGatewayLatency(),
154661
- // 🚨 SECURITY: included only for DotCom users.
154662
- codeToRewrite: isDotComAuthed() ? codeToRewrite : void 0,
154372
+ codeToRewrite: void 0,
154373
+ // todo(mk): remove in the scope of PLG sunsetting
154663
154374
  ...restPayload
154664
154375
  }
154665
154376
  };
@@ -154704,8 +154415,8 @@ class AutoeditAnalyticsLogger {
154704
154415
  payload: {
154705
154416
  ...request.payload,
154706
154417
  id: stableId,
154707
- // 🚨 SECURITY: included only for DotCom users.
154708
- prediction: isDotComAuthed() && prediction.length < 300 ? prediction : void 0,
154418
+ prediction: void 0,
154419
+ // todo(mk): remove in the scope of PLG sunsetting
154709
154420
  source,
154710
154421
  isFuzzyMatch,
154711
154422
  responseHeaders: "responseHeaders" in modelResponse ? modelResponse.responseHeaders : {},
@@ -155097,14 +154808,8 @@ class AutoEditBetaOnboarding {
155097
154808
  return localStorage.setAutoeditBetaEnrollment();
155098
154809
  }
155099
154810
  async isUserEligibleForAutoEditFeature() {
155100
- const authStatus2 = currentAuthStatus();
155101
- const productSubscription = await currentUserProductSubscription();
155102
154811
  const autoEditFeatureFlag = this.isAutoEditFeatureFlagEnabled();
155103
- const { isUserEligible } = isUserEligibleForAutoeditsFeature(
155104
- autoEditFeatureFlag,
155105
- authStatus2,
155106
- productSubscription
155107
- );
154812
+ const { isUserEligible } = isUserEligibleForAutoeditsFeature(autoEditFeatureFlag);
155108
154813
  return isUserEligible;
155109
154814
  }
155110
154815
  isAutoEditFeatureFlagEnabled() {
@@ -172584,6 +172289,64 @@ class Fzf {
172584
172289
  this.find = this.finder.find.bind(this.finder);
172585
172290
  }
172586
172291
  }
172292
+ const MAX_REPO_COUNT = 10;
172293
+ const workspaceFolders = fromVSCodeEvent(
172294
+ workspace.onDidChangeWorkspaceFolders
172295
+ ).pipe(
172296
+ startWith$1(void 0),
172297
+ map$1(() => workspace.workspaceFolders)
172298
+ );
172299
+ const remoteReposForAllWorkspaceFolders = combineLatest$1(
172300
+ workspaceFolders.pipe(
172301
+ // The vscode.git extension has a delay before we can fetch a workspace folder's remote.
172302
+ debounceTime(vscodeGitAPI ? 2e3 : 0)
172303
+ ),
172304
+ authStatus
172305
+ ).pipe(
172306
+ switchMapReplayOperation(
172307
+ ([workspaceFolders2]) => {
172308
+ if (!workspaceFolders2 || workspaceFolders2.length === 0) {
172309
+ return Observable.of([]);
172310
+ }
172311
+ return combineLatest$1(
172312
+ ...workspaceFolders2.map((folder2) => repoNameResolver.getRepoNamesContainingUri(folder2.uri))
172313
+ ).pipe(
172314
+ map$1((repoNamesLists) => {
172315
+ const completedResults = repoNamesLists.filter((names) => Array.isArray(names)).flat().filter((name2) => typeof name2 === "string");
172316
+ return completedResults.length > 0 ? completedResults : [];
172317
+ }),
172318
+ abortableOperation(async (repoNames, signal2) => {
172319
+ if (repoNames.length === 0) {
172320
+ return [];
172321
+ }
172322
+ const reposOrError = await graphqlClient.getRepoIds(
172323
+ repoNames,
172324
+ MAX_REPO_COUNT,
172325
+ signal2
172326
+ );
172327
+ if (isError$3(reposOrError)) {
172328
+ throw reposOrError;
172329
+ }
172330
+ return reposOrError;
172331
+ })
172332
+ );
172333
+ }
172334
+ )
172335
+ );
172336
+ async function remoteReposForWorkspaceFolder(folder2) {
172337
+ return firstValueFrom$1(
172338
+ repoNameResolver.getRepoNamesContainingUri(folder2.uri).pipe(skipPendingOperation())
172339
+ );
172340
+ }
172341
+ async function workspaceFolderForRepo(repoName) {
172342
+ for (const folder2 of workspace.workspaceFolders ?? []) {
172343
+ const remoteRepos = await remoteReposForWorkspaceFolder(folder2);
172344
+ if (remoteRepos.some((remoteRepo) => remoteRepo === repoName)) {
172345
+ return folder2;
172346
+ }
172347
+ }
172348
+ return void 0;
172349
+ }
172587
172350
  function starTiebreaker(a, b) {
172588
172351
  return b.item.stars - a.item.stars;
172589
172352
  }
@@ -174679,8 +174442,7 @@ __publicField2(_DeepCodyHandler, "observable", combineLatest$1(
174679
174442
  config
174680
174443
  ]) => {
174681
174444
  var _a3, _b2, _c2, _d2;
174682
- const isDotComUser = isDotCom(auth2.endpoint);
174683
- if (sub2 === pendingOperation || isDotComUser && (sub2 == null ? void 0 : sub2.userCanUpgrade) || !models || isCodyTesting || isDisabledOnInstance || ((_a3 = config.configuration) == null ? void 0 : _a3.chatAgenticContext) === false) {
174445
+ if (sub2 === pendingOperation || !models || isCodyTesting || isDisabledOnInstance || ((_a3 = config.configuration) == null ? void 0 : _a3.chatAgenticContext) === false) {
174684
174446
  _DeepCodyHandler.model = void 0;
174685
174447
  _DeepCodyHandler.isToolboxEnabled = false;
174686
174448
  return null;
@@ -184183,6 +183945,142 @@ class InitDoer {
184183
183945
  });
184184
183946
  }
184185
183947
  }
183948
+ const _GitHubDotComRepoMetadata = class _GitHubDotComRepoMetadata {
183949
+ constructor() {
183950
+ __publicField2(this, "cache", /* @__PURE__ */ new Map());
183951
+ this.cache.clear();
183952
+ const localStorageData = localStorage.getGitHubRepoAccessibility();
183953
+ for (const data of localStorageData) {
183954
+ this.cache.set(data.repoName, data);
183955
+ }
183956
+ }
183957
+ static getInstance() {
183958
+ if (!_GitHubDotComRepoMetadata.instance) {
183959
+ _GitHubDotComRepoMetadata.instance = new _GitHubDotComRepoMetadata();
183960
+ }
183961
+ return _GitHubDotComRepoMetadata.instance;
183962
+ }
183963
+ getRepoMetadataIfCached(repoBaseName) {
183964
+ const normalizedRepoName = this.getNormalizedRepoNameFromBaseRepoName(repoBaseName);
183965
+ if (!normalizedRepoName) {
183966
+ return void 0;
183967
+ }
183968
+ return this.cache.get(normalizedRepoName);
183969
+ }
183970
+ async getRepoMetadataUsingRepoName(repoBaseName, signal2) {
183971
+ const repoMetadata = this.getRepoMetadataIfCached(repoBaseName);
183972
+ if (repoMetadata) {
183973
+ return repoMetadata;
183974
+ }
183975
+ const repoMetaData = await this.ghMetadataFromGit(repoBaseName, signal2);
183976
+ if (repoMetaData) {
183977
+ this.updateCachedDataToLocalStorageIfNeeded(repoMetaData);
183978
+ }
183979
+ return repoMetaData;
183980
+ }
183981
+ async ghMetadataFromGit(repoBaseName, signal2) {
183982
+ const ownerAndRepoName = this.parseOwnerAndRepoName(repoBaseName);
183983
+ if (!ownerAndRepoName) {
183984
+ return void 0;
183985
+ }
183986
+ const repoMetaData = await this.queryGitHubApi(
183987
+ ownerAndRepoName.owner,
183988
+ ownerAndRepoName.repoName,
183989
+ signal2
183990
+ );
183991
+ return repoMetaData;
183992
+ }
183993
+ async queryGitHubApi(owner2, repoName, signal2) {
183994
+ const apiUrl = `https://api.github.com/repos/${owner2}/${repoName}`;
183995
+ const normalizedRepoName = this.getNormalizedRepoNameFromOwnerAndRepoName(owner2, repoName);
183996
+ const metadata2 = { repoName: normalizedRepoName, isPublic: false, timestamp: Date.now() };
183997
+ try {
183998
+ const response = await fetch(apiUrl, { method: "HEAD", signal: signal2 });
183999
+ metadata2.isPublic = response.ok;
184000
+ } catch (error) {
184001
+ if (!isAbortError(error)) {
184002
+ logDebug(
184003
+ "queryGitHubApi",
184004
+ "error querying GitHub API (assuming repository is non-public",
184005
+ `${owner2}/${repoName}`,
184006
+ error
184007
+ );
184008
+ }
184009
+ }
184010
+ return metadata2;
184011
+ }
184012
+ getNormalizedRepoNameFromBaseRepoName(repoBaseName) {
184013
+ const ownerAndRepoName = this.parseOwnerAndRepoName(repoBaseName);
184014
+ if (!ownerAndRepoName) {
184015
+ return void 0;
184016
+ }
184017
+ return this.getNormalizedRepoNameFromOwnerAndRepoName(
184018
+ ownerAndRepoName.owner,
184019
+ ownerAndRepoName.repoName
184020
+ );
184021
+ }
184022
+ getNormalizedRepoNameFromOwnerAndRepoName(owner2, repoName) {
184023
+ return `github.com/${owner2}/${repoName}`;
184024
+ }
184025
+ parseOwnerAndRepoName(repoBaseName) {
184026
+ const match2 = repoBaseName == null ? void 0 : repoBaseName.match(/github\.com\/([^/]+)\/([^/]+?)(?:\.git)?$/);
184027
+ if (!match2) {
184028
+ return void 0;
184029
+ }
184030
+ const [, owner2, repoName] = match2;
184031
+ return { owner: owner2, repoName };
184032
+ }
184033
+ updateCachedDataToLocalStorageIfNeeded(repoMetaData) {
184034
+ var _a3;
184035
+ if (((_a3 = this.cache.get(repoMetaData.repoName)) == null ? void 0 : _a3.isPublic) === repoMetaData.isPublic) {
184036
+ return;
184037
+ }
184038
+ this.cache.set(repoMetaData.repoName, repoMetaData);
184039
+ const repoAccessibilityData = Array.from(this.cache.values()).filter(isDefined);
184040
+ localStorage.setGitHubRepoAccessibility(repoAccessibilityData);
184041
+ }
184042
+ };
184043
+ // This class is used to get the metadata from the gitApi.
184044
+ __publicField2(_GitHubDotComRepoMetadata, "instance", null);
184045
+ let GitHubDotComRepoMetadata = _GitHubDotComRepoMetadata;
184046
+ const NO_PUBLIC_METADATA = { isPublic: false, repoMetadata: void 0 };
184047
+ const publicRepoMetadataIfAllWorkspaceReposArePublic = remoteReposForAllWorkspaceFolders.pipe(
184048
+ map$1((remoteRepos) => isError$3(remoteRepos) ? [] : remoteRepos),
184049
+ switchMap$1((remoteRepos) => {
184050
+ if (remoteRepos === pendingOperation) {
184051
+ return Observable.of(pendingOperation);
184052
+ }
184053
+ if (remoteRepos.length === 0) {
184054
+ return Observable.of(NO_PUBLIC_METADATA);
184055
+ }
184056
+ return combineLatest$1(
184057
+ ...remoteRepos.map(
184058
+ (remoteRepo) => promiseFactoryToObservable(
184059
+ (signal2) => (
184060
+ // This is cached, so it's fast.
184061
+ GitHubDotComRepoMetadata.getInstance().getRepoMetadataUsingRepoName(
184062
+ remoteRepo.name,
184063
+ signal2
184064
+ )
184065
+ )
184066
+ )
184067
+ )
184068
+ ).pipe(
184069
+ map$1((repoMetadatas) => {
184070
+ const allReposArePublic = repoMetadatas.length >= 1 && repoMetadatas.every((repoMetadata) => (repoMetadata == null ? void 0 : repoMetadata.isPublic) ?? false);
184071
+ return allReposArePublic ? { isPublic: true, repoMetadata: repoMetadatas.filter(isDefined) } : NO_PUBLIC_METADATA;
184072
+ }),
184073
+ catchError$1((error) => {
184074
+ logDebug(
184075
+ "publicRepoMetadataIfAllWorkspaceReposArePublic",
184076
+ "error getting repository metadata",
184077
+ error
184078
+ );
184079
+ return Observable.of(NO_PUBLIC_METADATA);
184080
+ })
184081
+ );
184082
+ })
184083
+ );
184186
184084
  class OmniboxTelemetry {
184187
184085
  constructor(baseProperties) {
184188
184086
  __publicField2(this, "intentInfo");
@@ -189263,12 +189161,8 @@ function createAutoEditsProvider({
189263
189161
  promiseFactoryToObservable(async () => await currentUserProductSubscription())
189264
189162
  ).pipe(
189265
189163
  skipPendingOperation(),
189266
- createDisposables(([userProductSubscription2]) => {
189267
- const userEligibilityInfo = isUserEligibleForAutoeditsFeature(
189268
- autoeditFeatureFlagEnabled,
189269
- authStatus2,
189270
- userProductSubscription2
189271
- );
189164
+ createDisposables(() => {
189165
+ const userEligibilityInfo = isUserEligibleForAutoeditsFeature(autoeditFeatureFlagEnabled);
189272
189166
  if (!userEligibilityInfo.isUserEligible) {
189273
189167
  handleAutoeditsNotificationForNonEligibleUser(userEligibilityInfo.nonEligibilityReason);
189274
189168
  return [];
@@ -189329,13 +189223,7 @@ function isSettingsEditorOpen() {
189329
189223
  }
189330
189224
  return activeTab.label === "Settings";
189331
189225
  }
189332
- function isUserEligibleForAutoeditsFeature(autoeditsFeatureFlagEnabled, authStatus2, productSubscription) {
189333
- if (isFreeUser(authStatus2, productSubscription)) {
189334
- return {
189335
- isUserEligible: false,
189336
- nonEligibilityReason: AUTOEDITS_NON_ELIGIBILITY_MESSAGES.PRO_USER_ONLY
189337
- };
189338
- }
189226
+ function isUserEligibleForAutoeditsFeature(autoeditsFeatureFlagEnabled) {
189339
189227
  return {
189340
189228
  isUserEligible: autoeditsFeatureFlagEnabled,
189341
189229
  nonEligibilityReason: autoeditsFeatureFlagEnabled ? void 0 : AUTOEDITS_NON_ELIGIBILITY_MESSAGES.FEATURE_FLAG_NOT_ELIGIBLE
@@ -190623,8 +190511,8 @@ function parseMentionURI(uri) {
190623
190511
  }
190624
190512
  }
190625
190513
  async function execFileAsync(program2, args2, { cwd }) {
190626
- const { promisify } = await import("./util-CCLzYWyF.mjs").then((n) => n.u);
190627
- const { execFile } = await import("./vscode-shim-DpWxvTpJ.mjs").then((n) => n.fR);
190514
+ const { promisify } = await import("./util-C44wiTt8.mjs").then((n) => n.u);
190515
+ const { execFile } = await import("./vscode-shim-H_ThTWLs.mjs").then((n) => n.fO);
190628
190516
  return promisify(execFile)(program2, args2, { cwd });
190629
190517
  }
190630
190518
  var __create = Object.create;
@@ -193143,6 +193031,37 @@ class EditGuardrails {
193143
193031
  }
193144
193032
  }
193145
193033
  }
193034
+ class GitMetadataForCurrentEditor {
193035
+ constructor() {
193036
+ __publicField2(this, "gitIdentifiersForFile");
193037
+ window$1.onDidChangeActiveTextEditor(() => this.updateStatus());
193038
+ }
193039
+ getGitIdentifiersForFile() {
193040
+ if (this.gitIdentifiersForFile === void 0) {
193041
+ this.updateStatus().catch(() => {
193042
+ });
193043
+ }
193044
+ return this.gitIdentifiersForFile;
193045
+ }
193046
+ async updateStatus() {
193047
+ var _a3, _b2, _c2;
193048
+ let newGitIdentifiersForFile = void 0;
193049
+ const currentFile = (_c2 = (_b2 = (_a3 = getEditor()) == null ? void 0 : _a3.active) == null ? void 0 : _b2.document) == null ? void 0 : _c2.uri;
193050
+ if (currentFile) {
193051
+ const repoName = currentFile ? (await firstResultFromOperation(
193052
+ repoNameResolver.getRepoNamesContainingUri(currentFile)
193053
+ )).at(0) : void 0;
193054
+ const commit2 = gitCommitIdFromGitExtension(currentFile);
193055
+ newGitIdentifiersForFile = {
193056
+ filePath: displayPathWithoutWorkspaceFolderPrefix(currentFile),
193057
+ repoName,
193058
+ commit: commit2
193059
+ };
193060
+ }
193061
+ this.gitIdentifiersForFile = newGitIdentifiersForFile;
193062
+ }
193063
+ }
193064
+ const gitMetadataForCurrentEditor = new GitMetadataForCurrentEditor();
193146
193065
  const MAX_LOGGING_PAYLOAD_SIZE_BYTES = 1024 * 1024;
193147
193066
  class EditLoggingFeatureFlagManager {
193148
193067
  constructor() {
@@ -193316,7 +193235,7 @@ function getEditLoggingContext(param) {
193316
193235
  }
193317
193236
  function shouldLogEditContextItem(payload, isFeatureFlagEnabledForLogging) {
193318
193237
  const authStatus2 = currentAuthStatus();
193319
- if ((isDotComAuthed() || isS2(authStatus2)) && isFeatureFlagEnabledForLogging) {
193238
+ if (isS2(authStatus2) && isFeatureFlagEnabledForLogging) {
193320
193239
  const payloadSize = calculatePayloadSizeInBytes(payload);
193321
193240
  return payloadSize !== void 0 && payloadSize < MAX_LOGGING_PAYLOAD_SIZE_BYTES;
193322
193241
  }
@@ -198961,8 +198880,7 @@ const _CodyStatusBar = class _CodyStatusBar {
198961
198880
  this.errors.changes,
198962
198881
  this.loaders.changes,
198963
198882
  this.ignoreStatus,
198964
- featureFlagProvider.evaluatedFeatureFlag(FeatureFlag.CodyAutoEditExperimentEnabledFeatureFlag),
198965
- promiseFactoryToObservable(async () => await currentUserProductSubscription())
198883
+ featureFlagProvider.evaluatedFeatureFlag(FeatureFlag.CodyAutoEditExperimentEnabledFeatureFlag)
198966
198884
  ).pipe(
198967
198885
  map$1((combined) => {
198968
198886
  return {
@@ -199111,7 +199029,7 @@ const _CodyStatusBar = class _CodyStatusBar {
199111
199029
  assertUnreachable(newState.style);
199112
199030
  }
199113
199031
  }
199114
- buildState(authStatus2, config, errors, loaders, ignoreStatus, autoeditsFeatureFlagEnabled, userProductSubscription2) {
199032
+ buildState(authStatus2, config, errors, loaders, ignoreStatus, autoeditsFeatureFlagEnabled) {
199115
199033
  const tags = /* @__PURE__ */ new Set();
199116
199034
  if (authStatus2.authenticated) {
199117
199035
  tags.add(InvisibleStatusBarTag.IsAuthenticated);
@@ -199155,9 +199073,7 @@ const _CodyStatusBar = class _CodyStatusBar {
199155
199073
  config,
199156
199074
  errors,
199157
199075
  isIgnored: ignoreStatus,
199158
- autoeditsFeatureFlagEnabled,
199159
- userProductSubscription: userProductSubscription2,
199160
- authStatus: authStatus2
199076
+ autoeditsFeatureFlagEnabled
199161
199077
  })
199162
199078
  };
199163
199079
  }
@@ -199190,9 +199106,7 @@ const _CodyStatusBar = class _CodyStatusBar {
199190
199106
  config,
199191
199107
  errors,
199192
199108
  isIgnored: ignoreStatus,
199193
- autoeditsFeatureFlagEnabled,
199194
- userProductSubscription: userProductSubscription2,
199195
- authStatus: authStatus2
199109
+ autoeditsFeatureFlagEnabled
199196
199110
  })
199197
199111
  };
199198
199112
  }
@@ -199207,9 +199121,7 @@ const _CodyStatusBar = class _CodyStatusBar {
199207
199121
  config,
199208
199122
  errors,
199209
199123
  isIgnored: ignoreStatus,
199210
- autoeditsFeatureFlagEnabled,
199211
- userProductSubscription: userProductSubscription2,
199212
- authStatus: authStatus2
199124
+ autoeditsFeatureFlagEnabled
199213
199125
  })
199214
199126
  };
199215
199127
  }
@@ -199219,9 +199131,7 @@ const _CodyStatusBar = class _CodyStatusBar {
199219
199131
  config,
199220
199132
  errors,
199221
199133
  isIgnored: ignoreStatus,
199222
- autoeditsFeatureFlagEnabled,
199223
- userProductSubscription: userProductSubscription2,
199224
- authStatus: authStatus2
199134
+ autoeditsFeatureFlagEnabled
199225
199135
  })
199226
199136
  };
199227
199137
  }
@@ -199247,9 +199157,7 @@ function interactDefault({
199247
199157
  config,
199248
199158
  errors,
199249
199159
  isIgnored,
199250
- autoeditsFeatureFlagEnabled,
199251
- userProductSubscription: userProductSubscription2,
199252
- authStatus: authStatus2
199160
+ autoeditsFeatureFlagEnabled
199253
199161
  }) {
199254
199162
  return async (abort2) => {
199255
199163
  var _a3;
@@ -199327,12 +199235,7 @@ function interactDefault({
199327
199235
  }
199328
199236
  ),
199329
199237
  { label: currentSuggestionMode, kind: QuickPickItemKind.Separator },
199330
- await createFeatureEnumChoice(
199331
- "Code Suggestion Settings",
199332
- autoeditsFeatureFlagEnabled,
199333
- userProductSubscription2,
199334
- authStatus2
199335
- ),
199238
+ await createFeatureEnumChoice("Code Suggestion Settings", autoeditsFeatureFlagEnabled),
199336
199239
  { label: "settings", kind: QuickPickItemKind.Separator },
199337
199240
  {
199338
199241
  label: "$(gear) Cody Extension Settings",
@@ -199400,13 +199303,9 @@ function interactDefault({
199400
199303
  };
199401
199304
  }
199402
199305
  function featureCodySuggestionEnumBuilder(workspaceConfig) {
199403
- return async (name2, autoeditsFeatureFlagEnabled, userProductSubscription2, authStatus2) => {
199306
+ return async (name2, autoeditsFeatureFlagEnabled) => {
199404
199307
  const currentSuggestionMode = await getCurrentCodySuggestionMode(workspaceConfig);
199405
- const { isUserEligible } = isUserEligibleForAutoeditsFeature(
199406
- autoeditsFeatureFlagEnabled,
199407
- authStatus2,
199408
- userProductSubscription2
199409
- );
199308
+ const { isUserEligible } = isUserEligibleForAutoeditsFeature(autoeditsFeatureFlagEnabled);
199410
199309
  const suggestionModes = [
199411
199310
  {
199412
199311
  label: "Autocomplete",