@aiderdesk/aiderdesk 0.70.0 → 0.71.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/README.md +49 -0
- package/out/cli.js +1006 -1
- package/out/renderer/assets/{AgentSettings-4fCr6MRo.js → AgentSettings-BKSogFrU.js} +133 -125
- package/out/renderer/assets/{InfoIcon-Cend8bQ6.js → InfoIcon-XbMgPv1i.js} +1 -1
- package/out/renderer/assets/{Onboarding-SfOrsd7I.js → Onboarding-DsxeAj-M.js} +4 -4
- package/out/renderer/assets/{ProviderHeader-IIBa8Q98.js → ProviderHeader-CQHU1_fp.js} +384 -165
- package/out/renderer/assets/{SettingsPage-1PPq3lwt.js → SettingsPage-jGXWkGLq.js} +643 -265
- package/out/renderer/assets/{UsageDashboard-C73v7_7A.js → UsageDashboard-BcWDkudQ.js} +3 -3
- package/out/renderer/assets/{arc-DooaZ_2W.js → arc-CbTCDvhP.js} +1 -1
- package/out/renderer/assets/{architectureDiagram-3BPJPVTR-BZRfdU_l.js → architectureDiagram-3BPJPVTR-BYGjkH2o.js} +3 -3
- package/out/renderer/assets/{blockDiagram-GPEHLZMM-GVLrld7f.js → blockDiagram-GPEHLZMM-BNslNypY.js} +4 -4
- package/out/renderer/assets/{c4Diagram-AAUBKEIU-CuLHxnUp.js → c4Diagram-AAUBKEIU-BOUV-4Hf.js} +2 -2
- package/out/renderer/assets/{channel-CBp4QC42.js → channel-gTXtcW6n.js} +1 -1
- package/out/renderer/assets/{chunk-2J33WTMH-CLGSY5ry.js → chunk-2J33WTMH-cVAo2nRo.js} +1 -1
- package/out/renderer/assets/{chunk-4BX2VUAB-DfOAmq0y.js → chunk-4BX2VUAB-QUppBCep.js} +1 -1
- package/out/renderer/assets/{chunk-55IACEB6-CjDMk8wF.js → chunk-55IACEB6-B7ATOpEx.js} +1 -1
- package/out/renderer/assets/{chunk-727SXJPM-4GHP5or6.js → chunk-727SXJPM-DNHjk-uw.js} +5 -5
- package/out/renderer/assets/{chunk-AQP2D5EJ-B8ex3L6d.js → chunk-AQP2D5EJ-C_nuud1y.js} +3 -3
- package/out/renderer/assets/{chunk-FMBD7UC4-DXVKqz45.js → chunk-FMBD7UC4-DoAO6UdZ.js} +1 -1
- package/out/renderer/assets/{chunk-ND2GUHAM-CJf331B5.js → chunk-ND2GUHAM-hRnym-e6.js} +1 -1
- package/out/renderer/assets/{chunk-QZHKN3VN-CmRmlYwi.js → chunk-QZHKN3VN-BkTqSMpi.js} +1 -1
- package/out/renderer/assets/{classDiagram-4FO5ZUOK-BB0WWhct.js → classDiagram-4FO5ZUOK-097_YN8Y.js} +6 -6
- package/out/renderer/assets/{classDiagram-v2-Q7XG4LA2-BB0WWhct.js → classDiagram-v2-Q7XG4LA2-097_YN8Y.js} +6 -6
- package/out/renderer/assets/{cose-bilkent-S5V4N54A-C1ovVUkK.js → cose-bilkent-S5V4N54A-CU24fSZY.js} +1 -1
- package/out/renderer/assets/{dagre-BM42HDAG-BN2vkdYj.js → dagre-BM42HDAG-CXQk6wIx.js} +3 -3
- package/out/renderer/assets/{diagram-2AECGRRQ-Gmur2BYD.js → diagram-2AECGRRQ-cp5zubxu.js} +3 -3
- package/out/renderer/assets/{diagram-5GNKFQAL-CO-0qbfq.js → diagram-5GNKFQAL-Dz1liaVJ.js} +4 -4
- package/out/renderer/assets/{diagram-KO2AKTUF-B0BourUo.js → diagram-KO2AKTUF-C_a_DDR7.js} +3 -3
- package/out/renderer/assets/{diagram-LMA3HP47-CZSemlgR.js → diagram-LMA3HP47-DMzt3Wms.js} +3 -3
- package/out/renderer/assets/{diagram-OG6HWLK6-DIg_VSi2.js → diagram-OG6HWLK6-DXgo41ZN.js} +4 -4
- package/out/renderer/assets/{erDiagram-TEJ5UH35-CeDB_1TN.js → erDiagram-TEJ5UH35-Duy8-ZVE.js} +4 -4
- package/out/renderer/assets/{flowDiagram-I6XJVG4X-CAYyZ6xk.js → flowDiagram-I6XJVG4X-C79uBv3j.js} +6 -6
- package/out/renderer/assets/{ganttDiagram-6RSMTGT7-28qx3HO3.js → ganttDiagram-6RSMTGT7-COUQHYqH.js} +3 -3
- package/out/renderer/assets/{gitGraphDiagram-PVQCEYII-C0C5PVgG.js → gitGraphDiagram-PVQCEYII-D3-KSp5g.js} +4 -4
- package/out/renderer/assets/{graph-BmyvWy9U.js → graph-CojOaclU.js} +1 -1
- package/out/renderer/assets/{index-CCixlVbO.js → index-BDc7WeA_.js} +1 -1
- package/out/renderer/assets/{index-CqkLi8Rn.js → index-BX1dnn54.js} +1 -1
- package/out/renderer/assets/{index-BkEUNx2M.js → index-BxH3Vzns.js} +129 -30
- package/out/renderer/assets/{index-CleisQX7.js → index-CZVPwEh7.js} +1 -1
- package/out/renderer/assets/{index-DHgg9rnw.js → index-CcbWMGtO.js} +1 -1
- package/out/renderer/assets/{index-LwoRwQcK.js → index-CoN3I29h.js} +1 -1
- package/out/renderer/assets/{index-D4QsfuBU.css → index-DJwDiyPe.css} +8 -0
- package/out/renderer/assets/{index-CjWyE7Qc.js → index-DqOJFqtI.js} +1 -1
- package/out/renderer/assets/{index-DDyjc4hl.js → index-DqOyb6kJ.js} +1 -1
- package/out/renderer/assets/{index-DiXCQ0pX.js → index-LigRSjJQ.js} +2274 -1492
- package/out/renderer/assets/{index-D1hWSFOH.js → index-uk-xw9ke.js} +1 -1
- package/out/renderer/assets/{infoDiagram-5YYISTIA-BR2qewYU.js → infoDiagram-5YYISTIA-Dhu3XDyU.js} +2 -2
- package/out/renderer/assets/{ishikawaDiagram-YF4QCWOH-mBtVTtfu.js → ishikawaDiagram-YF4QCWOH-Zv844Inp.js} +1 -1
- package/out/renderer/assets/{journeyDiagram-JHISSGLW-BLwLxSRJ.js → journeyDiagram-JHISSGLW-CiEy0k__.js} +4 -4
- package/out/renderer/assets/{jsx-dev-runtime-C3x5nPQV.js → jsx-dev-runtime-BblfdcBq.js} +1 -1
- package/out/renderer/assets/{kanban-definition-UN3LZRKU-DEQMBIes.js → kanban-definition-UN3LZRKU-Bg7Tn0_t.js} +2 -2
- package/out/renderer/assets/{layout-COZ2dLJC.js → layout-C7gScUZ3.js} +2 -2
- package/out/renderer/assets/{linear-BwuiC9BD.js → linear-C8mfmsRG.js} +1 -1
- package/out/renderer/assets/{mindmap-definition-RKZ34NQL-BEdOr2LN.js → mindmap-definition-RKZ34NQL-CT41c9xA.js} +3 -3
- package/out/renderer/assets/{pieDiagram-4H26LBE5-C2CIjhWa.js → pieDiagram-4H26LBE5-4MIz5Tk3.js} +4 -4
- package/out/renderer/assets/{quadrantDiagram-W4KKPZXB-ByG1Fnbm.js → quadrantDiagram-W4KKPZXB-srrdZ4mO.js} +2 -2
- package/out/renderer/assets/{requirementDiagram-4Y6WPE33-CPNEbV2R.js → requirementDiagram-4Y6WPE33-hCfEAv72.js} +3 -3
- package/out/renderer/assets/{sankeyDiagram-5OEKKPKP-DseN3BYS.js → sankeyDiagram-5OEKKPKP-D3Dmoahf.js} +1 -1
- package/out/renderer/assets/{sequenceDiagram-3UESZ5HK-DGbPycPW.js → sequenceDiagram-3UESZ5HK-B_R1OT73.js} +3 -3
- package/out/renderer/assets/{stateDiagram-AJRCARHV-I_wGtDx-.js → stateDiagram-AJRCARHV-T81AxWaT.js} +6 -6
- package/out/renderer/assets/{stateDiagram-v2-BHNVJYJU-MVwIUdrA.js → stateDiagram-v2-BHNVJYJU-DotM3iTY.js} +4 -4
- package/out/renderer/assets/{time-DKSwLtIL.js → time-NQi4RUKr.js} +1 -1
- package/out/renderer/assets/{timeline-definition-PNZ67QCA-0o1eLzXF.js → timeline-definition-PNZ67QCA-CuIJOcqs.js} +2 -2
- package/out/renderer/assets/{vennDiagram-CIIHVFJN-BbPtgu5r.js → vennDiagram-CIIHVFJN-BP9XceqR.js} +1 -1
- package/out/renderer/assets/{wardley-L42UT6IY-C6O9NaAx.js → wardley-L42UT6IY-Cs8sx4Yc.js} +1 -1
- package/out/renderer/assets/{wardleyDiagram-YWT4CUSO-C0NB17Hf.js → wardleyDiagram-YWT4CUSO-BleVwqnB.js} +3 -3
- package/out/renderer/assets/{xychartDiagram-2RQKCTM6-CM1NB5k6.js → xychartDiagram-2RQKCTM6-CoEiSbj_.js} +2 -2
- package/out/renderer/index.html +2 -2
- package/out/runner.js +613 -287
- package/package.json +20 -20
- package/scripts/generate-package.mjs +1 -2
- package/scripts/publish-next.mjs +22 -0
- package/out/renderer/assets/gemini-cli-BKI4k4GP.png +0 -0
- package/out/resources/mcp-server/aider-desk-mcp-server.js +0 -39437
- package/patches/ai-sdk-provider-gemini-cli+1.5.1.patch +0 -373
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as compilerRuntimeExports, b2 as useTranslation, b_ as FONTS, b$ as THEMES, c0 as DiffViewMode, c1 as MessageViewMode, c2 as FileWatchMode, j as jsxRuntimeExports, c3 as ProjectStartMode, c4 as RadioButton, c5 as SuggestionMode, c6 as Slider, c7 as Checkbox, c8 as Select, c9 as Input, ca as useVersions, cb as useApi, b7 as Button, cc as FaFolderOpen, cd as B, ce as TbLogs, cf as FaSyncAlt, b0 as reactExports, cg as Chip, a as clsx, I as IconButton, ch as BiCopy, ci as
|
|
2
|
-
import { L as LanguageSelector, S as Section, g as getPathBasename, A as AgentSettings, a as AiderSettings } from "./AgentSettings-
|
|
3
|
-
import { I as InfoIcon } from "./InfoIcon-
|
|
1
|
+
import { c as compilerRuntimeExports, b2 as useTranslation, b_ as FONTS, b$ as THEMES, c0 as DiffViewMode, c1 as MessageViewMode, c2 as FileWatchMode, j as jsxRuntimeExports, c3 as ProjectStartMode, c4 as RadioButton, c5 as SuggestionMode, c6 as Slider, c7 as Checkbox, c8 as Select, c9 as Input, ca as useVersions, cb as useApi, b7 as Button, cc as FaFolderOpen, cd as B, ce as TbLogs, cf as FaSyncAlt, b0 as reactExports, cg as Chip, a as clsx, I as IconButton, ch as BiCopy, ci as useMount, cj as MemoryEmbeddingProgressPhase, ck as CodeInline, cl as FaTrash, cm as ConfirmDialog, a$ as useModelProviders, cn as useLocalStorage, co as DEFAULT_VOICE_SYSTEM_INSTRUCTIONS, cp as OpenAiVoiceModel, cq as GeminiVoiceModel, cr as TextArea, cs as isOpenAiProvider, ct as isGeminiProvider, cu as FaEdit, cv as FaTimes, cw as FaPlus, cx as useRecordHotkeys, cy as DEFAULT_HOTKEY_CONFIG, cz as ModelSelectorWrapper, cA as ContextCompactionType, cB as getProviderModelId, cC as Tooltip, cD as ItemSelector, cE as AiFillFolderOpen, cF as IoGitBranch, cG as useExtensions, cH as useReactIcons, cI as showSuccessNotification, ba as showErrorNotification, cJ as LoadingOverlay, cK as StringToReactComponent, cL as useOS, cM as FaCog, cN as Toggle, cO as FaSync, cP as FaDownload, cQ as FaChevronDown, cR as Markdown, cS as MARKDOWN_COMPONENTS, cT as REMARK_PLUGINS, cU as FaChevronLeft, cV as FaChevronRight, cW as FaSearch, cX as FaServer, cY as MdTerminal, cZ as FaRobot, c_ as LuClipboardList, c$ as FaBrain, d0 as FaMicrophone, d1 as FaKeyboard, d2 as FaPuzzlePiece, F as FaInfoCircle, b4 as useSettingsStore, b5 as useSaveSettings, b6 as useAgents, bb as lodashExports, d3 as setTheme, d4 as setFont, d5 as setFontSize, d6 as useHotkeys, d7 as ModalOverlayLayout } from "./index-LigRSjJQ.js";
|
|
2
|
+
import { L as LanguageSelector, S as Section, g as getPathBasename, A as AgentSettings, a as AiderSettings } from "./AgentSettings-BKSogFrU.js";
|
|
3
|
+
import { I as InfoIcon } from "./InfoIcon-XbMgPv1i.js";
|
|
4
4
|
const ZOOM_OPTIONS = [{
|
|
5
5
|
label: "80%",
|
|
6
6
|
value: "0.8"
|
|
@@ -85,7 +85,7 @@ const GeneralSettings = (t0) => {
|
|
|
85
85
|
style: {
|
|
86
86
|
fontFamily: font
|
|
87
87
|
}
|
|
88
|
-
})).sort(_temp$
|
|
88
|
+
})).sort(_temp$4);
|
|
89
89
|
$[0] = t;
|
|
90
90
|
$[1] = t1;
|
|
91
91
|
} else {
|
|
@@ -97,7 +97,7 @@ const GeneralSettings = (t0) => {
|
|
|
97
97
|
t2 = THEMES.map((theme) => ({
|
|
98
98
|
label: t(`settings.themeOptions.${theme}`, theme),
|
|
99
99
|
value: theme
|
|
100
|
-
})).sort(_temp2$
|
|
100
|
+
})).sort(_temp2$4);
|
|
101
101
|
$[2] = t;
|
|
102
102
|
$[3] = t2;
|
|
103
103
|
} else {
|
|
@@ -1550,10 +1550,10 @@ const GeneralSettings = (t0) => {
|
|
|
1550
1550
|
}
|
|
1551
1551
|
return t156;
|
|
1552
1552
|
};
|
|
1553
|
-
function _temp$
|
|
1553
|
+
function _temp$4(a, b) {
|
|
1554
1554
|
return a.label.localeCompare(b.label);
|
|
1555
1555
|
}
|
|
1556
|
-
function _temp2$
|
|
1556
|
+
function _temp2$4(a_0, b_0) {
|
|
1557
1557
|
return a_0.label.localeCompare(b_0.label);
|
|
1558
1558
|
}
|
|
1559
1559
|
const AboutSettings = (t0) => {
|
|
@@ -2136,6 +2136,15 @@ const NetworkSettings = ({
|
|
|
2136
2136
|
}
|
|
2137
2137
|
});
|
|
2138
2138
|
};
|
|
2139
|
+
const handleNoProxyChange = (e_0) => {
|
|
2140
|
+
setSettings({
|
|
2141
|
+
...settings,
|
|
2142
|
+
proxy: {
|
|
2143
|
+
...settings.proxy,
|
|
2144
|
+
noProxy: e_0.target.value
|
|
2145
|
+
}
|
|
2146
|
+
});
|
|
2147
|
+
};
|
|
2139
2148
|
reactExports.useEffect(() => {
|
|
2140
2149
|
const loadTunnelStatus = async () => {
|
|
2141
2150
|
if (isServerRunning) {
|
|
@@ -2195,26 +2204,26 @@ const NetworkSettings = ({
|
|
|
2195
2204
|
}
|
|
2196
2205
|
});
|
|
2197
2206
|
};
|
|
2198
|
-
const handleUsernameChange = (
|
|
2207
|
+
const handleUsernameChange = (e_1) => {
|
|
2199
2208
|
setSettings({
|
|
2200
2209
|
...settings,
|
|
2201
2210
|
server: {
|
|
2202
2211
|
...settings.server,
|
|
2203
2212
|
basicAuth: {
|
|
2204
2213
|
...settings.server.basicAuth,
|
|
2205
|
-
username:
|
|
2214
|
+
username: e_1.target.value
|
|
2206
2215
|
}
|
|
2207
2216
|
}
|
|
2208
2217
|
});
|
|
2209
2218
|
};
|
|
2210
|
-
const handlePasswordChange = (
|
|
2219
|
+
const handlePasswordChange = (e_2) => {
|
|
2211
2220
|
setSettings({
|
|
2212
2221
|
...settings,
|
|
2213
2222
|
server: {
|
|
2214
2223
|
...settings.server,
|
|
2215
2224
|
basicAuth: {
|
|
2216
2225
|
...settings.server.basicAuth,
|
|
2217
|
-
password:
|
|
2226
|
+
password: e_2.target.value
|
|
2218
2227
|
}
|
|
2219
2228
|
}
|
|
2220
2229
|
});
|
|
@@ -2304,7 +2313,13 @@ const NetworkSettings = ({
|
|
|
2304
2313
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Checkbox, { label: t("settings.network.enableProxy"), checked: settings.proxy.enabled, onChange: handleProxyEnabledChange }),
|
|
2305
2314
|
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-text-muted mt-2", children: t("settings.network.enableProxyDescription") })
|
|
2306
2315
|
] }),
|
|
2307
|
-
settings.proxy.enabled && /* @__PURE__ */ jsxRuntimeExports.
|
|
2316
|
+
settings.proxy.enabled && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
2317
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Input, { label: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs", children: t("settings.network.proxyUrl") }), value: settings.proxy.url, onChange: handleProxyUrlChange, type: "text", placeholder: t("settings.network.proxyUrlPlaceholder") }),
|
|
2318
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Input, { label: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center", children: [
|
|
2319
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs", children: t("settings.network.noProxy") }),
|
|
2320
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(InfoIcon, { tooltip: t("settings.network.noProxyDescription") })
|
|
2321
|
+
] }), value: settings.proxy.noProxy, onChange: handleNoProxyChange, type: "text", placeholder: t("settings.network.noProxyPlaceholder") })
|
|
2322
|
+
] })
|
|
2308
2323
|
] }) });
|
|
2309
2324
|
const renderCorsSection = () => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-2", children: [
|
|
2310
2325
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center", children: [
|
|
@@ -2392,10 +2407,12 @@ const LOCAL_MODELS = [{
|
|
|
2392
2407
|
label: "BGE-Base (Better, ~400MB)",
|
|
2393
2408
|
description: "Better quality for complex tasks"
|
|
2394
2409
|
}];
|
|
2395
|
-
const MemorySettings = ({
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2410
|
+
const MemorySettings = (t0) => {
|
|
2411
|
+
const $ = compilerRuntimeExports.c(115);
|
|
2412
|
+
const {
|
|
2413
|
+
settings,
|
|
2414
|
+
setSettings
|
|
2415
|
+
} = t0;
|
|
2399
2416
|
const {
|
|
2400
2417
|
t
|
|
2401
2418
|
} = useTranslation();
|
|
@@ -2405,186 +2422,547 @@ const MemorySettings = ({
|
|
|
2405
2422
|
const [memoryToDelete, setMemoryToDelete] = reactExports.useState(null);
|
|
2406
2423
|
const [isDeleteProjectDialogOpen, setIsDeleteProjectDialogOpen] = reactExports.useState(false);
|
|
2407
2424
|
const [embeddingProgress, setEmbeddingProgress] = reactExports.useState(null);
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2425
|
+
let t1;
|
|
2426
|
+
if ($[0] !== api) {
|
|
2427
|
+
t1 = async () => {
|
|
2428
|
+
const all = await api.listAllMemories();
|
|
2429
|
+
setMemories(all);
|
|
2430
|
+
};
|
|
2431
|
+
$[0] = api;
|
|
2432
|
+
$[1] = t1;
|
|
2433
|
+
} else {
|
|
2434
|
+
t1 = $[1];
|
|
2435
|
+
}
|
|
2436
|
+
const loadMemories = t1;
|
|
2437
|
+
let t2;
|
|
2438
|
+
if ($[2] !== loadMemories) {
|
|
2439
|
+
t2 = () => {
|
|
2440
|
+
loadMemories();
|
|
2441
|
+
};
|
|
2442
|
+
$[2] = loadMemories;
|
|
2443
|
+
$[3] = t2;
|
|
2444
|
+
} else {
|
|
2445
|
+
t2 = $[3];
|
|
2446
|
+
}
|
|
2447
|
+
useMount(t2);
|
|
2448
|
+
let t3;
|
|
2449
|
+
if ($[4] !== api) {
|
|
2450
|
+
t3 = () => {
|
|
2451
|
+
let timeoutId = null;
|
|
2452
|
+
let isCancelled = false;
|
|
2453
|
+
const poll = async () => {
|
|
2454
|
+
try {
|
|
2455
|
+
const progress = await api.getMemoryEmbeddingProgress();
|
|
2456
|
+
if (isCancelled) {
|
|
2457
|
+
return;
|
|
2458
|
+
}
|
|
2459
|
+
setEmbeddingProgress(progress);
|
|
2460
|
+
if (!progress.finished) {
|
|
2461
|
+
timeoutId = window.setTimeout(() => {
|
|
2462
|
+
poll();
|
|
2463
|
+
}, 1e3);
|
|
2464
|
+
}
|
|
2465
|
+
} catch {
|
|
2466
|
+
if (isCancelled) {
|
|
2467
|
+
return;
|
|
2468
|
+
}
|
|
2426
2469
|
timeoutId = window.setTimeout(() => {
|
|
2427
|
-
|
|
2428
|
-
},
|
|
2470
|
+
poll();
|
|
2471
|
+
}, 2e3);
|
|
2429
2472
|
}
|
|
2430
|
-
}
|
|
2431
|
-
|
|
2432
|
-
|
|
2473
|
+
};
|
|
2474
|
+
poll();
|
|
2475
|
+
return () => {
|
|
2476
|
+
isCancelled = true;
|
|
2477
|
+
if (timeoutId) {
|
|
2478
|
+
window.clearTimeout(timeoutId);
|
|
2433
2479
|
}
|
|
2434
|
-
|
|
2435
|
-
void poll();
|
|
2436
|
-
}, 2e3);
|
|
2437
|
-
}
|
|
2438
|
-
};
|
|
2439
|
-
void poll();
|
|
2440
|
-
return () => {
|
|
2441
|
-
isCancelled = true;
|
|
2442
|
-
if (timeoutId) {
|
|
2443
|
-
window.clearTimeout(timeoutId);
|
|
2444
|
-
}
|
|
2480
|
+
};
|
|
2445
2481
|
};
|
|
2446
|
-
|
|
2447
|
-
|
|
2482
|
+
$[4] = api;
|
|
2483
|
+
$[5] = t3;
|
|
2484
|
+
} else {
|
|
2485
|
+
t3 = $[5];
|
|
2486
|
+
}
|
|
2487
|
+
let t4;
|
|
2488
|
+
if ($[6] !== api || $[7] !== settings.memory.model || $[8] !== settings.memory.provider) {
|
|
2489
|
+
t4 = [api, settings.memory.model, settings.memory.provider];
|
|
2490
|
+
$[6] = api;
|
|
2491
|
+
$[7] = settings.memory.model;
|
|
2492
|
+
$[8] = settings.memory.provider;
|
|
2493
|
+
$[9] = t4;
|
|
2494
|
+
} else {
|
|
2495
|
+
t4 = $[9];
|
|
2496
|
+
}
|
|
2497
|
+
reactExports.useEffect(t3, t4);
|
|
2498
|
+
let t5;
|
|
2499
|
+
if ($[10] !== memories || $[11] !== t) {
|
|
2448
2500
|
const ids = /* @__PURE__ */ new Set();
|
|
2449
2501
|
(memories ?? []).forEach((m) => {
|
|
2450
2502
|
if (m.projectId) {
|
|
2451
2503
|
ids.add(m.projectId);
|
|
2452
2504
|
}
|
|
2453
2505
|
});
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
}, [memories, t]);
|
|
2462
|
-
const filteredMemories = reactExports.useMemo(() => {
|
|
2463
|
-
if (!memories) {
|
|
2464
|
-
return null;
|
|
2506
|
+
let t62;
|
|
2507
|
+
if ($[13] !== t) {
|
|
2508
|
+
t62 = t("settings.memory.memories.allProjects");
|
|
2509
|
+
$[13] = t;
|
|
2510
|
+
$[14] = t62;
|
|
2511
|
+
} else {
|
|
2512
|
+
t62 = $[14];
|
|
2465
2513
|
}
|
|
2466
|
-
|
|
2467
|
-
|
|
2514
|
+
let t72;
|
|
2515
|
+
if ($[15] !== t62) {
|
|
2516
|
+
t72 = {
|
|
2517
|
+
value: "__all__",
|
|
2518
|
+
label: t62
|
|
2519
|
+
};
|
|
2520
|
+
$[15] = t62;
|
|
2521
|
+
$[16] = t72;
|
|
2522
|
+
} else {
|
|
2523
|
+
t72 = $[16];
|
|
2468
2524
|
}
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2525
|
+
t5 = [t72, ...Array.from(ids).sort(_temp$3).map(_temp2$3)];
|
|
2526
|
+
$[10] = memories;
|
|
2527
|
+
$[11] = t;
|
|
2528
|
+
$[12] = t5;
|
|
2529
|
+
} else {
|
|
2530
|
+
t5 = $[12];
|
|
2531
|
+
}
|
|
2532
|
+
const projectOptions = t5;
|
|
2533
|
+
let t6;
|
|
2534
|
+
bb0: {
|
|
2535
|
+
if (!memories) {
|
|
2536
|
+
t6 = null;
|
|
2537
|
+
break bb0;
|
|
2474
2538
|
}
|
|
2475
|
-
await api.deleteMemory(memoryToDelete.id);
|
|
2476
|
-
setMemoryToDelete(null);
|
|
2477
|
-
await loadMemories();
|
|
2478
|
-
};
|
|
2479
|
-
const handleDeleteProjectMemories = async () => {
|
|
2480
2539
|
if (selectedProjectId === "__all__") {
|
|
2481
|
-
|
|
2540
|
+
t6 = memories;
|
|
2541
|
+
break bb0;
|
|
2482
2542
|
}
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
enabled
|
|
2493
|
-
}
|
|
2494
|
-
});
|
|
2495
|
-
};
|
|
2496
|
-
const handleModelChange = (model) => {
|
|
2497
|
-
setSettings({
|
|
2498
|
-
...settings,
|
|
2499
|
-
memory: {
|
|
2500
|
-
...settings.memory,
|
|
2501
|
-
model
|
|
2543
|
+
let t72;
|
|
2544
|
+
if ($[17] !== memories || $[18] !== selectedProjectId) {
|
|
2545
|
+
let t82;
|
|
2546
|
+
if ($[20] !== selectedProjectId) {
|
|
2547
|
+
t82 = (m_0) => m_0.projectId === selectedProjectId;
|
|
2548
|
+
$[20] = selectedProjectId;
|
|
2549
|
+
$[21] = t82;
|
|
2550
|
+
} else {
|
|
2551
|
+
t82 = $[21];
|
|
2502
2552
|
}
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2553
|
+
t72 = memories.filter(t82);
|
|
2554
|
+
$[17] = memories;
|
|
2555
|
+
$[18] = selectedProjectId;
|
|
2556
|
+
$[19] = t72;
|
|
2557
|
+
} else {
|
|
2558
|
+
t72 = $[19];
|
|
2559
|
+
}
|
|
2560
|
+
t6 = t72;
|
|
2561
|
+
}
|
|
2562
|
+
const filteredMemories = t6;
|
|
2563
|
+
let t7;
|
|
2564
|
+
if ($[22] !== api || $[23] !== loadMemories || $[24] !== memoryToDelete) {
|
|
2565
|
+
t7 = async () => {
|
|
2566
|
+
if (!memoryToDelete) {
|
|
2567
|
+
return;
|
|
2511
2568
|
}
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2569
|
+
await api.deleteMemory(memoryToDelete.id);
|
|
2570
|
+
setMemoryToDelete(null);
|
|
2571
|
+
await loadMemories();
|
|
2572
|
+
};
|
|
2573
|
+
$[22] = api;
|
|
2574
|
+
$[23] = loadMemories;
|
|
2575
|
+
$[24] = memoryToDelete;
|
|
2576
|
+
$[25] = t7;
|
|
2577
|
+
} else {
|
|
2578
|
+
t7 = $[25];
|
|
2579
|
+
}
|
|
2580
|
+
const handleDeleteMemory = t7;
|
|
2581
|
+
let t8;
|
|
2582
|
+
if ($[26] !== api || $[27] !== loadMemories || $[28] !== selectedProjectId) {
|
|
2583
|
+
t8 = async () => {
|
|
2584
|
+
if (selectedProjectId === "__all__") {
|
|
2585
|
+
return;
|
|
2520
2586
|
}
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2587
|
+
await api.deleteProjectMemories(selectedProjectId);
|
|
2588
|
+
setIsDeleteProjectDialogOpen(false);
|
|
2589
|
+
await loadMemories();
|
|
2590
|
+
};
|
|
2591
|
+
$[26] = api;
|
|
2592
|
+
$[27] = loadMemories;
|
|
2593
|
+
$[28] = selectedProjectId;
|
|
2594
|
+
$[29] = t8;
|
|
2595
|
+
} else {
|
|
2596
|
+
t8 = $[29];
|
|
2597
|
+
}
|
|
2598
|
+
const handleDeleteProjectMemories = t8;
|
|
2599
|
+
let t9;
|
|
2600
|
+
if ($[30] !== setSettings || $[31] !== settings) {
|
|
2601
|
+
t9 = (enabled) => {
|
|
2602
|
+
setSettings({
|
|
2603
|
+
...settings,
|
|
2604
|
+
memory: {
|
|
2605
|
+
...settings.memory,
|
|
2606
|
+
enabled
|
|
2607
|
+
}
|
|
2608
|
+
});
|
|
2609
|
+
};
|
|
2610
|
+
$[30] = setSettings;
|
|
2611
|
+
$[31] = settings;
|
|
2612
|
+
$[32] = t9;
|
|
2613
|
+
} else {
|
|
2614
|
+
t9 = $[32];
|
|
2615
|
+
}
|
|
2616
|
+
const handleEnabledChange = t9;
|
|
2617
|
+
let t10;
|
|
2618
|
+
if ($[33] !== setSettings || $[34] !== settings) {
|
|
2619
|
+
t10 = (model) => {
|
|
2620
|
+
setSettings({
|
|
2621
|
+
...settings,
|
|
2622
|
+
memory: {
|
|
2623
|
+
...settings.memory,
|
|
2624
|
+
model
|
|
2625
|
+
}
|
|
2626
|
+
});
|
|
2627
|
+
};
|
|
2628
|
+
$[33] = setSettings;
|
|
2629
|
+
$[34] = settings;
|
|
2630
|
+
$[35] = t10;
|
|
2631
|
+
} else {
|
|
2632
|
+
t10 = $[35];
|
|
2633
|
+
}
|
|
2634
|
+
const handleModelChange = t10;
|
|
2635
|
+
let t11;
|
|
2636
|
+
if ($[36] !== setSettings || $[37] !== settings) {
|
|
2637
|
+
t11 = (provider) => {
|
|
2638
|
+
setSettings({
|
|
2639
|
+
...settings,
|
|
2640
|
+
memory: {
|
|
2641
|
+
...settings.memory,
|
|
2642
|
+
provider
|
|
2643
|
+
}
|
|
2644
|
+
});
|
|
2645
|
+
};
|
|
2646
|
+
$[36] = setSettings;
|
|
2647
|
+
$[37] = settings;
|
|
2648
|
+
$[38] = t11;
|
|
2649
|
+
} else {
|
|
2650
|
+
t11 = $[38];
|
|
2651
|
+
}
|
|
2652
|
+
const handleProviderChange = t11;
|
|
2653
|
+
let t12;
|
|
2654
|
+
if ($[39] !== setSettings || $[40] !== settings) {
|
|
2655
|
+
t12 = (value) => {
|
|
2656
|
+
setSettings({
|
|
2657
|
+
...settings,
|
|
2658
|
+
memory: {
|
|
2659
|
+
...settings.memory,
|
|
2660
|
+
maxDistance: value
|
|
2661
|
+
}
|
|
2662
|
+
});
|
|
2663
|
+
};
|
|
2664
|
+
$[39] = setSettings;
|
|
2665
|
+
$[40] = settings;
|
|
2666
|
+
$[41] = t12;
|
|
2667
|
+
} else {
|
|
2668
|
+
t12 = $[41];
|
|
2669
|
+
}
|
|
2670
|
+
const handleMaxDistanceChange = t12;
|
|
2671
|
+
let t13;
|
|
2672
|
+
if ($[42] !== t) {
|
|
2673
|
+
t13 = t("settings.memory.configuration");
|
|
2674
|
+
$[42] = t;
|
|
2675
|
+
$[43] = t13;
|
|
2676
|
+
} else {
|
|
2677
|
+
t13 = $[43];
|
|
2678
|
+
}
|
|
2679
|
+
let t14;
|
|
2680
|
+
if ($[44] !== t) {
|
|
2681
|
+
t14 = t("settings.memory.description");
|
|
2682
|
+
$[44] = t;
|
|
2683
|
+
$[45] = t14;
|
|
2684
|
+
} else {
|
|
2685
|
+
t14 = $[45];
|
|
2686
|
+
}
|
|
2687
|
+
let t15;
|
|
2688
|
+
if ($[46] !== t14) {
|
|
2689
|
+
t15 = /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs py-2", children: t14 });
|
|
2690
|
+
$[46] = t14;
|
|
2691
|
+
$[47] = t15;
|
|
2692
|
+
} else {
|
|
2693
|
+
t15 = $[47];
|
|
2694
|
+
}
|
|
2695
|
+
let t16;
|
|
2696
|
+
if ($[48] !== t) {
|
|
2697
|
+
t16 = t("settings.memory.enabled.label");
|
|
2698
|
+
$[48] = t;
|
|
2699
|
+
$[49] = t16;
|
|
2700
|
+
} else {
|
|
2701
|
+
t16 = $[49];
|
|
2702
|
+
}
|
|
2703
|
+
let t17;
|
|
2704
|
+
if ($[50] !== handleEnabledChange || $[51] !== settings.memory.enabled || $[52] !== t16) {
|
|
2705
|
+
t17 = /* @__PURE__ */ jsxRuntimeExports.jsx(Checkbox, { label: t16, checked: settings.memory.enabled, onChange: handleEnabledChange, size: "md" });
|
|
2706
|
+
$[50] = handleEnabledChange;
|
|
2707
|
+
$[51] = settings.memory.enabled;
|
|
2708
|
+
$[52] = t16;
|
|
2709
|
+
$[53] = t17;
|
|
2710
|
+
} else {
|
|
2711
|
+
t17 = $[53];
|
|
2712
|
+
}
|
|
2713
|
+
let t18;
|
|
2714
|
+
if ($[54] !== handleMaxDistanceChange || $[55] !== handleModelChange || $[56] !== handleProviderChange || $[57] !== settings.memory.enabled || $[58] !== settings.memory.maxDistance || $[59] !== settings.memory.model || $[60] !== settings.memory.provider || $[61] !== t) {
|
|
2715
|
+
t18 = settings.memory.enabled && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid grid-cols-2 gap-x-6 gap-y-5", children: [
|
|
2716
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
2717
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Select, { label: t("settings.memory.provider.label"), value: settings.memory.provider, onChange: handleProviderChange, options: EMBEDDING_PROVIDERS.map(_temp3$3), className: "w-full" }),
|
|
2718
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-text-secondary mt-1", children: t("settings.memory.provider.description") })
|
|
2546
2719
|
] }),
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
}) }),
|
|
2551
|
-
embeddingProgress.phase === MemoryEmbeddingProgressPhase.ReEmbedding && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: t("settings.memory.embeddingProgress.reEmbedding", {
|
|
2552
|
-
done: embeddingProgress.done,
|
|
2553
|
-
total: embeddingProgress.total
|
|
2554
|
-
}) }),
|
|
2555
|
-
embeddingProgress.phase === MemoryEmbeddingProgressPhase.Error && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-error", children: t("settings.memory.embeddingProgress.error", {
|
|
2556
|
-
error: embeddingProgress.error || ""
|
|
2557
|
-
}) })
|
|
2558
|
-
] })
|
|
2559
|
-
] }) }),
|
|
2560
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Section, { id: "memory-memories", title: t("settings.memory.memories.title"), className: "flex-1 min-h-0 flex flex-col", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "px-4 py-5 space-y-4 flex-1 min-h-0 flex flex-col", children: [
|
|
2561
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-end justify-between gap-4", children: [
|
|
2562
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Select, { label: t("settings.memory.memories.project"), value: selectedProjectId, onChange: (value) => setSelectedProjectId(value), options: projectOptions, className: "min-w-[300px]" }),
|
|
2563
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Button, { variant: "contained", onClick: () => setIsDeleteProjectDialogOpen(true), size: "sm", color: "danger", disabled: selectedProjectId === "__all__", children: t("settings.memory.memories.deleteAllForProject") })
|
|
2720
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
2721
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Select, { label: t("settings.memory.model.label"), value: settings.memory.model, onChange: handleModelChange, options: LOCAL_MODELS.map(_temp4$2), className: "w-full" }),
|
|
2722
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-text-secondary mt-1", children: LOCAL_MODELS.find((m_1) => m_1.value === settings.memory.model)?.description })
|
|
2564
2723
|
] }),
|
|
2565
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
2566
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2724
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Slider, { label: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center text-xs gap-1", children: [
|
|
2725
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: t("settings.memory.maxDistance.label") }),
|
|
2726
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(InfoIcon, { tooltip: t("settings.memory.maxDistance.description"), className: "ml-1" })
|
|
2727
|
+
] }), min: 0, max: 2, step: 0.05, value: settings.memory.maxDistance, onChange: handleMaxDistanceChange }) })
|
|
2728
|
+
] });
|
|
2729
|
+
$[54] = handleMaxDistanceChange;
|
|
2730
|
+
$[55] = handleModelChange;
|
|
2731
|
+
$[56] = handleProviderChange;
|
|
2732
|
+
$[57] = settings.memory.enabled;
|
|
2733
|
+
$[58] = settings.memory.maxDistance;
|
|
2734
|
+
$[59] = settings.memory.model;
|
|
2735
|
+
$[60] = settings.memory.provider;
|
|
2736
|
+
$[61] = t;
|
|
2737
|
+
$[62] = t18;
|
|
2738
|
+
} else {
|
|
2739
|
+
t18 = $[62];
|
|
2740
|
+
}
|
|
2741
|
+
let t19;
|
|
2742
|
+
if ($[63] !== embeddingProgress || $[64] !== t) {
|
|
2743
|
+
t19 = embeddingProgress && embeddingProgress.phase !== MemoryEmbeddingProgressPhase.Idle && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-2xs text-text-muted", children: [
|
|
2744
|
+
embeddingProgress.phase === MemoryEmbeddingProgressPhase.LoadingModel && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: t("settings.memory.embeddingProgress.loadingModel", {
|
|
2745
|
+
status: embeddingProgress.status || "-"
|
|
2746
|
+
}) }),
|
|
2747
|
+
embeddingProgress.phase === MemoryEmbeddingProgressPhase.ReEmbedding && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: t("settings.memory.embeddingProgress.reEmbedding", {
|
|
2748
|
+
done: embeddingProgress.done,
|
|
2749
|
+
total: embeddingProgress.total
|
|
2750
|
+
}) }),
|
|
2751
|
+
embeddingProgress.phase === MemoryEmbeddingProgressPhase.Error && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-error", children: t("settings.memory.embeddingProgress.error", {
|
|
2752
|
+
error: embeddingProgress.error || ""
|
|
2753
|
+
}) })
|
|
2754
|
+
] });
|
|
2755
|
+
$[63] = embeddingProgress;
|
|
2756
|
+
$[64] = t;
|
|
2757
|
+
$[65] = t19;
|
|
2758
|
+
} else {
|
|
2759
|
+
t19 = $[65];
|
|
2760
|
+
}
|
|
2761
|
+
let t20;
|
|
2762
|
+
if ($[66] !== t15 || $[67] !== t17 || $[68] !== t18 || $[69] !== t19) {
|
|
2763
|
+
t20 = /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "px-4 py-5 space-y-4", children: [
|
|
2764
|
+
t15,
|
|
2765
|
+
t17,
|
|
2766
|
+
t18,
|
|
2767
|
+
t19
|
|
2768
|
+
] });
|
|
2769
|
+
$[66] = t15;
|
|
2770
|
+
$[67] = t17;
|
|
2771
|
+
$[68] = t18;
|
|
2772
|
+
$[69] = t19;
|
|
2773
|
+
$[70] = t20;
|
|
2774
|
+
} else {
|
|
2775
|
+
t20 = $[70];
|
|
2776
|
+
}
|
|
2777
|
+
let t21;
|
|
2778
|
+
if ($[71] !== t13 || $[72] !== t20) {
|
|
2779
|
+
t21 = /* @__PURE__ */ jsxRuntimeExports.jsx(Section, { id: "memory-general", title: t13, children: t20 });
|
|
2780
|
+
$[71] = t13;
|
|
2781
|
+
$[72] = t20;
|
|
2782
|
+
$[73] = t21;
|
|
2783
|
+
} else {
|
|
2784
|
+
t21 = $[73];
|
|
2785
|
+
}
|
|
2786
|
+
let t22;
|
|
2787
|
+
if ($[74] !== t) {
|
|
2788
|
+
t22 = t("settings.memory.memories.title");
|
|
2789
|
+
$[74] = t;
|
|
2790
|
+
$[75] = t22;
|
|
2791
|
+
} else {
|
|
2792
|
+
t22 = $[75];
|
|
2793
|
+
}
|
|
2794
|
+
let t23;
|
|
2795
|
+
if ($[76] !== t) {
|
|
2796
|
+
t23 = t("settings.memory.memories.project");
|
|
2797
|
+
$[76] = t;
|
|
2798
|
+
$[77] = t23;
|
|
2799
|
+
} else {
|
|
2800
|
+
t23 = $[77];
|
|
2801
|
+
}
|
|
2802
|
+
let t24;
|
|
2803
|
+
if ($[78] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
2804
|
+
t24 = (value_0) => setSelectedProjectId(value_0);
|
|
2805
|
+
$[78] = t24;
|
|
2806
|
+
} else {
|
|
2807
|
+
t24 = $[78];
|
|
2808
|
+
}
|
|
2809
|
+
let t25;
|
|
2810
|
+
if ($[79] !== projectOptions || $[80] !== selectedProjectId || $[81] !== t23) {
|
|
2811
|
+
t25 = /* @__PURE__ */ jsxRuntimeExports.jsx(Select, { label: t23, value: selectedProjectId, onChange: t24, options: projectOptions, className: "min-w-[300px]" });
|
|
2812
|
+
$[79] = projectOptions;
|
|
2813
|
+
$[80] = selectedProjectId;
|
|
2814
|
+
$[81] = t23;
|
|
2815
|
+
$[82] = t25;
|
|
2816
|
+
} else {
|
|
2817
|
+
t25 = $[82];
|
|
2818
|
+
}
|
|
2819
|
+
let t26;
|
|
2820
|
+
if ($[83] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
2821
|
+
t26 = () => setIsDeleteProjectDialogOpen(true);
|
|
2822
|
+
$[83] = t26;
|
|
2823
|
+
} else {
|
|
2824
|
+
t26 = $[83];
|
|
2825
|
+
}
|
|
2826
|
+
const t27 = selectedProjectId === "__all__";
|
|
2827
|
+
let t28;
|
|
2828
|
+
if ($[84] !== t) {
|
|
2829
|
+
t28 = t("settings.memory.memories.deleteAllForProject");
|
|
2830
|
+
$[84] = t;
|
|
2831
|
+
$[85] = t28;
|
|
2832
|
+
} else {
|
|
2833
|
+
t28 = $[85];
|
|
2834
|
+
}
|
|
2835
|
+
let t29;
|
|
2836
|
+
if ($[86] !== t27 || $[87] !== t28) {
|
|
2837
|
+
t29 = /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { variant: "contained", onClick: t26, size: "sm", color: "danger", disabled: t27, children: t28 });
|
|
2838
|
+
$[86] = t27;
|
|
2839
|
+
$[87] = t28;
|
|
2840
|
+
$[88] = t29;
|
|
2841
|
+
} else {
|
|
2842
|
+
t29 = $[88];
|
|
2843
|
+
}
|
|
2844
|
+
let t30;
|
|
2845
|
+
if ($[89] !== t25 || $[90] !== t29) {
|
|
2846
|
+
t30 = /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-end justify-between gap-4", children: [
|
|
2847
|
+
t25,
|
|
2848
|
+
t29
|
|
2849
|
+
] });
|
|
2850
|
+
$[89] = t25;
|
|
2851
|
+
$[90] = t29;
|
|
2852
|
+
$[91] = t30;
|
|
2853
|
+
} else {
|
|
2854
|
+
t30 = $[91];
|
|
2855
|
+
}
|
|
2856
|
+
let t31;
|
|
2857
|
+
if ($[92] !== filteredMemories || $[93] !== t) {
|
|
2858
|
+
t31 = /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "border border-border-default-dark rounded-md overflow-hidden flex-1 min-h-0", children: !filteredMemories ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "px-4 py-3 text-xs text-text-secondary bg-bg-secondary", children: t("settings.memory.memories.loading") }) : filteredMemories.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "px-4 py-3 text-xs text-text-secondary bg-bg-secondary", children: t("settings.memory.memories.empty") }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "h-full overflow-y-auto scrollbar-thin scrollbar-track-bg-secondary-light scrollbar-thumb-bg-fourth hover:scrollbar-thumb-bg-tertiary", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "divide-y divide-border-default-dark", children: filteredMemories.slice().sort(_temp5$1).map((m_2) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "px-3 py-2.5 bg-bg-secondary flex items-start justify-between gap-3", children: [
|
|
2859
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "min-w-0", children: [
|
|
2860
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-xs text-text-muted flex flex-wrap gap-x-1 gap-y-0.5 leading-4", children: [
|
|
2861
|
+
m_2.projectId && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(CodeInline, { children: m_2.projectId }) }),
|
|
2862
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(CodeInline, { children: m_2.type }) })
|
|
2572
2863
|
] }),
|
|
2573
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "
|
|
2574
|
-
] },
|
|
2575
|
-
|
|
2576
|
-
|
|
2864
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-2xs text-text-primary mt-1 whitespace-pre-wrap break-words", children: m_2.content })
|
|
2865
|
+
] }),
|
|
2866
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { icon: /* @__PURE__ */ jsxRuntimeExports.jsx(FaTrash, { className: "w-3.5 h-3.5" }), onClick: () => setMemoryToDelete(m_2), className: "p-1.5 hover:bg-bg-tertiary hover:text-error rounded-md", tooltip: t("settings.memory.memories.delete") }) })
|
|
2867
|
+
] }, m_2.id)) }) }) });
|
|
2868
|
+
$[92] = filteredMemories;
|
|
2869
|
+
$[93] = t;
|
|
2870
|
+
$[94] = t31;
|
|
2871
|
+
} else {
|
|
2872
|
+
t31 = $[94];
|
|
2873
|
+
}
|
|
2874
|
+
let t32;
|
|
2875
|
+
if ($[95] !== t30 || $[96] !== t31) {
|
|
2876
|
+
t32 = /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "px-4 py-5 space-y-4 flex-1 min-h-0 flex flex-col", children: [
|
|
2877
|
+
t30,
|
|
2878
|
+
t31
|
|
2879
|
+
] });
|
|
2880
|
+
$[95] = t30;
|
|
2881
|
+
$[96] = t31;
|
|
2882
|
+
$[97] = t32;
|
|
2883
|
+
} else {
|
|
2884
|
+
t32 = $[97];
|
|
2885
|
+
}
|
|
2886
|
+
let t33;
|
|
2887
|
+
if ($[98] !== t22 || $[99] !== t32) {
|
|
2888
|
+
t33 = /* @__PURE__ */ jsxRuntimeExports.jsx(Section, { id: "memory-memories", title: t22, className: "flex-1 min-h-0 flex flex-col", children: t32 });
|
|
2889
|
+
$[98] = t22;
|
|
2890
|
+
$[99] = t32;
|
|
2891
|
+
$[100] = t33;
|
|
2892
|
+
} else {
|
|
2893
|
+
t33 = $[100];
|
|
2894
|
+
}
|
|
2895
|
+
let t34;
|
|
2896
|
+
if ($[101] !== handleDeleteMemory || $[102] !== memoryToDelete || $[103] !== t) {
|
|
2897
|
+
t34 = memoryToDelete && /* @__PURE__ */ jsxRuntimeExports.jsx(ConfirmDialog, { title: t("settings.memory.memories.deleteDialogTitle"), onConfirm: handleDeleteMemory, onCancel: () => setMemoryToDelete(null), confirmButtonText: t("settings.memory.memories.delete"), confirmButtonClass: "bg-error hover:bg-error", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm text-text-secondary space-y-2", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
2577
2898
|
t("settings.memory.memories.deleteDialogText"),
|
|
2578
2899
|
" ",
|
|
2579
2900
|
/* @__PURE__ */ jsxRuntimeExports.jsx(CodeInline, { children: memoryToDelete.id })
|
|
2580
|
-
] }) }) })
|
|
2581
|
-
|
|
2901
|
+
] }) }) });
|
|
2902
|
+
$[101] = handleDeleteMemory;
|
|
2903
|
+
$[102] = memoryToDelete;
|
|
2904
|
+
$[103] = t;
|
|
2905
|
+
$[104] = t34;
|
|
2906
|
+
} else {
|
|
2907
|
+
t34 = $[104];
|
|
2908
|
+
}
|
|
2909
|
+
let t35;
|
|
2910
|
+
if ($[105] !== handleDeleteProjectMemories || $[106] !== isDeleteProjectDialogOpen || $[107] !== selectedProjectId || $[108] !== t) {
|
|
2911
|
+
t35 = isDeleteProjectDialogOpen && selectedProjectId !== "__all__" && /* @__PURE__ */ jsxRuntimeExports.jsx(ConfirmDialog, { title: t("settings.memory.memories.deleteProjectDialogTitle"), onConfirm: handleDeleteProjectMemories, onCancel: () => setIsDeleteProjectDialogOpen(false), confirmButtonText: t("settings.memory.memories.deleteAllForProject"), confirmButtonClass: "bg-error hover:bg-error", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm text-text-secondary space-y-2", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
2582
2912
|
t("settings.memory.memories.deleteProjectDialogText"),
|
|
2583
2913
|
" ",
|
|
2584
2914
|
/* @__PURE__ */ jsxRuntimeExports.jsx(CodeInline, { children: selectedProjectId })
|
|
2585
|
-
] }) }) })
|
|
2586
|
-
|
|
2915
|
+
] }) }) });
|
|
2916
|
+
$[105] = handleDeleteProjectMemories;
|
|
2917
|
+
$[106] = isDeleteProjectDialogOpen;
|
|
2918
|
+
$[107] = selectedProjectId;
|
|
2919
|
+
$[108] = t;
|
|
2920
|
+
$[109] = t35;
|
|
2921
|
+
} else {
|
|
2922
|
+
t35 = $[109];
|
|
2923
|
+
}
|
|
2924
|
+
let t36;
|
|
2925
|
+
if ($[110] !== t21 || $[111] !== t33 || $[112] !== t34 || $[113] !== t35) {
|
|
2926
|
+
t36 = /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-6 h-full flex flex-col", children: [
|
|
2927
|
+
t21,
|
|
2928
|
+
t33,
|
|
2929
|
+
t34,
|
|
2930
|
+
t35
|
|
2931
|
+
] });
|
|
2932
|
+
$[110] = t21;
|
|
2933
|
+
$[111] = t33;
|
|
2934
|
+
$[112] = t34;
|
|
2935
|
+
$[113] = t35;
|
|
2936
|
+
$[114] = t36;
|
|
2937
|
+
} else {
|
|
2938
|
+
t36 = $[114];
|
|
2939
|
+
}
|
|
2940
|
+
return t36;
|
|
2587
2941
|
};
|
|
2942
|
+
function _temp$3(a, b) {
|
|
2943
|
+
return a.localeCompare(b);
|
|
2944
|
+
}
|
|
2945
|
+
function _temp2$3(id) {
|
|
2946
|
+
return {
|
|
2947
|
+
value: id,
|
|
2948
|
+
label: id.split("/").pop() || id
|
|
2949
|
+
};
|
|
2950
|
+
}
|
|
2951
|
+
function _temp3$3(provider_0) {
|
|
2952
|
+
return {
|
|
2953
|
+
value: provider_0.value,
|
|
2954
|
+
label: provider_0.label
|
|
2955
|
+
};
|
|
2956
|
+
}
|
|
2957
|
+
function _temp4$2(model_0) {
|
|
2958
|
+
return {
|
|
2959
|
+
value: model_0.value,
|
|
2960
|
+
label: model_0.label
|
|
2961
|
+
};
|
|
2962
|
+
}
|
|
2963
|
+
function _temp5$1(a_0, b_0) {
|
|
2964
|
+
return b_0.timestamp - a_0.timestamp;
|
|
2965
|
+
}
|
|
2588
2966
|
const DEFAULT_IDLE_TIMEOUT_MS = 5e3;
|
|
2589
2967
|
const DEFAULT_MIC_DEVICE_ID = "__default__";
|
|
2590
2968
|
const OPENAI_LANGUAGE_OPTIONS = [{
|
|
@@ -6265,19 +6643,19 @@ const ExtensionsSettings = ({
|
|
|
6265
6643
|
}
|
|
6266
6644
|
}, [selectedProjectContext, contexts]);
|
|
6267
6645
|
const navigateContext = (direction) => {
|
|
6268
|
-
const
|
|
6269
|
-
setContextIndex(
|
|
6270
|
-
setProfileContext(contexts[
|
|
6646
|
+
const newIndex_0 = direction === "prev" ? (contextIndex - 1 + contexts.length) % contexts.length : (contextIndex + 1) % contexts.length;
|
|
6647
|
+
setContextIndex(newIndex_0);
|
|
6648
|
+
setProfileContext(contexts[newIndex_0]);
|
|
6271
6649
|
};
|
|
6272
6650
|
const getContextDisplayName = () => {
|
|
6273
6651
|
if (profileContext === "global") {
|
|
6274
6652
|
return "Global";
|
|
6275
6653
|
}
|
|
6276
|
-
const project = openProjects.find((
|
|
6654
|
+
const project = openProjects.find((p_0) => p_0.baseDir === profileContext);
|
|
6277
6655
|
return project ? getPathBasename(project.baseDir) : profileContext;
|
|
6278
6656
|
};
|
|
6279
6657
|
const projectDir = profileContext !== "global" ? profileContext : void 0;
|
|
6280
|
-
const loadInstalledExtensions = async () => {
|
|
6658
|
+
const loadInstalledExtensions = reactExports.useCallback(async () => {
|
|
6281
6659
|
setLoadingInstalled(true);
|
|
6282
6660
|
try {
|
|
6283
6661
|
const extensions = await api.getInstalledExtensions(projectDir);
|
|
@@ -6287,31 +6665,31 @@ const ExtensionsSettings = ({
|
|
|
6287
6665
|
} finally {
|
|
6288
6666
|
setLoadingInstalled(false);
|
|
6289
6667
|
}
|
|
6290
|
-
};
|
|
6291
|
-
const loadAvailableExtensions = async (forceRefresh = false, repositories) => {
|
|
6668
|
+
}, [projectDir, api, t]);
|
|
6669
|
+
const loadAvailableExtensions = reactExports.useCallback(async (forceRefresh = false, repositories) => {
|
|
6292
6670
|
setLoadingAvailable(true);
|
|
6293
6671
|
try {
|
|
6294
6672
|
const repos = repositories || settings.extensions?.repositories || [AIDER_DESK_EXTENSIONS_REPO_URL];
|
|
6295
|
-
const
|
|
6296
|
-
setAvailableExtensions(
|
|
6673
|
+
const extensions_0 = await api.getAvailableExtensions(repos, forceRefresh);
|
|
6674
|
+
setAvailableExtensions(extensions_0);
|
|
6297
6675
|
} catch {
|
|
6298
6676
|
showErrorNotification(t("settings.extensions.errors.loadAvailable"));
|
|
6299
6677
|
} finally {
|
|
6300
6678
|
setLoadingAvailable(false);
|
|
6301
6679
|
}
|
|
6302
|
-
};
|
|
6680
|
+
}, [settings.extensions?.repositories, api, t]);
|
|
6303
6681
|
const handleRefresh = async () => {
|
|
6304
6682
|
await Promise.all([loadInstalledExtensions(), loadAvailableExtensions(true)]);
|
|
6305
6683
|
};
|
|
6306
6684
|
reactExports.useEffect(() => {
|
|
6307
6685
|
void loadInstalledExtensions();
|
|
6308
|
-
}, [
|
|
6309
|
-
|
|
6686
|
+
}, [loadInstalledExtensions]);
|
|
6687
|
+
useMount(() => {
|
|
6310
6688
|
void loadAvailableExtensions();
|
|
6311
|
-
}
|
|
6689
|
+
});
|
|
6312
6690
|
const handleToggleDisabled = (extensionFilePath, isCurrentlyDisabled) => {
|
|
6313
|
-
const
|
|
6314
|
-
const updatedDisabled = isCurrentlyDisabled ?
|
|
6691
|
+
const disabledExtensions = settings.extensions?.disabled || [];
|
|
6692
|
+
const updatedDisabled = isCurrentlyDisabled ? disabledExtensions.filter((fp) => fp !== extensionFilePath) : [...disabledExtensions, extensionFilePath];
|
|
6315
6693
|
setSettings({
|
|
6316
6694
|
...settings,
|
|
6317
6695
|
extensions: {
|
|
@@ -6321,13 +6699,13 @@ const ExtensionsSettings = ({
|
|
|
6321
6699
|
}
|
|
6322
6700
|
});
|
|
6323
6701
|
};
|
|
6324
|
-
const handleUninstall = async (
|
|
6325
|
-
setUninstallingExtensions((prev) => new Set(prev).add(
|
|
6702
|
+
const handleUninstall = async (extensionFilePath_0) => {
|
|
6703
|
+
setUninstallingExtensions((prev) => new Set(prev).add(extensionFilePath_0));
|
|
6326
6704
|
try {
|
|
6327
|
-
const success = await api.uninstallExtension(
|
|
6705
|
+
const success = await api.uninstallExtension(extensionFilePath_0, projectDir);
|
|
6328
6706
|
if (success) {
|
|
6329
6707
|
showSuccessNotification(t("settings.extensions.success.uninstall", {
|
|
6330
|
-
name:
|
|
6708
|
+
name: extensionFilePath_0
|
|
6331
6709
|
}));
|
|
6332
6710
|
await loadInstalledExtensions();
|
|
6333
6711
|
await loadAvailableExtensions();
|
|
@@ -6339,16 +6717,16 @@ const ExtensionsSettings = ({
|
|
|
6339
6717
|
} finally {
|
|
6340
6718
|
setUninstallingExtensions((prev) => {
|
|
6341
6719
|
const next = new Set(prev);
|
|
6342
|
-
next.delete(
|
|
6720
|
+
next.delete(extensionFilePath_0);
|
|
6343
6721
|
return next;
|
|
6344
6722
|
});
|
|
6345
6723
|
}
|
|
6346
6724
|
};
|
|
6347
6725
|
const handleInstall = async (extension) => {
|
|
6348
|
-
setInstallingExtensions((
|
|
6726
|
+
setInstallingExtensions((prev_0) => new Set(prev_0).add(extension.id));
|
|
6349
6727
|
try {
|
|
6350
|
-
const
|
|
6351
|
-
if (
|
|
6728
|
+
const success_0 = await api.installExtension(extension.id, extension.repositoryUrl, projectDir);
|
|
6729
|
+
if (success_0) {
|
|
6352
6730
|
showSuccessNotification(t("settings.extensions.success.install", {
|
|
6353
6731
|
name: extension.name
|
|
6354
6732
|
}));
|
|
@@ -6366,9 +6744,9 @@ const ExtensionsSettings = ({
|
|
|
6366
6744
|
});
|
|
6367
6745
|
}
|
|
6368
6746
|
};
|
|
6369
|
-
const handleUpdate = async (
|
|
6747
|
+
const handleUpdate = async (extension_0) => {
|
|
6370
6748
|
const installedExtension = installedExtensions.find((inst) => {
|
|
6371
|
-
if (inst.id !==
|
|
6749
|
+
if (inst.id !== extension_0.id) {
|
|
6372
6750
|
return false;
|
|
6373
6751
|
}
|
|
6374
6752
|
if (profileContext === "global") {
|
|
@@ -6379,12 +6757,12 @@ const ExtensionsSettings = ({
|
|
|
6379
6757
|
if (!installedExtension) {
|
|
6380
6758
|
return;
|
|
6381
6759
|
}
|
|
6382
|
-
setUpdatingExtensions((
|
|
6760
|
+
setUpdatingExtensions((prev_1) => new Set(prev_1).add(installedExtension.filePath));
|
|
6383
6761
|
try {
|
|
6384
|
-
const
|
|
6385
|
-
if (
|
|
6762
|
+
const success_1 = await api.updateExtension(installedExtension.filePath, extension_0.repositoryUrl, projectDir);
|
|
6763
|
+
if (success_1) {
|
|
6386
6764
|
showSuccessNotification(t("settings.extensions.success.update", {
|
|
6387
|
-
name:
|
|
6765
|
+
name: extension_0.name
|
|
6388
6766
|
}));
|
|
6389
6767
|
await loadInstalledExtensions();
|
|
6390
6768
|
await loadAvailableExtensions();
|
|
@@ -6420,10 +6798,10 @@ const ExtensionsSettings = ({
|
|
|
6420
6798
|
}
|
|
6421
6799
|
});
|
|
6422
6800
|
setNewRepositoryUrl("");
|
|
6423
|
-
setLoadingRepositories((
|
|
6801
|
+
setLoadingRepositories((prev_2) => new Set(prev_2).add(trimmedUrl));
|
|
6424
6802
|
try {
|
|
6425
6803
|
const newExtensions = await api.getAvailableExtensions([trimmedUrl], true, true);
|
|
6426
|
-
setAvailableExtensions((
|
|
6804
|
+
setAvailableExtensions((prev_3) => [...prev_3, ...newExtensions]);
|
|
6427
6805
|
} catch {
|
|
6428
6806
|
showErrorNotification(t("settings.extensions.errors.loadAvailable"));
|
|
6429
6807
|
} finally {
|
|
@@ -6439,8 +6817,8 @@ const ExtensionsSettings = ({
|
|
|
6439
6817
|
showErrorNotification(t("settings.extensions.errors.cannotRemoveDefault"));
|
|
6440
6818
|
return;
|
|
6441
6819
|
}
|
|
6442
|
-
const
|
|
6443
|
-
const updatedRepositories =
|
|
6820
|
+
const currentRepositories_0 = settings.extensions?.repositories || [];
|
|
6821
|
+
const updatedRepositories = currentRepositories_0.filter((url) => url !== repositoryUrl);
|
|
6444
6822
|
setSettings({
|
|
6445
6823
|
...settings,
|
|
6446
6824
|
extensions: {
|
|
@@ -6449,13 +6827,13 @@ const ExtensionsSettings = ({
|
|
|
6449
6827
|
disabled: settings.extensions?.disabled || []
|
|
6450
6828
|
}
|
|
6451
6829
|
});
|
|
6452
|
-
setAvailableExtensions((
|
|
6830
|
+
setAvailableExtensions((prev_4) => prev_4.filter((ext) => ext.repositoryUrl !== repositoryUrl));
|
|
6453
6831
|
};
|
|
6454
|
-
const
|
|
6832
|
+
const disabledExtensions_0 = settings.extensions?.disabled || [];
|
|
6455
6833
|
const renderAddRepository = () => {
|
|
6456
6834
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex gap-2", children: [
|
|
6457
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Input, { value: newRepositoryUrl, onChange: (e) => setNewRepositoryUrl(e.target.value), placeholder: t("settings.extensions.repositories.placeholder"), onKeyDown: (
|
|
6458
|
-
if (
|
|
6835
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Input, { value: newRepositoryUrl, onChange: (e) => setNewRepositoryUrl(e.target.value), placeholder: t("settings.extensions.repositories.placeholder"), onKeyDown: (e_0) => {
|
|
6836
|
+
if (e_0.key === "Enter") {
|
|
6459
6837
|
handleAddRepository();
|
|
6460
6838
|
}
|
|
6461
6839
|
}, className: "bg-bg-secondary border", wrapperClassName: "flex-1" }),
|
|
@@ -6465,23 +6843,23 @@ const ExtensionsSettings = ({
|
|
|
6465
6843
|
] })
|
|
6466
6844
|
] });
|
|
6467
6845
|
};
|
|
6468
|
-
const filteredInstalledExtensions = installedExtensions.filter((
|
|
6846
|
+
const filteredInstalledExtensions = installedExtensions.filter((ext_0) => {
|
|
6469
6847
|
if (profileContext === "global") {
|
|
6470
|
-
if (
|
|
6848
|
+
if (ext_0.projectDir) {
|
|
6471
6849
|
return false;
|
|
6472
6850
|
}
|
|
6473
6851
|
} else {
|
|
6474
|
-
if (
|
|
6852
|
+
if (ext_0.projectDir !== profileContext) {
|
|
6475
6853
|
return false;
|
|
6476
6854
|
}
|
|
6477
6855
|
}
|
|
6478
6856
|
const searchLower = searchQuery.toLowerCase();
|
|
6479
|
-
const matchesSearch =
|
|
6857
|
+
const matchesSearch = ext_0.metadata.name.toLowerCase().includes(searchLower) || ext_0.metadata.description?.toLowerCase().includes(searchLower) || ext_0.metadata.author?.toLowerCase().includes(searchLower);
|
|
6480
6858
|
if (!matchesSearch) {
|
|
6481
6859
|
return false;
|
|
6482
6860
|
}
|
|
6483
6861
|
if (selectedCapabilities.size > 0) {
|
|
6484
|
-
const extCapabilities =
|
|
6862
|
+
const extCapabilities = ext_0.metadata.capabilities || [];
|
|
6485
6863
|
const hasSelectedCapability = Array.from(selectedCapabilities).some((cap) => extCapabilities.includes(cap));
|
|
6486
6864
|
if (!hasSelectedCapability) {
|
|
6487
6865
|
return false;
|
|
@@ -6499,22 +6877,22 @@ const ExtensionsSettings = ({
|
|
|
6499
6877
|
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-text-muted", children: t("settings.extensions.installed.emptyHint") })
|
|
6500
6878
|
] });
|
|
6501
6879
|
}
|
|
6502
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "space-y-2", children: filteredInstalledExtensions.map((
|
|
6503
|
-
const availableExt = availableExtensions.find((avail) => avail.id ===
|
|
6504
|
-
const extensionHasUpdate = availableExt ? availableExt.version !==
|
|
6505
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(ExtensionCard, { extension, isDisabled:
|
|
6880
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "space-y-2", children: filteredInstalledExtensions.map((extension_1) => {
|
|
6881
|
+
const availableExt = availableExtensions.find((avail) => avail.id === extension_1.id);
|
|
6882
|
+
const extensionHasUpdate = availableExt ? availableExt.version !== extension_1.metadata.version : false;
|
|
6883
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(ExtensionCard, { extension: extension_1, isDisabled: disabledExtensions_0.includes(extension_1.filePath), isUninstalling: uninstallingExtensions.has(extension_1.filePath), isUpdating: updatingExtensions.has(extension_1.filePath), hasUpdate: extensionHasUpdate, onUpdate: availableExt ? () => handleUpdate(availableExt) : void 0, onToggle: handleToggleDisabled, onUninstall: handleUninstall }, extension_1.filePath);
|
|
6506
6884
|
}) });
|
|
6507
6885
|
};
|
|
6508
|
-
const filteredAvailableExtensions = availableExtensions.filter((
|
|
6509
|
-
const
|
|
6510
|
-
const
|
|
6511
|
-
if (!
|
|
6886
|
+
const filteredAvailableExtensions = availableExtensions.filter((ext_1) => {
|
|
6887
|
+
const searchLower_0 = searchQuery.toLowerCase();
|
|
6888
|
+
const matchesSearch_0 = ext_1.name.toLowerCase().includes(searchLower_0) || ext_1.description?.toLowerCase().includes(searchLower_0) || ext_1.author?.toLowerCase().includes(searchLower_0);
|
|
6889
|
+
if (!matchesSearch_0) {
|
|
6512
6890
|
return false;
|
|
6513
6891
|
}
|
|
6514
6892
|
if (selectedCapabilities.size > 0) {
|
|
6515
|
-
const
|
|
6516
|
-
const
|
|
6517
|
-
if (!
|
|
6893
|
+
const extCapabilities_0 = ext_1.capabilities || [];
|
|
6894
|
+
const hasSelectedCapability_0 = Array.from(selectedCapabilities).some((cap_0) => extCapabilities_0.includes(cap_0));
|
|
6895
|
+
if (!hasSelectedCapability_0) {
|
|
6518
6896
|
return false;
|
|
6519
6897
|
}
|
|
6520
6898
|
}
|
|
@@ -6522,80 +6900,80 @@ const ExtensionsSettings = ({
|
|
|
6522
6900
|
});
|
|
6523
6901
|
const renderAvailableTab = () => {
|
|
6524
6902
|
const extensionsByRepository = /* @__PURE__ */ new Map();
|
|
6525
|
-
filteredAvailableExtensions.forEach((
|
|
6526
|
-
const repo =
|
|
6903
|
+
filteredAvailableExtensions.forEach((extension_2) => {
|
|
6904
|
+
const repo = extension_2.repositoryUrl;
|
|
6527
6905
|
if (!extensionsByRepository.has(repo)) {
|
|
6528
6906
|
extensionsByRepository.set(repo, []);
|
|
6529
6907
|
}
|
|
6530
|
-
extensionsByRepository.get(repo).push(
|
|
6908
|
+
extensionsByRepository.get(repo).push(extension_2);
|
|
6531
6909
|
});
|
|
6532
|
-
const renderExtensionCard = (
|
|
6533
|
-
const
|
|
6534
|
-
if (
|
|
6910
|
+
const renderExtensionCard = (extension_3) => {
|
|
6911
|
+
const installedExtension_0 = installedExtensions.find((inst_0) => {
|
|
6912
|
+
if (inst_0.id !== extension_3.id) {
|
|
6535
6913
|
return false;
|
|
6536
6914
|
}
|
|
6537
6915
|
if (profileContext === "global") {
|
|
6538
|
-
return !
|
|
6916
|
+
return !inst_0.projectDir;
|
|
6539
6917
|
}
|
|
6540
|
-
return
|
|
6918
|
+
return inst_0.projectDir === profileContext;
|
|
6541
6919
|
});
|
|
6542
|
-
if (
|
|
6543
|
-
const
|
|
6544
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(ExtensionCard, { extension, isInstalled: true, isDisabled:
|
|
6920
|
+
if (installedExtension_0) {
|
|
6921
|
+
const extensionHasUpdate_0 = extension_3.version !== installedExtension_0.metadata.version;
|
|
6922
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(ExtensionCard, { extension: extension_3, isInstalled: true, isDisabled: disabledExtensions_0.includes(installedExtension_0.filePath), isUninstalling: uninstallingExtensions.has(installedExtension_0.filePath), isUpdating: updatingExtensions.has(installedExtension_0.filePath), hasUpdate: extensionHasUpdate_0, installedFilePath: installedExtension_0.filePath, onToggle: handleToggleDisabled, onUninstall: handleUninstall, onUpdate: () => handleUpdate(extension_3) }, extension_3.id);
|
|
6545
6923
|
}
|
|
6546
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(ExtensionCard, { extension, isInstalling: installingExtensions.has(
|
|
6924
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(ExtensionCard, { extension: extension_3, isInstalling: installingExtensions.has(extension_3.id), onInstall: handleInstall }, extension_3.id);
|
|
6547
6925
|
};
|
|
6548
|
-
const handleToggleRepository = (
|
|
6549
|
-
setExpandedRepositories((
|
|
6550
|
-
const next = new Set(
|
|
6551
|
-
if (next.has(
|
|
6552
|
-
next.delete(
|
|
6926
|
+
const handleToggleRepository = (repositoryUrl_0) => {
|
|
6927
|
+
setExpandedRepositories((prev_5) => {
|
|
6928
|
+
const next = new Set(prev_5);
|
|
6929
|
+
if (next.has(repositoryUrl_0)) {
|
|
6930
|
+
next.delete(repositoryUrl_0);
|
|
6553
6931
|
} else {
|
|
6554
|
-
next.add(
|
|
6932
|
+
next.add(repositoryUrl_0);
|
|
6555
6933
|
}
|
|
6556
6934
|
return next;
|
|
6557
6935
|
});
|
|
6558
6936
|
};
|
|
6559
|
-
const renderRepositorySection = (
|
|
6560
|
-
const installedCount =
|
|
6561
|
-
if (
|
|
6937
|
+
const renderRepositorySection = (repositoryUrl_1, extensions_1) => {
|
|
6938
|
+
const installedCount = extensions_1.filter((ext_2) => installedExtensions.some((inst_1) => {
|
|
6939
|
+
if (inst_1.id !== ext_2.id) {
|
|
6562
6940
|
return false;
|
|
6563
6941
|
}
|
|
6564
6942
|
if (profileContext === "global") {
|
|
6565
|
-
return !
|
|
6943
|
+
return !inst_1.projectDir;
|
|
6566
6944
|
}
|
|
6567
|
-
return
|
|
6945
|
+
return inst_1.projectDir === profileContext;
|
|
6568
6946
|
})).length;
|
|
6569
|
-
const isDefault =
|
|
6570
|
-
const isExpanded = expandedRepositories.has(
|
|
6571
|
-
const isLoadingRepo = loadingRepositories.has(
|
|
6947
|
+
const isDefault = repositoryUrl_1 === AIDER_DESK_EXTENSIONS_REPO_URL;
|
|
6948
|
+
const isExpanded = expandedRepositories.has(repositoryUrl_1);
|
|
6949
|
+
const isLoadingRepo = loadingRepositories.has(repositoryUrl_1);
|
|
6572
6950
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "rounded-lg border border-border-light bg-bg-secondary-light overflow-hidden group", children: [
|
|
6573
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx("flex items-center justify-between px-4 py-3 cursor-pointer transition-colors", "bg-gradient-to-r from-button-primary via-button-primary to-bg-tertiary", "bg-[length:4px_100%,100%_100%] bg-no-repeat hover:bg-[length:4px_100%,100%_100%]", "hover:to-bg-secondary-light"), onClick: () => handleToggleRepository(
|
|
6951
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx("flex items-center justify-between px-4 py-3 cursor-pointer transition-colors", "bg-gradient-to-r from-button-primary via-button-primary to-bg-tertiary", "bg-[length:4px_100%,100%_100%] bg-no-repeat hover:bg-[length:4px_100%,100%_100%]", "hover:to-bg-secondary-light"), onClick: () => handleToggleRepository(repositoryUrl_1), children: [
|
|
6574
6952
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-3 flex-1 min-w-0 ml-3", children: [
|
|
6575
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-sm font-semibold text-text-primary font-mono truncate", children: formatRepositoryName(
|
|
6953
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-sm font-semibold text-text-primary font-mono truncate", children: formatRepositoryName(repositoryUrl_1) }),
|
|
6576
6954
|
isLoadingRepo ? /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-3xs text-text-muted font-medium", children: t("settings.extensions.loading") }) : /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-3xs text-text-muted font-medium", children: [
|
|
6577
6955
|
installedCount,
|
|
6578
6956
|
"/",
|
|
6579
|
-
|
|
6957
|
+
extensions_1.length,
|
|
6580
6958
|
" ",
|
|
6581
6959
|
t("settings.extensions.available.installedExtensions")
|
|
6582
6960
|
] })
|
|
6583
6961
|
] }),
|
|
6584
6962
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 flex-shrink-0", children: [
|
|
6585
|
-
!isDefault && /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { icon: /* @__PURE__ */ jsxRuntimeExports.jsx(FaTrash, {}), onClick: () => handleRemoveRepository(
|
|
6963
|
+
!isDefault && /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { icon: /* @__PURE__ */ jsxRuntimeExports.jsx(FaTrash, {}), onClick: () => handleRemoveRepository(repositoryUrl_1), tooltip: t("settings.extensions.repositories.remove"), className: "text-error hover:text-error-light transition-colors opacity-0 group-hover:opacity-100" }),
|
|
6586
6964
|
/* @__PURE__ */ jsxRuntimeExports.jsx(FaChevronDown, { className: clsx("w-3 h-3 text-text-muted transition-transform duration-200", !isExpanded && "-rotate-90") })
|
|
6587
6965
|
] })
|
|
6588
6966
|
] }),
|
|
6589
|
-
isExpanded && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "p-4 space-y-3", children:
|
|
6590
|
-
] },
|
|
6967
|
+
isExpanded && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "p-4 space-y-3", children: extensions_1.map(renderExtensionCard) })
|
|
6968
|
+
] }, repositoryUrl_1);
|
|
6591
6969
|
};
|
|
6592
6970
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-3", children: [
|
|
6593
6971
|
renderAddRepository(),
|
|
6594
6972
|
loadingAvailable ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center justify-center py-12 text-2xs relative", children: /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingOverlay, { message: t("settings.extensions.loading"), spinnerSize: "sm", transparent: true }) }) : extensionsByRepository.size === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-col items-center justify-center py-12 text-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-text-muted", children: t("settings.extensions.available.empty") }) }) : /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-3", children: [
|
|
6595
|
-
Array.from(extensionsByRepository.entries()).map(([repoUrl,
|
|
6596
|
-
Array.from(loadingRepositories).map((
|
|
6597
|
-
if (!extensionsByRepository.has(
|
|
6598
|
-
return renderRepositorySection(
|
|
6973
|
+
Array.from(extensionsByRepository.entries()).map(([repoUrl, extensions_2]) => renderRepositorySection(repoUrl, extensions_2)),
|
|
6974
|
+
Array.from(loadingRepositories).map((repoUrl_0) => {
|
|
6975
|
+
if (!extensionsByRepository.has(repoUrl_0)) {
|
|
6976
|
+
return renderRepositorySection(repoUrl_0, []);
|
|
6599
6977
|
}
|
|
6600
6978
|
return null;
|
|
6601
6979
|
})
|
|
@@ -6603,7 +6981,7 @@ const ExtensionsSettings = ({
|
|
|
6603
6981
|
] });
|
|
6604
6982
|
};
|
|
6605
6983
|
const isLoading = loadingInstalled || loadingAvailable;
|
|
6606
|
-
const allCapabilities = Array.from(/* @__PURE__ */ new Set([...installedExtensions.flatMap((
|
|
6984
|
+
const allCapabilities = Array.from(/* @__PURE__ */ new Set([...installedExtensions.flatMap((ext_3) => ext_3.metadata.capabilities || []), ...availableExtensions.flatMap((ext_4) => ext_4.capabilities || [])])).sort();
|
|
6607
6985
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
|
|
6608
6986
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between gap-4", children: [
|
|
6609
6987
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex gap-1 p-1 bg-bg-primary rounded-lg border border-border-default", children: [
|
|
@@ -6635,19 +7013,19 @@ const ExtensionsSettings = ({
|
|
|
6635
7013
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-2", children: [
|
|
6636
7014
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative", children: [
|
|
6637
7015
|
/* @__PURE__ */ jsxRuntimeExports.jsx(FaSearch, { className: "absolute left-3.5 top-1/2 -translate-y-1/2 w-4 h-4 text-text-muted pointer-events-none" }),
|
|
6638
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Input, { value: searchQuery, onChange: (
|
|
7016
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Input, { value: searchQuery, onChange: (e_1) => setSearchQuery(e_1.target.value), placeholder: t("settings.extensions.search.placeholder"), className: "pl-10 bg-bg-primary border w-full", wrapperClassName: "w-full" })
|
|
6639
7017
|
] }),
|
|
6640
7018
|
allCapabilities.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-wrap gap-1", children: allCapabilities.map((capability) => {
|
|
6641
7019
|
const isSelected = selectedCapabilities.has(capability);
|
|
6642
7020
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("button", { onClick: () => {
|
|
6643
|
-
setSelectedCapabilities((
|
|
6644
|
-
const
|
|
6645
|
-
if (
|
|
6646
|
-
|
|
7021
|
+
setSelectedCapabilities((prev_6) => {
|
|
7022
|
+
const next_0 = new Set(prev_6);
|
|
7023
|
+
if (next_0.has(capability)) {
|
|
7024
|
+
next_0.delete(capability);
|
|
6647
7025
|
} else {
|
|
6648
|
-
|
|
7026
|
+
next_0.add(capability);
|
|
6649
7027
|
}
|
|
6650
|
-
return
|
|
7028
|
+
return next_0;
|
|
6651
7029
|
});
|
|
6652
7030
|
}, className: clsx("px-3 py-1 text-3xs font-medium rounded-full transition-colors border border-border-default", isSelected ? "bg-bg-secondary-light text-text-primary" : "bg-bg-primary text-text-muted hover:text-text-secondary hover:bg-bg-tertiary"), children: capability }, capability);
|
|
6653
7031
|
}) })
|