@arbidocs/blocks 0.4.66 → 0.4.68

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 (41) hide show
  1. package/dist/agents/index.cjs +221 -221
  2. package/dist/agents/index.js +5 -5
  3. package/dist/{chunk-UWUCWIKQ.cjs → chunk-5ZZCS2EK.cjs} +7 -7
  4. package/dist/chunk-5ZZCS2EK.cjs.map +1 -0
  5. package/dist/{chunk-DHPVD747.js → chunk-FAVN6VUR.js} +7 -7
  6. package/dist/chunk-FAVN6VUR.js.map +1 -0
  7. package/dist/{chunk-MDW5YCHZ.cjs → chunk-VUEZARW5.cjs} +3 -3
  8. package/dist/{chunk-MDW5YCHZ.cjs.map → chunk-VUEZARW5.cjs.map} +1 -1
  9. package/dist/{chunk-HTJXMA26.js → chunk-VZGBCBYB.js} +3 -3
  10. package/dist/{chunk-HTJXMA26.js.map → chunk-VZGBCBYB.js.map} +1 -1
  11. package/dist/connect/index.cjs +22 -22
  12. package/dist/connect/index.js +2 -2
  13. package/dist/facts/FactSearchParts.d.ts +5 -4
  14. package/dist/facts/FactsBulkBar.d.ts +11 -11
  15. package/dist/facts/FactsTable.d.ts +4 -2
  16. package/dist/facts/fact-row.d.ts +0 -1
  17. package/dist/facts/factColumns.d.ts +13 -9
  18. package/dist/facts/index.cjs +65 -51
  19. package/dist/facts/index.cjs.map +1 -1
  20. package/dist/facts/index.js +66 -52
  21. package/dist/facts/index.js.map +1 -1
  22. package/dist/files/index.cjs +3 -3
  23. package/dist/files/index.js +3 -3
  24. package/dist/home/DashboardParts.d.ts +2 -4
  25. package/dist/home/index.cjs +10 -3
  26. package/dist/home/index.cjs.map +1 -1
  27. package/dist/home/index.js +11 -4
  28. package/dist/home/index.js.map +1 -1
  29. package/dist/index.cjs +713 -713
  30. package/dist/index.js +14 -14
  31. package/dist/settings/index.cjs +33 -33
  32. package/dist/settings/index.js +4 -4
  33. package/dist/shell/index.cjs +10 -10
  34. package/dist/shell/index.js +2 -2
  35. package/dist/studio/index.cjs +1 -1
  36. package/dist/studio/index.js +1 -1
  37. package/dist/workspaces/index.cjs +2 -2
  38. package/dist/workspaces/index.js +2 -2
  39. package/package.json +4 -4
  40. package/dist/chunk-DHPVD747.js.map +0 -1
  41. package/dist/chunk-UWUCWIKQ.cjs.map +0 -1
@@ -2,15 +2,15 @@
2
2
  'use strict';
3
3
 
4
4
  var chunkBR2CPKFU_cjs = require('../chunk-BR2CPKFU.cjs');
5
- var chunkMDW5YCHZ_cjs = require('../chunk-MDW5YCHZ.cjs');
5
+ var chunkVUEZARW5_cjs = require('../chunk-VUEZARW5.cjs');
6
6
  var chunkQVBZESYQ_cjs = require('../chunk-QVBZESYQ.cjs');
7
7
  require('../chunk-ADOKTJHV.cjs');
8
8
  var chunk5DM6VU4L_cjs = require('../chunk-5DM6VU4L.cjs');
9
9
  require('../chunk-VGOFFCMT.cjs');
10
10
  require('../chunk-V3L5DONY.cjs');
11
11
  require('../chunk-PPCATBOY.cjs');
12
- require('../chunk-DCDVWPMB.cjs');
13
12
  var chunkKDG6FER6_cjs = require('../chunk-KDG6FER6.cjs');
13
+ require('../chunk-DCDVWPMB.cjs');
14
14
  var chunkTLQQV7WW_cjs = require('../chunk-TLQQV7WW.cjs');
15
15
  require('../chunk-7UTB4PHM.cjs');
16
16
  require('../chunk-MHVNT4J3.cjs');
@@ -252,12 +252,12 @@ function ConnectedProfileCard({ notify: notify3, title = "Profile" }) {
252
252
  }
253
253
  });
254
254
  const display = profile?.fullName || user?.name || "Unnamed";
255
- return /* @__PURE__ */ jsxRuntime.jsx(chunkMDW5YCHZ_cjs.SettingsSection, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.UserCircle, {}), title, children: /* @__PURE__ */ jsxRuntime.jsx(
256
- chunkMDW5YCHZ_cjs.ProfileCard,
255
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkVUEZARW5_cjs.SettingsSection, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.UserCircle, {}), title, children: /* @__PURE__ */ jsxRuntime.jsx(
256
+ chunkVUEZARW5_cjs.ProfileCard,
257
257
  {
258
258
  avatar: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
259
259
  /* @__PURE__ */ jsxRuntime.jsx(
260
- chunkMDW5YCHZ_cjs.AvatarPicker,
260
+ chunkVUEZARW5_cjs.AvatarPicker,
261
261
  {
262
262
  pictureUrl: profile?.picture ?? user?.picture,
263
263
  initials: chunkKDG6FER6_cjs.initials(display),
@@ -315,10 +315,10 @@ function ConnectedSecuritySection({
315
315
  },
316
316
  onClose: () => setOpen(false)
317
317
  });
318
- return /* @__PURE__ */ jsxRuntime.jsxs(chunkMDW5YCHZ_cjs.SettingsSection, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.KeyRound, {}), title: "Security", children: [
319
- /* @__PURE__ */ jsxRuntime.jsxs(chunkMDW5YCHZ_cjs.SettingsCard, { padding: "sm", children: [
318
+ return /* @__PURE__ */ jsxRuntime.jsxs(chunkVUEZARW5_cjs.SettingsSection, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.KeyRound, {}), title: "Security", children: [
319
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkVUEZARW5_cjs.SettingsCard, { padding: "sm", children: [
320
320
  /* @__PURE__ */ jsxRuntime.jsx(
321
- chunkMDW5YCHZ_cjs.SettingsActionRow,
321
+ chunkVUEZARW5_cjs.SettingsActionRow,
322
322
  {
323
323
  title: "Change password",
324
324
  description: "Used to sign in and to encrypt your data. Changing it re-encrypts everything in your account.",
@@ -329,7 +329,7 @@ function ConnectedSecuritySection({
329
329
  children
330
330
  ] }),
331
331
  /* @__PURE__ */ jsxRuntime.jsx(
332
- chunkMDW5YCHZ_cjs.PasswordChangeDialog,
332
+ chunkVUEZARW5_cjs.PasswordChangeDialog,
333
333
  {
334
334
  open,
335
335
  onClose: form.onCancel,
@@ -353,23 +353,23 @@ function ConnectedSecuritySection({
353
353
  ] });
354
354
  }
355
355
  function ConnectedNotificationPreferences({
356
- categories = chunkMDW5YCHZ_cjs.EMAIL_NOTIFICATION_CATEGORIES,
356
+ categories = chunkVUEZARW5_cjs.EMAIL_NOTIFICATION_CATEGORIES,
357
357
  title = "Notifications"
358
358
  }) {
359
359
  const keys = react.useMemo(
360
- () => categories === chunkMDW5YCHZ_cjs.EMAIL_NOTIFICATION_CATEGORIES ? chunkMDW5YCHZ_cjs.EMAIL_NOTIFICATION_KEYS : categories.map((c) => c.key),
360
+ () => categories === chunkVUEZARW5_cjs.EMAIL_NOTIFICATION_CATEGORIES ? chunkVUEZARW5_cjs.EMAIL_NOTIFICATION_KEYS : categories.map((c) => c.key),
361
361
  [categories]
362
362
  );
363
363
  const prefs = react$1.useNotificationPreferences(keys);
364
- return /* @__PURE__ */ jsxRuntime.jsx(chunkMDW5YCHZ_cjs.SettingsSection, { title, children: /* @__PURE__ */ jsxRuntime.jsx(chunkMDW5YCHZ_cjs.SettingsCard, { className: "space-y-0", children: /* @__PURE__ */ jsxRuntime.jsx(
365
- chunkMDW5YCHZ_cjs.NotificationCategoryList,
364
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkVUEZARW5_cjs.SettingsSection, { title, children: /* @__PURE__ */ jsxRuntime.jsx(chunkVUEZARW5_cjs.SettingsCard, { className: "space-y-0", children: /* @__PURE__ */ jsxRuntime.jsx(
365
+ chunkVUEZARW5_cjs.NotificationCategoryList,
366
366
  {
367
367
  masterId: "emailNotifications",
368
368
  masterTitle: "Email Notifications",
369
369
  masterDescription: "Email me about activity when I\u2019m away",
370
370
  masterChecked: prefs.masterChecked,
371
371
  onMasterChange: prefs.setAll,
372
- categories: chunkMDW5YCHZ_cjs.toNotificationCategories(prefs.checked, categories),
372
+ categories: chunkVUEZARW5_cjs.toNotificationCategories(prefs.checked, categories),
373
373
  onCategoryChange: prefs.setCategory
374
374
  }
375
375
  ) }) });
@@ -383,14 +383,14 @@ function ConnectedSessionsRow({
383
383
  const sessions = react$1.useSessions({ enabled: open });
384
384
  const currentSessionId = react$1.useCurrentSessionId();
385
385
  const terminate = react$1.useTerminateSession();
386
- const views = chunkMDW5YCHZ_cjs.toActiveSessionViews(sessions.data ?? [], {
386
+ const views = chunkVUEZARW5_cjs.toActiveSessionViews(sessions.data ?? [], {
387
387
  currentSessionId,
388
388
  terminatingId: terminate.isPending ? terminate.variables : null,
389
389
  renderIcon: renderSessionIcon
390
390
  });
391
391
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
392
392
  /* @__PURE__ */ jsxRuntime.jsx(
393
- chunkMDW5YCHZ_cjs.SettingsRow,
393
+ chunkVUEZARW5_cjs.SettingsRow,
394
394
  {
395
395
  label: "Active sessions",
396
396
  description: "Devices and agents currently signed in to your account.",
@@ -412,7 +412,7 @@ function ConnectedSessionsRow({
412
412
  }
413
413
  ),
414
414
  /* @__PURE__ */ jsxRuntime.jsx(
415
- chunkMDW5YCHZ_cjs.ActiveSessionsDialog,
415
+ chunkVUEZARW5_cjs.ActiveSessionsDialog,
416
416
  {
417
417
  open,
418
418
  onOpenChange: setOpen,
@@ -447,7 +447,7 @@ function ConnectedLogoutDialog({
447
447
  const sessions = react$1.useSessions({ enabled: open });
448
448
  const logoutAll = react$1.useLogoutAllSessions();
449
449
  return /* @__PURE__ */ jsxRuntime.jsx(
450
- chunkMDW5YCHZ_cjs.LogoutDialog,
450
+ chunkVUEZARW5_cjs.LogoutDialog,
451
451
  {
452
452
  open,
453
453
  onClose,
@@ -461,7 +461,7 @@ function ConnectedLogoutDialog({
461
461
  },
462
462
  canLogoutAll: true,
463
463
  isOnline,
464
- sessions: chunkMDW5YCHZ_cjs.toLogoutSessionViews(sessions.data ?? []),
464
+ sessions: chunkVUEZARW5_cjs.toLogoutSessionViews(sessions.data ?? []),
465
465
  renderSessionIcon
466
466
  }
467
467
  );
@@ -480,7 +480,7 @@ function ConnectedDangerZone({ notify: notify3, renderSubscriptionLink }) {
480
480
  });
481
481
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
482
482
  /* @__PURE__ */ jsxRuntime.jsx(
483
- chunkMDW5YCHZ_cjs.SettingsDangerZone,
483
+ chunkVUEZARW5_cjs.SettingsDangerZone,
484
484
  {
485
485
  isOpen: zoneOpen,
486
486
  onToggle: () => setZoneOpen((o) => !o),
@@ -500,12 +500,12 @@ function ConnectedDangerZone({ notify: notify3, renderSubscriptionLink }) {
500
500
  }
501
501
  ),
502
502
  /* @__PURE__ */ jsxRuntime.jsx(
503
- chunkMDW5YCHZ_cjs.DeleteAccountDialog,
503
+ chunkVUEZARW5_cjs.DeleteAccountDialog,
504
504
  {
505
505
  open: dialogOpen,
506
506
  onClose: flow.onClose,
507
507
  step: flow.step,
508
- blockers: chunkMDW5YCHZ_cjs.toDeleteBlockerViews(flow.blockers, renderSubscriptionLink),
508
+ blockers: chunkVUEZARW5_cjs.toDeleteBlockerViews(flow.blockers, renderSubscriptionLink),
509
509
  onContinue: flow.onContinue,
510
510
  onBack: flow.onBack,
511
511
  userEmail: user?.email ?? "",
@@ -1,14 +1,14 @@
1
1
  "use client";
2
2
  export { ConnectedAssistantDock, redlineStats, textToArtifact, toRedlineMarkdown, useConnectedAiTask, useConnectedChat, useSemanticSearch, useWorkspaceDocs } from '../chunk-CW4WXGEN.js';
3
- import { SettingsSection, ProfileCard, AvatarPicker, SettingsCard, SettingsActionRow, PasswordChangeDialog, EMAIL_NOTIFICATION_KEYS, EMAIL_NOTIFICATION_CATEGORIES, NotificationCategoryList, toNotificationCategories, toActiveSessionViews, SettingsRow, ActiveSessionsDialog, LogoutDialog, toLogoutSessionViews, SettingsDangerZone, DeleteAccountDialog, toDeleteBlockerViews } from '../chunk-HTJXMA26.js';
3
+ import { SettingsSection, ProfileCard, AvatarPicker, SettingsCard, SettingsActionRow, PasswordChangeDialog, EMAIL_NOTIFICATION_KEYS, EMAIL_NOTIFICATION_CATEGORIES, NotificationCategoryList, toNotificationCategories, toActiveSessionViews, SettingsRow, ActiveSessionsDialog, LogoutDialog, toLogoutSessionViews, SettingsDangerZone, DeleteAccountDialog, toDeleteBlockerViews } from '../chunk-VZGBCBYB.js';
4
4
  import { StreamedArtifactFrame } from '../chunk-LOJVUGBJ.js';
5
5
  import '../chunk-VILAPTCB.js';
6
6
  import { ChatPage } from '../chunk-DABEWNL2.js';
7
7
  import '../chunk-KZJAG7T3.js';
8
8
  import '../chunk-3VQYJBOI.js';
9
9
  import '../chunk-NPLYHR2E.js';
10
- import '../chunk-TJMKFY5P.js';
11
10
  import { initials } from '../chunk-OXF2IFXG.js';
11
+ import '../chunk-TJMKFY5P.js';
12
12
  import { ConnectionProvider, useConnection } from '../chunk-EHXSBH6U.js';
13
13
  export { ConnectionProvider, SESSION_EXPIRED_MESSAGE, isAuthenticated, useConnection } from '../chunk-EHXSBH6U.js';
14
14
  import '../chunk-AA3PT6KR.js';
@@ -12,7 +12,7 @@ export interface FactSearchBarTestIds {
12
12
  submit: string;
13
13
  }
14
14
  export interface FactSearchResultLabels {
15
- core: string;
15
+ inChat: string;
16
16
  verified: string;
17
17
  open: string;
18
18
  }
@@ -66,7 +66,8 @@ export interface FactSearchResultProps {
66
66
  terms: string[];
67
67
  renderSnippet: (content: string, terms: string[]) => ReactNode;
68
68
  labels: FactSearchResultLabel[];
69
- isPinned?: boolean;
69
+ /** The fact is in the host's current chat. */
70
+ isInChat?: boolean;
70
71
  isVerified?: boolean;
71
72
  /** The fact open in the composer. */
72
73
  isSelected?: boolean;
@@ -76,5 +77,5 @@ export interface FactSearchResultProps {
76
77
  /** Destination of the fact; the card stays a click target (see SearchHit `href`). */
77
78
  href?: string;
78
79
  }
79
- /** One facts search result: rank, highlighted text, labels (and Core) and the Verified mark. */
80
- export declare function FactSearchResult({ id, rank, text, terms, renderSnippet, labels, isPinned, isVerified, isSelected, onOpen, uiLabels: labelOverrides, testIds, href, }: FactSearchResultProps): import("react").JSX.Element;
80
+ /** One facts search result: rank, highlighted text, labels (and In this chat) and the Verified mark. */
81
+ export declare function FactSearchResult({ id, rank, text, terms, renderSnippet, labels, isInChat, isVerified, isSelected, onOpen, uiLabels: labelOverrides, testIds, href, }: FactSearchResultProps): import("react").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import type { ReactNode } from 'react';
2
2
  export interface FactsBulkBarLabels {
3
- unpin: string;
4
- pin: string;
3
+ removeFromChat: string;
4
+ addToChat: string;
5
5
  label: string;
6
6
  shared: string;
7
7
  more: string;
@@ -10,14 +10,14 @@ export interface FactsBulkBarLabels {
10
10
  budgetHint: string;
11
11
  /** The `~{tokens}/{cap} tokens` line (numbers arrive formatted). */
12
12
  budget: (tokens: string, cap: string) => string;
13
- unpinTooltip: (pluralNoun: string) => string;
14
- pinTooltip: (pluralNoun: string) => string;
13
+ removeFromChatTooltip: (pluralNoun: string) => string;
14
+ addToChatTooltip: (pluralNoun: string) => string;
15
15
  labelTooltip: (pluralNoun: string) => string;
16
16
  }
17
17
  export declare const DEFAULT_FACTS_BULK_BAR_LABELS: FactsBulkBarLabels;
18
18
  export interface FactsBulkBarTestIds {
19
19
  budget: string;
20
- pin: string;
20
+ inChat: string;
21
21
  label: string;
22
22
  more: string;
23
23
  export: string;
@@ -27,15 +27,15 @@ export interface FactsBulkBarProps {
27
27
  /** Number of selected facts. */
28
28
  count: number;
29
29
  onClear: () => void;
30
- /** True when every selected fact is already pinned (the action then unpins). */
31
- allSelectedPinned: boolean;
32
- onTogglePin: () => void;
30
+ /** True when every selected fact is already in the current chat (the action then removes). */
31
+ allSelectedInChat: boolean;
32
+ onToggleInChat: () => void;
33
33
  onLabel: () => void;
34
34
  /** The aggregate Shared switch for the selection (the app binds its toggle). */
35
35
  sharedToggle: ReactNode;
36
36
  onExport: () => void;
37
37
  onDelete: () => void;
38
- /** Pinned-core token budget, shown at the left (reflects the whole workspace, not the selection). */
38
+ /** The current chat's facts token budget, shown at the left (the chat's facts, not the selection). */
39
39
  budget?: {
40
40
  tokens: number;
41
41
  cap: number;
@@ -47,7 +47,7 @@ export interface FactsBulkBarProps {
47
47
  testIds?: Partial<FactsBulkBarTestIds>;
48
48
  }
49
49
  /**
50
- * Sticky bulk-action bar for the facts table: Pin, Label, Shared and a More menu (Export,
50
+ * Sticky bulk-action bar for the facts table: Add to Chat, Label, Shared and a More menu (Export,
51
51
  * Delete). Actions are disabled until something is selected.
52
52
  */
53
- export declare function FactsBulkBar({ count, onClear, allSelectedPinned, onTogglePin, onLabel, sharedToggle, onExport, onDelete, budget, pluralNoun, labels, testIds, }: FactsBulkBarProps): import("react").JSX.Element;
53
+ export declare function FactsBulkBar({ count, onClear, allSelectedInChat, onToggleInChat, onLabel, sharedToggle, onExport, onDelete, budget, pluralNoun, labels, testIds, }: FactsBulkBarProps): import("react").JSX.Element;
@@ -2,7 +2,9 @@ import { type GridViewProps } from '../files/GridView';
2
2
  import { type FactColumnLabels, type FactRowView } from './factColumns';
3
3
  export interface FactsTableProps<T extends FactRowView> {
4
4
  facts: T[];
5
- onTogglePin: (fact: T) => void;
5
+ /** With `onToggleInChat`, shows the In chat column (whether a fact is in the host's chat). */
6
+ isInChat?: (fact: T) => boolean;
7
+ onToggleInChat?: (fact: T) => void;
6
8
  onToggleConfirmed: (fact: T) => void;
7
9
  onToggleShared: (fact: T) => void;
8
10
  /** The row menu appears when both `onEdit` and `onDelete` are provided. */
@@ -25,4 +27,4 @@ export interface FactsTableProps<T extends FactRowView> {
25
27
  testId?: string;
26
28
  }
27
29
  /** The default facts table: columns, cells and the grid in one component. */
28
- export declare function FactsTable<T extends FactRowView>({ facts, onTogglePin, onToggleConfirmed, onToggleShared, onEdit, onDelete, onOpen, getCreatorName, formatDate, columnLabels, isLoading, gridId, height, rowHeight, gridProps, testId, }: FactsTableProps<T>): import("react").JSX.Element;
30
+ export declare function FactsTable<T extends FactRowView>({ facts, isInChat, onToggleInChat, onToggleConfirmed, onToggleShared, onEdit, onDelete, onOpen, getCreatorName, formatDate, columnLabels, isLoading, gridId, height, rowHeight, gridProps, testId, }: FactsTableProps<T>): import("react").JSX.Element;
@@ -7,7 +7,6 @@ import type { FactRowView } from './factColumns';
7
7
  export interface PlainFactRecord {
8
8
  id: string;
9
9
  text: string;
10
- pinned?: boolean;
11
10
  confirmed?: boolean;
12
11
  shared?: boolean;
13
12
  /** ISO date (or date-time) the fact starts. */
@@ -6,11 +6,11 @@
6
6
  import type { ReactNode } from 'react';
7
7
  import type { ColDef, ICellRendererParams, IHeaderParams, ValueGetterParams } from 'ag-grid-community';
8
8
  export interface FactColumnLabels {
9
- pinnedHeaderTooltip: string;
10
- pinnedTitle: string;
11
- unpinnedTitle: string;
12
- unpin: string;
13
- pin: string;
9
+ inChatHeaderTooltip: string;
10
+ inChatTitle: string;
11
+ notInChatTitle: string;
12
+ removeFromChat: string;
13
+ addToChat: string;
14
14
  fact: string;
15
15
  dates: string;
16
16
  dateTitle: string;
@@ -29,7 +29,7 @@ export interface FactColumnLabels {
29
29
  }
30
30
  export declare const DEFAULT_FACT_COLUMN_LABELS: FactColumnLabels;
31
31
  export interface FactColumnTestIds {
32
- pinned: (factId: string) => string;
32
+ inChat: (factId: string) => string;
33
33
  text: (factId: string) => string;
34
34
  date: (factId: string) => string;
35
35
  }
@@ -37,7 +37,6 @@ export interface FactColumnTestIds {
37
37
  export interface FactRowView {
38
38
  external_id: string;
39
39
  text: string;
40
- pinned: boolean;
41
40
  confirmed: boolean;
42
41
  shared: boolean;
43
42
  date_start?: string | null;
@@ -52,7 +51,12 @@ export interface FactRowView {
52
51
  updated_at?: string | null;
53
52
  }
54
53
  export interface FactColumnSlots<T extends FactRowView> {
55
- onTogglePin: (fact: T) => void;
54
+ /** Whether the fact is in the host's current chat. With `onToggleInChat`, adds the In chat
55
+ * column; a host without chats leaves both out. Read at render time: the host refreshes the
56
+ * column when its chat changes. */
57
+ isInChat?: (fact: T) => boolean;
58
+ /** Add the fact to the current chat, or take it out. */
59
+ onToggleInChat?: (fact: T) => void;
56
60
  /** Custom header (persistent filter button) for the columns that use one. */
57
61
  renderHeader: (params: IHeaderParams, colId: string) => ReactNode;
58
62
  /** Row action menu, shown at the right edge of the Fact cell. */
@@ -84,5 +88,5 @@ export declare const ISO_DATE_FILTER_PARAMS: {
84
88
  /** How many source documents a fact cites (the Sources column counts documents, not passages). */
85
89
  export declare function sourceDocCount(fact: Pick<FactRowView, 'citations'> | undefined): number;
86
90
  /** Default left-to-right order; default-hidden columns trail. Every colId must be listed. */
87
- export declare const DEFAULT_FACT_COLUMN_ORDER: readonly ["pinned", "text", "sources", "tags", "date", "confirmed", "shared", "created_by", "created_at", "updated_at", "note_id"];
91
+ export declare const DEFAULT_FACT_COLUMN_ORDER: readonly ["in_chat", "text", "sources", "tags", "date", "confirmed", "shared", "created_by", "created_at", "updated_at", "note_id"];
88
92
  export declare function createFactColumns<T extends FactRowView>(slots: FactColumnSlots<T>): ColDef<T>[];
@@ -2,14 +2,14 @@
2
2
  'use strict';
3
3
 
4
4
  var chunkZPERNIMP_cjs = require('../chunk-ZPERNIMP.cjs');
5
- var chunkOUW6G4O2_cjs = require('../chunk-OUW6G4O2.cjs');
6
5
  var chunkVPPX5XUF_cjs = require('../chunk-VPPX5XUF.cjs');
6
+ var chunkOUW6G4O2_cjs = require('../chunk-OUW6G4O2.cjs');
7
7
  var chunkIA7RTPT3_cjs = require('../chunk-IA7RTPT3.cjs');
8
- var chunk7RGLTF76_cjs = require('../chunk-7RGLTF76.cjs');
9
8
  var chunk2EI7NCUA_cjs = require('../chunk-2EI7NCUA.cjs');
9
+ var chunk7RGLTF76_cjs = require('../chunk-7RGLTF76.cjs');
10
+ require('../chunk-C54XEN5T.cjs');
10
11
  require('../chunk-FX3K6LNZ.cjs');
11
12
  var chunkPPCATBOY_cjs = require('../chunk-PPCATBOY.cjs');
12
- require('../chunk-C54XEN5T.cjs');
13
13
  var chunkKDG6FER6_cjs = require('../chunk-KDG6FER6.cjs');
14
14
  var chunkMHVNT4J3_cjs = require('../chunk-MHVNT4J3.cjs');
15
15
  var lucideReact = require('lucide-react');
@@ -27,11 +27,11 @@ function decodeWhitespaceEntities(text) {
27
27
  });
28
28
  }
29
29
  var DEFAULT_FACT_COLUMN_LABELS = {
30
- pinnedHeaderTooltip: "Pinned facts are given to the assistant every turn",
31
- pinnedTitle: "Pinned \u2014 sent with every AI request. Click to unpin.",
32
- unpinnedTitle: "Pin \u2014 send with every AI request",
33
- unpin: "Unpin fact",
34
- pin: "Pin fact",
30
+ inChatHeaderTooltip: "Facts added to this chat are always in context for this chat",
31
+ inChatTitle: "In this chat \u2014 always in context for it. Click to remove from chat.",
32
+ notInChatTitle: "Add to chat \u2014 always in context for this chat",
33
+ removeFromChat: "Remove from chat",
34
+ addToChat: "Add to chat",
35
35
  fact: "Fact",
36
36
  dates: "Dates",
37
37
  dateTitle: "Date of the fact itself, not when this was saved",
@@ -66,7 +66,7 @@ function sourceDocCount(fact) {
66
66
  return fact?.citations?.length ?? 0;
67
67
  }
68
68
  var DEFAULT_FACT_COLUMN_ORDER = [
69
- "pinned",
69
+ "in_chat",
70
70
  "text",
71
71
  "sources",
72
72
  "tags",
@@ -82,49 +82,54 @@ function createFactColumns(slots) {
82
82
  const fieldOf = (name) => name;
83
83
  const l = { ...DEFAULT_FACT_COLUMN_LABELS, ...slots.labels };
84
84
  const ids = slots.testIds;
85
- const columns = [
85
+ const { isInChat, onToggleInChat } = slots;
86
+ const inChatColumn = isInChat && onToggleInChat ? [
86
87
  {
87
- colId: "pinned",
88
+ colId: "in_chat",
88
89
  headerName: "",
89
- headerComponent: () => /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex size-full items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Pin, { className: "size-3.5 text-muted-foreground" }) }),
90
- field: fieldOf("pinned"),
90
+ headerComponent: () => /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex size-full items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Paperclip, { className: "size-3.5 text-muted-foreground" }) }),
91
+ valueGetter: (params) => params.data ? isInChat(params.data) : false,
91
92
  width: 44,
92
93
  minWidth: 44,
93
94
  maxWidth: 44,
94
95
  sortable: true,
95
96
  resizable: false,
96
- headerTooltip: l.pinnedHeaderTooltip,
97
+ headerTooltip: l.inChatHeaderTooltip,
97
98
  cellClass: "cell-hcenter",
98
- // A toggle, not a readout: pinning is the row's most consequential switch (pinned facts
99
- // ride every AI request), so it flips in place.
99
+ // A toggle, not a readout: a fact in the chat rides every message of it, so it flips
100
+ // in place.
100
101
  cellRenderer: (params) => {
101
102
  if (!params.data) return null;
102
103
  const fact = params.data;
104
+ const inChat = isInChat(fact);
103
105
  return /* @__PURE__ */ jsxRuntime.jsx(
104
106
  "button",
105
107
  {
106
108
  type: "button",
107
- onClick: () => slots.onTogglePin(fact),
108
- title: fact.pinned ? l.pinnedTitle : l.unpinnedTitle,
109
- "aria-label": fact.pinned ? l.unpin : l.pin,
110
- "aria-pressed": fact.pinned,
111
- "data-testid": chunkMHVNT4J3_cjs.testIdOr(ids?.pinned?.(fact.external_id), {
112
- testId: `facts-grid-pinned-${fact.external_id}`
109
+ onClick: () => onToggleInChat(fact),
110
+ title: inChat ? l.inChatTitle : l.notInChatTitle,
111
+ "aria-label": inChat ? l.removeFromChat : l.addToChat,
112
+ "aria-pressed": inChat,
113
+ "data-testid": chunkMHVNT4J3_cjs.testIdOr(ids?.inChat?.(fact.external_id), {
114
+ testId: `facts-grid-in-chat-${fact.external_id}`
113
115
  }),
114
116
  className: "flex h-full items-center",
115
117
  children: /* @__PURE__ */ jsxRuntime.jsx(
116
- lucideReact.Pin,
118
+ lucideReact.Paperclip,
117
119
  {
118
120
  className: ui.cn(
119
121
  "size-3.5",
120
- fact.pinned ? "fill-current text-yellow-text" : "text-muted-foreground/30 transition-colors hover:text-muted-foreground"
122
+ inChat ? "text-primary" : "text-muted-foreground/30 transition-colors hover:text-muted-foreground"
121
123
  )
122
124
  }
123
125
  )
124
126
  }
125
127
  );
126
128
  }
127
- },
129
+ }
130
+ ] : [];
131
+ const columns = [
132
+ ...inChatColumn,
128
133
  {
129
134
  colId: "text",
130
135
  suppressHeaderFilterButton: true,
@@ -436,7 +441,8 @@ var defaultFormatDate = (iso) => {
436
441
  var EMPTY_STATE = { title: "No facts yet" };
437
442
  function FactsTable({
438
443
  facts,
439
- onTogglePin,
444
+ isInChat,
445
+ onToggleInChat,
440
446
  onToggleConfirmed,
441
447
  onToggleShared,
442
448
  onEdit,
@@ -455,7 +461,8 @@ function FactsTable({
455
461
  const l = { ...DEFAULT_FACT_COLUMN_LABELS, ...columnLabels };
456
462
  const columnDefs = react.useMemo(
457
463
  () => createFactColumns({
458
- onTogglePin,
464
+ isInChat,
465
+ onToggleInChat,
459
466
  renderHeader: (params) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[12.5px] font-medium", children: params.displayName }),
460
467
  renderRowActions: (fact) => onEdit && onDelete ? /* @__PURE__ */ jsxRuntime.jsx(FactRowActions, { onEdit: () => onEdit(fact), onDelete: () => onDelete(fact) }) : null,
461
468
  renderLabels: (fact) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex flex-wrap items-center gap-1", children: (fact.tags ?? []).map((tag) => /* @__PURE__ */ jsxRuntime.jsx(
@@ -500,7 +507,8 @@ function FactsTable({
500
507
  labels: columnLabels
501
508
  }),
502
509
  [
503
- onTogglePin,
510
+ isInChat,
511
+ onToggleInChat,
504
512
  onToggleConfirmed,
505
513
  onToggleShared,
506
514
  onEdit,
@@ -536,7 +544,6 @@ function toFactRow(record) {
536
544
  return {
537
545
  external_id: record.id,
538
546
  text: record.text,
539
- pinned: record.pinned ?? false,
540
547
  confirmed: record.confirmed ?? false,
541
548
  shared: record.shared ?? false,
542
549
  date_start: record.dateStart ?? null,
@@ -1327,7 +1334,7 @@ var DEFAULT_FACTS_FIELDS_BUTTON_LABELS = {
1327
1334
  fields: "Fields",
1328
1335
  defaultView: "Default view",
1329
1336
  columns: "Columns",
1330
- columnNames: { pinned: "Pinned" }
1337
+ columnNames: { in_chat: "In chat" }
1331
1338
  };
1332
1339
  function FactsFieldsButton({
1333
1340
  getGridApi,
@@ -1735,24 +1742,24 @@ function FactComposer({
1735
1742
  );
1736
1743
  }
1737
1744
  var DEFAULT_FACTS_BULK_BAR_LABELS = {
1738
- unpin: "Unpin Facts",
1739
- pin: "Pin to Chats",
1745
+ removeFromChat: "Remove from Chat",
1746
+ addToChat: "Add to Chat",
1740
1747
  label: "Label",
1741
1748
  shared: "Shared",
1742
1749
  more: "More",
1743
1750
  export: "Export",
1744
1751
  delete: "Delete",
1745
- budgetHint: "Pinned facts ride every AI request, so they are always in context and share one budget. This estimates the tokens they add (\u22484 characters per token), capped at ~2,000.",
1752
+ budgetHint: "Facts added to this chat are always in ARBI's context for this chat, so they share one budget. This estimates the tokens they add (\u22484 characters per token), capped at ~2,000.",
1746
1753
  budget: (tokens, cap) => `~${tokens}/${cap} tokens`,
1747
- unpinTooltip: (n) => `Unpin the selected ${n} so they no longer ride every chat`,
1748
- pinTooltip: (n) => `Pin the selected ${n} so they ride every chat with the assistant`,
1754
+ removeFromChatTooltip: (n) => `Remove the selected ${n} from this chat`,
1755
+ addToChatTooltip: (n) => `Add the selected ${n} to this chat, so they are always in its context`,
1749
1756
  labelTooltip: (n) => `Add or remove labels from selected ${n}`
1750
1757
  };
1751
1758
  function FactsBulkBar({
1752
1759
  count,
1753
1760
  onClear,
1754
- allSelectedPinned,
1755
- onTogglePin,
1761
+ allSelectedInChat,
1762
+ onToggleInChat,
1756
1763
  onLabel,
1757
1764
  sharedToggle,
1758
1765
  onExport,
@@ -1777,7 +1784,7 @@ function FactsBulkBar({
1777
1784
  budget.isOver ? "text-destructive" : "text-muted-foreground"
1778
1785
  ),
1779
1786
  title: l.budgetHint,
1780
- "data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.budget, { testId: "facts-page-core-budget" }),
1787
+ "data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.budget, { testId: "facts-page-chat-budget" }),
1781
1788
  children: l.budget(budget.tokens.toLocaleString(), budget.cap.toLocaleString())
1782
1789
  }
1783
1790
  ) : null,
@@ -1785,14 +1792,14 @@ function FactsBulkBar({
1785
1792
  /* @__PURE__ */ jsxRuntime.jsx(
1786
1793
  chunkIA7RTPT3_cjs.SelectionBarAction,
1787
1794
  {
1788
- icon: allSelectedPinned ? lucideReact.PinOff : lucideReact.Pin,
1789
- label: allSelectedPinned ? l.unpin : l.pin,
1790
- onClick: onTogglePin,
1795
+ icon: lucideReact.Paperclip,
1796
+ label: allSelectedInChat ? l.removeFromChat : l.addToChat,
1797
+ onClick: onToggleInChat,
1791
1798
  disabled: none,
1792
1799
  isCompact,
1793
- className: "border-yellow-border text-yellow-text hover:bg-yellow-bg hover:text-yellow-text",
1794
- tooltip: allSelectedPinned ? l.unpinTooltip(pluralNoun) : l.pinTooltip(pluralNoun),
1795
- testId: chunkMHVNT4J3_cjs.testIdOr(testIds?.pin, { testId: "bulk-pin-facts-button" })
1800
+ className: "border-blue-border text-blue-text hover:bg-blue-bg hover:text-blue-text",
1801
+ tooltip: allSelectedInChat ? l.removeFromChatTooltip(pluralNoun) : l.addToChatTooltip(pluralNoun),
1802
+ testId: chunkMHVNT4J3_cjs.testIdOr(testIds?.inChat, { testId: "bulk-in-chat-facts-button" })
1796
1803
  }
1797
1804
  ),
1798
1805
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -2027,7 +2034,7 @@ var DEFAULT_FACT_SEARCH_BAR_LABELS = {
2027
2034
  submit: "Search"
2028
2035
  };
2029
2036
  var DEFAULT_FACT_SEARCH_RESULT_LABELS = {
2030
- core: "Core",
2037
+ inChat: "In this chat",
2031
2038
  verified: "Verified",
2032
2039
  open: "Open"
2033
2040
  };
@@ -2153,7 +2160,7 @@ function FactSearchResult({
2153
2160
  terms,
2154
2161
  renderSnippet,
2155
2162
  labels,
2156
- isPinned,
2163
+ isInChat,
2157
2164
  isVerified,
2158
2165
  isSelected,
2159
2166
  onOpen,
@@ -2190,11 +2197,18 @@ function FactSearchResult({
2190
2197
  testId: `facts-smart-search-hit-labels-${id}`
2191
2198
  }),
2192
2199
  children: [
2193
- isPinned && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex items-center gap-1 pr-1", children: [
2194
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Pin, { className: "size-3" }),
2195
- " ",
2196
- l.core
2197
- ] }),
2200
+ isInChat && /* @__PURE__ */ jsxRuntime.jsxs(
2201
+ "span",
2202
+ {
2203
+ className: "inline-flex items-center gap-1 pr-1",
2204
+ "data-testid": `facts-smart-search-hit-in-chat-${id}`,
2205
+ children: [
2206
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Paperclip, { className: "size-3" }),
2207
+ " ",
2208
+ l.inChat
2209
+ ]
2210
+ }
2211
+ ),
2198
2212
  labels.map((tag) => /* @__PURE__ */ jsxRuntime.jsxs(
2199
2213
  "span",
2200
2214
  {