@sourcegraph/cody-web 0.25.0 → 0.27.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 _a2, _b, _constructing, _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_fn, moveToTail_fn, _c, _d, _e, _f, _g, _h, _constructing2, _i, _j, _max2, _maxSize2, _dispose2, _disposeAfter2, _fetchMethod2, _size2, _calculatedSize2, _keyMap2, _keyList2, _valList2, _next2, _prev2, _head2, _tail2, _free2, _disposed2, _sizes2, _starts2, _ttls2, _hasDispose2, _hasFetchMethod2, _hasDisposeAfter2, _LRUCache_instances2, initializeTTLTracking_fn2, _updateItemAge2, _statusTTL2, _setItemTTL2, _isStale2, initializeSizeTracking_fn2, _removeItemSize2, _addItemSize2, _requireSize2, indexes_fn2, rindexes_fn2, isValidIndex_fn2, evict_fn2, backgroundFetch_fn2, isBackgroundFetch_fn2, connect_fn2, moveToTail_fn2, _k, _l, _m;
21
- import { b3 as Observable, c9 as unsubscribe, ca as AsyncSerialScheduler, cb as MulticastSubject, bS as firstValueFrom$1, bU as skipPendingOperation, cc as authStatus, cd as debounceTime, ce as switchMapReplayOperation, cf as interval, cg as map$1, ch as filter$2, ci as startWith$1, cj as switchMap$1, ck as promiseFactoryToObservable, bt as isError$3, cl as distinctUntilChanged$1, cm as logDebug$1, cn as graphqlClient, co as isAbortError, cp as logError$2, cq as semver, cr as pendingOperation, cs as pick, bD as ModelTag, ct as getModelInfo, c0 as CHAT_INPUT_TOKEN_BUDGET, cu as CHAT_OUTPUT_TOKEN_BUDGET, cv as EXTENDED_CHAT_INPUT_TOKEN_BUDGET, cw as EXTENDED_USER_CONTEXT_TOKEN_BUDGET, cx as createSubscriber, cy as fromVSCodeEvent, ba as isEqual, cz as cenv, bi as isDotCom, cA as currentAuthStatus, cB as isFileURI, w as wrapInActiveSpan, cC as INCLUDE_EVERYTHING_CONTEXT_FILTERS, cD as EXCLUDE_EVERYTHING_CONTEXT_FILTERS, cE as onAbort, cF as addCodyClientIdentificationHeaders, cG as addTraceparent, cH as addAuthHeaders, cI as fetch$3, cJ as verifyResponseCode, bn as FeatureFlag, cK as combineLatest$1, cL as take$2, cM as clientCapabilities, cN as shareReplay$1, cO as tap$2, cP as featureFlagProvider, cQ as getEnterpriseContextWindow, cR as ANSWER_TOKENS, cS as storeLastValue, cT as resolvedConfig, cU as userProductSubscription, bO as firstResultFromOperation, cV as isEnterpriseUser, bp as isCodyProUser, d as ps, cW as currentResolvedConfig, c5 as PromptString, bq as CodyIDE, cX as isCustomModel, cY as recordErrorToSpan, cZ as addClientInfoParams, c_ as dependentAbortController, az as FILE_CONTEXT_MENTION_PROVIDER, aA as SYMBOL_CONTEXT_MENTION_PROVIDER, aB as REMOTE_REPOSITORY_PROVIDER_URI, aC as REMOTE_FILE_PROVIDER_URI, aD as REMOTE_DIRECTORY_PROVIDER_URI, aE as WEB_PROVIDER_URI, t as telemetryRecorder, C as ContextItemSource, by as lodashExports, c$ as truncatePromptString, d0 as isS2, d1 as GIT_OPENCTX_PROVIDER_URI, bs as cryptoJsExports, d2 as openCtx, aS as URI, d3 as AsyncSerialScheduler_1, i as getDefaultExportFromCjs, b as workspace, p as path, d4 as vscode, R as Range, c as commands$1, a as window$1, d5 as Selection, U as Uri, d6 as AgentEventEmitter, d7 as MarkdownString, g as Disposable, d8 as TextEditorRevealType, d9 as ThemeIcon, da as StatusBarAlignment, db as readFile, dc as env, dd as UIKind, l as languages$1, de as base64Js, h as commonjsGlobal, df as _baseAssignValue, dg as eq_1, dh as isArrayLike_1, di as isObjectLike_1, dj as _copyObject, dk as keysIn_1, dl as _cloneBufferExports, dm as _cloneTypedArray, dn as _copyArray, dp as _initCloneObject, dq as isArguments_1, dr as isArray_1, ds as isBufferExports, dt as isFunction_1, du as isObject_1, dv as isPlainObject_1, dw as isTypedArray_1, dx as _Stack, dy as identity_1, dz as _overRest, dA as _setToString, dB as _isIndex, bj as isSourcegraphToken, dC as v4, dD as CONFIG_KEY, c3 as CodyAutoSuggestionMode, dE as ConfigurationTarget, dF as pathBrowserify, dG as stat, dH as extensions, dI as version$2, dJ as setExtensionVersion, dK as withLatestFrom, dL as NEVER, dM as abortableOperation, dN as disposableSubscription, dO as setAuthStatusObservable, dP as DOTCOM_URL, dQ as normalizeServerEndpointURL, dR as ProgressLocation, dS as SourcegraphGraphQLAPIClient, dT as isExternalProviderAuthError, dU as isNetworkLikeError, dV as resolveAuth, dW as QuickPickItemKind, dX as getAuthErrorMessage, dY as isWorkspaceInstance, dZ as SUPPORTED_URI_SCHEMAS, d_ as _baseIsEqual, d$ as keys_1, e0 as _baseGet, e1 as _castPath, e2 as isLength_1, e3 as _toKey, e4 as _isKey, e5 as toNumber_1, e6 as _baseFindIndex, e7 as require$$1$4, e8 as NetworkError, e9 as isRateLimitError, ea as isAuthError, eb as FileType, e as dedent$1, ec as FoldingRange, ed as CancellationTokenSource, ee as SymbolKind, ef as convertGitCloneURLToCodebaseName, bw as isDefined, eg as pluck, eh as TokenCounterUtils, ei as toRangeData, P as Position, ej as DefaultChatCommands, ek as pathFunctionsForURI, el as uriParseNameAndExtension, em as uriDirname, en as Utils$1, eo as uriExtname, ep as uriBasename, eq as DefaultEditCommands, er as subscriptionDisposable, es as NoOpTelemetryRecorderProvider, et as TimestampTelemetryProcessor_1, eu as updateGlobalTelemetryInstances, ev as TelemetryRecorderProvider, ew as telemetryRecorderProvider, ex as createGitDiff, ey as catchError$1, ez as AgentWorkspaceEdit, eA as TextDocumentChangeReason, eB as omit$1, eC as displayPathWithoutWorkspaceFolderPrefix, eD as getEditorInsertSpaces, eE as escapeRegExp$1, eF as isNetworkError, bK as isCodyProModel, eG as http, eH as open, br as CodyTaskState, f as CodeLens, eI as defaultWebviewPanel, b4 as createExtensionAPI, b5 as createMessageAPIForWebview, eJ as EndOfLine, eK as ViewColumn, eL as Location, eM as onDidChangeActiveTextEditor, eN as tabGroups, eO as workspaceTextDocuments, eP as visibleTextEditors, eQ as onDidChangeVisibleTextEditors, eR as fs, eS as onDidCloseTextDocument, eT as setCreateWebviewPanel, eU as getAugmentedNamespace, eV as extensionConfiguration, eW as main, eX as setAgent, eY as setWorkspaceDocuments, eZ as onDidRegisterNewCodeActionProvider, e_ as onDidUnregisterNewCodeActionProvider, e$ as onDidRegisterNewCodeLensProvider, f0 as onDidUnregisterNewCodeLensProvider, f1 as setClientInfo, f2 as AgentWorkspaceConfiguration, f3 as firstNonPendingAuthStatus, f4 as setWorkspaceFolders, f5 as onDidChangeWorkspaceFolders, f6 as onDidChangeWindowState, f7 as onDidOpenTextDocument, f8 as onDidSaveTextDocument, f9 as packageJson, fa as progressBars, fb as CodeActionTriggerKind, fc as CodeAction, fd as UriString, D as DiagnosticSeverity, fe as diagnostics, ff as isIntegrationTesting, fg as TESTING_TELEMETRY_EXPORTER, fh as dist, fi as completionProvider, fj as InlineCompletionTriggerKind, fk as checkIfEnterpriseUser, fl as currentAuthStatusAuthed, fm as waitUntilComplete, fn as setExtensionConfiguration, fo as onDidChangeConfiguration, fp as onDidChangeTextDocument, fq as onDidChangeTextEditorSelection, fr as workspaceFolders$1, fs as isTokenOrEndpointChange, bN as isMacOS, ft as QuickInputButtons, bI as CustomCommandType, fu as RelativePattern, c6 as setDisplayPathEnvInfo, fv as isWindows, fw as currentAuthStatusOrNotReadyYet, fx as currentUserProductSubscription, bQ as ACCOUNT_USAGE_URL, b6 as debounce$1, aF as displayPath, fy as structuredPatch, fz as isDotComAuthed, fA as dedupeWith$1, fB as AbortError, fC as TimeoutError, fD as createDisposables, fE as getClientInfoQueryParams, fF as tracer, fG as getClientIdentificationHeaders, fH as logResponseHeadersToSpan, fI as getActiveTraceAndSpanId, fJ as TracedError, fK as isNodeResponse, bm as SpanStatusCode, bu as RateLimitError$2, fL as capitalize, fM as createTwoFilesPatch, T as ThemeColor, fN as getEditorTabSize$1, fO as InlineCompletionItem, fP as isFreeUser, fQ as exec, fR as _baseGetTag, fS as truncateTextNearestLine, fT as MAX_BYTES_PER_FILE, fU as debounce_1, c4 as isErrorLike, fV as mentionProvidersMetadata, fW as expandToLineRange, aI as displayPathBasename, aG as displayLineRange, fX as TokenCounter, b0 as parseMentionQuery, fY as openCtxProviderMetadata, fZ as editorStateFromPromptString, f_ as getTokenCounterUtils, f$ as inputTextWithoutContextChipsFromPromptEditorState, bC as isAbortErrorOrSocketHangUp, g0 as PromptMode, g1 as skip$1, bl as context, g2 as extractContextFromTraceparent, bW as inputTextWithMappedContextChipsFromPromptEditorState, g3 as isContextWindowLimitError, bg as forceHydration, bB as reformatBotMessageForChat, bh as hydrateAfterPostMessage, g4 as addMessageListenersForExtensionAPI, g5 as createMessageAPIForExtension, bJ as View, g6 as CODY_BLOG_URL_o1_WAITLIST, g7 as CODY_PASSTHROUGH_VSCODE_OPEN_COMMAND_ID, g8 as CodeActionKind, bH as pluralize, g9 as assertFileURI, ga as setOpenCtx, gb as createCodeSearchProvider, gc as CODE_SEARCH_PROVIDER_URI, gd as psDedent, ge as DecorationRangeBehavior, gf as languageFromFilename, gg as ProgrammingLanguage, gh as truncatePromptStringStart, gi as MAX_CURRENT_FILE_TOKENS, gj as posixFilePaths, gk as SURROUNDING_LINES, gl as ACCOUNT_UPGRADE_URL, bb as scanForMentionTriggerInUserTextInput, aK as LARGE_FILE_WARNING_LABEL, gm as GENERAL_HELP_LABEL, gn as diffLines, go as CODY_SUPPORT_URL, gp as CODY_DOC_URL, bv as CODY_FEEDBACK_URL, gq as DISCORD_URL, bM as getRelativeChatPeriod, gr as globalAgentRef, gs as VSCODE_CHANGELOG_URL, gt as SG_CHANGELOG_URL, gu as ACCOUNT_LIMITS_INFO_URL, gv as assertUnreachable, gw as promise, gx as ExtensionMode, gy as setLogger, gz as setClientCapabilities, gA as setResolvedConfigurationObservable, gB as _, gC as setClientNameVersion, gD as CODY_OLLAMA_DOCS_URL, c2 as browser$2 } from "./vscode-shim-n3ps9Fur.mjs";
22
- import { r as requireUtil, i as inherits_browserExports, a as utilExports } from "./util-CP7jPCzd.mjs";
21
+ import { b3 as Observable, c9 as unsubscribe, ca as AsyncSerialScheduler, cb as MulticastSubject, bS as firstValueFrom$1, bU as skipPendingOperation, cc as authStatus, cd as debounceTime, ce as switchMapReplayOperation, cf as interval, cg as map$1, ch as filter$2, ci as startWith$1, cj as switchMap$1, ck as promiseFactoryToObservable, bt as isError$3, cl as distinctUntilChanged$1, cm as logDebug$1, cn as graphqlClient, co as isAbortError, cp as logError$2, cq as semver, cr as pendingOperation, cs as pick, bD as ModelTag, ct as getModelInfo, c0 as CHAT_INPUT_TOKEN_BUDGET, cu as CHAT_OUTPUT_TOKEN_BUDGET, cv as EXTENDED_CHAT_INPUT_TOKEN_BUDGET, cw as EXTENDED_USER_CONTEXT_TOKEN_BUDGET, cx as createSubscriber, cy as fromVSCodeEvent, ba as isEqual, cz as cenv, bi as isDotCom, cA as currentAuthStatus, cB as isFileURI, w as wrapInActiveSpan, cC as INCLUDE_EVERYTHING_CONTEXT_FILTERS, cD as EXCLUDE_EVERYTHING_CONTEXT_FILTERS, cE as onAbort, cF as addCodyClientIdentificationHeaders, cG as addTraceparent, cH as addAuthHeaders, cI as fetch$3, cJ as verifyResponseCode, bn as FeatureFlag, cK as combineLatest$1, cL as take$2, cM as clientCapabilities, cN as shareReplay$1, cO as tap$2, cP as featureFlagProvider, cQ as getEnterpriseContextWindow, cR as ANSWER_TOKENS, cS as storeLastValue, cT as resolvedConfig, cU as userProductSubscription, bO as firstResultFromOperation, cV as isEnterpriseUser, bp as isCodyProUser, d as ps, cW as currentResolvedConfig, c5 as PromptString, bq as CodyIDE, cX as isCustomModel, cY as recordErrorToSpan, cZ as addClientInfoParams, c_ as dependentAbortController, az as FILE_CONTEXT_MENTION_PROVIDER, aA as SYMBOL_CONTEXT_MENTION_PROVIDER, aB as REMOTE_REPOSITORY_PROVIDER_URI, aC as REMOTE_FILE_PROVIDER_URI, aD as REMOTE_DIRECTORY_PROVIDER_URI, aE as WEB_PROVIDER_URI, t as telemetryRecorder, C as ContextItemSource, by as lodashExports, c$ as truncatePromptString, d0 as isS2, d1 as GIT_OPENCTX_PROVIDER_URI, bs as cryptoJsExports, d2 as openCtx, aS as URI, d3 as AsyncSerialScheduler_1, i as getDefaultExportFromCjs, b as workspace, p as path, d4 as vscode, R as Range, c as commands$1, a as window$1, d5 as Selection, U as Uri, d6 as AgentEventEmitter, d7 as MarkdownString, g as Disposable, d8 as TextEditorRevealType, d9 as ThemeIcon, da as StatusBarAlignment, db as readFile, dc as env, dd as UIKind, l as languages$1, de as base64Js, h as commonjsGlobal, df as _baseAssignValue, dg as eq_1, dh as isArrayLike_1, di as isObjectLike_1, dj as _copyObject, dk as keysIn_1, dl as _cloneBufferExports, dm as _cloneTypedArray, dn as _copyArray, dp as _initCloneObject, dq as isArguments_1, dr as isArray_1, ds as isBufferExports, dt as isFunction_1, du as isObject_1, dv as isPlainObject_1, dw as isTypedArray_1, dx as _Stack, dy as identity_1, dz as _overRest, dA as _setToString, dB as _isIndex, bj as isSourcegraphToken, dC as v4, dD as CONFIG_KEY, c3 as CodyAutoSuggestionMode, dE as ConfigurationTarget, dF as pathBrowserify, dG as stat, dH as extensions, dI as version$2, dJ as setExtensionVersion, dK as withLatestFrom, dL as NEVER, dM as abortableOperation, dN as disposableSubscription, dO as setAuthStatusObservable, dP as DOTCOM_URL, dQ as normalizeServerEndpointURL, dR as ProgressLocation, dS as SourcegraphGraphQLAPIClient, dT as isExternalProviderAuthError, dU as isNetworkLikeError, dV as resolveAuth, dW as QuickPickItemKind, dX as getAuthErrorMessage, dY as isWorkspaceInstance, dZ as SUPPORTED_URI_SCHEMAS, d_ as _baseIsEqual, d$ as keys_1, e0 as _baseGet, e1 as _castPath, e2 as isLength_1, e3 as _toKey, e4 as _isKey, e5 as toNumber_1, e6 as _baseFindIndex, e7 as require$$1$4, e8 as NetworkError, e9 as isRateLimitError, ea as isAuthError, eb as FileType, e as dedent$1, ec as FoldingRange, ed as CancellationTokenSource, ee as SymbolKind, ef as convertGitCloneURLToCodebaseName, bw as isDefined, eg as pluck, eh as TokenCounterUtils, ei as toRangeData, P as Position, ej as DefaultChatCommands, ek as pathFunctionsForURI, el as uriParseNameAndExtension, em as uriDirname, en as Utils$1, eo as uriExtname, ep as uriBasename, eq as DefaultEditCommands, er as subscriptionDisposable, es as NoOpTelemetryRecorderProvider, et as TimestampTelemetryProcessor_1, eu as updateGlobalTelemetryInstances, ev as TelemetryRecorderProvider, ew as telemetryRecorderProvider, ex as createGitDiff, ey as catchError$1, ez as AgentWorkspaceEdit, eA as TextDocumentChangeReason, eB as omit$1, eC as displayPathWithoutWorkspaceFolderPrefix, eD as getEditorInsertSpaces, eE as escapeRegExp$1, eF as isNetworkError, bK as isCodyProModel, eG as http, eH as open, br as CodyTaskState, f as CodeLens, eI as defaultWebviewPanel, b4 as createExtensionAPI, b5 as createMessageAPIForWebview, eJ as EndOfLine, eK as ViewColumn, eL as Location, eM as onDidChangeActiveTextEditor, eN as tabGroups, eO as workspaceTextDocuments, eP as visibleTextEditors, eQ as onDidChangeVisibleTextEditors, eR as fs, eS as onDidCloseTextDocument, eT as setCreateWebviewPanel, eU as getAugmentedNamespace, eV as extensionConfiguration, eW as main, eX as setAgent, eY as setWorkspaceDocuments, eZ as onDidRegisterNewCodeActionProvider, e_ as onDidUnregisterNewCodeActionProvider, e$ as onDidRegisterNewCodeLensProvider, f0 as onDidUnregisterNewCodeLensProvider, f1 as setClientInfo, f2 as AgentWorkspaceConfiguration, f3 as firstNonPendingAuthStatus, f4 as setWorkspaceFolders, f5 as onDidChangeWorkspaceFolders, f6 as onDidChangeWindowState, f7 as onDidOpenTextDocument, f8 as onDidSaveTextDocument, f9 as packageJson, fa as progressBars, fb as CodeActionTriggerKind, fc as CodeAction, fd as UriString, D as DiagnosticSeverity, fe as diagnostics, ff as isIntegrationTesting, fg as TESTING_TELEMETRY_EXPORTER, fh as dist, fi as completionProvider, fj as InlineCompletionTriggerKind, fk as checkIfEnterpriseUser, fl as currentAuthStatusAuthed, fm as waitUntilComplete, fn as setExtensionConfiguration, fo as onDidChangeConfiguration, fp as onDidChangeTextDocument, fq as onDidChangeTextEditorSelection, fr as workspaceFolders$1, fs as isTokenOrEndpointChange, bN as isMacOS, ft as QuickInputButtons, bI as CustomCommandType, fu as RelativePattern, c6 as setDisplayPathEnvInfo, fv as isWindows, fw as currentAuthStatusOrNotReadyYet, fx as currentUserProductSubscription, bQ as ACCOUNT_USAGE_URL, b6 as debounce$1, aF as displayPath, fy as structuredPatch, fz as isDotComAuthed, fA as dedupeWith$1, fB as AbortError, fC as TimeoutError, fD as createDisposables, fE as getClientInfoQueryParams, fF as tracer, fG as getClientIdentificationHeaders, fH as logResponseHeadersToSpan, fI as getActiveTraceAndSpanId, fJ as TracedError, fK as isNodeResponse, bm as SpanStatusCode, bu as RateLimitError$2, fL as capitalize, fM as createTwoFilesPatch, T as ThemeColor, fN as getEditorTabSize$1, fO as InlineCompletionItem, fP as isFreeUser, fQ as exec, fR as _baseGetTag, fS as truncateTextNearestLine, fT as MAX_BYTES_PER_FILE, fU as debounce_1, c4 as isErrorLike, fV as mentionProvidersMetadata, fW as expandToLineRange, aI as displayPathBasename, aG as displayLineRange, fX as TokenCounter, b0 as parseMentionQuery, fY as openCtxProviderMetadata, fZ as editorStateFromPromptString, f_ as getTokenCounterUtils, f$ as inputTextWithoutContextChipsFromPromptEditorState, bC as isAbortErrorOrSocketHangUp, g0 as PromptMode, g1 as skip$1, bl as context, g2 as extractContextFromTraceparent, bW as inputTextWithMappedContextChipsFromPromptEditorState, g3 as isContextWindowLimitError, bg as forceHydration, bB as reformatBotMessageForChat, bh as hydrateAfterPostMessage, g4 as addMessageListenersForExtensionAPI, g5 as createMessageAPIForExtension, bJ as View, g6 as CODY_BLOG_URL_o1_WAITLIST, g7 as CODY_PASSTHROUGH_VSCODE_OPEN_COMMAND_ID, g8 as CodeActionKind, bH as pluralize, g9 as assertFileURI, ga as setOpenCtx, gb as createCodeSearchProvider, gc as CODE_SEARCH_PROVIDER_URI, gd as psDedent, ge as DecorationRangeBehavior, gf as languageFromFilename, gg as ProgrammingLanguage, gh as truncatePromptStringStart, gi as MAX_CURRENT_FILE_TOKENS, gj as posixFilePaths, gk as SURROUNDING_LINES, gl as ACCOUNT_UPGRADE_URL, bb as scanForMentionTriggerInUserTextInput, aK as LARGE_FILE_WARNING_LABEL, gm as GENERAL_HELP_LABEL, gn as diffLines, go as CODY_SUPPORT_URL, gp as CODY_DOC_URL, bv as CODY_FEEDBACK_URL, gq as DISCORD_URL, bM as getRelativeChatPeriod, gr as globalAgentRef, gs as VSCODE_CHANGELOG_URL, gt as SG_CHANGELOG_URL, gu as ACCOUNT_LIMITS_INFO_URL, gv as assertUnreachable, gw as promise, gx as ExtensionMode, gy as setLogger, gz as setClientCapabilities, gA as setResolvedConfigurationObservable, gB as _, gC as setClientNameVersion, gD as CODY_OLLAMA_DOCS_URL, c2 as browser$2 } from "./vscode-shim-C0OSx8EN.mjs";
22
+ import { r as requireUtil, i as inherits_browserExports, a as utilExports } from "./util-BS4yM3h5.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");
@@ -771,7 +771,9 @@ const _ClientConfigSingleton = class _ClientConfigSingleton {
771
771
  // linear.app/sourcegraph/issue/CODY-3745/codys-background-periodic-network-access-causes-2fa.
772
772
  filter$2((_value) => editorWindowIsFocused()),
773
773
  startWith$1(void 0),
774
- switchMap$1(() => promiseFactoryToObservable((signal2) => this.fetchConfig(signal2)))
774
+ switchMap$1(
775
+ () => promiseFactoryToObservable((signal2) => this.fetchConfig(authStatus2, signal2))
776
+ )
775
777
  ) : Observable.of(void 0)
776
778
  ),
777
779
  map$1((value) => isError$3(value) ? void 0 : value),
@@ -809,7 +811,7 @@ const _ClientConfigSingleton = class _ClientConfigSingleton {
809
811
  async getConfig(signal2) {
810
812
  return await firstValueFrom$1(this.changes.pipe(skipPendingOperation()), signal2);
811
813
  }
812
- async fetchConfig(signal2) {
814
+ async fetchConfig(authStatus2, signal2) {
813
815
  logDebug$1("ClientConfigSingleton", "refreshing configuration");
814
816
  try {
815
817
  const siteVersion2 = await graphqlClient.getSiteVersion(signal2);
@@ -829,7 +831,8 @@ const _ClientConfigSingleton = class _ClientConfigSingleton {
829
831
  } else {
830
832
  const insiderBuild = siteVersion2.length > 12 || siteVersion2.includes("dev");
831
833
  supportsClientConfig = insiderBuild || !semver.lt(siteVersion2, "5.5.0");
832
- omniBoxEnabled = insiderBuild || semver.gte(siteVersion2, "6.0.0");
834
+ const isDotCom2 = !authStatus2.authenticated || authStatus2.endpoint.startsWith("https://sourcegraph.com");
835
+ omniBoxEnabled = !isDotCom2 && (insiderBuild || semver.gte(siteVersion2, "6.0.0"));
833
836
  }
834
837
  signal2 == null ? void 0 : signal2.throwIfAborted();
835
838
  const clientConfig = await (supportsClientConfig ? this.fetchConfigEndpoint(signal2) : this.fetchClientConfigLegacy(signal2));
@@ -837,15 +840,17 @@ const _ClientConfigSingleton = class _ClientConfigSingleton {
837
840
  logDebug$1("ClientConfigSingleton", "refreshed", JSON.stringify(clientConfig));
838
841
  return Promise.all([
839
842
  graphqlClient.viewerSettings(signal2),
840
- graphqlClient.temporarySettings(signal2)
841
- ]).then(([viewerSettings, temporarySettings]) => {
843
+ graphqlClient.temporarySettings(signal2),
844
+ graphqlClient.codeSearchEnabled(signal2)
845
+ ]).then(([viewerSettings, temporarySettings, codeSearchEnabled]) => {
842
846
  const config = {
843
847
  ...clientConfig,
844
848
  intentDetection: "enabled",
845
849
  notices: [],
846
850
  temporarySettings: {},
847
851
  siteVersion: isError$3(siteVersion2) ? void 0 : siteVersion2,
848
- omniBoxEnabled
852
+ omniBoxEnabled,
853
+ codeSearchEnabled: isError$3(codeSearchEnabled) ? true : codeSearchEnabled
849
854
  };
850
855
  if (!isError$3(viewerSettings)) {
851
856
  config.intentDetection = ["disabled", "enabled", "opt-in"].includes(
@@ -860,6 +865,9 @@ const _ClientConfigSingleton = class _ClientConfigSingleton {
860
865
  })
861
866
  );
862
867
  }
868
+ if (codeSearchEnabled === false) {
869
+ config.intentDetection = "disabled";
870
+ }
863
871
  if (!isError$3(temporarySettings)) {
864
872
  config.temporarySettings = temporarySettings;
865
873
  }
@@ -889,7 +897,8 @@ const _ClientConfigSingleton = class _ClientConfigSingleton {
889
897
  userShouldUseEnterprise: false,
890
898
  notices: [],
891
899
  temporarySettings: {},
892
- omniBoxEnabled: false
900
+ omniBoxEnabled: false,
901
+ codeSearchEnabled: false
893
902
  };
894
903
  }
895
904
  // Fetches the config features from the server and handles errors, using the old/legacy GraphQL API.
@@ -8212,7 +8221,12 @@ function syncModels({
8212
8221
  enableToolCody
8213
8222
  ).pipe(
8214
8223
  switchMap$1(
8215
- ([hasEarlyAccess, hasAgenticChatFlag, defaultToHaiku]) => {
8224
+ ([
8225
+ hasEarlyAccess,
8226
+ hasAgenticChatFlag,
8227
+ defaultToHaiku,
8228
+ isToolCodyEnabled
8229
+ ]) => {
8216
8230
  const isOnWaitlist = config.clientState.waitlist_o1;
8217
8231
  if (isDotComUser && (hasEarlyAccess || isOnWaitlist)) {
8218
8232
  data2.primaryModels = data2.primaryModels.map(
@@ -8230,34 +8244,37 @@ function syncModels({
8230
8244
  }
8231
8245
  );
8232
8246
  }
8247
+ const clientModels = [];
8248
+ const isAgenticChatEnabled = hasAgenticChatFlag || isDotComUser && !isCodyFreeUser;
8233
8249
  const haikuModel = data2.primaryModels.find(
8234
8250
  (m) => m.id.includes("5-haiku")
8235
8251
  );
8236
8252
  const sonnetModel = data2.primaryModels.find(
8237
8253
  (m) => m.id.includes("5-sonnet")
8238
8254
  );
8239
- const isAgenticChatEnabled = hasAgenticChatFlag || isDotComUser && !isCodyFreeUser;
8240
- if (isAgenticChatEnabled && sonnetModel && haikuModel && // Ensure the deep-cody model is only added once.
8241
- !data2.primaryModels.some(
8255
+ const hasDeepCody = data2.primaryModels.some(
8242
8256
  (m) => m.id.includes("deep-cody")
8243
- )) {
8244
- const DEEPCODY_MODEL = getExperimentalClientModelByFeatureFlag(
8245
- FeatureFlag.DeepCody
8246
- );
8247
- const clientModels = [DEEPCODY_MODEL];
8248
- if (enableToolCody) {
8249
- clientModels.push(TOOL_CODY_MODEL);
8250
- }
8251
- data2.primaryModels.push(
8252
- ...maybeAdjustContextWindows(clientModels).map(
8253
- createModelFromServerModel
8257
+ );
8258
+ if (!hasDeepCody && isAgenticChatEnabled && sonnetModel && haikuModel) {
8259
+ clientModels.push(
8260
+ getExperimentalClientModelByFeatureFlag(
8261
+ FeatureFlag.DeepCody
8254
8262
  )
8255
8263
  );
8256
8264
  }
8257
- if (isDotComUser && isCodyFreeUser && defaultToHaiku) {
8258
- if (haikuModel) {
8259
- data2.preferences.defaults.chat = haikuModel.id;
8260
- }
8265
+ const hasToolCody = data2.primaryModels.some(
8266
+ (m) => m.id.includes("tool-cody")
8267
+ );
8268
+ if (!hasToolCody && isToolCodyEnabled) {
8269
+ clientModels.push(TOOL_CODY_MODEL);
8270
+ }
8271
+ data2.primaryModels.push(
8272
+ ...maybeAdjustContextWindows(clientModels).map(
8273
+ createModelFromServerModel
8274
+ )
8275
+ );
8276
+ if (isDotComUser && isCodyFreeUser && defaultToHaiku && haikuModel) {
8277
+ data2.preferences.defaults.chat = haikuModel.id;
8261
8278
  }
8262
8279
  return Observable.of(data2);
8263
8280
  }
@@ -22925,7 +22942,7 @@ async function tokenCallbackHandler(uri) {
22925
22942
  closeAuthProgressIndicator();
22926
22943
  const params = new URLSearchParams(uri.query);
22927
22944
  const token = params.get("code") || params.get("token");
22928
- const endpoint = params.get("endpoint") ?? currentAuthStatus().endpoint;
22945
+ const endpoint = currentAuthStatus().endpoint;
22929
22946
  const instanceHost = params.get("instance");
22930
22947
  const instanceUrl = instanceHost ? new URL(instanceHost).origin : void 0;
22931
22948
  if (instanceUrl && isWorkspaceInstance(instanceUrl)) {
@@ -43331,7 +43348,7 @@ class CommandsProvider {
43331
43348
  if (!isFileURI(uri)) {
43332
43349
  throw new Error("history only supported on local file paths");
43333
43350
  }
43334
- const { getContextFileFromGitLog } = await import("./git-log-gE5gHQIp.mjs");
43351
+ const { getContextFileFromGitLog } = await import("./git-log-DgPaEJHG.mjs");
43335
43352
  return getContextFileFromGitLog(uri, options);
43336
43353
  }
43337
43354
  dispose() {
@@ -160669,8 +160686,8 @@ function parseMentionURI(uri) {
160669
160686
  }
160670
160687
  }
160671
160688
  async function execFileAsync(program2, args2, { cwd }) {
160672
- const { promisify } = await import("./util-CP7jPCzd.mjs").then((n) => n.u);
160673
- const { execFile } = await import("./vscode-shim-n3ps9Fur.mjs").then((n) => n.gE);
160689
+ const { promisify } = await import("./util-BS4yM3h5.mjs").then((n) => n.u);
160690
+ const { execFile } = await import("./vscode-shim-C0OSx8EN.mjs").then((n) => n.gE);
160674
160691
  return promisify(execFile)(program2, args2, { cwd });
160675
160692
  }
160676
160693
  var __create = Object.create;
@@ -170358,7 +170375,7 @@ async function registerDebugCommands(context2, disposables) {
170358
170375
  }
170359
170376
  async function tryRegisterTutorial(context2, disposables) {
170360
170377
  if (!isRunningInsideAgent()) {
170361
- const { registerInteractiveTutorial } = await import("./index-C7qlPOAu.mjs");
170378
+ const { registerInteractiveTutorial } = await import("./index-DefCFjGJ.mjs");
170362
170379
  registerInteractiveTutorial(context2).then((disposable) => disposables.push(...disposable));
170363
170380
  }
170364
170381
  }
@@ -1,2 +1,2 @@
1
- import "./agent.worker-BRKfI6SV.mjs";
2
- import "./vscode-shim-n3ps9Fur.mjs";
1
+ import "./agent.worker-D1gbjZNA.mjs";
2
+ import "./vscode-shim-C0OSx8EN.mjs";
@@ -1,4 +1,4 @@
1
- import { w as wrapInActiveSpan, p as path, U as Uri, C as ContextItemSource, s as spawn } from "./vscode-shim-n3ps9Fur.mjs";
1
+ import { w as wrapInActiveSpan, p as path, U as Uri, C as ContextItemSource, s as spawn } from "./vscode-shim-C0OSx8EN.mjs";
2
2
  async function getContextFileFromGitLog(file, options) {
3
3
  return wrapInActiveSpan("commands.context.git-log", async (span) => {
4
4
  const cwd = path.dirname(file.fsPath);
@@ -1,8 +1,8 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
- import { U as Uri, P as Position, R as Range, a as window, D as DiagnosticSeverity, b as workspace, c as commands, t as telemetryRecorder, d as ps, e as dedent, T as ThemeColor, l as languages, f as CodeLens, g as Disposable } from "./vscode-shim-n3ps9Fur.mjs";
5
- import { u as updateRangeMultipleChanges, e as executeEdit, T as TERMINAL_EDIT_STATES, s as setTutorialUri, l as logSidebarClick } from "./agent.worker-BRKfI6SV.mjs";
4
+ import { U as Uri, P as Position, R as Range, a as window, D as DiagnosticSeverity, b as workspace, c as commands, t as telemetryRecorder, d as ps, e as dedent, T as ThemeColor, l as languages, f as CodeLens, g as Disposable } from "./vscode-shim-C0OSx8EN.mjs";
5
+ import { u as updateRangeMultipleChanges, e as executeEdit, T as TERMINAL_EDIT_STATES, s as setTutorialUri, l as logSidebarClick } from "./agent.worker-D1gbjZNA.mjs";
6
6
  const EMOJI_SVG_TEMPLATE = `<svg width="32" height="32" xmlns="http://www.w3.org/2000/svg">
7
7
  <text x="50%" y="50%" dominant-baseline="middle" text-anchor="middle" font-family="Arial" font-size="24px">{emoji}</text>
8
8
  </svg>`;
package/dist/index.js CHANGED
@@ -2,8 +2,8 @@ var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
4
  import { jsx, jsxs, Fragment as Fragment$1 } from "react/jsx-runtime";
5
- import { i as getDefaultExportFromCjs, L as Ls, k as ke$1, j as ks, F as Fi$1, _ as _s, m as ds, n as bs, o as ii$1, q as qe$1, y as ys, x as xi$1, K as K$2, J as J$2, r as R$3, u as ws, B as B$2, v as g$5, z as h$4, A as _i, S as Ss, E as Br, G as ln, H as bi$1, I as vn, M as xn, N as Nn, O as mn, Q as li$1, V as n$1, W as ns, X as M$4, Y as Ds, Z as le$2, $ as c$3, a0 as oe$2, a1 as z$1, a2 as yi$1, a3 as W$2, a4 as Ue$1, a5 as I$2, a6 as Se$2, a7 as O$2, a8 as F$1, a9 as Ni$1, aa as ee$1, ab as we$2, ac as b$2, ad as T$3, ae as s$2, af as o$4, ag as w$3, ah as i$2, ai as k$3, aj as D$5, ak as p$8, al as m$8, am as S$4, an as v$4, ao as P$2, ap as E$6, aq as Wi$1, ar as L$3, as as d$2, at as a$3, au as l$2, av as f$2, aw as u$6, ax as r$5, ay as t$2, az as FILE_CONTEXT_MENTION_PROVIDER, aA as SYMBOL_CONTEXT_MENTION_PROVIDER, aB as REMOTE_REPOSITORY_PROVIDER_URI, aC as REMOTE_FILE_PROVIDER_URI, aD as REMOTE_DIRECTORY_PROVIDER_URI, aE as WEB_PROVIDER_URI, aF as displayPath, aG as displayLineRange, aH as displayPathDirname, aI as displayPathBasename, aJ as IGNORED_FILE_WARNING_LABEL, aK as LARGE_FILE_WARNING_LABEL, aL as Ei$1, aM as xe$2, aN as V$2, aO as Es, aP as U$2, aQ as e, aR as Ns, C as ContextItemSource, aS as URI, aT as gs, aU as serializeContextItem, aV as CONTEXT_ITEM_MENTION_NODE_TYPE, aW as contextItemMentionNodeDisplayText, aX as an, aY as qr, aZ as _$2, a_ as TEMPLATE_INPUT_NODE_TYPE, a$ as N$2, b0 as parseMentionQuery, b1 as NO_SYMBOL_MATCHES_HELP_LABEL, b2 as FILE_RANGE_TOOLTIP_LABEL, b3 as Observable, b4 as createExtensionAPI, b5 as createMessageAPIForWebview, b6 as debounce, b7 as memoizeLastValue, b8 as toSerializedPromptEditorValue$1, b9 as ri$1, ba as isEqual, bb as scanForMentionTriggerInUserTextInput, bc as fs, bd as Ts, be as ps, bf as getMentionOperations, bg as forceHydration, bh as hydrateAfterPostMessage, bi as isDotCom, bj as isSourcegraphToken, bk as trace, bl as context$1, bm as SpanStatusCode, bn as FeatureFlag, bo as webviewOpenURIForContextItem, bp as isCodyProUser, h as commonjsGlobal, bq as CodyIDE, br as CodyTaskState, bs as cryptoJsExports, bt as isError, bu as RateLimitError, bv as CODY_FEEDBACK_URL, bw as isDefined, bx as upperFirst, by as lodashExports, bz as createContextItem, bA as isCodeSearchContextItem, bB as reformatBotMessageForChat, bC as isAbortErrorOrSocketHangUp, bD as ModelTag, bE as serializedPromptEditorStateFromChatMessage, bF as contextItemsFromPromptEditorValue, bG as filterContextItemsFromPromptEditorValue, bH as pluralize$1, bI as CustomCommandType, bJ as View, bK as isCodyProModel, bL as isWaitlistModel, bM as getRelativeChatPeriod, bN as isMacOS, bO as firstResultFromOperation, bP as CODY_PRO_SUBSCRIPTION_URL, bQ as ACCOUNT_USAGE_URL, bR as ENTERPRISE_PRICING_URL, bS as firstValueFrom, bT as textContentFromSerializedLexicalNode, bU as skipPendingOperation, bV as FAST_CHAT_INPUT_TOKEN_BUDGET, bW as inputTextWithMappedContextChipsFromPromptEditorState, bX as serializedPromptEditorStateFromText, bY as deserializeContextItem, bZ as SG_WORKSPACES_URL, b_ as DOTCOM_WORKSPACE_LEARN_MORE_URL, b$ as truncateTextStart, c0 as CHAT_INPUT_TOKEN_BUDGET, c1 as S2_URL, c2 as browser, c3 as CodyAutoSuggestionMode, c4 as isErrorLike, c5 as PromptString, c6 as setDisplayPathEnvInfo, U as Uri } from "./vscode-shim-n3ps9Fur.mjs";
6
- import { c8, c7 } from "./vscode-shim-n3ps9Fur.mjs";
5
+ import { i as getDefaultExportFromCjs, L as Ls, k as ke$1, j as ks, F as Fi$1, _ as _s, m as ds, n as bs, o as ii$1, q as qe$1, y as ys, x as xi$1, K as K$2, J as J$2, r as R$3, u as ws, B as B$2, v as g$5, z as h$4, A as _i, S as Ss, E as Br, G as ln, H as bi$1, I as vn, M as xn, N as Nn, O as mn, Q as li$1, V as n$1, W as ns, X as M$4, Y as Ds, Z as le$2, $ as c$3, a0 as oe$2, a1 as z$1, a2 as yi$1, a3 as W$2, a4 as Ue$1, a5 as I$2, a6 as Se$2, a7 as O$2, a8 as F$1, a9 as Ni$1, aa as ee$1, ab as we$2, ac as b$2, ad as T$3, ae as s$2, af as o$4, ag as w$3, ah as i$2, ai as k$3, aj as D$5, ak as p$8, al as m$8, am as S$4, an as v$4, ao as P$2, ap as E$6, aq as Wi$1, ar as L$3, as as d$2, at as a$3, au as l$2, av as f$2, aw as u$6, ax as r$5, ay as t$2, az as FILE_CONTEXT_MENTION_PROVIDER, aA as SYMBOL_CONTEXT_MENTION_PROVIDER, aB as REMOTE_REPOSITORY_PROVIDER_URI, aC as REMOTE_FILE_PROVIDER_URI, aD as REMOTE_DIRECTORY_PROVIDER_URI, aE as WEB_PROVIDER_URI, aF as displayPath, aG as displayLineRange, aH as displayPathDirname, aI as displayPathBasename, aJ as IGNORED_FILE_WARNING_LABEL, aK as LARGE_FILE_WARNING_LABEL, aL as Ei$1, aM as xe$2, aN as V$2, aO as Es, aP as U$2, aQ as e, aR as Ns, C as ContextItemSource, aS as URI, aT as gs, aU as serializeContextItem, aV as CONTEXT_ITEM_MENTION_NODE_TYPE, aW as contextItemMentionNodeDisplayText, aX as an, aY as qr, aZ as _$2, a_ as TEMPLATE_INPUT_NODE_TYPE, a$ as N$2, b0 as parseMentionQuery, b1 as NO_SYMBOL_MATCHES_HELP_LABEL, b2 as FILE_RANGE_TOOLTIP_LABEL, b3 as Observable, b4 as createExtensionAPI, b5 as createMessageAPIForWebview, b6 as debounce, b7 as memoizeLastValue, b8 as toSerializedPromptEditorValue$1, b9 as ri$1, ba as isEqual, bb as scanForMentionTriggerInUserTextInput, bc as fs, bd as Ts, be as ps, bf as getMentionOperations, bg as forceHydration, bh as hydrateAfterPostMessage, bi as isDotCom, bj as isSourcegraphToken, bk as trace, bl as context$1, bm as SpanStatusCode, bn as FeatureFlag, bo as webviewOpenURIForContextItem, bp as isCodyProUser, h as commonjsGlobal, bq as CodyIDE, br as CodyTaskState, bs as cryptoJsExports, bt as isError, bu as RateLimitError, bv as CODY_FEEDBACK_URL, bw as isDefined, bx as upperFirst, by as lodashExports, bz as createContextItem, bA as isCodeSearchContextItem, bB as reformatBotMessageForChat, bC as isAbortErrorOrSocketHangUp, bD as ModelTag, bE as serializedPromptEditorStateFromChatMessage, bF as contextItemsFromPromptEditorValue, bG as filterContextItemsFromPromptEditorValue, bH as pluralize$1, bI as CustomCommandType, bJ as View, bK as isCodyProModel, bL as isWaitlistModel, bM as getRelativeChatPeriod, bN as isMacOS, bO as firstResultFromOperation, bP as CODY_PRO_SUBSCRIPTION_URL, bQ as ACCOUNT_USAGE_URL, bR as ENTERPRISE_PRICING_URL, bS as firstValueFrom, bT as textContentFromSerializedLexicalNode, bU as skipPendingOperation, bV as FAST_CHAT_INPUT_TOKEN_BUDGET, bW as inputTextWithMappedContextChipsFromPromptEditorState, bX as serializedPromptEditorStateFromText, bY as deserializeContextItem, bZ as SG_WORKSPACES_URL, b_ as DOTCOM_WORKSPACE_LEARN_MORE_URL, b$ as truncateTextStart, c0 as CHAT_INPUT_TOKEN_BUDGET, c1 as S2_URL, c2 as browser, c3 as CodyAutoSuggestionMode, c4 as isErrorLike, c5 as PromptString, c6 as setDisplayPathEnvInfo, U as Uri } from "./vscode-shim-C0OSx8EN.mjs";
6
+ import { c8, c7 } from "./vscode-shim-C0OSx8EN.mjs";
7
7
  import * as React$2 from "react";
8
8
  import React__default, { createContext, useContext, useMemo as useMemo$1, useLayoutEffect as useLayoutEffect$1, useEffect as useEffect$2, forwardRef, useState as useState$1, useCallback, useRef as useRef$1, Suspense, createElement, memo as memo$1, useImperativeHandle, Children, isValidElement, cloneElement, Fragment as Fragment$2, useReducer } from "react";
9
9
  var classnames = { exports: {} };
@@ -37849,7 +37849,7 @@ function useFeatureFlag(flag) {
37849
37849
  }
37850
37850
  const useOmniBox = () => {
37851
37851
  const config = useClientConfig();
37852
- return !!(config == null ? void 0 : config.omniBoxEnabled);
37852
+ return !!(config == null ? void 0 : config.omniBoxEnabled) && !!(config == null ? void 0 : config.codeSearchEnabled);
37853
37853
  };
37854
37854
  const useOmniBoxDebug = () => {
37855
37855
  return useFeatureFlag(FeatureFlag.CodyExperimentalOneBoxDebug);