mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-01 05:14:25 +00:00
chore(deps): upgrade bun to 1.4.4 and migrate to bun fmt (#488)
- Upgrade Bun to 1.4.4 across Dockerfiles, CI workflows, and release configurations. - Update @types/bun and bun-types. - Remove eslint-plugin-prettier and update format script to use native bun fmt. - Configure .prettierignore to exclude packages/webui/public and minified files.
This commit is contained in:
@@ -859,13 +859,7 @@ export const initializeAgentSessionActivity = defineStep(
|
||||
name: att.asset.name,
|
||||
type: att.asset.type,
|
||||
mediaType: attProxyType as
|
||||
| 'image'
|
||||
| 'video'
|
||||
| 'pdf'
|
||||
| 'audio'
|
||||
| '3d'
|
||||
| 'other'
|
||||
| undefined,
|
||||
'image' | 'video' | 'pdf' | 'audio' | '3d' | 'other' | undefined,
|
||||
mimeType: att.asset.mediaType || undefined,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -34,8 +34,7 @@ export async function resolveAnnotationsById(
|
||||
})
|
||||
if (entry) {
|
||||
const details = (entry.data as Record<string, unknown> | null)?.details as
|
||||
| ShumaiMessageContext
|
||||
| undefined
|
||||
ShumaiMessageContext | undefined
|
||||
const entryAssetId = entry.assetId || details?.currentAsset?.id
|
||||
if (entryAssetId && entryAssetId !== assetId) {
|
||||
throw new Error(
|
||||
|
||||
@@ -355,8 +355,7 @@ export function createReadAssetTool(
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- transcode screenshot output
|
||||
const output = completedTask.output as any
|
||||
const screenshots = output?.screenshots as
|
||||
| Array<{ key: string; timestamp: number }>
|
||||
| undefined
|
||||
Array<{ key: string; timestamp: number }> | undefined
|
||||
|
||||
if (!screenshots || screenshots.length === 0) {
|
||||
throw new Error(
|
||||
@@ -620,8 +619,7 @@ export function createReadAssetTool(
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- transcode screenshot output
|
||||
const output = completedTask.output as any
|
||||
const screenshots = output?.screenshots as
|
||||
| Array<{ key: string; timestamp: number }>
|
||||
| undefined
|
||||
Array<{ key: string; timestamp: number }> | undefined
|
||||
|
||||
if (!screenshots || screenshots.length === 0) {
|
||||
throw new Error('No screenshots were generated.')
|
||||
|
||||
@@ -2408,12 +2408,7 @@ export class AssetService {
|
||||
}
|
||||
|
||||
const proxyType = (media?.proxyType || null) as
|
||||
| 'image'
|
||||
| 'video'
|
||||
| 'audio'
|
||||
| 'pdf'
|
||||
| '3d'
|
||||
| null
|
||||
'image' | 'video' | 'audio' | 'pdf' | '3d' | null
|
||||
|
||||
result.push({
|
||||
id: a.id,
|
||||
@@ -2780,12 +2775,7 @@ export class AssetService {
|
||||
if (!asset.media) return null
|
||||
|
||||
const proxyType = (asset.media?.proxyType || null) as
|
||||
| 'image'
|
||||
| 'video'
|
||||
| 'audio'
|
||||
| 'pdf'
|
||||
| '3d'
|
||||
| null
|
||||
'image' | 'video' | 'audio' | 'pdf' | '3d' | null
|
||||
|
||||
let rawThumbKey: string | undefined
|
||||
if (proxyType === 'image' && asset.media.thumbnail?.key) {
|
||||
@@ -2864,11 +2854,7 @@ export class AssetService {
|
||||
'GET',
|
||||
)
|
||||
const attachmentProxyType = (a.asset.media?.proxyType || null) as
|
||||
| 'image'
|
||||
| 'video'
|
||||
| 'audio'
|
||||
| 'pdf'
|
||||
| null
|
||||
'image' | 'video' | 'audio' | 'pdf' | null
|
||||
attachments.push({
|
||||
id: a.id,
|
||||
assetId: a.asset.id,
|
||||
|
||||
@@ -90,9 +90,7 @@ export class GotenbergService {
|
||||
})
|
||||
if (versionRes.ok) {
|
||||
const vData = (await versionRes.json().catch(() => null)) as
|
||||
| { version?: string }
|
||||
| string
|
||||
| null
|
||||
{ version?: string } | string | null
|
||||
if (vData && typeof vData === 'object' && 'version' in vData) {
|
||||
version = String(vData.version)
|
||||
} else if (typeof vData === 'string') {
|
||||
|
||||
@@ -68,8 +68,7 @@ export async function resolveIntegrationConfig<TKey extends keyof PrismaJson.Set
|
||||
})
|
||||
const teamSettings = team?.settings as PrismaJson.Settings | null
|
||||
const serviceSettings = teamSettings?.[def.settingsKey] as
|
||||
| { url?: string; username?: string; password?: string }
|
||||
| undefined
|
||||
{ url?: string; username?: string; password?: string } | undefined
|
||||
|
||||
if (serviceSettings?.url?.trim()) {
|
||||
return {
|
||||
|
||||
@@ -41,9 +41,7 @@ export interface ProxyServerInfo {
|
||||
}
|
||||
|
||||
export type ConnectionOutcome =
|
||||
| { status: 'connected' }
|
||||
| { status: 'needs-auth' }
|
||||
| { status: 'error'; message: string }
|
||||
{ status: 'connected' } | { status: 'needs-auth' } | { status: 'error'; message: string }
|
||||
|
||||
export interface CallToolOutcome {
|
||||
ok: boolean
|
||||
|
||||
@@ -351,8 +351,7 @@ export class McpService {
|
||||
instructions?: string | null
|
||||
} = {}
|
||||
const impl = connection.serverVersion as
|
||||
| { name?: string; title?: string; description?: string }
|
||||
| undefined
|
||||
{ name?: string; title?: string; description?: string } | undefined
|
||||
if (impl && typeof impl === 'object') {
|
||||
const reportedName = impl.title ?? impl.name
|
||||
if (typeof reportedName === 'string' && reportedName.trim() !== '') {
|
||||
|
||||
@@ -1141,8 +1141,7 @@ async function loadModelsDevData(): Promise<Model<any>[]> {
|
||||
baseUrl: getBedrockBaseUrl(id),
|
||||
reasoning: m.reasoning === true,
|
||||
input: (m.modalities?.input?.includes('image') ? ['text', 'image'] : ['text']) as (
|
||||
| 'text'
|
||||
| 'image'
|
||||
'text' | 'image'
|
||||
)[],
|
||||
cost: {
|
||||
input: m.cost?.input || 0,
|
||||
|
||||
@@ -243,8 +243,7 @@ export function ChatbotSidebar({
|
||||
const msgObj = msg as unknown as Record<string, unknown>
|
||||
if (msg.role === 'custom' && msgObj.customType === 'context_display_info') {
|
||||
const details = msgObj.details as
|
||||
| { assets?: Array<{ id: string; name: string; type: string }> }
|
||||
| undefined
|
||||
{ assets?: Array<{ id: string; name: string; type: string }> } | undefined
|
||||
const assets = details?.assets || []
|
||||
if (assets.length === 0) return null
|
||||
return (
|
||||
|
||||
@@ -62,8 +62,7 @@ function TeamPage() {
|
||||
const { metadata, setMetadata: setUserMetadata } = useUserMetadataStore()
|
||||
const sortKey = `team:${teamId}:projects:sort`
|
||||
const savedSort = metadata[sortKey] as
|
||||
| { sortBy?: string; sortDirection?: 'asc' | 'desc' }
|
||||
| undefined
|
||||
{ sortBy?: string; sortDirection?: 'asc' | 'desc' } | undefined
|
||||
|
||||
const [sortBy, setSortBy] = useState<string>(() => savedSort?.sortBy || 'name')
|
||||
const [sortDirection, setSortDirection] = useState<'asc' | 'desc'>(
|
||||
|
||||
Reference in New Issue
Block a user