@sourcegraph/cody-web 0.32.11 → 0.32.12
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 +201 -0
- package/dist/{agent.worker-Qda9Vtb_.mjs → agent.worker-DP5t54b3.mjs} +89 -38
- package/dist/agent.worker.js +2 -2
- package/dist/{git-log-DkGd4KuH.mjs → git-log-BWXBE9bQ.mjs} +1 -1
- package/dist/index.js +61 -8
- package/dist/{lite-IdTumKP8.mjs → lite-DCslm11Y.mjs} +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/util-n4JO9qgH.mjs +2033 -0
- package/dist/{vscode-shim-B21LtK8E.mjs → vscode-shim-FP11UcS5.mjs} +65 -66
- package/package.json +17 -15
- package/dist/util-Bw-hmK0e.mjs +0 -1811
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 _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, aW as unsubscribe, aX as AsyncSerialScheduler, aY as authStatus, aZ as pick, a_ as distinctUntilChanged$1, a$ as switchMapReplayOperation, b0 as pendingOperation, b1 as promiseFactoryToObservable, J as map$1, ad as isError$3, P as isDotCom, b2 as retry$1, b3 as logError$2, aI as firstResultFromOperation, b4 as graphqlClient, b5 as semver, b6 as debounceTime, b7 as interval, b8 as filter$2, b9 as startWith$1, ba as switchMap$1, ax as firstValueFrom$1, ay as skipPendingOperation, bb as logDebug$1, bc as isAbortError, am as ModelTag, bd as getModelInfo, be as CHAT_INPUT_TOKEN_BUDGET, bf as CHAT_OUTPUT_TOKEN_BUDGET, bg as EXTENDED_CHAT_INPUT_TOKEN_BUDGET, bh as EXTENDED_USER_CONTEXT_TOKEN_BUDGET, ac as LRUCache$1, bi as TRANSIENT_REFETCH_INTERVAL_HINT, bj as createSubscriber, bk as fromVSCodeEvent, D as isEqual, bl as cenv, ag as lodashExports, bm as EXCLUDE_EVERYTHING_CONTEXT_FILTERS, bn as currentAuthStatus, bo as isFileURI, w as wrapInActiveSpan, bp as INCLUDE_EVERYTHING_CONTEXT_FILTERS, bq as onAbort, br as addCodyClientIdentificationHeaders, bs as addTraceparent, bt as addAuthHeaders, bu as fetch$2, bv as verifyResponseCode, H as combineLatest$1, bw as take$2, bx as clientCapabilities, by as shareReplay$1, bz as tap$2, bA as featureFlagProvider, $ as FeatureFlag, a7 as isCodyProUser, bB as isFreeUser, bC as telemetryRecorder, bD as getEnterpriseContextWindow, bE as ANSWER_TOKENS, bF as currentAuthStatusOrNotReadyYet, bG as mockAuthStatus, bH as storeLastValue, bI as resolvedConfig, bJ as userProductSubscription, bK as isEnterpriseUser, bL as ps, bM as GuardrailsMode, bN as currentResolvedConfig, aS 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, 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, X as isSourcegraphToken, aG as v4, cA as CONFIG_KEY, aP 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, V 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, aK as isWorkspaceInstance, d0 as getAuthHeaders, d1 as toLightweightChatTranscript, d2 as SUPPORTED_URI_SCHEMAS, d3 as _baseIsEqual, d4 as keys_1, d5 as _baseGet, d6 as _castPath, d7 as isLength_1, d8 as _toKey, d9 as _isKey, da as toNumber_1, db as _baseFindIndex, dc as require$$0$2, dd as NetworkError, de as isRateLimitError, Q as isAuthError, df as FileType, dg as dedent$1, dh as FoldingRange, di as CancellationTokenSource, dj as SymbolKind, dk as convertGitCloneURLToCodebaseName, ai as isDefined, dl as pluck, dm as toRangeData, dn as Position, dp as DefaultChatCommands, dq as pathFunctionsForURI, dr as uriParseNameAndExtension, ds as uriDirname, dt as Utils$1, du as uriExtname, dv as uriBasename, dw as DefaultEditCommands, dx as subscriptionDisposable, dy as updateGlobalTelemetryInstances, dz as TelemetryRecorderProvider, dA as telemetryRecorderProvider, dB as createGitDiff, dC as catchError$1, dD as AgentWorkspaceEdit, dE as TextDocumentChangeReason, dF as omit$1, dG as displayPathWithoutWorkspaceFolderPrefix, dH as getEditorInsertSpaces, dI as escapeRegExp$1, dJ as TimeoutError, dK as isNetworkError, dL as http, dM as open, dN as defer$2, dO as merge$2, dP as ruleSearchPaths, dQ as isRuleFilename, dR as parseRuleFile, dS as languageFromFilename, f as displayLineRange, e as displayPath, dT as ruleTitle, as as isCodyProModel, dU as debounce_1,
|
|
22
|
-
import {
|
|
21
|
+
import { O as Observable, aW as unsubscribe, aX as AsyncSerialScheduler, aY as authStatus, aZ as pick, a_ as distinctUntilChanged$1, a$ as switchMapReplayOperation, b0 as pendingOperation, b1 as promiseFactoryToObservable, J as map$1, ad as isError$3, P as isDotCom, b2 as retry$1, b3 as logError$2, aI as firstResultFromOperation, b4 as graphqlClient, b5 as semver, b6 as debounceTime, b7 as interval, b8 as filter$2, b9 as startWith$1, ba as switchMap$1, ax as firstValueFrom$1, ay as skipPendingOperation, bb as logDebug$1, bc as isAbortError, am as ModelTag, bd as getModelInfo, be as CHAT_INPUT_TOKEN_BUDGET, bf as CHAT_OUTPUT_TOKEN_BUDGET, bg as EXTENDED_CHAT_INPUT_TOKEN_BUDGET, bh as EXTENDED_USER_CONTEXT_TOKEN_BUDGET, ac as LRUCache$1, bi as TRANSIENT_REFETCH_INTERVAL_HINT, bj as createSubscriber, bk as fromVSCodeEvent, D as isEqual, bl as cenv, ag as lodashExports, bm as EXCLUDE_EVERYTHING_CONTEXT_FILTERS, bn as currentAuthStatus, bo as isFileURI, w as wrapInActiveSpan, bp as INCLUDE_EVERYTHING_CONTEXT_FILTERS, bq as onAbort, br as addCodyClientIdentificationHeaders, bs as addTraceparent, bt as addAuthHeaders, bu as fetch$2, bv as verifyResponseCode, H as combineLatest$1, bw as take$2, bx as clientCapabilities, by as shareReplay$1, bz as tap$2, bA as featureFlagProvider, $ as FeatureFlag, a7 as isCodyProUser, bB as isFreeUser, bC as telemetryRecorder, bD as getEnterpriseContextWindow, bE as ANSWER_TOKENS, bF as currentAuthStatusOrNotReadyYet, bG as mockAuthStatus, bH as storeLastValue, bI as resolvedConfig, bJ as userProductSubscription, bK as isEnterpriseUser, bL as ps, bM as GuardrailsMode, bN as currentResolvedConfig, aS 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, 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, X as isSourcegraphToken, aG as v4, cA as CONFIG_KEY, aP 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, V 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, aK as isWorkspaceInstance, d0 as getAuthHeaders, d1 as toLightweightChatTranscript, d2 as SUPPORTED_URI_SCHEMAS, d3 as _baseIsEqual, d4 as keys_1, d5 as _baseGet, d6 as _castPath, d7 as isLength_1, d8 as _toKey, d9 as _isKey, da as toNumber_1, db as _baseFindIndex, dc as require$$0$2, dd as NetworkError, de as isRateLimitError, Q as isAuthError, df as FileType, dg as dedent$1, dh as FoldingRange, di as CancellationTokenSource, dj as SymbolKind, dk as convertGitCloneURLToCodebaseName, ai as isDefined, dl as pluck, dm as toRangeData, dn as Position, dp as DefaultChatCommands, dq as pathFunctionsForURI, dr as uriParseNameAndExtension, ds as uriDirname, dt as Utils$1, du as uriExtname, dv as uriBasename, dw as DefaultEditCommands, dx as subscriptionDisposable, dy as updateGlobalTelemetryInstances, dz as TelemetryRecorderProvider, dA as telemetryRecorderProvider, dB as createGitDiff, dC as catchError$1, dD as AgentWorkspaceEdit, dE as TextDocumentChangeReason, dF as omit$1, dG as displayPathWithoutWorkspaceFolderPrefix, dH as getEditorInsertSpaces, dI as escapeRegExp$1, dJ as TimeoutError, dK as isNetworkError, dL as http, dM as open, dN as defer$2, dO as merge$2, dP as ruleSearchPaths, dQ as isRuleFilename, dR as parseRuleFile, dS as languageFromFilename, f as displayLineRange, e as displayPath, dT as ruleTitle, as as isCodyProModel, dU as debounce_1, aR as isErrorLike, dV as isWindows, dW as GLOBAL_SEARCH_PROVIDER_URI, dX as mentionProvidersMetadata, dY as currentUserProductSubscription, dZ as checkIfEnterpriseUser, d_ as ThemeColor, d$ as QuickInputButtons, E as scanForMentionTriggerInUserTextInput, u as parseMentionQuery, L as LARGE_FILE_WARNING_LABEL, e0 as GENERAL_HELP_LABEL, a9 as CodyTaskState, e1 as CodeLens, e2 as defaultWebviewPanel, x as createExtensionAPI, y as createMessageAPIForWebview, e3 as EndOfLine, e4 as ViewColumn, e5 as Location, e6 as onDidChangeActiveTextEditor, e7 as tabGroups, e8 as workspaceTextDocuments, e9 as visibleTextEditors, ea as onDidChangeVisibleTextEditors, eb as fs, ec as onDidCloseTextDocument, ed as setCreateWebviewPanel, ee as getAugmentedNamespace, ef as extensionConfiguration, eg as main$1, eh as setAgent, ei as setWorkspaceDocuments, ej as setLastOpenedWorkspaceFolder, ek as onDidRegisterNewCodeActionProvider, el as onDidUnregisterNewCodeActionProvider, em as onDidRegisterNewCodeLensProvider, en as onDidUnregisterNewCodeLensProvider, eo as setClientInfo, ep as AgentWorkspaceConfiguration, eq as firstNonPendingAuthStatus, er as workspaceFolders$1, es as setWorkspaceFolders, et as onDidChangeWorkspaceFolders, eu as onDidChangeWindowState, ev as onDidOpenTextDocument, ew as onDidSaveTextDocument, ex as onDidRenameFiles, ey as packageJson, ez as progressBars, eA as CodeActionTriggerKind, eB as CodeAction, eC as UriString, eD as DiagnosticSeverity, eE as diagnostics, eF as isIntegrationTesting, eG as TESTING_TELEMETRY_EXPORTER, eH as dist, eI as completionProvider, eJ as InlineCompletionTriggerKind, eK as currentAuthStatusAuthed, eL as waitUntilComplete, eM as setExtensionConfiguration, eN as onDidChangeConfiguration, eO as onDidChangeTextDocument, eP as onDidChangeTextEditorSelection, eQ as isTokenOrEndpointChange, at as isMacOS, av as CustomCommandType, eR as RelativePattern, aQ as setDisplayPathEnvInfo, aM 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 _, aH as deserializeContextItem, fb as editorStateFromPromptString, fc as _baseGetTag, al as isAbortErrorOrSocketHangUp, fd as inputTextWithoutContextChipsFromPromptEditorState, an as DeepCodyAgentID, fe as exec, s as spawn, aC as UIToolStatus, i as displayPathBasename, ff as expandToLineRange, fg as openctxController, fh as openCtxProviderMetadata, fi as CODY_PASSTHROUGH_VSCODE_OPEN_COMMAND_ID, aE as diffWithLineNum, aF as UITerminalOutputType, fj as getPlatform$1, fk as PromptMode, fl as skip$1, Z as context, fm as extractContextFromTraceparent, fn as isContextWindowLimitError, q as serializeContextItem, K as forceHydration, ak as reformatBotMessageForChat, M as hydrateAfterPostMessage, fo as addMessageListenersForExtensionAPI, fp as createMessageAPIForExtension, ar as View, aJ as ChatHistoryType, fq as CodeActionKind, aB 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, aO as browser$4 } from "./vscode-shim-FP11UcS5.mjs";
|
|
22
|
+
import { r as requireUtil, i as inherits_browserExports, a as utilExports } from "./util-n4JO9qgH.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");
|
|
@@ -8161,7 +8161,7 @@ async function getTokenCounterUtils() {
|
|
|
8161
8161
|
const browser2 = detect();
|
|
8162
8162
|
if (browser2 && browser2.name === "safari") {
|
|
8163
8163
|
_tokenCounterUtilsPromise = import("./cl100k_base-B4kyDDRQ.mjs").then(async (tokenizer2) => {
|
|
8164
|
-
const tiktoken = await import("./lite-
|
|
8164
|
+
const tiktoken = await import("./lite-DCslm11Y.mjs");
|
|
8165
8165
|
return createTokenCounterUtils(new tiktoken.Tiktoken(tokenizer2.default));
|
|
8166
8166
|
});
|
|
8167
8167
|
} else {
|
|
@@ -20864,7 +20864,7 @@ function requireBuffer_list() {
|
|
|
20864
20864
|
return String(input);
|
|
20865
20865
|
}
|
|
20866
20866
|
var _require = requireBuffer(), Buffer2 = _require.Buffer;
|
|
20867
|
-
var _require2 =
|
|
20867
|
+
var _require2 = requireUtil(), inspect = _require2.inspect;
|
|
20868
20868
|
var custom2 = inspect && inspect.custom || "inspect";
|
|
20869
20869
|
function copyBuffer(src, target, offset2) {
|
|
20870
20870
|
Buffer2.prototype.copy.call(src, target, offset2);
|
|
@@ -22456,9 +22456,9 @@ function require_stream_readable() {
|
|
|
22456
22456
|
function _isUint8Array(obj) {
|
|
22457
22457
|
return Buffer2.isBuffer(obj) || obj instanceof OurUint8Array;
|
|
22458
22458
|
}
|
|
22459
|
-
var debugUtil =
|
|
22459
|
+
var debugUtil = requireUtil();
|
|
22460
22460
|
var debug2;
|
|
22461
|
-
if (debugUtil.debuglog) {
|
|
22461
|
+
if (debugUtil && debugUtil.debuglog) {
|
|
22462
22462
|
debug2 = debugUtil.debuglog("stream");
|
|
22463
22463
|
} else {
|
|
22464
22464
|
debug2 = function debug22() {
|
|
@@ -23990,6 +23990,11 @@ class LocalStorage {
|
|
|
23990
23990
|
async setAutoeditBetaEnrollment() {
|
|
23991
23991
|
await this.set(this.AUTO_EDITS_BETA_ENROLLED, true);
|
|
23992
23992
|
}
|
|
23993
|
+
async resetStorage() {
|
|
23994
|
+
for (const key2 of this.storage.keys()) {
|
|
23995
|
+
await this.storage.update(key2, void 0);
|
|
23996
|
+
}
|
|
23997
|
+
}
|
|
23993
23998
|
async setGitHubRepoAccessibility(data) {
|
|
23994
23999
|
await this.set(this.GIT_REPO_ACCESSIBILITY_KEY, data);
|
|
23995
24000
|
}
|
|
@@ -24412,6 +24417,13 @@ async function serializeConfigSnapshot(uninstall) {
|
|
|
24412
24417
|
await ensureDirectoryExists(directory);
|
|
24413
24418
|
await writeSnapshot(directory, CONFIG_FILE, uninstall);
|
|
24414
24419
|
}
|
|
24420
|
+
let cached;
|
|
24421
|
+
function isRunningInsideAgent() {
|
|
24422
|
+
if (cached === void 0) {
|
|
24423
|
+
cached = workspace.getConfiguration().get("cody.advanced.agent.running", false);
|
|
24424
|
+
}
|
|
24425
|
+
return cached;
|
|
24426
|
+
}
|
|
24415
24427
|
const version = ((_i = (_h = extensions.getExtension("sourcegraph.cody-ai")) == null ? void 0 : _h.packageJSON) == null ? void 0 : _i.version) ?? version$2;
|
|
24416
24428
|
setExtensionVersion(version);
|
|
24417
24429
|
const HAS_AUTHENTICATED_BEFORE_KEY = "has-authenticated-before";
|
|
@@ -24480,7 +24492,9 @@ class AuthProvider {
|
|
|
24480
24492
|
authStatus.subscribe((authStatus2) => {
|
|
24481
24493
|
try {
|
|
24482
24494
|
this.lastEndpoint = authStatus2.endpoint;
|
|
24483
|
-
|
|
24495
|
+
if (isRunningInsideAgent()) {
|
|
24496
|
+
commands$1.executeCommand("authStatus.update", authStatus2);
|
|
24497
|
+
}
|
|
24484
24498
|
commands$1.executeCommand(
|
|
24485
24499
|
"setContext",
|
|
24486
24500
|
"cody.activated",
|
|
@@ -39014,17 +39028,14 @@ function toVSCodeRange(range) {
|
|
|
39014
39028
|
}
|
|
39015
39029
|
return new Range(range.start.line, range.start.character, range.end.line, range.end.character);
|
|
39016
39030
|
}
|
|
39017
|
-
async function findWorkspaceFiles(
|
|
39018
|
-
|
|
39019
|
-
|
|
39020
|
-
|
|
39021
|
-
|
|
39022
|
-
|
|
39023
|
-
|
|
39024
|
-
|
|
39025
|
-
)
|
|
39026
|
-
)
|
|
39027
|
-
)).flat();
|
|
39031
|
+
async function findWorkspaceFiles() {
|
|
39032
|
+
var _a3;
|
|
39033
|
+
const excludePatterns = await Promise.all(
|
|
39034
|
+
((_a3 = workspace.workspaceFolders) == null ? void 0 : _a3.flatMap((workspaceFolder) => {
|
|
39035
|
+
return getExcludePattern(workspaceFolder);
|
|
39036
|
+
})) ?? []
|
|
39037
|
+
);
|
|
39038
|
+
return workspace.findFiles("**/*", `{${excludePatterns.join(",")}}`);
|
|
39028
39039
|
}
|
|
39029
39040
|
async function getExcludePattern(workspaceFolder) {
|
|
39030
39041
|
const config = workspace.getConfiguration("", workspaceFolder);
|
|
@@ -39039,8 +39050,7 @@ async function getExcludePattern(workspaceFolder) {
|
|
|
39039
39050
|
...gitignoreExclude,
|
|
39040
39051
|
...ignoreExclude
|
|
39041
39052
|
};
|
|
39042
|
-
|
|
39043
|
-
return `{${excludePatterns.join(",")}}`;
|
|
39053
|
+
return Object.keys(mergedExclude).filter((key2) => mergedExclude[key2] === true);
|
|
39044
39054
|
}
|
|
39045
39055
|
async function readIgnoreFile(uri) {
|
|
39046
39056
|
const ignore = {};
|
|
@@ -39050,10 +39060,13 @@ async function readIgnoreFile(uri) {
|
|
|
39050
39060
|
if (line.startsWith("!")) {
|
|
39051
39061
|
continue;
|
|
39052
39062
|
}
|
|
39053
|
-
line = line.replace(/\s*(#.*)?$/, "");
|
|
39063
|
+
line = line.replace(/\s*(#.*)?$/, "").trim();
|
|
39054
39064
|
if (line === "") {
|
|
39055
39065
|
continue;
|
|
39056
39066
|
}
|
|
39067
|
+
if (line.includes(",")) {
|
|
39068
|
+
line = line.replace(",", ".");
|
|
39069
|
+
}
|
|
39057
39070
|
if (line.endsWith("/")) {
|
|
39058
39071
|
line = line.slice(0, -1);
|
|
39059
39072
|
}
|
|
@@ -40503,13 +40516,6 @@ const getInput = async (document2, initialValues, source) => {
|
|
|
40503
40516
|
}
|
|
40504
40517
|
});
|
|
40505
40518
|
};
|
|
40506
|
-
let cached;
|
|
40507
|
-
function isRunningInsideAgent() {
|
|
40508
|
-
if (cached === void 0) {
|
|
40509
|
-
cached = workspace.getConfiguration().get("cody.advanced.agent.running", false);
|
|
40510
|
-
}
|
|
40511
|
-
return cached;
|
|
40512
|
-
}
|
|
40513
40519
|
class ContentProvider {
|
|
40514
40520
|
constructor() {
|
|
40515
40521
|
// This stores the content of the document for each task ID
|
|
@@ -43534,7 +43540,7 @@ function requireLib() {
|
|
|
43534
43540
|
const MurmurHash3 = requireImurmurhash();
|
|
43535
43541
|
const { onExit } = requireCjs();
|
|
43536
43542
|
const path2 = pathBrowserify;
|
|
43537
|
-
const { promisify } =
|
|
43543
|
+
const { promisify } = requireUtil();
|
|
43538
43544
|
const activeFiles = {};
|
|
43539
43545
|
const threadId = function getId() {
|
|
43540
43546
|
try {
|
|
@@ -44637,6 +44643,16 @@ class Agent extends MessageHandler {
|
|
|
44637
44643
|
this.registerNotification("extensionConfiguration/didChange", (config) => {
|
|
44638
44644
|
this.handleConfigChanges(config);
|
|
44639
44645
|
});
|
|
44646
|
+
this.registerNotification("testing/runInAgent", (scenario) => {
|
|
44647
|
+
try {
|
|
44648
|
+
if (scenario === "configuration-test-configuration-update") {
|
|
44649
|
+
const configuration = workspace.getConfiguration();
|
|
44650
|
+
configuration.update("cody.dummy.setting", "random");
|
|
44651
|
+
}
|
|
44652
|
+
} catch (error) {
|
|
44653
|
+
console.error("Error in testing/runInAgent:", error);
|
|
44654
|
+
}
|
|
44655
|
+
});
|
|
44640
44656
|
this.registerRequest("extensionConfiguration/change", async (config) => {
|
|
44641
44657
|
return this.handleConfigChanges(config).then(toProtocolAuthStatus);
|
|
44642
44658
|
});
|
|
@@ -45346,6 +45362,9 @@ class Agent extends MessageHandler {
|
|
|
45346
45362
|
this.registerNotification("secrets/didChange", async ({ key: key2 }) => {
|
|
45347
45363
|
this.secretsDidChange.fire({ key: key2 });
|
|
45348
45364
|
});
|
|
45365
|
+
this.registerNotification("testing/resetStorage", () => {
|
|
45366
|
+
localStorage.resetStorage();
|
|
45367
|
+
});
|
|
45349
45368
|
this.registerAuthenticatedRequest("featureFlags/getFeatureFlag", async ({ flagName }) => {
|
|
45350
45369
|
return featureFlagProvider.evaluateFeatureFlagEphemerally(
|
|
45351
45370
|
FeatureFlag[flagName]
|
|
@@ -46744,7 +46763,7 @@ class CommandsProvider {
|
|
|
46744
46763
|
if (!isFileURI(uri)) {
|
|
46745
46764
|
throw new Error("history only supported on local file paths");
|
|
46746
46765
|
}
|
|
46747
|
-
const { getContextFileFromGitLog } = await import("./git-log-
|
|
46766
|
+
const { getContextFileFromGitLog } = await import("./git-log-BWXBE9bQ.mjs");
|
|
46748
46767
|
return getContextFileFromGitLog(uri, options);
|
|
46749
46768
|
}
|
|
46750
46769
|
dispose() {
|
|
@@ -151708,6 +151727,11 @@ class DefaultCodeCompletionsClient {
|
|
|
151708
151727
|
async complete(params, abortController, providerOptions) {
|
|
151709
151728
|
const { auth: auth2, configuration } = await currentResolvedConfig();
|
|
151710
151729
|
const query2 = new URLSearchParams(getClientInfoQueryParams());
|
|
151730
|
+
const siteVersion2 = await currentSiteVersion();
|
|
151731
|
+
if (isError$3(siteVersion2)) {
|
|
151732
|
+
throw siteVersion2;
|
|
151733
|
+
}
|
|
151734
|
+
query2.append("api-version", String(siteVersion2.codyAPIVersion));
|
|
151711
151735
|
const url = new URL(`/.api/completions/code?${query2.toString()}`, auth2.serverEndpoint);
|
|
151712
151736
|
const log2 = autocompleteLifecycleOutputChannelLogger == null ? void 0 : autocompleteLifecycleOutputChannelLogger.startCompletion(params, url.href);
|
|
151713
151737
|
const { signal: signal2 } = abortController;
|
|
@@ -151791,9 +151815,12 @@ class DefaultCodeCompletionsClient {
|
|
|
151791
151815
|
};
|
|
151792
151816
|
if (isStreamingResponse && isNodeResponse(response)) {
|
|
151793
151817
|
const iterator = createSSEIterator(response.body, {
|
|
151794
|
-
aggregatedCompletionEvent
|
|
151818
|
+
// Disable aggregatedCompletionEvent for deltaText format (API v2+)
|
|
151819
|
+
// since we need all completion events to accumulate the text properly
|
|
151820
|
+
aggregatedCompletionEvent: siteVersion2.codyAPIVersion < 2
|
|
151795
151821
|
});
|
|
151796
151822
|
let chunkIndex = 0;
|
|
151823
|
+
let completionText = "";
|
|
151797
151824
|
for await (const { event: event2, data } of iterator) {
|
|
151798
151825
|
if (event2 === "error") {
|
|
151799
151826
|
throw new TracedError(data, traceId);
|
|
@@ -151809,8 +151836,13 @@ class DefaultCodeCompletionsClient {
|
|
|
151809
151836
|
}
|
|
151810
151837
|
if (event2 === "completion") {
|
|
151811
151838
|
const parsed = JSON.parse(data);
|
|
151839
|
+
if (siteVersion2.codyAPIVersion >= 2) {
|
|
151840
|
+
completionText += parsed.deltaText || "";
|
|
151841
|
+
} else {
|
|
151842
|
+
completionText = parsed.completion || "";
|
|
151843
|
+
}
|
|
151812
151844
|
result.completionResponse = {
|
|
151813
|
-
completion:
|
|
151845
|
+
completion: completionText,
|
|
151814
151846
|
stopReason: parsed.stopReason || CompletionStopReason.StreamingChunk
|
|
151815
151847
|
};
|
|
151816
151848
|
span2.addEvent("yield", {
|
|
@@ -172247,6 +172279,7 @@ class ContextRetriever {
|
|
|
172247
172279
|
"Failed to get locally modified files, falling back to indexed context only",
|
|
172248
172280
|
error
|
|
172249
172281
|
);
|
|
172282
|
+
changedFilesByRoot = localRoots.map(() => []);
|
|
172250
172283
|
}
|
|
172251
172284
|
const [liveContext, indexedContext] = await Promise.all([
|
|
172252
172285
|
this.retrieveLiveContext(query2, rewrittenQuery.rewritten, changedFiles, signal2),
|
|
@@ -172419,7 +172452,8 @@ function filterLocallyModifiedFilesOutOfRemoteContext(roots, localFilesByRoot, r
|
|
|
172419
172452
|
continue;
|
|
172420
172453
|
}
|
|
172421
172454
|
const relLocalFiles = /* @__PURE__ */ new Set();
|
|
172422
|
-
|
|
172455
|
+
const localFiles = localFilesByRoot[i2] || [];
|
|
172456
|
+
for (const localFile of localFiles) {
|
|
172423
172457
|
relLocalFiles.add(path.relative(localRoot.fsPath, localFile));
|
|
172424
172458
|
}
|
|
172425
172459
|
for (const remoteRepo of remoteRepos) {
|
|
@@ -173262,7 +173296,7 @@ function getDeepCodyModel(models) {
|
|
|
173262
173296
|
return matches2.find((m) => m !== void 0) || models.find((m) => m.tags.includes(ModelTag.Speed));
|
|
173263
173297
|
}
|
|
173264
173298
|
var define_process_default$4 = { env: {} };
|
|
173265
|
-
const execAsync =
|
|
173299
|
+
const execAsync = utilExports.promisify(exec);
|
|
173266
173300
|
const HOME_DIR = define_process_default$4.env.HOME || define_process_default$4.env.USERPROFILE || "";
|
|
173267
173301
|
const OUTPUT_WRAPPER = `
|
|
173268
173302
|
Terminal output from the \`{command}\` command enclosed between <OUTPUT0412> tags:
|
|
@@ -186572,6 +186606,20 @@ class ChatController {
|
|
|
186572
186606
|
}
|
|
186573
186607
|
const configForWebview = await this.getConfigForWebview();
|
|
186574
186608
|
const workspaceFolderUris = ((_a3 = workspace.workspaceFolders) == null ? void 0 : _a3.map((folder2) => folder2.uri.toString())) ?? [];
|
|
186609
|
+
let siteHasCodyEnabled = null;
|
|
186610
|
+
let currentUserCodySubscription = null;
|
|
186611
|
+
if (authStatus2.authenticated && !isCodyTesting) {
|
|
186612
|
+
try {
|
|
186613
|
+
const [siteResult, subscriptionResult] = await Promise.all([
|
|
186614
|
+
graphqlClient.getSiteHasCodyEnabled(),
|
|
186615
|
+
graphqlClient.getCurrentUserCodySubscription()
|
|
186616
|
+
]);
|
|
186617
|
+
siteHasCodyEnabled = isError$3(siteResult) ? null : siteResult;
|
|
186618
|
+
currentUserCodySubscription = isError$3(subscriptionResult) ? null : subscriptionResult;
|
|
186619
|
+
} catch (error) {
|
|
186620
|
+
console.error("Failed to fetch additional user data", error);
|
|
186621
|
+
}
|
|
186622
|
+
}
|
|
186575
186623
|
await this.postMessage({
|
|
186576
186624
|
type: "config",
|
|
186577
186625
|
config: configForWebview,
|
|
@@ -186579,7 +186627,9 @@ class ChatController {
|
|
|
186579
186627
|
authStatus: authStatus2,
|
|
186580
186628
|
userProductSubscription: await currentUserProductSubscription(),
|
|
186581
186629
|
workspaceFolderUris,
|
|
186582
|
-
isDotComUser: isDotCom(authStatus2)
|
|
186630
|
+
isDotComUser: isDotCom(authStatus2),
|
|
186631
|
+
siteHasCodyEnabled,
|
|
186632
|
+
currentUserCodySubscription
|
|
186583
186633
|
});
|
|
186584
186634
|
logDebug("ChatController", "updateViewConfig", {
|
|
186585
186635
|
verbose: configForWebview
|
|
@@ -187807,8 +187857,9 @@ function createAutoEditsProvider({
|
|
|
187807
187857
|
handleAutoeditsNotificationForNonEligibleUser(userEligibilityInfo.nonEligibilityReason);
|
|
187808
187858
|
return [];
|
|
187809
187859
|
}
|
|
187860
|
+
const shouldHotStreak = !isRunningInsideAgent() && (autoeditHotStreakEnabled || isHotStreakEnabledInSettings());
|
|
187810
187861
|
const provider = new AutoeditsProvider(chatClient, fixupController, statusBar, {
|
|
187811
|
-
shouldHotStreak
|
|
187862
|
+
shouldHotStreak,
|
|
187812
187863
|
allowUsingWebSocket: autoeditUseWebSocketEnabled
|
|
187813
187864
|
});
|
|
187814
187865
|
return [
|
|
@@ -189156,8 +189207,8 @@ function parseMentionURI(uri) {
|
|
|
189156
189207
|
}
|
|
189157
189208
|
}
|
|
189158
189209
|
async function execFileAsync(program2, args2, { cwd }) {
|
|
189159
|
-
const { promisify } = await import("./util-
|
|
189160
|
-
const { execFile } = await import("./vscode-shim-
|
|
189210
|
+
const { promisify } = await import("./util-n4JO9qgH.mjs").then((n) => n.u);
|
|
189211
|
+
const { execFile } = await import("./vscode-shim-FP11UcS5.mjs").then((n) => n.fR);
|
|
189161
189212
|
return promisify(execFile)(program2, args2, { cwd });
|
|
189162
189213
|
}
|
|
189163
189214
|
var __create = Object.create;
|
package/dist/agent.worker.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import "./agent.worker-
|
|
2
|
-
import "./vscode-shim-
|
|
1
|
+
import "./agent.worker-DP5t54b3.mjs";
|
|
2
|
+
import "./vscode-shim-FP11UcS5.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-
|
|
1
|
+
import { w as wrapInActiveSpan, p as path, U as Uri, C as ContextItemSource, s as spawn } from "./vscode-shim-FP11UcS5.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);
|