Skip to content
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
b4c2294
improvement(emails): update unsub page, standardize unsub process (#2…
waleedlatif1 Jan 19, 2026
932f8fd
feat(mcp): updated mcp subblocks for mcp tools to match subblocks (#2…
waleedlatif1 Jan 19, 2026
408597e
feat(notifs): added block name to error notifications (#2883)
waleedlatif1 Jan 19, 2026
037dad6
fix(undo-redo): preserve subblock values during undo/redo cycles (#2884)
waleedlatif1 Jan 19, 2026
72c2ba7
fix(linear): team selector in tool input (#2886)
icecrasher321 Jan 19, 2026
1861f77
feat(terminal): add fix in copilot for errors (#2885)
waleedlatif1 Jan 19, 2026
3c43779
feat(search): added operations to search modal in main app, updated r…
waleedlatif1 Jan 19, 2026
739341b
improvement(router): add resizable textareas for router conditions (#…
waleedlatif1 Jan 19, 2026
81cbfe7
feat(browseruse): upgraded browseruse endpoints to v2 (#2890)
waleedlatif1 Jan 19, 2026
5f45db4
improvement(copilot): variables, conditions, router (#2887)
Sg312 Jan 19, 2026
e575ba2
feat(settings): add debug mode for superusers (#2893)
Sg312 Jan 20, 2026
9efd3d5
improvement(stats): should track mcp and a2a executions like other tr…
icecrasher321 Jan 20, 2026
6cbadd7
feat(api): added workflows api route for dynamic discovery (#2892)
waleedlatif1 Jan 20, 2026
69614d2
improvement(kb): migrate manual fetches in kb module to use reactquer…
waleedlatif1 Jan 20, 2026
ac991d4
fix(sso): removed provider specific OIDC logic from SSO registration …
waleedlatif1 Jan 20, 2026
2daf343
fix(copilot): ui/ux (#2891)
emir-karabeg Jan 20, 2026
84691fc
improvement(modal): fixed popover issue in custom tools modal, remove…
waleedlatif1 Jan 20, 2026
e4ad31b
fix(kb): align bulk chunk operation with API response (#2899)
waleedlatif1 Jan 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 97 additions & 12 deletions apps/docs/app/api/search/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,27 +86,112 @@ export async function GET(request: NextRequest) {
)
.limit(candidateLimit)

const seenIds = new Set<string>()
const mergedResults = []
const knownLocales = ['en', 'es', 'fr', 'de', 'ja', 'zh']

for (let i = 0; i < Math.max(vectorResults.length, keywordResults.length); i++) {
if (i < vectorResults.length && !seenIds.has(vectorResults[i].chunkId)) {
mergedResults.push(vectorResults[i])
seenIds.add(vectorResults[i].chunkId)
const vectorRankMap = new Map<string, number>()
vectorResults.forEach((r, idx) => vectorRankMap.set(r.chunkId, idx + 1))

const keywordRankMap = new Map<string, number>()
keywordResults.forEach((r, idx) => keywordRankMap.set(r.chunkId, idx + 1))

const allChunkIds = new Set([
...vectorResults.map((r) => r.chunkId),
...keywordResults.map((r) => r.chunkId),
])

const k = 60
type ResultWithRRF = (typeof vectorResults)[0] & { rrfScore: number }
const scoredResults: ResultWithRRF[] = []

for (const chunkId of allChunkIds) {
const vectorRank = vectorRankMap.get(chunkId) ?? Number.POSITIVE_INFINITY
const keywordRank = keywordRankMap.get(chunkId) ?? Number.POSITIVE_INFINITY

const rrfScore = 1 / (k + vectorRank) + 1 / (k + keywordRank)

const result =
vectorResults.find((r) => r.chunkId === chunkId) ||
keywordResults.find((r) => r.chunkId === chunkId)

if (result) {
scoredResults.push({ ...result, rrfScore })
}
if (i < keywordResults.length && !seenIds.has(keywordResults[i].chunkId)) {
mergedResults.push(keywordResults[i])
seenIds.add(keywordResults[i].chunkId)
}

scoredResults.sort((a, b) => b.rrfScore - a.rrfScore)

const localeFilteredResults = scoredResults.filter((result) => {
const firstPart = result.sourceDocument.split('/')[0]
if (knownLocales.includes(firstPart)) {
return firstPart === locale
}
return locale === 'en'
})

const queryLower = query.toLowerCase()
const getTitleBoost = (result: ResultWithRRF): number => {
const fileName = result.sourceDocument
.replace('.mdx', '')
.split('/')
.pop()
?.toLowerCase()
?.replace(/_/g, ' ')

if (fileName === queryLower) return 0.01
if (fileName?.includes(queryLower)) return 0.005
return 0
}

localeFilteredResults.sort((a, b) => {
return b.rrfScore + getTitleBoost(b) - (a.rrfScore + getTitleBoost(a))
})

const pageMap = new Map<string, ResultWithRRF>()

for (const result of localeFilteredResults) {
const pageKey = result.sourceDocument
const existing = pageMap.get(pageKey)

if (!existing || result.rrfScore > existing.rrfScore) {
pageMap.set(pageKey, result)
}
}

const filteredResults = mergedResults.slice(0, limit)
const searchResults = filteredResults.map((result) => {
const deduplicatedResults = Array.from(pageMap.values())
.sort((a, b) => b.rrfScore + getTitleBoost(b) - (a.rrfScore + getTitleBoost(a)))
.slice(0, limit)

const searchResults = deduplicatedResults.map((result) => {
const title = result.headerText || result.sourceDocument.replace('.mdx', '')

const pathParts = result.sourceDocument
.replace('.mdx', '')
.split('/')
.map((part) => part.charAt(0).toUpperCase() + part.slice(1))
.filter((part) => part !== 'index' && !knownLocales.includes(part))
.map((part) => {
return part
.replace(/_/g, ' ')
.split(' ')
.map((word) => {
const acronyms = [
'api',
'mcp',
'sdk',
'url',
'http',
'json',
'xml',
'html',
'css',
'ai',
]
if (acronyms.includes(word.toLowerCase())) {
return word.toUpperCase()
}
return word.charAt(0).toUpperCase() + word.slice(1)
})
.join(' ')
})

return {
id: result.chunkId,
Expand Down
6 changes: 3 additions & 3 deletions apps/docs/components/icons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1739,12 +1739,12 @@ export function BrowserUseIcon(props: SVGProps<SVGSVGElement>) {
{...props}
version='1.0'
xmlns='http://www.w3.org/2000/svg'
width='150pt'
height='150pt'
width='28'
height='28'
viewBox='0 0 150 150'
preserveAspectRatio='xMidYMid meet'
>
<g transform='translate(0,150) scale(0.05,-0.05)' fill='#000000' stroke='none'>
<g transform='translate(0,150) scale(0.05,-0.05)' fill='currentColor' stroke='none'>
<path
d='M786 2713 c-184 -61 -353 -217 -439 -405 -76 -165 -65 -539 19 -666
l57 -85 -48 -124 c-203 -517 -79 -930 346 -1155 159 -85 441 -71 585 28 l111
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/docs/en/tools/browser_use.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"

<BlockInfoCard
type="browser_use"
color="#E0E0E0"
color="#181C1E"
/>

{/* MANUAL-CONTENT-START:intro */}
Expand Down
33 changes: 33 additions & 0 deletions apps/docs/content/docs/en/tools/google_slides.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,15 @@ Read content from a Google Slides presentation
| --------- | ---- | ----------- |
| `slides` | json | Array of slides with their content |
| `metadata` | json | Presentation metadata including ID, title, and URL |
| ↳ `presentationId` | string | The presentation ID |
| ↳ `title` | string | The presentation title |
| ↳ `pageSize` | object | Presentation page size |
| ↳ `width` | json | Page width as a Dimension object |
| ↳ `height` | json | Page height as a Dimension object |
| ↳ `width` | json | Page width as a Dimension object |
| ↳ `height` | json | Page height as a Dimension object |
Comment thread
waleedlatif1 marked this conversation as resolved.
| ↳ `mimeType` | string | The mime type of the presentation |
| ↳ `url` | string | URL to open the presentation |

### `google_slides_write`

Expand All @@ -71,6 +80,10 @@ Write or update content in a Google Slides presentation
| --------- | ---- | ----------- |
| `updatedContent` | boolean | Indicates if presentation content was updated successfully |
| `metadata` | json | Updated presentation metadata including ID, title, and URL |
| ↳ `presentationId` | string | The presentation ID |
| ↳ `title` | string | The presentation title |
| ↳ `mimeType` | string | The mime type of the presentation |
| ↳ `url` | string | URL to open the presentation |

### `google_slides_create`

Expand All @@ -90,6 +103,10 @@ Create a new Google Slides presentation
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `metadata` | json | Created presentation metadata including ID, title, and URL |
| ↳ `presentationId` | string | The presentation ID |
| ↳ `title` | string | The presentation title |
| ↳ `mimeType` | string | The mime type of the presentation |
| ↳ `url` | string | URL to open the presentation |

### `google_slides_replace_all_text`

Expand All @@ -111,6 +128,10 @@ Find and replace all occurrences of text throughout a Google Slides presentation
| --------- | ---- | ----------- |
| `occurrencesChanged` | number | Number of text occurrences that were replaced |
| `metadata` | json | Operation metadata including presentation ID and URL |
| ↳ `presentationId` | string | The presentation ID |
| ↳ `findText` | string | The text that was searched for |
| ↳ `replaceText` | string | The text that replaced the matches |
| ↳ `url` | string | URL to open the presentation |

### `google_slides_add_slide`

Expand All @@ -131,6 +152,10 @@ Add a new slide to a Google Slides presentation with a specified layout
| --------- | ---- | ----------- |
| `slideId` | string | The object ID of the newly created slide |
| `metadata` | json | Operation metadata including presentation ID, layout, and URL |
| ↳ `presentationId` | string | The presentation ID |
| ↳ `layout` | string | The layout used for the new slide |
| ↳ `insertionIndex` | number | The zero-based index where the slide was inserted |
| ↳ `url` | string | URL to open the presentation |

### `google_slides_add_image`

Expand All @@ -154,6 +179,10 @@ Insert an image into a specific slide in a Google Slides presentation
| --------- | ---- | ----------- |
| `imageId` | string | The object ID of the newly created image |
| `metadata` | json | Operation metadata including presentation ID and image URL |
| ↳ `presentationId` | string | The presentation ID |
| ↳ `pageObjectId` | string | The page object ID where the image was inserted |
| ↳ `imageUrl` | string | The source image URL |
| ↳ `url` | string | URL to open the presentation |

### `google_slides_get_thumbnail`

Expand All @@ -176,6 +205,10 @@ Generate a thumbnail image of a specific slide in a Google Slides presentation
| `width` | number | Width of the thumbnail in pixels |
| `height` | number | Height of the thumbnail in pixels |
| `metadata` | json | Operation metadata including presentation ID and page object ID |
| ↳ `presentationId` | string | The presentation ID |
| ↳ `pageObjectId` | string | The page object ID for the thumbnail |
| ↳ `thumbnailSize` | string | The requested thumbnail size |
| ↳ `mimeType` | string | The thumbnail MIME type |

### `google_slides_get_page`

Expand Down
2 changes: 1 addition & 1 deletion apps/sim/app/api/auth/sso/providers/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { eq } from 'drizzle-orm'
import { NextResponse } from 'next/server'
import { getSession } from '@/lib/auth'

const logger = createLogger('SSO-Providers')
const logger = createLogger('SSOProvidersRoute')

export async function GET() {
try {
Expand Down
Loading
Loading