@sourcegraph/cody-web 0.30.0 → 0.31.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-DFfKh9n_.mjs → agent.worker-DT8FShIL.mjs} +57 -153
- package/dist/agent.worker.js +2 -2
- package/dist/{git-log-mAummXPq.mjs → git-log-CZLl35Ua.mjs} +1 -1
- package/dist/{index-ByWBq8cv.mjs → index-CFWvzD4D.mjs} +2 -2
- package/dist/index.js +76 -216
- package/dist/style.css +77 -68
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{util-DYm6oJqS.mjs → util-Bt98Paeh.mjs} +1 -1
- package/dist/{vscode-shim-D5fSC1mv.mjs → vscode-shim-DuhCkl0x.mjs} +305 -362
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -2,8 +2,8 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
4
|
import { jsx, jsxs, Fragment as Fragment$1 } from "react/jsx-runtime";
|
|
5
|
-
import { i as getDefaultExportFromCjs, L as Ls, k as ke$1, j as ks, F as Fi$1, _ as _s, m as ds, n as bs, o as ii$1, q as qe$1, y as ys, x as xi$1, K as K$2, J as J$2, r as R$3, u as ws, B as B$2, v as g$5, z as h$4, A as _i, S as Ss, E as Br, G as ln, H as bi$1, I as vn, M as xn, N as Nn, O as mn, Q as li$1, V as n$1, W as ns, X as M$4, Y as Ds, Z as le$2, $ as c$3, a0 as oe$2, a1 as z$1, a2 as yi$1, a3 as W$2, a4 as Ue$1, a5 as I$2, a6 as Se$2, a7 as O$2, a8 as F$1, a9 as Ni$1, aa as ee$1, ab as we$2, ac as b$2, ad as T$3, ae as s$2, af as o$4, ag as w$3, ah as i$2, ai as k$3, aj as D$5, ak as p$8, al as m$8, am as S$4, an as v$4, ao as P$2, ap as E$6, aq as Wi$1, ar as L$3, as as d$2, at as a$3, au as l$2, av as f$2, aw as u$6, ax as r$5, ay as t$2, az as FILE_CONTEXT_MENTION_PROVIDER, aA as SYMBOL_CONTEXT_MENTION_PROVIDER, aB as REMOTE_REPOSITORY_PROVIDER_URI, aC as REMOTE_FILE_PROVIDER_URI, aD as REMOTE_DIRECTORY_PROVIDER_URI, aE as WEB_PROVIDER_URI, aF as RULES_PROVIDER_URI, aG as displayPath, aH as displayLineRange, aI as displayPathDirname, aJ as displayPathBasename, aK as IGNORED_FILE_WARNING_LABEL, aL as LARGE_FILE_WARNING_LABEL, aM as Ei$1, aN as xe$2, aO as V$2, aP as Es, aQ as U$2, aR as e, aS as Ns, aT as object, aU as literal, aV as string$2, C as ContextItemSource, aW as URI, aX as is$2, aY as gs, aZ as serializeContextItem, a_ as CONTEXT_ITEM_MENTION_NODE_TYPE, a$ as contextItemMentionNodeDisplayText, b0 as an, b1 as qr, b2 as _$2, b3 as TEMPLATE_INPUT_NODE_TYPE, b4 as N$2, b5 as parseMentionQuery, b6 as NO_SYMBOL_MATCHES_HELP_LABEL, b7 as FILE_RANGE_TOOLTIP_LABEL, b8 as Observable, b9 as createExtensionAPI, ba as createMessageAPIForWebview, bb as debounce, bc as memoizeLastValue, bd as toSerializedPromptEditorValue$1, be as ri$1, bf as isEqual, bg as scanForMentionTriggerInUserTextInput, bh as fs, bi as Ts, bj as ps, bk as getMentionOperations, bl as forceHydration, bm as hydrateAfterPostMessage, bn as isDotCom, bo as isSourcegraphToken, bp as trace, bq as context$1, br as SpanStatusCode, bs as FeatureFlag, h as commonjsGlobal, bt as svg, bu as html$2, bv as whitespace, bw as find, bx as stringify, by as stringify$1, bz as ccount, bA as isCodyProUser, bB as CodyIDE, bC as CodyTaskState, bD as cryptoJsExports, bE as isError, bF as RateLimitError, bG as upperFirst, bH as lodashExports, bI as createContextItem, bJ as isDefined, bK as isCodeSearchContextItem, bL as reformatBotMessageForChat, bM as isAbortErrorOrSocketHangUp, bN as ModelTag, bO as DeepCodyAgentID, bP as serializedPromptEditorStateFromChatMessage, bQ as contextItemsFromPromptEditorValue, bR as filterContextItemsFromPromptEditorValue, bS as CustomCommandType, bT as View, bU as isCodyProModel, bV as ToolCodyModelName, bW as getRelativeChatPeriod, bX as isMacOS, bY as firstResultFromOperation, bZ as ENTERPRISE_STARTER_LEARN_MORE_URL, b_ as CODY_PRO_SUBSCRIPTION_URL, b$ as ACCOUNT_USAGE_URL, c0 as ENTERPRISE_STARTER_PRICING_URL, c1 as textContentFromSerializedLexicalNode, c2 as firstValueFrom, c3 as skipPendingOperation, c4 as FAST_CHAT_INPUT_TOKEN_BUDGET, c5 as webviewOpenURIForContextItem, c6 as pluralize$1, c7 as
|
|
6
|
-
import {
|
|
5
|
+
import { i as getDefaultExportFromCjs, L as Ls, k as ke$1, j as ks, F as Fi$1, _ as _s, m as ds, n as bs, o as ii$1, q as qe$1, y as ys, x as xi$1, K as K$2, J as J$2, r as R$3, u as ws, B as B$2, v as g$5, z as h$4, A as _i, S as Ss, E as Br, G as ln, H as bi$1, I as vn, M as xn, N as Nn, O as mn, Q as li$1, V as n$1, W as ns, X as M$4, Y as Ds, Z as le$2, $ as c$3, a0 as oe$2, a1 as z$1, a2 as yi$1, a3 as W$2, a4 as Ue$1, a5 as I$2, a6 as Se$2, a7 as O$2, a8 as F$1, a9 as Ni$1, aa as ee$1, ab as we$2, ac as b$2, ad as T$3, ae as s$2, af as o$4, ag as w$3, ah as i$2, ai as k$3, aj as D$5, ak as p$8, al as m$8, am as S$4, an as v$4, ao as P$2, ap as E$6, aq as Wi$1, ar as L$3, as as d$2, at as a$3, au as l$2, av as f$2, aw as u$6, ax as r$5, ay as t$2, az as FILE_CONTEXT_MENTION_PROVIDER, aA as SYMBOL_CONTEXT_MENTION_PROVIDER, aB as REMOTE_REPOSITORY_PROVIDER_URI, aC as REMOTE_FILE_PROVIDER_URI, aD as REMOTE_DIRECTORY_PROVIDER_URI, aE as WEB_PROVIDER_URI, aF as RULES_PROVIDER_URI, aG as displayPath, aH as displayLineRange, aI as displayPathDirname, aJ as displayPathBasename, aK as IGNORED_FILE_WARNING_LABEL, aL as LARGE_FILE_WARNING_LABEL, aM as Ei$1, aN as xe$2, aO as V$2, aP as Es, aQ as U$2, aR as e, aS as Ns, aT as object, aU as literal, aV as string$2, C as ContextItemSource, aW as URI, aX as is$2, aY as gs, aZ as serializeContextItem, a_ as CONTEXT_ITEM_MENTION_NODE_TYPE, a$ as contextItemMentionNodeDisplayText, b0 as an, b1 as qr, b2 as _$2, b3 as TEMPLATE_INPUT_NODE_TYPE, b4 as N$2, b5 as parseMentionQuery, b6 as NO_SYMBOL_MATCHES_HELP_LABEL, b7 as FILE_RANGE_TOOLTIP_LABEL, b8 as Observable, b9 as createExtensionAPI, ba as createMessageAPIForWebview, bb as debounce, bc as memoizeLastValue, bd as toSerializedPromptEditorValue$1, be as ri$1, bf as isEqual, bg as scanForMentionTriggerInUserTextInput, bh as fs, bi as Ts, bj as ps, bk as getMentionOperations, bl as forceHydration, bm as hydrateAfterPostMessage, bn as isDotCom, bo as isSourcegraphToken, bp as trace, bq as context$1, br as SpanStatusCode, bs as FeatureFlag, h as commonjsGlobal, bt as svg, bu as html$2, bv as whitespace, bw as find, bx as stringify, by as stringify$1, bz as ccount, bA as isCodyProUser, bB as CodyIDE, bC as CodyTaskState, bD as cryptoJsExports, bE as isError, bF as RateLimitError, bG as upperFirst, bH as lodashExports, bI as createContextItem, bJ as isDefined, bK as isCodeSearchContextItem, bL as reformatBotMessageForChat, bM as isAbortErrorOrSocketHangUp, bN as ModelTag, bO as DeepCodyAgentID, bP as serializedPromptEditorStateFromChatMessage, bQ as contextItemsFromPromptEditorValue, bR as filterContextItemsFromPromptEditorValue, bS as CustomCommandType, bT as View, bU as isCodyProModel, bV as ToolCodyModelName, bW as getRelativeChatPeriod, bX as isMacOS, bY as firstResultFromOperation, bZ as ENTERPRISE_STARTER_LEARN_MORE_URL, b_ as CODY_PRO_SUBSCRIPTION_URL, b$ as ACCOUNT_USAGE_URL, c0 as ENTERPRISE_STARTER_PRICING_URL, c1 as textContentFromSerializedLexicalNode, c2 as firstValueFrom, c3 as skipPendingOperation, c4 as FAST_CHAT_INPUT_TOKEN_BUDGET, c5 as webviewOpenURIForContextItem, c6 as pluralize$1, c7 as serializedPromptEditorStateFromText, c8 as deserializeContextItem, c9 as S2_URL, ca as browser, cb as CodyAutoSuggestionMode, cc as isErrorLike, cd as PromptString, ce as setDisplayPathEnvInfo, U as Uri } from "./vscode-shim-DuhCkl0x.mjs";
|
|
6
|
+
import { cg, cf } from "./vscode-shim-DuhCkl0x.mjs";
|
|
7
7
|
import * as React$2 from "react";
|
|
8
8
|
import React__default, { createContext, useContext, useMemo as useMemo$1, useLayoutEffect as useLayoutEffect$1, useEffect as useEffect$2, forwardRef, useState as useState$1, useCallback, useRef as useRef$1, Suspense, createElement, memo as memo$1, useImperativeHandle, Children, isValidElement, cloneElement, Fragment as Fragment$2, useReducer } from "react";
|
|
9
9
|
var classnames = { exports: {} };
|
|
@@ -2321,7 +2321,7 @@ function Ze(a2) {
|
|
|
2321
2321
|
for (c2 in b2) if (b2.hasOwnProperty(c2) && c2 in Ye) return Xe[a2] = b2[c2];
|
|
2322
2322
|
return a2;
|
|
2323
2323
|
}
|
|
2324
|
-
var $e = Ze("animationend"), af = Ze("animationiteration"), bf = Ze("animationstart"),
|
|
2324
|
+
var $e = Ze("animationend"), af = Ze("animationiteration"), bf = Ze("animationstart"), cf2 = Ze("transitionend"), df = /* @__PURE__ */ new Map(), ef = "abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");
|
|
2325
2325
|
function ff(a2, b2) {
|
|
2326
2326
|
df.set(a2, b2);
|
|
2327
2327
|
fa(b2, [a2]);
|
|
@@ -2336,7 +2336,7 @@ ff(bf, "onAnimationStart");
|
|
|
2336
2336
|
ff("dblclick", "onDoubleClick");
|
|
2337
2337
|
ff("focusin", "onFocus");
|
|
2338
2338
|
ff("focusout", "onBlur");
|
|
2339
|
-
ff(
|
|
2339
|
+
ff(cf2, "onTransitionEnd");
|
|
2340
2340
|
ha("onMouseEnter", ["mouseout", "mouseover"]);
|
|
2341
2341
|
ha("onMouseLeave", ["mouseout", "mouseover"]);
|
|
2342
2342
|
ha("onPointerEnter", ["pointerout", "pointerover"]);
|
|
@@ -2505,7 +2505,7 @@ function hd(a2, b2, c2, d2, e2) {
|
|
|
2505
2505
|
case bf:
|
|
2506
2506
|
k3 = Hd;
|
|
2507
2507
|
break;
|
|
2508
|
-
case
|
|
2508
|
+
case cf2:
|
|
2509
2509
|
k3 = Xd;
|
|
2510
2510
|
break;
|
|
2511
2511
|
case "scroll":
|
|
@@ -3052,7 +3052,7 @@ function bh(a2, b2) {
|
|
|
3052
3052
|
a2 = a2.updateQueue;
|
|
3053
3053
|
b2.updateQueue === a2 && (b2.updateQueue = { baseState: a2.baseState, firstBaseUpdate: a2.firstBaseUpdate, lastBaseUpdate: a2.lastBaseUpdate, shared: a2.shared, effects: a2.effects });
|
|
3054
3054
|
}
|
|
3055
|
-
function
|
|
3055
|
+
function ch(a2, b2) {
|
|
3056
3056
|
return { eventTime: a2, lane: b2, tag: 0, payload: null, callback: null, next: null };
|
|
3057
3057
|
}
|
|
3058
3058
|
function dh(a2, b2, c2) {
|
|
@@ -3202,14 +3202,14 @@ var nh = { isMounted: function(a2) {
|
|
|
3202
3202
|
return (a2 = a2._reactInternals) ? Vb(a2) === a2 : false;
|
|
3203
3203
|
}, enqueueSetState: function(a2, b2, c2) {
|
|
3204
3204
|
a2 = a2._reactInternals;
|
|
3205
|
-
var d2 = L$1(), e2 = lh(a2), f2 =
|
|
3205
|
+
var d2 = L$1(), e2 = lh(a2), f2 = ch(d2, e2);
|
|
3206
3206
|
f2.payload = b2;
|
|
3207
3207
|
void 0 !== c2 && null !== c2 && (f2.callback = c2);
|
|
3208
3208
|
b2 = dh(a2, f2, e2);
|
|
3209
3209
|
null !== b2 && (mh(b2, a2, e2, d2), eh(b2, a2, e2));
|
|
3210
3210
|
}, enqueueReplaceState: function(a2, b2, c2) {
|
|
3211
3211
|
a2 = a2._reactInternals;
|
|
3212
|
-
var d2 = L$1(), e2 = lh(a2), f2 =
|
|
3212
|
+
var d2 = L$1(), e2 = lh(a2), f2 = ch(d2, e2);
|
|
3213
3213
|
f2.tag = 1;
|
|
3214
3214
|
f2.payload = b2;
|
|
3215
3215
|
void 0 !== c2 && null !== c2 && (f2.callback = c2);
|
|
@@ -3217,7 +3217,7 @@ var nh = { isMounted: function(a2) {
|
|
|
3217
3217
|
null !== b2 && (mh(b2, a2, e2, d2), eh(b2, a2, e2));
|
|
3218
3218
|
}, enqueueForceUpdate: function(a2, b2) {
|
|
3219
3219
|
a2 = a2._reactInternals;
|
|
3220
|
-
var c2 = L$1(), d2 = lh(a2), e2 =
|
|
3220
|
+
var c2 = L$1(), d2 = lh(a2), e2 = ch(c2, d2);
|
|
3221
3221
|
e2.tag = 2;
|
|
3222
3222
|
void 0 !== b2 && null !== b2 && (e2.callback = b2);
|
|
3223
3223
|
b2 = dh(a2, e2, d2);
|
|
@@ -4067,7 +4067,7 @@ function Mi(a2, b2) {
|
|
|
4067
4067
|
}
|
|
4068
4068
|
var Ni = "function" === typeof WeakMap ? WeakMap : Map;
|
|
4069
4069
|
function Oi(a2, b2, c2) {
|
|
4070
|
-
c2 =
|
|
4070
|
+
c2 = ch(-1, c2);
|
|
4071
4071
|
c2.tag = 3;
|
|
4072
4072
|
c2.payload = { element: null };
|
|
4073
4073
|
var d2 = b2.value;
|
|
@@ -4078,7 +4078,7 @@ function Oi(a2, b2, c2) {
|
|
|
4078
4078
|
return c2;
|
|
4079
4079
|
}
|
|
4080
4080
|
function Ri(a2, b2, c2) {
|
|
4081
|
-
c2 =
|
|
4081
|
+
c2 = ch(-1, c2);
|
|
4082
4082
|
c2.tag = 3;
|
|
4083
4083
|
var d2 = a2.type.getDerivedStateFromError;
|
|
4084
4084
|
if ("function" === typeof d2) {
|
|
@@ -4118,7 +4118,7 @@ function Vi(a2) {
|
|
|
4118
4118
|
return null;
|
|
4119
4119
|
}
|
|
4120
4120
|
function Wi(a2, b2, c2, d2, e2) {
|
|
4121
|
-
if (0 === (a2.mode & 1)) return a2 === b2 ? a2.flags |= 65536 : (a2.flags |= 128, c2.flags |= 131072, c2.flags &= -52805, 1 === c2.tag && (null === c2.alternate ? c2.tag = 17 : (b2 =
|
|
4121
|
+
if (0 === (a2.mode & 1)) return a2 === b2 ? a2.flags |= 65536 : (a2.flags |= 128, c2.flags |= 131072, c2.flags &= -52805, 1 === c2.tag && (null === c2.alternate ? c2.tag = 17 : (b2 = ch(-1, 1), b2.tag = 2, dh(c2, b2, 1))), c2.lanes |= 1), a2;
|
|
4122
4122
|
a2.flags |= 65536;
|
|
4123
4123
|
a2.lanes = e2;
|
|
4124
4124
|
return a2;
|
|
@@ -6587,7 +6587,7 @@ Wk = function(a2, b2, c2) {
|
|
|
6587
6587
|
for (var k2 = h2.firstContext; null !== k2; ) {
|
|
6588
6588
|
if (k2.context === d2) {
|
|
6589
6589
|
if (1 === f2.tag) {
|
|
6590
|
-
k2 =
|
|
6590
|
+
k2 = ch(-1, c2 & -c2);
|
|
6591
6591
|
k2.tag = 2;
|
|
6592
6592
|
var l2 = f2.updateQueue;
|
|
6593
6593
|
if (null !== l2) {
|
|
@@ -6837,7 +6837,7 @@ function fl(a2, b2, c2, d2, e2, f2, g2, h2, k2) {
|
|
|
6837
6837
|
c2 = a2.current;
|
|
6838
6838
|
d2 = L$1();
|
|
6839
6839
|
e2 = lh(c2);
|
|
6840
|
-
f2 =
|
|
6840
|
+
f2 = ch(d2, e2);
|
|
6841
6841
|
f2.callback = void 0 !== b2 && null !== b2 ? b2 : null;
|
|
6842
6842
|
dh(c2, f2, e2);
|
|
6843
6843
|
a2.current.lanes = e2;
|
|
@@ -6849,7 +6849,7 @@ function gl(a2, b2, c2, d2) {
|
|
|
6849
6849
|
var e2 = b2.current, f2 = L$1(), g2 = lh(e2);
|
|
6850
6850
|
c2 = el(c2);
|
|
6851
6851
|
null === b2.context ? b2.context = c2 : b2.pendingContext = c2;
|
|
6852
|
-
b2 =
|
|
6852
|
+
b2 = ch(f2, g2);
|
|
6853
6853
|
b2.payload = { element: a2 };
|
|
6854
6854
|
d2 = void 0 === d2 ? null : d2;
|
|
6855
6855
|
null !== d2 && (b2.callback = d2);
|
|
@@ -8505,25 +8505,6 @@ const Smile = createLucideIcon("Smile", [
|
|
|
8505
8505
|
["line", { x1: "9", x2: "9.01", y1: "9", y2: "9", key: "yxxnd0" }],
|
|
8506
8506
|
["line", { x1: "15", x2: "15.01", y1: "9", y2: "9", key: "1p4y9e" }]
|
|
8507
8507
|
]);
|
|
8508
|
-
/**
|
|
8509
|
-
* @license lucide-react v0.378.0 - ISC
|
|
8510
|
-
*
|
|
8511
|
-
* This source code is licensed under the ISC license.
|
|
8512
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
8513
|
-
*/
|
|
8514
|
-
const Sparkles = createLucideIcon("Sparkles", [
|
|
8515
|
-
[
|
|
8516
|
-
"path",
|
|
8517
|
-
{
|
|
8518
|
-
d: "M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",
|
|
8519
|
-
key: "4pj2yx"
|
|
8520
|
-
}
|
|
8521
|
-
],
|
|
8522
|
-
["path", { d: "M20 3v4", key: "1olli1" }],
|
|
8523
|
-
["path", { d: "M22 5h-4", key: "1gvqau" }],
|
|
8524
|
-
["path", { d: "M4 17v2", key: "vumght" }],
|
|
8525
|
-
["path", { d: "M5 18H3", key: "zchphs" }]
|
|
8526
|
-
]);
|
|
8527
8508
|
/**
|
|
8528
8509
|
* @license lucide-react v0.378.0 - ISC
|
|
8529
8510
|
*
|
|
@@ -9521,9 +9502,11 @@ function L({ options: e2, onQueryChange: n2, onSelectOption: o2, onOpen: r2, onC
|
|
|
9521
9502
|
};
|
|
9522
9503
|
}, [v2, g2, n2, x2, I2, T2]), null === x2 || null === v2 ? null : jsx(R, { close: I2, resolution: x2, editor: v2, anchorElementRef: O2, options: e2, menuRenderFn: i, shouldSplitNodeWithQuery: true, onSelectOption: o2, commandPriority: y2 });
|
|
9523
9504
|
}
|
|
9524
|
-
const
|
|
9525
|
-
const
|
|
9505
|
+
const popoverContainer = "_popover-container_11l09_1";
|
|
9506
|
+
const popoverDimensions$1 = "_popover-dimensions_11l09_15";
|
|
9507
|
+
const popover$1 = "_popover_11l09_1";
|
|
9526
9508
|
const styles$A = {
|
|
9509
|
+
popoverContainer,
|
|
9527
9510
|
popoverDimensions: popoverDimensions$1,
|
|
9528
9511
|
popover: popover$1
|
|
9529
9512
|
};
|
|
@@ -10146,7 +10129,7 @@ const MentionsPlugin = memo$1(({ contextWindowSizeInTokens, openExternalLink })
|
|
|
10146
10129
|
// max height of the visible menu. This ensures that the menu does not
|
|
10147
10130
|
// flip orientation as the user is typing if it suddenly has less
|
|
10148
10131
|
// results. It also makes the positioning less glitchy.
|
|
10149
|
-
/* @__PURE__ */ jsx("div", { "data-at-mention-menu": "", className: clsx$1(styles$A.popoverDimensions), children: /* @__PURE__ */ jsx("div", { className: styles$A.popover, children: /* @__PURE__ */ jsx(
|
|
10132
|
+
/* @__PURE__ */ jsx("div", { className: styles$A.popoverContainer, children: /* @__PURE__ */ jsx("div", { "data-at-mention-menu": "", className: clsx$1(styles$A.popoverDimensions), children: /* @__PURE__ */ jsx("div", { className: styles$A.popover, children: /* @__PURE__ */ jsx(
|
|
10150
10133
|
MentionMenu,
|
|
10151
10134
|
{
|
|
10152
10135
|
params,
|
|
@@ -10155,7 +10138,7 @@ const MentionsPlugin = memo$1(({ contextWindowSizeInTokens, openExternalLink })
|
|
|
10155
10138
|
data,
|
|
10156
10139
|
selectOptionAndCleanUp
|
|
10157
10140
|
}
|
|
10158
|
-
) }) }),
|
|
10141
|
+
) }) }) }),
|
|
10159
10142
|
anchorElementRef.current
|
|
10160
10143
|
);
|
|
10161
10144
|
}
|
|
@@ -19614,8 +19597,8 @@ class ViewTreeUpdater {
|
|
|
19614
19597
|
if (wrapper.contentDOM) {
|
|
19615
19598
|
wrapper.children = next.children;
|
|
19616
19599
|
next.children = [];
|
|
19617
|
-
for (let
|
|
19618
|
-
|
|
19600
|
+
for (let ch2 of wrapper.children)
|
|
19601
|
+
ch2.parent = wrapper;
|
|
19619
19602
|
}
|
|
19620
19603
|
next.destroy();
|
|
19621
19604
|
return wrapper;
|
|
@@ -67349,22 +67332,22 @@ function markdownPluginProps() {
|
|
|
67349
67332
|
};
|
|
67350
67333
|
return _markdownPluginProps;
|
|
67351
67334
|
}
|
|
67352
|
-
const buttonsContainer = "_buttons-
|
|
67353
|
-
const buttons = "
|
|
67354
|
-
const button$1 = "
|
|
67355
|
-
const iconContainer = "_icon-
|
|
67356
|
-
const copyButton = "_copy-
|
|
67357
|
-
const insertButton = "_insert-
|
|
67358
|
-
const attributionIcon = "_attribution-
|
|
67359
|
-
const status = "
|
|
67360
|
-
const metadataContainer = "_metadata-
|
|
67361
|
-
const attributionContainer = "_attribution-
|
|
67362
|
-
const attributionIconUnavailable = "_attribution-icon-
|
|
67363
|
-
const attributionIconFound = "_attribution-icon-
|
|
67364
|
-
const codiconLoading = "_codicon-
|
|
67365
|
-
const spin$1 = "
|
|
67366
|
-
const content = "
|
|
67367
|
-
const fileNameContainer = "_file-name-
|
|
67335
|
+
const buttonsContainer = "_buttons-container_1ok1a_1";
|
|
67336
|
+
const buttons = "_buttons_1ok1a_1";
|
|
67337
|
+
const button$1 = "_button_1ok1a_1";
|
|
67338
|
+
const iconContainer = "_icon-container_1ok1a_31";
|
|
67339
|
+
const copyButton = "_copy-button_1ok1a_35";
|
|
67340
|
+
const insertButton = "_insert-button_1ok1a_36";
|
|
67341
|
+
const attributionIcon = "_attribution-icon_1ok1a_37";
|
|
67342
|
+
const status = "_status_1ok1a_38";
|
|
67343
|
+
const metadataContainer = "_metadata-container_1ok1a_65";
|
|
67344
|
+
const attributionContainer = "_attribution-container_1ok1a_75";
|
|
67345
|
+
const attributionIconUnavailable = "_attribution-icon-unavailable_1ok1a_82";
|
|
67346
|
+
const attributionIconFound = "_attribution-icon-found_1ok1a_86";
|
|
67347
|
+
const codiconLoading = "_codicon-loading_1ok1a_95";
|
|
67348
|
+
const spin$1 = "_spin_1ok1a_1";
|
|
67349
|
+
const content = "_content_1ok1a_111";
|
|
67350
|
+
const fileNameContainer = "_file-name-container_1ok1a_211";
|
|
67368
67351
|
const styles$s = {
|
|
67369
67352
|
buttonsContainer,
|
|
67370
67353
|
buttons,
|
|
@@ -70041,7 +70024,7 @@ const SearchResults = ({
|
|
|
70041
70024
|
] })
|
|
70042
70025
|
] }),
|
|
70043
70026
|
/* @__PURE__ */ jsxs("div", { className: "tw-flex tw-items-center tw-gap-6 tw-px-4 md:tw-px-2", children: [
|
|
70044
|
-
showFiltersButton && /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsxs(
|
|
70027
|
+
showFiltersButton && !showFiltersSidebar && /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsxs(
|
|
70045
70028
|
Button,
|
|
70046
70029
|
{
|
|
70047
70030
|
onClick: () => {
|
|
@@ -70236,8 +70219,8 @@ const AssistantMessageCell = memo$1(
|
|
|
70236
70219
|
const chatModel = useChatModelByID(message2.model, models);
|
|
70237
70220
|
const isAborted = isAbortErrorOrSocketHangUp(message2.error);
|
|
70238
70221
|
const hasLongerResponseTime = (_a = chatModel == null ? void 0 : chatModel.tags) == null ? void 0 : _a.includes(ModelTag.StreamDisabled);
|
|
70239
|
-
const
|
|
70240
|
-
const isSearchIntent =
|
|
70222
|
+
const omniboxEnabled = useOmniBox();
|
|
70223
|
+
const isSearchIntent = omniboxEnabled && (humanMessage == null ? void 0 : humanMessage.intent) === "search";
|
|
70241
70224
|
return /* @__PURE__ */ jsx(
|
|
70242
70225
|
BaseMessageCell,
|
|
70243
70226
|
{
|
|
@@ -70251,7 +70234,7 @@ const AssistantMessageCell = memo$1(
|
|
|
70251
70234
|
humanMessage
|
|
70252
70235
|
}
|
|
70253
70236
|
) : null,
|
|
70254
|
-
|
|
70237
|
+
omniboxEnabled && !isLoading && message2.search && /* @__PURE__ */ jsx(
|
|
70255
70238
|
SearchResults,
|
|
70256
70239
|
{
|
|
70257
70240
|
message: message2,
|
|
@@ -70315,8 +70298,7 @@ function makeHumanMessageInfo({ humanMessage, assistantMessage }, humanEditorRef
|
|
|
70315
70298
|
);
|
|
70316
70299
|
editHumanMessage({
|
|
70317
70300
|
messageIndexInTranscript: assistantMessage.index - 1,
|
|
70318
|
-
editorValue: newEditorValue
|
|
70319
|
-
preDetectedIntent: humanMessage.intent
|
|
70301
|
+
editorValue: newEditorValue
|
|
70320
70302
|
});
|
|
70321
70303
|
}
|
|
70322
70304
|
},
|
|
@@ -74127,56 +74109,21 @@ const AddContextButton = ({ onClick, className }) => /* @__PURE__ */ jsxs(Toolti
|
|
|
74127
74109
|
/* @__PURE__ */ jsx(Kbd, { macOS: "@", linuxAndWindows: "@" })
|
|
74128
74110
|
] })
|
|
74129
74111
|
] });
|
|
74130
|
-
const intentDetectionConfigConext = createContext({
|
|
74131
|
-
intentDetectionDisabled: false,
|
|
74132
|
-
doIntentDetection: true
|
|
74133
|
-
});
|
|
74134
|
-
const IntentDetectionConfigProvider = ({ children: children2 }) => {
|
|
74135
|
-
const config = useClientConfig();
|
|
74136
|
-
const intentDetection = useMemo$1(
|
|
74137
|
-
() => ({
|
|
74138
|
-
intentDetectionDisabled: !(config == null ? void 0 : config.omniBoxEnabled) || (config == null ? void 0 : config.intentDetection) === "disabled",
|
|
74139
|
-
doIntentDetection: !!(config == null ? void 0 : config.omniBoxEnabled) && (config == null ? void 0 : config.intentDetection) !== "disabled"
|
|
74140
|
-
}),
|
|
74141
|
-
[config]
|
|
74142
|
-
);
|
|
74143
|
-
return /* @__PURE__ */ jsx(intentDetectionConfigConext.Provider, { value: intentDetection, children: children2 });
|
|
74144
|
-
};
|
|
74145
|
-
const useIntentDetectionConfig = () => {
|
|
74146
|
-
return useContext(intentDetectionConfigConext);
|
|
74147
|
-
};
|
|
74148
74112
|
function getIntentOptions({
|
|
74149
74113
|
ide,
|
|
74150
74114
|
isDotComUser,
|
|
74151
|
-
|
|
74152
|
-
intentDetectionDisabled
|
|
74115
|
+
omniBoxEnabled
|
|
74153
74116
|
}) {
|
|
74154
|
-
const intentDetectionAvailable = !isDotComUser && !intentDetectionDisabled;
|
|
74155
74117
|
const standardOneBoxIntents = [
|
|
74156
|
-
{
|
|
74157
|
-
title: /* @__PURE__ */ jsxs("div", { className: "tw-flex tw-flex-col tw-self-start", children: [
|
|
74158
|
-
/* @__PURE__ */ jsx("p", { children: "Run detected intent" }),
|
|
74159
|
-
detectedIntent && /* @__PURE__ */ jsx("p", { className: "tw-text-sm tw-text-muted-foreground tw-min-h-10", children: isDotComUser ? "Detects intent and runs appropriately" : `Currently: ${detectedIntent === "search" ? "Search" : "Chat"}` })
|
|
74160
|
-
] }),
|
|
74161
|
-
icon: Sparkles,
|
|
74162
|
-
intent: void 0,
|
|
74163
|
-
hidden: !intentDetectionAvailable,
|
|
74164
|
-
disabled: isDotComUser,
|
|
74165
|
-
shortcut: isDotComUser ? /* @__PURE__ */ jsxs(Badge, { children: [
|
|
74166
|
-
"Enterprise ",
|
|
74167
|
-
/* @__PURE__ */ jsx(Info, { className: "tw-size-4 tw-ml-1" })
|
|
74168
|
-
] }) : /* @__PURE__ */ jsx(Kbd, { macOS: "return", linuxAndWindows: "return" })
|
|
74169
|
-
},
|
|
74170
74118
|
{
|
|
74171
74119
|
title: "Run as chat",
|
|
74172
74120
|
icon: MessageSquare,
|
|
74173
74121
|
intent: "chat",
|
|
74174
|
-
shortcut: /* @__PURE__ */
|
|
74175
|
-
|
|
74176
|
-
|
|
74177
|
-
|
|
74178
|
-
|
|
74179
|
-
{
|
|
74122
|
+
shortcut: /* @__PURE__ */ jsx(Kbd, { macOS: "return", linuxAndWindows: "return" })
|
|
74123
|
+
}
|
|
74124
|
+
];
|
|
74125
|
+
if (omniBoxEnabled) {
|
|
74126
|
+
standardOneBoxIntents.push({
|
|
74180
74127
|
title: /* @__PURE__ */ jsxs("span", { className: "tw-inline-flex tw-items-center tw-gap-4", children: [
|
|
74181
74128
|
/* @__PURE__ */ jsx("span", { children: "Run as search" }),
|
|
74182
74129
|
/* @__PURE__ */ jsx(Badge, { children: "Beta" })
|
|
@@ -74192,8 +74139,8 @@ function getIntentOptions({
|
|
|
74192
74139
|
/* @__PURE__ */ jsx(Kbd, { macOS: "opt", linuxAndWindows: "alt" }),
|
|
74193
74140
|
/* @__PURE__ */ jsx(Kbd, { macOS: "return", linuxAndWindows: "return" })
|
|
74194
74141
|
] })
|
|
74195
|
-
}
|
|
74196
|
-
|
|
74142
|
+
});
|
|
74143
|
+
}
|
|
74197
74144
|
if (ide === CodyIDE.Web) {
|
|
74198
74145
|
return standardOneBoxIntents;
|
|
74199
74146
|
}
|
|
@@ -74214,30 +74161,28 @@ function getIntentOptions({
|
|
|
74214
74161
|
];
|
|
74215
74162
|
}
|
|
74216
74163
|
const SubmitButton = ({ onClick, state = "submittable", detectedIntent, manuallySelectIntent }) => {
|
|
74217
|
-
const experimentalOneBoxEnabled = useOmniBox();
|
|
74218
74164
|
const {
|
|
74219
74165
|
clientCapabilities: { agentIDE },
|
|
74220
74166
|
isDotComUser
|
|
74221
74167
|
} = useConfig();
|
|
74222
|
-
const
|
|
74168
|
+
const omniBoxEnabled = useOmniBox();
|
|
74223
74169
|
const { intentOptions, availableIntentOptions, disabledIntentOptions } = useMemo$1(() => {
|
|
74224
74170
|
const intentOptions2 = getIntentOptions({
|
|
74225
74171
|
ide: agentIDE,
|
|
74226
|
-
|
|
74227
|
-
|
|
74228
|
-
isDotComUser
|
|
74172
|
+
isDotComUser,
|
|
74173
|
+
omniBoxEnabled
|
|
74229
74174
|
}).filter((option) => !option.hidden);
|
|
74230
74175
|
return {
|
|
74231
74176
|
intentOptions: intentOptions2,
|
|
74232
74177
|
availableIntentOptions: intentOptions2.filter((option) => !option.disabled),
|
|
74233
74178
|
disabledIntentOptions: intentOptions2.filter((option) => option.disabled)
|
|
74234
74179
|
};
|
|
74235
|
-
}, [agentIDE,
|
|
74180
|
+
}, [agentIDE, isDotComUser, omniBoxEnabled]);
|
|
74236
74181
|
const inProgress = state === "waitingResponseComplete";
|
|
74237
74182
|
const detectedIntentOption = intentOptions.find((option) => option.intent === detectedIntent);
|
|
74238
74183
|
const Icon2 = (detectedIntentOption == null ? void 0 : detectedIntentOption.intent) ? detectedIntentOption.icon : Play;
|
|
74239
74184
|
const iconClassName = `tw-size-6 ${(detectedIntentOption == null ? void 0 : detectedIntentOption.intent) === "search" ? "" : "tw-fill-current"}`;
|
|
74240
|
-
if (!
|
|
74185
|
+
if (!omniBoxEnabled || inProgress) {
|
|
74241
74186
|
return /* @__PURE__ */ jsx("div", { className: "tw-flex", children: /* @__PURE__ */ jsx(
|
|
74242
74187
|
"button",
|
|
74243
74188
|
{
|
|
@@ -74293,7 +74238,6 @@ const SubmitButton = ({ onClick, state = "submittable", detectedIntent, manually
|
|
|
74293
74238
|
},
|
|
74294
74239
|
option.intent || "auto"
|
|
74295
74240
|
)),
|
|
74296
|
-
disabledIntentOptions.length > 0 && /* @__PURE__ */ jsx(CommandSeparator, {}),
|
|
74297
74241
|
disabledIntentOptions.map((option) => /* @__PURE__ */ jsxs(
|
|
74298
74242
|
CommandItem,
|
|
74299
74243
|
{
|
|
@@ -74344,8 +74288,7 @@ const PopoverItem = ({
|
|
|
74344
74288
|
onCloseByEscape,
|
|
74345
74289
|
popoverRootProps,
|
|
74346
74290
|
popoverContentProps,
|
|
74347
|
-
children: children2
|
|
74348
|
-
...props
|
|
74291
|
+
children: children2
|
|
74349
74292
|
}) => {
|
|
74350
74293
|
const [isOpen, setIsOpen] = useState$1(defaultOpen);
|
|
74351
74294
|
const anchorRef = useRef$1(null);
|
|
@@ -74573,25 +74516,26 @@ const HumanMessageEditor = ({
|
|
|
74573
74516
|
},
|
|
74574
74517
|
[submitState, parentOnSubmit, onStop, telemetryRecorder.recordEvent, isFirstMessage, isSent]
|
|
74575
74518
|
);
|
|
74519
|
+
const omniBoxEnabled = useOmniBox();
|
|
74520
|
+
const { isDotComUser } = useConfig();
|
|
74576
74521
|
const onEditorEnterKey = useCallback(
|
|
74577
74522
|
(event) => {
|
|
74578
74523
|
if (!event || event.isComposing || isEmptyEditorValue || event.shiftKey) {
|
|
74579
74524
|
return;
|
|
74580
74525
|
}
|
|
74581
74526
|
event.preventDefault();
|
|
74527
|
+
if (!omniBoxEnabled || isDotComUser) {
|
|
74528
|
+
onSubmitClick("chat");
|
|
74529
|
+
return;
|
|
74530
|
+
}
|
|
74582
74531
|
if ((event.metaKey || event.ctrlKey) && event.altKey) {
|
|
74583
74532
|
manuallySelectIntent("search");
|
|
74584
74533
|
onSubmitClick("search");
|
|
74585
74534
|
return;
|
|
74586
74535
|
}
|
|
74587
|
-
|
|
74588
|
-
manuallySelectIntent("chat");
|
|
74589
|
-
onSubmitClick("chat");
|
|
74590
|
-
return;
|
|
74591
|
-
}
|
|
74592
|
-
onSubmitClick();
|
|
74536
|
+
onSubmitClick("chat");
|
|
74593
74537
|
},
|
|
74594
|
-
[isEmptyEditorValue, onSubmitClick, manuallySelectIntent]
|
|
74538
|
+
[isEmptyEditorValue, onSubmitClick, manuallySelectIntent, omniBoxEnabled, isDotComUser]
|
|
74595
74539
|
);
|
|
74596
74540
|
const [isEditorFocused, setIsEditorFocused] = useState$1(false);
|
|
74597
74541
|
const onEditorFocusChange = useCallback(
|
|
@@ -75652,8 +75596,6 @@ const ContextCell = memo$1(
|
|
|
75652
75596
|
className,
|
|
75653
75597
|
defaultOpen,
|
|
75654
75598
|
isContextLoading,
|
|
75655
|
-
intent,
|
|
75656
|
-
experimentalOneBoxEnabled,
|
|
75657
75599
|
agent: agent2
|
|
75658
75600
|
}) => {
|
|
75659
75601
|
var _a;
|
|
@@ -75709,8 +75651,8 @@ const ContextCell = memo$1(
|
|
|
75709
75651
|
const telemetryRecorder = useTelemetryRecorder();
|
|
75710
75652
|
const isAgenticChat = (model == null ? void 0 : model.includes(DeepCodyAgentID)) || agent2 === DeepCodyAgentID;
|
|
75711
75653
|
const headerText = {
|
|
75712
|
-
main:
|
|
75713
|
-
sub:
|
|
75654
|
+
main: isAgenticChat ? "Agentic context" : isContextLoading ? "Fetching context" : "Context",
|
|
75655
|
+
sub: isContextLoading ? isAgenticChat ? "Thinking…" : "Retrieving codebase files…" : contextItems === void 0 ? "none requested" : contextItems.length === 0 ? isAgenticChat ? "none" : "none fetched" : itemCountLabel
|
|
75714
75656
|
};
|
|
75715
75657
|
const hasContent = isContextLoading || contextItemsToDisplay && contextItemsToDisplay.length > 0 || !isForFirstMessage || isAgenticChat;
|
|
75716
75658
|
return /* @__PURE__ */ jsxs("div", { className: "tw-flex tw-flex-col tw-justify-center tw-w-full tw-gap-2 tw-py-1", children: [
|
|
@@ -76035,7 +75977,6 @@ const TranscriptInteraction = memo$1((props) => {
|
|
|
76035
75977
|
smartApplyEnabled,
|
|
76036
75978
|
editorRef: parentEditorRef
|
|
76037
75979
|
} = props;
|
|
76038
|
-
const [intentResults, setIntentResults] = useState$1();
|
|
76039
75980
|
const [manuallySelectedIntent, setManuallySelectedIntent] = useState$1(void 0);
|
|
76040
75981
|
useEffect$2(() => {
|
|
76041
75982
|
setManuallySelectedIntent(void 0);
|
|
@@ -76045,7 +75986,6 @@ const TranscriptInteraction = memo$1((props) => {
|
|
|
76045
75986
|
const lastEditorRef = useContext(LastEditorContext);
|
|
76046
75987
|
useImperativeHandle(parentEditorRef, () => humanEditorRef.current);
|
|
76047
75988
|
const usingToolCody = (_a = assistantMessage == null ? void 0 : assistantMessage.model) == null ? void 0 : _a.includes(ToolCodyModelName);
|
|
76048
|
-
const doIntentDetection = useIntentDetectionConfig().doIntentDetection && !usingToolCody;
|
|
76049
75989
|
const onUserAction = useCallback(
|
|
76050
75990
|
(action2, intentFromSubmit) => {
|
|
76051
75991
|
var _a2, _b;
|
|
@@ -76070,19 +76010,9 @@ const TranscriptInteraction = memo$1((props) => {
|
|
|
76070
76010
|
console.error("Failed to serialize editor value");
|
|
76071
76011
|
return;
|
|
76072
76012
|
}
|
|
76073
|
-
const query = inputTextWithMappedContextChipsFromPromptEditorState(editorValue.editorState);
|
|
76074
|
-
const {
|
|
76075
|
-
intent,
|
|
76076
|
-
intentScores
|
|
76077
|
-
} = query === (intentResults == null ? void 0 : intentResults.query) ? {
|
|
76078
|
-
intent: intentResults.intent,
|
|
76079
|
-
intentScores: intentResults.allScores
|
|
76080
|
-
} : { intent: void 0, intentScores: [] };
|
|
76081
76013
|
const commonProps = {
|
|
76082
76014
|
editorValue,
|
|
76083
|
-
|
|
76084
|
-
preDetectedIntentScores: intentScores,
|
|
76085
|
-
manuallySelectedIntent: intentFromSubmit || manuallySelectedIntent || (doIntentDetection ? void 0 : "chat"),
|
|
76015
|
+
manuallySelectedIntent: intentFromSubmit || manuallySelectedIntent || "chat",
|
|
76086
76016
|
traceparent
|
|
76087
76017
|
};
|
|
76088
76018
|
if (action2 === "edit") {
|
|
@@ -76104,9 +76034,7 @@ const TranscriptInteraction = memo$1((props) => {
|
|
|
76104
76034
|
setActiveChatContext,
|
|
76105
76035
|
isLastSentInteraction,
|
|
76106
76036
|
lastEditorRef,
|
|
76107
|
-
|
|
76108
|
-
manuallySelectedIntent,
|
|
76109
|
-
doIntentDetection
|
|
76037
|
+
manuallySelectedIntent
|
|
76110
76038
|
]
|
|
76111
76039
|
);
|
|
76112
76040
|
const onEditSubmit = useCallback(
|
|
@@ -76121,67 +76049,14 @@ const TranscriptInteraction = memo$1((props) => {
|
|
|
76121
76049
|
},
|
|
76122
76050
|
[onUserAction]
|
|
76123
76051
|
);
|
|
76124
|
-
const
|
|
76125
|
-
const experimentalOneBoxEnabled = useOmniBox() && !usingToolCody;
|
|
76126
|
-
const prefetchIntent = useMemo$1(() => {
|
|
76127
|
-
const handler = async (editorValue) => {
|
|
76128
|
-
if (!experimentalOneBoxEnabled || !doIntentDetection) {
|
|
76129
|
-
return;
|
|
76130
|
-
}
|
|
76131
|
-
const query = inputTextWithMappedContextChipsFromPromptEditorState(
|
|
76132
|
-
editorValue.editorState
|
|
76133
|
-
).trim();
|
|
76134
|
-
if (query.length < 2) {
|
|
76135
|
-
setIntentResults(null);
|
|
76136
|
-
return;
|
|
76137
|
-
}
|
|
76138
|
-
if (query === (intentResults == null ? void 0 : intentResults.query)) {
|
|
76139
|
-
return;
|
|
76140
|
-
}
|
|
76141
|
-
const subscription = extensionAPI.detectIntent(query).subscribe({
|
|
76142
|
-
next: (value) => {
|
|
76143
|
-
var _a2;
|
|
76144
|
-
const currentEditorValue = (_a2 = humanEditorRef.current) == null ? void 0 : _a2.getSerializedValue();
|
|
76145
|
-
if (currentEditorValue) {
|
|
76146
|
-
const currentQuery = inputTextWithMappedContextChipsFromPromptEditorState(
|
|
76147
|
-
currentEditorValue == null ? void 0 : currentEditorValue.editorState
|
|
76148
|
-
).trim();
|
|
76149
|
-
if (query !== currentQuery) {
|
|
76150
|
-
return;
|
|
76151
|
-
}
|
|
76152
|
-
}
|
|
76153
|
-
setIntentResults(value && { ...value, query });
|
|
76154
|
-
},
|
|
76155
|
-
error: (error2) => {
|
|
76156
|
-
console.error("Error detecting intent:", error2);
|
|
76157
|
-
}
|
|
76158
|
-
});
|
|
76159
|
-
return () => subscription.unsubscribe();
|
|
76160
|
-
};
|
|
76161
|
-
return debounce(handler, 300);
|
|
76162
|
-
}, [experimentalOneBoxEnabled, extensionAPI, intentResults == null ? void 0 : intentResults.query, doIntentDetection]);
|
|
76163
|
-
useEffect$2(() => {
|
|
76164
|
-
if (!(intentResults == null ? void 0 : intentResults.intent)) {
|
|
76165
|
-
return;
|
|
76166
|
-
}
|
|
76167
|
-
if (!doIntentDetection) {
|
|
76168
|
-
setIntentResults({ intent: void 0, query: "" });
|
|
76169
|
-
}
|
|
76170
|
-
}, [doIntentDetection, intentResults == null ? void 0 : intentResults.intent]);
|
|
76171
|
-
useEffect$2(() => {
|
|
76172
|
-
if (doIntentDetection) {
|
|
76173
|
-
if (humanEditorRef.current) {
|
|
76174
|
-
prefetchIntent(humanEditorRef.current.getSerializedValue());
|
|
76175
|
-
}
|
|
76176
|
-
}
|
|
76177
|
-
}, [doIntentDetection, prefetchIntent]);
|
|
76052
|
+
const omniboxEnabled = useOmniBox() && !usingToolCody;
|
|
76178
76053
|
const vscodeAPI = getVSCodeAPI();
|
|
76179
76054
|
const onStop = useCallback(() => {
|
|
76180
76055
|
vscodeAPI.postMessage({
|
|
76181
76056
|
command: "abort"
|
|
76182
76057
|
});
|
|
76183
76058
|
}, [vscodeAPI]);
|
|
76184
|
-
const isSearchIntent =
|
|
76059
|
+
const isSearchIntent = omniboxEnabled && humanMessage.intent === "search";
|
|
76185
76060
|
const isContextLoading = Boolean(
|
|
76186
76061
|
!isSearchIntent && humanMessage.contextFiles === void 0 && isLastSentInteraction && (assistantMessage == null ? void 0 : assistantMessage.text) === void 0 && (assistantMessage == null ? void 0 : assistantMessage.subMessages) === void 0
|
|
76187
76062
|
);
|
|
@@ -76299,7 +76174,6 @@ const TranscriptInteraction = memo$1((props) => {
|
|
|
76299
76174
|
contextItems: [],
|
|
76300
76175
|
editorState: serializedPromptEditorStateFromText(text2)
|
|
76301
76176
|
},
|
|
76302
|
-
preDetectedIntent: "search",
|
|
76303
76177
|
manuallySelectedIntent: "search"
|
|
76304
76178
|
}),
|
|
76305
76179
|
[humanMessage]
|
|
@@ -76315,7 +76189,6 @@ const TranscriptInteraction = memo$1((props) => {
|
|
|
76315
76189
|
isFirstMessage: humanMessage.index === 0,
|
|
76316
76190
|
isSent: !humanMessage.isUnsentFollowup,
|
|
76317
76191
|
isPendingPriorResponse: priorAssistantMessageIsLoading,
|
|
76318
|
-
onChange: prefetchIntent,
|
|
76319
76192
|
onSubmit: onHumanMessageSubmit,
|
|
76320
76193
|
onStop,
|
|
76321
76194
|
isFirstInteraction,
|
|
@@ -76323,12 +76196,12 @@ const TranscriptInteraction = memo$1((props) => {
|
|
|
76323
76196
|
isEditorInitiallyFocused: isLastInteraction,
|
|
76324
76197
|
editorRef: humanEditorRef,
|
|
76325
76198
|
className: !isFirstInteraction && isLastInteraction ? "tw-mt-auto" : "",
|
|
76326
|
-
intent: manuallySelectedIntent
|
|
76199
|
+
intent: manuallySelectedIntent,
|
|
76327
76200
|
manuallySelectIntent: setManuallySelectedIntent
|
|
76328
76201
|
},
|
|
76329
76202
|
humanMessage.index
|
|
76330
76203
|
),
|
|
76331
|
-
|
|
76204
|
+
omniboxEnabled && (assistantMessage == null ? void 0 : assistantMessage.didYouMeanQuery) && /* @__PURE__ */ jsx(
|
|
76332
76205
|
DidYouMeanNotice,
|
|
76333
76206
|
{
|
|
76334
76207
|
query: assistantMessage == null ? void 0 : assistantMessage.didYouMeanQuery,
|
|
@@ -76348,8 +76221,6 @@ const TranscriptInteraction = memo$1((props) => {
|
|
|
76348
76221
|
!usingToolCody && !(humanMessage.agent && isContextLoading) && (humanMessage.contextFiles || assistantMessage || isContextLoading) && !isSearchIntent && /* @__PURE__ */ jsx(
|
|
76349
76222
|
ContextCell,
|
|
76350
76223
|
{
|
|
76351
|
-
experimentalOneBoxEnabled,
|
|
76352
|
-
intent: humanMessage.intent,
|
|
76353
76224
|
contextItems: humanMessage.contextFiles,
|
|
76354
76225
|
contextAlternatives: humanMessage.contextAlternatives,
|
|
76355
76226
|
model: assistantMessage == null ? void 0 : assistantMessage.model,
|
|
@@ -76398,8 +76269,6 @@ function focusLastHumanMessageEditor() {
|
|
|
76398
76269
|
function editHumanMessage({
|
|
76399
76270
|
messageIndexInTranscript,
|
|
76400
76271
|
editorValue,
|
|
76401
|
-
preDetectedIntent,
|
|
76402
|
-
preDetectedIntentScores,
|
|
76403
76272
|
manuallySelectedIntent
|
|
76404
76273
|
}) {
|
|
76405
76274
|
getVSCodeAPI().postMessage({
|
|
@@ -76408,16 +76277,12 @@ function editHumanMessage({
|
|
|
76408
76277
|
text: editorValue.text,
|
|
76409
76278
|
editorState: editorValue.editorState,
|
|
76410
76279
|
contextItems: editorValue.contextItems.map(deserializeContextItem),
|
|
76411
|
-
preDetectedIntent,
|
|
76412
|
-
preDetectedIntentScores,
|
|
76413
76280
|
manuallySelectedIntent
|
|
76414
76281
|
});
|
|
76415
76282
|
focusLastHumanMessageEditor();
|
|
76416
76283
|
}
|
|
76417
76284
|
function submitHumanMessage({
|
|
76418
76285
|
editorValue,
|
|
76419
|
-
preDetectedIntent,
|
|
76420
|
-
preDetectedIntentScores,
|
|
76421
76286
|
manuallySelectedIntent,
|
|
76422
76287
|
traceparent
|
|
76423
76288
|
}) {
|
|
@@ -76426,8 +76291,6 @@ function submitHumanMessage({
|
|
|
76426
76291
|
text: editorValue.text,
|
|
76427
76292
|
editorState: editorValue.editorState,
|
|
76428
76293
|
contextItems: editorValue.contextItems.map(deserializeContextItem),
|
|
76429
|
-
preDetectedIntent,
|
|
76430
|
-
preDetectedIntentScores,
|
|
76431
76294
|
manuallySelectedIntent,
|
|
76432
76295
|
traceparent
|
|
76433
76296
|
});
|
|
@@ -77201,9 +77064,6 @@ function getAppWrappers({
|
|
|
77201
77064
|
staticDefaultContext
|
|
77202
77065
|
}) {
|
|
77203
77066
|
return [
|
|
77204
|
-
{
|
|
77205
|
-
component: IntentDetectionConfigProvider
|
|
77206
|
-
},
|
|
77207
77067
|
{
|
|
77208
77068
|
provider: TelemetryRecorderContext.Provider,
|
|
77209
77069
|
value: telemetryRecorder
|
|
@@ -77929,6 +77789,6 @@ export {
|
|
|
77929
77789
|
ChatSkeleton,
|
|
77930
77790
|
CodyPromptTemplate,
|
|
77931
77791
|
CodyWebChat,
|
|
77932
|
-
|
|
77933
|
-
|
|
77792
|
+
cg as deserialize,
|
|
77793
|
+
cf as serialize
|
|
77934
77794
|
};
|