@sourcegraph/cody-web 0.40.0 → 0.41.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.
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2022 Sourcegraph, Inc.
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -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 { dt as Observable, dX as unsubscribe, dY as AsyncSerialScheduler, de as authStatus, cB as pick, cF as distinctUntilChanged$1, c$ as switchMapReplayOperation, c_ as pendingOperation, co as promiseFactoryToObservable, dw as map$1, a as isError$3, cZ as retry$1, a8 as logError$1, d1 as firstResultFromOperation, aD as graphqlClient, ag as isDotCom, dZ as semver, cP as debounceTime, d_ as interval, cX as filter$3, cJ as startWith$1, cN as switchMap$1, ci as firstValueFrom$1, d0 as skipPendingOperation, a7 as logDebug, i as isAbortError, d$ as expand, dK as LRUCache$1, e0 as TRANSIENT_REFETCH_INTERVAL_HINT, aR as createSubscriber, cw as fromVSCodeEvent, dv as isEqual, dc as cenv, dS as lodashExports, aG as EXCLUDE_EVERYTHING_CONTEXT_FILTERS, J as isFileURI, w as wrapInActiveSpan, aF as INCLUDE_EVERYTHING_CONTEXT_FILTERS, bn as onAbort, bN as CHAT_INPUT_TOKEN_BUDGET, bP as CHAT_OUTPUT_TOKEN_BUDGET, M as ModelTag, bS as EXTENDED_CHAT_INPUT_TOKEN_BUDGET, bR as EXTENDED_USER_CONTEXT_TOKEN_BUDGET, ae as addCodyClientIdentificationHeaders, bw as addTraceparent, bM as addAuthHeaders, bI as fetch$2, e1 as verifyResponseCode, ct as combineLatest$1, cK as take$2, d7 as clientCapabilities, cC as shareReplay$1, cG as tap$2, a3 as featureFlagProvider, a2 as FeatureFlag, bs as telemetryRecorder, dh as currentAuthStatusOrNotReadyYet, dj as mockAuthStatus, cO as storeLastValue, d4 as resolvedConfig, bD as AUTH_STATUS_FIXTURE_AUTHED_DOTCOM, bF as ps, e2 as logInfo, a5 as GuardrailsMode, d5 as currentResolvedConfig, bE as PromptString, bT as CodyIDE, T as displayPath, bQ as CORPUS_CONTEXT_ALLOCATION, bz as recordErrorToSpan, aa as addClientInfoParams, bm as dependentAbortController, aY as FILE_CONTEXT_MENTION_PROVIDER, aZ as SYMBOL_CONTEXT_MENTION_PROVIDER, b0 as REMOTE_REPOSITORY_PROVIDER_URI, b1 as REMOTE_FILE_PROVIDER_URI, b2 as REMOTE_DIRECTORY_PROVIDER_URI, b3 as WEB_PROVIDER_URI, C as ContextItemSource, bd as isS2, b4 as GIT_OPENCTX_PROVIDER_URI, b5 as CODE_SEARCH_PROVIDER_URI, dJ as cryptoJsExports, b7 as currentOpenCtxController, c as URI, e3 as MulticastSubject, e4 as AsyncSerialScheduler_1, dn as getDefaultExportFromCjs, e5 as workspace, p as path$1, e6 as vscode, e7 as Range, e8 as commands$1, e9 as window$1, ea as Selection, U as Uri, eb as AgentEventEmitter, ec as MarkdownString, ed as Disposable, ee as TextEditorRevealType, ef as ThemeIcon, eg as StatusBarAlignment, eh as readFile, ei as env, ej as UIKind, ek as languages$1, dm as commonjsGlobal, an as InvalidAccessTokenError, el as _baseAssignValue, em as eq_1, en as isArrayLike_1, eo as isObjectLike_1, ep as _copyObject, eq as keysIn_1, er as _cloneBufferExports, es as _cloneTypedArray, et as _copyArray, eu as _initCloneObject, ev as isArguments_1, ew as isArray_1, ex as isBufferExports, ey as isFunction_1, ez as isObject_1, eA as isPlainObject_1, eB as isTypedArray_1, eC as _Stack, eD as identity_1, eE as _overRest, eF as _setToString, eG as _isIndex, dx as isSourcegraphToken, dR as v4, eH as CONFIG_KEY, bU as CodyAutoSuggestionMode, eI as ConfigurationTarget, eJ as appendFileSync, eK as pathBrowserify, eL as stat, eM as extensions, eN as version$2, d9 as setExtensionVersion, eO as normalizeServerEndpointURL, ax as isInvalidAccessTokenError, eP as isOAuthProviderError, af as DOTCOM_URL, ay as isNeedsAuthChallengeError, cq as EMPTY$1, cf as disposableSubscription, eQ as externalAuthRefresh, dd as setAuthStatusObservable, av as isAvailabilityError, aj as AuthConfigError, be as isWorkspaceInstance, aC as SourcegraphGraphQLAPIClient, eR as isExternalAuthProviderError, aA as isNetworkLikeError, ao as NeedsAuthChallengeError, al as AvailabilityError, df as currentAuthStatus, eS as resolveAuth, eT as QuickPickItemKind, eU as revokeOAuthTokens, bL as getAuthHeaders, eV as toLightweightChatTranscript, S as SUPPORTED_URI_SCHEMAS, eW as RelativePattern, eX as _baseIsEqual, eY as keys_1, eZ as _baseGet, e_ as _castPath, e$ as isLength_1, f0 as _toKey, f1 as _isKey, f2 as toNumber_1, f3 as _baseFindIndex, f4 as require$$0$2, ap as NetworkError, aB as isRateLimitError, au as isAuthError, f5 as FileType, f6 as dedent$1, f7 as FoldingRange, f8 as CancellationTokenSource, f9 as SymbolKind, aQ as convertGitCloneURLToCodebaseName, b as isDefined, cA as pluck, t as toRangeData, fa as Position, D as DefaultChatCommands, A as pathFunctionsForURI, R as uriParseNameAndExtension, O as uriDirname, fb as Utils$1, Q as uriExtname, K as uriBasename, h as DefaultEditCommands, ce as subscriptionDisposable, bt as updateGlobalTelemetryInstances, aN as TelemetryRecorderProvider, br as telemetryRecorderProvider, bf as createGitDiff, fc as AgentWorkspaceEdit, fd as TextDocumentChangeReason, fe as omit$1, bo as getEditorInsertSpaces, ff as escapeRegExp$1, ar as TimeoutError, az as isNetworkError, Z as displayPathWithoutWorkspaceFolderPrefix, fg as http, fh as open, cW as defer$2, cs as merge$2, cT as abortableOperation, bl as ruleSearchPaths, bi as isRuleFilename, bk as parseRuleFile, q as languageFromFilename, m as displayLineRange, bj as ruleTitle, fi as debounce_1, k as isErrorLike, d as isWindows, b6 as GLOBAL_SEARCH_PROVIDER_URI, aW as mentionProvidersMetadata, fj as ThemeColor, fk as QuickInputButtons, aV as scanForMentionTriggerInUserTextInput, aU as parseMentionQuery, L as LARGE_FILE_WARNING_LABEL, G as GENERAL_HELP_LABEL, dI as CodyTaskState, fl as CodeLens, fm as defaultWebviewPanel, cd as createExtensionAPI, bb as createMessageAPIForWebview, y as isMatlabFile, fn as EndOfLine, fo as ViewColumn, fp as Location, fq as onDidChangeActiveTextEditor, fr as tabGroups, fs as workspaceTextDocuments, ft as visibleTextEditors, fu as onDidChangeVisibleTextEditors, fv as fs, fw as onDidCloseTextDocument, fx as setCreateWebviewPanel, fy as getAugmentedNamespace, fz as extensionConfiguration, fA as existsSync, fB as rmSync, fC as mkdirSync, fD as main$1, fE as setAgent, fF as setWorkspaceDocuments, fG as setLastOpenedWorkspaceFolder, fH as onDidRegisterNewCodeActionProvider, fI as onDidUnregisterNewCodeActionProvider, fJ as onDidRegisterNewCodeLensProvider, fK as onDidUnregisterNewCodeLensProvider, fL as setClientInfo, di as firstNonPendingAuthStatus, fM as workspaceFolders$1, fN as setWorkspaceFolders, fO as onDidChangeWorkspaceFolders, fP as onDidChangeWindowState, fQ as onDidOpenTextDocument, fR as onDidSaveTextDocument, fS as onDidRenameFiles, fT as packageJson, fU as progressBars, fV as CodeActionTriggerKind, fW as CodeAction, fX as UriString, fY as DiagnosticSeverity, fZ as diagnostics, f_ as isIntegrationTesting, f$ as TESTING_TELEMETRY_EXPORTER, g0 as ProgressLocation, g1 as dist, g2 as completionProvider, g3 as InlineCompletionTriggerKind, dg as currentAuthStatusAuthed, ck as waitUntilComplete, g4 as setExtensionConfiguration, g5 as onDidChangeConfiguration, g6 as onDidChangeTextDocument, g7 as onDidChangeTextEditorSelection, g8 as statSync, g9 as copySync, E as isMacOS, g as CustomCommandType, _ as setDisplayPathEnvInfo, dU as ACCOUNT_USAGE_URL, ga as getOIDCConfiguration$1, gb as getOAuthClientId, gc as OAuthCredential, gd as refreshOAuthToken, du as debounce$1, ge as structuredPatch, j as dedupeWith$1, ai as AbortError, cz as createDisposables, aE as isNodeResponse, ab as getClientInfoQueryParams, bu as tracer, bv as getActiveTraceAndSpanId, ac as getClientIdentificationHeaders, aI as setJSONAcceptContentTypeHeaders, bx as logResponseHeadersToSpan, aJ as isCustomAuthChallengeResponse, as as TracedError, dA as SpanStatusCode, aq as RateLimitError$1, gf as capitalize, gg as InlineCompletionItem, gh as createTwoFilesPatch, gi as vsCodeMocks, dD as whitespace, dB as svg, dE as find$1, dF as stringify$1, dG as stringify$2, dH as ccount, dC as html$3, bp as getEditorTabSize$1, gj as metrics, gk as _, c6 as deserializeContextItem, c2 as editorStateFromPromptString, gl as _baseGetTag, at as isAbortErrorOrSocketHangUp, b_ as inputTextWithoutContextChipsFromPromptEditorState, dL as DeepCodyAgentID, gm as exec, s as spawn, dk as UIToolStatus, W as displayPathBasename, o as expandToLineRange, a$ as openctxController, aX as openCtxProviderMetadata, e as CODY_PASSTHROUGH_VSCODE_OPEN_COMMAND_ID, cU as catchError$1, dP as diffWithLineNum, dl as UITerminalOutputType, gn as getPlatform$1, aH as PromptMode, cL as skip$1, dz as context, bA as extractContextFromTraceparent, aw as isContextWindowLimitError, c5 as serializeContextItem, a0 as forceHydration, r as reformatBotMessageForChat, a1 as hydrateAfterPostMessage, ba as addMessageListenersForExtensionAPI, bc as createMessageAPIForExtension, dM as View, dT as ChatHistoryType, cr as NEVER$1, go as CodeActionKind, l as pluralize, H as assertFileURI, b8 as RULES_PROVIDER_URI, gp as createCodeSearchProvider, u as languageFromFilenameAndContent, P as ProgrammingLanguage, bG as psDedent, gq as formatRuleForPrompt, z as posixFilePaths, gr as DecorationRangeBehavior, gs as diffLines, gt as CODY_SUPPORT_URL, gu as CODY_DOC_URL, gv as DISCORD_URL, bJ as globalAgentRef, gw as VSCODE_CHANGELOG_URL, gx as SG_CHANGELOG_URL, gy as ACCOUNT_LIMITS_INFO_URL, aP as assertUnreachable, aT as promise, gz as ExtensionMode, a9 as setLogger, d8 as setClientCapabilities, d2 as setResolvedConfigurationObservable, ad as setClientNameVersion, a_ as setOpenCtxControllerObservable, dW as browser$4 } from "./vscode-shim-BM22pmQn.mjs";
22
- import { r as requireUtil, i as inherits_browserExports, a as utilExports } from "./util-DSBgjmTR.mjs";
21
+ import { dt as Observable, dX as unsubscribe, dY as AsyncSerialScheduler, de as authStatus, cB as pick, cF as distinctUntilChanged$1, c$ as switchMapReplayOperation, c_ as pendingOperation, co as promiseFactoryToObservable, dw as map$1, a as isError$3, cZ as retry$1, a8 as logError$1, d1 as firstResultFromOperation, aD as graphqlClient, ag as isDotCom, dZ as semver, cP as debounceTime, d_ as interval, cX as filter$3, cJ as startWith$1, cN as switchMap$1, ci as firstValueFrom$1, d0 as skipPendingOperation, a7 as logDebug, i as isAbortError, d$ as expand, dK as LRUCache$1, e0 as TRANSIENT_REFETCH_INTERVAL_HINT, aR as createSubscriber, cw as fromVSCodeEvent, dv as isEqual, dc as cenv, dS as lodashExports, aG as EXCLUDE_EVERYTHING_CONTEXT_FILTERS, J as isFileURI, w as wrapInActiveSpan, aF as INCLUDE_EVERYTHING_CONTEXT_FILTERS, bn as onAbort, bN as CHAT_INPUT_TOKEN_BUDGET, bP as CHAT_OUTPUT_TOKEN_BUDGET, M as ModelTag, bS as EXTENDED_CHAT_INPUT_TOKEN_BUDGET, bR as EXTENDED_USER_CONTEXT_TOKEN_BUDGET, ae as addCodyClientIdentificationHeaders, bw as addTraceparent, bM as addAuthHeaders, bI as fetch$2, e1 as verifyResponseCode, ct as combineLatest$1, cK as take$2, d7 as clientCapabilities, cC as shareReplay$1, cG as tap$2, a3 as featureFlagProvider, a2 as FeatureFlag, bs as telemetryRecorder, dh as currentAuthStatusOrNotReadyYet, dj as mockAuthStatus, cO as storeLastValue, d4 as resolvedConfig, bD as AUTH_STATUS_FIXTURE_AUTHED_DOTCOM, bF as ps, e2 as logInfo, a5 as GuardrailsMode, d5 as currentResolvedConfig, bE as PromptString, bT as CodyIDE, T as displayPath, bQ as CORPUS_CONTEXT_ALLOCATION, bz as recordErrorToSpan, aa as addClientInfoParams, bm as dependentAbortController, aY as FILE_CONTEXT_MENTION_PROVIDER, aZ as SYMBOL_CONTEXT_MENTION_PROVIDER, b0 as REMOTE_REPOSITORY_PROVIDER_URI, b1 as REMOTE_FILE_PROVIDER_URI, b2 as REMOTE_DIRECTORY_PROVIDER_URI, b3 as WEB_PROVIDER_URI, C as ContextItemSource, bd as isS2, b4 as GIT_OPENCTX_PROVIDER_URI, b5 as CODE_SEARCH_PROVIDER_URI, dJ as cryptoJsExports, b7 as currentOpenCtxController, c as URI, e3 as MulticastSubject, e4 as AsyncSerialScheduler_1, dn as getDefaultExportFromCjs, e5 as workspace, p as path$1, e6 as vscode, e7 as Range, e8 as commands$1, e9 as window$1, ea as Selection, U as Uri, eb as AgentEventEmitter, ec as MarkdownString, ed as Disposable, ee as TextEditorRevealType, ef as ThemeIcon, eg as StatusBarAlignment, eh as readFile, ei as env, ej as UIKind, ek as languages$1, dm as commonjsGlobal, an as InvalidAccessTokenError, el as _baseAssignValue, em as eq_1, en as isArrayLike_1, eo as isObjectLike_1, ep as _copyObject, eq as keysIn_1, er as _cloneBufferExports, es as _cloneTypedArray, et as _copyArray, eu as _initCloneObject, ev as isArguments_1, ew as isArray_1, ex as isBufferExports, ey as isFunction_1, ez as isObject_1, eA as isPlainObject_1, eB as isTypedArray_1, eC as _Stack, eD as identity_1, eE as _overRest, eF as _setToString, eG as _isIndex, dx as isSourcegraphToken, dR as v4, eH as CONFIG_KEY, bU as CodyAutoSuggestionMode, eI as ConfigurationTarget, eJ as appendFileSync, eK as pathBrowserify, eL as stat, eM as extensions, eN as version$2, d9 as setExtensionVersion, eO as normalizeServerEndpointURL, ax as isInvalidAccessTokenError, eP as isOAuthProviderError, af as DOTCOM_URL, ay as isNeedsAuthChallengeError, cq as EMPTY$1, cf as disposableSubscription, eQ as externalAuthRefresh, dd as setAuthStatusObservable, av as isAvailabilityError, aj as AuthConfigError, be as isWorkspaceInstance, aC as SourcegraphGraphQLAPIClient, eR as isExternalAuthProviderError, aA as isNetworkLikeError, ao as NeedsAuthChallengeError, al as AvailabilityError, df as currentAuthStatus, eS as resolveAuth, eT as QuickPickItemKind, eU as revokeOAuthTokens, bL as getAuthHeaders, eV as toLightweightChatTranscript, S as SUPPORTED_URI_SCHEMAS, eW as RelativePattern, eX as _baseIsEqual, eY as keys_1, eZ as _baseGet, e_ as _castPath, e$ as isLength_1, f0 as _toKey, f1 as _isKey, f2 as toNumber_1, f3 as _baseFindIndex, f4 as require$$0$2, ap as NetworkError, aB as isRateLimitError, au as isAuthError, f5 as FileType, f6 as dedent$1, f7 as FoldingRange, f8 as CancellationTokenSource, f9 as SymbolKind, aQ as convertGitCloneURLToCodebaseName, b as isDefined, cA as pluck, t as toRangeData, fa as Position, D as DefaultChatCommands, A as pathFunctionsForURI, R as uriParseNameAndExtension, O as uriDirname, fb as Utils$1, Q as uriExtname, K as uriBasename, h as DefaultEditCommands, ce as subscriptionDisposable, bt as updateGlobalTelemetryInstances, aN as TelemetryRecorderProvider, br as telemetryRecorderProvider, bf as createGitDiff, fc as AgentWorkspaceEdit, fd as TextDocumentChangeReason, fe as omit$1, bo as getEditorInsertSpaces, ff as escapeRegExp$1, ar as TimeoutError, az as isNetworkError, Z as displayPathWithoutWorkspaceFolderPrefix, fg as http, fh as open, cW as defer$2, cs as merge$2, cT as abortableOperation, bl as ruleSearchPaths, bi as isRuleFilename, bk as parseRuleFile, q as languageFromFilename, m as displayLineRange, bj as ruleTitle, fi as debounce_1, k as isErrorLike, d as isWindows, b6 as GLOBAL_SEARCH_PROVIDER_URI, aW as mentionProvidersMetadata, fj as ThemeColor, fk as QuickInputButtons, aV as scanForMentionTriggerInUserTextInput, aU as parseMentionQuery, L as LARGE_FILE_WARNING_LABEL, G as GENERAL_HELP_LABEL, dI as CodyTaskState, fl as CodeLens, fm as defaultWebviewPanel, cd as createExtensionAPI, bb as createMessageAPIForWebview, y as isMatlabFile, fn as EndOfLine, fo as ViewColumn, fp as Location, fq as onDidChangeActiveTextEditor, fr as tabGroups, fs as workspaceTextDocuments, ft as visibleTextEditors, fu as onDidChangeVisibleTextEditors, fv as fs, fw as onDidCloseTextDocument, fx as setCreateWebviewPanel, fy as getAugmentedNamespace, fz as extensionConfiguration, fA as existsSync, fB as rmSync, fC as mkdirSync, fD as main$1, fE as setAgent, fF as setWorkspaceDocuments, fG as setLastOpenedWorkspaceFolder, fH as onDidRegisterNewCodeActionProvider, fI as onDidUnregisterNewCodeActionProvider, fJ as onDidRegisterNewCodeLensProvider, fK as onDidUnregisterNewCodeLensProvider, fL as setClientInfo, di as firstNonPendingAuthStatus, fM as workspaceFolders$1, fN as setWorkspaceFolders, fO as onDidChangeWorkspaceFolders, fP as onDidChangeWindowState, fQ as onDidOpenTextDocument, fR as onDidSaveTextDocument, fS as onDidRenameFiles, fT as packageJson, fU as progressBars, fV as CodeActionTriggerKind, fW as CodeAction, fX as UriString, fY as DiagnosticSeverity, fZ as diagnostics, f_ as isIntegrationTesting, f$ as TESTING_TELEMETRY_EXPORTER, g0 as ProgressLocation, g1 as dist, g2 as completionProvider, g3 as InlineCompletionTriggerKind, dg as currentAuthStatusAuthed, ck as waitUntilComplete, g4 as setExtensionConfiguration, g5 as onDidChangeConfiguration, g6 as onDidChangeTextDocument, g7 as onDidChangeTextEditorSelection, g8 as statSync, g9 as copySync, E as isMacOS, g as CustomCommandType, _ as setDisplayPathEnvInfo, dU as ACCOUNT_USAGE_URL, ga as getOIDCConfiguration$1, gb as getOAuthClientId, gc as OAuthCredential, gd as refreshOAuthToken, du as debounce$1, ge as structuredPatch, j as dedupeWith$1, ai as AbortError, cz as createDisposables, aE as isNodeResponse, ab as getClientInfoQueryParams, bu as tracer, bv as getActiveTraceAndSpanId, ac as getClientIdentificationHeaders, aI as setJSONAcceptContentTypeHeaders, bx as logResponseHeadersToSpan, aJ as isCustomAuthChallengeResponse, as as TracedError, dA as SpanStatusCode, aq as RateLimitError$1, gf as capitalize, gg as InlineCompletionItem, gh as createTwoFilesPatch, gi as vsCodeMocks, dD as whitespace, dB as svg, dE as find$1, dF as stringify$1, dG as stringify$2, dH as ccount, dC as html$3, bp as getEditorTabSize$1, gj as metrics, gk as _, c6 as deserializeContextItem, c2 as editorStateFromPromptString, gl as _baseGetTag, at as isAbortErrorOrSocketHangUp, b_ as inputTextWithoutContextChipsFromPromptEditorState, dL as DeepCodyAgentID, gm as exec, s as spawn, dk as UIToolStatus, W as displayPathBasename, o as expandToLineRange, a$ as openctxController, aX as openCtxProviderMetadata, e as CODY_PASSTHROUGH_VSCODE_OPEN_COMMAND_ID, cU as catchError$1, dP as diffWithLineNum, dl as UITerminalOutputType, gn as getPlatform$1, aH as PromptMode, cL as skip$1, dz as context, bA as extractContextFromTraceparent, aw as isContextWindowLimitError, c5 as serializeContextItem, a0 as forceHydration, r as reformatBotMessageForChat, a1 as hydrateAfterPostMessage, ba as addMessageListenersForExtensionAPI, bc as createMessageAPIForExtension, dM as View, dT as ChatHistoryType, cr as NEVER$1, go as CodeActionKind, l as pluralize, H as assertFileURI, b8 as RULES_PROVIDER_URI, gp as createCodeSearchProvider, u as languageFromFilenameAndContent, P as ProgrammingLanguage, bG as psDedent, gq as formatRuleForPrompt, z as posixFilePaths, gr as DecorationRangeBehavior, gs as diffLines, gt as CODY_SUPPORT_URL, gu as CODY_DOC_URL, gv as DISCORD_URL, bJ as globalAgentRef, gw as VSCODE_CHANGELOG_URL, gx as SG_CHANGELOG_URL, gy as ACCOUNT_LIMITS_INFO_URL, aP as assertUnreachable, aT as promise, gz as ExtensionMode, a9 as setLogger, d8 as setClientCapabilities, d2 as setResolvedConfigurationObservable, ad as setClientNameVersion, a_ as setOpenCtxControllerObservable, dW as browser$4 } from "./vscode-shim-BytjAIYm.mjs";
22
+ import { r as requireUtil, i as inherits_browserExports, a as utilExports } from "./util-CyrrUWO_.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");
@@ -8747,10 +8747,6 @@ function syncModels({
8747
8747
  serverModelsConfig2
8748
8748
  );
8749
8749
  }
8750
- data.primaryModels = data.primaryModels.map((m) => ({
8751
- ...m,
8752
- tags: m.provider === "google" ? m.tags.filter((t) => t !== ModelTag.Vision) : m.tags
8753
- }));
8754
8750
  if (fallbackToFlashFlag) {
8755
8751
  if (authStatus22.rateLimited) {
8756
8752
  const hasUnlimitedModels = data.primaryModels.some(
@@ -9935,7 +9931,7 @@ async function getTokenCounterUtils() {
9935
9931
  const browser2 = detect();
9936
9932
  if (browser2 && browser2.name === "safari") {
9937
9933
  _tokenCounterUtilsPromise = import("./cl100k_base-B4kyDDRQ.mjs").then(async (tokenizer2) => {
9938
- const tiktoken = await import("./lite-DCeO0vlV.mjs");
9934
+ const tiktoken = await import("./lite-fIXLDKud.mjs");
9939
9935
  return createTokenCounterUtils(new tiktoken.Tiktoken(tokenizer2.default));
9940
9936
  });
9941
9937
  } else {
@@ -41014,7 +41010,13 @@ async function resolveFileOrSymbolContextItem(contextItem, editor, signal2) {
41014
41010
  endLine: contextItem.range.end.line + 1
41015
41011
  } : void 0;
41016
41012
  const { auth: auth2 } = await currentResolvedConfig();
41017
- const resultOrError = await graphqlClient.getFileContent(repository, path2, ranges2, signal2);
41013
+ const resultOrError = await graphqlClient.getFileContent(
41014
+ repository,
41015
+ path2,
41016
+ "HEAD",
41017
+ ranges2,
41018
+ signal2
41019
+ );
41018
41020
  if (!isErrorLike(resultOrError)) {
41019
41021
  return {
41020
41022
  ...contextItem,
@@ -48353,7 +48355,7 @@ class CommandsProvider {
48353
48355
  if (!isFileURI(uri)) {
48354
48356
  throw new Error("history only supported on local file paths");
48355
48357
  }
48356
- const { getContextFileFromGitLog } = await import("./git-log-BOf0Q_uO.mjs");
48358
+ const { getContextFileFromGitLog } = await import("./git-log-CQk4ccEg.mjs");
48357
48359
  return getContextFileFromGitLog(uri, options);
48358
48360
  }
48359
48361
  dispose() {
@@ -48570,18 +48572,23 @@ async function getOIDCConfiguration(endpoint) {
48570
48572
  }
48571
48573
  const config = await getOIDCConfiguration$1(endpoint);
48572
48574
  if (!config) {
48573
- outputChannelLogger.logDebug("device-auth", "OIDC configuration not available", { endpoint });
48575
+ outputChannelLogger.logError("device-auth", "OIDC configuration not available", { endpoint });
48574
48576
  return null;
48575
48577
  }
48576
48578
  return config;
48577
48579
  }
48578
48580
  async function initiateDeviceAuth(oidcConfig) {
48579
48581
  if (!(oidcConfig == null ? void 0 : oidcConfig.device_authorization_endpoint)) {
48582
+ outputChannelLogger.logError("device-auth", "OIDC config missing device_authorization_endpoint");
48580
48583
  return null;
48581
48584
  }
48582
48585
  const clientId = getOAuthClientId();
48586
+ outputChannelLogger.logDebug("device-auth", "Initiating device authorization request", {
48587
+ device_authorization_endpoint: oidcConfig.device_authorization_endpoint,
48588
+ clientId
48589
+ });
48583
48590
  try {
48584
- const response = await fetch(oidcConfig.device_authorization_endpoint, {
48591
+ const response = await fetch$2(oidcConfig.device_authorization_endpoint, {
48585
48592
  method: "POST",
48586
48593
  headers: {
48587
48594
  "Content-Type": "application/x-www-form-urlencoded"
@@ -48610,12 +48617,17 @@ async function pollForToken(oidcConfig, deviceCode, interval2, expiresIn, abortS
48610
48617
  const clientId = getOAuthClientId();
48611
48618
  const startTime = Date.now();
48612
48619
  const expirationTime = startTime + expiresIn * 1e3;
48620
+ outputChannelLogger.logDebug("device-auth", "Starting token polling", {
48621
+ token_endpoint: oidcConfig.token_endpoint,
48622
+ expiresIn,
48623
+ interval: interval2
48624
+ });
48613
48625
  let attempts = 0;
48614
48626
  const maxAttempts = Math.ceil(expiresIn / interval2);
48615
48627
  while (Date.now() < expirationTime && attempts < maxAttempts && !abortSignal.aborted) {
48616
48628
  attempts++;
48617
48629
  try {
48618
- const response = await fetch(oidcConfig.token_endpoint, {
48630
+ const response = await fetch$2(oidcConfig.token_endpoint, {
48619
48631
  method: "POST",
48620
48632
  headers: {
48621
48633
  "Content-Type": "application/x-www-form-urlencoded"
@@ -48645,10 +48657,13 @@ async function pollForToken(oidcConfig, deviceCode, interval2, expiresIn, abortS
48645
48657
  newInterval: interval2
48646
48658
  });
48647
48659
  } else if (error.error === "expired_token") {
48648
- outputChannelLogger.logDebug("device-auth", "Device code expired");
48660
+ outputChannelLogger.logError(
48661
+ "device-auth",
48662
+ "Device code expired before user completed authorization"
48663
+ );
48649
48664
  return null;
48650
48665
  } else if (error.error === "access_denied") {
48651
- outputChannelLogger.logDebug("device-auth", "User denied authorization");
48666
+ outputChannelLogger.logError("device-auth", "User denied authorization");
48652
48667
  return null;
48653
48668
  } else {
48654
48669
  outputChannelLogger.logError(
@@ -48674,23 +48689,24 @@ async function pollForToken(oidcConfig, deviceCode, interval2, expiresIn, abortS
48674
48689
  return null;
48675
48690
  }
48676
48691
  }
48677
- outputChannelLogger.logDebug("device-auth", "Token polling timed out", { attempts, expiresIn });
48692
+ outputChannelLogger.logError("device-auth", "Token polling timed out", { attempts, expiresIn });
48678
48693
  return null;
48679
48694
  }
48680
48695
  async function startDeviceAuthFlow(uri, onUserCode, abortSignal) {
48681
48696
  const endpoint = formatURL(uri);
48682
48697
  if (!endpoint) {
48698
+ outputChannelLogger.logError("device-auth", "Invalid endpoint URL", { uri });
48683
48699
  return { type: "failed" };
48684
48700
  }
48685
48701
  telemetryRecorder.recordEvent("cody.auth.device.initiated", "started");
48686
48702
  const oidcConfig = await getOIDCConfiguration(endpoint);
48687
48703
  if (!oidcConfig) {
48688
- outputChannelLogger.logDebug("device-auth", "Failed to get OIDC configuration", { endpoint });
48704
+ outputChannelLogger.logError("device-auth", "Failed to get OIDC configuration", { endpoint });
48689
48705
  return { type: "failed" };
48690
48706
  }
48691
48707
  const deviceAuth = await initiateDeviceAuth(oidcConfig);
48692
48708
  if (!deviceAuth) {
48693
- outputChannelLogger.logDebug("device-auth", "Device auth not supported", { endpoint });
48709
+ outputChannelLogger.logError("device-auth", "Device auth initiation failed", { endpoint });
48694
48710
  return { type: "failed" };
48695
48711
  }
48696
48712
  const deviceUrl = deviceAuth.verification_uri_complete || `${deviceAuth.verification_uri}?user_code=${encodeURIComponent(deviceAuth.user_code)}`;
@@ -48726,6 +48742,7 @@ async function startDeviceAuthFlow(uri, onUserCode, abortSignal) {
48726
48742
  return Promise.resolve({ type: "cancelled", authStatus: status });
48727
48743
  }
48728
48744
  if (!tokenResponse) {
48745
+ outputChannelLogger.logError("device-auth", "Token polling failed", { endpoint });
48729
48746
  telemetryRecorder.recordEvent("cody.auth.device.failed", "failed");
48730
48747
  return { type: "failed" };
48731
48748
  }
@@ -48742,6 +48759,9 @@ async function startDeviceAuthFlow(uri, onUserCode, abortSignal) {
48742
48759
  await secretStorage.store(endpoint + "cody.access-token.source", "oauth");
48743
48760
  const deviceAuthCredential = new OAuthCredential(endpoint, secretStorage);
48744
48761
  if (!deviceAuthCredential) {
48762
+ outputChannelLogger.logError("device-auth", "Failed to create OAuth credential", {
48763
+ endpoint
48764
+ });
48745
48765
  telemetryRecorder.recordEvent("cody.auth.device.failed", "failed");
48746
48766
  return { type: "failed" };
48747
48767
  }
@@ -48921,7 +48941,7 @@ function registerAuthDebugCommands(disposables) {
48921
48941
  if (authStatus2.authenticated && authStatus2.endpoint === endpoint) {
48922
48942
  tokenInfo = "In memory (HeaderCredential)";
48923
48943
  try {
48924
- const config = await import("./index-CDrWlDvL.mjs").then(
48944
+ const config = await import("./index-C-VpKDM8.mjs").then(
48925
48945
  (m) => m.currentResolvedConfig()
48926
48946
  );
48927
48947
  const currentConfig = await config;
@@ -173271,7 +173291,9 @@ async function hydratePromptText(promptRawText, initialContext) {
173271
173291
  });
173272
173292
  }
173273
173293
  async function hydrateWithCurrentFile(promptText, initialContext) {
173274
- const initialContextFile = initialContext.find((item) => item.type === "file");
173294
+ const initialContextFile = initialContext.find(
173295
+ (item) => item.type === "file" || item.type === "openctx"
173296
+ );
173275
173297
  const currentFileContextItem = initialContextFile ?? await getFileContext();
173276
173298
  if (currentFileContextItem === null) {
173277
173299
  return [promptText, []];
@@ -173285,7 +173307,9 @@ async function hydrateWithCurrentFile(promptText, initialContext) {
173285
173307
  ];
173286
173308
  }
173287
173309
  async function hydrateWithCurrentSelection(promptText, initialContext) {
173288
- const initialContextFile = initialContext.find((item) => item.type === "file");
173310
+ const initialContextFile = initialContext.find(
173311
+ (item) => item.type === "file" || item.type === "openctx"
173312
+ );
173289
173313
  const currentSelection = (initialContextFile == null ? void 0 : initialContextFile.range) ? initialContextFile : (await getSelectionOrFileContext())[0] ?? initialContextFile;
173290
173314
  if (!currentSelection) {
173291
173315
  return [promptText, []];
@@ -173299,7 +173323,9 @@ async function hydrateWithCurrentSelection(promptText, initialContext) {
173299
173323
  ];
173300
173324
  }
173301
173325
  async function hydrateWithCurrentSelectionLegacy(promptText, initialContext) {
173302
- const initialContextFile = initialContext.find((item) => item.type === "file" && item.range);
173326
+ const initialContextFile = initialContext.find(
173327
+ (item) => (item.type === "file" || item.type === "openctx") && item.range
173328
+ );
173303
173329
  const currentSelection = initialContextFile ?? (await getSelectionOrFileContext())[0];
173304
173330
  if (!currentSelection) {
173305
173331
  return [promptText, []];
@@ -188032,10 +188058,15 @@ function createRemoteFileProvider(customTitle) {
188032
188058
  if (!((_a3 = mention == null ? void 0 : mention.data) == null ? void 0 : _a3.repoName) || !((_b2 = mention == null ? void 0 : mention.data) == null ? void 0 : _b2.filePath)) {
188033
188059
  return [];
188034
188060
  }
188061
+ const range = mention.data.startLine !== void 0 && mention.data.endLine !== void 0 ? {
188062
+ startLine: mention.data.startLine,
188063
+ endLine: mention.data.endLine
188064
+ } : void 0;
188035
188065
  return await getFileItem(
188036
188066
  mention.data.repoName,
188037
188067
  mention.data.filePath,
188038
- mention.data.rev
188068
+ mention.data.rev,
188069
+ range
188039
188070
  );
188040
188071
  }
188041
188072
  };
@@ -188068,12 +188099,30 @@ async function getFileMentions(repoName, filePath) {
188068
188099
  };
188069
188100
  }).filter(isDefined);
188070
188101
  }
188071
- async function getFileItem(repoName, filePath, rev2 = "HEAD") {
188102
+ async function getFileItem(repoName, filePath, rev2 = "HEAD", range) {
188072
188103
  var _a3, _b2;
188073
188104
  const { auth: auth2 } = await currentResolvedConfig();
188074
- const dataOrError = await graphqlClient.getFileContents(repoName, filePath, rev2);
188075
188105
  const endpoint = auth2.serverEndpoint;
188076
- if (isError$3(dataOrError) || dataOrError === null || !endpoint) {
188106
+ if (!endpoint) {
188107
+ return [];
188108
+ }
188109
+ if (range) {
188110
+ const contentOrError = await graphqlClient.getFileContent(repoName, filePath, rev2, range);
188111
+ if (isError$3(contentOrError)) {
188112
+ return [];
188113
+ }
188114
+ return [
188115
+ {
188116
+ url: `${endpoint.replace(/\/$/, "")}/${repoName}@${rev2}/-/blob/${filePath}`,
188117
+ title: `${repoName}/${filePath}`,
188118
+ ai: {
188119
+ content: contentOrError
188120
+ }
188121
+ }
188122
+ ];
188123
+ }
188124
+ const dataOrError = await graphqlClient.getFileContents(repoName, filePath, rev2);
188125
+ if (isError$3(dataOrError) || dataOrError === null) {
188077
188126
  return [];
188078
188127
  }
188079
188128
  const file = (_b2 = (_a3 = dataOrError == null ? void 0 : dataOrError.repository) == null ? void 0 : _a3.commit) == null ? void 0 : _b2.file;
@@ -188716,13 +188765,20 @@ class ChatController {
188716
188765
  status: "error",
188717
188766
  message: "Device auth failed"
188718
188767
  });
188719
- outputChannelLogger.logDebug(
188720
- "auth",
188721
- "Device auth not available, falling back to traditional auth",
188722
- { endpoint }
188768
+ outputChannelLogger.logError("auth", "OAuth authentication failed", {
188769
+ endpoint
188770
+ });
188771
+ const choice = await window$1.showWarningMessage(
188772
+ "OAuth authentication failed. This may be due to certificate trust issues, network problems, or unsupported server configuration.",
188773
+ { modal: false },
188774
+ "Retry OAuth",
188775
+ "Use Access Token Instead"
188723
188776
  );
188777
+ if (choice === "Use Access Token Instead") {
188778
+ return redirectToEndpointLogin(endpoint);
188779
+ }
188780
+ return;
188724
188781
  }
188725
- return redirectToEndpointLogin(endpoint);
188726
188782
  }
188727
188783
  await authProvider.validateAndStoreCredentials(auth2, "always-store");
188728
188784
  } catch (error) {
@@ -191308,8 +191364,8 @@ function parseMentionURI(uri) {
191308
191364
  }
191309
191365
  }
191310
191366
  async function execFileAsync(program2, args2, { cwd }) {
191311
- const { promisify } = await import("./util-DSBgjmTR.mjs").then((n) => n.u);
191312
- const { execFile } = await import("./vscode-shim-BM22pmQn.mjs").then((n) => n.gA);
191367
+ const { promisify } = await import("./util-CyrrUWO_.mjs").then((n) => n.u);
191368
+ const { execFile } = await import("./vscode-shim-BytjAIYm.mjs").then((n) => n.gA);
191313
191369
  return promisify(execFile)(program2, args2, { cwd });
191314
191370
  }
191315
191371
  var __create = Object.create;
@@ -1,2 +1,2 @@
1
- import "./agent.worker-Di-hO351.mjs";
2
- import "./vscode-shim-BM22pmQn.mjs";
1
+ import "./agent.worker-DHasPDnb.mjs";
2
+ import "./vscode-shim-BytjAIYm.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-BM22pmQn.mjs";
1
+ import { w as wrapInActiveSpan, p as path, U as Uri, C as ContextItemSource, s as spawn } from "./vscode-shim-BytjAIYm.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,7 +1,7 @@
1
- import { O as Ollama$1, c as contextFiltersProvider, C as CompletionStopReason, M as ModelUsage, e as enableMapSet } from "./agent.worker-Di-hO351.mjs";
2
- import { A, B, k, R, au, D, E, F, an, w, x, a9, aw, N, y, v, P, G, U, z, L, Q, S, ab, W, Y, T, _, a5, ad, a6, a, d, a7, aq, a3, ao, aA, q, a1, n, am, ap, $, av, l, f, g, a0, o, X, ar, as, h, i, a8, a4, ac, m, aa, H, u, at, r, p, ae, al, aj, af, ah, ak, ai, ag, s, az, ay, ax, a2, V, t, j, Z, K, J, I } from "./agent.worker-Di-hO351.mjs";
3
- import { i as isAbortError, a as isError, b as isDefined, M as ModelTag, c as URI, d as isWindows } from "./vscode-shim-BM22pmQn.mjs";
4
- import { bB, bD, bC, bV, ai as ai2, aj as aj2, ak as ak2, al as al2, bN, bP, db, b5, e, c3, bQ, bU, bT, C, g as g2, af as af2, ah as ah2, D as D2, h as h2, cq, aG, bS, bR, am as am2, bO, aY, F as F2, a2 as a22, G as G2, b4, b6, aK, a6 as a62, a5 as a52, I as I2, aF, an as an2, L as L2, aL, cr, cv, N as N2, ao as ao2, ap as ap2, aM, P as P2, aH, bE, b2, b1, b0, b8, aq as aq2, S as S2, aZ, aC, c4, aN, ar as ar2, as as as2, dl, dk, b3, cT, bM, aa as aa2, ae as ae2, ba, bw, cl, H as H2, aP, de, cU, dc, d7, ct, cQ, cR, cb, ca, bZ, aQ, cz, cd, bf, a4 as a42, bc, bb, aR, df, dg, dh, b7, d5, cP, j as j2, B as B2, cW, bm, bh, c6, m as m2, T as T2, W as W2, Y as Y2, V as V2, Z as Z2, n as n2, cf, cy, cF, c2, c1, o as o2, x as x2, bA, a3 as a32, bI, cX, b$, cE, di, d1, ci, $ as $2, a0 as a02, cp, cw, bv, bL, ac as ac2, ab as ab2, bq, bo, bp, c9, by, bJ, aD, a1 as a12, b_, at as at2, au as au2, av as av2, aw as aw2, aJ, ag as ag2, k as k2, J as J2, ax as ax2, E as E2, y as y2, ay as ay2, az as az2, aA as aA2, aE, aB, bi, bd, c7, c8, bH, be, q as q2, u as u2, cS, a7 as a72, a8 as a82, bx, v as v2, cu, aW, cs, cM, dj, da, d6, aS, aO, cg, ch, bn, aX, a$, aU, bk, A as A2, c_, cB, cA, l as l2, z as z2, cI, aT, co, cn, b9, bF, bG, cm, bz, r as r2, d4, cZ, bl, bj, aV, bg, c5, bY, bX, dd, d8, ad as ad2, _ as _2, d9, aI, a9 as a92, a_, d2, d3, cC, cL, d0, cJ, cO, ce, cN, c$, cK, cD, cG, cH, bs, br, cc, cY, c0, cj, bK, t as t2, bW, bu, bt, K as K2, O, Q as Q2, X as X2, R as R2, cx, ck, f as f2, cV, w as w2 } from "./vscode-shim-BM22pmQn.mjs";
1
+ import { O as Ollama$1, c as contextFiltersProvider, C as CompletionStopReason, M as ModelUsage, e as enableMapSet } from "./agent.worker-DHasPDnb.mjs";
2
+ import { A, B, k, R, au, D, E, F, an, w, x, a9, aw, N, y, v, P, G, U, z, L, Q, S, ab, W, Y, T, _, a5, ad, a6, a, d, a7, aq, a3, ao, aA, q, a1, n, am, ap, $, av, l, f, g, a0, o, X, ar, as, h, i, a8, a4, ac, m, aa, H, u, at, r, p, ae, al, aj, af, ah, ak, ai, ag, s, az, ay, ax, a2, V, t, j, Z, K, J, I } from "./agent.worker-DHasPDnb.mjs";
3
+ import { i as isAbortError, a as isError, b as isDefined, M as ModelTag, c as URI, d as isWindows } from "./vscode-shim-BytjAIYm.mjs";
4
+ import { bB, bD, bC, bV, ai as ai2, aj as aj2, ak as ak2, al as al2, bN, bP, db, b5, e, c3, bQ, bU, bT, C, g as g2, af as af2, ah as ah2, D as D2, h as h2, cq, aG, bS, bR, am as am2, bO, aY, F as F2, a2 as a22, G as G2, b4, b6, aK, a6 as a62, a5 as a52, I as I2, aF, an as an2, L as L2, aL, cr, cv, N as N2, ao as ao2, ap as ap2, aM, P as P2, aH, bE, b2, b1, b0, b8, aq as aq2, S as S2, aZ, aC, c4, aN, ar as ar2, as as as2, dl, dk, b3, cT, bM, aa as aa2, ae as ae2, ba, bw, cl, H as H2, aP, de, cU, dc, d7, ct, cQ, cR, cb, ca, bZ, aQ, cz, cd, bf, a4 as a42, bc, bb, aR, df, dg, dh, b7, d5, cP, j as j2, B as B2, cW, bm, bh, c6, m as m2, T as T2, W as W2, Y as Y2, V as V2, Z as Z2, n as n2, cf, cy, cF, c2, c1, o as o2, x as x2, bA, a3 as a32, bI, cX, b$, cE, di, d1, ci, $ as $2, a0 as a02, cp, cw, bv, bL, ac as ac2, ab as ab2, bq, bo, bp, c9, by, bJ, aD, a1 as a12, b_, at as at2, au as au2, av as av2, aw as aw2, aJ, ag as ag2, k as k2, J as J2, ax as ax2, E as E2, y as y2, ay as ay2, az as az2, aA as aA2, aE, aB, bi, bd, c7, c8, bH, be, q as q2, u as u2, cS, a7 as a72, a8 as a82, bx, v as v2, cu, aW, cs, cM, dj, da, d6, aS, aO, cg, ch, bn, aX, a$, aU, bk, A as A2, c_, cB, cA, l as l2, z as z2, cI, aT, co, cn, b9, bF, bG, cm, bz, r as r2, d4, cZ, bl, bj, aV, bg, c5, bY, bX, dd, d8, ad as ad2, _ as _2, d9, aI, a9 as a92, a_, d2, d3, cC, cL, d0, cJ, cO, ce, cN, c$, cK, cD, cG, cH, bs, br, cc, cY, c0, cj, bK, t as t2, bW, bu, bt, K as K2, O, Q as Q2, X as X2, R as R2, cx, ck, f as f2, cV, w as w2 } from "./vscode-shim-BytjAIYm.mjs";
5
5
  function createOllamaClient(ollamaOptions, logger, logDebug) {
6
6
  async function* complete(params, abortController) {
7
7
  const url = new URL(ollamaOptions.url).href;