@arbidocs/blocks 0.4.67 → 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.
- package/dist/agents/index.cjs +220 -220
- package/dist/agents/index.js +4 -4
- package/dist/{chunk-ZYZMCNIS.cjs → chunk-5ZZCS2EK.cjs} +5 -5
- package/dist/{chunk-ZYZMCNIS.cjs.map → chunk-5ZZCS2EK.cjs.map} +1 -1
- package/dist/{chunk-4HZ46XP2.js → chunk-FAVN6VUR.js} +5 -5
- package/dist/{chunk-4HZ46XP2.js.map → chunk-FAVN6VUR.js.map} +1 -1
- package/dist/facts/FactSearchParts.d.ts +5 -4
- package/dist/facts/FactsBulkBar.d.ts +11 -11
- package/dist/facts/FactsTable.d.ts +4 -2
- package/dist/facts/fact-row.d.ts +0 -1
- package/dist/facts/factColumns.d.ts +13 -9
- package/dist/facts/index.cjs +63 -49
- package/dist/facts/index.cjs.map +1 -1
- package/dist/facts/index.js +64 -50
- package/dist/facts/index.js.map +1 -1
- package/dist/files/index.cjs +2 -2
- package/dist/files/index.js +2 -2
- package/dist/home/DashboardParts.d.ts +2 -4
- package/dist/home/index.cjs +10 -3
- package/dist/home/index.cjs.map +1 -1
- package/dist/home/index.js +11 -4
- package/dist/home/index.js.map +1 -1
- package/dist/index.cjs +371 -371
- package/dist/index.js +8 -8
- package/dist/settings/index.cjs +1 -1
- package/dist/settings/index.js +1 -1
- package/dist/shell/index.cjs +1 -1
- package/dist/shell/index.js +1 -1
- package/dist/studio/index.cjs +1 -1
- package/dist/studio/index.js +1 -1
- package/package.json +4 -4
|
@@ -12,7 +12,7 @@ export interface FactSearchBarTestIds {
|
|
|
12
12
|
submit: string;
|
|
13
13
|
}
|
|
14
14
|
export interface FactSearchResultLabels {
|
|
15
|
-
|
|
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
|
-
|
|
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
|
|
80
|
-
export declare function FactSearchResult({ id, rank, text, terms, renderSnippet, labels,
|
|
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
|
-
|
|
4
|
-
|
|
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
|
-
|
|
14
|
-
|
|
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
|
-
|
|
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
|
|
31
|
-
|
|
32
|
-
|
|
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
|
-
/**
|
|
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:
|
|
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,
|
|
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
|
-
|
|
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,
|
|
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;
|
package/dist/facts/fact-row.d.ts
CHANGED
|
@@ -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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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 ["
|
|
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>[];
|
package/dist/facts/index.cjs
CHANGED
|
@@ -7,9 +7,9 @@ var chunkOUW6G4O2_cjs = require('../chunk-OUW6G4O2.cjs');
|
|
|
7
7
|
var chunkIA7RTPT3_cjs = require('../chunk-IA7RTPT3.cjs');
|
|
8
8
|
var chunk2EI7NCUA_cjs = require('../chunk-2EI7NCUA.cjs');
|
|
9
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
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
"
|
|
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
|
|
85
|
+
const { isInChat, onToggleInChat } = slots;
|
|
86
|
+
const inChatColumn = isInChat && onToggleInChat ? [
|
|
86
87
|
{
|
|
87
|
-
colId: "
|
|
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.
|
|
90
|
-
|
|
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.
|
|
97
|
+
headerTooltip: l.inChatHeaderTooltip,
|
|
97
98
|
cellClass: "cell-hcenter",
|
|
98
|
-
// A toggle, not a readout:
|
|
99
|
-
//
|
|
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: () =>
|
|
108
|
-
title:
|
|
109
|
-
"aria-label":
|
|
110
|
-
"aria-pressed":
|
|
111
|
-
"data-testid": chunkMHVNT4J3_cjs.testIdOr(ids?.
|
|
112
|
-
testId: `facts-grid-
|
|
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.
|
|
118
|
+
lucideReact.Paperclip,
|
|
117
119
|
{
|
|
118
120
|
className: ui.cn(
|
|
119
121
|
"size-3.5",
|
|
120
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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: {
|
|
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
|
-
|
|
1739
|
-
|
|
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: "
|
|
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
|
-
|
|
1748
|
-
|
|
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
|
-
|
|
1755
|
-
|
|
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-
|
|
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:
|
|
1789
|
-
label:
|
|
1790
|
-
onClick:
|
|
1795
|
+
icon: lucideReact.Paperclip,
|
|
1796
|
+
label: allSelectedInChat ? l.removeFromChat : l.addToChat,
|
|
1797
|
+
onClick: onToggleInChat,
|
|
1791
1798
|
disabled: none,
|
|
1792
1799
|
isCompact,
|
|
1793
|
-
className: "border-
|
|
1794
|
-
tooltip:
|
|
1795
|
-
testId: chunkMHVNT4J3_cjs.testIdOr(testIds?.
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
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
|
{
|