@sourcegraph/cody-web 0.18.0 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{agent.worker-BdO3dQ4H.mjs → agent.worker-DPD_k696.mjs} +1845 -2031
- package/dist/agent.worker.js +2 -2
- package/dist/{browser-CSavJDeQ.mjs → browser-Ct2FvU41.mjs} +3240 -3312
- package/dist/{git-log-BrfMXsI3.mjs → git-log-LuZe_Ru4.mjs} +2 -2
- package/dist/{index-BbjC2_76.mjs → index-B3HUdChN.mjs} +2 -2
- package/dist/index.js +162 -133
- package/dist/style.css +33 -32
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as path, U as Uri, s as spawn } from "./agent.worker-
|
|
2
|
-
import { w as wrapInActiveSpan, C as ContextItemSource } from "./browser-
|
|
1
|
+
import { p as path, U as Uri, s as spawn } from "./agent.worker-DPD_k696.mjs";
|
|
2
|
+
import { w as wrapInActiveSpan, C as ContextItemSource } from "./browser-Ct2FvU41.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, a as workspace, u as updateRangeMultipleChanges, c as commands, e as executeEdit, T as TERMINAL_EDIT_STATES, b as ThemeColor, l as languages, C as CodeLens, d as setTutorialUri, f as logSidebarClick, g as Disposable } from "./agent.worker-
|
|
5
|
-
import { t as telemetryRecorder, p as ps, d as dedent } from "./browser-
|
|
4
|
+
import { U as Uri, P as Position, R as Range, w as window, D as DiagnosticSeverity, a as workspace, u as updateRangeMultipleChanges, c as commands, e as executeEdit, T as TERMINAL_EDIT_STATES, b as ThemeColor, l as languages, C as CodeLens, d as setTutorialUri, f as logSidebarClick, g as Disposable } from "./agent.worker-DPD_k696.mjs";
|
|
5
|
+
import { t as telemetryRecorder, p as ps, d as dedent } from "./browser-Ct2FvU41.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, 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
|
|
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 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 an, aL as gs, aM as serializeContextItem, aN as CONTEXT_ITEM_MENTION_NODE_TYPE, aO as contextItemMentionNodeDisplayText, C as ContextItemSource, aP as URI, aQ as is, 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-Ct2FvU41.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: {} };
|
|
@@ -8577,10 +8577,10 @@ const SvgNotion = (props) => /* @__PURE__ */ React.createElement("svg", { width:
|
|
|
8577
8577
|
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
8578
|
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
8579
|
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 = "
|
|
8581
|
-
const description = "
|
|
8582
|
-
const warning = "
|
|
8583
|
-
const row$1 = "
|
|
8580
|
+
const title$1 = "_title_1ibg5_5";
|
|
8581
|
+
const description = "_description_1ibg5_5";
|
|
8582
|
+
const warning = "_warning_1ibg5_5";
|
|
8583
|
+
const row$1 = "_row_1ibg5_11";
|
|
8584
8584
|
const styles$y = {
|
|
8585
8585
|
title: title$1,
|
|
8586
8586
|
description,
|
|
@@ -8645,6 +8645,26 @@ const MentionMenuContextItemContent = ({ query, item: item2 }) => {
|
|
|
8645
8645
|
};
|
|
8646
8646
|
const MentionMenuProviderItemContent = ({ provider }) => {
|
|
8647
8647
|
const Icon2 = iconForProvider[provider.id] ?? Database;
|
|
8648
|
+
if (isRemoteWorkspaceProvider(provider.id)) {
|
|
8649
|
+
return /* @__PURE__ */ jsxs(
|
|
8650
|
+
"a",
|
|
8651
|
+
{
|
|
8652
|
+
href: provider.id,
|
|
8653
|
+
className: clsx$1(styles$y.row, "tw-text-inherit tw-w-full"),
|
|
8654
|
+
title: provider.id,
|
|
8655
|
+
target: "_blank",
|
|
8656
|
+
rel: "noopener noreferrer",
|
|
8657
|
+
children: [
|
|
8658
|
+
/* @__PURE__ */ jsx(Icon2, { size: 16, strokeWidth: 1.75 }),
|
|
8659
|
+
/* @__PURE__ */ jsxs("span", { className: "tw-text-inherit", children: [
|
|
8660
|
+
" ",
|
|
8661
|
+
provider.title
|
|
8662
|
+
] }),
|
|
8663
|
+
/* @__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" })
|
|
8664
|
+
]
|
|
8665
|
+
}
|
|
8666
|
+
);
|
|
8667
|
+
}
|
|
8648
8668
|
return /* @__PURE__ */ jsxs("div", { className: styles$y.row, title: provider.id, children: [
|
|
8649
8669
|
/* @__PURE__ */ jsx(Icon2, { size: 16, strokeWidth: 1.75 }),
|
|
8650
8670
|
provider.title ?? provider.id,
|
|
@@ -8675,7 +8695,9 @@ const iconForProvider = {
|
|
|
8675
8695
|
[REMOTE_REPOSITORY_PROVIDER_URI]: FolderGit,
|
|
8676
8696
|
[REMOTE_FILE_PROVIDER_URI]: File,
|
|
8677
8697
|
[REMOTE_DIRECTORY_PROVIDER_URI]: FolderGit,
|
|
8678
|
-
[WEB_PROVIDER_URI]: Link$1
|
|
8698
|
+
[WEB_PROVIDER_URI]: Link$1,
|
|
8699
|
+
[WORKSPACE_DIRECTORY_PROVIDER_URI]: FolderGit,
|
|
8700
|
+
[WORKSPACE_REPOSITORY_PROVIDER_URI]: FolderGit
|
|
8679
8701
|
};
|
|
8680
8702
|
const contextItemMentionNode = "_context-item-mention-node_1eamp_1";
|
|
8681
8703
|
const icon$1 = "_icon_1eamp_14";
|
|
@@ -9456,6 +9478,9 @@ const MentionMenu = ({
|
|
|
9456
9478
|
if (!provider) {
|
|
9457
9479
|
throw new Error(`No provider found with value ${value2}`);
|
|
9458
9480
|
}
|
|
9481
|
+
if (isRemoteWorkspaceProvider(provider.id)) {
|
|
9482
|
+
return;
|
|
9483
|
+
}
|
|
9459
9484
|
updateMentionMenuParams({ parentItem: provider });
|
|
9460
9485
|
if (params.query !== "") {
|
|
9461
9486
|
setEditorQuery((currentText) => {
|
|
@@ -66240,6 +66265,7 @@ const PromptList = (props) => {
|
|
|
66240
66265
|
const actions2 = showFirstNItems ? sortedActions.slice(0, showFirstNItems) : sortedActions;
|
|
66241
66266
|
const inputPaddingClass = paddingLevels !== "none" ? paddingLevels === "middle" ? "!tw-p-0" : "!tw-p-4" : "";
|
|
66242
66267
|
const itemPaddingClass = paddingLevels !== "none" ? paddingLevels === "middle" ? "!tw-px-6" : "!tw-px-8" : "";
|
|
66268
|
+
const anyPromptFilterActive = !!Object.keys(promptFilters ?? {}).length;
|
|
66243
66269
|
return /* @__PURE__ */ jsx(
|
|
66244
66270
|
Command,
|
|
66245
66271
|
{
|
|
@@ -66262,7 +66288,7 @@ const PromptList = (props) => {
|
|
|
66262
66288
|
}
|
|
66263
66289
|
) }),
|
|
66264
66290
|
!result2 && !error2 && /* @__PURE__ */ jsx(CommandLoading, { className: itemPaddingClass, children: "Loading..." }),
|
|
66265
|
-
!recommendedOnly && result2 &&
|
|
66291
|
+
!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
66292
|
"Your Prompt Library is empty.",
|
|
66267
66293
|
" ",
|
|
66268
66294
|
/* @__PURE__ */ jsx(
|
|
@@ -66558,7 +66584,7 @@ const PromptsFilter = (props) => {
|
|
|
66558
66584
|
const {
|
|
66559
66585
|
config: { serverEndpoint }
|
|
66560
66586
|
} = useConfig();
|
|
66561
|
-
const { value: userId, error:
|
|
66587
|
+
const { value: userId, error: userIdError } = useCurrentUserId();
|
|
66562
66588
|
const selectPromptFilter = (param, origin) => {
|
|
66563
66589
|
setIsPromptTagsOpen(false);
|
|
66564
66590
|
setSelectedFilter(origin);
|
|
@@ -66566,110 +66592,126 @@ const PromptsFilter = (props) => {
|
|
|
66566
66592
|
};
|
|
66567
66593
|
return (
|
|
66568
66594
|
// 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: [
|
|
66595
|
+
/* @__PURE__ */ jsx("div", { className: "tw-pl-8 tw-pt-8", children: /* @__PURE__ */ jsxs(Popover, { open: isPromptTagsOpen, onOpenChange: setIsPromptTagsOpen, children: [
|
|
66596
|
+
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, onClick: () => setIsPromptTagsOpen(!isPromptTagsOpen), children: /* @__PURE__ */ jsx(
|
|
66597
|
+
Button$2,
|
|
66598
|
+
{
|
|
66599
|
+
variant: "secondary",
|
|
66600
|
+
className: "tw-bg-popover tw-border tw-border-border tw-w-48 !tw-justify-start",
|
|
66601
|
+
children: /* @__PURE__ */ jsxs("span", { className: "tw-w-full tw-flex tw-items-center tw-justify-between", children: [
|
|
66602
|
+
/* @__PURE__ */ jsx(
|
|
66603
|
+
FilterContent,
|
|
66604
|
+
{
|
|
66605
|
+
value: selectedFilter.value,
|
|
66606
|
+
nameOverride: selectedFilter.nameOverride
|
|
66607
|
+
}
|
|
66608
|
+
),
|
|
66609
|
+
/* @__PURE__ */ jsx(ChevronDown, { size: 16 })
|
|
66610
|
+
] })
|
|
66611
|
+
}
|
|
66612
|
+
) }),
|
|
66570
66613
|
/* @__PURE__ */ jsx(
|
|
66571
|
-
|
|
66614
|
+
PopoverContent,
|
|
66572
66615
|
{
|
|
66573
|
-
|
|
66574
|
-
|
|
66575
|
-
|
|
66576
|
-
children: /* @__PURE__ */ jsx(
|
|
66577
|
-
|
|
66616
|
+
className: "tw-flex tw-flex-col tw-w-full !tw-p-0",
|
|
66617
|
+
side: "bottom",
|
|
66618
|
+
align: "start",
|
|
66619
|
+
children: /* @__PURE__ */ jsx("div", { className: "tw-w-[225px]", children: /* @__PURE__ */ jsx(
|
|
66620
|
+
Command,
|
|
66578
66621
|
{
|
|
66579
|
-
|
|
66580
|
-
|
|
66581
|
-
|
|
66582
|
-
|
|
66583
|
-
|
|
66622
|
+
loop: true,
|
|
66623
|
+
defaultValue: selectedFilter.value,
|
|
66624
|
+
tabIndex: 0,
|
|
66625
|
+
className: "focus:tw-outline-none",
|
|
66626
|
+
children: /* @__PURE__ */ jsxs(CommandList, { children: [
|
|
66627
|
+
/* @__PURE__ */ jsx(CommandGroup, { children: /* @__PURE__ */ jsx(
|
|
66628
|
+
CommandLink,
|
|
66584
66629
|
{
|
|
66585
|
-
|
|
66586
|
-
|
|
66630
|
+
href: `${serverEndpoint}prompts/new`,
|
|
66631
|
+
target: "_blank",
|
|
66632
|
+
className: "tw-w-full tw-no-underline tw-text-inherit hover:!tw-bg-transparent",
|
|
66633
|
+
rel: "noreferrer",
|
|
66634
|
+
children: /* @__PURE__ */ jsxs(Button$2, { variant: "outline", className: "tw-w-full", children: [
|
|
66635
|
+
/* @__PURE__ */ jsx(Plus, { size: 16 }),
|
|
66636
|
+
" Create new Prompt"
|
|
66637
|
+
] })
|
|
66587
66638
|
}
|
|
66588
|
-
),
|
|
66589
|
-
/* @__PURE__ */
|
|
66639
|
+
) }),
|
|
66640
|
+
/* @__PURE__ */ jsxs(CommandGroup, { className: "tw-w-full", children: [
|
|
66641
|
+
/* @__PURE__ */ jsx(
|
|
66642
|
+
CommandItem,
|
|
66643
|
+
{
|
|
66644
|
+
value: "all",
|
|
66645
|
+
onSelect: () => selectPromptFilter({}, { value: "all" }),
|
|
66646
|
+
children: /* @__PURE__ */ jsx(FilterContent, { value: "all" })
|
|
66647
|
+
}
|
|
66648
|
+
),
|
|
66649
|
+
!userIdError && typeof userId === "string" && /* @__PURE__ */ jsx(
|
|
66650
|
+
CommandItem,
|
|
66651
|
+
{
|
|
66652
|
+
value: "you",
|
|
66653
|
+
onSelect: () => selectPromptFilter({ owner: userId }, { value: "you" }),
|
|
66654
|
+
children: /* @__PURE__ */ jsx(FilterContent, { value: "you" })
|
|
66655
|
+
}
|
|
66656
|
+
)
|
|
66657
|
+
] }),
|
|
66658
|
+
/* @__PURE__ */ jsxs(CommandGroup, { className: "tw-w-full", children: [
|
|
66659
|
+
/* @__PURE__ */ jsx(
|
|
66660
|
+
CommandItem,
|
|
66661
|
+
{
|
|
66662
|
+
value: "promoted",
|
|
66663
|
+
onSelect: () => selectPromptFilter({ promoted: true }, { value: "promoted" }),
|
|
66664
|
+
children: /* @__PURE__ */ jsx(FilterContent, { value: "promoted" })
|
|
66665
|
+
}
|
|
66666
|
+
),
|
|
66667
|
+
/* @__PURE__ */ jsx(
|
|
66668
|
+
CommandItem,
|
|
66669
|
+
{
|
|
66670
|
+
value: "core",
|
|
66671
|
+
onSelect: () => selectPromptFilter({ core: true }, { value: "core" }),
|
|
66672
|
+
children: /* @__PURE__ */ jsx(FilterContent, { value: "core" })
|
|
66673
|
+
}
|
|
66674
|
+
)
|
|
66675
|
+
] }),
|
|
66676
|
+
!!(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(
|
|
66677
|
+
CommandItem,
|
|
66678
|
+
{
|
|
66679
|
+
value: `tag:${tag.id}`,
|
|
66680
|
+
onSelect: () => selectPromptFilter(
|
|
66681
|
+
{ tags: [tag.id] },
|
|
66682
|
+
{
|
|
66683
|
+
value: `tag:${tag.id}`,
|
|
66684
|
+
nameOverride: tag.name
|
|
66685
|
+
}
|
|
66686
|
+
),
|
|
66687
|
+
children: /* @__PURE__ */ jsx(
|
|
66688
|
+
FilterContent,
|
|
66689
|
+
{
|
|
66690
|
+
value: tag.id,
|
|
66691
|
+
nameOverride: tag.name
|
|
66692
|
+
}
|
|
66693
|
+
)
|
|
66694
|
+
},
|
|
66695
|
+
tag.id
|
|
66696
|
+
)) }) }),
|
|
66697
|
+
/* @__PURE__ */ jsx(CommandGroup, { className: "tw-w-full", children: /* @__PURE__ */ jsxs(
|
|
66698
|
+
CommandLink,
|
|
66699
|
+
{
|
|
66700
|
+
href: `${serverEndpoint}prompts`,
|
|
66701
|
+
target: "_blank",
|
|
66702
|
+
rel: "noreferrer",
|
|
66703
|
+
className: "tw-flex",
|
|
66704
|
+
children: [
|
|
66705
|
+
/* @__PURE__ */ jsx("span", { className: "tw-flex-grow", children: "Explore Prompt Library" }),
|
|
66706
|
+
/* @__PURE__ */ jsx(ExternalLink, { size: 16 })
|
|
66707
|
+
]
|
|
66708
|
+
}
|
|
66709
|
+
) })
|
|
66590
66710
|
] })
|
|
66591
66711
|
}
|
|
66592
|
-
)
|
|
66712
|
+
) })
|
|
66593
66713
|
}
|
|
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
|
-
] }) })
|
|
66714
|
+
)
|
|
66673
66715
|
] }) })
|
|
66674
66716
|
);
|
|
66675
66717
|
};
|
|
@@ -66691,19 +66733,6 @@ const iconForFilter = {
|
|
|
66691
66733
|
name: "Core"
|
|
66692
66734
|
}
|
|
66693
66735
|
};
|
|
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
66736
|
const FilterContent = (props) => {
|
|
66708
66737
|
const filter2 = iconForFilter[props.value];
|
|
66709
66738
|
const Icon2 = (filter2 == null ? void 0 : filter2.icon) ?? Tag$1;
|
|
@@ -66983,7 +67012,7 @@ const styles$8 = {
|
|
|
66983
67012
|
const PromptsTab = ({ IDE, setView, isPromptsV2Enabled }) => {
|
|
66984
67013
|
const runAction = useActionSelect();
|
|
66985
67014
|
const [promptsFilter, setPromptsFilter] = useState({});
|
|
66986
|
-
return /* @__PURE__ */ jsxs("div", { className: "tw-overflow-auto tw-h-full tw-flex tw-flex-col
|
|
67015
|
+
return /* @__PURE__ */ jsxs("div", { className: "tw-overflow-auto tw-h-full tw-flex tw-flex-col", children: [
|
|
66987
67016
|
isPromptsV2Enabled && IDE !== CodyIDE.Web && /* @__PURE__ */ jsx(PromptMigrationWidget, { dismissible: false, className: styles$8.promptMigrationWidget }),
|
|
66988
67017
|
/* @__PURE__ */ jsx(PromptsFilter, { promptFilters: promptsFilter, setPromptFilters: setPromptsFilter }),
|
|
66989
67018
|
/* @__PURE__ */ jsx(
|
|
@@ -68920,17 +68949,17 @@ async function downloadChatHistory(extensionAPI) {
|
|
|
68920
68949
|
a2.target = "_blank";
|
|
68921
68950
|
a2.click();
|
|
68922
68951
|
}
|
|
68923
|
-
const tabsRoot = "_tabs-
|
|
68924
|
-
const tabsContainer = "_tabs-
|
|
68925
|
-
const tabs = "
|
|
68926
|
-
const subTabs = "_sub-
|
|
68927
|
-
const tabActionLabel = "_tab-action-
|
|
68928
|
-
const tabsRootCodyWeb = "_tabs-root--cody-
|
|
68929
|
-
const dialogOverlay = "_dialog-
|
|
68930
|
-
const dialogContent = "_dialog-
|
|
68931
|
-
const dialogTitle = "_dialog-
|
|
68932
|
-
const dialogDescription = "_dialog-
|
|
68933
|
-
const dialogFooter = "_dialog-
|
|
68952
|
+
const tabsRoot = "_tabs-root_11pag_10";
|
|
68953
|
+
const tabsContainer = "_tabs-container_11pag_17";
|
|
68954
|
+
const tabs = "_tabs_11pag_10";
|
|
68955
|
+
const subTabs = "_sub-tabs_11pag_40";
|
|
68956
|
+
const tabActionLabel = "_tab-action-label_11pag_56";
|
|
68957
|
+
const tabsRootCodyWeb = "_tabs-root--cody-web_11pag_68";
|
|
68958
|
+
const dialogOverlay = "_dialog-overlay_11pag_1";
|
|
68959
|
+
const dialogContent = "_dialog-content_11pag_1";
|
|
68960
|
+
const dialogTitle = "_dialog-title_11pag_1";
|
|
68961
|
+
const dialogDescription = "_dialog-description_11pag_1";
|
|
68962
|
+
const dialogFooter = "_dialog-footer_11pag_1";
|
|
68934
68963
|
const styles$5 = {
|
|
68935
68964
|
tabsRoot,
|
|
68936
68965
|
tabsContainer,
|
|
@@ -70396,7 +70425,7 @@ const TranscriptInteraction = memo((props) => {
|
|
|
70396
70425
|
const onHumanMessageSubmit = useCallback(
|
|
70397
70426
|
(intent) => {
|
|
70398
70427
|
if (humanMessage.isUnsentFollowup) {
|
|
70399
|
-
onFollowupSubmit(intent);
|
|
70428
|
+
return onFollowupSubmit(intent);
|
|
70400
70429
|
}
|
|
70401
70430
|
onEditSubmit(intent);
|
|
70402
70431
|
},
|
|
@@ -70948,7 +70977,7 @@ const Notices = ({ user, isTeamsUpgradeCtaEnabled, instanceNotices }) => {
|
|
|
70948
70977
|
id: user.isCodyProUser ? "DeepCodyDotCom" : "DeepCodyEnterprise",
|
|
70949
70978
|
variant: "default",
|
|
70950
70979
|
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
|
|
70980
|
+
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
70981
|
onDismiss: () => dismissNotice(user.isCodyProUser ? "DeepCodyDotCom" : "DeepCodyEnterprise"),
|
|
70953
70982
|
info: "Usage limits apply during the experimental phase.",
|
|
70954
70983
|
footer: !isDeepCodyShellContextSupported ? "Contact admins to enable Command Execution" : "",
|
|
@@ -70975,7 +71004,7 @@ const Notices = ({ user, isTeamsUpgradeCtaEnabled, instanceNotices }) => {
|
|
|
70975
71004
|
{
|
|
70976
71005
|
// TODO: Update to live link https://linear.app/sourcegraph/issue/CORE-535/cody-clients-migrate-ctas-to-live-links
|
|
70977
71006
|
label: "Upgrade to Teams",
|
|
70978
|
-
href:
|
|
71007
|
+
href: DOTCOM_WORKSPACE_UPGRADE_URL.href,
|
|
70979
71008
|
variant: "default",
|
|
70980
71009
|
icon: /* @__PURE__ */ jsx(UsersRound, { size: 14 }),
|
|
70981
71010
|
iconPosition: "start"
|
|
@@ -70983,7 +71012,7 @@ const Notices = ({ user, isTeamsUpgradeCtaEnabled, instanceNotices }) => {
|
|
|
70983
71012
|
{
|
|
70984
71013
|
// TODO: Update to live link https://linear.app/sourcegraph/issue/CORE-535/cody-clients-migrate-ctas-to-live-links
|
|
70985
71014
|
label: "Learn More",
|
|
70986
|
-
href:
|
|
71015
|
+
href: DOTCOM_WORKSPACE_LEARN_MORE_URL.href,
|
|
70987
71016
|
variant: "ghost",
|
|
70988
71017
|
icon: /* @__PURE__ */ jsx(ExternalLink, { size: 14 }),
|
|
70989
71018
|
iconPosition: "end"
|