mirror of
https://github.com/simstudioai/sim.git
synced 2026-01-10 23:48:09 -05:00
* feat(chat-stream): updated workflow id execute route to support streaming via API * enable streaming via api * added only text stream option * cleanup deployed preview componnet * updated selectedOutputIds to selectedOutput * updated TS and Python SDKs with async, rate limits, usage, and streaming API routes * stream non-streaming blocks when streaming is specified * fix(chat-panel): add onBlockComplete handler to chat panel to stream back blocks as they complete * update docs * cleanup * ack PR comments * updated next config * removed getAssetUrl in favor of local assets * resolve merge conflicts * remove extra logic to create sensitive result * simplify internal auth * remove vercel blob from CSP + next config
23 lines
662 B
TypeScript
23 lines
662 B
TypeScript
import { type ClassValue, clsx } from 'clsx'
|
|
import { twMerge } from 'tailwind-merge'
|
|
|
|
/**
|
|
* Combines multiple class names into a single string, merging Tailwind classes properly
|
|
*/
|
|
export function cn(...inputs: ClassValue[]) {
|
|
return twMerge(clsx(inputs))
|
|
}
|
|
|
|
/**
|
|
* Get the full URL for an asset stored in Vercel Blob
|
|
* - If CDN is configured (NEXT_PUBLIC_BLOB_BASE_URL), uses CDN URL
|
|
* - Otherwise falls back to local static assets served from root path
|
|
*/
|
|
export function getAssetUrl(filename: string) {
|
|
const cdnBaseUrl = process.env.NEXT_PUBLIC_BLOB_BASE_URL
|
|
if (cdnBaseUrl) {
|
|
return `${cdnBaseUrl}/${filename}`
|
|
}
|
|
return `/${filename}`
|
|
}
|