@sourcegraph/cody-web 0.18.0 → 0.20.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/index.js CHANGED
@@ -2,7 +2,7 @@ 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 } from "react/jsx-runtime";
5
- import { g as getDefaultExportFromCjs, q as qe$1, _ as _s, a as ds, y as ys, x as xi$1, k as ke$1, L as Ls, b as ks, F as Fi$1, c as bs, i as ii$1, K as K$2, J as J$2, R as R$3, e as ws, B as B$2, f as g$5, h as h$4, j as _i, S as Ss, l as Br, m as ln, n as bi$1, v as vn, o as xn, N as Nn, r as mn, s as li$1, u as n$1, z as ns, M as M$4, D as Ds, A as le$2, E as c$3, G as oe$2, H as z$1, I as yi$1, W as W$2, U as Ue$1, O as I$2, P as Se$2, Q as O$2, T as F$1, V as Ni$1, X as ee$1, Y as we$2, Z as b$2, $ as T$3, a0 as s$2, a1 as o$4, a2 as w$3, a3 as i$1, a4 as k$3, a5 as D$5, a6 as p$8, a7 as m$7, a8 as S$4, a9 as v$4, aa as P$2, ab as E$6, ac as Wi$1, ad as L$3, ae as d$2, af as a$3, ag as l$2, ah as f$2, ai as u$6, aj as r$5, ak as t$2, al as FILE_CONTEXT_MENTION_PROVIDER, am as SYMBOL_CONTEXT_MENTION_PROVIDER, an as REMOTE_REPOSITORY_PROVIDER_URI, ao as REMOTE_FILE_PROVIDER_URI, ap as REMOTE_DIRECTORY_PROVIDER_URI, aq as WEB_PROVIDER_URI, ar as displayPath, as as displayLineRange, at as displayPathDirname, au as displayPathBasename, av as IGNORED_FILE_WARNING_LABEL, aw as LARGE_FILE_WARNING_LABEL, ax as Ei$1, ay as xe$2, az as V$2, aA as Es, aB as U$2, aC as e, aD as Ns, aE as object, aF as literal, aG as string$2, aH as an, aI as gs, aJ as serializeContextItem, aK as CONTEXT_ITEM_MENTION_NODE_TYPE, aL as contextItemMentionNodeDisplayText, C as ContextItemSource, aM as URI, aN as is, aO as qr, aP as _$2, aQ as TEMPLATE_INPUT_NODE_TYPE, aR as N$2, aS as parseMentionQuery, aT as NO_SYMBOL_MATCHES_HELP_LABEL, aU as FILE_RANGE_TOOLTIP_LABEL, aV as Observable$1, aW as createExtensionAPI, aX as createMessageAPIForWebview, aY as debounce, aZ as memoizeLastValue, a_ as toSerializedPromptEditorValue, a$ as ri$1, b0 as isEqual, b1 as scanForMentionTriggerInUserTextInput, b2 as fs, b3 as Ts, b4 as ps, b5 as getMentionOperations, b6 as forceHydration, b7 as hydrateAfterPostMessage, b8 as isSourcegraphToken, b9 as trace, ba as context$1, bb as SpanStatusCode, bc as FeatureFlag, bd as webviewOpenURIForContextItem, be as isCodyProUser, bf as commonjsGlobal, bg as CodyIDE, bh as CodyTaskState, bi as cryptoJsExports, bj as isError, bk as RateLimitError, bl as CODY_FEEDBACK_URL, bm as isDefined, bn as upperFirst, bo as lodashExports, bp as createContextItem, bq as CODE_SEARCH_PROVIDER_URI, br as reformatBotMessageForChat, bs as isAbortErrorOrSocketHangUp, bt as ModelTag, bu as serializedPromptEditorStateFromChatMessage, bv as contextItemsFromPromptEditorValue, bw as filterContextItemsFromPromptEditorValue, bx as pluralize$1, by as CustomCommandType, bz as View, bA as isCodyProModel, bB as isWaitlistModel, bC as isDotCom, bD as ACCOUNT_USAGE_URL, bE as ACCOUNT_UPGRADE_URL, bF as getRelativeChatPeriod, bG as isMacOS, bH as firstResultFromOperation, bI as textContentFromSerializedLexicalNode, bJ as firstValueFrom, bK as skipPendingOperation, bL as FAST_CHAT_INPUT_TOKEN_BUDGET, bM as inputTextWithMappedContextChipsFromPromptEditorState, bN as deserializeContextItem, bO as truncateTextStart, bP as CHAT_INPUT_TOKEN_BUDGET, bQ as S2_URL, bR as browser, bS as isErrorLike, bT as PromptString, bU as setDisplayPathEnvInfo } from "./browser-CSavJDeQ.mjs";
5
+ import { g as getDefaultExportFromCjs, L as Ls, k as ke$1, a as ks, F as Fi$1, _ as _s, b as ds, c as bs, i 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, e as ws, B as B$2, f as g$5, h as h$4, j as _i, S as Ss, l as Br, m as ln, n as bi$1, v as vn, o as xn, N as Nn, r as mn, s as li$1, u as n$1, z as ns, M as M$4, D as Ds, A as le$2, E as c$3, G as oe$2, H as z$1, I as yi$1, W as W$2, U as Ue$1, O as I$2, P as Se$2, Q as O$2, T as F$1, V as Ni$1, X as ee$1, Y as we$2, Z as b$2, $ as T$3, a0 as s$2, a1 as o$4, a2 as w$3, a3 as i$1, a4 as k$3, a5 as D$5, a6 as p$8, a7 as m$7, a8 as S$4, a9 as v$4, aa as P$2, ab as E$6, ac as Wi$1, ad as L$3, ae as d$2, af as a$3, ag as l$2, ah as f$2, ai as u$6, aj as r$5, ak as t$2, al as isRemoteWorkspaceProvider, am as FILE_CONTEXT_MENTION_PROVIDER, an as SYMBOL_CONTEXT_MENTION_PROVIDER, ao as REMOTE_REPOSITORY_PROVIDER_URI, ap as REMOTE_FILE_PROVIDER_URI, aq as REMOTE_DIRECTORY_PROVIDER_URI, ar as WEB_PROVIDER_URI, as as WORKSPACE_DIRECTORY_PROVIDER_URI, at as WORKSPACE_REPOSITORY_PROVIDER_URI, au as displayPath, av as displayLineRange, aw as displayPathDirname, ax as displayPathBasename, ay as IGNORED_FILE_WARNING_LABEL, az as LARGE_FILE_WARNING_LABEL, aA as Ei$1, aB as xe$2, aC as V$2, aD as Es, aE as U$2, aF as e, aG as Ns, aH as object, aI as literal, aJ as string$2, aK as gs, aL as serializeContextItem, aM as CONTEXT_ITEM_MENTION_NODE_TYPE, aN as contextItemMentionNodeDisplayText, C as ContextItemSource, aO as URI, aP as is, aQ as an, aR as qr, aS as _$2, aT as TEMPLATE_INPUT_NODE_TYPE, aU as N$2, aV as parseMentionQuery, aW as NO_SYMBOL_MATCHES_HELP_LABEL, aX as FILE_RANGE_TOOLTIP_LABEL, aY as Observable$1, aZ as createExtensionAPI, a_ as createMessageAPIForWebview, a$ as debounce, b0 as memoizeLastValue, b1 as toSerializedPromptEditorValue, b2 as ri$1, b3 as isEqual, b4 as scanForMentionTriggerInUserTextInput, b5 as fs, b6 as Ts, b7 as ps, b8 as getMentionOperations, b9 as forceHydration, ba as hydrateAfterPostMessage, bb as isSourcegraphToken, bc as trace, bd as context$1, be as SpanStatusCode, bf as FeatureFlag, bg as webviewOpenURIForContextItem, bh as isCodyProUser, bi as commonjsGlobal, bj as CodyIDE, bk as CodyTaskState, bl as cryptoJsExports, bm as isError, bn as RateLimitError, bo as CODY_FEEDBACK_URL, bp as isDefined, bq as upperFirst, br as lodashExports, bs as createContextItem, bt as CODE_SEARCH_PROVIDER_URI, bu as reformatBotMessageForChat, bv as isAbortErrorOrSocketHangUp, bw as ModelTag, bx as serializedPromptEditorStateFromChatMessage, by as contextItemsFromPromptEditorValue, bz as filterContextItemsFromPromptEditorValue, bA as pluralize$1, bB as CustomCommandType, bC as View, bD as isCodyProModel, bE as isWaitlistModel, bF as isDotCom, bG as ACCOUNT_USAGE_URL, bH as ACCOUNT_UPGRADE_URL, bI as getRelativeChatPeriod, bJ as isMacOS, bK as firstResultFromOperation, bL as textContentFromSerializedLexicalNode, bM as firstValueFrom, bN as skipPendingOperation, bO as FAST_CHAT_INPUT_TOKEN_BUDGET, bP as inputTextWithMappedContextChipsFromPromptEditorState, bQ as deserializeContextItem, bR as truncateTextStart, bS as CHAT_INPUT_TOKEN_BUDGET, bT as DOTCOM_WORKSPACE_UPGRADE_URL, bU as DOTCOM_WORKSPACE_LEARN_MORE_URL, bV as S2_URL, bW as browser, bX as isErrorLike, bY as PromptString, bZ as setDisplayPathEnvInfo } from "./browser-C8qAwvsz.mjs";
6
6
  import * as React from "react";
7
7
  import React__default, { createContext, useContext, useMemo, useLayoutEffect, useEffect, forwardRef, useState, useCallback, useRef, Suspense, createElement, memo, useImperativeHandle, Children, isValidElement, cloneElement, Fragment as Fragment$1, useReducer } from "react";
8
8
  var classnames = { exports: {} };
@@ -64,97 +64,6 @@ var classnames = { exports: {} };
64
64
  })(classnames);
65
65
  var classnamesExports = classnames.exports;
66
66
  const classNames = /* @__PURE__ */ getDefaultExportFromCjs(classnamesExports);
67
- function m$6(e2) {
68
- return e2 && e2.__esModule && Object.prototype.hasOwnProperty.call(e2, "default") ? e2.default : e2;
69
- }
70
- m$6(function(e2) {
71
- const t2 = new URLSearchParams();
72
- t2.append("code", e2);
73
- for (let e3 = 1; e3 < arguments.length; e3++) t2.append("v", arguments[e3]);
74
- throw Error(`Minified Lexical error #${e2}; visit https://lexical.dev/docs/error?${t2} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
75
- });
76
- const x$5 = /* @__PURE__ */ new Map();
77
- function w$2(e2) {
78
- const t2 = {}, n2 = e2.split(";");
79
- for (const e3 of n2) if ("" !== e3) {
80
- const [n3, l2] = e3.split(/:([^]+)/);
81
- n3 && l2 && (t2[n3.trim()] = l2.trim());
82
- }
83
- return t2;
84
- }
85
- function E$5(e2, n2) {
86
- const l2 = e2.getStartEndPoints();
87
- if (n2.isSelected(e2) && !n2.isSegmented() && !n2.isToken() && null !== l2) {
88
- const [o2, r2] = l2, s2 = e2.isBackward(), i2 = o2.getNode(), c2 = r2.getNode(), f2 = n2.is(i2), u2 = n2.is(c2);
89
- if (f2 || u2) {
90
- const [l3, o3] = xi$1(e2), r3 = i2.is(c2), f3 = n2.is(s2 ? c2 : i2), u3 = n2.is(s2 ? i2 : c2);
91
- let g2, a2 = 0;
92
- if (r3) a2 = l3 > o3 ? o3 : l3, g2 = l3 > o3 ? l3 : o3;
93
- else if (f3) {
94
- a2 = s2 ? o3 : l3, g2 = void 0;
95
- } else if (u3) {
96
- a2 = 0, g2 = s2 ? l3 : o3;
97
- }
98
- return n2.__text = n2.__text.slice(a2, g2), n2;
99
- }
100
- }
101
- return n2;
102
- }
103
- function I$1(e2) {
104
- const t2 = e2.getStyle(), n2 = w$2(t2);
105
- x$5.set(t2, n2);
106
- }
107
- function A$2(e2, t2) {
108
- const l2 = qe$1(e2.focus, t2);
109
- return _s(l2) && !l2.isIsolated() || ds(l2) && !l2.isInline() && !l2.canBeEmpty();
110
- }
111
- function L$2(e2, t2, n2, l2) {
112
- e2.modify(t2 ? "extend" : "move", n2, l2);
113
- }
114
- function D$4(e2) {
115
- const t2 = e2.anchor.getNode();
116
- return "rtl" === (ys(t2) ? t2 : t2.getParentOrThrow()).getDirection();
117
- }
118
- function M$3(e2, t2, n2) {
119
- const l2 = D$4(e2);
120
- L$2(e2, t2, n2 ? !l2 : l2, "character");
121
- }
122
- function g$4(e2) {
123
- return e2 && e2.__esModule && Object.prototype.hasOwnProperty.call(e2, "default") ? e2.default : e2;
124
- }
125
- var p$7 = g$4(function(e2) {
126
- const t2 = new URLSearchParams();
127
- t2.append("code", e2);
128
- for (let e3 = 1; e3 < arguments.length; e3++) t2.append("v", arguments[e3]);
129
- throw Error(`Minified Lexical error #${e2}; visit https://lexical.dev/docs/error?${t2} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
130
- });
131
- const h$3 = "undefined" != typeof window && void 0 !== window.document && void 0 !== window.document.createElement, m$5 = h$3 && "documentMode" in document ? document.documentMode : null;
132
- !(!h$3 || !("InputEvent" in window) || m$5) && "getTargetRanges" in new window.InputEvent("input");
133
- function b$1(...e2) {
134
- return () => {
135
- for (let t2 = e2.length - 1; t2 >= 0; t2--) e2[t2]();
136
- e2.length = 0;
137
- };
138
- }
139
- function J$1(e2) {
140
- const t2 = Q$2(e2, (e3) => ds(e3) && !e3.isInline());
141
- return ds(t2) || p$7(4, e2.__key), t2;
142
- }
143
- const Q$2 = (e2, t2) => {
144
- let n2 = e2;
145
- for (; n2 !== ke$1() && null != n2; ) {
146
- if (t2(n2)) return n2;
147
- n2 = n2.getParent();
148
- }
149
- return null;
150
- };
151
- function te$1(e2, t2) {
152
- return null !== e2 && Object.getPrototypeOf(e2).constructor.name === t2.name;
153
- }
154
- function oe$1(e2, t2) {
155
- const n2 = e2.getFirstChild();
156
- null !== n2 ? n2.insertBefore(t2) : e2.append(t2);
157
- }
158
67
  function r$4(e2) {
159
68
  var t2, f2, n2 = "";
160
69
  if ("string" == typeof e2 || "number" == typeof e2) n2 += e2;
@@ -187,8 +96,8 @@ function u$5() {
187
96
  const e2 = useContext(l$1);
188
97
  return null == e2 && t$1(8), e2;
189
98
  }
190
- const s$1 = "undefined" != typeof window && void 0 !== window.document && void 0 !== window.document.createElement, m$4 = s$1 ? useLayoutEffect : useEffect, u$4 = { tag: "history-merge" };
191
- function p$6({ initialConfig: a2, children: c2 }) {
99
+ const s$1 = "undefined" != typeof window && void 0 !== window.document && void 0 !== window.document.createElement, m$6 = s$1 ? useLayoutEffect : useEffect, u$4 = { tag: "history-merge" };
100
+ function p$7({ initialConfig: a2, children: c2 }) {
192
101
  const p2 = useMemo(() => {
193
102
  const { theme: t2, namespace: c3, nodes: l2, onError: d2, editorState: m2, html: p3 } = a2, f2 = o$3(null, t2), E2 = Ls({ editable: a2.editable, html: p3, namespace: c3, nodes: l2, onError: (e2) => d2(e2, E2), theme: t2 });
194
103
  return function(e2, t3) {
@@ -218,7 +127,7 @@ function p$6({ initialConfig: a2, children: c2 }) {
218
127
  }
219
128
  }(E2, m2), [E2, f2];
220
129
  }, []);
221
- return m$4(() => {
130
+ return m$6(() => {
222
131
  const e2 = a2.editable, [t2] = p2;
223
132
  t2.setEditable(void 0 === e2 || e2);
224
133
  }, []), jsx(l$1.Provider, { value: p2, children: c2 });
@@ -250,7 +159,7 @@ function c$2(o2) {
250
159
  }
251
160
  return true;
252
161
  }
253
- function g$3(t2) {
162
+ function g$4(t2) {
254
163
  return () => c$2(t2);
255
164
  }
256
165
  function d$1(t2) {
@@ -262,6 +171,97 @@ d$1(function(t2) {
262
171
  for (let t3 = 1; t3 < arguments.length; t3++) e2.append("v", arguments[t3]);
263
172
  throw Error(`Minified Lexical error #${t2}; visit https://lexical.dev/docs/error?${e2} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
264
173
  });
174
+ function m$5(e2) {
175
+ return e2 && e2.__esModule && Object.prototype.hasOwnProperty.call(e2, "default") ? e2.default : e2;
176
+ }
177
+ m$5(function(e2) {
178
+ const t2 = new URLSearchParams();
179
+ t2.append("code", e2);
180
+ for (let e3 = 1; e3 < arguments.length; e3++) t2.append("v", arguments[e3]);
181
+ throw Error(`Minified Lexical error #${e2}; visit https://lexical.dev/docs/error?${t2} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
182
+ });
183
+ const x$5 = /* @__PURE__ */ new Map();
184
+ function w$2(e2) {
185
+ const t2 = {}, n2 = e2.split(";");
186
+ for (const e3 of n2) if ("" !== e3) {
187
+ const [n3, l2] = e3.split(/:([^]+)/);
188
+ n3 && l2 && (t2[n3.trim()] = l2.trim());
189
+ }
190
+ return t2;
191
+ }
192
+ function E$5(e2, n2) {
193
+ const l2 = e2.getStartEndPoints();
194
+ if (n2.isSelected(e2) && !n2.isSegmented() && !n2.isToken() && null !== l2) {
195
+ const [o2, r2] = l2, s2 = e2.isBackward(), i2 = o2.getNode(), c2 = r2.getNode(), f2 = n2.is(i2), u2 = n2.is(c2);
196
+ if (f2 || u2) {
197
+ const [l3, o3] = xi$1(e2), r3 = i2.is(c2), f3 = n2.is(s2 ? c2 : i2), u3 = n2.is(s2 ? i2 : c2);
198
+ let g2, a2 = 0;
199
+ if (r3) a2 = l3 > o3 ? o3 : l3, g2 = l3 > o3 ? l3 : o3;
200
+ else if (f3) {
201
+ a2 = s2 ? o3 : l3, g2 = void 0;
202
+ } else if (u3) {
203
+ a2 = 0, g2 = s2 ? l3 : o3;
204
+ }
205
+ return n2.__text = n2.__text.slice(a2, g2), n2;
206
+ }
207
+ }
208
+ return n2;
209
+ }
210
+ function I$1(e2) {
211
+ const t2 = e2.getStyle(), n2 = w$2(t2);
212
+ x$5.set(t2, n2);
213
+ }
214
+ function A$2(e2, t2) {
215
+ const l2 = qe$1(e2.focus, t2);
216
+ return _s(l2) && !l2.isIsolated() || ds(l2) && !l2.isInline() && !l2.canBeEmpty();
217
+ }
218
+ function L$2(e2, t2, n2, l2) {
219
+ e2.modify(t2 ? "extend" : "move", n2, l2);
220
+ }
221
+ function D$4(e2) {
222
+ const t2 = e2.anchor.getNode();
223
+ return "rtl" === (ys(t2) ? t2 : t2.getParentOrThrow()).getDirection();
224
+ }
225
+ function M$3(e2, t2, n2) {
226
+ const l2 = D$4(e2);
227
+ L$2(e2, t2, n2 ? !l2 : l2, "character");
228
+ }
229
+ function g$3(e2) {
230
+ return e2 && e2.__esModule && Object.prototype.hasOwnProperty.call(e2, "default") ? e2.default : e2;
231
+ }
232
+ var p$6 = g$3(function(e2) {
233
+ const t2 = new URLSearchParams();
234
+ t2.append("code", e2);
235
+ for (let e3 = 1; e3 < arguments.length; e3++) t2.append("v", arguments[e3]);
236
+ throw Error(`Minified Lexical error #${e2}; visit https://lexical.dev/docs/error?${t2} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
237
+ });
238
+ const h$3 = "undefined" != typeof window && void 0 !== window.document && void 0 !== window.document.createElement, m$4 = h$3 && "documentMode" in document ? document.documentMode : null;
239
+ !(!h$3 || !("InputEvent" in window) || m$4) && "getTargetRanges" in new window.InputEvent("input");
240
+ function b$1(...e2) {
241
+ return () => {
242
+ for (let t2 = e2.length - 1; t2 >= 0; t2--) e2[t2]();
243
+ e2.length = 0;
244
+ };
245
+ }
246
+ function J$1(e2) {
247
+ const t2 = Q$2(e2, (e3) => ds(e3) && !e3.isInline());
248
+ return ds(t2) || p$6(4, e2.__key), t2;
249
+ }
250
+ const Q$2 = (e2, t2) => {
251
+ let n2 = e2;
252
+ for (; n2 !== ke$1() && null != n2; ) {
253
+ if (t2(n2)) return n2;
254
+ n2 = n2.getParent();
255
+ }
256
+ return null;
257
+ };
258
+ function te$1(e2, t2) {
259
+ return null !== e2 && Object.getPrototypeOf(e2).constructor.name === t2.name;
260
+ }
261
+ function oe$1(e2, t2) {
262
+ const n2 = e2.getFirstChild();
263
+ null !== n2 ? n2.insertBefore(t2) : e2.append(t2);
264
+ }
265
265
  const m$3 = "undefined" != typeof window && void 0 !== window.document && void 0 !== window.document.createElement ? useLayoutEffect : useEffect;
266
266
  function f$1({ editor: e2, ariaActiveDescendant: t2, ariaAutoComplete: i2, ariaControls: a2, ariaDescribedBy: d2, ariaExpanded: c2, ariaLabel: s2, ariaLabelledBy: u2, ariaMultiline: f2, ariaOwns: b2, ariaRequired: p2, autoCapitalize: x2, className: E2, id: v2, role: w2 = "textbox", spellCheck: y2 = true, style: C2, tabIndex: h2, "data-testid": L2, ...g2 }, D2) {
267
267
  const [R2, k2] = useState(e2.isEditable()), q = useCallback((t3) => {
@@ -279,7 +279,7 @@ function f$1({ editor: e2, ariaActiveDescendant: t2, ariaAutoComplete: i2, ariaC
279
279
  }
280
280
  const b = forwardRef(f$1);
281
281
  function p$5(e2) {
282
- return e2.getEditorState().read(g$3(e2.isComposing()));
282
+ return e2.getEditorState().read(g$4(e2.isComposing()));
283
283
  }
284
284
  const x$4 = forwardRef(E$4);
285
285
  function E$4(t2, i2) {
@@ -7627,7 +7627,7 @@ function Tt(o2) {
7627
7627
  }
7628
7628
  const g = "undefined" != typeof window && void 0 !== window.document && void 0 !== window.document.createElement ? useLayoutEffect : useEffect;
7629
7629
  function E$1(t2) {
7630
- return t2.getEditorState().read(g$3(t2.isComposing()));
7630
+ return t2.getEditorState().read(g$4(t2.isComposing()));
7631
7631
  }
7632
7632
  function h({ contentEditable: e2, placeholder: r2 = null, ErrorBoundary: n2 }) {
7633
7633
  const [E2] = u$5(), h2 = function(t2, e3) {
@@ -7672,7 +7672,7 @@ const editor$2 = "_editor_s4gjm_1";
7672
7672
  const contentEditable = "_content-editable_s4gjm_6";
7673
7673
  const placeholder = "_placeholder_s4gjm_14";
7674
7674
  const themeParagraph = "_theme-paragraph_s4gjm_29";
7675
- const styles$z = {
7675
+ const styles$A = {
7676
7676
  editor: editor$2,
7677
7677
  contentEditable,
7678
7678
  placeholder,
@@ -8163,6 +8163,17 @@ const File = createLucideIcon("File", [
8163
8163
  ["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
8164
8164
  ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }]
8165
8165
  ]);
8166
+ /**
8167
+ * @license lucide-react v0.378.0 - ISC
8168
+ *
8169
+ * This source code is licensed under the ISC license.
8170
+ * See the LICENSE file in the root directory of this source tree.
8171
+ */
8172
+ const FilterX = createLucideIcon("FilterX", [
8173
+ ["path", { d: "M13.013 3H2l8 9.46V19l4 2v-8.54l.9-1.055", key: "1fi1da" }],
8174
+ ["path", { d: "m22 3-5 5", key: "12jva0" }],
8175
+ ["path", { d: "m17 3 5 5", key: "k36vhe" }]
8176
+ ]);
8166
8177
  /**
8167
8178
  * @license lucide-react v0.378.0 - ISC
8168
8179
  *
@@ -8340,6 +8351,23 @@ const MessagesSquare = createLucideIcon("MessagesSquare", [
8340
8351
  ["path", { d: "M14 9a2 2 0 0 1-2 2H6l-4 4V4c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2z", key: "jj09z8" }],
8341
8352
  ["path", { d: "M18 9h2a2 2 0 0 1 2 2v11l-4-4h-6a2 2 0 0 1-2-2v-1", key: "1cx29u" }]
8342
8353
  ]);
8354
+ /**
8355
+ * @license lucide-react v0.378.0 - ISC
8356
+ *
8357
+ * This source code is licensed under the ISC license.
8358
+ * See the LICENSE file in the root directory of this source tree.
8359
+ */
8360
+ const OctagonX = createLucideIcon("OctagonX", [
8361
+ [
8362
+ "polygon",
8363
+ {
8364
+ points: "7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2",
8365
+ key: "h1p8hx"
8366
+ }
8367
+ ],
8368
+ ["path", { d: "m15 9-6 6", key: "1uzhvr" }],
8369
+ ["path", { d: "m9 9 6 6", key: "z0biqf" }]
8370
+ ]);
8343
8371
  /**
8344
8372
  * @license lucide-react v0.378.0 - ISC
8345
8373
  *
@@ -8350,6 +8378,17 @@ const Option$2 = createLucideIcon("Option", [
8350
8378
  ["path", { d: "M3 3h6l6 18h6", key: "ph9rgk" }],
8351
8379
  ["path", { d: "M14 3h7", key: "16f0ms" }]
8352
8380
  ]);
8381
+ /**
8382
+ * @license lucide-react v0.378.0 - ISC
8383
+ *
8384
+ * This source code is licensed under the ISC license.
8385
+ * See the LICENSE file in the root directory of this source tree.
8386
+ */
8387
+ const PanelLeftClose = createLucideIcon("PanelLeftClose", [
8388
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
8389
+ ["path", { d: "M9 3v18", key: "fh3hqa" }],
8390
+ ["path", { d: "m16 15-3-3 3-3", key: "14y99z" }]
8391
+ ]);
8353
8392
  /**
8354
8393
  * @license lucide-react v0.378.0 - ISC
8355
8394
  *
@@ -8577,11 +8616,11 @@ const SvgNotion = (props) => /* @__PURE__ */ React.createElement("svg", { width:
8577
8616
  const SvgSentry = (props) => /* @__PURE__ */ React.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M1.99994 11.999C1.99563 12.253 2.06662 12.5026 2.20394 12.7164C2.31807 12.8958 2.47348 13.0454 2.65718 13.1525C2.84088 13.2597 3.04755 13.3214 3.25994 13.3324C3.69061 13.3544 2.90194 13.3324 3.33327 13.3324H5.33327C5.33335 12.6045 5.09473 11.8968 4.65401 11.3176C4.21328 10.7384 3.59476 10.3197 2.89327 10.1257C3.26616 9.47726 3.7195 8.69259 4.25327 7.7717C5.36037 8.22032 6.30836 8.98918 6.97585 9.97983C7.64333 10.9705 7.99991 12.1378 7.99994 13.3324H12.6666C12.8841 13.3308 13.098 13.2761 13.2895 13.173C13.4811 13.0698 13.6444 12.9213 13.7654 12.7405C13.8864 12.5597 13.9613 12.3521 13.9836 12.1357C14.0059 11.9193 13.9749 11.7007 13.8933 11.499L9.15994 3.33237C9.04464 3.12397 8.87561 2.95025 8.67044 2.82929C8.46527 2.70833 8.23145 2.64453 7.99327 2.64453C7.7551 2.64453 7.52128 2.70833 7.31611 2.82929C7.11094 2.95025 6.94191 3.12397 6.82661 3.33237L5.59994 5.4497C8.58794 6.81637 10.6666 9.83037 10.6666 13.3324", stroke: "currentColor", strokeWidth: 1.25, strokeLinecap: "round", strokeLinejoin: "round" }));
8578
8617
  const SvgSlack = (props) => /* @__PURE__ */ React.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M3.99992 10C3.99992 10.3536 3.85944 10.6928 3.60939 10.9428C3.35935 11.1929 3.02021 11.3333 2.66659 11.3333C2.31296 11.3333 1.97382 11.1929 1.72378 10.9428C1.47373 10.6928 1.33325 10.3536 1.33325 10C1.33325 9.64638 1.47373 9.30724 1.72378 9.05719C1.97382 8.80714 2.31296 8.66667 2.66659 8.66667H3.99992V10ZM4.66659 10C4.66659 9.64638 4.80706 9.30724 5.05711 9.05719C5.30716 8.80714 5.6463 8.66667 5.99992 8.66667C6.35354 8.66667 6.69268 8.80714 6.94273 9.05719C7.19278 9.30724 7.33325 9.64638 7.33325 10V13.3333C7.33325 13.687 7.19278 14.0261 6.94273 14.2761C6.69268 14.5262 6.35354 14.6667 5.99992 14.6667C5.6463 14.6667 5.30716 14.5262 5.05711 14.2761C4.80706 14.0261 4.66659 13.687 4.66659 13.3333V10ZM5.99992 4.66667C5.6463 4.66667 5.30716 4.52619 5.05711 4.27614C4.80706 4.02609 4.66659 3.68696 4.66659 3.33333C4.66659 2.97971 4.80706 2.64057 5.05711 2.39052C5.30716 2.14048 5.6463 2 5.99992 2C6.35354 2 6.69268 2.14048 6.94273 2.39052C7.19278 2.64057 7.33325 2.97971 7.33325 3.33333V4.66667H5.99992ZM5.99992 5.33333C6.35354 5.33333 6.69268 5.47381 6.94273 5.72386C7.19278 5.97391 7.33325 6.31305 7.33325 6.66667C7.33325 7.02029 7.19278 7.35943 6.94273 7.60948C6.69268 7.85952 6.35354 8 5.99992 8H2.66659C2.31296 8 1.97382 7.85952 1.72378 7.60948C1.47373 7.35943 1.33325 7.02029 1.33325 6.66667C1.33325 6.31305 1.47373 5.97391 1.72378 5.72386C1.97382 5.47381 2.31296 5.33333 2.66659 5.33333H5.99992ZM11.3333 6.66667C11.3333 6.31305 11.4737 5.97391 11.7238 5.72386C11.9738 5.47381 12.313 5.33333 12.6666 5.33333C13.0202 5.33333 13.3593 5.47381 13.6094 5.72386C13.8594 5.97391 13.9999 6.31305 13.9999 6.66667C13.9999 7.02029 13.8594 7.35943 13.6094 7.60948C13.3593 7.85952 13.0202 8 12.6666 8H11.3333V6.66667ZM10.6666 6.66667C10.6666 7.02029 10.5261 7.35943 10.2761 7.60948C10.026 7.85952 9.68687 8 9.33325 8C8.97963 8 8.64049 7.85952 8.39044 7.60948C8.14039 7.35943 7.99992 7.02029 7.99992 6.66667V3.33333C7.99992 2.97971 8.14039 2.64057 8.39044 2.39052C8.64049 2.14048 8.97963 2 9.33325 2C9.68687 2 10.026 2.14048 10.2761 2.39052C10.5261 2.64057 10.6666 2.97971 10.6666 3.33333V6.66667ZM9.33325 12C9.68687 12 10.026 12.1405 10.2761 12.3905C10.5261 12.6406 10.6666 12.9797 10.6666 13.3333C10.6666 13.687 10.5261 14.0261 10.2761 14.2761C10.026 14.5262 9.68687 14.6667 9.33325 14.6667C8.97963 14.6667 8.64049 14.5262 8.39044 14.2761C8.14039 14.0261 7.99992 13.687 7.99992 13.3333V12H9.33325ZM9.33325 11.3333C8.97963 11.3333 8.64049 11.1929 8.39044 10.9428C8.14039 10.6928 7.99992 10.3536 7.99992 10C7.99992 9.64638 8.14039 9.30724 8.39044 9.05719C8.64049 8.80714 8.97963 8.66667 9.33325 8.66667H12.6666C13.0202 8.66667 13.3593 8.80714 13.6094 9.05719C13.8594 9.30724 13.9999 9.64638 13.9999 10C13.9999 10.3536 13.8594 10.6928 13.6094 10.9428C13.3593 11.1929 13.0202 11.3333 12.6666 11.3333H9.33325Z" }));
8579
8618
  const SvgSourcegraph = (props) => /* @__PURE__ */ React.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M10.7733 3.92081C10.9385 3.77931 11.1317 3.69348 11.3295 3.65636C11.7344 3.58213 12.1696 3.71899 12.4559 4.05536C12.8841 4.55642 12.8236 5.30802 12.3232 5.73485L10.5545 7.23805L9.25589 6.77874L8.77182 6.60708L7.95728 6.31943L8.61589 5.76037L9.00687 5.42865L10.7756 3.92545L10.7733 3.92081Z" }), /* @__PURE__ */ React.createElement("path", { d: "M4.85498 12.0829C4.68975 12.2244 4.49658 12.3102 4.29877 12.3473C3.89382 12.4215 3.45862 12.2847 3.17237 11.9483C2.74415 11.4473 2.80466 10.6957 3.30502 10.2688L5.07375 8.76562L6.37236 9.22493L6.85643 9.3966L7.67097 9.68424L7.01236 10.2433L6.62138 10.575L4.85266 12.0782L4.85498 12.0829Z" }), /* @__PURE__ */ React.createElement("path", { d: "M5.74876 3.4069C5.63007 2.7597 6.05829 2.14032 6.70527 2.0197C7.35458 1.90139 7.97596 2.32822 8.09697 2.97311L8.51821 5.2511L7.46861 6.1442L6.17 5.68489L5.74876 3.4069Z" }), /* @__PURE__ */ React.createElement("path", { d: "M9.87955 12.5928C9.99824 13.24 9.57003 13.8594 8.92305 13.98C8.27374 14.0983 7.65236 13.6715 7.53134 13.0266L7.11011 10.7486L8.1597 9.85547L9.45832 10.3148L9.87955 12.5928Z" }), /* @__PURE__ */ React.createElement("path", { d: "M13.5636 10.0308C13.4147 10.446 13.0609 10.729 12.6537 10.8033C12.4535 10.8404 12.2441 10.8265 12.0393 10.7545L9.84932 9.97975L9.36525 9.80809L8.5507 9.52044L8.06663 9.34878L6.76802 8.88947L6.28395 8.71781L5.4694 8.43016L4.98533 8.2585L2.79538 7.48371C2.17399 7.26333 1.84818 6.58364 2.06927 5.96427C2.21821 5.54904 2.57196 5.26603 2.97923 5.1918C3.17937 5.15468 3.38883 5.1686 3.59363 5.24051L5.78358 6.01531L6.26766 6.18697L7.0822 6.47462L7.56627 6.64628L8.86488 7.10559L9.34896 7.27725L10.1635 7.5649L10.6476 7.73656L12.8375 8.51135C13.4589 8.73173 13.7847 9.41142 13.5636 10.0308Z" }));
8580
- const title$1 = "_title_1nc1q_5";
8581
- const description = "_description_1nc1q_5";
8582
- const warning = "_warning_1nc1q_5";
8583
- const row$1 = "_row_1nc1q_11";
8584
- const styles$y = {
8619
+ const title$1 = "_title_1ibg5_5";
8620
+ const description = "_description_1ibg5_5";
8621
+ const warning = "_warning_1ibg5_5";
8622
+ const row$1 = "_row_1ibg5_11";
8623
+ const styles$z = {
8585
8624
  title: title$1,
8586
8625
  description,
8587
8626
  warning,
@@ -8635,17 +8674,37 @@ const MentionMenuContextItemContent = ({ query, item: item2 }) => {
8635
8674
  warning2 = "";
8636
8675
  }
8637
8676
  return /* @__PURE__ */ jsxs(Fragment, { children: [
8638
- /* @__PURE__ */ jsxs("div", { className: styles$y.row, children: [
8677
+ /* @__PURE__ */ jsxs("div", { className: styles$z.row, children: [
8639
8678
  icon2 && /* @__PURE__ */ jsx("i", { className: `codicon codicon-${icon2}`, title: isSymbol ? item2.kind : "" }),
8640
- /* @__PURE__ */ jsx("span", { className: clsx$1(styles$y.title, warning2 && styles$y.titleWithWarning), title: title2, children: displayName }),
8641
- description2 && /* @__PURE__ */ jsx("span", { className: styles$y.description, title: description2, children: description2 })
8679
+ /* @__PURE__ */ jsx("span", { className: clsx$1(styles$z.title, warning2 && styles$z.titleWithWarning), title: title2, children: displayName }),
8680
+ description2 && /* @__PURE__ */ jsx("span", { className: styles$z.description, title: description2, children: description2 })
8642
8681
  ] }),
8643
- warning2 && /* @__PURE__ */ jsx("span", { className: styles$y.warning, children: warning2 })
8682
+ warning2 && /* @__PURE__ */ jsx("span", { className: styles$z.warning, children: warning2 })
8644
8683
  ] });
8645
8684
  };
8646
8685
  const MentionMenuProviderItemContent = ({ provider }) => {
8647
8686
  const Icon2 = iconForProvider[provider.id] ?? Database;
8648
- return /* @__PURE__ */ jsxs("div", { className: styles$y.row, title: provider.id, children: [
8687
+ if (isRemoteWorkspaceProvider(provider.id)) {
8688
+ return /* @__PURE__ */ jsxs(
8689
+ "a",
8690
+ {
8691
+ href: provider.id,
8692
+ className: clsx$1(styles$z.row, "tw-text-inherit tw-w-full"),
8693
+ title: provider.id,
8694
+ target: "_blank",
8695
+ rel: "noopener noreferrer",
8696
+ children: [
8697
+ /* @__PURE__ */ jsx(Icon2, { size: 16, strokeWidth: 1.75 }),
8698
+ /* @__PURE__ */ jsxs("span", { className: "tw-text-inherit", children: [
8699
+ " ",
8700
+ provider.title
8701
+ ] }),
8702
+ /* @__PURE__ */ jsx("div", { className: "tw-inline-flex tw-items-center tw-ml-auto tw-rounded-xs tw-px-[5px] tw-py-0 tw-text-xs tw-bg-badge-background tw-text-badge-foreground", children: "Upgrade to Teams" })
8703
+ ]
8704
+ }
8705
+ );
8706
+ }
8707
+ return /* @__PURE__ */ jsxs("div", { className: styles$z.row, title: provider.id, children: [
8649
8708
  /* @__PURE__ */ jsx(Icon2, { size: 16, strokeWidth: 1.75 }),
8650
8709
  provider.title ?? provider.id,
8651
8710
  /* @__PURE__ */ jsx(ArrowRight, { size: 16, strokeWidth: 1.25, style: { opacity: "0.5" } })
@@ -8675,13 +8734,15 @@ const iconForProvider = {
8675
8734
  [REMOTE_REPOSITORY_PROVIDER_URI]: FolderGit,
8676
8735
  [REMOTE_FILE_PROVIDER_URI]: File,
8677
8736
  [REMOTE_DIRECTORY_PROVIDER_URI]: FolderGit,
8678
- [WEB_PROVIDER_URI]: Link$1
8737
+ [WEB_PROVIDER_URI]: Link$1,
8738
+ [WORKSPACE_DIRECTORY_PROVIDER_URI]: FolderGit,
8739
+ [WORKSPACE_REPOSITORY_PROVIDER_URI]: FolderGit
8679
8740
  };
8680
8741
  const contextItemMentionNode = "_context-item-mention-node_1eamp_1";
8681
8742
  const icon$1 = "_icon_1eamp_14";
8682
8743
  const contextItemMentionChipNodeFocused = "_context-item-mention-chip-node--focused_1eamp_28";
8683
8744
  const isTooLargeOrIgnored = "_is-too-large-or-ignored_1eamp_33";
8684
- const styles$x = {
8745
+ const styles$y = {
8685
8746
  contextItemMentionNode,
8686
8747
  icon: icon$1,
8687
8748
  contextItemMentionChipNodeFocused,
@@ -8928,7 +8989,7 @@ const MentionComponent = ({ nodeKey, node: node2, tooltip, icon: Icon2, classNam
8928
8989
  tooltip && /* @__PURE__ */ jsx(TooltipContent2, { children: tooltip })
8929
8990
  ] });
8930
8991
  };
8931
- const MENTION_CLASS_NAME = styles$x.contextItemMentionNode;
8992
+ const MENTION_CLASS_NAME = styles$y.contextItemMentionNode;
8932
8993
  function convertContextItemMentionElement(domNode) {
8933
8994
  const data = domNode.getAttribute(DOM_DATA_ATTR);
8934
8995
  if (data !== null) {
@@ -9035,8 +9096,8 @@ class ContextItemMentionNode extends gs {
9035
9096
  className: `${MENTION_NODE_CLASS_NAME} ${extraClassNamesForContextItem(
9036
9097
  this.contextItem
9037
9098
  )}`,
9038
- focusedClassName: styles$x.contextItemMentionChipNodeFocused,
9039
- iconClassName: styles$x.icon
9099
+ focusedClassName: styles$y.contextItemMentionChipNodeFocused,
9100
+ iconClassName: styles$y.icon
9040
9101
  }
9041
9102
  );
9042
9103
  }
@@ -9055,7 +9116,7 @@ function $createContextItemMentionNode(contextItem2, { isFromInitialContext } =
9055
9116
  function extraClassNamesForContextItem(contextItem2) {
9056
9117
  const classNames2 = [];
9057
9118
  if (contextItem2.isTooLarge || contextItem2.isIgnored) {
9058
- classNames2.push(styles$x.isTooLargeOrIgnored);
9119
+ classNames2.push(styles$y.isTooLargeOrIgnored);
9059
9120
  }
9060
9121
  return classNames2.join(" ");
9061
9122
  }
@@ -9134,7 +9195,7 @@ const TemplateInputComponent = ({ editor: editor2, nodeKey, node: node2, classNa
9134
9195
  };
9135
9196
  const templateInputNode = "_template-input-node_14yoh_1";
9136
9197
  const templateInputNodeFocused = "_template-input-node--focused_14yoh_16";
9137
- const styles$w = {
9198
+ const styles$x = {
9138
9199
  templateInputNode,
9139
9200
  templateInputNodeFocused
9140
9201
  };
@@ -9167,8 +9228,8 @@ class TemplateInputNode extends gs {
9167
9228
  editor: editor2,
9168
9229
  nodeKey: this.getKey(),
9169
9230
  node: this,
9170
- className: `${styles$w.templateInputNode}`,
9171
- focusedClassName: `${styles$w.templateInputNodeFocused}`
9231
+ className: `${styles$x.templateInputNode}`,
9232
+ focusedClassName: `${styles$x.templateInputNodeFocused}`
9172
9233
  }
9173
9234
  );
9174
9235
  }
@@ -9374,7 +9435,7 @@ function L({ options: e2, onQueryChange: n2, onSelectOption: o2, onOpen: r2, onC
9374
9435
  }
9375
9436
  const popoverDimensions = "_popover-dimensions_1uf3m_1";
9376
9437
  const popover$1 = "_popover_1uf3m_1";
9377
- const styles$v = {
9438
+ const styles$w = {
9378
9439
  popoverDimensions,
9379
9440
  popover: popover$1
9380
9441
  };
@@ -9388,12 +9449,12 @@ function contextItemID(item2) {
9388
9449
  item2.range ? `${item2.range.start.line}:${item2.range.start.character}-${item2.range.end.line}:${item2.range.end.character}` : ""
9389
9450
  ]);
9390
9451
  }
9391
- const container$2 = "_container_fr158_1";
9452
+ const container$3 = "_container_fr158_1";
9392
9453
  const item$2 = "_item_fr158_8";
9393
9454
  const contextItem$1 = "_context-item_fr158_9";
9394
9455
  const experimental = "_experimental_fr158_17";
9395
- const styles$u = {
9396
- container: container$2,
9456
+ const styles$v = {
9457
+ container: container$3,
9397
9458
  item: item$2,
9398
9459
  contextItem: contextItem$1,
9399
9460
  experimental
@@ -9456,6 +9517,9 @@ const MentionMenu = ({
9456
9517
  if (!provider) {
9457
9518
  throw new Error(`No provider found with value ${value2}`);
9458
9519
  }
9520
+ if (isRemoteWorkspaceProvider(provider.id)) {
9521
+ return;
9522
+ }
9459
9523
  updateMentionMenuParams({ parentItem: provider });
9460
9524
  if (params.query !== "") {
9461
9525
  setEditorQuery((currentText) => {
@@ -9547,7 +9611,7 @@ const MentionMenu = ({
9547
9611
  {
9548
9612
  value: commandRowValue$1(provider),
9549
9613
  onSelect: onProviderSelect,
9550
- className: clsx$1(styles$u.item, COMMAND_ROW_CLASS_NAME),
9614
+ className: clsx$1(styles$v.item, COMMAND_ROW_CLASS_NAME),
9551
9615
  children: /* @__PURE__ */ jsx(MentionMenuProviderItemContent, { provider })
9552
9616
  },
9553
9617
  commandRowValue$1(provider)
@@ -9560,7 +9624,7 @@ const MentionMenu = ({
9560
9624
  shouldFilter: false,
9561
9625
  value: effectiveValueRow ? commandRowValue$1(effectiveValueRow) : void 0,
9562
9626
  onValueChange: setValue,
9563
- className: styles$u.container,
9627
+ className: styles$v.container,
9564
9628
  label: "@-mention context",
9565
9629
  ref: ref2,
9566
9630
  "data-testid": "mention-menu",
@@ -9572,7 +9636,7 @@ const MentionMenu = ({
9572
9636
  value: commandRowValue$1(item2),
9573
9637
  disabled: item2.isIgnored,
9574
9638
  onSelect: onCommandSelect,
9575
- className: clsx$1(styles$u.item, styles$u.contextItem, COMMAND_ROW_CLASS_NAME),
9639
+ className: clsx$1(styles$v.item, styles$v.contextItem, COMMAND_ROW_CLASS_NAME),
9576
9640
  children: /* @__PURE__ */ jsx(MentionMenuContextItemContent, { query: mentionQuery, item: item2 })
9577
9641
  },
9578
9642
  commandRowValue$1(item2)
@@ -9639,7 +9703,7 @@ function getItemsHeading(parentItem, mentionQuery) {
9639
9703
  {
9640
9704
  className: clsx$1(
9641
9705
  "tw-text-xs tw-rounded tw-px-2 tw-text-foreground",
9642
- styles$u.experimental
9706
+ styles$v.experimental
9643
9707
  ),
9644
9708
  children: "Experimental"
9645
9709
  }
@@ -9772,7 +9836,7 @@ function useMentionMenuParams() {
9772
9836
  () => ({
9773
9837
  params,
9774
9838
  updateQuery,
9775
- updateMentionMenuParams: (update) => setParams((prev) => ({ ...prev, ...update }))
9839
+ updateMentionMenuParams: (update2) => setParams((prev) => ({ ...prev, ...update2 }))
9776
9840
  }),
9777
9841
  [params, updateQuery]
9778
9842
  );
@@ -9974,7 +10038,7 @@ const MentionsPlugin = memo(
9974
10038
  // max height of the visible menu. This ensures that the menu does not
9975
10039
  // flip orientation as the user is typing if it suddenly has less
9976
10040
  // results. It also makes the positioning less glitchy.
9977
- /* @__PURE__ */ jsx("div", { "data-at-mention-menu": "", className: clsx$1(styles$v.popoverDimensions), children: /* @__PURE__ */ jsx("div", { className: styles$v.popover, children: /* @__PURE__ */ jsx(
10041
+ /* @__PURE__ */ jsx("div", { "data-at-mention-menu": "", className: clsx$1(styles$w.popoverDimensions), children: /* @__PURE__ */ jsx("div", { className: styles$w.popover, children: /* @__PURE__ */ jsx(
9978
10042
  MentionMenu,
9979
10043
  {
9980
10044
  params,
@@ -10103,7 +10167,7 @@ const BaseEditor = ({
10103
10167
  const initialConfig = useMemo(
10104
10168
  () => ({
10105
10169
  namespace: "BaseEditor",
10106
- theme: { paragraph: styles$z.themeParagraph },
10170
+ theme: { paragraph: styles$A.themeParagraph },
10107
10171
  onError: (error2) => console.error(error2),
10108
10172
  editorState: initialEditorState !== null ? JSON.stringify(initialEditorState) : void 0,
10109
10173
  editable: !disabled2,
@@ -10111,18 +10175,18 @@ const BaseEditor = ({
10111
10175
  }),
10112
10176
  []
10113
10177
  );
10114
- return /* @__PURE__ */ jsx("div", { className, children: /* @__PURE__ */ jsx("div", { className: styles$z.editor, children: /* @__PURE__ */ jsxs(p$6, { initialConfig, children: [
10178
+ return /* @__PURE__ */ jsx("div", { className, children: /* @__PURE__ */ jsx("div", { className: styles$A.editor, children: /* @__PURE__ */ jsxs(p$7, { initialConfig, children: [
10115
10179
  /* @__PURE__ */ jsx(
10116
10180
  h,
10117
10181
  {
10118
10182
  contentEditable: /* @__PURE__ */ jsx(
10119
10183
  x$4,
10120
10184
  {
10121
- className: clsx$1(styles$z.contentEditable, contentEditableClassName),
10185
+ className: clsx$1(styles$A.contentEditable, contentEditableClassName),
10122
10186
  ariaLabel
10123
10187
  }
10124
10188
  ),
10125
- placeholder: /* @__PURE__ */ jsx("div", { className: styles$z.placeholder, children: placeholder2 }),
10189
+ placeholder: /* @__PURE__ */ jsx("div", { className: styles$A.placeholder, children: placeholder2 }),
10126
10190
  ErrorBoundary: a$2
10127
10191
  }
10128
10192
  ),
@@ -10145,7 +10209,7 @@ const BaseEditor = ({
10145
10209
  const editor$1 = "_editor_pujow_6";
10146
10210
  const seamless = "_seamless_pujow_16";
10147
10211
  const disabled$1 = "_disabled_pujow_36";
10148
- const styles$t = {
10212
+ const styles$u = {
10149
10213
  editor: editor$1,
10150
10214
  seamless,
10151
10215
  disabled: disabled$1
@@ -10199,16 +10263,52 @@ function getContextItemsForEditor(editor2) {
10199
10263
  return nodes;
10200
10264
  });
10201
10265
  }
10202
- function visitContextItemsForEditor(editor2, visit2) {
10266
+ function walkContextItemMentionNodes(node2, visit2) {
10267
+ walkLexicalNodes(node2, (node22) => {
10268
+ if (node22 instanceof ContextItemMentionNode) {
10269
+ visit2(node22);
10270
+ }
10271
+ return true;
10272
+ });
10273
+ }
10274
+ function $insertMentions(items, position2, sep) {
10275
+ const nodesToInsert = lexicalNodesForContextItems(
10276
+ items,
10277
+ {
10278
+ isFromInitialContext: false
10279
+ },
10280
+ sep
10281
+ );
10282
+ const pNode = ks();
10283
+ switch (position2) {
10284
+ case "before": {
10285
+ pNode.append(...nodesToInsert);
10286
+ oe$1(ke$1(), pNode);
10287
+ break;
10288
+ }
10289
+ case "after": {
10290
+ pNode.append(
10291
+ ri$1(getWhitespace(ke$1())),
10292
+ ...nodesToInsert,
10293
+ ri$1(sep)
10294
+ );
10295
+ Wi$1([pNode]);
10296
+ break;
10297
+ }
10298
+ }
10299
+ }
10300
+ function getWhitespace(root2) {
10301
+ const needsWhitespaceBefore = !/(^|\s)$/.test(root2.getTextContent());
10302
+ return needsWhitespaceBefore ? " " : "";
10303
+ }
10304
+ function update(editor2, updateFn) {
10203
10305
  return new Promise((resolve) => {
10204
10306
  editor2.update(
10205
10307
  () => {
10206
- walkLexicalNodes(ke$1(), (node2) => {
10207
- if (node2 instanceof ContextItemMentionNode) {
10208
- visit2(node2);
10209
- }
10210
- return true;
10211
- });
10308
+ const result2 = updateFn();
10309
+ if (result2 === false) {
10310
+ resolve();
10311
+ }
10212
10312
  },
10213
10313
  { onUpdate: resolve }
10214
10314
  );
@@ -10316,32 +10416,30 @@ const PromptEditor = ({
10316
10416
  });
10317
10417
  },
10318
10418
  appendText(text2) {
10319
- return new Promise(
10320
- (resolve) => {
10321
- var _a;
10322
- return (_a = editorRef.current) == null ? void 0 : _a.update(
10323
- () => {
10324
- const root2 = ke$1();
10325
- root2.selectEnd();
10326
- Wi$1([ri$1(`${getWhitespace(root2)}${text2}`)]);
10327
- root2.selectEnd();
10328
- },
10329
- { onUpdate: resolve }
10330
- );
10331
- }
10332
- );
10419
+ if (!editorRef.current) {
10420
+ return Promise.resolve();
10421
+ }
10422
+ return update(editorRef.current, () => {
10423
+ const root2 = ke$1();
10424
+ root2.selectEnd();
10425
+ Wi$1([ri$1(`${getWhitespace(root2)}${text2}`)]);
10426
+ root2.selectEnd();
10427
+ return true;
10428
+ });
10333
10429
  },
10334
10430
  filterMentions(filter2) {
10335
- return new Promise((resolve) => {
10336
- if (!editorRef.current) {
10337
- resolve();
10338
- return;
10339
- }
10340
- visitContextItemsForEditor(editorRef.current, (node2) => {
10431
+ if (!editorRef.current) {
10432
+ return Promise.resolve();
10433
+ }
10434
+ return update(editorRef.current, () => {
10435
+ let updated = false;
10436
+ walkContextItemMentionNodes(ke$1(), (node2) => {
10341
10437
  if (!filter2(node2.contextItem)) {
10342
10438
  node2.remove();
10439
+ updated = true;
10343
10440
  }
10344
- }).then(resolve);
10441
+ });
10442
+ return updated;
10345
10443
  });
10346
10444
  },
10347
10445
  async addMentions(items, position2 = "after", sep = " ") {
@@ -10352,23 +10450,31 @@ const PromptEditor = ({
10352
10450
  const newContextItems = items.map(serializeContextItem);
10353
10451
  const existingMentions = getContextItemsForEditor(editor2);
10354
10452
  const ops = getMentionOperations(existingMentions, newContextItems);
10355
- if (ops.modify.size + ops.delete.size > 0) {
10356
- await visitContextItemsForEditor(editor2, (existing) => {
10357
- const update = ops.modify.get(existing.contextItem);
10358
- if (update) {
10359
- existing.replace($createContextItemMentionNode(update));
10453
+ await update(editor2, () => {
10454
+ if (ops.modify.size + ops.delete.size === 0) {
10455
+ return false;
10456
+ }
10457
+ walkContextItemMentionNodes(ke$1(), (existing) => {
10458
+ const update2 = ops.modify.get(existing.contextItem);
10459
+ if (update2) {
10460
+ existing.replace($createContextItemMentionNode(update2));
10360
10461
  }
10361
10462
  if (ops.delete.has(existing.contextItem)) {
10362
10463
  existing.remove();
10363
10464
  }
10364
10465
  });
10365
- }
10366
- if (ops.create.length === 0) {
10367
- return;
10368
- }
10369
- return insertMentions(editor2, ops.create, position2, sep);
10466
+ return true;
10467
+ });
10468
+ return update(editor2, () => {
10469
+ if (ops.create.length === 0) {
10470
+ return false;
10471
+ }
10472
+ $insertMentions(ops.create, position2, sep);
10473
+ $selectEnd();
10474
+ return true;
10475
+ });
10370
10476
  },
10371
- async upsertMentions(items, position2 = "after", sep = " ") {
10477
+ async upsertMentions(items, position2 = "after", sep = " ", focusEditor = true) {
10372
10478
  const editor2 = editorRef.current;
10373
10479
  if (!editor2) {
10374
10480
  return;
@@ -10383,50 +10489,65 @@ const PromptEditor = ({
10383
10489
  toUpdate.set(key, item2);
10384
10490
  }
10385
10491
  }
10386
- if (toUpdate.size > 0) {
10387
- await visitContextItemsForEditor(editor2, (existing) => {
10388
- const update = toUpdate.get(getKeyForContextItem(existing.contextItem));
10389
- if (update) {
10390
- existing.replace($createContextItemMentionNode(update));
10492
+ await update(editor2, () => {
10493
+ if (toUpdate.size === 0) {
10494
+ return false;
10495
+ }
10496
+ walkContextItemMentionNodes(ke$1(), (existing) => {
10497
+ const update2 = toUpdate.get(getKeyForContextItem(existing.contextItem));
10498
+ if (update2) {
10499
+ existing.replace($createContextItemMentionNode(update2));
10391
10500
  }
10392
10501
  });
10393
- }
10394
- if (items.length === toUpdate.size) {
10395
- return;
10396
- }
10397
- return insertMentions(
10398
- editor2,
10399
- items.filter((item2) => !toUpdate.has(getKeyForContextItem(item2))),
10400
- position2,
10401
- sep
10402
- );
10502
+ if (focusEditor) {
10503
+ $selectEnd();
10504
+ } else {
10505
+ we$2(null);
10506
+ }
10507
+ return true;
10508
+ });
10509
+ return update(editor2, () => {
10510
+ if (items.length === toUpdate.size) {
10511
+ return false;
10512
+ }
10513
+ $insertMentions(
10514
+ items.filter((item2) => !toUpdate.has(getKeyForContextItem(item2))),
10515
+ position2,
10516
+ sep
10517
+ );
10518
+ if (focusEditor) {
10519
+ $selectEnd();
10520
+ } else {
10521
+ we$2(null);
10522
+ }
10523
+ return true;
10524
+ });
10403
10525
  },
10404
10526
  setInitialContextMentions(items) {
10405
- return new Promise((resolve) => {
10406
- const editor2 = editorRef.current;
10407
- if (!editor2) {
10408
- return resolve();
10527
+ const editor2 = editorRef.current;
10528
+ if (!editor2) {
10529
+ return Promise.resolve();
10530
+ }
10531
+ return update(editor2, () => {
10532
+ let updated = false;
10533
+ if (!hasSetInitialContext.current || isEditorContentOnlyInitialContext(editor2)) {
10534
+ if (isEditorContentOnlyInitialContext(editor2)) {
10535
+ ke$1().clear();
10536
+ updated = true;
10537
+ }
10538
+ const nodesToInsert = lexicalNodesForContextItems(items, {
10539
+ isFromInitialContext: true
10540
+ });
10541
+ if (items.length > 0) {
10542
+ nodesToInsert.push(ri$1(" "));
10543
+ updated = true;
10544
+ }
10545
+ we$2(ke$1().selectStart());
10546
+ Wi$1(nodesToInsert);
10547
+ $selectEnd();
10548
+ hasSetInitialContext.current = true;
10409
10549
  }
10410
- editor2.update(
10411
- () => {
10412
- if (!hasSetInitialContext.current || isEditorContentOnlyInitialContext(editor2)) {
10413
- if (isEditorContentOnlyInitialContext(editor2)) {
10414
- ke$1().clear();
10415
- }
10416
- const nodesToInsert = lexicalNodesForContextItems(items, {
10417
- isFromInitialContext: true
10418
- });
10419
- if (items.length > 0) {
10420
- nodesToInsert.push(ri$1(" "));
10421
- }
10422
- we$2(ke$1().selectStart());
10423
- Wi$1(nodesToInsert);
10424
- $selectEnd();
10425
- hasSetInitialContext.current = true;
10426
- }
10427
- },
10428
- { onUpdate: resolve }
10429
- );
10550
+ return updated;
10430
10551
  });
10431
10552
  }
10432
10553
  }),
@@ -10434,7 +10555,7 @@ const PromptEditor = ({
10434
10555
  );
10435
10556
  useSetGlobalPromptEditorConfig();
10436
10557
  const onBaseEditorChange = useCallback(
10437
- (_editorState, editor2, tags) => {
10558
+ (_editorState, editor2) => {
10438
10559
  if (onChange) {
10439
10560
  onChange(toSerializedPromptEditorValue(editor2));
10440
10561
  }
@@ -10456,9 +10577,9 @@ const PromptEditor = ({
10456
10577
  return /* @__PURE__ */ jsx(
10457
10578
  BaseEditor,
10458
10579
  {
10459
- className: clsx$1(styles$t.editor, editorClassName, {
10460
- [styles$t.disabled]: disabled2,
10461
- [styles$t.seamless]: seamless2
10580
+ className: clsx$1(styles$u.editor, editorClassName, {
10581
+ [styles$u.disabled]: disabled2,
10582
+ [styles$u.seamless]: seamless2
10462
10583
  }),
10463
10584
  contentEditableClassName,
10464
10585
  initialEditorState: (initialEditorState == null ? void 0 : initialEditorState.lexicalEditorState) ?? null,
@@ -10476,44 +10597,6 @@ const PromptEditor = ({
10476
10597
  function normalizeEditorStateJSON(value) {
10477
10598
  return JSON.parse(JSON.stringify(value));
10478
10599
  }
10479
- function getWhitespace(root2) {
10480
- const needsWhitespaceBefore = !/(^|\s)$/.test(root2.getTextContent());
10481
- return needsWhitespaceBefore ? " " : "";
10482
- }
10483
- function insertMentions(editor2, items, position2, sep) {
10484
- return new Promise(
10485
- (resolve) => editor2.update(
10486
- () => {
10487
- const nodesToInsert = lexicalNodesForContextItems(
10488
- items,
10489
- {
10490
- isFromInitialContext: false
10491
- },
10492
- sep
10493
- );
10494
- const pNode = ks();
10495
- switch (position2) {
10496
- case "before": {
10497
- pNode.append(...nodesToInsert);
10498
- oe$1(ke$1(), pNode);
10499
- break;
10500
- }
10501
- case "after": {
10502
- pNode.append(
10503
- ri$1(getWhitespace(ke$1())),
10504
- ...nodesToInsert,
10505
- ri$1(sep)
10506
- );
10507
- Wi$1([pNode]);
10508
- break;
10509
- }
10510
- }
10511
- $selectEnd();
10512
- },
10513
- { onUpdate: resolve }
10514
- )
10515
- );
10516
- }
10517
10600
  function getKeyForContextItem(item2) {
10518
10601
  let key = `${item2.uri.toString()}|${item2.type}`;
10519
10602
  if (item2.type === "openctx") {
@@ -12457,7 +12540,7 @@ function observeMove(element2, onMove) {
12457
12540
  refresh(true);
12458
12541
  return cleanup;
12459
12542
  }
12460
- function autoUpdate(reference, floating, update, options) {
12543
+ function autoUpdate(reference, floating, update2, options) {
12461
12544
  if (options === void 0) {
12462
12545
  options = {};
12463
12546
  }
@@ -12471,12 +12554,12 @@ function autoUpdate(reference, floating, update, options) {
12471
12554
  const referenceEl = unwrapElement(reference);
12472
12555
  const ancestors = ancestorScroll || ancestorResize ? [...referenceEl ? getOverflowAncestors(referenceEl) : [], ...getOverflowAncestors(floating)] : [];
12473
12556
  ancestors.forEach((ancestor) => {
12474
- ancestorScroll && ancestor.addEventListener("scroll", update, {
12557
+ ancestorScroll && ancestor.addEventListener("scroll", update2, {
12475
12558
  passive: true
12476
12559
  });
12477
- ancestorResize && ancestor.addEventListener("resize", update);
12560
+ ancestorResize && ancestor.addEventListener("resize", update2);
12478
12561
  });
12479
- const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;
12562
+ const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update2) : null;
12480
12563
  let reobserveFrame = -1;
12481
12564
  let resizeObserver = null;
12482
12565
  if (elementResize) {
@@ -12490,7 +12573,7 @@ function autoUpdate(reference, floating, update, options) {
12490
12573
  (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);
12491
12574
  });
12492
12575
  }
12493
- update();
12576
+ update2();
12494
12577
  });
12495
12578
  if (referenceEl && !animationFrame) {
12496
12579
  resizeObserver.observe(referenceEl);
@@ -12505,17 +12588,17 @@ function autoUpdate(reference, floating, update, options) {
12505
12588
  function frameLoop() {
12506
12589
  const nextRefRect = getBoundingClientRect(reference);
12507
12590
  if (prevRefRect && (nextRefRect.x !== prevRefRect.x || nextRefRect.y !== prevRefRect.y || nextRefRect.width !== prevRefRect.width || nextRefRect.height !== prevRefRect.height)) {
12508
- update();
12591
+ update2();
12509
12592
  }
12510
12593
  prevRefRect = nextRefRect;
12511
12594
  frameId = requestAnimationFrame(frameLoop);
12512
12595
  }
12513
- update();
12596
+ update2();
12514
12597
  return () => {
12515
12598
  var _resizeObserver2;
12516
12599
  ancestors.forEach((ancestor) => {
12517
- ancestorScroll && ancestor.removeEventListener("scroll", update);
12518
- ancestorResize && ancestor.removeEventListener("resize", update);
12600
+ ancestorScroll && ancestor.removeEventListener("scroll", update2);
12601
+ ancestorResize && ancestor.removeEventListener("resize", update2);
12519
12602
  });
12520
12603
  cleanupIo == null || cleanupIo();
12521
12604
  (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();
@@ -12695,7 +12778,7 @@ function useFloating(options) {
12695
12778
  const hasWhileElementsMounted = whileElementsMounted != null;
12696
12779
  const whileElementsMountedRef = useLatestRef(whileElementsMounted);
12697
12780
  const platformRef = useLatestRef(platform2);
12698
- const update = React.useCallback(() => {
12781
+ const update2 = React.useCallback(() => {
12699
12782
  if (!referenceRef.current || !floatingRef.current) {
12700
12783
  return;
12701
12784
  }
@@ -12741,11 +12824,11 @@ function useFloating(options) {
12741
12824
  if (floatingEl) floatingRef.current = floatingEl;
12742
12825
  if (referenceEl && floatingEl) {
12743
12826
  if (whileElementsMountedRef.current) {
12744
- return whileElementsMountedRef.current(referenceEl, floatingEl, update);
12827
+ return whileElementsMountedRef.current(referenceEl, floatingEl, update2);
12745
12828
  }
12746
- update();
12829
+ update2();
12747
12830
  }
12748
- }, [referenceEl, floatingEl, update, whileElementsMountedRef, hasWhileElementsMounted]);
12831
+ }, [referenceEl, floatingEl, update2, whileElementsMountedRef, hasWhileElementsMounted]);
12749
12832
  const refs = React.useMemo(() => ({
12750
12833
  reference: referenceRef,
12751
12834
  floating: floatingRef,
@@ -12784,11 +12867,11 @@ function useFloating(options) {
12784
12867
  }, [strategy, transform2, elements2.floating, data.x, data.y]);
12785
12868
  return React.useMemo(() => ({
12786
12869
  ...data,
12787
- update,
12870
+ update: update2,
12788
12871
  refs,
12789
12872
  elements: elements2,
12790
12873
  floatingStyles
12791
- }), [data, update, refs, elements2, floatingStyles]);
12874
+ }), [data, update2, refs, elements2, floatingStyles]);
12792
12875
  }
12793
12876
  const $7e8f5cd07187803e$export$21b07c8f274aebd5 = /* @__PURE__ */ forwardRef((props, forwardedRef) => {
12794
12877
  const { children: children2, width = 10, height = 5, ...arrowProps } = props;
@@ -13914,7 +13997,7 @@ function createLruCache(maxCacheSize) {
13914
13997
  let cacheSize = 0;
13915
13998
  let cache2 = /* @__PURE__ */ new Map();
13916
13999
  let previousCache = /* @__PURE__ */ new Map();
13917
- function update(key, value) {
14000
+ function update2(key, value) {
13918
14001
  cache2.set(key, value);
13919
14002
  cacheSize++;
13920
14003
  if (cacheSize > maxCacheSize) {
@@ -13930,7 +14013,7 @@ function createLruCache(maxCacheSize) {
13930
14013
  return value;
13931
14014
  }
13932
14015
  if ((value = previousCache.get(key)) !== void 0) {
13933
- update(key, value);
14016
+ update2(key, value);
13934
14017
  return value;
13935
14018
  }
13936
14019
  },
@@ -13938,7 +14021,7 @@ function createLruCache(maxCacheSize) {
13938
14021
  if (cache2.has(key)) {
13939
14022
  cache2.set(key, value);
13940
14023
  } else {
13941
- update(key, value);
14024
+ update2(key, value);
13942
14025
  }
13943
14026
  }
13944
14027
  };
@@ -17921,7 +18004,7 @@ const CommandItem = React.forwardRef(({ className, tooltip, ...props }, ref2) =>
17921
18004
  {
17922
18005
  ref: ref2,
17923
18006
  className: cn(
17924
- "tw-relative tw-flex tw-cursor-pointer tw-select-none tw-items-center tw-py-3 tw-px-2 tw-text-md tw-outline-none aria-selected:tw-bg-accent aria-selected:tw-text-accent-foreground hover:tw-bg-accent hover:tw-text-accent-foreground data-[disabled=true]:tw-pointer-events-none data-[disabled=true]:tw-opacity-50",
18007
+ "tw-relative tw-flex tw-cursor-pointer tw-select-none tw-items-center tw-py-3 tw-px-3 tw-text-md tw-outline-none aria-selected:tw-bg-accent aria-selected:tw-text-accent-foreground hover:tw-bg-accent hover:tw-text-accent-foreground data-[disabled=true]:tw-pointer-events-none data-[disabled=true]:tw-opacity-50",
17925
18008
  className
17926
18009
  ),
17927
18010
  title: tooltip,
@@ -18058,11 +18141,11 @@ const COMMON_WRAPPERS = [
18058
18141
  value: promptEditorConfig
18059
18142
  }
18060
18143
  ];
18061
- const outerContainer = "_outer-container_t0bbj_1";
18062
- const errorContainer = "_error-container_t0bbj_10";
18063
- const error$2 = "_error_t0bbj_10";
18064
- const closeBtn = "_close-btn_t0bbj_28";
18065
- const styles$s = {
18144
+ const outerContainer = "_outer-container_1xpow_1";
18145
+ const errorContainer = "_error-container_1xpow_10";
18146
+ const error$2 = "_error_1xpow_10";
18147
+ const closeBtn = "_close-btn_1xpow_28";
18148
+ const styles$t = {
18066
18149
  outerContainer,
18067
18150
  errorContainer,
18068
18151
  error: error$2,
@@ -19088,7 +19171,7 @@ const basename$1 = "_basename_1dh30_14";
19088
19171
  const repoShortName = "_repoShortName_1dh30_18";
19089
19172
  const dirname$1 = "_dirname_1dh30_23";
19090
19173
  const range$1 = "_range_1dh30_28";
19091
- const styles$r = {
19174
+ const styles$s = {
19092
19175
  path: path$2,
19093
19176
  excluded,
19094
19177
  basename: basename$1,
@@ -19197,7 +19280,7 @@ included from Sourcegraph search`;
19197
19280
  /* @__PURE__ */ jsx(
19198
19281
  "div",
19199
19282
  {
19200
- className: clsx$1(styles$r.path, (isTooLarge || isIgnored) && styles$r.excluded),
19283
+ className: clsx$1(styles$s.path, (isTooLarge || isIgnored) && styles$s.excluded),
19201
19284
  "data-source": source2 || "unknown",
19202
19285
  children: /* @__PURE__ */ jsx(
19203
19286
  PrettyPrintedContextItem,
@@ -19232,7 +19315,7 @@ included from Sourcegraph search`;
19232
19315
  /* @__PURE__ */ jsx(
19233
19316
  "div",
19234
19317
  {
19235
- className: clsx$1(styles$r.path, (isTooLarge || isIgnored) && styles$r.excluded),
19318
+ className: clsx$1(styles$s.path, (isTooLarge || isIgnored) && styles$s.excluded),
19236
19319
  "data-source": source2 || "unknown",
19237
19320
  children: /* @__PURE__ */ jsx(
19238
19321
  PrettyPrintedContextItem,
@@ -19259,14 +19342,14 @@ const PrettyPrintedContextItem = ({ path: path2, range: range2, repoShortName: r
19259
19342
  const basename2 = path2.split(sep).pop() || "";
19260
19343
  const dirname2 = path2.split(sep).slice(0, -1).join(sep);
19261
19344
  return /* @__PURE__ */ jsxs(Fragment, { children: [
19262
- /* @__PURE__ */ jsx("span", { className: styles$r.basename, children: basename2 }),
19263
- /* @__PURE__ */ jsx("span", { className: styles$r.range, children: range2 ? `:${range2}` : "" }),
19345
+ /* @__PURE__ */ jsx("span", { className: styles$s.basename, children: basename2 }),
19346
+ /* @__PURE__ */ jsx("span", { className: styles$s.range, children: range2 ? `:${range2}` : "" }),
19264
19347
  " ",
19265
- repoShortName2 && /* @__PURE__ */ jsxs("span", { className: styles$r.repoShortName, children: [
19348
+ repoShortName2 && /* @__PURE__ */ jsxs("span", { className: styles$s.repoShortName, children: [
19266
19349
  repoShortName2,
19267
19350
  dirname2.length === 0 || dirname2.startsWith(sep) ? "" : sep
19268
19351
  ] }),
19269
- /* @__PURE__ */ jsx("span", { className: styles$r.dirname, children: dirname2 })
19352
+ /* @__PURE__ */ jsx("span", { className: styles$s.dirname, children: dirname2 })
19270
19353
  ] });
19271
19354
  };
19272
19355
  function createCollection(name2) {
@@ -19921,7 +20004,7 @@ var Trigger2 = AccordionTrigger$1;
19921
20004
  var Content2 = AccordionContent$1;
19922
20005
  const accordionTrigger = "_accordion-trigger_12003_1";
19923
20006
  const accordionTriggerChevron = "_accordion-trigger-chevron_12003_11";
19924
- const styles$q = {
20007
+ const styles$r = {
19925
20008
  accordionTrigger,
19926
20009
  accordionTriggerChevron
19927
20010
  };
@@ -19932,7 +20015,7 @@ const AccordionTrigger = React.forwardRef(({ className, children: children2, ...
19932
20015
  Trigger2,
19933
20016
  {
19934
20017
  ref: ref2,
19935
- className: clsx$1(styles$q.accordionTrigger, className),
20018
+ className: clsx$1(styles$r.accordionTrigger, className),
19936
20019
  ...props,
19937
20020
  children: [
19938
20021
  children2,
@@ -19941,7 +20024,7 @@ const AccordionTrigger = React.forwardRef(({ className, children: children2, ...
19941
20024
  {
19942
20025
  className: cn(
19943
20026
  "tw-h-8 tw-w-8 tw-text-muted-foreground",
19944
- styles$q.accordionTriggerChevron
20027
+ styles$r.accordionTriggerChevron
19945
20028
  )
19946
20029
  }
19947
20030
  )
@@ -20027,15 +20110,15 @@ function useUserAccountInfo() {
20027
20110
  const dotsHolder = "_dots-holder_10c80_1";
20028
20111
  const dot = "_dot_10c80_1";
20029
20112
  const flash = "_flash_10c80_1";
20030
- const styles$p = {
20113
+ const styles$q = {
20031
20114
  dotsHolder,
20032
20115
  dot,
20033
20116
  flash
20034
20117
  };
20035
- const LoadingDots = () => /* @__PURE__ */ jsxs("div", { className: styles$p.dotsHolder, role: "status", "aria-busy": true, children: [
20036
- /* @__PURE__ */ jsx("div", { className: styles$p.dot }),
20037
- /* @__PURE__ */ jsx("div", { className: styles$p.dot }),
20038
- /* @__PURE__ */ jsx("div", { className: styles$p.dot })
20118
+ const LoadingDots = () => /* @__PURE__ */ jsxs("div", { className: styles$q.dotsHolder, role: "status", "aria-busy": true, children: [
20119
+ /* @__PURE__ */ jsx("div", { className: styles$q.dot }),
20120
+ /* @__PURE__ */ jsx("div", { className: styles$q.dot }),
20121
+ /* @__PURE__ */ jsx("div", { className: styles$q.dot })
20039
20122
  ] });
20040
20123
  const Cell = forwardRef((props, ref2) => {
20041
20124
  const {
@@ -21930,7 +22013,7 @@ function one$1(state, node2, key) {
21930
22013
  return mdxEsm(state, node2);
21931
22014
  }
21932
22015
  if (node2.type === "root") {
21933
- return root$7(state, node2, key);
22016
+ return root$8(state, node2, key);
21934
22017
  }
21935
22018
  if (node2.type === "text") {
21936
22019
  return text$6(state, node2);
@@ -21996,7 +22079,7 @@ function mdxJsxElement(state, node2, key) {
21996
22079
  state.schema = parentSchema;
21997
22080
  return state.create(node2, type, props, key);
21998
22081
  }
21999
- function root$7(state, node2, key) {
22082
+ function root$8(state, node2, key) {
22000
22083
  const props = {};
22001
22084
  addChildren(props, createChildren(state, node2));
22002
22085
  return state.create(node2, state.Fragment, props, key);
@@ -27316,7 +27399,7 @@ function paragraph$1(state, node2) {
27316
27399
  state.patch(node2, result2);
27317
27400
  return state.applyData(node2, result2);
27318
27401
  }
27319
- function root$6(state, node2) {
27402
+ function root$7(state, node2) {
27320
27403
  const result2 = { type: "root", children: state.wrap(state.all(node2)) };
27321
27404
  state.patch(node2, result2);
27322
27405
  return state.applyData(node2, result2);
@@ -27480,7 +27563,7 @@ const handlers = {
27480
27563
  list: list$2,
27481
27564
  paragraph: paragraph$1,
27482
27565
  // @ts-expect-error: root is different, but hard to type.
27483
- root: root$6,
27566
+ root: root$7,
27484
27567
  strong: strong$1,
27485
27568
  table,
27486
27569
  tableCell,
@@ -44803,7 +44886,7 @@ function transform(state, node2) {
44803
44886
  return element(state, unsafe);
44804
44887
  }
44805
44888
  case "root": {
44806
- return root$5(state, unsafe);
44889
+ return root$6(state, unsafe);
44807
44890
  }
44808
44891
  case "text": {
44809
44892
  return text$2(state, unsafe);
@@ -44863,7 +44946,7 @@ function element(state, unsafe) {
44863
44946
  patch(node2, unsafe);
44864
44947
  return node2;
44865
44948
  }
44866
- function root$5(state, unsafe) {
44949
+ function root$6(state, unsafe) {
44867
44950
  const content2 = (
44868
44951
  /** @type {Array<RootContent>} */
44869
44952
  children$1(state, unsafe.children)
@@ -46290,7 +46373,7 @@ const phrasing = (
46290
46373
  "textDirective"
46291
46374
  ])
46292
46375
  );
46293
- function root$4(node2, _2, state, info) {
46376
+ function root$5(node2, _2, state, info) {
46294
46377
  const hasPhrasing = node2.children.some(function(d2) {
46295
46378
  return phrasing(d2);
46296
46379
  });
@@ -46359,7 +46442,7 @@ const handle = {
46359
46442
  list: list$1,
46360
46443
  listItem: listItem$1,
46361
46444
  paragraph,
46362
- root: root$4,
46445
+ root: root$5,
46363
46446
  strong,
46364
46447
  text: text$1,
46365
46448
  thematicBreak
@@ -51192,7 +51275,7 @@ const codiconLoading = "_codicon-loading_1kf9a_100";
51192
51275
  const spin$1 = "_spin_1kf9a_1";
51193
51276
  const content = "_content_1kf9a_116";
51194
51277
  const fileNameContainer = "_file-name-container_1kf9a_216";
51195
- const styles$o = {
51278
+ const styles$p = {
51196
51279
  buttonsContainer,
51197
51280
  buttons,
51198
51281
  button: button$1,
@@ -51211,7 +51294,7 @@ const styles$o = {
51211
51294
  fileNameContainer
51212
51295
  };
51213
51296
  const spin = "_spin_56lwz_7";
51214
- const styles$n = {
51297
+ const styles$o = {
51215
51298
  spin
51216
51299
  };
51217
51300
  const SaveCodeBlockIcon = '<svg role="img" height=16 width=16 viewBox="0 0 16 16" fill="currentColor"><path fillRule="evenodd" clipRule="evenodd" d="M9.5 1.1l3.4 3.5.1.4v2h-1V6H8V2H3v11h4v1H2.5l-.5-.5v-12l.5-.5h6.7l.3.1zM9 2v3h2.9L9 2zm4 14h-1v-3H9v-1h3V9h1v3h3v1h-3v3z"/></svg>';
@@ -51221,12 +51304,12 @@ const CheckCodeBlockIcon = '<svg role="img" height=16 width=16 viewBox="0 0 16 1
51221
51304
  const ShieldIcon = '<svg role="img" height=16 width=16 viewBox="0 0 16 16" fill="currentColor"><path fillRule="evenodd" clipRule="evenodd" d="M8.24599 14.713C7.73426 14.4115 7.23234 14.0937 6.74099 13.76C6.23999 13.42 5.75799 13.053 5.29699 12.66C4.83899 12.265 4.40899 11.84 4.00899 11.386C3.60899 10.931 3.25599 10.436 2.95899 9.90801C2.66018 9.37408 2.42523 8.80684 2.25899 8.21801C2.08478 7.59364 1.99762 6.94821 1.99999 6.30001V3.10001L2.49999 2.60001C2.83299 2.60001 3.15599 2.58901 3.46999 2.56401C3.76599 2.54101 4.06099 2.49801 4.35199 2.43601C4.63599 2.37401 4.91399 2.28801 5.18399 2.18001C5.46799 2.06201 5.74099 1.91901 5.99999 1.75301C6.36712 1.5117 6.76546 1.32161 7.18399 1.18801C7.83322 1.00041 8.51476 0.95202 9.18399 1.04601C9.61431 1.10595 10.0321 1.2353 10.421 1.42901C10.62 1.52601 10.813 1.63301 11.001 1.75101C11.261 1.91801 11.536 2.06101 11.822 2.17901C12.092 2.28801 12.369 2.37301 12.653 2.43501C12.944 2.49701 13.24 2.54101 13.537 2.56401C13.848 2.58801 14.171 2.59901 14.504 2.59901L15.004 3.09901V6.29901C15.0074 6.94741 14.9212 7.59317 14.748 8.21801C14.5817 8.80683 14.3468 9.37406 14.048 9.90801C13.7501 10.4357 13.3982 10.931 12.998 11.386C12.598 11.838 12.169 12.263 11.712 12.656C11.2506 13.0499 10.7672 13.4172 10.264 13.756C9.7707 14.0903 9.26712 14.4091 8.75399 14.712H8.24599V14.713ZM2.99999 3.59001V6.30001C2.99599 6.85501 3.06999 7.41001 3.21999 7.94501C3.36397 8.45853 3.56875 8.95303 3.82999 9.41801C4.09299 9.88501 4.40499 10.323 4.75999 10.726C5.12999 11.143 5.52599 11.536 5.94799 11.9C6.37999 12.268 6.83099 12.612 7.29999 12.93C7.69999 13.197 8.09999 13.453 8.49999 13.699C8.89999 13.457 9.29999 13.201 9.69999 12.931C10.17 12.612 10.623 12.268 11.055 11.9C11.476 11.536 11.872 11.144 12.241 10.728C12.5951 10.3251 12.9068 9.88682 13.171 9.42001C13.432 8.95501 13.637 8.46001 13.781 7.94701C13.931 7.41001 14.004 6.85701 14.001 6.30001V3.59001C13.842 3.59001 13.688 3.57801 13.536 3.56701L13.457 3.56101C13.1148 3.53403 12.7748 3.48493 12.439 3.41401C11.7376 3.26082 11.0687 2.98528 10.463 2.60001C10.3073 2.50147 10.1464 2.41134 9.98099 2.33001C9.684 2.18399 9.3657 2.0861 9.03799 2.04001C8.51704 1.96366 7.98579 1.99981 7.47999 2.14601C7.14799 2.25401 6.83099 2.40601 6.53999 2.59801C6.22799 2.79801 5.89999 2.97001 5.55699 3.11101C5.23259 3.24045 4.89814 3.34313 4.55699 3.41801C4.22199 3.48801 3.88199 3.53801 3.53999 3.56401C3.36599 3.57401 3.18499 3.58401 2.99999 3.59001Z"/><path d="M7.89199 5.702L6.07499 7.53L7.89099 9.35L7.18399 10.057L5.01299 7.883V7.176L7.18299 4.997L7.89199 5.702Z"/><path d="M9.81 4.972L9.11 5.681L10.94 7.5L9.11 9.32L9.81 10.029L12 7.856V7.147L9.81 4.972Z"/></svg>';
51222
51305
  const SparkleIcon = '<svg role="img" width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path d="M5.39804 10.8069C5.57428 10.9312 5.78476 10.9977 6.00043 10.9973C6.21633 10.9975 6.42686 10.93 6.60243 10.8043C6.77993 10.6739 6.91464 10.4936 6.98943 10.2863L7.43643 8.91335C7.55086 8.56906 7.74391 8.25615 8.00028 7.99943C8.25665 7.74272 8.56929 7.54924 8.91343 7.43435L10.3044 6.98335C10.4564 6.92899 10.5936 6.84019 10.7055 6.7239C10.8174 6.60762 10.9008 6.467 10.9492 6.31308C10.9977 6.15916 11.0098 5.99611 10.9847 5.83672C10.9596 5.67732 10.8979 5.52591 10.8044 5.39435C10.6703 5.20842 10.4794 5.07118 10.2604 5.00335L8.88543 4.55635C8.54091 4.44212 8.22777 4.24915 7.97087 3.99277C7.71396 3.73638 7.52035 3.42363 7.40543 3.07935L6.95343 1.69135C6.88113 1.48904 6.74761 1.31428 6.57143 1.19135C6.43877 1.09762 6.28607 1.03614 6.12548 1.01179C5.96489 0.987448 5.80083 1.00091 5.64636 1.05111C5.49188 1.1013 5.35125 1.18685 5.23564 1.30095C5.12004 1.41505 5.03265 1.55454 4.98043 1.70835L4.52343 3.10835C4.40884 3.44317 4.21967 3.74758 3.97022 3.9986C3.72076 4.24962 3.41753 4.44067 3.08343 4.55735L1.69243 5.00535C1.54065 5.05974 1.40352 5.14852 1.29177 5.26474C1.18001 5.38095 1.09666 5.52145 1.04824 5.67523C0.999819 5.82902 0.987639 5.99192 1.01265 6.1512C1.03767 6.31048 1.0992 6.46181 1.19243 6.59335C1.32027 6.7728 1.50105 6.90777 1.70943 6.97935L3.08343 7.42435C3.52354 7.57083 3.90999 7.84518 4.19343 8.21235C4.35585 8.42298 4.4813 8.65968 4.56443 8.91235L5.01643 10.3033C5.08846 10.5066 5.22179 10.6826 5.39804 10.8069ZM5.48343 3.39235L6.01043 2.01535L6.44943 3.39235C6.61312 3.8855 6.88991 4.33351 7.25767 4.70058C7.62544 5.06765 8.07397 5.34359 8.56743 5.50635L9.97343 6.03535L8.59143 6.48335C8.09866 6.64764 7.65095 6.92451 7.28382 7.29198C6.9167 7.65945 6.64026 8.10742 6.47643 8.60035L5.95343 9.97835L5.50443 8.59935C5.34335 8.10608 5.06943 7.65718 4.70443 7.28835C4.3356 6.92031 3.88653 6.64272 3.39243 6.47735L2.01443 5.95535L3.40043 5.50535C3.88672 5.33672 4.32775 5.05855 4.68943 4.69235C5.04901 4.32464 5.32049 3.88016 5.48343 3.39235ZM11.5353 14.8494C11.6713 14.9456 11.8337 14.9973 12.0003 14.9974C12.1654 14.9974 12.3264 14.9464 12.4613 14.8514C12.6008 14.7529 12.7058 14.6129 12.7613 14.4514L13.0093 13.6894C13.0625 13.5309 13.1515 13.3869 13.2693 13.2684C13.3867 13.1498 13.5307 13.0611 13.6893 13.0094L14.4613 12.7574C14.619 12.7029 14.7557 12.6004 14.8523 12.4644C14.9257 12.3614 14.9736 12.2424 14.9921 12.1173C15.0106 11.9922 14.9992 11.8645 14.9588 11.7447C14.9184 11.6249 14.8501 11.5163 14.7597 11.428C14.6692 11.3396 14.5591 11.2739 14.4383 11.2364L13.6743 10.9874C13.5162 10.9348 13.3724 10.8462 13.2544 10.7285C13.1364 10.6109 13.0473 10.4674 12.9943 10.3094L12.7423 9.53638C12.6886 9.37853 12.586 9.24191 12.4493 9.14638C12.3473 9.07343 12.2295 9.02549 12.1056 9.00642C11.9816 8.98736 11.8549 8.99772 11.7357 9.03665C11.6164 9.07558 11.508 9.142 11.4192 9.23054C11.3304 9.31909 11.2636 9.42727 11.2243 9.54638L10.9773 10.3084C10.925 10.466 10.8375 10.6097 10.7213 10.7284C10.6066 10.8449 10.4667 10.9335 10.3123 10.9874L9.53931 11.2394C9.38025 11.2933 9.2422 11.3959 9.1447 11.5326C9.04721 11.6694 8.99522 11.8333 8.99611 12.0013C8.99699 12.1692 9.0507 12.3326 9.14963 12.4683C9.24856 12.604 9.38769 12.7051 9.54731 12.7574L10.3103 13.0044C10.4692 13.0578 10.6136 13.1471 10.7323 13.2654C10.8505 13.3836 10.939 13.5283 10.9903 13.6874L11.2433 14.4614C11.2981 14.6178 11.4001 14.7534 11.5353 14.8494ZM10.6223 12.0564L10.4433 11.9974L10.6273 11.9334C10.9291 11.8284 11.2027 11.6556 11.4273 11.4284C11.6537 11.1994 11.8248 10.9216 11.9273 10.6164L11.9853 10.4384L12.0443 10.6194C12.1463 10.9261 12.3185 11.2047 12.5471 11.4332C12.7757 11.6617 13.0545 11.8336 13.3613 11.9354L13.5563 11.9984L13.3763 12.0574C13.0689 12.1596 12.7898 12.3322 12.5611 12.5616C12.3324 12.791 12.1606 13.0707 12.0593 13.3784L12.0003 13.5594L11.9423 13.3784C11.8409 13.0702 11.6687 12.7901 11.4394 12.5605C11.2102 12.3309 10.9303 12.1583 10.6223 12.0564Z"/></svg>';
51223
51306
  const EllipsisIcon = '<svg role="img" width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path d="M4 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm5 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm5 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"/></svg>';
51224
- const SyncSpinIcon = `<svg class="${styles$n.spin}" role="img" width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M2.006 8.267L.78 9.5 0 8.73l2.09-2.07.76.01 2.09 2.12-.76.76-1.167-1.18a5 5 0 0 0 9.4 1.983l.813.597a6 6 0 0 1-11.22-2.683zm10.99-.466L11.76 6.55l-.76.76 2.09 2.11.76.01 2.09-2.07-.75-.76-1.194 1.18a6 6 0 0 0-11.11-2.92l.81.594a5 5 0 0 1 9.3 2.346z"/></svg>`;
51307
+ const SyncSpinIcon = `<svg class="${styles$o.spin}" role="img" width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M2.006 8.267L.78 9.5 0 8.73l2.09-2.07.76.01 2.09 2.12-.76.76-1.167-1.18a5 5 0 0 0 9.4 1.983l.813.597a6 6 0 0 1-11.22-2.683zm10.99-.466L11.76 6.55l-.76.76 2.09 2.11.76.01 2.09-2.07-.75-.76-1.194 1.18a6 6 0 0 0-11.11-2.92l.81.594a5 5 0 0 1 9.3 2.346z"/></svg>`;
51225
51308
  const TickIcon = '<svg role="img" width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M14.431 3.323l-8.47 10-.79-.036-3.35-4.77.818-.574 2.978 4.24 8.051-9.506.764.646z"/></svg>';
51226
51309
  const CloseIcon = '<svg role="img" width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M8 8.707l3.646 3.647.708-.707L8.707 8l3.647-3.646-.707-.708L8 7.293 4.354 3.646l-.707.708L7.293 8l-3.646 3.646.707.708L8 8.707z"/></svg>';
51227
51310
  class GuardrailsStatusController {
51228
51311
  constructor(container2) {
51229
- __publicField(this, "statusSpinning", `<i class="codicon codicon-loading ${styles$o.codiconLoading}"></i>`);
51312
+ __publicField(this, "statusSpinning", `<i class="codicon codicon-loading ${styles$p.codiconLoading}"></i>`);
51230
51313
  __publicField(this, "statusPass", '<i class="codicon codicon-pass"></i>');
51231
51314
  __publicField(this, "statusFailed", "Guardrails Check Failed");
51232
51315
  __publicField(this, "statusUnavailable", "Guardrails API Error");
@@ -51237,13 +51320,13 @@ class GuardrailsStatusController {
51237
51320
  this.findOrAppend(this.iconClass, () => {
51238
51321
  const icon2 = document.createElement("div");
51239
51322
  icon2.innerHTML = ShieldIcon;
51240
- icon2.classList.add(styles$o.attributionIcon, this.iconClass);
51323
+ icon2.classList.add(styles$p.attributionIcon, this.iconClass);
51241
51324
  icon2.setAttribute("data-testid", "attribution-indicator");
51242
51325
  return icon2;
51243
51326
  });
51244
51327
  this.status = this.findOrAppend(this.statusClass, () => {
51245
51328
  const status2 = document.createElement("div");
51246
- status2.classList.add(styles$o.status, this.statusClass);
51329
+ status2.classList.add(styles$p.status, this.statusClass);
51247
51330
  return status2;
51248
51331
  });
51249
51332
  }
@@ -51269,7 +51352,7 @@ class GuardrailsStatusController {
51269
51352
  * where attribution was found, and whether the attribution limit was hit.
51270
51353
  */
51271
51354
  setFailure(repos, limitHit) {
51272
- this.container.classList.add(styles$o.attributionIconFound);
51355
+ this.container.classList.add(styles$p.attributionIconFound);
51273
51356
  this.container.title = this.tooltip(repos, limitHit);
51274
51357
  this.status.innerHTML = this.statusFailed;
51275
51358
  }
@@ -51279,7 +51362,7 @@ class GuardrailsStatusController {
51279
51362
  * search is unavailable.
51280
51363
  */
51281
51364
  setUnavailable(error2) {
51282
- this.container.classList.add(styles$o.attributionIconUnavailable);
51365
+ this.container.classList.add(styles$p.attributionIconUnavailable);
51283
51366
  this.container.title = `Guardrails API error: ${error2.message}`;
51284
51367
  this.status.innerHTML = this.statusUnavailable;
51285
51368
  }
@@ -51303,12 +51386,12 @@ class GuardrailsStatusController {
51303
51386
  }
51304
51387
  function createButtons(preText, copyButtonOnSubmit, insertButtonOnSubmit) {
51305
51388
  const container2 = document.createElement("div");
51306
- container2.className = styles$o.buttonsContainer;
51389
+ container2.className = styles$p.buttonsContainer;
51307
51390
  if (!copyButtonOnSubmit) {
51308
51391
  return container2;
51309
51392
  }
51310
51393
  const buttons2 = document.createElement("div");
51311
- buttons2.className = styles$o.buttons;
51394
+ buttons2.className = styles$p.buttons;
51312
51395
  const codeBlockActions = {
51313
51396
  copy: copyButtonOnSubmit,
51314
51397
  insert: insertButtonOnSubmit
@@ -51346,12 +51429,12 @@ function createButtons(preText, copyButtonOnSubmit, insertButtonOnSubmit) {
51346
51429
  }
51347
51430
  function createButtonsExperimentalUI(preText, humanMessage, config, codeBlockName, copyButtonOnSubmit, insertButtonOnSubmit, smartApply, smartApplyId, smartApplyState) {
51348
51431
  const container2 = document.createElement("div");
51349
- container2.className = styles$o.buttonsContainer;
51432
+ container2.className = styles$p.buttonsContainer;
51350
51433
  if (!copyButtonOnSubmit) {
51351
51434
  return container2;
51352
51435
  }
51353
51436
  const buttons2 = document.createElement("div");
51354
- buttons2.className = styles$o.buttons;
51437
+ buttons2.className = styles$p.buttons;
51355
51438
  if (smartApply && smartApplyState === CodyTaskState.Applied && smartApplyId) {
51356
51439
  const acceptButton = createAcceptButton(smartApplyId, smartApply);
51357
51440
  const rejectButton = createRejectButton(smartApplyId, smartApply);
@@ -51387,7 +51470,7 @@ function createButtonsExperimentalUI(preText, humanMessage, config, codeBlockNam
51387
51470
  function createInsertButton(preText, insertButtonOnSubmit) {
51388
51471
  const button2 = document.createElement("button");
51389
51472
  button2.title = "Insert Code at Cursor";
51390
- button2.className = styles$o.button;
51473
+ button2.className = styles$p.button;
51391
51474
  button2.innerHTML = InsertCodeBlockIcon;
51392
51475
  if (insertButtonOnSubmit) {
51393
51476
  button2.addEventListener("click", () => {
@@ -51399,7 +51482,7 @@ function createInsertButton(preText, insertButtonOnSubmit) {
51399
51482
  function createSaveButton(preText, insertButtonOnSubmit) {
51400
51483
  const button2 = document.createElement("button");
51401
51484
  button2.title = "Save Code to New File...";
51402
- button2.className = styles$o.button;
51485
+ button2.className = styles$p.button;
51403
51486
  button2.innerHTML = SaveCodeBlockIcon;
51404
51487
  if (insertButtonOnSubmit) {
51405
51488
  button2.addEventListener("click", () => insertButtonOnSubmit(preText, true));
@@ -51408,7 +51491,7 @@ function createSaveButton(preText, insertButtonOnSubmit) {
51408
51491
  }
51409
51492
  function createCodeBlockActionButton(type, text2, title2, iconSvg, codeBlockActions) {
51410
51493
  const button2 = document.createElement("button");
51411
- const className = type === "copy" ? styles$o.copyButton : styles$o.insertButton;
51494
+ const className = type === "copy" ? styles$p.copyButton : styles$p.insertButton;
51412
51495
  button2.innerHTML = iconSvg;
51413
51496
  button2.title = title2;
51414
51497
  button2.className = className;
@@ -51441,24 +51524,24 @@ function createCodeBlockActionButton(type, text2, title2, iconSvg, codeBlockActi
51441
51524
  function createCopyButton(preText, onCopy) {
51442
51525
  const button2 = document.createElement("button");
51443
51526
  button2.innerHTML = "Copy";
51444
- button2.className = styles$o.button;
51527
+ button2.className = styles$p.button;
51445
51528
  const iconContainer2 = document.createElement("div");
51446
- iconContainer2.className = styles$o.iconContainer;
51529
+ iconContainer2.className = styles$p.iconContainer;
51447
51530
  iconContainer2.innerHTML = CopyCodeBlockIcon;
51448
51531
  button2.prepend(iconContainer2);
51449
51532
  button2.addEventListener("click", () => {
51450
51533
  iconContainer2.innerHTML = CheckCodeBlockIcon;
51451
- iconContainer2.className = styles$o.iconContainer;
51534
+ iconContainer2.className = styles$p.iconContainer;
51452
51535
  button2.innerHTML = "Copied";
51453
- button2.className = styles$o.button;
51536
+ button2.className = styles$p.button;
51454
51537
  button2.prepend(iconContainer2);
51455
51538
  navigator.clipboard.writeText(preText).catch((error2) => console.error(error2));
51456
51539
  onCopy(preText, "Button");
51457
51540
  setTimeout(() => {
51458
51541
  iconContainer2.innerHTML = CopyCodeBlockIcon;
51459
- iconContainer2.className = styles$o.iconContainer;
51542
+ iconContainer2.className = styles$p.iconContainer;
51460
51543
  button2.innerHTML = "Copy";
51461
- button2.className = styles$o.button;
51544
+ button2.className = styles$p.button;
51462
51545
  button2.prepend(iconContainer2);
51463
51546
  }, 5e3);
51464
51547
  console.log("Code: Copy to Clipboard", preText);
@@ -51467,13 +51550,13 @@ function createCopyButton(preText, onCopy) {
51467
51550
  }
51468
51551
  function createApplyButton(preText, humanMessage, smartApply, smartApplyId, smartApplyState, fileName) {
51469
51552
  const button2 = document.createElement("button");
51470
- button2.className = styles$o.button;
51553
+ button2.className = styles$p.button;
51471
51554
  switch (smartApplyState) {
51472
51555
  case "Working": {
51473
51556
  button2.innerHTML = "Applying";
51474
51557
  button2.disabled = true;
51475
51558
  const iconContainer2 = document.createElement("div");
51476
- iconContainer2.className = styles$o.iconContainer;
51559
+ iconContainer2.className = styles$p.iconContainer;
51477
51560
  iconContainer2.innerHTML = SyncSpinIcon;
51478
51561
  button2.prepend(iconContainer2);
51479
51562
  break;
@@ -51481,7 +51564,7 @@ function createApplyButton(preText, humanMessage, smartApply, smartApplyId, smar
51481
51564
  default: {
51482
51565
  button2.innerHTML = "Apply";
51483
51566
  const iconContainer2 = document.createElement("div");
51484
- iconContainer2.className = styles$o.iconContainer;
51567
+ iconContainer2.className = styles$p.iconContainer;
51485
51568
  iconContainer2.innerHTML = SparkleIcon;
51486
51569
  button2.prepend(iconContainer2);
51487
51570
  button2.addEventListener(
@@ -51494,11 +51577,11 @@ function createApplyButton(preText, humanMessage, smartApply, smartApplyId, smar
51494
51577
  }
51495
51578
  function createExecuteButton(command) {
51496
51579
  const button2 = document.createElement("button");
51497
- button2.className = styles$o.button;
51580
+ button2.className = styles$p.button;
51498
51581
  button2.innerHTML = "Execute";
51499
51582
  button2.title = "Send command to Terminal";
51500
51583
  const iconContainer2 = document.createElement("div");
51501
- iconContainer2.className = styles$o.iconContainer;
51584
+ iconContainer2.className = styles$p.iconContainer;
51502
51585
  iconContainer2.innerHTML = '<i class="codicon codicon-terminal tw-align-middle"></i>';
51503
51586
  button2.prepend(iconContainer2);
51504
51587
  button2.addEventListener("click", () => {
@@ -51512,10 +51595,10 @@ function createExecuteButton(command) {
51512
51595
  }
51513
51596
  function createAcceptButton(id2, smartApply) {
51514
51597
  const button2 = document.createElement("button");
51515
- button2.className = styles$o.button;
51598
+ button2.className = styles$p.button;
51516
51599
  button2.innerHTML = "Accept";
51517
51600
  const iconContainer2 = document.createElement("div");
51518
- iconContainer2.className = styles$o.iconContainer;
51601
+ iconContainer2.className = styles$p.iconContainer;
51519
51602
  iconContainer2.innerHTML = TickIcon;
51520
51603
  button2.prepend(iconContainer2);
51521
51604
  button2.addEventListener("click", () => {
@@ -51525,10 +51608,10 @@ function createAcceptButton(id2, smartApply) {
51525
51608
  }
51526
51609
  function createRejectButton(id2, smartApply) {
51527
51610
  const button2 = document.createElement("button");
51528
- button2.className = styles$o.button;
51611
+ button2.className = styles$p.button;
51529
51612
  button2.innerHTML = "Reject";
51530
51613
  const iconContainer2 = document.createElement("div");
51531
- iconContainer2.className = styles$o.iconContainer;
51614
+ iconContainer2.className = styles$p.iconContainer;
51532
51615
  iconContainer2.innerHTML = CloseIcon;
51533
51616
  button2.prepend(iconContainer2);
51534
51617
  button2.addEventListener("click", () => {
@@ -51540,7 +51623,7 @@ function createActionsDropdown(preText) {
51540
51623
  const button2 = document.createElement("button");
51541
51624
  button2.innerHTML = EllipsisIcon;
51542
51625
  button2.title = "More Actions...";
51543
- button2.className = styles$o.button;
51626
+ button2.className = styles$p.button;
51544
51627
  const vscodeContext = {
51545
51628
  webviewSection: "codeblock-actions",
51546
51629
  preventDefaultContextMenuItems: true,
@@ -51618,7 +51701,7 @@ const ChatMessageContent = ({
51618
51701
  if (!(preElements == null ? void 0 : preElements.length) || !copyButtonOnSubmit) {
51619
51702
  return;
51620
51703
  }
51621
- const existingButtons = rootRef.current.querySelectorAll(`.${styles$o.buttonsContainer}`);
51704
+ const existingButtons = rootRef.current.querySelectorAll(`.${styles$p.buttonsContainer}`);
51622
51705
  for (const existingButton of existingButtons) {
51623
51706
  existingButton.remove();
51624
51707
  }
@@ -51652,11 +51735,11 @@ const ChatMessageContent = ({
51652
51735
  );
51653
51736
  }
51654
51737
  const metadataContainer2 = document.createElement("div");
51655
- metadataContainer2.classList.add(styles$o.metadataContainer);
51738
+ metadataContainer2.classList.add(styles$p.metadataContainer);
51656
51739
  buttons2.append(metadataContainer2);
51657
51740
  if (guardrails) {
51658
51741
  const container2 = document.createElement("div");
51659
- container2.classList.add(styles$o.attributionContainer);
51742
+ container2.classList.add(styles$p.attributionContainer);
51660
51743
  metadataContainer2.append(container2);
51661
51744
  if (!isMessageLoading) {
51662
51745
  const g2 = new GuardrailsStatusController(container2);
@@ -51680,7 +51763,7 @@ const ChatMessageContent = ({
51680
51763
  }
51681
51764
  if (fileName) {
51682
51765
  const fileNameContainer2 = document.createElement("div");
51683
- fileNameContainer2.className = styles$o.fileNameContainer;
51766
+ fileNameContainer2.className = styles$p.fileNameContainer;
51684
51767
  fileNameContainer2.textContent = getFileName(fileName);
51685
51768
  fileNameContainer2.title = fileName;
51686
51769
  metadataContainer2.append(fileNameContainer2);
@@ -51699,7 +51782,7 @@ const ChatMessageContent = ({
51699
51782
  smartApplyInterceptor,
51700
51783
  smartApplyStates
51701
51784
  ]);
51702
- return /* @__PURE__ */ jsx("div", { ref: rootRef, "data-testid": "chat-message-content", children: /* @__PURE__ */ jsx(MarkdownFromCody, { className: clsx$1(styles$o.content, className), children: displayMarkdown }) });
51785
+ return /* @__PURE__ */ jsx("div", { ref: rootRef, "data-testid": "chat-message-content", children: /* @__PURE__ */ jsx(MarkdownFromCody, { className: clsx$1(styles$p.content, className), children: displayMarkdown }) });
51703
51786
  };
51704
51787
  const $global = function() {
51705
51788
  if (typeof globalThis !== "undefined") {
@@ -63375,7 +63458,7 @@ const bannerContainer = "_banner-container_1qtot_55";
63375
63458
  const banner = "_banner_1qtot_55";
63376
63459
  const requestError = "_request-error_1qtot_128";
63377
63460
  const requestErrorTitle = "_request-error-title_1qtot_141";
63378
- const styles$m = {
63461
+ const styles$n = {
63379
63462
  errorItem,
63380
63463
  icon,
63381
63464
  body,
@@ -63399,8 +63482,8 @@ const ErrorItem = ({ error: error2, userInfo, postMessage }) => {
63399
63482
  }
63400
63483
  return /* @__PURE__ */ jsx(RequestErrorItem, { error: error2.message });
63401
63484
  };
63402
- const RequestErrorItem = ({ error: error2 }) => /* @__PURE__ */ jsxs("div", { className: styles$m.requestError, children: [
63403
- /* @__PURE__ */ jsx("span", { className: styles$m.requestErrorTitle, children: "Request Failed: " }),
63485
+ const RequestErrorItem = ({ error: error2 }) => /* @__PURE__ */ jsxs("div", { className: styles$n.requestError, children: [
63486
+ /* @__PURE__ */ jsx("span", { className: styles$n.requestErrorTitle, children: "Request Failed: " }),
63404
63487
  error2
63405
63488
  ] });
63406
63489
  const RateLimitErrorItem = ({ error: error2, userInfo, postMessage }) => {
@@ -63433,9 +63516,9 @@ const RateLimitErrorItem = ({ error: error2, userInfo, postMessage }) => {
63433
63516
  },
63434
63517
  [postMessage, tier, telemetryRecorder]
63435
63518
  );
63436
- return /* @__PURE__ */ jsxs("div", { className: styles$m.errorItem, children: [
63437
- canUpgrade && /* @__PURE__ */ jsx("div", { className: styles$m.icon, children: "⚡️" }),
63438
- /* @__PURE__ */ jsxs("div", { className: styles$m.body, children: [
63519
+ return /* @__PURE__ */ jsxs("div", { className: styles$n.errorItem, children: [
63520
+ canUpgrade && /* @__PURE__ */ jsx("div", { className: styles$n.icon, children: "⚡️" }),
63521
+ /* @__PURE__ */ jsxs("div", { className: styles$n.body, children: [
63439
63522
  /* @__PURE__ */ jsxs("header", { children: [
63440
63523
  /* @__PURE__ */ jsx("h1", { children: canUpgrade ? "Upgrade to Cody Pro" : "Unable to Send Message" }),
63441
63524
  /* @__PURE__ */ jsxs("p", { children: [
@@ -63443,7 +63526,7 @@ const RateLimitErrorItem = ({ error: error2, userInfo, postMessage }) => {
63443
63526
  canUpgrade && " Upgrade to Cody Pro for unlimited autocomplete suggestions, chat messages and commands."
63444
63527
  ] })
63445
63528
  ] }),
63446
- /* @__PURE__ */ jsxs("div", { className: styles$m.actions, children: [
63529
+ /* @__PURE__ */ jsxs("div", { className: styles$n.actions, children: [
63447
63530
  canUpgrade && /* @__PURE__ */ jsx(
63448
63531
  VSCodeButton,
63449
63532
  {
@@ -63462,12 +63545,12 @@ const RateLimitErrorItem = ({ error: error2, userInfo, postMessage }) => {
63462
63545
  }
63463
63546
  )
63464
63547
  ] }),
63465
- error2.retryMessage && /* @__PURE__ */ jsx("p", { className: styles$m.retryMessage, children: error2.retryMessage })
63548
+ error2.retryMessage && /* @__PURE__ */ jsx("p", { className: styles$n.retryMessage, children: error2.retryMessage })
63466
63549
  ] }),
63467
- canUpgrade && /* @__PURE__ */ jsx("div", { className: styles$m.bannerContainer, children: /* @__PURE__ */ jsx(
63550
+ canUpgrade && /* @__PURE__ */ jsx("div", { className: styles$n.bannerContainer, children: /* @__PURE__ */ jsx(
63468
63551
  "div",
63469
63552
  {
63470
- className: styles$m.banner,
63553
+ className: styles$n.banner,
63471
63554
  role: "button",
63472
63555
  tabIndex: -1,
63473
63556
  onClick: () => onButtonClick("upgrade", "upgrade"),
@@ -63480,7 +63563,7 @@ const RateLimitErrorItem = ({ error: error2, userInfo, postMessage }) => {
63480
63563
  const feedbackButtons = "_feedback-buttons_16gni_1";
63481
63564
  const feedbackButton = "_feedback-button_16gni_1";
63482
63565
  const thumbsDownFeedbackContainer = "_thumbs-down-feedback-container_16gni_14";
63483
- const styles$l = {
63566
+ const styles$m = {
63484
63567
  feedbackButtons,
63485
63568
  feedbackButton,
63486
63569
  thumbsDownFeedbackContainer
@@ -63497,12 +63580,12 @@ const FeedbackButtons = ({
63497
63580
  },
63498
63581
  [feedbackButtonsOnSubmit]
63499
63582
  );
63500
- return /* @__PURE__ */ jsxs("div", { className: clsx$1(styles$l.feedbackButtons, className), children: [
63583
+ return /* @__PURE__ */ jsxs("div", { className: clsx$1(styles$m.feedbackButtons, className), children: [
63501
63584
  !feedbackSubmitted && /* @__PURE__ */ jsxs(Fragment, { children: [
63502
63585
  /* @__PURE__ */ jsx(
63503
63586
  VSCodeButton,
63504
63587
  {
63505
- className: clsx$1("tw-text-muted-foreground", styles$l.feedbackButton),
63588
+ className: clsx$1("tw-text-muted-foreground", styles$m.feedbackButton),
63506
63589
  appearance: "icon",
63507
63590
  type: "button",
63508
63591
  onClick: () => onFeedbackBtnSubmit("thumbsUp"),
@@ -63513,7 +63596,7 @@ const FeedbackButtons = ({
63513
63596
  /* @__PURE__ */ jsx(
63514
63597
  VSCodeButton,
63515
63598
  {
63516
- className: clsx$1("tw-text-muted-foreground", styles$l.feedbackButton),
63599
+ className: clsx$1("tw-text-muted-foreground", styles$m.feedbackButton),
63517
63600
  appearance: "icon",
63518
63601
  type: "button",
63519
63602
  onClick: () => onFeedbackBtnSubmit("thumbsDown"),
@@ -63525,7 +63608,7 @@ const FeedbackButtons = ({
63525
63608
  feedbackSubmitted === "thumbsUp" && /* @__PURE__ */ jsxs(
63526
63609
  VSCodeButton,
63527
63610
  {
63528
- className: clsx$1(styles$l.feedbackButton),
63611
+ className: clsx$1(styles$m.feedbackButton),
63529
63612
  appearance: "icon",
63530
63613
  type: "button",
63531
63614
  disabled: true,
@@ -63536,11 +63619,11 @@ const FeedbackButtons = ({
63536
63619
  ]
63537
63620
  }
63538
63621
  ),
63539
- feedbackSubmitted === "thumbsDown" && /* @__PURE__ */ jsxs("span", { className: styles$l.thumbsDownFeedbackContainer, children: [
63622
+ feedbackSubmitted === "thumbsDown" && /* @__PURE__ */ jsxs("span", { className: styles$m.thumbsDownFeedbackContainer, children: [
63540
63623
  /* @__PURE__ */ jsxs(
63541
63624
  VSCodeButton,
63542
63625
  {
63543
- className: clsx$1(styles$l.feedbackButton),
63626
+ className: clsx$1(styles$m.feedbackButton),
63544
63627
  appearance: "icon",
63545
63628
  type: "button",
63546
63629
  disabled: true,
@@ -64168,18 +64251,18 @@ function highlightNodeHelper(currentNode, currentOffset, start, length) {
64168
64251
  }
64169
64252
  const code = "_code_1suzz_6";
64170
64253
  const small = "_small_1suzz_13";
64171
- const styles$k = {
64254
+ const styles$l = {
64172
64255
  code,
64173
64256
  small
64174
64257
  };
64175
- const getFontWeightStyle = (weight) => clsx$1(styles$k[`fontWeight${upperFirst(weight)}`]);
64258
+ const getFontWeightStyle = (weight) => clsx$1(styles$l[`fontWeight${upperFirst(weight)}`]);
64176
64259
  const Code = forwardRef(function Code2({ children: children2, as: Component = "code", size: size2, weight, className, ...props }, reference) {
64177
64260
  return /* @__PURE__ */ jsx(
64178
64261
  Component,
64179
64262
  {
64180
64263
  className: clsx$1(
64181
- styles$k.code,
64182
- size2 === "small" && styles$k.small,
64264
+ styles$l.code,
64265
+ size2 === "small" && styles$l.small,
64183
64266
  weight && getFontWeightStyle(weight),
64184
64267
  className
64185
64268
  ),
@@ -64192,7 +64275,7 @@ const Code = forwardRef(function Code2({ children: children2, as: Component = "c
64192
64275
  const codeExcerpt = "_code-excerpt_1gr2h_1";
64193
64276
  const codeExcerptError = "_code-excerpt-error_1gr2h_1";
64194
64277
  const codeExcerptAlert = "_code-excerpt-alert_1gr2h_1";
64195
- const styles$j = {
64278
+ const styles$k = {
64196
64279
  codeExcerpt,
64197
64280
  codeExcerptError,
64198
64281
  codeExcerptAlert
@@ -64269,7 +64352,7 @@ const CodeExcerpt = (props) => {
64269
64352
  }
64270
64353
  }
64271
64354
  }, [highlightRanges, startLine, endLine, tableContainerElement, table2]);
64272
- return /* @__PURE__ */ jsx(Code, { className: clsx$1(styles$j.codeExcerpt, className), "data-code-excerpt": true, children: /* @__PURE__ */ jsx("div", { ref: setTableContainerElement, children: table2 }) });
64355
+ return /* @__PURE__ */ jsx(Code, { className: clsx$1(styles$k.codeExcerpt, className), "data-code-excerpt": true, children: /* @__PURE__ */ jsx("div", { ref: setTableContainerElement, children: table2 }) });
64273
64356
  };
64274
64357
  const resultContainer = "_result-container_61rcx_12";
64275
64358
  const header$2 = "_header_61rcx_32";
@@ -64287,7 +64370,7 @@ const titleInner = "_title-inner_61rcx_119";
64287
64370
  const toggleMatchesButton = "_toggle-matches-button_61rcx_123";
64288
64371
  const toggleMatchesButtonExpanded = "_toggle-matches-button--expanded_61rcx_1";
64289
64372
  const toggleMatchesButtonText = "_toggle-matches-button-text_61rcx_1";
64290
- const styles$i = {
64373
+ const styles$j = {
64291
64374
  resultContainer,
64292
64375
  header: header$2,
64293
64376
  headerTitle,
@@ -64306,7 +64389,7 @@ const styles$i = {
64306
64389
  toggleMatchesButtonText
64307
64390
  };
64308
64391
  const chunk = "_chunk_1nj7l_1";
64309
- const styles$h = {
64392
+ const styles$i = {
64310
64393
  chunk
64311
64394
  };
64312
64395
  const FileMatchChildren = (props) => {
@@ -64341,10 +64424,10 @@ const FileMatchChildren = (props) => {
64341
64424
  "data-href": createCodeExcerptLink(group),
64342
64425
  className: clsx$1(
64343
64426
  "test-file-match-children-item",
64344
- styles$h.chunk,
64345
- styles$i.clickable,
64346
- styles$i.focusableBlock,
64347
- styles$i.horizontalDividerBetween
64427
+ styles$i.chunk,
64428
+ styles$j.clickable,
64429
+ styles$j.focusableBlock,
64430
+ styles$j.horizontalDividerBetween
64348
64431
  ),
64349
64432
  children: /* @__PURE__ */ jsx(
64350
64433
  CodeExcerpt,
@@ -64689,7 +64772,7 @@ const FileMatchSearchResult = (props) => {
64689
64772
  pathMatchRanges: result2.pathMatches ?? [],
64690
64773
  fileURL,
64691
64774
  repoDisplayName: repoDisplayName ? `${repoDisplayName}${revisionDisplayName ? `@${revisionDisplayName}` : ""}` : void 0,
64692
- className: styles$i.titleInner,
64775
+ className: styles$j.titleInner,
64693
64776
  collapsed: hidden2,
64694
64777
  onToggleCollapse: () => setHidden((current) => !current)
64695
64778
  }
@@ -64735,13 +64818,13 @@ const FileMatchSearchResult = (props) => {
64735
64818
  {
64736
64819
  type: "button",
64737
64820
  className: clsx$1(
64738
- styles$i.toggleMatchesButton,
64739
- styles$i.focusableBlock,
64740
- styles$i.clickable,
64741
- { [styles$i.toggleMatchesButtonExpanded]: expanded }
64821
+ styles$j.toggleMatchesButton,
64822
+ styles$j.focusableBlock,
64823
+ styles$j.clickable,
64824
+ { [styles$j.toggleMatchesButtonExpanded]: expanded }
64742
64825
  ),
64743
64826
  onClick: toggleExpand,
64744
- children: /* @__PURE__ */ jsx("span", { className: styles$i.toggleMatchesButtonText, children: expanded ? "Show less" : `Show ${hiddenMatchesCount} more ${pluralize(
64827
+ children: /* @__PURE__ */ jsx("span", { className: styles$j.toggleMatchesButtonText, children: expanded ? "Show less" : `Show ${hiddenMatchesCount} more ${pluralize(
64745
64828
  "match",
64746
64829
  hiddenMatchesCount,
64747
64830
  "matches"
@@ -64775,20 +64858,20 @@ const ResultContainer = forwardRef(function ResultContainer2(props, reference) {
64775
64858
  Component,
64776
64859
  {
64777
64860
  ref: reference,
64778
- className: clsx$1(className, styles$i.resultContainer, "tw-group"),
64861
+ className: clsx$1(className, styles$j.resultContainer, "tw-group"),
64779
64862
  onClick: onResultClicked,
64780
64863
  children: /* @__PURE__ */ jsxs("article", { children: [
64781
- /* @__PURE__ */ jsxs("header", { className: styles$i.header, "data-result-header": true, children: [
64864
+ /* @__PURE__ */ jsxs("header", { className: styles$j.header, "data-result-header": true, children: [
64782
64865
  /* @__PURE__ */ jsxs("span", { className: "sr-only", children: [
64783
64866
  resultType ? accessibleResultType[resultType] : "search",
64784
64867
  " result,"
64785
64868
  ] }),
64786
- /* @__PURE__ */ jsx("div", { className: clsx$1(styles$i.headerTitle, titleClassName), children: title2 }),
64869
+ /* @__PURE__ */ jsx("div", { className: clsx$1(styles$j.headerTitle, titleClassName), children: title2 }),
64787
64870
  formattedRepositoryStarCount && /* @__PURE__ */ jsx("span", { className: "d-flex align-items-center", children: /* @__PURE__ */ jsx("span", { "aria-hidden": true, children: formattedRepositoryStarCount }) }),
64788
64871
  actions2
64789
64872
  ] }),
64790
64873
  rankingDebug && /* @__PURE__ */ jsx("div", { children: rankingDebug }),
64791
- children2 && !collapsed && /* @__PURE__ */ jsx("div", { className: clsx$1(styles$i.result, resultClassName), children: children2 })
64874
+ children2 && !collapsed && /* @__PURE__ */ jsx("div", { className: clsx$1(styles$j.result, resultClassName), children: children2 })
64792
64875
  ] })
64793
64876
  }
64794
64877
  );
@@ -65090,15 +65173,26 @@ const labelVariants = cva(
65090
65173
  const Label = React.forwardRef(({ className, ...props }, ref2) => /* @__PURE__ */ jsx(Root$2, { ref: ref2, className: cn(labelVariants(), className), ...props }));
65091
65174
  Label.displayName = Root$2.displayName;
65092
65175
  const infoMessage = "_info-message_1hay9_1";
65093
- const styles$g = {
65176
+ const styles$h = {
65094
65177
  infoMessage
65095
65178
  };
65096
65179
  const InfoMessage = ({ children: children2, className }) => {
65097
- return /* @__PURE__ */ jsx("div", { className: cn(styles$g.infoMessage, "tw-p-4 tw-rounded-sm", className), children: children2 });
65180
+ return /* @__PURE__ */ jsx("div", { className: cn(styles$h.infoMessage, "tw-p-4 tw-rounded-sm", className), children: children2 });
65181
+ };
65182
+ const TELEMETRY_INTENT = {
65183
+ CHAT: 1,
65184
+ SEARCH: 2
65185
+ };
65186
+ const TELEMETRY_SEARCH_FILTER = {
65187
+ UNKNOWN: 1,
65188
+ REPO: 2,
65189
+ LANGUAGE: 3,
65190
+ FILE: 4,
65191
+ TYPE: 5
65098
65192
  };
65099
65193
  const filter = "_filter_u880r_1";
65100
65194
  const selected = "_selected_u880r_5";
65101
- const styles$f = {
65195
+ const styles$g = {
65102
65196
  filter,
65103
65197
  selected
65104
65198
  };
@@ -65107,6 +65201,7 @@ const SearchFilters = ({
65107
65201
  selectedFilters,
65108
65202
  onSelectedFiltersUpdate
65109
65203
  }) => {
65204
+ const telemetryRecorder = useTelemetryRecorder();
65110
65205
  const filterGroups = useMemo(() => {
65111
65206
  const fields = [
65112
65207
  "repo",
@@ -65126,9 +65221,15 @@ const SearchFilters = ({
65126
65221
  }, [filters, selectedFilters]);
65127
65222
  const onFilterSelect = useCallback(
65128
65223
  (filter2) => {
65224
+ telemetryRecorder.recordEvent("onebox.filter", "clicked", {
65225
+ metadata: {
65226
+ filterType: getTelemetryFilterType(filter2)
65227
+ },
65228
+ privateMetadata: { value: filter2.value }
65229
+ });
65129
65230
  onSelectedFiltersUpdate([...selectedFilters, filter2]);
65130
65231
  },
65131
- [selectedFilters, onSelectedFiltersUpdate]
65232
+ [selectedFilters, onSelectedFiltersUpdate, telemetryRecorder]
65132
65233
  );
65133
65234
  const onFilterDeselect = useCallback(
65134
65235
  (filter2) => {
@@ -65185,10 +65286,10 @@ const SearchFilter = ({
65185
65286
  "div",
65186
65287
  {
65187
65288
  className: classNames(
65188
- styles$f.filter,
65289
+ styles$g.filter,
65189
65290
  "tw-flex tw-justify-between tw-items-center tw-py-2 tw-px-4 tw-rounded-md tw-cursor-pointer hover:tw-bg-accent hover:tw-text-accent-foreground",
65190
65291
  {
65191
- [styles$f.selected]: selected2
65292
+ [styles$g.selected]: selected2
65192
65293
  }
65193
65294
  ),
65194
65295
  onClick: onClickHandler,
@@ -65202,6 +65303,20 @@ const SearchFilter = ({
65202
65303
  );
65203
65304
  };
65204
65305
  const isFilterEqual = (a2, b2) => a2.kind === b2.kind && a2.value === b2.value;
65306
+ function getTelemetryFilterType(filter2) {
65307
+ switch (filter2.kind) {
65308
+ case "lang":
65309
+ return TELEMETRY_SEARCH_FILTER.LANGUAGE;
65310
+ case "type":
65311
+ return TELEMETRY_SEARCH_FILTER.TYPE;
65312
+ case "repo":
65313
+ return TELEMETRY_SEARCH_FILTER.REPO;
65314
+ case "file":
65315
+ return TELEMETRY_SEARCH_FILTER.FILE;
65316
+ default:
65317
+ return TELEMETRY_SEARCH_FILTER.UNKNOWN;
65318
+ }
65319
+ }
65205
65320
  const SearchFiltersModal = ({
65206
65321
  selectedFilters,
65207
65322
  filters,
@@ -65239,6 +65354,26 @@ const SearchFiltersModal = ({
65239
65354
  ] })
65240
65355
  ] });
65241
65356
  };
65357
+ const root$4 = "_root_fzfjq_1";
65358
+ const resultsContainer = "_results-container_fzfjq_6";
65359
+ const filtersSidebarHidden = "_filters-sidebar-hidden_fzfjq_9";
65360
+ const filtersSidebar = "_filters-sidebar_fzfjq_9";
65361
+ const filtersSidebarToggle = "_filters-sidebar-toggle_fzfjq_16";
65362
+ const container$2 = "_container_fzfjq_20";
65363
+ const filtersModalTrigger = "_filters-modal-trigger_fzfjq_30";
65364
+ const searchResultsHeader = "_search-results-header_fzfjq_43";
65365
+ const searchResultsHeaderLabel = "_search-results-header__label_fzfjq_52";
65366
+ const styles$f = {
65367
+ root: root$4,
65368
+ resultsContainer,
65369
+ filtersSidebarHidden,
65370
+ filtersSidebar,
65371
+ filtersSidebarToggle,
65372
+ container: container$2,
65373
+ filtersModalTrigger,
65374
+ searchResultsHeader,
65375
+ searchResultsHeaderLabel
65376
+ };
65242
65377
  const DEFAULT_RESULTS_LIMIT = 10;
65243
65378
  const SearchResults = ({
65244
65379
  message: message2,
@@ -65247,7 +65382,8 @@ const SearchResults = ({
65247
65382
  feedbackButtonsOnSubmit,
65248
65383
  enableContextSelection
65249
65384
  }) => {
65250
- var _a;
65385
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i2, _j;
65386
+ const telemetryRecorder = useTelemetryRecorder();
65251
65387
  const experimentalOneBoxDebug = useExperimentalOneBoxDebug();
65252
65388
  const lastEditorRef = useContext(LastEditorContext);
65253
65389
  const [selectedFollowUpResults, updateSelectedFollowUpResults] = useReducer(
@@ -65255,7 +65391,8 @@ const SearchResults = ({
65255
65391
  /* @__PURE__ */ new Set()
65256
65392
  );
65257
65393
  const [showAll, setShowAll] = useState(false);
65258
- const [showFilters, setShowFilters] = useState(false);
65394
+ const [showFiltersModal, setShowFiltersModal] = useState(false);
65395
+ const [showFiltersSidebar, setShowFiltersSidebar] = useState(true);
65259
65396
  const totalResults = useMemo(
65260
65397
  () => {
65261
65398
  var _a2;
@@ -65280,7 +65417,7 @@ const SearchResults = ({
65280
65417
  });
65281
65418
  }, [initialResults]);
65282
65419
  useLayoutEffect(() => {
65283
- var _a2, _b;
65420
+ var _a2, _b2;
65284
65421
  if (!enableContextSelection) {
65285
65422
  return;
65286
65423
  }
@@ -65300,131 +65437,273 @@ const SearchResults = ({
65300
65437
  }
65301
65438
  }).filter(isDefined)
65302
65439
  );
65303
- (_a2 = lastEditorRef.current) == null ? void 0 : _a2.upsertMentions([contextItem2]);
65440
+ (_a2 = lastEditorRef.current) == null ? void 0 : _a2.upsertMentions([contextItem2], "before", " ", false);
65304
65441
  } else {
65305
- (_b = lastEditorRef.current) == null ? void 0 : _b.filterMentions(
65442
+ (_b2 = lastEditorRef.current) == null ? void 0 : _b2.filterMentions(
65306
65443
  (mention) => mention.type !== "openctx" || mention.providerUri !== CODE_SEARCH_PROVIDER_URI
65307
65444
  );
65308
65445
  }
65309
65446
  }, [enableContextSelection, selectedFollowUpResults, lastEditorRef]);
65310
- const handleSelectForContext = useCallback((selected2, result2) => {
65311
- updateSelectedFollowUpResults({
65312
- type: selected2 ? "add" : "remove",
65313
- results: [result2]
65314
- });
65315
- }, []);
65316
- if (showFilters) {
65447
+ const handleSelectForContext = useCallback(
65448
+ (selected2, result2) => {
65449
+ telemetryRecorder.recordEvent(
65450
+ "onebox.resultContext",
65451
+ selected2 ? "individualSelected" : "individualDeselected",
65452
+ {
65453
+ metadata: { resultRank: totalResults.indexOf(result2) }
65454
+ }
65455
+ );
65456
+ updateSelectedFollowUpResults({
65457
+ type: selected2 ? "add" : "remove",
65458
+ results: [result2]
65459
+ });
65460
+ },
65461
+ [totalResults, telemetryRecorder]
65462
+ );
65463
+ if (showFiltersModal) {
65317
65464
  return /* @__PURE__ */ jsx(
65318
65465
  SearchFiltersModal,
65319
65466
  {
65320
65467
  filters: ((_a = message2.search.response) == null ? void 0 : _a.results.dynamicFilters) || [],
65321
65468
  selectedFilters: message2.search.selectedFilters || [],
65322
65469
  onSelectedFiltersUpdate,
65323
- close: () => setShowFilters(false)
65470
+ close: () => {
65471
+ telemetryRecorder.recordEvent("onebox.filterModal", "closed");
65472
+ setShowFiltersModal(false);
65473
+ }
65324
65474
  }
65325
65475
  );
65326
65476
  }
65327
- if (!message2.text && !!message2.search.query) {
65328
- return /* @__PURE__ */ jsx(LoadingDots, {});
65329
- }
65330
- return /* @__PURE__ */ jsxs(Fragment, { children: [
65331
- !!resultsToShow && /* @__PURE__ */ jsxs("div", { className: "tw-flex tw-items-center tw-gap-4 tw-justify-between", children: [
65332
- /* @__PURE__ */ jsxs("div", { className: "tw-flex tw-gap-2 tw-items-center tw-font-semibold tw-text-muted-foreground", children: [
65333
- /* @__PURE__ */ jsx(Search, { className: "tw-size-8 tw-flex-shrink-0" }),
65334
- "Displaying ",
65335
- resultsToShow.length,
65336
- " code search results"
65337
- ] }),
65338
- /* @__PURE__ */ jsxs("div", { className: "tw-flex tw-gap-4", children: [
65339
- /* @__PURE__ */ jsxs(Button$2, { onClick: () => setShowFilters(true), variant: "outline", children: [
65340
- /* @__PURE__ */ jsx(Filter, { className: "tw-size-8" }),
65341
- "Filters"
65342
- ] }),
65343
- /* @__PURE__ */ jsxs("div", { className: "tw-flex tw-items-center tw-gap-4", children: [
65344
- /* @__PURE__ */ jsx(Label, { htmlFor: "search-results.select-all", children: "Add to context:" }),
65345
- /* @__PURE__ */ jsx(
65346
- "input",
65347
- {
65348
- type: "checkbox",
65349
- id: "search-results.select-all",
65350
- checked: selectedFollowUpResults.size === resultsToShow.length,
65351
- disabled: !enableContextSelection,
65352
- onChange: (event) => {
65353
- if (event.target.checked) {
65354
- updateSelectedFollowUpResults({
65355
- type: "add",
65356
- results: resultsToShow
65357
- });
65358
- } else {
65359
- updateSelectedFollowUpResults({
65360
- type: "init",
65361
- results: []
65362
- });
65363
- }
65364
- }
65365
- }
65366
- )
65367
- ] })
65368
- ] })
65369
- ] }),
65370
- experimentalOneBoxDebug && message2.search.query && /* @__PURE__ */ jsxs(InfoMessage, { className: "tw-mt-4", children: [
65371
- "Query: ",
65372
- message2.search.query
65373
- ] }),
65374
- experimentalOneBoxDebug && message2.search.queryWithSelectedFilters && /* @__PURE__ */ jsxs(InfoMessage, { className: "tw-mt-4", children: [
65375
- "Query with selected filters: ",
65376
- message2.search.queryWithSelectedFilters
65377
- ] }),
65378
- !!resultsToShow && /* @__PURE__ */ jsx("ul", { className: "tw-list-none tw-flex tw-flex-col tw-gap-2 tw-pt-2", children: resultsToShow.map((result2, i2) => /* @__PURE__ */ jsx(
65379
- "li",
65380
- {
65381
- children: /* @__PURE__ */ jsx(
65382
- NLSResultSnippet,
65477
+ const onFilterSidebarClose = useCallback(() => {
65478
+ telemetryRecorder.recordEvent("onebox.filterSidebar", "closed");
65479
+ setShowFiltersSidebar(false);
65480
+ }, [telemetryRecorder]);
65481
+ return /* @__PURE__ */ jsx("div", { className: styles$f.root, children: /* @__PURE__ */ jsxs(
65482
+ "div",
65483
+ {
65484
+ className: classNames(
65485
+ styles$f.container,
65486
+ "tw-flex tw-gap-8 tw-items-start tw-justify-between"
65487
+ ),
65488
+ children: [
65489
+ showFiltersSidebar && !!((_c = (_b = message2.search.response) == null ? void 0 : _b.results.dynamicFilters) == null ? void 0 : _c.length) && /* @__PURE__ */ jsxs(
65490
+ "div",
65383
65491
  {
65384
- result: result2,
65385
- selectedForContext: selectedFollowUpResults.has(result2),
65386
- onSelectForContext: enableContextSelection ? handleSelectForContext : void 0
65492
+ className: classNames(
65493
+ "tw-min-w-[250px] tw-w-[250px] tw-relative tw-mt-2 tw-p-4 tw-rounded-md",
65494
+ styles$f.filtersSidebar
65495
+ ),
65496
+ children: [
65497
+ /* @__PURE__ */ jsx(
65498
+ "div",
65499
+ {
65500
+ className: "tw-absolute tw-top-2 tw-right-2",
65501
+ onClick: onFilterSidebarClose,
65502
+ onKeyDown: onFilterSidebarClose,
65503
+ role: "button",
65504
+ children: /* @__PURE__ */ jsx(PanelLeftClose, { className: "tw-size-8" })
65505
+ }
65506
+ ),
65507
+ /* @__PURE__ */ jsx(
65508
+ SearchFilters,
65509
+ {
65510
+ filters: ((_d = message2.search.response) == null ? void 0 : _d.results.dynamicFilters) || [],
65511
+ selectedFilters: message2.search.selectedFilters || [],
65512
+ onSelectedFiltersUpdate
65513
+ }
65514
+ )
65515
+ ]
65387
65516
  }
65388
- )
65389
- },
65390
- i2
65391
- )) }),
65392
- /* @__PURE__ */ jsxs("div", { className: "tw-flex tw-justify-between tw-gap-4 tw-my-4", children: [
65393
- /* @__PURE__ */ jsxs("div", { className: "tw-flex tw-items-center tw-gap-4", children: [
65394
- !showAll && resultsToShow && totalResults && resultsToShow !== totalResults && /* @__PURE__ */ jsxs(
65395
- Button$2,
65517
+ ),
65518
+ !message2.text && !!message2.search.query ? /* @__PURE__ */ jsx("div", { className: "tw-flex-1", children: /* @__PURE__ */ jsx(LoadingDots, {}) }) : /* @__PURE__ */ jsxs(
65519
+ "div",
65396
65520
  {
65397
- onClick: () => {
65398
- setShowAll(true);
65399
- updateSelectedFollowUpResults({
65400
- type: "add",
65401
- results: totalResults.slice(resultsToShow.length)
65402
- });
65403
- },
65404
- variant: "outline",
65521
+ className: classNames("tw-flex-1", styles$f.resultsContainer, {
65522
+ [styles$f.filtersSidebarHidden]: !showFiltersSidebar || !((_f = (_e = message2.search.response) == null ? void 0 : _e.results.dynamicFilters) == null ? void 0 : _f.length)
65523
+ }),
65405
65524
  children: [
65406
- /* @__PURE__ */ jsx(ArrowDown, { className: "tw-size-8" }),
65407
- "More results"
65525
+ !!resultsToShow && /* @__PURE__ */ jsxs(
65526
+ "div",
65527
+ {
65528
+ className: classNames(
65529
+ "tw-flex tw-items-center tw-gap-4 tw-justify-between",
65530
+ styles$f.searchResultsHeader
65531
+ ),
65532
+ children: [
65533
+ /* @__PURE__ */ jsxs("div", { className: "tw-flex tw-gap-2 tw-items-center tw-font-semibold tw-text-muted-foreground", children: [
65534
+ /* @__PURE__ */ jsx(Search, { className: "tw-size-8 tw-flex-shrink-0" }),
65535
+ "Displaying ",
65536
+ resultsToShow.length,
65537
+ " code search results"
65538
+ ] }),
65539
+ /* @__PURE__ */ jsxs("div", { className: "tw-flex tw-gap-4", children: [
65540
+ !!((_h = (_g = message2.search.response) == null ? void 0 : _g.results.dynamicFilters) == null ? void 0 : _h.length) && /* @__PURE__ */ jsxs(Fragment, { children: [
65541
+ /* @__PURE__ */ jsxs(
65542
+ Button$2,
65543
+ {
65544
+ onClick: () => {
65545
+ telemetryRecorder.recordEvent(
65546
+ "onebox.filterModal",
65547
+ "opened"
65548
+ );
65549
+ setShowFiltersModal(true);
65550
+ setShowFiltersSidebar(true);
65551
+ },
65552
+ variant: "outline",
65553
+ className: styles$f.filtersModalTrigger,
65554
+ children: [
65555
+ ((_i2 = message2.search.selectedFilters) == null ? void 0 : _i2.length) ? /* @__PURE__ */ jsx(FilterX, { className: "tw-size-8" }) : /* @__PURE__ */ jsx(Filter, { className: "tw-size-8" }),
65556
+ /* @__PURE__ */ jsx("span", { className: styles$f.searchResultsHeaderLabel, children: "Filters" })
65557
+ ]
65558
+ }
65559
+ ),
65560
+ /* @__PURE__ */ jsxs(
65561
+ Button$2,
65562
+ {
65563
+ onClick: () => {
65564
+ setShowFiltersSidebar((open) => {
65565
+ telemetryRecorder.recordEvent(
65566
+ "onebox.filterSidebar",
65567
+ open ? "closed" : "opened"
65568
+ );
65569
+ return !open;
65570
+ });
65571
+ },
65572
+ variant: "outline",
65573
+ className: styles$f.filtersSidebarToggle,
65574
+ children: [
65575
+ ((_j = message2.search.selectedFilters) == null ? void 0 : _j.length) ? /* @__PURE__ */ jsx(FilterX, { className: "tw-size-8" }) : /* @__PURE__ */ jsx(Filter, { className: "tw-size-8" }),
65576
+ /* @__PURE__ */ jsx("span", { className: styles$f.searchResultsHeaderLabel, children: "Filters" })
65577
+ ]
65578
+ }
65579
+ )
65580
+ ] }),
65581
+ /* @__PURE__ */ jsxs("div", { className: "tw-flex tw-items-center tw-gap-4", children: [
65582
+ /* @__PURE__ */ jsx(
65583
+ Label,
65584
+ {
65585
+ htmlFor: "search-results.select-all",
65586
+ className: styles$f.searchResultsHeaderLabel,
65587
+ children: "Add to context:"
65588
+ }
65589
+ ),
65590
+ /* @__PURE__ */ jsx(
65591
+ "input",
65592
+ {
65593
+ type: "checkbox",
65594
+ id: "search-results.select-all",
65595
+ checked: selectedFollowUpResults.size === resultsToShow.length,
65596
+ disabled: !enableContextSelection,
65597
+ onChange: (event) => {
65598
+ const checked = event.target.checked;
65599
+ telemetryRecorder.recordEvent(
65600
+ "onebox.results",
65601
+ checked ? "selectAll" : "deselectAll"
65602
+ );
65603
+ if (checked) {
65604
+ updateSelectedFollowUpResults({
65605
+ type: "add",
65606
+ results: resultsToShow
65607
+ });
65608
+ } else {
65609
+ updateSelectedFollowUpResults({
65610
+ type: "init",
65611
+ results: []
65612
+ });
65613
+ }
65614
+ }
65615
+ }
65616
+ )
65617
+ ] })
65618
+ ] })
65619
+ ]
65620
+ }
65621
+ ),
65622
+ experimentalOneBoxDebug && message2.search.query && /* @__PURE__ */ jsxs(InfoMessage, { className: "tw-mt-4", children: [
65623
+ "Query: ",
65624
+ /* @__PURE__ */ jsx("code", { children: message2.search.query })
65625
+ ] }),
65626
+ experimentalOneBoxDebug && message2.search.queryWithSelectedFilters && /* @__PURE__ */ jsxs(InfoMessage, { className: "tw-mt-4", children: [
65627
+ "Query with selected filters:",
65628
+ " ",
65629
+ /* @__PURE__ */ jsx("code", { children: message2.search.queryWithSelectedFilters })
65630
+ ] }),
65631
+ resultsToShow.length ? /* @__PURE__ */ jsx("ul", { className: "tw-list-none tw-flex tw-flex-col tw-gap-2 tw-pt-2", children: resultsToShow.map((result2, i2) => /* @__PURE__ */ jsx(
65632
+ "li",
65633
+ {
65634
+ children: /* @__PURE__ */ jsx(
65635
+ NLSResultSnippet,
65636
+ {
65637
+ result: result2,
65638
+ selectedForContext: selectedFollowUpResults.has(result2),
65639
+ onSelectForContext: enableContextSelection ? handleSelectForContext : void 0
65640
+ }
65641
+ )
65642
+ },
65643
+ i2
65644
+ )) }) : /* @__PURE__ */ jsxs("div", { className: "tw-flex tw-flex-col tw-gap-4 tw-justify-center tw-items-center tw-my-20 tw-text-muted-foreground", children: [
65645
+ /* @__PURE__ */ jsx(OctagonX, { className: "tw-size-8" }),
65646
+ /* @__PURE__ */ jsx("p", { children: "No search results found" })
65647
+ ] }),
65648
+ /* @__PURE__ */ jsxs("div", { className: "tw-flex tw-justify-between tw-gap-4 tw-my-4", children: [
65649
+ /* @__PURE__ */ jsxs("div", { className: "tw-flex tw-items-center tw-gap-4", children: [
65650
+ !showAll && resultsToShow && totalResults && resultsToShow !== totalResults && /* @__PURE__ */ jsxs(
65651
+ Button$2,
65652
+ {
65653
+ onClick: () => {
65654
+ telemetryRecorder.recordEvent(
65655
+ "onebox.moreResults",
65656
+ "clicked",
65657
+ {
65658
+ metadata: {
65659
+ totalResults: totalResults.length,
65660
+ resultsAdded: totalResults.length - resultsToShow.length
65661
+ }
65662
+ }
65663
+ );
65664
+ setShowAll(true);
65665
+ updateSelectedFollowUpResults({
65666
+ type: "add",
65667
+ results: totalResults.slice(resultsToShow.length)
65668
+ });
65669
+ },
65670
+ variant: "outline",
65671
+ children: [
65672
+ /* @__PURE__ */ jsx(ArrowDown, { className: "tw-size-8" }),
65673
+ "More results"
65674
+ ]
65675
+ }
65676
+ ),
65677
+ showFeedbackButtons && feedbackButtonsOnSubmit && /* @__PURE__ */ jsx(FeedbackButtons, { feedbackButtonsOnSubmit })
65678
+ ] }),
65679
+ /* @__PURE__ */ jsx(
65680
+ "a",
65681
+ {
65682
+ href: `${serverEndpoint}/search`,
65683
+ target: "_blank",
65684
+ rel: "noreferrer",
65685
+ className: "tw-text-foreground",
65686
+ onClick: () => {
65687
+ telemetryRecorder.recordEvent("onebox.codeSearch", "clicked", {
65688
+ metadata: {
65689
+ totalResults: totalResults.length,
65690
+ resultsAdded: totalResults.length - resultsToShow.length
65691
+ }
65692
+ });
65693
+ },
65694
+ children: /* @__PURE__ */ jsxs(Button$2, { variant: "outline", children: [
65695
+ "Code search ",
65696
+ /* @__PURE__ */ jsx(ExternalLink, { className: "tw-size-8" })
65697
+ ] })
65698
+ }
65699
+ )
65700
+ ] })
65408
65701
  ]
65409
65702
  }
65410
- ),
65411
- showFeedbackButtons && feedbackButtonsOnSubmit && /* @__PURE__ */ jsx(FeedbackButtons, { feedbackButtonsOnSubmit })
65412
- ] }),
65413
- /* @__PURE__ */ jsx(
65414
- "a",
65415
- {
65416
- href: `${serverEndpoint}/search`,
65417
- target: "_blank",
65418
- rel: "noreferrer",
65419
- className: "tw-text-foreground",
65420
- children: /* @__PURE__ */ jsxs(Button$2, { variant: "outline", children: [
65421
- "Code search ",
65422
- /* @__PURE__ */ jsx(ExternalLink, { className: "tw-size-8" })
65423
- ] })
65424
- }
65425
- )
65426
- ] })
65427
- ] });
65703
+ )
65704
+ ]
65705
+ }
65706
+ ) });
65428
65707
  };
65429
65708
  function selectedResultsReducer(state, action2) {
65430
65709
  switch (action2.type) {
@@ -66238,8 +66517,9 @@ const PromptList = (props) => {
66238
66517
  const allActions = showOnlyPromptInsertableCommands ? (result2 == null ? void 0 : result2.actions.filter((action2) => action2.actionType === "prompt" || action2.mode === "ask")) ?? [] : (result2 == null ? void 0 : result2.actions) ?? [];
66239
66518
  const sortedActions = lastUsedSorting ? getSortedActions(filteredActions(allActions), lastUsedActions) : filteredActions(allActions);
66240
66519
  const actions2 = showFirstNItems ? sortedActions.slice(0, showFirstNItems) : sortedActions;
66241
- const inputPaddingClass = paddingLevels !== "none" ? paddingLevels === "middle" ? "!tw-p-0" : "!tw-p-4" : "";
66520
+ const inputPaddingClass = paddingLevels !== "none" ? paddingLevels === "middle" ? "!tw-p-0" : "!tw-p-2" : "";
66242
66521
  const itemPaddingClass = paddingLevels !== "none" ? paddingLevels === "middle" ? "!tw-px-6" : "!tw-px-8" : "";
66522
+ const anyPromptFilterActive = !!Object.keys(promptFilters ?? {}).length;
66243
66523
  return /* @__PURE__ */ jsx(
66244
66524
  Command,
66245
66525
  {
@@ -66262,7 +66542,7 @@ const PromptList = (props) => {
66262
66542
  }
66263
66543
  ) }),
66264
66544
  !result2 && !error2 && /* @__PURE__ */ jsx(CommandLoading, { className: itemPaddingClass, children: "Loading..." }),
66265
- !recommendedOnly && result2 && allActions.filter((action2) => action2.actionType === "prompt").length === 0 && /* @__PURE__ */ jsx(CommandLoading, { className: itemPaddingClass, children: (result2 == null ? void 0 : result2.query) === "" ? /* @__PURE__ */ jsxs(Fragment, { children: [
66545
+ !recommendedOnly && result2 && sortedActions.filter((action2) => action2.actionType === "prompt").length === 0 && /* @__PURE__ */ jsx(CommandLoading, { className: itemPaddingClass, children: (result2 == null ? void 0 : result2.query) === "" && !anyPromptFilterActive ? /* @__PURE__ */ jsxs(Fragment, { children: [
66266
66546
  "Your Prompt Library is empty.",
66267
66547
  " ",
66268
66548
  /* @__PURE__ */ jsx(
@@ -66558,7 +66838,7 @@ const PromptsFilter = (props) => {
66558
66838
  const {
66559
66839
  config: { serverEndpoint }
66560
66840
  } = useConfig();
66561
- const { value: userId, error: error2 } = useCurrentUserId();
66841
+ const { value: userId, error: userIdError } = useCurrentUserId();
66562
66842
  const selectPromptFilter = (param, origin) => {
66563
66843
  setIsPromptTagsOpen(false);
66564
66844
  setSelectedFilter(origin);
@@ -66566,110 +66846,126 @@ const PromptsFilter = (props) => {
66566
66846
  };
66567
66847
  return (
66568
66848
  // we need the surrounding div to prevent the remaining content from jumping
66569
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(Popover, { open: isPromptTagsOpen, onOpenChange: setIsPromptTagsOpen, children: [
66849
+ /* @__PURE__ */ jsx("div", { className: "tw-pl-6 tw-pt-6", children: /* @__PURE__ */ jsxs(Popover, { open: isPromptTagsOpen, onOpenChange: setIsPromptTagsOpen, children: [
66850
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, onClick: () => setIsPromptTagsOpen(!isPromptTagsOpen), children: /* @__PURE__ */ jsxs(
66851
+ Button$2,
66852
+ {
66853
+ variant: "secondary",
66854
+ className: "tw-bg-popover tw-border tw-border-border !tw-justify-between",
66855
+ children: [
66856
+ /* @__PURE__ */ jsx("div", { className: "tw-flex tw-items-center", children: /* @__PURE__ */ jsx(
66857
+ FilterContent,
66858
+ {
66859
+ value: selectedFilter.value,
66860
+ nameOverride: selectedFilter.nameOverride
66861
+ }
66862
+ ) }),
66863
+ /* @__PURE__ */ jsx(ChevronDown, { size: 16, className: "tw-text-muted-foreground" })
66864
+ ]
66865
+ }
66866
+ ) }),
66570
66867
  /* @__PURE__ */ jsx(
66571
- PopoverTrigger,
66868
+ PopoverContent,
66572
66869
  {
66573
- asChild: true,
66574
- onClick: () => setIsPromptTagsOpen(!isPromptTagsOpen),
66575
- className: "tw-ml-8 tw-mt-8",
66576
- children: /* @__PURE__ */ jsx(
66577
- Button$2,
66870
+ className: "tw-flex tw-flex-col tw-w-full !tw-p-0",
66871
+ side: "bottom",
66872
+ align: "start",
66873
+ children: /* @__PURE__ */ jsx("div", { className: "tw-w-[240px]", children: /* @__PURE__ */ jsx(
66874
+ Command,
66578
66875
  {
66579
- variant: "secondary",
66580
- className: "tw-bg-popover tw-border tw-border-border tw-w-48 !tw-justify-start",
66581
- children: /* @__PURE__ */ jsxs("span", { className: "tw-w-full tw-flex tw-items-center tw-justify-between", children: [
66582
- /* @__PURE__ */ jsx(
66583
- FilterContent,
66876
+ loop: true,
66877
+ defaultValue: selectedFilter.value,
66878
+ tabIndex: 0,
66879
+ className: "focus:tw-outline-none",
66880
+ children: /* @__PURE__ */ jsxs(CommandList, { children: [
66881
+ /* @__PURE__ */ jsx(CommandGroup, { className: "!tw-py-1", children: /* @__PURE__ */ jsx(
66882
+ CommandLink,
66584
66883
  {
66585
- value: selectedFilter.value,
66586
- nameOverride: selectedFilter.nameOverride
66884
+ href: `${serverEndpoint}prompts/new`,
66885
+ target: "_blank",
66886
+ className: "tw-w-full tw-no-underline tw-text-inherit hover:!tw-bg-transparent",
66887
+ rel: "noreferrer",
66888
+ children: /* @__PURE__ */ jsxs(Button$2, { variant: "outline", className: "tw-w-full", children: [
66889
+ /* @__PURE__ */ jsx(Plus, { size: 16 }),
66890
+ " Create new Prompt"
66891
+ ] })
66587
66892
  }
66588
- ),
66589
- /* @__PURE__ */ jsx(ChevronDown, { size: 16 })
66893
+ ) }),
66894
+ /* @__PURE__ */ jsxs(CommandGroup, { className: "tw-w-full", children: [
66895
+ /* @__PURE__ */ jsx(
66896
+ CommandItem,
66897
+ {
66898
+ value: "all",
66899
+ onSelect: () => selectPromptFilter({}, { value: "all" }),
66900
+ children: /* @__PURE__ */ jsx(FilterContent, { value: "all" })
66901
+ }
66902
+ ),
66903
+ !userIdError && typeof userId === "string" && /* @__PURE__ */ jsx(
66904
+ CommandItem,
66905
+ {
66906
+ value: "you",
66907
+ onSelect: () => selectPromptFilter({ owner: userId }, { value: "you" }),
66908
+ children: /* @__PURE__ */ jsx(FilterContent, { value: "you" })
66909
+ }
66910
+ )
66911
+ ] }),
66912
+ /* @__PURE__ */ jsxs(CommandGroup, { className: "tw-w-full", children: [
66913
+ /* @__PURE__ */ jsx(
66914
+ CommandItem,
66915
+ {
66916
+ value: "promoted",
66917
+ onSelect: () => selectPromptFilter({ promoted: true }, { value: "promoted" }),
66918
+ children: /* @__PURE__ */ jsx(FilterContent, { value: "promoted" })
66919
+ }
66920
+ ),
66921
+ /* @__PURE__ */ jsx(
66922
+ CommandItem,
66923
+ {
66924
+ value: "core",
66925
+ onSelect: () => selectPromptFilter({ core: true }, { value: "core" }),
66926
+ children: /* @__PURE__ */ jsx(FilterContent, { value: "core" })
66927
+ }
66928
+ )
66929
+ ] }),
66930
+ !!(resultTags == null ? void 0 : resultTags.length) && !errorTags && /* @__PURE__ */ jsx(CommandGroup, { heading: "By tag", className: "tw-w-full", children: /* @__PURE__ */ jsx("div", { className: "tw-max-h-[200px] tw-overflow-y-auto", children: resultTags.map((tag) => /* @__PURE__ */ jsx(
66931
+ CommandItem,
66932
+ {
66933
+ value: `tag:${tag.id}`,
66934
+ onSelect: () => selectPromptFilter(
66935
+ { tags: [tag.id] },
66936
+ {
66937
+ value: `tag:${tag.id}`,
66938
+ nameOverride: tag.name
66939
+ }
66940
+ ),
66941
+ children: /* @__PURE__ */ jsx(
66942
+ FilterContent,
66943
+ {
66944
+ value: tag.id,
66945
+ nameOverride: tag.name
66946
+ }
66947
+ )
66948
+ },
66949
+ tag.id
66950
+ )) }) }),
66951
+ /* @__PURE__ */ jsx(CommandGroup, { className: "tw-w-full", children: /* @__PURE__ */ jsxs(
66952
+ CommandLink,
66953
+ {
66954
+ href: `${serverEndpoint}prompts`,
66955
+ target: "_blank",
66956
+ rel: "noreferrer",
66957
+ className: "tw-flex",
66958
+ children: [
66959
+ /* @__PURE__ */ jsx("span", { className: "tw-flex-grow", children: "Explore Prompt Library" }),
66960
+ /* @__PURE__ */ jsx(ExternalLink, { size: 16, className: "tw-text-muted-foreground" })
66961
+ ]
66962
+ }
66963
+ ) })
66590
66964
  ] })
66591
66965
  }
66592
- )
66966
+ ) })
66593
66967
  }
66594
- ),
66595
- /* @__PURE__ */ jsx(PopoverContent, { className: "tw-flex tw-flex-col tw-w-full", side: "bottom", align: "center", children: /* @__PURE__ */ jsxs("div", { className: "tw-w-[225px]", children: [
66596
- /* @__PURE__ */ jsx(
66597
- "a",
66598
- {
66599
- href: `${serverEndpoint}prompts/new`,
66600
- target: "_blank",
66601
- className: "tw-w-full tw-no-underline tw-text-inherit",
66602
- rel: "noreferrer",
66603
- children: /* @__PURE__ */ jsxs(Button$2, { variant: "outline", className: "tw-w-full", children: [
66604
- /* @__PURE__ */ jsx(Plus, { size: 16 }),
66605
- " Create new Prompt"
66606
- ] })
66607
- }
66608
- ),
66609
- /* @__PURE__ */ jsxs("div", { className: "tw-border-t tw-border-border tw-w-full tw-mt-4 tw-mb-4 tw-pt-4", children: [
66610
- /* @__PURE__ */ jsx(
66611
- PromptsFilterItem,
66612
- {
66613
- onSelect: () => selectPromptFilter({}, { value: "all" }),
66614
- value: "all"
66615
- }
66616
- ),
66617
- typeof userId === "string" && !error2 && /* @__PURE__ */ jsx(
66618
- PromptsFilterItem,
66619
- {
66620
- onSelect: () => selectPromptFilter({ owner: userId }, { value: "you" }),
66621
- value: "you"
66622
- }
66623
- )
66624
- ] }),
66625
- /* @__PURE__ */ jsxs("div", { className: "tw-border-t tw-border-border tw-w-full tw-mt-4 tw-mb-4 tw-pt-4", children: [
66626
- /* @__PURE__ */ jsx(
66627
- PromptsFilterItem,
66628
- {
66629
- onSelect: () => selectPromptFilter({ promoted: true }, { value: "promoted" }),
66630
- value: "promoted"
66631
- }
66632
- ),
66633
- /* @__PURE__ */ jsx(
66634
- PromptsFilterItem,
66635
- {
66636
- onSelect: () => selectPromptFilter({ core: true }, { value: "core" }),
66637
- value: "core"
66638
- }
66639
- )
66640
- ] }),
66641
- !!(resultTags == null ? void 0 : resultTags.length) && !errorTags && /* @__PURE__ */ jsxs("div", { className: "tw-border-t tw-border-border tw-w-full tw-mt-4 tw-mb-4 tw-pt-4", children: [
66642
- /* @__PURE__ */ jsx("div", { className: "tw-text-muted-foreground tw-mt-4", children: "By tag" }),
66643
- /* @__PURE__ */ jsx("ul", { className: "tw-mt-4 tw-max-h-[200px] tw-overflow-y-auto", children: resultTags.map((tag) => /* @__PURE__ */ jsx("li", { className: "tw-flex", children: /* @__PURE__ */ jsx(
66644
- PromptsFilterItem,
66645
- {
66646
- onSelect: () => selectPromptFilter(
66647
- { tags: [tag.id] },
66648
- {
66649
- value: "tag",
66650
- nameOverride: tag.name
66651
- }
66652
- ),
66653
- value: tag.id,
66654
- nameOverride: tag.name
66655
- }
66656
- ) }, tag.id)) })
66657
- ] }),
66658
- /* @__PURE__ */ jsx("div", { className: "tw-border-t tw-border-border tw-w-full tw-pt-4 tw-pt-4", children: /* @__PURE__ */ jsxs("div", { className: "tw-flex", children: [
66659
- /* @__PURE__ */ jsx(
66660
- "a",
66661
- {
66662
- className: "tw-flex-grow",
66663
- href: `${serverEndpoint}prompts`,
66664
- target: "_blank",
66665
- rel: "noreferrer",
66666
- children: "Explore Prompt Library"
66667
- }
66668
- ),
66669
- " ",
66670
- /* @__PURE__ */ jsx(ExternalLink, { size: 16 })
66671
- ] }) })
66672
- ] }) })
66968
+ )
66673
66969
  ] }) })
66674
66970
  );
66675
66971
  };
@@ -66691,19 +66987,6 @@ const iconForFilter = {
66691
66987
  name: "Core"
66692
66988
  }
66693
66989
  };
66694
- const PromptsFilterItem = (props) => {
66695
- return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
66696
- Button$2,
66697
- {
66698
- value: props.value,
66699
- onClick: props.onSelect,
66700
- className: "tw-text-left",
66701
- variant: "ghost",
66702
- children: /* @__PURE__ */ jsx("span", { className: "tw-flex tw-pt-2 tw-pb-2", children: /* @__PURE__ */ jsx(FilterContent, { value: props.value, nameOverride: props.nameOverride }) })
66703
- },
66704
- `prompts-filter-${props.value}`
66705
- ) });
66706
- };
66707
66990
  const FilterContent = (props) => {
66708
66991
  const filter2 = iconForFilter[props.value];
66709
66992
  const Icon2 = (filter2 == null ? void 0 : filter2.icon) ?? Tag$1;
@@ -66983,7 +67266,7 @@ const styles$8 = {
66983
67266
  const PromptsTab = ({ IDE, setView, isPromptsV2Enabled }) => {
66984
67267
  const runAction = useActionSelect();
66985
67268
  const [promptsFilter, setPromptsFilter] = useState({});
66986
- return /* @__PURE__ */ jsxs("div", { className: "tw-overflow-auto tw-h-full tw-flex tw-flex-col tw-gap-6", children: [
67269
+ return /* @__PURE__ */ jsxs("div", { className: "tw-overflow-auto tw-h-full tw-flex tw-flex-col", children: [
66987
67270
  isPromptsV2Enabled && IDE !== CodyIDE.Web && /* @__PURE__ */ jsx(PromptMigrationWidget, { dismissible: false, className: styles$8.promptMigrationWidget }),
66988
67271
  /* @__PURE__ */ jsx(PromptsFilter, { promptFilters: promptsFilter, setPromptFilters: setPromptsFilter }),
66989
67272
  /* @__PURE__ */ jsx(
@@ -68920,17 +69203,17 @@ async function downloadChatHistory(extensionAPI) {
68920
69203
  a2.target = "_blank";
68921
69204
  a2.click();
68922
69205
  }
68923
- const tabsRoot = "_tabs-root_ild96_10";
68924
- const tabsContainer = "_tabs-container_ild96_17";
68925
- const tabs = "_tabs_ild96_10";
68926
- const subTabs = "_sub-tabs_ild96_40";
68927
- const tabActionLabel = "_tab-action-label_ild96_56";
68928
- const tabsRootCodyWeb = "_tabs-root--cody-web_ild96_68";
68929
- const dialogOverlay = "_dialog-overlay_ild96_1";
68930
- const dialogContent = "_dialog-content_ild96_1";
68931
- const dialogTitle = "_dialog-title_ild96_1";
68932
- const dialogDescription = "_dialog-description_ild96_1";
68933
- const dialogFooter = "_dialog-footer_ild96_1";
69206
+ const tabsRoot = "_tabs-root_11pag_10";
69207
+ const tabsContainer = "_tabs-container_11pag_17";
69208
+ const tabs = "_tabs_11pag_10";
69209
+ const subTabs = "_sub-tabs_11pag_40";
69210
+ const tabActionLabel = "_tab-action-label_11pag_56";
69211
+ const tabsRootCodyWeb = "_tabs-root--cody-web_11pag_68";
69212
+ const dialogOverlay = "_dialog-overlay_11pag_1";
69213
+ const dialogContent = "_dialog-content_11pag_1";
69214
+ const dialogTitle = "_dialog-title_11pag_1";
69215
+ const dialogDescription = "_dialog-description_11pag_1";
69216
+ const dialogFooter = "_dialog-footer_11pag_1";
68934
69217
  const styles$5 = {
68935
69218
  tabsRoot,
68936
69219
  tabsContainer,
@@ -70352,12 +70635,11 @@ const TranscriptInteraction = memo((props) => {
70352
70635
  onEditSubmit(intent);
70353
70636
  telemetryRecorder.recordEvent("onebox.intentCorrection", "clicked", {
70354
70637
  metadata: {
70355
- recordsPrivateMetadataTranscript: 1
70638
+ initialIntent: humanMessage.intent === "search" ? TELEMETRY_INTENT.SEARCH : TELEMETRY_INTENT.CHAT,
70639
+ selectedIntent: intent === "search" ? TELEMETRY_INTENT.SEARCH : TELEMETRY_INTENT.CHAT
70356
70640
  },
70357
70641
  privateMetadata: {
70358
- initialIntent: humanMessage.intent,
70359
- userSpecifiedIntent: intent,
70360
- promptText: editorState.text
70642
+ query: editorState.text
70361
70643
  }
70362
70644
  });
70363
70645
  }
@@ -70396,7 +70678,7 @@ const TranscriptInteraction = memo((props) => {
70396
70678
  const onHumanMessageSubmit = useCallback(
70397
70679
  (intent) => {
70398
70680
  if (humanMessage.isUnsentFollowup) {
70399
- onFollowupSubmit(intent);
70681
+ return onFollowupSubmit(intent);
70400
70682
  }
70401
70683
  onEditSubmit(intent);
70402
70684
  },
@@ -70948,7 +71230,7 @@ const Notices = ({ user, isTeamsUpgradeCtaEnabled, instanceNotices }) => {
70948
71230
  id: user.isCodyProUser ? "DeepCodyDotCom" : "DeepCodyEnterprise",
70949
71231
  variant: "default",
70950
71232
  title: "Deep Cody (Experimental)",
70951
- message: "An early preview of agentic experience powered by Claude 3.5 Sonnet and other models to enrich context and leverage different tools for better quality responses. Deep Cody does this by searching your codebase, browsing the web, and running terminal commands (once enabled)! To enable terminal commands, set `cody.agentic.context.experimentalShell' to true in your " + settingsNameByIDE + ".",
71233
+ message: "An early preview of agentic experience powered by Claude 3.5 Sonnet and other models to enrich context and leverage different tools for better quality responses. Deep Cody does this by searching your codebase, browsing the web, and running terminal commands (once enabled)! To enable terminal commands, set 'cody.agentic.context.experimentalShell' to true in your " + settingsNameByIDE + ".",
70952
71234
  onDismiss: () => dismissNotice(user.isCodyProUser ? "DeepCodyDotCom" : "DeepCodyEnterprise"),
70953
71235
  info: "Usage limits apply during the experimental phase.",
70954
71236
  footer: !isDeepCodyShellContextSupported ? "Contact admins to enable Command Execution" : "",
@@ -70975,7 +71257,7 @@ const Notices = ({ user, isTeamsUpgradeCtaEnabled, instanceNotices }) => {
70975
71257
  {
70976
71258
  // TODO: Update to live link https://linear.app/sourcegraph/issue/CORE-535/cody-clients-migrate-ctas-to-live-links
70977
71259
  label: "Upgrade to Teams",
70978
- href: "https://sourcegraph.com/cody/manage",
71260
+ href: DOTCOM_WORKSPACE_UPGRADE_URL.href,
70979
71261
  variant: "default",
70980
71262
  icon: /* @__PURE__ */ jsx(UsersRound, { size: 14 }),
70981
71263
  iconPosition: "start"
@@ -70983,7 +71265,7 @@ const Notices = ({ user, isTeamsUpgradeCtaEnabled, instanceNotices }) => {
70983
71265
  {
70984
71266
  // TODO: Update to live link https://linear.app/sourcegraph/issue/CORE-535/cody-clients-migrate-ctas-to-live-links
70985
71267
  label: "Learn More",
70986
- href: "https://sourcegraph.com/docs",
71268
+ href: DOTCOM_WORKSPACE_LEARN_MORE_URL.href,
70987
71269
  variant: "ghost",
70988
71270
  icon: /* @__PURE__ */ jsx(ExternalLink, { size: 14 }),
70989
71271
  iconPosition: "end"
@@ -71051,7 +71333,7 @@ const Notices = ({ user, isTeamsUpgradeCtaEnabled, instanceNotices }) => {
71051
71333
  if (!activeNotice) {
71052
71334
  return null;
71053
71335
  }
71054
- return /* @__PURE__ */ jsx("div", { className: "tw-flex tw-flex-col tw-mx-4 tw-my-2 tw-p-4 tw-gap-2", children: activeNotice.content });
71336
+ return /* @__PURE__ */ jsx("div", { className: "tw-flex tw-flex-col tw-mx-2 tw-my-2 tw-p-2 tw-gap-2", children: activeNotice.content });
71055
71337
  };
71056
71338
  const NoticeContent = ({
71057
71339
  variant,
@@ -71136,12 +71418,12 @@ const MarkdownNotice = (props) => {
71136
71418
  return /* @__PURE__ */ jsxs(
71137
71419
  "div",
71138
71420
  {
71139
- className: "tw-bg-accent tw-bg-opacity-50 tw--ml-2 tw--mr-2 tw-border tw-border-border tw-relative tw-rounded-md tw-flex tw-flex-col tw-gap-2 tw-p-4",
71421
+ className: "tw-bg-subtle tw-ml-2 tw-mr-2 tw-border tw-border-border tw-relative tw-rounded-lg tw-flex tw-flex-col tw-gap-2 tw-pt-4 tw-pb-6 tw-px-6",
71140
71422
  "data-markdown-notice": "",
71141
71423
  children: [
71142
- title2 && /* @__PURE__ */ jsx("h1", { className: "tw-text-lg tw-font-semibold", children: title2 }),
71143
- /* @__PURE__ */ jsx(MarkdownFromCody, { children: message2 }),
71144
- /* @__PURE__ */ jsx(Button$2, { variant: "ghost", onClick: onDismiss, className: "tw-absolute tw-top-2 tw-right-2", children: /* @__PURE__ */ jsx(X$2, { size: "14" }) })
71424
+ title2 && /* @__PURE__ */ jsx("h1", { className: "tw-text-md tw-font-semibold tw-text-title tw-flex tw-flex-row tw-items-center tw-gap-3 tw-mt-1 tw-mb-2", children: title2 }),
71425
+ /* @__PURE__ */ jsx(MarkdownFromCody, { className: "tw-text-subtle tw-leading-tight", children: message2 }),
71426
+ /* @__PURE__ */ jsx(Button$2, { variant: "ghost", onClick: onDismiss, className: "tw-absolute tw-top-3 tw-right-2", children: /* @__PURE__ */ jsx(X$2, { size: "14" }) })
71145
71427
  ]
71146
71428
  }
71147
71429
  );
@@ -71336,7 +71618,7 @@ const CodyPanel = ({
71336
71618
  defaultValue: View.Chat,
71337
71619
  value: view,
71338
71620
  orientation: "vertical",
71339
- className: styles$s.outerContainer,
71621
+ className: styles$t.outerContainer,
71340
71622
  children: [
71341
71623
  /* @__PURE__ */ jsx(
71342
71624
  Notices,
@@ -71408,15 +71690,15 @@ const CodyPanel = ({
71408
71690
  }
71409
71691
  ) });
71410
71692
  };
71411
- const ErrorBanner = ({ errors, setErrors }) => /* @__PURE__ */ jsx("div", { className: styles$s.errorContainer, children: errors.map((error2, i2) => (
71693
+ const ErrorBanner = ({ errors, setErrors }) => /* @__PURE__ */ jsx("div", { className: styles$t.errorContainer, children: errors.map((error2, i2) => (
71412
71694
  // biome-ignore lint/suspicious/noArrayIndexKey: error strings might not be unique, so we have no natural id
71413
- /* @__PURE__ */ jsxs("div", { className: styles$s.error, children: [
71695
+ /* @__PURE__ */ jsxs("div", { className: styles$t.error, children: [
71414
71696
  /* @__PURE__ */ jsx("span", { children: error2 }),
71415
71697
  /* @__PURE__ */ jsx(
71416
71698
  "button",
71417
71699
  {
71418
71700
  type: "button",
71419
- className: styles$s.closeBtn,
71701
+ className: styles$t.closeBtn,
71420
71702
  onClick: () => setErrors(errors.filter((e2) => e2 !== error2)),
71421
71703
  children: "×"
71422
71704
  }