@sourcegraph/cody-web 0.7.3 → 0.7.4

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.
@@ -1,5 +1,5 @@
1
- import { p as path, U as Uri, s as spawn } from "./agent.worker-7dUx4v7q.mjs";
2
- import { w as wrapInActiveSpan, C as ContextItemSource } from "./browser-0yJ2hV_u.mjs";
1
+ import { p as path, U as Uri, s as spawn } from "./agent.worker-CiIPD-tv.mjs";
2
+ import { w as wrapInActiveSpan, C as ContextItemSource } from "./browser-BTzYzFoB.mjs";
3
3
  async function getContextFileFromGitLog(file, options) {
4
4
  return wrapInActiveSpan("commands.context.git-log", async (span) => {
5
5
  const cwd = path.dirname(file.fsPath);
@@ -1,8 +1,8 @@
1
1
  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
- import { U as Uri, P as Position, R as Range, w as window, D as DiagnosticSeverity, b as workspace, c as updateRangeMultipleChanges, d as commands, f as executeEdit, T as TERMINAL_EDIT_STATES, g as ThemeColor, h as languages, C as CodeLens, i as setTutorialUri, j as logSidebarClick, k as Disposable } from "./agent.worker-7dUx4v7q.mjs";
5
- import { t as telemetryRecorder, p as ps, d as dedent } from "./browser-0yJ2hV_u.mjs";
4
+ import { U as Uri, P as Position, R as Range, w as window, D as DiagnosticSeverity, b as workspace, c as updateRangeMultipleChanges, d as commands, f as executeEdit, T as TERMINAL_EDIT_STATES, g as ThemeColor, h as languages, C as CodeLens, i as setTutorialUri, j as logSidebarClick, k as Disposable } from "./agent.worker-CiIPD-tv.mjs";
5
+ import { t as telemetryRecorder, p as ps, d as dedent } from "./browser-BTzYzFoB.mjs";
6
6
  const EMOJI_SVG_TEMPLATE = `<svg width="32" height="32" xmlns="http://www.w3.org/2000/svg">
7
7
  <text x="50%" y="50%" dominant-baseline="middle" text-anchor="middle" font-family="Arial" font-size="24px">{emoji}</text>
8
8
  </svg>`;
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, 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$4, G as oe$1, 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, V as F$1, X as Ni$1, Y as ee$1, Z as we$2, $ as b$2, a0 as T$3, a1 as s$2, a2 as o$4, a3 as w$3, a4 as i$1, a5 as k$3, a6 as D$5, a7 as p$8, a8 as m$7, a9 as S$4, aa as v$4, ab as P$2, ac as E$6, ad as Wi$1, ae as L$3, af as d$2, ag as a$3, ah as l$2, ai as f$2, aj as u$6, ak as r$6, al as t$2, am as displayPathBasename, an as FILE_CONTEXT_MENTION_PROVIDER, ao as SYMBOL_CONTEXT_MENTION_PROVIDER, ap as REMOTE_REPOSITORY_PROVIDER_URI, aq as REMOTE_FILE_PROVIDER_URI, ar as REMOTE_DIRECTORY_PROVIDER_URI, as as CURRENT_REPOSITORY_DIRECTORY_PROVIDER_URI, at as WEB_PROVIDER_URI, au as displayPath, av as displayLineRange, aw as displayPathDirname, ax as IGNORED_FILE_WARNING_LABEL, ay as LARGE_FILE_WARNING_LABEL, az as Ei$1, aA as xe$2, aB as V$2, aC as Es, aD as U$2, aE as e, aF as Ns, aG as an, aH as gs, aI as serializeContextItem, aJ as CONTEXT_ITEM_MENTION_NODE_TYPE, aK as contextItemMentionNodeDisplayText, C as ContextItemSource, aL as URI, aM as qr, aN as _$2, aO as TEMPLATE_INPUT_NODE_TYPE, aP as N$2, aQ as parseMentionQuery, aR as NO_SYMBOL_MATCHES_HELP_LABEL, aS as FILE_RANGE_TOOLTIP_LABEL, aT as proxyExtensionAPI, aU as createMessageAPIForWebview, aV as lodashExports, aW as memoizeLastValue, aX as toSerializedPromptEditorValue, aY as ri$1, aZ as scanForMentionTriggerInUserTextInput, a_ as fs, a$ as Ts, b0 as ps, b1 as hydrateAfterPostMessage, b2 as isCodyProUser, b3 as CodyIDE, b4 as webviewOpenURIForContextItem, b5 as commonjsGlobal, b6 as CodyTaskState, b7 as cryptoJsExports, b8 as isError, b9 as RateLimitError, ba as CODY_FEEDBACK_URL, bb as isDefined, bc as reformatBotMessageForChat, p as ps$1, bd as isAbortErrorOrSocketHangUp, be as isEqual, bf as serializedPromptEditorStateFromChatMessage, bg as contextItemsFromPromptEditorValue, bh as filterContextItemsFromPromptEditorValue, bi as pluralize, bj as isCodyProModel, bk as ModelTag, bl as CustomCommandType, bm as isMacOS, bn as textContentFromSerializedLexicalNode, bo as FAST_CHAT_INPUT_TOKEN_BUDGET, bp as deserializeContextItem, bq as View, br as truncateTextStart, bs as CHAT_INPUT_TOKEN_BUDGET, bt as ACCOUNT_USAGE_URL, bu as getRelativeChatPeriod, bv as browser, bw as isErrorLike, bx as setDisplayPathEnvInfo, by as PromptString } from "./browser-0yJ2hV_u.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$4, G as oe$1, 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, V as F$1, X as Ni$1, Y as ee$1, Z as we$2, $ as b$2, a0 as T$3, a1 as s$2, a2 as o$4, a3 as w$3, a4 as i$1, a5 as k$3, a6 as D$5, a7 as p$8, a8 as m$7, a9 as S$4, aa as v$4, ab as P$2, ac as E$6, ad as Wi$1, ae as L$3, af as d$2, ag as a$3, ah as l$2, ai as f$2, aj as u$6, ak as r$6, al as t$2, am as displayPathBasename, an as FILE_CONTEXT_MENTION_PROVIDER, ao as SYMBOL_CONTEXT_MENTION_PROVIDER, ap as REMOTE_REPOSITORY_PROVIDER_URI, aq as REMOTE_FILE_PROVIDER_URI, ar as REMOTE_DIRECTORY_PROVIDER_URI, as as CURRENT_REPOSITORY_DIRECTORY_PROVIDER_URI, at as WEB_PROVIDER_URI, au as displayPath, av as displayLineRange, aw as displayPathDirname, ax as IGNORED_FILE_WARNING_LABEL, ay as LARGE_FILE_WARNING_LABEL, az as Ei$1, aA as xe$2, aB as V$2, aC as Es, aD as U$2, aE as e, aF as Ns, aG as an, aH as gs, aI as serializeContextItem, aJ as CONTEXT_ITEM_MENTION_NODE_TYPE, aK as contextItemMentionNodeDisplayText, C as ContextItemSource, aL as URI, aM as qr, aN as _$2, aO as TEMPLATE_INPUT_NODE_TYPE, aP as N$2, aQ as parseMentionQuery, aR as NO_SYMBOL_MATCHES_HELP_LABEL, aS as FILE_RANGE_TOOLTIP_LABEL, aT as proxyExtensionAPI, aU as createMessageAPIForWebview, aV as lodashExports, aW as memoizeLastValue, aX as toSerializedPromptEditorValue, aY as ri$1, aZ as scanForMentionTriggerInUserTextInput, a_ as fs, a$ as Ts, b0 as ps, b1 as hydrateAfterPostMessage, b2 as isCodyProUser, b3 as CodyIDE, b4 as webviewOpenURIForContextItem, b5 as commonjsGlobal, b6 as CodyTaskState, b7 as cryptoJsExports, b8 as isError, b9 as RateLimitError, ba as CODY_FEEDBACK_URL, bb as isDefined, bc as reformatBotMessageForChat, p as ps$1, bd as isAbortErrorOrSocketHangUp, be as isEqual, bf as serializedPromptEditorStateFromChatMessage, bg as contextItemsFromPromptEditorValue, bh as filterContextItemsFromPromptEditorValue, bi as pluralize, bj as isCodyProModel, bk as ModelTag, bl as CustomCommandType, bm as isMacOS, bn as textContentFromSerializedLexicalNode, bo as FAST_CHAT_INPUT_TOKEN_BUDGET, bp as deserializeContextItem, bq as View, br as truncateTextStart, bs as CHAT_INPUT_TOKEN_BUDGET, bt as ACCOUNT_USAGE_URL, bu as getRelativeChatPeriod, bv as browser, bw as isErrorLike, bx as setDisplayPathEnvInfo, by as PromptString } from "./browser-BTzYzFoB.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: {} };
@@ -8345,7 +8345,6 @@ function getGlobalPromptEditorConfig() {
8345
8345
  const CAN_USE_DOM = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
8346
8346
  const IS_IOS = CAN_USE_DOM && /iPad|iPhone|iPod/.test(navigator.userAgent) && // @ts-ignore
8347
8347
  !window.MSStream;
8348
- CAN_USE_DOM && window.matchMedia("(pointer: coarse)").matches;
8349
8348
  const useLayoutEffectImpl = CAN_USE_DOM ? useLayoutEffect : useEffect;
8350
8349
  const useIsFocused = () => {
8351
8350
  const [editor2] = u$5();
@@ -8374,7 +8373,7 @@ const useIsFocused = () => {
8374
8373
  }, [editor2]);
8375
8374
  return hasFocus;
8376
8375
  };
8377
- const MentionComponent = ({ nodeKey, node: node2, tooltip, icon: Icon2, className, focusedClassName, iconClassName }) => {
8376
+ const MentionComponent = ({ nodeKey, node: node2, tooltip: tooltip2, icon: Icon2, className, focusedClassName, iconClassName }) => {
8378
8377
  const { tooltipComponents, onContextItemMentionNodeMetaClick } = getGlobalPromptEditorConfig();
8379
8378
  const [editor2] = u$5();
8380
8379
  const isEditorFocused = useIsFocused();
@@ -8516,8 +8515,8 @@ const MentionComponent = ({ nodeKey, node: node2, tooltip, icon: Icon2, classNam
8516
8515
  unregister();
8517
8516
  };
8518
8517
  }, [editor2, onArrowLeftPress, onArrowRightPress, onClick, onDelete, onBlur, onSelectionChange]);
8519
- const content2 = /* @__PURE__ */ jsxs("span", { ref: ref2, className: composedClassNames, title: tooltipComponents ? void 0 : tooltip, children: [
8520
- Icon2 && /* @__PURE__ */ jsx(Icon2, { size: 14, strokeWidth: 2, className: iconClassName }),
8518
+ const content2 = /* @__PURE__ */ jsxs("span", { ref: ref2, className: composedClassNames, title: tooltipComponents ? void 0 : tooltip2, children: [
8519
+ Icon2 && /* @__PURE__ */ jsx(Icon2, { size: 14, strokeWidth: 2, className: clsx$1(iconClassName, "tw-shrink-0") }),
8521
8520
  /* @__PURE__ */ jsx("span", { children: text2 })
8522
8521
  ] });
8523
8522
  if (!tooltipComponents) {
@@ -8526,7 +8525,7 @@ const MentionComponent = ({ nodeKey, node: node2, tooltip, icon: Icon2, classNam
8526
8525
  const { Tooltip: Tooltip2, TooltipContent: TooltipContent2, TooltipTrigger: TooltipTrigger2 } = tooltipComponents;
8527
8526
  return /* @__PURE__ */ jsxs(Tooltip2, { children: [
8528
8527
  /* @__PURE__ */ jsx(TooltipTrigger2, { asChild: true, children: content2 }),
8529
- tooltip && /* @__PURE__ */ jsx(TooltipContent2, { children: tooltip })
8528
+ tooltip2 && /* @__PURE__ */ jsx(TooltipContent2, { children: tooltip2 })
8530
8529
  ] });
8531
8530
  };
8532
8531
  const MENTION_CLASS_NAME = styles$k.contextItemMentionNode;
@@ -8710,16 +8709,16 @@ const TemplateInputComponent = ({ editor: editor2, nodeKey, node: node2, classNa
8710
8709
  editor2.registerCommand(_$2, onKeyDown, Ns)
8711
8710
  );
8712
8711
  }, [editor2, onClick, onKeyDown]);
8713
- const tooltip = "replaces template placeholder on keypress";
8712
+ const tooltip2 = "replaces template placeholder on keypress";
8714
8713
  const text2 = node2.templateInput.placeholder;
8715
- const content2 = /* @__PURE__ */ jsx("span", { ref: ref2, className: composedClassNames, title: tooltipComponents ? void 0 : tooltip, children: /* @__PURE__ */ jsx("span", { children: text2 }) });
8714
+ const content2 = /* @__PURE__ */ jsx("span", { ref: ref2, className: composedClassNames, title: tooltipComponents ? void 0 : tooltip2, children: /* @__PURE__ */ jsx("span", { children: text2 }) });
8716
8715
  if (!tooltipComponents) {
8717
8716
  return content2;
8718
8717
  }
8719
8718
  const { Tooltip: Tooltip2, TooltipContent: TooltipContent2, TooltipTrigger: TooltipTrigger2 } = tooltipComponents;
8720
8719
  return /* @__PURE__ */ jsxs(Tooltip2, { children: [
8721
8720
  /* @__PURE__ */ jsx(TooltipTrigger2, { asChild: true, children: content2 }),
8722
- /* @__PURE__ */ jsx(TooltipContent2, { children: tooltip })
8721
+ /* @__PURE__ */ jsx(TooltipContent2, { children: tooltip2 })
8723
8722
  ] });
8724
8723
  };
8725
8724
  const templateInputNode = "_template-input-node_14yoh_1";
@@ -17272,7 +17271,7 @@ const CommandSeparator = React.forwardRef(({ className, ...props }, ref2) => /*
17272
17271
  }
17273
17272
  ));
17274
17273
  CommandSeparator.displayName = He.Separator.displayName;
17275
- const CommandItem = React.forwardRef(({ className, tooltip, ...props }, ref2) => {
17274
+ const CommandItem = React.forwardRef(({ className, tooltip: tooltip2, ...props }, ref2) => {
17276
17275
  const item2 = /* @__PURE__ */ jsx(
17277
17276
  He.Item,
17278
17277
  {
@@ -17281,7 +17280,7 @@ const CommandItem = React.forwardRef(({ className, tooltip, ...props }, ref2) =>
17281
17280
  "tw-relative tw-flex tw-cursor-pointer tw-select-none tw-items-center tw-rounded-sm 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",
17282
17281
  className
17283
17282
  ),
17284
- title: tooltip,
17283
+ title: tooltip2,
17285
17284
  ...props
17286
17285
  }
17287
17286
  );
@@ -17415,10 +17414,10 @@ const COMMON_WRAPPERS = [
17415
17414
  value: promptEditorConfig
17416
17415
  }
17417
17416
  ];
17418
- const outerContainer = "_outer-container_xb9w0_1";
17419
- const errorContainer = "_error-container_xb9w0_11";
17420
- const error$1 = "_error_xb9w0_11";
17421
- const closeBtn = "_close-btn_xb9w0_29";
17417
+ const outerContainer = "_outer-container_hbzxh_1";
17418
+ const errorContainer = "_error-container_hbzxh_10";
17419
+ const error$1 = "_error_hbzxh_10";
17420
+ const closeBtn = "_close-btn_hbzxh_28";
17422
17421
  const styles$f = {
17423
17422
  outerContainer,
17424
17423
  errorContainer,
@@ -30016,8 +30015,6 @@ const hoverSourceLabels = {
30016
30015
  selection: "from selected code",
30017
30016
  user: "via @-mention",
30018
30017
  terminal: "from terminal output",
30019
- uri: "from URI",
30020
- // todo(tim): what is this?
30021
30018
  history: "from git history",
30022
30019
  initial: "from open repo or file"
30023
30020
  };
@@ -30835,28 +30832,32 @@ const LoadingDots = () => /* @__PURE__ */ jsxs("div", { className: styles$d.dots
30835
30832
  /* @__PURE__ */ jsx("div", { className: styles$d.dot }),
30836
30833
  /* @__PURE__ */ jsx("div", { className: styles$d.dot })
30837
30834
  ] });
30838
- const Cell = ({
30839
- header: header2,
30840
- containerClassName,
30841
- contentClassName,
30842
- "aria-current": ariaCurrent,
30843
- "aria-disabled": ariaDisabled,
30844
- "data-testid": dataTestID,
30845
- children: children2
30846
- }) => /* @__PURE__ */ jsxs(
30847
- "div",
30848
- {
30849
- className: clsx$1("tw-flex tw-flex-col tw-gap-4", containerClassName),
30850
- role: "row",
30835
+ const Cell = forwardRef((props, ref2) => {
30836
+ const {
30837
+ header: header2,
30838
+ containerClassName,
30839
+ contentClassName,
30851
30840
  "aria-current": ariaCurrent,
30852
30841
  "aria-disabled": ariaDisabled,
30853
30842
  "data-testid": dataTestID,
30854
- children: [
30855
- /* @__PURE__ */ jsx("header", { className: "tw-flex tw-gap-4 tw-items-center [&_>_*]:tw-flex-shrink-0", children: header2 }),
30856
- /* @__PURE__ */ jsx("div", { className: clsx$1("tw-flex-1 tw-overflow-hidden", contentClassName), children: children2 })
30857
- ]
30858
- }
30859
- );
30843
+ children: children2
30844
+ } = props;
30845
+ return /* @__PURE__ */ jsxs(
30846
+ "div",
30847
+ {
30848
+ ref: ref2,
30849
+ className: clsx$1("tw-flex tw-flex-col tw-gap-4", containerClassName),
30850
+ role: "row",
30851
+ "aria-current": ariaCurrent,
30852
+ "aria-disabled": ariaDisabled,
30853
+ "data-testid": dataTestID,
30854
+ children: [
30855
+ /* @__PURE__ */ jsx("header", { className: "tw-flex tw-gap-4 tw-items-center [&_>_*]:tw-flex-shrink-0", children: header2 }),
30856
+ /* @__PURE__ */ jsx("div", { className: clsx$1("tw-flex-1 tw-overflow-hidden", contentClassName), children: children2 })
30857
+ ]
30858
+ }
30859
+ );
30860
+ });
30860
30861
  const CodyLogoBW = ({ size: size2, ...props }) => /* @__PURE__ */ jsxs(
30861
30862
  "svg",
30862
30863
  {
@@ -71207,8 +71208,8 @@ class GuardrailsStatusController {
71207
71208
  if (repos.length === 1) {
71208
71209
  return `${prefix} ${repos[0]}.`;
71209
71210
  }
71210
- const tooltip = `${prefix} ${repos.length} repositories: ${repos.join(", ")}`;
71211
- return limitHit ? `${tooltip} or more...` : `${tooltip}.`;
71211
+ const tooltip2 = `${prefix} ${repos.length} repositories: ${repos.join(", ")}`;
71212
+ return limitHit ? `${tooltip2} or more...` : `${tooltip2}.`;
71212
71213
  }
71213
71214
  }
71214
71215
  function createButtons(preText, copyButtonOnSubmit, insertButtonOnSubmit) {
@@ -71872,7 +71873,7 @@ const ContextFocusActions = ({ humanMessage, className }) => {
71872
71873
  "aria-label": "Try again with different context",
71873
71874
  children: /* @__PURE__ */ jsxs("div", { className: "tw-flex tw-flex-wrap tw-items-center tw-gap-x-4 tw-gap-y-2", children: [
71874
71875
  /* @__PURE__ */ jsx("h3", { className: "tw-flex tw-items-center tw-gap-3", children: "Try again with different context" }),
71875
- /* @__PURE__ */ jsx("ul", { className: "tw-whitespace-nowrap tw-flex tw-gap-2 tw-flex-wrap", children: actions2.map(({ label, tooltip, onClick }) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(Tooltip, { children: [
71876
+ /* @__PURE__ */ jsx("ul", { className: "tw-whitespace-nowrap tw-flex tw-gap-2 tw-flex-wrap", children: actions2.map(({ label, tooltip: tooltip2, onClick }) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(Tooltip, { children: [
71876
71877
  /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
71877
71878
  Button3,
71878
71879
  {
@@ -71884,7 +71885,7 @@ const ContextFocusActions = ({ humanMessage, className }) => {
71884
71885
  },
71885
71886
  label
71886
71887
  ) }),
71887
- /* @__PURE__ */ jsx(TooltipContent, { children: tooltip })
71888
+ /* @__PURE__ */ jsx(TooltipContent, { children: tooltip2 })
71888
71889
  ] }) }, label)) })
71889
71890
  ] })
71890
71891
  }
@@ -72554,7 +72555,7 @@ const ToolbarButton = forwardRef(
72554
72555
  className,
72555
72556
  variant,
72556
72557
  asChild = false,
72557
- tooltip,
72558
+ tooltip: tooltip2,
72558
72559
  iconStart: IconStart,
72559
72560
  iconEnd: IconEnd,
72560
72561
  children: children2,
@@ -72579,9 +72580,9 @@ const ToolbarButton = forwardRef(
72579
72580
  ]
72580
72581
  }
72581
72582
  );
72582
- return tooltip ? /* @__PURE__ */ jsxs(Tooltip, { children: [
72583
+ return tooltip2 ? /* @__PURE__ */ jsxs(Tooltip, { children: [
72583
72584
  /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: button2 }),
72584
- /* @__PURE__ */ jsx(TooltipContent, { side: "bottom", children: tooltip })
72585
+ /* @__PURE__ */ jsx(TooltipContent, { side: "bottom", children: tooltip2 })
72585
72586
  ] }) : button2;
72586
72587
  }
72587
72588
  );
@@ -75029,22 +75030,24 @@ const SettingsTab = () => {
75029
75030
  "settings"
75030
75031
  ) });
75031
75032
  };
75032
- const tabsRoot = "_tabs-root_u8lyl_10";
75033
- const tabsContainer = "_tabs-container_u8lyl_15";
75034
- const tabs = "_tabs_u8lyl_10";
75035
- const subTabs = "_sub-tabs_u8lyl_34";
75036
- const tabActionLabel = "_tab-action-label_u8lyl_44";
75037
- const dialogOverlay = "_dialog-overlay_u8lyl_1";
75038
- const dialogContent = "_dialog-content_u8lyl_1";
75039
- const dialogTitle = "_dialog-title_u8lyl_1";
75040
- const dialogDescription = "_dialog-description_u8lyl_1";
75041
- const dialogFooter = "_dialog-footer_u8lyl_1";
75033
+ const tabsRoot = "_tabs-root_1do08_10";
75034
+ const tabsContainer = "_tabs-container_1do08_18";
75035
+ const tabs = "_tabs_1do08_10";
75036
+ const subTabs = "_sub-tabs_1do08_37";
75037
+ const tabActionLabel = "_tab-action-label_1do08_47";
75038
+ const tooltip = "_tooltip_1do08_51";
75039
+ const dialogOverlay = "_dialog-overlay_1do08_1";
75040
+ const dialogContent = "_dialog-content_1do08_1";
75041
+ const dialogTitle = "_dialog-title_1do08_1";
75042
+ const dialogDescription = "_dialog-description_1do08_1";
75043
+ const dialogFooter = "_dialog-footer_1do08_1";
75042
75044
  const styles$2 = {
75043
75045
  tabsRoot,
75044
75046
  tabsContainer,
75045
75047
  tabs,
75046
75048
  subTabs,
75047
75049
  tabActionLabel,
75050
+ tooltip,
75048
75051
  dialogOverlay,
75049
75052
  dialogContent,
75050
75053
  dialogTitle,
@@ -75193,7 +75196,7 @@ const TabButton = forwardRef(
75193
75196
  ]
75194
75197
  }
75195
75198
  ) }),
75196
- /* @__PURE__ */ jsxs(TooltipContent, { className: "md:tw-hidden", children: [
75199
+ /* @__PURE__ */ jsxs(TooltipContent, { className: styles$2.tooltip, children: [
75197
75200
  title2,
75198
75201
  " ",
75199
75202
  tooltipExtra
@@ -75475,14 +75478,7 @@ async function createAgentClient({
75475
75478
  }
75476
75479
  const GLOBAL_MESSAGE_TYPES = ["rpc/response"];
75477
75480
  function useCodyWebAgent(input) {
75478
- const {
75479
- serverEndpoint,
75480
- accessToken,
75481
- telemetryClientName,
75482
- customHeaders,
75483
- initialContext,
75484
- createAgentWorker
75485
- } = input;
75481
+ const { serverEndpoint, accessToken, telemetryClientName, customHeaders, createAgentWorker } = input;
75486
75482
  const activeWebviewPanelIDRef = useRef("");
75487
75483
  const [client, setClient] = useState(null);
75488
75484
  useEffectOnce(() => {
@@ -75498,29 +75494,17 @@ function useCodyWebAgent(input) {
75498
75494
  setClient(() => error2);
75499
75495
  });
75500
75496
  }, [accessToken, serverEndpoint, createAgentWorker, customHeaders, telemetryClientName]);
75501
- const createNewChat = useCallback(
75502
- async (agent) => {
75503
- if (!agent || isErrorLike(agent)) {
75504
- return;
75505
- }
75506
- const { panelId, chatId } = await agent.rpc.sendRequest("chat/web/new", null);
75507
- activeWebviewPanelIDRef.current = panelId;
75508
- await agent.rpc.sendRequest("webview/receiveMessage", {
75509
- id: activeWebviewPanelIDRef.current,
75510
- message: { chatID: chatId, command: "restoreHistory" }
75511
- });
75512
- if (initialContext == null ? void 0 : initialContext.repository) {
75513
- void agent.rpc.sendRequest("webview/receiveMessage", {
75514
- id: activeWebviewPanelIDRef.current,
75515
- message: {
75516
- command: "context/choose-remote-search-repo",
75517
- explicitRepos: [initialContext.repository]
75518
- }
75519
- });
75520
- }
75521
- },
75522
- [initialContext]
75523
- );
75497
+ const createNewChat = useCallback(async (agent) => {
75498
+ if (!agent || isErrorLike(agent)) {
75499
+ return;
75500
+ }
75501
+ const { panelId, chatId } = await agent.rpc.sendRequest("chat/web/new", null);
75502
+ activeWebviewPanelIDRef.current = panelId;
75503
+ await agent.rpc.sendRequest("webview/receiveMessage", {
75504
+ id: activeWebviewPanelIDRef.current,
75505
+ message: { chatID: chatId, command: "restoreHistory" }
75506
+ });
75507
+ }, []);
75524
75508
  const isInitRef = useRef(false);
75525
75509
  const vscodeAPI = useVSCodeAPI({ activeWebviewPanelIDRef, createNewChat, client });
75526
75510
  useEffect(() => {
@@ -1,6 +1,6 @@
1
1
  import type { ServerInfo } from 'cody-ai/src/jsonrpc/agent-protocol';
2
2
  import { type MessageConnection } from 'vscode-jsonrpc/browser';
3
- export interface AgentClient {
3
+ interface AgentClient {
4
4
  serverInfo: ServerInfo;
5
5
  rpc: MessageConnection;
6
6
  dispose(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"agent.client.d.ts","sourceRoot":"","sources":["../../../lib/agent/agent.client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAc,UAAU,EAAE,MAAM,oCAAoC,CAAA;AAChF,OAAO,EAGH,KAAK,iBAAiB,EAGzB,MAAM,wBAAwB,CAAA;AAG/B,MAAM,WAAW,WAAW;IACxB,UAAU,EAAE,UAAU,CAAA;IACtB,GAAG,EAAE,iBAAiB,CAAA;IACtB,OAAO,IAAI,IAAI,CAAA;CAClB;AAED,UAAU,kBAAkB;IACxB,cAAc,EAAE,MAAM,CAAA;IACtB,WAAW,EAAE,MAAM,CAAA;IACnB,iBAAiB,EAAE,MAAM,MAAM,CAAA;IAC/B,gBAAgB,EAAE,MAAM,CAAA;IACxB,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACtC,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,KAAK,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAsB,iBAAiB,CAAC,EACpC,cAAc,EACd,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EACb,mBAAmB,EACnB,KAAY,EACZ,KAAa,GAChB,EAAE,kBAAkB,GAAG,OAAO,CAAC,WAAW,CAAC,CA+D3C"}
1
+ {"version":3,"file":"agent.client.d.ts","sourceRoot":"","sources":["../../../lib/agent/agent.client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAc,UAAU,EAAE,MAAM,oCAAoC,CAAA;AAChF,OAAO,EAGH,KAAK,iBAAiB,EAGzB,MAAM,wBAAwB,CAAA;AAG/B,UAAU,WAAW;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,GAAG,EAAE,iBAAiB,CAAA;IACtB,OAAO,IAAI,IAAI,CAAA;CAClB;AAED,UAAU,kBAAkB;IACxB,cAAc,EAAE,MAAM,CAAA;IACtB,WAAW,EAAE,MAAM,CAAA;IACnB,iBAAiB,EAAE,MAAM,MAAM,CAAA;IAC/B,gBAAgB,EAAE,MAAM,CAAA;IACxB,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACtC,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,KAAK,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAsB,iBAAiB,CAAC,EACpC,cAAc,EACd,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EACb,mBAAmB,EACnB,KAAY,EACZ,KAAa,GAChB,EAAE,kBAAkB,GAAG,OAAO,CAAC,WAAW,CAAC,CA+D3C"}
@@ -1,7 +1,7 @@
1
1
  import { type VSCodeWrapper } from 'cody-ai/webviews/utils/VSCodeApi';
2
2
  import type { MessageConnection } from 'vscode-jsonrpc/browser';
3
3
  import type { InitialContext } from '../types';
4
- export interface AgentClient {
4
+ interface AgentClient {
5
5
  rpc: MessageConnection;
6
6
  dispose(): void;
7
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"use-cody-agent.d.ts","sourceRoot":"","sources":["../../../lib/components/use-cody-agent.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAoB,MAAM,kCAAkC,CAAA;AAWvF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAG/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAa9C,MAAM,WAAW,WAAW;IACxB,GAAG,EAAE,iBAAiB,CAAA;IACtB,OAAO,IAAI,IAAI,CAAA;CAClB;AAED,UAAU,oBAAoB;IAC1B,cAAc,EAAE,MAAM,CAAA;IACtB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,iBAAiB,EAAE,MAAM,MAAM,CAAA;IAC/B,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,cAAc,CAAC,EAAE,cAAc,CAAA;IAC/B,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACzC;AAED,UAAU,qBAAqB;IAC3B,MAAM,EAAE,WAAW,GAAG,KAAK,GAAG,IAAI,CAAA;IAClC,SAAS,EAAE,aAAa,GAAG,IAAI,CAAA;CAClC;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,GAAG,qBAAqB,CAiFlF"}
1
+ {"version":3,"file":"use-cody-agent.d.ts","sourceRoot":"","sources":["../../../lib/components/use-cody-agent.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAoB,MAAM,kCAAkC,CAAA;AAWvF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAG/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAa9C,UAAU,WAAW;IACjB,GAAG,EAAE,iBAAiB,CAAA;IACtB,OAAO,IAAI,IAAI,CAAA;CAClB;AAED,UAAU,oBAAoB;IAC1B,cAAc,EAAE,MAAM,CAAA;IACtB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,iBAAiB,EAAE,MAAM,MAAM,CAAA;IAC/B,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,cAAc,CAAC,EAAE,cAAc,CAAA;IAC/B,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACzC;AAED,UAAU,qBAAqB;IAC3B,MAAM,EAAE,WAAW,GAAG,KAAK,GAAG,IAAI,CAAA;IAClC,SAAS,EAAE,aAAa,GAAG,IAAI,CAAA;CAClC;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,GAAG,qBAAqB,CA2DlF"}
@@ -1,5 +1,5 @@
1
- import { u as util, e as exec, o as os, a as env, w as window, p as path, b as workspace, U as Uri, l as logError } from "./agent.worker-7dUx4v7q.mjs";
2
- import { w as wrapInActiveSpan, T as TokenCounterUtils, C as ContextItemSource } from "./browser-0yJ2hV_u.mjs";
1
+ import { u as util, e as exec, o as os, a as env, w as window, p as path, b as workspace, U as Uri, l as logError } from "./agent.worker-CiIPD-tv.mjs";
2
+ import { w as wrapInActiveSpan, T as TokenCounterUtils, C as ContextItemSource } from "./browser-BTzYzFoB.mjs";
3
3
  var define_process_default = { env: {} };
4
4
  const _exec = util.promisify(exec);
5
5
  async function getContextFileFromShell(command) {
package/dist/style.css CHANGED
@@ -205,23 +205,22 @@ html[data-ide=JetBrains] ._template-input-node_14yoh_1 {
205
205
  color: var(--vscode-input-foreground);
206
206
  opacity: 0.5;
207
207
  }
208
- ._outer-container_xb9w0_1 {
208
+ ._outer-container_hbzxh_1 {
209
209
  background-color: var(--vscode-sideBar-background);
210
210
  display: flex;
211
211
  flex-direction: column;
212
212
  box-sizing: border-box;
213
213
  height: 100%;
214
214
  overflow: hidden;
215
- isolation: isolate;
216
215
  }
217
216
 
218
- ._error-container_xb9w0_11 {
217
+ ._error-container_hbzxh_10 {
219
218
  display: flex;
220
219
  flex-direction: column-reverse;
221
220
  gap: 0.5rem;
222
221
  }
223
222
 
224
- ._error_xb9w0_11 {
223
+ ._error_hbzxh_10 {
225
224
  flex-direction: row;
226
225
  display: flex;
227
226
  padding: 1rem;
@@ -233,7 +232,7 @@ html[data-ide=JetBrains] ._template-input-node_14yoh_1 {
233
232
  align-items: baseline;
234
233
  }
235
234
 
236
- ._close-btn_xb9w0_29 {
235
+ ._close-btn_hbzxh_28 {
237
236
  position: absolute;
238
237
  top: 0.65rem;
239
238
  right: 0.25rem;
@@ -939,12 +938,15 @@ button > ._model-title-with-icon_rn0uf_1 ._badge_rn0uf_35 {
939
938
  Root element which only exists to use container query
940
939
  for changing header tabs layout.
941
940
  */
942
- ._tabs-root_u8lyl_10 {
941
+ ._tabs-root_1do08_10 {
943
942
  container-type: inline-size;
944
943
  container-name: tabs-container;
944
+
945
+ isolation: isolate;
946
+ z-index: 1;
945
947
  }
946
948
 
947
- ._tabs-container_u8lyl_15 {
949
+ ._tabs-container_1do08_18 {
948
950
  display: flex;
949
951
  justify-content: space-between;
950
952
  position: sticky;
@@ -953,30 +955,38 @@ button > ._model-title-with-icon_rn0uf_1 ._badge_rn0uf_35 {
953
955
  background-color: var(--vscode-sideBar-background);
954
956
  }
955
957
 
956
- ._tabs_u8lyl_10 {
958
+ ._tabs_1do08_10 {
957
959
  display: flex;
958
960
  flex-shrink: 0;
959
961
  gap: 2px;
960
962
  }
961
963
 
962
- ._tabs_u8lyl_10 > * {
964
+ ._tabs_1do08_10 > * {
963
965
  flex-shrink: 0;
964
966
  }
965
967
 
966
- ._sub-tabs_u8lyl_34 {
968
+ ._sub-tabs_1do08_37 {
967
969
  display: flex;
968
970
  flex-shrink: 0;
969
971
  gap: 8px;
970
972
  }
971
973
 
972
- ._sub-tabs_u8lyl_34 > * {
974
+ ._sub-tabs_1do08_37 > * {
973
975
  flex-shrink: 0;
974
976
  }
975
977
 
976
- ._tab-action-label_u8lyl_44 {
978
+ ._tab-action-label_1do08_47 {
977
979
  display: inline;
978
980
  }
979
981
 
982
+ ._tooltip_1do08_51 {
983
+ /*
984
+ Hide tooltips by default, show them only for state when labels are hidden.
985
+ Important is needed to override standard tailwind styles in tooltip internals
986
+ */
987
+ display: none !important;
988
+ }
989
+
980
990
  /*
981
991
  By default if we have enough space we render tabs and its
982
992
  sub action tabs in one row but if we don't have enough space
@@ -984,17 +994,17 @@ button > ._model-title-with-icon_rn0uf_1 ._badge_rn0uf_35 {
984
994
  layout (one for tab and one below for sub-actions)
985
995
  */
986
996
  @container tabs-container (width < 750px) {
987
- ._tabs-container_u8lyl_15 {
997
+ ._tabs-container_1do08_18 {
988
998
  padding: 0;
989
999
  flex-direction: column;
990
1000
  }
991
1001
 
992
- ._tabs_u8lyl_10 {
1002
+ ._tabs_1do08_10 {
993
1003
  padding: 0 8px;
994
1004
  border-bottom: 1px solid var(--vscode-dropdown-border);
995
1005
  }
996
1006
 
997
- ._sub-tabs_u8lyl_34 {
1007
+ ._sub-tabs_1do08_37 {
998
1008
  padding: 0 8px;
999
1009
  }
1000
1010
  }
@@ -1004,32 +1014,36 @@ button > ._model-title-with-icon_rn0uf_1 ._badge_rn0uf_35 {
1004
1014
  to one row layout for tabs and its sub actions
1005
1015
  */
1006
1016
  @container tabs-container (width < 475px) {
1007
- ._tab-action-label_u8lyl_44 {
1017
+ ._tab-action-label_1do08_47 {
1008
1018
  display: none;
1009
1019
  }
1010
1020
 
1011
- ._tabs-container_u8lyl_15 {
1021
+ ._tabs-container_1do08_18 {
1012
1022
  padding: 0 8px;
1013
1023
  flex-direction: row;
1014
1024
  }
1015
1025
 
1016
- ._tabs_u8lyl_10 {
1026
+ ._tabs_1do08_10 {
1017
1027
  padding: 0;
1018
1028
  border-bottom: none;
1019
1029
  }
1020
1030
 
1021
- ._sub-tabs_u8lyl_34 {
1031
+ ._sub-tabs_1do08_37 {
1022
1032
  padding: 0;
1023
1033
  }
1034
+
1035
+ ._tooltip_1do08_51 {
1036
+ display: block !important;
1037
+ }
1024
1038
  }
1025
1039
 
1026
- ._dialog-overlay_u8lyl_1 {
1040
+ ._dialog-overlay_1do08_1 {
1027
1041
  inset: 0;
1028
1042
  position: fixed;
1029
1043
  background-color: var(--vscode-overlay-background);
1030
1044
  }
1031
1045
 
1032
- ._dialog-content_u8lyl_1 {
1046
+ ._dialog-content_1do08_1 {
1033
1047
  width: 90vw;
1034
1048
  max-width: 450px;
1035
1049
  max-height: 85vh;
@@ -1044,23 +1058,23 @@ button > ._model-title-with-icon_rn0uf_1 ._badge_rn0uf_35 {
1044
1058
  box-shadow: hsl(206 22% 7% / 35%) 0 10px 38px -10px, hsl(206 22% 7% / 20%) 0 10px 20px -15px;
1045
1059
  }
1046
1060
 
1047
- ._dialog-content_u8lyl_1:focus {
1061
+ ._dialog-content_1do08_1:focus {
1048
1062
  outline: none;
1049
1063
  }
1050
1064
 
1051
- ._dialog-title_u8lyl_1 {
1065
+ ._dialog-title_1do08_1 {
1052
1066
  margin: 0;
1053
1067
  font-weight: 500;
1054
1068
  font-size: 17px;
1055
1069
  }
1056
1070
 
1057
- ._dialog-description_u8lyl_1 {
1071
+ ._dialog-description_1do08_1 {
1058
1072
  margin: 10px 0 20px;
1059
1073
  font-size: 15px;
1060
1074
  line-height: 1.5;
1061
1075
  }
1062
1076
 
1063
- ._dialog-footer_u8lyl_1 {
1077
+ ._dialog-footer_1do08_1 {
1064
1078
  margin-top: 1.5rem;
1065
1079
  width: 100%;
1066
1080
  display: flex;
@@ -3625,11 +3639,6 @@ body[data-vscode-theme-kind="vscode-high-contrast"] .high-contrast-dark\:tw-bord
3625
3639
  body[data-vscode-theme-kind="vscode-high-contrast"] .high-contrast-dark\:tw-border-e-transparent {
3626
3640
  border-inline-end-color: transparent;
3627
3641
  }
3628
- @media (min-width: 768px) {
3629
- .md\:tw-hidden {
3630
- display: none;
3631
- }
3632
- }
3633
3642
  .\[\&\:not\(\:last-child\)\]\:tw-border-b:not(:last-child) {
3634
3643
  border-bottom-width: 1px;
3635
3644
  }