You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(knowledge): the composer's Search mode shows every source and reads like a search
- Under the input, Search mode lists every Sim Search source as a chip with
the person's own state: connected with a document count, indexing,
reconnect, or one click to connect; sources that need a site link to
Knowledge. The sampled four-row list goes, and with it the rows that
offered sources the server had to refuse
- Results carry a header (how many documents, searched as you, and which
source is still indexing), hover actions to copy the link or summarize,
an Answer with Sim action for a prose answer, and source and recency
filters once a list is long and mixed enough to need them
- An existing chat opens in Build; a new chat keeps the last mode. Results
never join a transcript
Copy file name to clipboardExpand all lines: apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/source-card/source-card.tsx
+55-15Lines changed: 55 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,8 @@
1
1
'use client'
2
2
3
-
importtype{ReactNode}from'react'
4
-
import{Button,cn}from'@sim/emcn'
3
+
import{typeReactNode,useState}from'react'
4
+
import{Button,cn,Tooltip}from'@sim/emcn'
5
+
import{Check,LinkasLinkIcon}from'@sim/emcn/icons'
5
6
import{formatDate}from'@sim/utils/formatting'
6
7
import{faviconUrl}from'@/lib/core/utils/favicon'
7
8
import{
@@ -18,6 +19,8 @@ import { BrandIcon } from '@/blocks/brand-icon'
18
19
19
20
/** Query terms shorter than this are too common to bold. */
20
21
constMIN_HIGHLIGHT_TERM_LENGTH=3
22
+
/** How long the copied state shows on the copy-link action. */
23
+
constCOPIED_FEEDBACK_MS=1_500
21
24
22
25
functionescapeRegExp(value: string): string{
23
26
returnvalue.replace(/[.*+?^${}()|[\]\\]/g,'\\$&')
@@ -56,6 +59,39 @@ function parseUpdatedAt(value: string | undefined): Date | null {
56
59
returnNumber.isNaN(date.getTime()) ? null : date
57
60
}
58
61
62
+
interfaceCopyLinkActionProps{
63
+
url: string
64
+
}
65
+
66
+
/** Copies the document's link; confirms with a check for a moment. */
0 commit comments