@tutti-os/agent-gui 0.0.38 → 0.0.39
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/{AgentMessageMarkdown-Cq-7DSV2.d.ts → AgentMessageMarkdown-BVeh06AJ.d.ts} +4 -0
- package/dist/agent-conversation/index.d.ts +1 -1
- package/dist/agent-conversation/index.js +5 -5
- package/dist/agent-message-center/index.js +223 -14
- package/dist/agent-message-center/index.js.map +1 -1
- package/dist/app/renderer/agentactivity.css +67 -0
- package/dist/{chunk-7F4M55U3.js → chunk-3AXEEQMV.js} +24 -7
- package/dist/chunk-3AXEEQMV.js.map +1 -0
- package/dist/{chunk-L7FBT3VR.js → chunk-46IYJEZX.js} +98 -5
- package/dist/chunk-46IYJEZX.js.map +1 -0
- package/dist/{chunk-44YASHVW.js → chunk-5HQDW73P.js} +433 -143
- package/dist/chunk-5HQDW73P.js.map +1 -0
- package/dist/{chunk-2ADVHCST.js → chunk-B2JKDZSR.js} +1 -1
- package/dist/{chunk-2ADVHCST.js.map → chunk-B2JKDZSR.js.map} +1 -1
- package/dist/{chunk-MKSRP5XS.js → chunk-C7ZZZXKB.js} +5 -5
- package/dist/{chunk-XROBPALT.js → chunk-RE3AHBX6.js} +2 -2
- package/dist/{chunk-JL2WNRYC.js → chunk-WJPEKD3F.js} +17 -1
- package/dist/chunk-WJPEKD3F.js.map +1 -0
- package/dist/{chunk-NCS7X3XY.js → chunk-XL2EKJTQ.js} +15 -3
- package/dist/chunk-XL2EKJTQ.js.map +1 -0
- package/dist/{chunk-WHWZZYBV.js → chunk-Y2DQJPTL.js} +2 -2
- package/dist/{chunk-SS5YEVAI.js → chunk-Y5SE2XMU.js} +2 -2
- package/dist/{chunk-MUZMBEFO.js → chunk-ZWJBG2JM.js} +21 -2
- package/dist/chunk-ZWJBG2JM.js.map +1 -0
- package/dist/context-mention-palette/index.js +6 -6
- package/dist/i18n/index.d.ts +16 -0
- package/dist/i18n/index.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2077 -961
- package/dist/index.js.map +1 -1
- package/dist/workbench/contribution.js +2 -2
- package/dist/workbench/index.d.ts +2 -1
- package/dist/workbench/index.js +2 -2
- package/dist/workbench/state.d.ts +6 -0
- package/dist/workbench/state.js +1 -1
- package/dist/workspace-agent-generated-files.js +2 -2
- package/package.json +13 -12
- package/dist/chunk-44YASHVW.js.map +0 -1
- package/dist/chunk-7F4M55U3.js.map +0 -1
- package/dist/chunk-JL2WNRYC.js.map +0 -1
- package/dist/chunk-L7FBT3VR.js.map +0 -1
- package/dist/chunk-MUZMBEFO.js.map +0 -1
- package/dist/chunk-NCS7X3XY.js.map +0 -1
- /package/dist/{chunk-MKSRP5XS.js.map → chunk-C7ZZZXKB.js.map} +0 -0
- /package/dist/{chunk-XROBPALT.js.map → chunk-RE3AHBX6.js.map} +0 -0
- /package/dist/{chunk-WHWZZYBV.js.map → chunk-Y2DQJPTL.js.map} +0 -0
- /package/dist/{chunk-SS5YEVAI.js.map → chunk-Y5SE2XMU.js.map} +0 -0
|
@@ -252,6 +252,10 @@ type AgentHostWorkspaceAgentSessionMessagesRuntimeInput = AgentHostWorkspaceScop
|
|
|
252
252
|
type AgentHostWorkspaceAgentSessionSummaryRuntimeInput = AgentHostWorkspaceScopedInput<AgentHostWorkspaceAgentSessionSummaryInput>;
|
|
253
253
|
type AgentHostDeleteWorkspaceAgentSessionRuntimeInput = AgentHostWorkspaceScopedInput<AgentHostDeleteWorkspaceAgentSessionInput>;
|
|
254
254
|
type AgentHostClipboardApi = {
|
|
255
|
+
writeImage?: (input: {
|
|
256
|
+
data: string;
|
|
257
|
+
mimeType: "image/png";
|
|
258
|
+
}) => AgentHostAsyncResult<void>;
|
|
255
259
|
writeText: (text: string) => AgentHostAsyncResult<void>;
|
|
256
260
|
};
|
|
257
261
|
type AgentHostDebugApi = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode, JSX } from 'react';
|
|
3
3
|
import { W as WorkspaceLinkAction } from '../workspaceLinkActions-C6POH38D.js';
|
|
4
|
-
import { b as AgentGUIProviderSkillOption, l as AgentMessageMarkdownWorkspaceAppIcon } from '../AgentMessageMarkdown-
|
|
4
|
+
import { b as AgentGUIProviderSkillOption, l as AgentMessageMarkdownWorkspaceAppIcon } from '../AgentMessageMarkdown-BVeh06AJ.js';
|
|
5
5
|
import { c as AgentConversationVM, W as WorkspaceAgentSessionDetailViewModel } from '../agentConversationVM-1QgRwvwZ.js';
|
|
6
6
|
export { B as BuildWorkspaceAgentSessionDetailInput, d as buildWorkspaceAgentSessionDetailViewModel } from '../agentConversationVM-1QgRwvwZ.js';
|
|
7
7
|
export { W as WorkspaceAgentActivityCard, n as WorkspaceAgentActivitySession, q as WorkspaceAgentActivityTimelineItem } from '../workspaceAgentActivityListViewModel-DLnMBMoh.js';
|
|
@@ -6,15 +6,15 @@ import {
|
|
|
6
6
|
projectAgentConversationVM,
|
|
7
7
|
reconcileProjectedAgentConversationVM,
|
|
8
8
|
useProjectedAgentConversation
|
|
9
|
-
} from "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
9
|
+
} from "../chunk-3AXEEQMV.js";
|
|
10
|
+
import "../chunk-5HQDW73P.js";
|
|
11
|
+
import "../chunk-RE3AHBX6.js";
|
|
12
12
|
import "../chunk-Y35GDLP2.js";
|
|
13
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-B2JKDZSR.js";
|
|
14
14
|
import "../chunk-TYGL25EL.js";
|
|
15
15
|
import {
|
|
16
16
|
translate
|
|
17
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-WJPEKD3F.js";
|
|
18
18
|
import "../chunk-LUGELG5V.js";
|
|
19
19
|
import "../chunk-PJP5BUU6.js";
|
|
20
20
|
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentInteractivePromptSurface,
|
|
3
3
|
approvalOptionDisplayLabel,
|
|
4
|
+
formatAgentSessionMentionText,
|
|
4
5
|
getPromptToolDetails,
|
|
5
6
|
isPromptRequestIdTitle
|
|
6
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-46IYJEZX.js";
|
|
7
8
|
import {
|
|
8
9
|
PLAN_IMPLEMENTATION_ACTION_IMPLEMENT,
|
|
9
10
|
PLAN_IMPLEMENTATION_PROMPT,
|
|
@@ -16,17 +17,17 @@ import {
|
|
|
16
17
|
cn,
|
|
17
18
|
extractAgentMcpToolTarget,
|
|
18
19
|
normalizeAskUserQuestions
|
|
19
|
-
} from "../chunk-
|
|
20
|
+
} from "../chunk-5HQDW73P.js";
|
|
20
21
|
import {
|
|
21
22
|
managedAgentRoundedIconUrl,
|
|
22
23
|
userAvatarPlaceholderUrl,
|
|
23
24
|
workspaceAgentActivityStatusLabel
|
|
24
|
-
} from "../chunk-
|
|
25
|
+
} from "../chunk-Y2DQJPTL.js";
|
|
25
26
|
import "../chunk-MTFSQWZ6.js";
|
|
26
27
|
import {
|
|
27
28
|
resolveWorkspaceAgentSessionSortTimeUnixMs
|
|
28
29
|
} from "../chunk-IBIMGLCD.js";
|
|
29
|
-
import "../chunk-
|
|
30
|
+
import "../chunk-B2JKDZSR.js";
|
|
30
31
|
import {
|
|
31
32
|
workspaceAgentProviderLabel
|
|
32
33
|
} from "../chunk-TYGL25EL.js";
|
|
@@ -35,8 +36,9 @@ import {
|
|
|
35
36
|
} from "../chunk-GCBDIQDX.js";
|
|
36
37
|
import {
|
|
37
38
|
AgentGuiI18nProvider,
|
|
39
|
+
getActiveUiLanguage,
|
|
38
40
|
useTranslation
|
|
39
|
-
} from "../chunk-
|
|
41
|
+
} from "../chunk-WJPEKD3F.js";
|
|
40
42
|
import "../chunk-PJP5BUU6.js";
|
|
41
43
|
|
|
42
44
|
// agent-message-center/WorkspaceAgentMessageCenterPanel.tsx
|
|
@@ -463,6 +465,7 @@ function buildWorkspaceAgentMessageCenterModel(snapshot, options = {}) {
|
|
|
463
465
|
const lastAgentMessage = messageAnalysis.latestAgentMessage;
|
|
464
466
|
const title = resolveSessionTitle(
|
|
465
467
|
session,
|
|
468
|
+
messageAnalysis.latestUserMessageSummary,
|
|
466
469
|
messageAnalysis.firstUserMessageSummary
|
|
467
470
|
);
|
|
468
471
|
const pendingPrompt = messageAnalysis.pendingPrompt ?? codexPlanImplementationPrompt(session, status, messages) ?? fallbackPromptFromNeedsAttention(
|
|
@@ -576,7 +579,11 @@ function resolveSessionMessages(snapshot, session) {
|
|
|
576
579
|
}
|
|
577
580
|
return [];
|
|
578
581
|
}
|
|
579
|
-
function resolveSessionTitle(session, firstUserMessageSummary) {
|
|
582
|
+
function resolveSessionTitle(session, latestUserMessageSummary, firstUserMessageSummary) {
|
|
583
|
+
const latest = latestUserMessageSummary.trim();
|
|
584
|
+
if (latest) {
|
|
585
|
+
return latest;
|
|
586
|
+
}
|
|
580
587
|
const title = session.title.trim();
|
|
581
588
|
if (title) {
|
|
582
589
|
return title;
|
|
@@ -588,13 +595,25 @@ function resolveDigestFallbackTitle(session) {
|
|
|
588
595
|
}
|
|
589
596
|
function analyzeMessageCenterSessionMessages(agentSessionId, messages) {
|
|
590
597
|
let firstUserMessageSummary = "";
|
|
598
|
+
let latestUserMessageSummary = "";
|
|
599
|
+
let latestUserMessageAtUnixMs = Number.NEGATIVE_INFINITY;
|
|
591
600
|
let latestAgentMessage = null;
|
|
592
601
|
let latestDigestAgentMessage = null;
|
|
593
602
|
let latestPendingPrompt = null;
|
|
594
603
|
let latestOutcome = null;
|
|
595
604
|
for (const message of messages) {
|
|
596
|
-
if (
|
|
597
|
-
|
|
605
|
+
if (isUserMessageRole(message.role)) {
|
|
606
|
+
const summary = messageSummary(message);
|
|
607
|
+
if (!firstUserMessageSummary && summary) {
|
|
608
|
+
firstUserMessageSummary = summary;
|
|
609
|
+
}
|
|
610
|
+
if (summary) {
|
|
611
|
+
const occurredAtUnixMs = messageTimeUnixMs(message);
|
|
612
|
+
if (occurredAtUnixMs >= latestUserMessageAtUnixMs) {
|
|
613
|
+
latestUserMessageSummary = summary;
|
|
614
|
+
latestUserMessageAtUnixMs = occurredAtUnixMs;
|
|
615
|
+
}
|
|
616
|
+
}
|
|
598
617
|
}
|
|
599
618
|
if (isAgentMessageRole2(message.role)) {
|
|
600
619
|
const summary = messageSummary(message);
|
|
@@ -628,6 +647,7 @@ function analyzeMessageCenterSessionMessages(agentSessionId, messages) {
|
|
|
628
647
|
}
|
|
629
648
|
return {
|
|
630
649
|
firstUserMessageSummary,
|
|
650
|
+
latestUserMessageSummary,
|
|
631
651
|
latestDigestAgentMessage,
|
|
632
652
|
latestAgentMessage,
|
|
633
653
|
latestTurnOutcome: latestOutcome?.outcome ?? null,
|
|
@@ -936,7 +956,13 @@ import {
|
|
|
936
956
|
useRef,
|
|
937
957
|
useState
|
|
938
958
|
} from "react";
|
|
939
|
-
import {
|
|
959
|
+
import {
|
|
960
|
+
AppWindow,
|
|
961
|
+
ChevronDown,
|
|
962
|
+
ChevronUp,
|
|
963
|
+
ExternalLink,
|
|
964
|
+
Info
|
|
965
|
+
} from "lucide-react";
|
|
940
966
|
import {
|
|
941
967
|
Button,
|
|
942
968
|
cn as cn2,
|
|
@@ -945,6 +971,10 @@ import {
|
|
|
945
971
|
TooltipContent,
|
|
946
972
|
TooltipTrigger
|
|
947
973
|
} from "@tutti-os/ui-system";
|
|
974
|
+
import {
|
|
975
|
+
isRichTextMentionHref,
|
|
976
|
+
parseRichTextMentionHref
|
|
977
|
+
} from "@tutti-os/ui-rich-text/core";
|
|
948
978
|
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
949
979
|
function stopMessageCenterTextPointerPropagation(event) {
|
|
950
980
|
event.stopPropagation();
|
|
@@ -1357,16 +1387,99 @@ function MessageCenterStackSummary({
|
|
|
1357
1387
|
}
|
|
1358
1388
|
)
|
|
1359
1389
|
] }),
|
|
1360
|
-
/* @__PURE__ */ jsx2("span", { className: "min-w-0 rounded-md bg-transparency-block p-2.5 text-[13px] leading-[1.45] text-[var(--text-primary)]", children: /* @__PURE__ */ jsx2("span", { className: "line-clamp-2 min-w-0 [overflow-wrap:anywhere]", children:
|
|
1390
|
+
/* @__PURE__ */ jsx2("span", { className: "min-w-0 rounded-md bg-transparency-block p-2.5 text-[13px] leading-[1.45] text-[var(--text-primary)]", children: /* @__PURE__ */ jsx2("span", { className: "line-clamp-2 min-w-0 [overflow-wrap:anywhere]", children: messageCenterStackPreviewNodes(firstItem) }) })
|
|
1361
1391
|
]
|
|
1362
1392
|
}
|
|
1363
1393
|
)
|
|
1364
1394
|
}
|
|
1365
1395
|
);
|
|
1366
1396
|
}
|
|
1367
|
-
function
|
|
1397
|
+
function messageCenterStackRawPreviewText(item) {
|
|
1368
1398
|
return item.digest.primary.summary.trim() || item.lastAgentMessageSummary.trim() || normalizeAgentTitleText(item.title);
|
|
1369
1399
|
}
|
|
1400
|
+
function messageCenterStackPreviewText(item) {
|
|
1401
|
+
return formatAgentSessionMentionText(messageCenterStackRawPreviewText(item), {
|
|
1402
|
+
language: getActiveUiLanguage()
|
|
1403
|
+
});
|
|
1404
|
+
}
|
|
1405
|
+
var MESSAGE_CENTER_PREVIEW_MARKDOWN_LINK_PATTERN = /\[((?:\\.|[^\]\\])*)\]\(([^)\s]+)\)/g;
|
|
1406
|
+
var MESSAGE_CENTER_PREVIEW_LABEL_ESCAPE_PATTERN = /\\([\\[\]()])/g;
|
|
1407
|
+
function messageCenterStackPreviewNodes(item) {
|
|
1408
|
+
const text = messageCenterStackRawPreviewText(item);
|
|
1409
|
+
const nodes = [];
|
|
1410
|
+
let lastIndex = 0;
|
|
1411
|
+
let mentionIndex = 0;
|
|
1412
|
+
for (const match of text.matchAll(
|
|
1413
|
+
MESSAGE_CENTER_PREVIEW_MARKDOWN_LINK_PATTERN
|
|
1414
|
+
)) {
|
|
1415
|
+
const [fullMatch, rawLabel = "", href = ""] = match;
|
|
1416
|
+
const matchStart = match.index ?? 0;
|
|
1417
|
+
if (matchStart > lastIndex) {
|
|
1418
|
+
nodes.push(text.slice(lastIndex, matchStart));
|
|
1419
|
+
}
|
|
1420
|
+
const label = rawLabel.replace(
|
|
1421
|
+
MESSAGE_CENTER_PREVIEW_LABEL_ESCAPE_PATTERN,
|
|
1422
|
+
"$1"
|
|
1423
|
+
);
|
|
1424
|
+
const mention = parseRichTextMentionHref(href, label);
|
|
1425
|
+
if (!mention) {
|
|
1426
|
+
nodes.push(isRichTextMentionHref(href) ? label : fullMatch);
|
|
1427
|
+
} else {
|
|
1428
|
+
const kind = messageCenterPreviewMentionKind(mention.providerId);
|
|
1429
|
+
const displayLabel = label || mention.label;
|
|
1430
|
+
nodes.push(
|
|
1431
|
+
kind ? /* @__PURE__ */ jsx2(
|
|
1432
|
+
MessageCenterPreviewMentionChip,
|
|
1433
|
+
{
|
|
1434
|
+
kind,
|
|
1435
|
+
label: displayLabel
|
|
1436
|
+
},
|
|
1437
|
+
`mention-${mentionIndex}`
|
|
1438
|
+
) : displayLabel
|
|
1439
|
+
);
|
|
1440
|
+
mentionIndex += 1;
|
|
1441
|
+
}
|
|
1442
|
+
lastIndex = matchStart + fullMatch.length;
|
|
1443
|
+
}
|
|
1444
|
+
if (lastIndex < text.length) {
|
|
1445
|
+
nodes.push(text.slice(lastIndex));
|
|
1446
|
+
}
|
|
1447
|
+
return nodes;
|
|
1448
|
+
}
|
|
1449
|
+
function messageCenterPreviewMentionKind(providerId) {
|
|
1450
|
+
switch (providerId.trim().toLowerCase()) {
|
|
1451
|
+
case "agent-session":
|
|
1452
|
+
return "session";
|
|
1453
|
+
case "workspace-app":
|
|
1454
|
+
return "workspace-app";
|
|
1455
|
+
case "workspace-issue":
|
|
1456
|
+
return "workspace-issue";
|
|
1457
|
+
default:
|
|
1458
|
+
return null;
|
|
1459
|
+
}
|
|
1460
|
+
}
|
|
1461
|
+
function MessageCenterPreviewMentionChip({
|
|
1462
|
+
kind,
|
|
1463
|
+
label
|
|
1464
|
+
}) {
|
|
1465
|
+
return /* @__PURE__ */ jsxs(
|
|
1466
|
+
"span",
|
|
1467
|
+
{
|
|
1468
|
+
className: "tsh-agent-object-token tsh-agent-object-token--entity",
|
|
1469
|
+
"data-agent-mention-kind": kind,
|
|
1470
|
+
children: [
|
|
1471
|
+
/* @__PURE__ */ jsx2("span", { className: "tsh-agent-object-token__kind", "aria-hidden": "true", children: kind === "workspace-app" ? /* @__PURE__ */ jsx2(AppWindow, { className: "size-3.5", "aria-hidden": "true" }) : /* @__PURE__ */ jsx2(
|
|
1472
|
+
"span",
|
|
1473
|
+
{
|
|
1474
|
+
className: "tsh-agent-object-token__kind-icon",
|
|
1475
|
+
"aria-hidden": "true"
|
|
1476
|
+
}
|
|
1477
|
+
) }),
|
|
1478
|
+
/* @__PURE__ */ jsx2("span", { className: "tsh-agent-object-token__main", children: label })
|
|
1479
|
+
]
|
|
1480
|
+
}
|
|
1481
|
+
);
|
|
1482
|
+
}
|
|
1370
1483
|
function resolveMessageCenterNotificationAction(item, input) {
|
|
1371
1484
|
if (input.action) {
|
|
1372
1485
|
return normalizeMessageCenterNotificationAction(input.action);
|
|
@@ -2473,6 +2586,90 @@ function MessageCenterOptionWithCount({
|
|
|
2473
2586
|
] });
|
|
2474
2587
|
}
|
|
2475
2588
|
|
|
2589
|
+
// agent-message-center/messageCenterFilterPreferences.ts
|
|
2590
|
+
var messageCenterFiltersStorageKey = "tutti.agent-message-center.filters";
|
|
2591
|
+
var messageCenterGroupByValues = /* @__PURE__ */ new Set([
|
|
2592
|
+
"priority",
|
|
2593
|
+
"status",
|
|
2594
|
+
"agent",
|
|
2595
|
+
"time"
|
|
2596
|
+
]);
|
|
2597
|
+
var messageCenterStatusFilterValues = /* @__PURE__ */ new Set([
|
|
2598
|
+
"waiting",
|
|
2599
|
+
"working",
|
|
2600
|
+
"completed",
|
|
2601
|
+
"failed"
|
|
2602
|
+
]);
|
|
2603
|
+
var defaultMessageCenterFilterPreferences = {
|
|
2604
|
+
groupBy: "priority",
|
|
2605
|
+
statusFilters: null,
|
|
2606
|
+
providerFilters: null
|
|
2607
|
+
};
|
|
2608
|
+
function readMessageCenterFilterPreferences() {
|
|
2609
|
+
if (typeof window === "undefined") {
|
|
2610
|
+
return defaultMessageCenterFilterPreferences;
|
|
2611
|
+
}
|
|
2612
|
+
let raw;
|
|
2613
|
+
try {
|
|
2614
|
+
raw = window.localStorage.getItem(messageCenterFiltersStorageKey);
|
|
2615
|
+
} catch {
|
|
2616
|
+
return defaultMessageCenterFilterPreferences;
|
|
2617
|
+
}
|
|
2618
|
+
if (raw === null) {
|
|
2619
|
+
return defaultMessageCenterFilterPreferences;
|
|
2620
|
+
}
|
|
2621
|
+
let parsed;
|
|
2622
|
+
try {
|
|
2623
|
+
parsed = JSON.parse(raw);
|
|
2624
|
+
} catch {
|
|
2625
|
+
return defaultMessageCenterFilterPreferences;
|
|
2626
|
+
}
|
|
2627
|
+
if (typeof parsed !== "object" || parsed === null) {
|
|
2628
|
+
return defaultMessageCenterFilterPreferences;
|
|
2629
|
+
}
|
|
2630
|
+
const record = parsed;
|
|
2631
|
+
return {
|
|
2632
|
+
groupBy: resolveStoredGroupBy(record.groupBy),
|
|
2633
|
+
statusFilters: resolveStoredStatusFilters(record.statusFilters),
|
|
2634
|
+
providerFilters: resolveStoredProviderFilters(record.providerFilters)
|
|
2635
|
+
};
|
|
2636
|
+
}
|
|
2637
|
+
function writeMessageCenterFilterPreferences(preferences) {
|
|
2638
|
+
if (typeof window === "undefined") {
|
|
2639
|
+
return;
|
|
2640
|
+
}
|
|
2641
|
+
const serialized = JSON.stringify({
|
|
2642
|
+
groupBy: preferences.groupBy,
|
|
2643
|
+
statusFilters: preferences.statusFilters ? [...preferences.statusFilters] : null,
|
|
2644
|
+
providerFilters: preferences.providerFilters ? [...preferences.providerFilters] : null
|
|
2645
|
+
});
|
|
2646
|
+
try {
|
|
2647
|
+
window.localStorage.setItem(messageCenterFiltersStorageKey, serialized);
|
|
2648
|
+
} catch {
|
|
2649
|
+
}
|
|
2650
|
+
}
|
|
2651
|
+
function resolveStoredGroupBy(value) {
|
|
2652
|
+
return typeof value === "string" && messageCenterGroupByValues.has(value) ? value : "priority";
|
|
2653
|
+
}
|
|
2654
|
+
function resolveStoredStatusFilters(value) {
|
|
2655
|
+
if (!Array.isArray(value)) {
|
|
2656
|
+
return null;
|
|
2657
|
+
}
|
|
2658
|
+
return new Set(
|
|
2659
|
+
value.filter(
|
|
2660
|
+
(entry) => typeof entry === "string" && messageCenterStatusFilterValues.has(entry)
|
|
2661
|
+
)
|
|
2662
|
+
);
|
|
2663
|
+
}
|
|
2664
|
+
function resolveStoredProviderFilters(value) {
|
|
2665
|
+
if (!Array.isArray(value)) {
|
|
2666
|
+
return null;
|
|
2667
|
+
}
|
|
2668
|
+
return new Set(
|
|
2669
|
+
value.filter((entry) => typeof entry === "string")
|
|
2670
|
+
);
|
|
2671
|
+
}
|
|
2672
|
+
|
|
2476
2673
|
// agent-message-center/WorkspaceAgentMessageCenterPanel.tsx
|
|
2477
2674
|
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
2478
2675
|
var MESSAGE_CENTER_TOOLTIP_DELAY_MS = 300;
|
|
@@ -2527,11 +2724,23 @@ function WorkspaceAgentMessageCenterPanelContent({
|
|
|
2527
2724
|
}) {
|
|
2528
2725
|
"use memo";
|
|
2529
2726
|
const { t } = useTranslation();
|
|
2530
|
-
const [
|
|
2531
|
-
const [
|
|
2727
|
+
const [initialFilters] = useState3(readMessageCenterFilterPreferences);
|
|
2728
|
+
const [groupBy, setGroupBy] = useState3(
|
|
2729
|
+
initialFilters.groupBy
|
|
2730
|
+
);
|
|
2731
|
+
const [statusFilters, setStatusFilters] = useState3(
|
|
2732
|
+
initialFilters.statusFilters
|
|
2733
|
+
);
|
|
2532
2734
|
const [providerFilters, setProviderFilters] = useState3(
|
|
2533
|
-
|
|
2735
|
+
initialFilters.providerFilters
|
|
2534
2736
|
);
|
|
2737
|
+
useEffect3(() => {
|
|
2738
|
+
writeMessageCenterFilterPreferences({
|
|
2739
|
+
groupBy,
|
|
2740
|
+
statusFilters,
|
|
2741
|
+
providerFilters
|
|
2742
|
+
});
|
|
2743
|
+
}, [groupBy, statusFilters, providerFilters]);
|
|
2535
2744
|
const [expandedStackIds, setExpandedStackIds] = useState3(
|
|
2536
2745
|
() => /* @__PURE__ */ new Set()
|
|
2537
2746
|
);
|