@sourcegraph/cody-web 0.37.0 → 0.39.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/dist/{agent.worker-DKy-Dvsz.mjs → agent.worker-Di-hO351.mjs} +126 -127
- package/dist/agent.worker.js +2 -2
- package/dist/{git-log-DigEy5-z.mjs → git-log-BOf0Q_uO.mjs} +1 -1
- package/dist/{index-D8dVdFLY.mjs → index-CDrWlDvL.mjs} +20 -4
- package/dist/index.js +345 -250
- package/dist/lib/components/CodyPromptTemplate.d.ts +8 -0
- package/dist/lib/components/CodyPromptTemplate.d.ts.map +1 -1
- package/dist/lib/components/CodyWebChat.d.ts +8 -0
- package/dist/lib/components/CodyWebChat.d.ts.map +1 -1
- package/dist/{lite-DPjR5uH7.mjs → lite-DCeO0vlV.mjs} +1 -1
- package/dist/style.css +34 -50
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/util-DSBgjmTR.mjs +2033 -0
- package/dist/{vscode-shim-CqAb7AbA.mjs → vscode-shim-BM22pmQn.mjs} +3368 -3445
- package/package.json +15 -17
- package/LICENSE +0 -201
- package/dist/util-BR3OBpy6.mjs +0 -1811
|
@@ -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, du as debounce$1,
|
|
22
|
-
import {
|
|
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";
|
|
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");
|
|
@@ -9935,7 +9935,7 @@ async function getTokenCounterUtils() {
|
|
|
9935
9935
|
const browser2 = detect();
|
|
9936
9936
|
if (browser2 && browser2.name === "safari") {
|
|
9937
9937
|
_tokenCounterUtilsPromise = import("./cl100k_base-B4kyDDRQ.mjs").then(async (tokenizer2) => {
|
|
9938
|
-
const tiktoken = await import("./lite-
|
|
9938
|
+
const tiktoken = await import("./lite-DCeO0vlV.mjs");
|
|
9939
9939
|
return createTokenCounterUtils(new tiktoken.Tiktoken(tokenizer2.default));
|
|
9940
9940
|
});
|
|
9941
9941
|
} else {
|
|
@@ -22638,7 +22638,7 @@ function requireBuffer_list() {
|
|
|
22638
22638
|
return (hint === "string" ? String : Number)(input);
|
|
22639
22639
|
}
|
|
22640
22640
|
var _require = requireBuffer(), Buffer2 = _require.Buffer;
|
|
22641
|
-
var _require2 =
|
|
22641
|
+
var _require2 = requireUtil(), inspect = _require2.inspect;
|
|
22642
22642
|
var custom2 = inspect && inspect.custom || "inspect";
|
|
22643
22643
|
function copyBuffer(src, target, offset2) {
|
|
22644
22644
|
Buffer2.prototype.copy.call(src, target, offset2);
|
|
@@ -24230,7 +24230,7 @@ function require_stream_readable() {
|
|
|
24230
24230
|
function _isUint8Array(obj) {
|
|
24231
24231
|
return Buffer2.isBuffer(obj) || obj instanceof OurUint8Array;
|
|
24232
24232
|
}
|
|
24233
|
-
var debugUtil =
|
|
24233
|
+
var debugUtil = requireUtil();
|
|
24234
24234
|
var debug2;
|
|
24235
24235
|
if (debugUtil && debugUtil.debuglog) {
|
|
24236
24236
|
debug2 = debugUtil.debuglog("stream");
|
|
@@ -25568,6 +25568,9 @@ class VSCodeSecretStorage {
|
|
|
25568
25568
|
async getRefreshToken(endpoint) {
|
|
25569
25569
|
return this.get(endpoint + CODY_REFRESH_TOKEN_SECRET);
|
|
25570
25570
|
}
|
|
25571
|
+
async deleteRefreshToken(endpoint) {
|
|
25572
|
+
await this.secretStorage.delete(endpoint + CODY_REFRESH_TOKEN_SECRET);
|
|
25573
|
+
}
|
|
25571
25574
|
async storeTokenExpiresAt(endpoint, expiresAt) {
|
|
25572
25575
|
await this.store(endpoint + CODY_TOKEN_EXPIRES_AT, expiresAt.toString());
|
|
25573
25576
|
}
|
|
@@ -25575,6 +25578,9 @@ class VSCodeSecretStorage {
|
|
|
25575
25578
|
const expiresAtStr = await this.get(endpoint + CODY_TOKEN_EXPIRES_AT);
|
|
25576
25579
|
return expiresAtStr ? Number.parseInt(expiresAtStr, 10) : void 0;
|
|
25577
25580
|
}
|
|
25581
|
+
async deleteTokenExpiresAt(endpoint) {
|
|
25582
|
+
await this.secretStorage.delete(endpoint + CODY_TOKEN_EXPIRES_AT);
|
|
25583
|
+
}
|
|
25578
25584
|
async delete(key2) {
|
|
25579
25585
|
await this.secretStorage.delete(key2);
|
|
25580
25586
|
}
|
|
@@ -37784,8 +37790,6 @@ function createOrUpdateTelemetryRecorderProvider(isExtensionModeDevOrTest) {
|
|
|
37784
37790
|
}
|
|
37785
37791
|
}
|
|
37786
37792
|
);
|
|
37787
|
-
} else if (!configuration.isRunningInsideAgent || configuration.agentHasPersistentStorage) {
|
|
37788
|
-
telemetryRecorder.recordEvent("cody.extension", "savedLogin");
|
|
37789
37793
|
}
|
|
37790
37794
|
}
|
|
37791
37795
|
})
|
|
@@ -38261,10 +38265,6 @@ async function getSmartApplyModel(authStatus2) {
|
|
|
38261
38265
|
if (isInstantModeEnabled) {
|
|
38262
38266
|
return SMART_APPLY_MODEL_IDENTIFIERS.FireworksQwenCodeDefault;
|
|
38263
38267
|
}
|
|
38264
|
-
if (isS2(authStatus2)) {
|
|
38265
|
-
const defaultModel = "anthropic::2024-10-22::claude-3-5-sonnet-latest";
|
|
38266
|
-
return defaultModel;
|
|
38267
|
-
}
|
|
38268
38268
|
return void 0;
|
|
38269
38269
|
}
|
|
38270
38270
|
async function handleSmartApply({
|
|
@@ -38303,7 +38303,7 @@ async function handleSmartApply({
|
|
|
38303
38303
|
id,
|
|
38304
38304
|
document: document2,
|
|
38305
38305
|
instruction: PromptString.unsafe_fromUserQuery(instruction || ""),
|
|
38306
|
-
model: await getSmartApplyModel(
|
|
38306
|
+
model: await getSmartApplyModel(),
|
|
38307
38307
|
replacement: code18,
|
|
38308
38308
|
isNewFile,
|
|
38309
38309
|
traceparent
|
|
@@ -38326,7 +38326,7 @@ async function handleSmartApply({
|
|
|
38326
38326
|
id,
|
|
38327
38327
|
document: document2,
|
|
38328
38328
|
instruction: PromptString.unsafe_fromUserQuery(instruction || ""),
|
|
38329
|
-
model: await getSmartApplyModel(
|
|
38329
|
+
model: await getSmartApplyModel(),
|
|
38330
38330
|
replacement: code18,
|
|
38331
38331
|
isNewFile,
|
|
38332
38332
|
traceparent
|
|
@@ -38378,7 +38378,7 @@ async function isCodeFromChatCodeBlockAction(newCode) {
|
|
|
38378
38378
|
}
|
|
38379
38379
|
return { ...storedCode, operation: "paste" };
|
|
38380
38380
|
}
|
|
38381
|
-
const LOG_INTERVAL
|
|
38381
|
+
const LOG_INTERVAL = 30 * 60 * 1e3;
|
|
38382
38382
|
const RAPID_CHANGE_TIMEOUT = 15;
|
|
38383
38383
|
const SELECTION_TIMEOUT = 5e3;
|
|
38384
38384
|
const changeBoundaries = {
|
|
@@ -38454,7 +38454,7 @@ const _CharactersLogger = class _CharactersLogger {
|
|
|
38454
38454
|
);
|
|
38455
38455
|
this.windowFocused = window2.state.focused;
|
|
38456
38456
|
this.activeTextEditor = window2.activeTextEditor;
|
|
38457
|
-
this.nextTimeoutId = setTimeout(() => this.flush(), LOG_INTERVAL
|
|
38457
|
+
this.nextTimeoutId = setTimeout(() => this.flush(), LOG_INTERVAL);
|
|
38458
38458
|
}
|
|
38459
38459
|
flush() {
|
|
38460
38460
|
try {
|
|
@@ -38472,7 +38472,7 @@ const _CharactersLogger = class _CharactersLogger {
|
|
|
38472
38472
|
} finally {
|
|
38473
38473
|
this.changeCounters = { ...DEFAULT_COUNTERS };
|
|
38474
38474
|
if (!this.isDisposed) {
|
|
38475
|
-
this.nextTimeoutId = setTimeout(() => this.flush(), LOG_INTERVAL
|
|
38475
|
+
this.nextTimeoutId = setTimeout(() => this.flush(), LOG_INTERVAL);
|
|
38476
38476
|
}
|
|
38477
38477
|
}
|
|
38478
38478
|
}
|
|
@@ -38734,63 +38734,6 @@ async function measureLatencyToUri(headers, uri) {
|
|
|
38734
38734
|
return { error };
|
|
38735
38735
|
}
|
|
38736
38736
|
}
|
|
38737
|
-
const LOG_INTERVAL = 30 * 60 * 1e3;
|
|
38738
|
-
const AUTOCOMPLETE_STAGE_COUNTER_INITIAL_STATE = {
|
|
38739
|
-
preLastCandidate: 0,
|
|
38740
|
-
preCache: 0,
|
|
38741
|
-
preSmartThrottle: 0,
|
|
38742
|
-
preDebounce: 0,
|
|
38743
|
-
preContextRetrieval: 0,
|
|
38744
|
-
preNetworkRequest: 0,
|
|
38745
|
-
preFinalCancellationCheck: 0,
|
|
38746
|
-
preVisibilityCheck: 0
|
|
38747
|
-
};
|
|
38748
|
-
class AutocompleteStageCounter {
|
|
38749
|
-
constructor() {
|
|
38750
|
-
__publicField2(this, "nextTimeoutId", null);
|
|
38751
|
-
__publicField2(this, "providerModel", null);
|
|
38752
|
-
__publicField2(this, "currentState", { ...AUTOCOMPLETE_STAGE_COUNTER_INITIAL_STATE });
|
|
38753
|
-
this.nextTimeoutId = setTimeout(() => this.flush(), LOG_INTERVAL);
|
|
38754
|
-
}
|
|
38755
|
-
setProviderModel(providerModel) {
|
|
38756
|
-
if (this.providerModel !== null && this.providerModel !== providerModel) {
|
|
38757
|
-
this.flush();
|
|
38758
|
-
}
|
|
38759
|
-
this.providerModel = providerModel;
|
|
38760
|
-
}
|
|
38761
|
-
//
|
|
38762
|
-
//
|
|
38763
|
-
flush() {
|
|
38764
|
-
this.nextTimeoutId = null;
|
|
38765
|
-
const stateToLog = this.currentState;
|
|
38766
|
-
this.currentState = { ...AUTOCOMPLETE_STAGE_COUNTER_INITIAL_STATE };
|
|
38767
|
-
if (Object.values(stateToLog).some((count) => count > 0)) {
|
|
38768
|
-
telemetryRecorder.recordEvent("cody.completion.stageCounter", "flush", {
|
|
38769
|
-
metadata: stateToLog,
|
|
38770
|
-
privateMetadata: { providerModel: this.providerModel }
|
|
38771
|
-
});
|
|
38772
|
-
}
|
|
38773
|
-
this.nextTimeoutId = setTimeout(() => this.flush(), LOG_INTERVAL);
|
|
38774
|
-
}
|
|
38775
|
-
/**
|
|
38776
|
-
* Records the occurrence of a specific stage in the autocompletion generation pipeline.
|
|
38777
|
-
*/
|
|
38778
|
-
record(state2) {
|
|
38779
|
-
if (!this.providerModel) {
|
|
38780
|
-
return;
|
|
38781
|
-
}
|
|
38782
|
-
this.currentState[state2]++;
|
|
38783
|
-
}
|
|
38784
|
-
//
|
|
38785
|
-
// Like the code above, you can reuse the code outside the XML tags to detect the functionality, formats, style, patterns, and logics in use. Then, use what you detect and reuse methods/libraries to complete and enclose completed code only inside XML tags precisely without duplicating existing implementations. Here is the code:
|
|
38786
|
-
dispose() {
|
|
38787
|
-
this.flush();
|
|
38788
|
-
if (this.nextTimeoutId) {
|
|
38789
|
-
clearTimeout(this.nextTimeoutId);
|
|
38790
|
-
}
|
|
38791
|
-
}
|
|
38792
|
-
}
|
|
38793
|
-
new AutocompleteStageCounter();
|
|
38794
38737
|
function getLanguageConfig(languageId) {
|
|
38795
38738
|
switch (languageId) {
|
|
38796
38739
|
case "astro":
|
|
@@ -41048,15 +40991,16 @@ async function resolveContextMentionProviderContextItem({ provider: providerUri,
|
|
|
41048
40991
|
);
|
|
41049
40992
|
signal2 == null ? void 0 : signal2.throwIfAborted();
|
|
41050
40993
|
return items.map(
|
|
41051
|
-
(
|
|
40994
|
+
(openCtxItem) => {
|
|
41052
40995
|
var _a3;
|
|
41053
|
-
return ((_a3 =
|
|
40996
|
+
return ((_a3 = openCtxItem.ai) == null ? void 0 : _a3.content) ? {
|
|
41054
40997
|
type: "openctx",
|
|
41055
|
-
title:
|
|
41056
|
-
uri: URI.parse(
|
|
41057
|
-
providerUri:
|
|
41058
|
-
content:
|
|
41059
|
-
provider: "openctx"
|
|
40998
|
+
title: openCtxItem.title,
|
|
40999
|
+
uri: URI.parse(openCtxItem.url || openCtxItem.providerUri),
|
|
41000
|
+
providerUri: openCtxItem.providerUri,
|
|
41001
|
+
content: openCtxItem.ai.content,
|
|
41002
|
+
provider: "openctx",
|
|
41003
|
+
source: item.source
|
|
41060
41004
|
} : null;
|
|
41061
41005
|
}
|
|
41062
41006
|
).filter((context2) => context2 !== null);
|
|
@@ -45223,7 +45167,7 @@ function requireLib() {
|
|
|
45223
45167
|
const MurmurHash3 = requireImurmurhash();
|
|
45224
45168
|
const { onExit } = requireCjs();
|
|
45225
45169
|
const path2 = pathBrowserify;
|
|
45226
|
-
const { promisify } =
|
|
45170
|
+
const { promisify } = requireUtil();
|
|
45227
45171
|
const activeFiles = {};
|
|
45228
45172
|
const threadId = function getId() {
|
|
45229
45173
|
try {
|
|
@@ -48409,7 +48353,7 @@ class CommandsProvider {
|
|
|
48409
48353
|
if (!isFileURI(uri)) {
|
|
48410
48354
|
throw new Error("history only supported on local file paths");
|
|
48411
48355
|
}
|
|
48412
|
-
const { getContextFileFromGitLog } = await import("./git-log-
|
|
48356
|
+
const { getContextFileFromGitLog } = await import("./git-log-BOf0Q_uO.mjs");
|
|
48413
48357
|
return getContextFileFromGitLog(uri, options);
|
|
48414
48358
|
}
|
|
48415
48359
|
dispose() {
|
|
@@ -48840,7 +48784,7 @@ function registerAuthDebugCommands(disposables) {
|
|
|
48840
48784
|
if (!selection) return;
|
|
48841
48785
|
const endpoint = authStatus2.endpoint;
|
|
48842
48786
|
if (selection.value === null) {
|
|
48843
|
-
await secretStorage.
|
|
48787
|
+
await secretStorage.deleteTokenExpiresAt(endpoint);
|
|
48844
48788
|
void window$1.showInformationMessage("Token expiry removed");
|
|
48845
48789
|
} else {
|
|
48846
48790
|
await secretStorage.storeTokenExpiresAt(endpoint, selection.value);
|
|
@@ -48891,6 +48835,59 @@ function registerAuthDebugCommands(disposables) {
|
|
|
48891
48835
|
"Invalid refresh token set - auth will fail on next request"
|
|
48892
48836
|
);
|
|
48893
48837
|
}),
|
|
48838
|
+
// Clear access token only (to force reliance on refresh token)
|
|
48839
|
+
commands$1.registerCommand("cody.debug.auth.clearAccessToken", async () => {
|
|
48840
|
+
const authStatus2 = currentAuthStatus();
|
|
48841
|
+
if (!authStatus2.authenticated) {
|
|
48842
|
+
void window$1.showErrorMessage("Not authenticated");
|
|
48843
|
+
return;
|
|
48844
|
+
}
|
|
48845
|
+
const endpoint = authStatus2.endpoint;
|
|
48846
|
+
await secretStorage.deleteToken(endpoint);
|
|
48847
|
+
void window$1.showInformationMessage(
|
|
48848
|
+
"Access token cleared - next request will require refresh"
|
|
48849
|
+
);
|
|
48850
|
+
}),
|
|
48851
|
+
// Clear refresh token only (to reproduce missing refresh token bug)
|
|
48852
|
+
commands$1.registerCommand("cody.debug.auth.clearRefreshToken", async () => {
|
|
48853
|
+
const authStatus2 = currentAuthStatus();
|
|
48854
|
+
if (!authStatus2.authenticated) {
|
|
48855
|
+
void window$1.showErrorMessage("Not authenticated");
|
|
48856
|
+
return;
|
|
48857
|
+
}
|
|
48858
|
+
const endpoint = authStatus2.endpoint;
|
|
48859
|
+
await secretStorage.deleteRefreshToken(endpoint);
|
|
48860
|
+
void window$1.showInformationMessage(
|
|
48861
|
+
"Refresh token cleared - will use existing access token until it expires"
|
|
48862
|
+
);
|
|
48863
|
+
}),
|
|
48864
|
+
// Simulate storage failure during refresh (reproduces rotating token bug)
|
|
48865
|
+
commands$1.registerCommand("cody.debug.auth.simulateRefreshStorageFailure", async () => {
|
|
48866
|
+
const authStatus2 = currentAuthStatus();
|
|
48867
|
+
if (!authStatus2.authenticated) {
|
|
48868
|
+
void window$1.showErrorMessage("Not authenticated");
|
|
48869
|
+
return;
|
|
48870
|
+
}
|
|
48871
|
+
const endpoint = authStatus2.endpoint;
|
|
48872
|
+
const refreshToken = await secretStorage.getRefreshToken(endpoint);
|
|
48873
|
+
if (!refreshToken) {
|
|
48874
|
+
void window$1.showErrorMessage("No refresh token found");
|
|
48875
|
+
return;
|
|
48876
|
+
}
|
|
48877
|
+
const result = await refreshOAuthToken(endpoint, refreshToken);
|
|
48878
|
+
if (!(result == null ? void 0 : result.accessToken)) {
|
|
48879
|
+
void window$1.showErrorMessage("Refresh failed - token may already be invalid");
|
|
48880
|
+
return;
|
|
48881
|
+
}
|
|
48882
|
+
await secretStorage.storeToken(endpoint, result.accessToken, "oauth");
|
|
48883
|
+
if (result.expiresIn) {
|
|
48884
|
+
const expiresAt = Date.now() + result.expiresIn * 1e3;
|
|
48885
|
+
await secretStorage.storeTokenExpiresAt(endpoint, expiresAt);
|
|
48886
|
+
}
|
|
48887
|
+
void window$1.showInformationMessage(
|
|
48888
|
+
"Simulated storage failure: new access token stored, but refresh token NOT updated. Old refresh token is now revoked on server. Next refresh will fail!"
|
|
48889
|
+
);
|
|
48890
|
+
}),
|
|
48894
48891
|
// Clear all auth data
|
|
48895
48892
|
commands$1.registerCommand("cody.debug.auth.clearAll", async () => {
|
|
48896
48893
|
const confirmation = await window$1.showWarningMessage(
|
|
@@ -48924,7 +48921,7 @@ function registerAuthDebugCommands(disposables) {
|
|
|
48924
48921
|
if (authStatus2.authenticated && authStatus2.endpoint === endpoint) {
|
|
48925
48922
|
tokenInfo = "In memory (HeaderCredential)";
|
|
48926
48923
|
try {
|
|
48927
|
-
const config = await import("./index-
|
|
48924
|
+
const config = await import("./index-CDrWlDvL.mjs").then(
|
|
48928
48925
|
(m) => m.currentResolvedConfig()
|
|
48929
48926
|
);
|
|
48930
48927
|
const currentConfig = await config;
|
|
@@ -155469,15 +155466,24 @@ class AutoeditAnalyticsLogger {
|
|
|
155469
155466
|
telemetryParams
|
|
155470
155467
|
}) {
|
|
155471
155468
|
autoeditsOutputChannelLogger.logDebug("writeAutoeditEvent", action, ...logDebugArgs);
|
|
155472
|
-
|
|
155473
|
-
|
|
155474
|
-
|
|
155475
|
-
|
|
155476
|
-
|
|
155477
|
-
|
|
155478
|
-
|
|
155479
|
-
|
|
155469
|
+
const skippedActions = [
|
|
155470
|
+
"discarded",
|
|
155471
|
+
"invalidTransitionToAccepted",
|
|
155472
|
+
"invalidTransitionToDiscarded",
|
|
155473
|
+
"invalidTransitionToLoaded",
|
|
155474
|
+
"invalidTransitionToRejected",
|
|
155475
|
+
"invalidTransitionToPostProcessed"
|
|
155476
|
+
];
|
|
155477
|
+
if (skippedActions.includes(action)) {
|
|
155478
|
+
return;
|
|
155480
155479
|
}
|
|
155480
|
+
telemetryRecorder.recordEvent("cody.autoedit", action, {
|
|
155481
|
+
...telemetryParams,
|
|
155482
|
+
billingMetadata: action === "accepted" || action === "suggested" ? {
|
|
155483
|
+
product: "cody",
|
|
155484
|
+
category: action === "accepted" ? "core" : "billable"
|
|
155485
|
+
} : void 0
|
|
155486
|
+
});
|
|
155481
155487
|
}
|
|
155482
155488
|
/**
|
|
155483
155489
|
* Rate-limited error logging, capturing exceptions with Sentry and grouping repeated logs.
|
|
@@ -172154,7 +172160,7 @@ function migrateAndNotifyForOutdatedModels(model2) {
|
|
|
172154
172160
|
if (!model2 || isRunningInsideAgent() || !deprecatedModelSet.has(model2)) {
|
|
172155
172161
|
return model2;
|
|
172156
172162
|
}
|
|
172157
|
-
const newModel = "anthropic/claude-
|
|
172163
|
+
const newModel = "anthropic/claude-sonnet-4-5-20250929";
|
|
172158
172164
|
if (modelsService.getModelByID(newModel)) {
|
|
172159
172165
|
showNotificationIfNotShownYet(
|
|
172160
172166
|
"Claude 2 model support has been removed in favor of the newer Claude 3 models. All chats that used Claude 2 have been upgraded to Claude 3.",
|
|
@@ -175293,7 +175299,7 @@ function getDeepCodyModel(models) {
|
|
|
175293
175299
|
return matches2.find((m) => m !== void 0) || models.find((m) => m.tags.includes(ModelTag.Speed));
|
|
175294
175300
|
}
|
|
175295
175301
|
var define_process_default$4 = { env: {} };
|
|
175296
|
-
const execAsync =
|
|
175302
|
+
const execAsync = utilExports.promisify(exec);
|
|
175297
175303
|
const HOME_DIR = define_process_default$4.env.HOME || define_process_default$4.env.USERPROFILE || "";
|
|
175298
175304
|
const OUTPUT_WRAPPER = `
|
|
175299
175305
|
Terminal output from the \`{command}\` command enclosed between <OUTPUT0412> tags:
|
|
@@ -181656,9 +181662,26 @@ const _MCPConnectionManager = class _MCPConnectionManager {
|
|
|
181656
181662
|
createMCPClient(name2, version2, config) {
|
|
181657
181663
|
const client = new Client({ name: name2, version: version2 });
|
|
181658
181664
|
if (config.transportType === "sse") {
|
|
181665
|
+
const hasHeaders = !!config.headers && Object.keys(config.headers).length > 0;
|
|
181666
|
+
const credentials = config.withCredentials ? "include" : "same-origin";
|
|
181667
|
+
const needsCustomFetch = hasHeaders || config.withCredentials;
|
|
181668
|
+
const eventSourceInit = needsCustomFetch ? {
|
|
181669
|
+
fetch: (input, init2) => fetch(input, {
|
|
181670
|
+
...init2,
|
|
181671
|
+
...hasHeaders ? { headers: { ...init2 == null ? void 0 : init2.headers, ...config.headers } } : {},
|
|
181672
|
+
credentials: (init2 == null ? void 0 : init2.credentials) ?? credentials
|
|
181673
|
+
})
|
|
181674
|
+
} : void 0;
|
|
181675
|
+
const requestInit = needsCustomFetch ? {
|
|
181676
|
+
...hasHeaders ? { headers: config.headers } : {},
|
|
181677
|
+
credentials
|
|
181678
|
+
} : void 0;
|
|
181659
181679
|
return {
|
|
181660
181680
|
client,
|
|
181661
|
-
transport: new SSEClientTransport(new URL(config.url)
|
|
181681
|
+
transport: new SSEClientTransport(new URL(config.url), {
|
|
181682
|
+
eventSourceInit,
|
|
181683
|
+
requestInit
|
|
181684
|
+
})
|
|
181662
181685
|
};
|
|
181663
181686
|
}
|
|
181664
181687
|
return {
|
|
@@ -189380,17 +189403,6 @@ class ChatController {
|
|
|
189380
189403
|
} catch (error) {
|
|
189381
189404
|
outputChannelLogger.logDebug("ChatController", "setCustomChatTitle", { verbose: error });
|
|
189382
189405
|
}
|
|
189383
|
-
telemetryRecorder.recordEvent("cody.chat.customTitle", "generated", {
|
|
189384
|
-
privateMetadata: {
|
|
189385
|
-
requestID,
|
|
189386
|
-
model: model2,
|
|
189387
|
-
traceId: span2.spanContext().traceId
|
|
189388
|
-
},
|
|
189389
|
-
metadata: {
|
|
189390
|
-
titleLength: title.length,
|
|
189391
|
-
inputLength: inputText.length
|
|
189392
|
-
}
|
|
189393
|
-
});
|
|
189394
189406
|
});
|
|
189395
189407
|
}
|
|
189396
189408
|
/**
|
|
@@ -189400,13 +189412,15 @@ class ChatController {
|
|
|
189400
189412
|
if (isRateLimitError(error)) {
|
|
189401
189413
|
handleRateLimitError();
|
|
189402
189414
|
}
|
|
189403
|
-
|
|
189415
|
+
const traceId = isNetworkError(error) ? error.traceId : void 0;
|
|
189416
|
+
const errorMessage = traceId ? `${error.message} (trace ID: ${traceId})` : error.message;
|
|
189417
|
+
outputChannelLogger.logDebug("ChatController: postError", errorMessage);
|
|
189404
189418
|
if (type === "transcript") {
|
|
189405
189419
|
this.chatBuilder.addErrorAsBotMessage(error, ChatBuilder.NO_MODEL);
|
|
189406
189420
|
this.postViewTranscript();
|
|
189407
189421
|
return;
|
|
189408
189422
|
}
|
|
189409
|
-
void this.postMessage({ type: "errors", errors:
|
|
189423
|
+
void this.postMessage({ type: "errors", errors: errorMessage });
|
|
189410
189424
|
captureException(error);
|
|
189411
189425
|
}
|
|
189412
189426
|
/**
|
|
@@ -190481,7 +190495,6 @@ const HINT_DECORATIONS = {
|
|
|
190481
190495
|
};
|
|
190482
190496
|
const DOCUMENTABLE_SYMBOL_THROTTLE = 10;
|
|
190483
190497
|
const GHOST_TEXT_THROTTLE = 250;
|
|
190484
|
-
const TELEMETRY_THROTTLE = 30 * 1e3;
|
|
190485
190498
|
class GhostHintDecorator {
|
|
190486
190499
|
constructor(options) {
|
|
190487
190500
|
// permanentDisposables are disposed when this instance is disposed.
|
|
@@ -190491,7 +190504,6 @@ class GhostHintDecorator {
|
|
|
190491
190504
|
__publicField2(this, "isActive", false);
|
|
190492
190505
|
__publicField2(this, "activeDecorationRange", null);
|
|
190493
190506
|
__publicField2(this, "setThrottledGhostText");
|
|
190494
|
-
__publicField2(this, "fireThrottledDisplayEvent");
|
|
190495
190507
|
__publicField2(this, "getThrottledDocumentableSymbol");
|
|
190496
190508
|
/** Store the last line that the user typed on, we want to avoid showing the text here */
|
|
190497
190509
|
__publicField2(this, "lastLineTyped", null);
|
|
@@ -190500,14 +190512,6 @@ class GhostHintDecorator {
|
|
|
190500
190512
|
leading: false,
|
|
190501
190513
|
trailing: true
|
|
190502
190514
|
});
|
|
190503
|
-
this.fireThrottledDisplayEvent = lodashExports.throttle(
|
|
190504
|
-
this._fireDisplayEvent.bind(this),
|
|
190505
|
-
TELEMETRY_THROTTLE,
|
|
190506
|
-
{
|
|
190507
|
-
leading: true,
|
|
190508
|
-
trailing: false
|
|
190509
|
-
}
|
|
190510
|
-
);
|
|
190511
190515
|
this.getThrottledDocumentableSymbol = lodashExports.throttle(
|
|
190512
190516
|
this.getDocumentableSymbol.bind(this),
|
|
190513
190517
|
DOCUMENTABLE_SYMBOL_THROTTLE,
|
|
@@ -190617,7 +190621,6 @@ class GhostHintDecorator {
|
|
|
190617
190621
|
if (this.hasConflictingDecorations(editor, position)) {
|
|
190618
190622
|
return;
|
|
190619
190623
|
}
|
|
190620
|
-
this.fireThrottledDisplayEvent(variant);
|
|
190621
190624
|
const decorationHint = HINT_DECORATIONS[variant];
|
|
190622
190625
|
const decorationText = UNICODE_SPACE$1.repeat(textPadding) + decorationHint.text;
|
|
190623
190626
|
this.activeDecorationRange = new Range(position, position);
|
|
@@ -190666,9 +190669,6 @@ class GhostHintDecorator {
|
|
|
190666
190669
|
editor.setDecorations(decoration, []);
|
|
190667
190670
|
});
|
|
190668
190671
|
}
|
|
190669
|
-
_fireDisplayEvent(variant) {
|
|
190670
|
-
telemetryRecorder.recordEvent("cody.ghostText", "visible", { privateMetadata: { variant } });
|
|
190671
|
-
}
|
|
190672
190672
|
async updateEnablement(authStatus2) {
|
|
190673
190673
|
const featureEnablement = await getGhostHintEnablement();
|
|
190674
190674
|
if (!authStatus2.authenticated || !(featureEnablement.Document || featureEnablement.EditOrChat || featureEnablement.Generate)) {
|
|
@@ -191308,8 +191308,8 @@ function parseMentionURI(uri) {
|
|
|
191308
191308
|
}
|
|
191309
191309
|
}
|
|
191310
191310
|
async function execFileAsync(program2, args2, { cwd }) {
|
|
191311
|
-
const { promisify } = await import("./util-
|
|
191312
|
-
const { execFile } = await import("./vscode-shim-
|
|
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);
|
|
191313
191313
|
return promisify(execFile)(program2, args2, { cwd });
|
|
191314
191314
|
}
|
|
191315
191315
|
var __create = Object.create;
|
|
@@ -196680,9 +196680,9 @@ function getOverriddenModelForIntent(intent, currentModel, authStatus2) {
|
|
|
196680
196680
|
}
|
|
196681
196681
|
switch (intent) {
|
|
196682
196682
|
case "fix":
|
|
196683
|
-
return "anthropic::2024-10-22::claude-
|
|
196683
|
+
return "anthropic::2024-10-22::claude-sonnet-4-5-latest";
|
|
196684
196684
|
case "doc":
|
|
196685
|
-
return "anthropic::2024-10-22::claude-
|
|
196685
|
+
return "anthropic::2024-10-22::claude-haiku-4-5-latest";
|
|
196686
196686
|
case "test":
|
|
196687
196687
|
case "add":
|
|
196688
196688
|
case "edit":
|
|
@@ -198307,7 +198307,6 @@ const showSetupNotification = async (auth2) => {
|
|
|
198307
198307
|
await commands$1.executeCommand("cody.chat.focus");
|
|
198308
198308
|
return;
|
|
198309
198309
|
}
|
|
198310
|
-
telemetryRecorder.recordEvent("cody.signInNotification", "shown");
|
|
198311
198310
|
return showActionNotification({
|
|
198312
198311
|
message: "Sign in to Cody to get started",
|
|
198313
198312
|
actions: [
|
package/dist/agent.worker.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import "./agent.worker-
|
|
2
|
-
import "./vscode-shim-
|
|
1
|
+
import "./agent.worker-Di-hO351.mjs";
|
|
2
|
+
import "./vscode-shim-BM22pmQn.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-BM22pmQn.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-
|
|
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-
|
|
3
|
-
import { i as isAbortError, a as isError, b as isDefined, M as ModelTag, c as URI, d as isWindows } from "./vscode-shim-
|
|
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-
|
|
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";
|
|
5
5
|
function createOllamaClient(ollamaOptions, logger, logDebug) {
|
|
6
6
|
async function* complete(params, abortController) {
|
|
7
7
|
const url = new URL(ollamaOptions.url).href;
|
|
@@ -197,6 +197,22 @@ const FIXTURE_MODELS = [
|
|
|
197
197
|
provider: "anthropic",
|
|
198
198
|
title: "Claude 3 Haiku"
|
|
199
199
|
},
|
|
200
|
+
{
|
|
201
|
+
id: "anthropic::2024-10-22::claude-haiku-4-5-latest",
|
|
202
|
+
modelRef: {
|
|
203
|
+
providerId: "anthropic",
|
|
204
|
+
apiVersionId: "2024-10-22",
|
|
205
|
+
modelId: "claude-haiku-4-5-latest"
|
|
206
|
+
},
|
|
207
|
+
usage: [ModelUsage.Edit, ModelUsage.Chat],
|
|
208
|
+
contextWindow: {
|
|
209
|
+
input: 3e4,
|
|
210
|
+
output: 4e3
|
|
211
|
+
},
|
|
212
|
+
tags: [ModelTag.Free, ModelTag.Speed],
|
|
213
|
+
provider: "anthropic",
|
|
214
|
+
title: "Claude Haiku 4.5"
|
|
215
|
+
},
|
|
200
216
|
{
|
|
201
217
|
id: "fireworks::v1::starcoder",
|
|
202
218
|
modelRef: {
|