@tutti-os/agent-gui 0.0.37 → 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.
Files changed (49) hide show
  1. package/dist/{AgentMessageMarkdown-Fv7I0HUN.d.ts → AgentMessageMarkdown-BVeh06AJ.d.ts} +5 -0
  2. package/dist/agent-conversation/index.d.ts +1 -1
  3. package/dist/agent-conversation/index.js +5 -5
  4. package/dist/agent-message-center/index.d.ts +1 -0
  5. package/dist/agent-message-center/index.js +231 -15
  6. package/dist/agent-message-center/index.js.map +1 -1
  7. package/dist/app/renderer/agentactivity.css +67 -0
  8. package/dist/{chunk-5YJPISWJ.js → chunk-3AXEEQMV.js} +24 -7
  9. package/dist/chunk-3AXEEQMV.js.map +1 -0
  10. package/dist/{chunk-BQNHPMQY.js → chunk-46IYJEZX.js} +98 -5
  11. package/dist/chunk-46IYJEZX.js.map +1 -0
  12. package/dist/{chunk-UHQDBXGH.js → chunk-5HQDW73P.js} +497 -233
  13. package/dist/chunk-5HQDW73P.js.map +1 -0
  14. package/dist/{chunk-2ADVHCST.js → chunk-B2JKDZSR.js} +1 -1
  15. package/dist/{chunk-2ADVHCST.js.map → chunk-B2JKDZSR.js.map} +1 -1
  16. package/dist/{chunk-MKSRP5XS.js → chunk-C7ZZZXKB.js} +5 -5
  17. package/dist/{chunk-XROBPALT.js → chunk-RE3AHBX6.js} +2 -2
  18. package/dist/{chunk-JL2WNRYC.js → chunk-WJPEKD3F.js} +17 -1
  19. package/dist/chunk-WJPEKD3F.js.map +1 -0
  20. package/dist/{chunk-NCS7X3XY.js → chunk-XL2EKJTQ.js} +15 -3
  21. package/dist/chunk-XL2EKJTQ.js.map +1 -0
  22. package/dist/{chunk-WHWZZYBV.js → chunk-Y2DQJPTL.js} +2 -2
  23. package/dist/{chunk-SXHVKUUI.js → chunk-Y5SE2XMU.js} +72 -15
  24. package/dist/chunk-Y5SE2XMU.js.map +1 -0
  25. package/dist/{chunk-MUZMBEFO.js → chunk-ZWJBG2JM.js} +21 -2
  26. package/dist/chunk-ZWJBG2JM.js.map +1 -0
  27. package/dist/context-mention-palette/index.js +6 -6
  28. package/dist/i18n/index.d.ts +16 -0
  29. package/dist/i18n/index.js +1 -1
  30. package/dist/index.d.ts +5 -3
  31. package/dist/index.js +2163 -998
  32. package/dist/index.js.map +1 -1
  33. package/dist/workbench/contribution.js +2 -2
  34. package/dist/workbench/index.d.ts +2 -1
  35. package/dist/workbench/index.js +2 -2
  36. package/dist/workbench/state.d.ts +6 -0
  37. package/dist/workbench/state.js +1 -1
  38. package/dist/workspace-agent-generated-files.js +2 -2
  39. package/package.json +13 -12
  40. package/dist/chunk-5YJPISWJ.js.map +0 -1
  41. package/dist/chunk-BQNHPMQY.js.map +0 -1
  42. package/dist/chunk-JL2WNRYC.js.map +0 -1
  43. package/dist/chunk-MUZMBEFO.js.map +0 -1
  44. package/dist/chunk-NCS7X3XY.js.map +0 -1
  45. package/dist/chunk-SXHVKUUI.js.map +0 -1
  46. package/dist/chunk-UHQDBXGH.js.map +0 -1
  47. /package/dist/{chunk-MKSRP5XS.js.map → chunk-C7ZZZXKB.js.map} +0 -0
  48. /package/dist/{chunk-XROBPALT.js.map → chunk-RE3AHBX6.js.map} +0 -0
  49. /package/dist/{chunk-WHWZZYBV.js.map → chunk-Y2DQJPTL.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 = {
@@ -534,6 +538,7 @@ interface AgentGUIConversationSummary {
534
538
  status: AgentGUIConversationStatus;
535
539
  cwd: string;
536
540
  project?: AgentGUIConversationProjectSummary | null;
541
+ projectMode?: "none";
537
542
  pinnedAtUnixMs?: number | null;
538
543
  sortTimeUnixMs?: number;
539
544
  updatedAtUnixMs: number;
@@ -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-Fv7I0HUN.js';
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-5YJPISWJ.js";
10
- import "../chunk-UHQDBXGH.js";
11
- import "../chunk-XROBPALT.js";
9
+ } from "../chunk-3AXEEQMV.js";
10
+ import "../chunk-5HQDW73P.js";
11
+ import "../chunk-RE3AHBX6.js";
12
12
  import "../chunk-Y35GDLP2.js";
13
- import "../chunk-2ADVHCST.js";
13
+ import "../chunk-B2JKDZSR.js";
14
14
  import "../chunk-TYGL25EL.js";
15
15
  import {
16
16
  translate
17
- } from "../chunk-JL2WNRYC.js";
17
+ } from "../chunk-WJPEKD3F.js";
18
18
  import "../chunk-LUGELG5V.js";
19
19
  import "../chunk-PJP5BUU6.js";
20
20
 
@@ -37,6 +37,7 @@ interface WorkspaceAgentMessageCenterItem {
37
37
  provider: string;
38
38
  userId: string | null;
39
39
  title: string;
40
+ imported?: boolean;
40
41
  identity: WorkspaceAgentMessageCenterIdentity | null;
41
42
  cwd: string;
42
43
  status: WorkspaceAgentActivityStatus;
@@ -1,9 +1,10 @@
1
1
  import {
2
2
  AgentInteractivePromptSurface,
3
3
  approvalOptionDisplayLabel,
4
+ formatAgentSessionMentionText,
4
5
  getPromptToolDetails,
5
6
  isPromptRequestIdTitle
6
- } from "../chunk-BQNHPMQY.js";
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-UHQDBXGH.js";
20
+ } from "../chunk-5HQDW73P.js";
20
21
  import {
21
22
  managedAgentRoundedIconUrl,
22
23
  userAvatarPlaceholderUrl,
23
24
  workspaceAgentActivityStatusLabel
24
- } from "../chunk-WHWZZYBV.js";
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-2ADVHCST.js";
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-JL2WNRYC.js";
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(
@@ -488,6 +491,7 @@ function buildWorkspaceAgentMessageCenterModel(snapshot, options = {}) {
488
491
  provider: session.provider,
489
492
  userId: session.userId?.trim() || null,
490
493
  title,
494
+ ...isImportedMessageCenterSession(session) ? { imported: true } : {},
491
495
  identity: resolveMessageCenterIdentity(
492
496
  session.agentSessionId,
493
497
  options.identityBySessionId
@@ -531,6 +535,9 @@ function resolveMessageCenterIdentity(agentSessionId, identityBySessionId) {
531
535
  ...agentAvatarUrl ? { agentAvatarUrl } : {}
532
536
  };
533
537
  }
538
+ function isImportedMessageCenterSession(session) {
539
+ return session.runtimeContext?.imported === true;
540
+ }
534
541
  function isWaitingMessageCenterItem(item) {
535
542
  return item.pendingPrompt !== null || item.needsAttentionKind !== null;
536
543
  }
@@ -572,7 +579,11 @@ function resolveSessionMessages(snapshot, session) {
572
579
  }
573
580
  return [];
574
581
  }
575
- function resolveSessionTitle(session, firstUserMessageSummary) {
582
+ function resolveSessionTitle(session, latestUserMessageSummary, firstUserMessageSummary) {
583
+ const latest = latestUserMessageSummary.trim();
584
+ if (latest) {
585
+ return latest;
586
+ }
576
587
  const title = session.title.trim();
577
588
  if (title) {
578
589
  return title;
@@ -584,13 +595,25 @@ function resolveDigestFallbackTitle(session) {
584
595
  }
585
596
  function analyzeMessageCenterSessionMessages(agentSessionId, messages) {
586
597
  let firstUserMessageSummary = "";
598
+ let latestUserMessageSummary = "";
599
+ let latestUserMessageAtUnixMs = Number.NEGATIVE_INFINITY;
587
600
  let latestAgentMessage = null;
588
601
  let latestDigestAgentMessage = null;
589
602
  let latestPendingPrompt = null;
590
603
  let latestOutcome = null;
591
604
  for (const message of messages) {
592
- if (!firstUserMessageSummary && isUserMessageRole(message.role)) {
593
- firstUserMessageSummary = messageSummary(message);
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
+ }
594
617
  }
595
618
  if (isAgentMessageRole2(message.role)) {
596
619
  const summary = messageSummary(message);
@@ -624,6 +647,7 @@ function analyzeMessageCenterSessionMessages(agentSessionId, messages) {
624
647
  }
625
648
  return {
626
649
  firstUserMessageSummary,
650
+ latestUserMessageSummary,
627
651
  latestDigestAgentMessage,
628
652
  latestAgentMessage,
629
653
  latestTurnOutcome: latestOutcome?.outcome ?? null,
@@ -932,7 +956,13 @@ import {
932
956
  useRef,
933
957
  useState
934
958
  } from "react";
935
- import { ChevronDown, ChevronUp, ExternalLink, Info } from "lucide-react";
959
+ import {
960
+ AppWindow,
961
+ ChevronDown,
962
+ ChevronUp,
963
+ ExternalLink,
964
+ Info
965
+ } from "lucide-react";
936
966
  import {
937
967
  Button,
938
968
  cn as cn2,
@@ -941,6 +971,10 @@ import {
941
971
  TooltipContent,
942
972
  TooltipTrigger
943
973
  } from "@tutti-os/ui-system";
974
+ import {
975
+ isRichTextMentionHref,
976
+ parseRichTextMentionHref
977
+ } from "@tutti-os/ui-rich-text/core";
944
978
  import { jsx as jsx2, jsxs } from "react/jsx-runtime";
945
979
  function stopMessageCenterTextPointerPropagation(event) {
946
980
  event.stopPropagation();
@@ -1353,16 +1387,99 @@ function MessageCenterStackSummary({
1353
1387
  }
1354
1388
  )
1355
1389
  ] }),
1356
- /* @__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: messageCenterStackPreviewText(firstItem) }) })
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) }) })
1357
1391
  ]
1358
1392
  }
1359
1393
  )
1360
1394
  }
1361
1395
  );
1362
1396
  }
1363
- function messageCenterStackPreviewText(item) {
1397
+ function messageCenterStackRawPreviewText(item) {
1364
1398
  return item.digest.primary.summary.trim() || item.lastAgentMessageSummary.trim() || normalizeAgentTitleText(item.title);
1365
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
+ }
1366
1483
  function resolveMessageCenterNotificationAction(item, input) {
1367
1484
  if (input.action) {
1368
1485
  return normalizeMessageCenterNotificationAction(input.action);
@@ -2281,6 +2398,9 @@ function isRecentlyCompletedMessageCenterItem(item, nowUnixMs) {
2281
2398
  if (messageCenterStatusFilterValue(item) !== "completed") {
2282
2399
  return false;
2283
2400
  }
2401
+ if (item.imported) {
2402
+ return false;
2403
+ }
2284
2404
  const completedAtUnixMs = item.sortTimeUnixMs || item.lastAgentMessageAtUnixMs || 0;
2285
2405
  if (completedAtUnixMs <= 0) {
2286
2406
  return false;
@@ -2466,6 +2586,90 @@ function MessageCenterOptionWithCount({
2466
2586
  ] });
2467
2587
  }
2468
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
+
2469
2673
  // agent-message-center/WorkspaceAgentMessageCenterPanel.tsx
2470
2674
  import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
2471
2675
  var MESSAGE_CENTER_TOOLTIP_DELAY_MS = 300;
@@ -2520,11 +2724,23 @@ function WorkspaceAgentMessageCenterPanelContent({
2520
2724
  }) {
2521
2725
  "use memo";
2522
2726
  const { t } = useTranslation();
2523
- const [groupBy, setGroupBy] = useState3("priority");
2524
- const [statusFilters, setStatusFilters] = useState3(null);
2727
+ const [initialFilters] = useState3(readMessageCenterFilterPreferences);
2728
+ const [groupBy, setGroupBy] = useState3(
2729
+ initialFilters.groupBy
2730
+ );
2731
+ const [statusFilters, setStatusFilters] = useState3(
2732
+ initialFilters.statusFilters
2733
+ );
2525
2734
  const [providerFilters, setProviderFilters] = useState3(
2526
- null
2735
+ initialFilters.providerFilters
2527
2736
  );
2737
+ useEffect3(() => {
2738
+ writeMessageCenterFilterPreferences({
2739
+ groupBy,
2740
+ statusFilters,
2741
+ providerFilters
2742
+ });
2743
+ }, [groupBy, statusFilters, providerFilters]);
2528
2744
  const [expandedStackIds, setExpandedStackIds] = useState3(
2529
2745
  () => /* @__PURE__ */ new Set()
2530
2746
  );
@@ -3108,7 +3324,7 @@ function stabilizeWorkspaceAgentMessageCenterModel(previous, next) {
3108
3324
  };
3109
3325
  }
3110
3326
  function messageCenterItemsEqual(left, right) {
3111
- return left.id === right.id && left.agentSessionId === right.agentSessionId && left.provider === right.provider && left.userId === right.userId && left.title === right.title && left.cwd === right.cwd && left.status === right.status && left.lastAgentMessageSummary === right.lastAgentMessageSummary && left.lastAgentMessageAtUnixMs === right.lastAgentMessageAtUnixMs && left.needsAttentionKind === right.needsAttentionKind && left.needsAttentionSummary === right.needsAttentionSummary && left.sortTimeUnixMs === right.sortTimeUnixMs && messageCenterIdentityEqual(left.identity, right.identity) && messageCenterDigestEqual(left.digest, right.digest) && messageCenterPromptEqual(left.pendingPrompt, right.pendingPrompt) && messageCenterTurnOutcomeEqual(
3327
+ return left.id === right.id && left.agentSessionId === right.agentSessionId && left.provider === right.provider && left.userId === right.userId && left.title === right.title && left.imported === right.imported && left.cwd === right.cwd && left.status === right.status && left.lastAgentMessageSummary === right.lastAgentMessageSummary && left.lastAgentMessageAtUnixMs === right.lastAgentMessageAtUnixMs && left.needsAttentionKind === right.needsAttentionKind && left.needsAttentionSummary === right.needsAttentionSummary && left.sortTimeUnixMs === right.sortTimeUnixMs && messageCenterIdentityEqual(left.identity, right.identity) && messageCenterDigestEqual(left.digest, right.digest) && messageCenterPromptEqual(left.pendingPrompt, right.pendingPrompt) && messageCenterTurnOutcomeEqual(
3112
3328
  left.latestTurnOutcome ?? null,
3113
3329
  right.latestTurnOutcome ?? null
3114
3330
  );