diff --git a/apps/sim/lib/sim-search/live/README.md b/apps/sim/lib/sim-search/live/README.md index 89a0609580b..286729ced29 100644 --- a/apps/sim/lib/sim-search/live/README.md +++ b/apps/sim/lib/sim-search/live/README.md @@ -58,7 +58,7 @@ Each event must exist under the source's delegated token, be in an allowed calen ### Slack -Member mode only. Search uses the connected user's Slack real-time search grant and provider search syntax. Date bounds are sent as numeric provider timestamps; date ordering selects keyword retrieval and timestamp sort, because Slack semantic retrieval uses relevance ordering. Channels, messages, direct messages, and files are limited by that grant and provider scopes; there is no admin channel filter in member mode. Missing required search scopes produce a reconnect status. Thread/file reads use the same connected identity. Real-time Search returns only a file's title for a file hit, so the hit names the file's type and size and whether a read returns its text. A file read downloads the full text of a canvas (HTML), text snippet, PDF or DOCX from `files.slack.com` only, using `url_private_download` when present (Slack redirects a PDF's `url_private` to a viewer on another domain), never a remote file's own URL (redirects are followed only within that host; a hop elsewhere, such as a sign-in page, keeps the preview), within the shared response-size limit; when Slack will not serve it, the read returns the `files.info` preview. Real-time Search returns at most 20 results a call and counts every page against the member's rate limit, so a search across every source reads one page; a Slack-scoped or native Slack search follows the cursor for up to three pages to fill its limit, and a later page that fails keeps the earlier pages and returns the unread cursor. +Member mode only. Search uses the connected user's Slack real-time search grant and provider search syntax. Date bounds are sent as numeric provider timestamps; date ordering selects keyword retrieval and timestamp sort, because Slack semantic retrieval uses relevance ordering. Channels, messages, direct messages, and files are limited by that grant and provider scopes; there is no admin channel filter in member mode. Missing required search scopes produce a reconnect status. Thread/file reads use the same connected identity. Real-time Search returns only a file's title for a file hit, so the hit names the file's type and size and whether a read can return its text. A file read downloads the full text of a canvas (HTML), text snippet, PDF or DOCX from `files.slack.com` only, using `url_private_download` when present (Slack redirects a PDF's `url_private` to a viewer on another domain), never a remote file's own URL (redirects are followed only within that host; a hop elsewhere, such as a sign-in page, keeps the preview), within the shared response-size limit; when Slack will not serve it, the read returns the `files.info` preview. Real-time Search returns at most 20 results a call and counts every page against the member's rate limit, so a search across every source reads one page; a Slack-scoped or native Slack search follows the cursor for up to three pages to fill its limit, and a later page that fails keeps the earlier pages and returns the unread cursor. ### GitHub diff --git a/apps/sim/lib/sim-search/live/providers.test.ts b/apps/sim/lib/sim-search/live/providers.test.ts index fd4d8498fd2..027b25439e9 100644 --- a/apps/sim/lib/sim-search/live/providers.test.ts +++ b/apps/sim/lib/sim-search/live/providers.test.ts @@ -213,7 +213,7 @@ describe('Slack file hits', () => { ...fields, }) - it('says what each file is and whether a read returns its text, instead of echoing its title', async () => { + it('says what each file is and whether a read can return its text, instead of echoing its title', async () => { expect( await fileHits([ hit({ file_type: 'application/pdf', size: 245760 }), @@ -223,9 +223,9 @@ describe('Slack file hits', () => { hit({ file_type: 'application/vnd.slack-list' }), ]) ).toEqual([ - 'PDF, 240 KB. Reading it returns its full text.', - 'Canvas. Reading it returns its full text.', - 'CSV. Reading it returns its full text.', + 'PDF, 240 KB. Reading it can return its full text.', + 'Canvas. Reading it can return its full text.', + 'CSV. Reading it can return its full text.', 'Image. Its contents cannot be read here; open the source.', 'List. Its contents cannot be read here; open the source.', ]) @@ -239,7 +239,7 @@ describe('Slack file hits', () => { hit({ file_type: 'application/x-unknown', title: 'Plan v2.1 final', content: '' }), ]) ).toEqual([ - 'PDF. Reading it returns its full text.\nRevenue grew 12% in Q3', + 'PDF. Reading it can return its full text.\nRevenue grew 12% in Q3', 'File. Its contents cannot be read here; open the source.', 'File. Its contents cannot be read here; open the source.', ]) diff --git a/apps/sim/lib/sim-search/live/slack.ts b/apps/sim/lib/sim-search/live/slack.ts index 69b1b41a5cc..e72f6c0c56d 100644 --- a/apps/sim/lib/sim-search/live/slack.ts +++ b/apps/sim/lib/sim-search/live/slack.ts @@ -384,7 +384,7 @@ function knownFileLabel(mimetype: string): string { /** * Slack search returns only a file's title, repeated as its content. A hit says what the file is - * and whether reading it returns its text, so a reader can tell which files to open. + * and whether reading it can return its text, so a reader can tell which files to open. */ function slackFileHitContent(file: Record, users: Map): string { const mimetype = normalizeMimeType(string(file.file_type)) @@ -402,7 +402,7 @@ function slackFileHitContent(file: Record, users: Map