feat(agent): add built-in image and video generation tools and settings (#382)

* feat(agent): add built-in image and video generation tools and settings

* fix(settings): refine media generation layout and expose media tools in agent and quota forms

* feat(media-generation): add alibaba, bytedance, minimax, prodia, and azure providers

* feat(agent): support s3 key references for media generation and s3KeyOnly in read_asset
This commit is contained in:
Yiling-J
2026-09-06 09:28:53 +08:00
committed by GitHub
parent 1e60933cdb
commit 6285ff8618
114 changed files with 6392 additions and 78 deletions
@@ -0,0 +1,92 @@
// @vitest-environment happy-dom
import { cleanup, render, screen } from '@testing-library/react'
import React from 'react'
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { AgentFormDialog } from './AgentFormDialog'
vi.mock('@/ui/api/client', () => ({
client: {
api: {
teams: {
':teamId': {
providers: {
$get: vi.fn().mockResolvedValue({
ok: true,
json: async () => [],
}),
},
skills: {
$get: vi.fn().mockResolvedValue({
ok: true,
json: async () => ({ skills: [] }),
}),
},
mcp: {
servers: {
$get: vi.fn().mockResolvedValue({
ok: true,
json: async () => [],
}),
},
},
agents: {
$post: vi.fn(),
':agentId': {
$put: vi.fn(),
},
},
},
},
},
},
}))
vi.mock('@/ui/hooks/use-permissions', () => ({
usePermissions: () => ({
canAdmin: true,
}),
}))
vi.mock('sonner', () => ({
toast: {
success: vi.fn(),
error: vi.fn(),
},
}))
describe('AgentFormDialog', () => {
let queryClient: QueryClient
beforeEach(() => {
queryClient = new QueryClient({
defaultOptions: {
queries: { retry: false },
mutations: { retry: false },
},
})
})
afterEach(() => {
cleanup()
})
it('renders all builtin tools including generate_image and generate_video', () => {
render(
<QueryClientProvider client={queryClient}>
<AgentFormDialog
isOpen={true}
onClose={vi.fn()}
teamId="team-123"
type="chat"
title="Create Agent"
/>
</QueryClientProvider>,
)
expect(screen.getByText('Generate Image')).toBeDefined()
expect(screen.getByText('Generate Video')).toBeDefined()
expect(screen.getByText('Sandboxed Terminal')).toBeDefined()
expect(screen.getByText('Read Asset')).toBeDefined()
})
})
@@ -95,6 +95,16 @@ const BUILTIN_TOOLS = [
name: () => m.agent_tool_create_version_name(),
description: () => m.agent_tool_create_version_desc(),
},
{
id: 'generate_image',
name: () => m.agent_tool_generate_image_name(),
description: () => m.agent_tool_generate_image_desc(),
},
{
id: 'generate_video',
name: () => m.agent_tool_generate_video_name(),
description: () => m.agent_tool_generate_video_desc(),
},
]
type AgentFormValues = z.infer<typeof agentFormSchema>
@@ -0,0 +1,240 @@
// @vitest-environment happy-dom
import { cleanup, render, screen, fireEvent, waitFor } from '@testing-library/react'
import React from 'react'
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { ImageVideoGenerationSettings } from './ImageVideoGenerationSettings'
import type { MediaGenerationSettingsResponse } from '@shumai/dtos'
const mockGetSettings = vi.fn()
const mockPutProvider = vi.fn()
const mockPostModel = vi.fn()
const mockDeleteModel = vi.fn()
const mockGetCurated = vi.fn()
vi.mock('@/ui/api/client', () => ({
client: {
api: {
teams: {
':teamId': {
'media-generation': {
$get: () => mockGetSettings(),
providers: {
':provider': {
$put: (args: unknown) => mockPutProvider(args),
},
},
models: {
$post: (args: unknown) => mockPostModel(args),
':modelId': {
$delete: (args: unknown) => mockDeleteModel(args),
},
curated: {
$get: (args: unknown) => mockGetCurated(args),
},
},
},
},
},
},
},
}))
vi.mock('sonner', () => ({
toast: {
success: vi.fn(),
error: vi.fn(),
},
}))
describe('ImageVideoGenerationSettings', () => {
const initialSettings: MediaGenerationSettingsResponse = {
providers: [
{
provider: 'openai',
defaultEnvKey: 'OPENAI_API_KEY',
apiKeyConfigured: true,
status: 'configured_env',
supportedTypes: ['image'],
},
{
provider: 'klingai',
defaultEnvKey: 'KLINGAI_API_KEY',
apiKeyConfigured: true,
status: 'configured_custom',
customApiKeyOrEnv: 'my-custom-key',
supportedTypes: ['video'],
},
{
provider: 'fal',
defaultEnvKey: 'FAL_KEY',
apiKeyConfigured: false,
status: 'not_configured',
supportedTypes: ['image', 'video'],
},
],
enabledModels: [
{
id: 'model-1',
type: 'image',
provider: 'openai',
modelId: 'dall-e-3',
name: 'DALL-E 3',
createdAt: '2026-01-01T00:00:00.000Z',
},
{
id: 'model-2',
type: 'video',
provider: 'klingai',
modelId: 'kling-v1-standard',
name: 'Kling v1',
createdAt: '2026-01-01T00:00:00.000Z',
},
],
}
let queryClient: QueryClient
beforeEach(() => {
vi.clearAllMocks()
queryClient = new QueryClient({
defaultOptions: {
queries: { retry: false },
mutations: { retry: false },
},
})
mockGetSettings.mockResolvedValue({
ok: true,
json: async () => initialSettings,
})
mockPutProvider.mockResolvedValue({
ok: true,
json: async () => ({ success: true }),
})
mockPostModel.mockResolvedValue({
ok: true,
json: async () => ({
id: 'new-model-id',
type: 'image',
provider: 'openai',
modelId: 'dall-e-2',
name: 'DALL-E 2',
createdAt: '2026-01-01T00:00:00.000Z',
}),
})
mockDeleteModel.mockResolvedValue({
ok: true,
json: async () => ({ success: true }),
})
mockGetCurated.mockResolvedValue({
ok: true,
json: async () => [
{ modelId: 'dall-e-3', name: 'DALL-E 3', type: 'image' },
{ modelId: 'dall-e-2', name: 'DALL-E 2', type: 'image' },
],
})
})
afterEach(() => {
cleanup()
})
const renderComponent = () =>
render(
<QueryClientProvider client={queryClient}>
<ImageVideoGenerationSettings teamId="team-123" />
</QueryClientProvider>,
)
it('renders provider list and enabled models', async () => {
renderComponent()
await waitFor(() => {
expect(screen.getAllByText('OpenAI').length).toBeGreaterThan(0)
expect(screen.getAllByText('Kling AI').length).toBeGreaterThan(0)
expect(screen.getAllByText('Fal').length).toBeGreaterThan(0)
})
// Verify enabled models table
expect(screen.getByText('dall-e-3')).toBeDefined()
expect(screen.getByText('kling-v1-standard')).toBeDefined()
})
it('opens configure API key dialog and saves new key', async () => {
renderComponent()
await waitFor(() => {
expect(screen.getAllByText('OpenAI').length).toBeGreaterThan(0)
})
const editButtons = screen.getAllByRole('button', { name: /Edit API Key/i })
fireEvent.click(editButtons[0])
await waitFor(() => {
expect(screen.getByRole('dialog')).toBeDefined()
})
const input = document.querySelector('input[type="password"]') as HTMLInputElement
expect(input).toBeDefined()
fireEvent.change(input, { target: { value: 'sk-new-openai-test-key' } })
const saveButton = screen.getByRole('button', { name: 'Save' })
fireEvent.click(saveButton)
await waitFor(() => {
expect(mockPutProvider).toHaveBeenCalledWith({
param: { teamId: 'team-123', provider: 'openai' },
json: { apiKey: 'sk-new-openai-test-key' },
})
})
})
it('opens add model dialog and enables adding model', async () => {
renderComponent()
await waitFor(() => {
expect(screen.getAllByText('OpenAI').length).toBeGreaterThan(0)
})
const addModelButtons = screen.getAllByRole('button', { name: /Add Model/i })
fireEvent.click(addModelButtons[0])
await waitFor(() => {
expect(screen.getByRole('dialog')).toBeDefined()
})
expect(
screen.getByText('Select the media generation type, provider, and model to enable.'),
).toBeDefined()
})
it('masks existing custom key and allows removing custom key', async () => {
renderComponent()
await waitFor(() => {
expect(screen.getAllByText('Kling AI').length).toBeGreaterThan(0)
})
const editButtons = screen.getAllByRole('button', { name: /Edit API Key/i })
// Kling AI is index 1
fireEvent.click(editButtons[1])
await waitFor(() => {
expect(screen.getByRole('dialog')).toBeDefined()
})
const input = document.querySelector('input[type="password"]') as HTMLInputElement
expect(input).toBeDefined()
expect(input.value).toBe('') // Secret is not prefilled in the input
expect(input.placeholder).toBe('••••••••') // Masked indicator
const removeButton = screen.getByRole('button', { name: 'Remove Key' })
fireEvent.click(removeButton)
await waitFor(() => {
expect(mockPutProvider).toHaveBeenCalledWith({
param: { teamId: 'team-123', provider: 'klingai' },
json: { apiKey: '' },
})
})
})
})
@@ -0,0 +1,741 @@
import { useState } from 'react'
import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query'
import { client } from '@/ui/api/client'
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/ui/components/ui/card'
import { Button } from '@/ui/components/ui/button'
import { Input } from '@/ui/components/ui/input'
import { Badge } from '@/ui/components/ui/badge'
import { ScrollArea } from '@/ui/components/ui/scroll-area'
import {
Dialog,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
DialogTitle,
} from '@/ui/components/ui/dialog'
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
} from '@/ui/components/ui/alert-dialog'
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
} from '@/ui/components/ui/select'
import {
Table,
TableBody,
TableCell,
TableHead,
TableHeader,
TableRow,
} from '@/ui/components/ui/table'
import {
Key,
Plus,
Trash2,
AlertCircle,
ImageIcon,
VideoIcon,
CheckCircle2,
Loader2,
} from 'lucide-react'
import { toast } from 'sonner'
import { m } from '@/ui/paraglide/messages.js'
import type {
MediaGenerationSettingsResponse,
MediaProviderStatus,
EnabledMediaModel,
CuratedMediaModel,
} from '@shumai/dtos'
const PROVIDER_NAMES: Record<string, string> = {
openai: 'OpenAI',
google: 'Google',
'google-vertex': 'Google Vertex AI',
xai: 'xAI',
fal: 'Fal',
replicate: 'Replicate',
'black-forest-labs': 'Black Forest Labs',
klingai: 'Kling AI',
togetherai: 'Together AI',
fireworks: 'Fireworks AI',
deepinfra: 'DeepInfra',
luma: 'Luma',
'amazon-bedrock': 'Amazon Bedrock',
alibaba: 'Alibaba',
bytedance: 'ByteDance',
minimax: 'MiniMax',
prodia: 'Prodia',
azure: 'Azure OpenAI',
}
export function ImageVideoGenerationSettings({ teamId }: { teamId: string }) {
const queryClient = useQueryClient()
// API Key Dialog State
const [keyDialogOpen, setKeyDialogOpen] = useState(false)
const [editingProvider, setEditingProvider] = useState<MediaProviderStatus | null>(null)
const [apiKeyInput, setApiKeyInput] = useState('')
// Add Model Dialog State
const [addDialogOpen, setAddDialogOpen] = useState(false)
const [addType, setAddType] = useState<'image' | 'video'>('image')
const [addProvider, setAddProvider] = useState<string>('')
const [selectedModelId, setSelectedModelId] = useState<string>('')
const [customModelId, setCustomModelId] = useState<string>('')
const [modelDisplayName, setModelDisplayName] = useState<string>('')
// Delete Model Confirmation State
const [modelToDelete, setModelToDelete] = useState<EnabledMediaModel | null>(null)
// Fetch Media Generation Settings
const { data: settings, isLoading } = useQuery<MediaGenerationSettingsResponse>({
queryKey: ['teams', teamId, 'media-generation'],
queryFn: async () => {
const res = await client.api.teams[':teamId']['media-generation'].$get({
param: { teamId },
})
if (!res.ok) throw new Error('Failed to fetch media generation settings')
return (await res.json()) as MediaGenerationSettingsResponse
},
})
// Fetch Curated Models for Add Dialog
const { data: curatedModels, isLoading: isLoadingCurated } = useQuery<CuratedMediaModel[]>({
queryKey: ['teams', teamId, 'media-generation', 'curated', addType, addProvider],
queryFn: async () => {
if (!addProvider) return []
const res = await client.api.teams[':teamId']['media-generation']['models']['curated'].$get({
param: { teamId },
query: { provider: addProvider, type: addType },
})
if (!res.ok) return []
return (await res.json()) as CuratedMediaModel[]
},
enabled: addDialogOpen && !!addProvider,
})
// Mutation: Update Provider API Key
const { mutate: updateApiKey, isPending: isSavingKey } = useMutation({
mutationFn: async ({ provider, apiKey }: { provider: string; apiKey?: string }) => {
const res = await client.api.teams[':teamId']['media-generation']['providers'][
':provider'
].$put({
param: { teamId, provider },
json: { apiKey },
})
if (!res.ok) {
const err = await res.json().catch(() => ({}))
// eslint-disable-next-line @typescript-eslint/no-explicit-any
throw new Error((err as any)?.message || 'Failed to update API key')
}
return await res.json()
},
onSuccess: () => {
queryClient.invalidateQueries({ queryKey: ['teams', teamId, 'media-generation'] })
toast.success(m.api_key_saved_successfully())
setKeyDialogOpen(false)
setEditingProvider(null)
setApiKeyInput('')
},
onError: (err) => {
toast.error(err instanceof Error ? err.message : m.failed_to_save_api_key())
},
})
// Mutation: Add Enabled Model
const { mutate: addModel, isPending: isAddingModel } = useMutation({
mutationFn: async (payload: {
type: 'image' | 'video'
provider: string
modelId: string
name?: string
}) => {
const res = await client.api.teams[':teamId']['media-generation']['models'].$post({
param: { teamId },
json: payload,
})
if (!res.ok) {
const err = await res.json().catch(() => ({}))
// eslint-disable-next-line @typescript-eslint/no-explicit-any
throw new Error((err as any)?.message || 'Failed to add model')
}
return await res.json()
},
onSuccess: () => {
queryClient.invalidateQueries({ queryKey: ['teams', teamId, 'media-generation'] })
toast.success(m.model_added_successfully())
setAddDialogOpen(false)
resetAddForm()
},
onError: (err) => {
toast.error(err instanceof Error ? err.message : m.failed_to_add_model())
},
})
// Mutation: Remove Enabled Model
const { mutate: removeModel, isPending: isRemovingModel } = useMutation({
mutationFn: async (modelId: string) => {
const res = await client.api.teams[':teamId']['media-generation']['models'][
':modelId'
].$delete({
param: { teamId, modelId },
})
if (!res.ok) throw new Error('Failed to remove model')
return await res.json()
},
onSuccess: () => {
queryClient.invalidateQueries({ queryKey: ['teams', teamId, 'media-generation'] })
toast.success(m.model_removed_successfully())
setModelToDelete(null)
},
onError: (err) => {
toast.error(err instanceof Error ? err.message : m.failed_to_remove_model())
},
})
const resetAddForm = () => {
setAddType('image')
setAddProvider('')
setSelectedModelId('')
setCustomModelId('')
setModelDisplayName('')
}
const handleOpenKeyDialog = (provider: MediaProviderStatus) => {
setEditingProvider(provider)
setApiKeyInput('')
setKeyDialogOpen(true)
}
const handleSaveKey = () => {
if (!editingProvider) return
const trimmed = apiKeyInput.trim()
if (!trimmed) {
setKeyDialogOpen(false)
return
}
updateApiKey({
provider: editingProvider.provider,
apiKey: trimmed,
})
}
const handleRemoveKey = () => {
if (!editingProvider) return
updateApiKey({
provider: editingProvider.provider,
apiKey: '',
})
}
const handleAddModelSubmit = () => {
const finalModelId =
selectedModelId === '__custom__' ? customModelId.trim() : selectedModelId.trim()
if (!addProvider || !finalModelId) return
addModel({
type: addType,
provider: addProvider,
modelId: finalModelId,
name: modelDisplayName.trim() || undefined,
})
}
if (isLoading) {
return (
<div className="flex h-64 items-center justify-center">
<Loader2 className="h-8 w-8 animate-spin text-muted-foreground" />
</div>
)
}
const providers = settings?.providers || []
const enabledModels = settings?.enabledModels || []
const activeProvidersMap = new Map(providers.map((p) => [p.provider, p.apiKeyConfigured]))
// Filter providers that support the currently selected addType
const compatibleProviders = providers.filter((p) => p.supportedTypes.includes(addType))
return (
<ScrollArea className="h-full pr-1">
<div className="space-y-8 pb-12">
{/* Section 1: Media Providers */}
<Card className="border-border">
<CardHeader>
<CardTitle className="text-base font-semibold">{m.media_providers()}</CardTitle>
<CardDescription>{m.media_providers_description()}</CardDescription>
</CardHeader>
<CardContent>
<div className="space-y-2.5">
{providers.map((provider) => {
const displayName = PROVIDER_NAMES[provider.provider] || provider.provider
const isCustom = provider.status === 'configured_custom'
const isEnv = provider.status === 'configured_env'
return (
<div
key={provider.provider}
className="flex flex-col sm:flex-row sm:items-center justify-between gap-3 p-3.5 rounded-lg border border-border bg-card/50 hover:bg-card/80 transition-colors"
>
<div className="flex flex-col sm:flex-row sm:items-center gap-3 sm:gap-4 min-w-0 flex-1">
<div className="min-w-[160px] flex items-center gap-2">
<span className="font-medium text-sm text-foreground truncate">
{displayName}
</span>
{isCustom && (
<Badge
variant="outline"
className="bg-emerald-500/10 text-emerald-600 dark:text-emerald-400 border-emerald-500/20 text-[11px] shrink-0"
>
<CheckCircle2 className="w-3 h-3 mr-1" />
{m.provider_status_configured_custom()}
</Badge>
)}
{isEnv && (
<Badge
variant="outline"
className="bg-sky-500/10 text-sky-600 dark:text-sky-400 border-sky-500/20 text-[11px] shrink-0"
>
<CheckCircle2 className="w-3 h-3 mr-1" />
{m.provider_status_configured_env()}
</Badge>
)}
{!isCustom && !isEnv && (
<Badge
variant="outline"
className="bg-muted text-muted-foreground border-border text-[11px] shrink-0"
>
{m.provider_status_not_configured()}
</Badge>
)}
</div>
<div className="flex items-center gap-2 flex-wrap">
<div className="flex items-center gap-1.5">
{provider.supportedTypes.includes('image') && (
<span className="inline-flex items-center gap-1 text-[11px] text-muted-foreground bg-accent/60 px-1.5 py-0.5 rounded">
<ImageIcon className="w-3 h-3" />
{m.media_type_image()}
</span>
)}
{provider.supportedTypes.includes('video') && (
<span className="inline-flex items-center gap-1 text-[11px] text-muted-foreground bg-accent/60 px-1.5 py-0.5 rounded">
<VideoIcon className="w-3 h-3" />
{m.media_type_video()}
</span>
)}
</div>
<span className="text-xs text-muted-foreground font-mono opacity-70">
{provider.defaultEnvKey}
</span>
</div>
</div>
<div className="flex items-center justify-end shrink-0">
<Button
variant="outline"
size="sm"
className="text-xs h-8 whitespace-nowrap"
onClick={() => handleOpenKeyDialog(provider)}
>
<Key className="w-3.5 h-3.5 mr-1.5" />
{provider.apiKeyConfigured ? m.edit_api_key() : m.configure_api_key()}
</Button>
</div>
</div>
)
})}
</div>
</CardContent>
</Card>
{/* Section 2: Enabled Models */}
<Card className="border-border">
<CardHeader className="flex flex-row items-center justify-between space-y-0">
<div>
<CardTitle className="text-base font-semibold">{m.enabled_media_models()}</CardTitle>
<CardDescription className="mt-1">
{m.enabled_media_models_description()}
</CardDescription>
</div>
<Button
size="sm"
onClick={() => {
resetAddForm()
setAddDialogOpen(true)
}}
>
<Plus className="w-4 h-4 mr-1.5" />
{m.add_media_model()}
</Button>
</CardHeader>
<CardContent>
{enabledModels.length === 0 ? (
<div className="text-center py-8 text-sm text-muted-foreground">
<p>{m.no_enabled_models()}</p>
</div>
) : (
<div className="rounded-md border border-border">
<Table>
<TableHeader>
<TableRow>
<TableHead className="w-[100px]">{m.model_type()}</TableHead>
<TableHead>{m.providers()}</TableHead>
<TableHead>{m.model()}</TableHead>
<TableHead className="w-[80px] text-right"></TableHead>
</TableRow>
</TableHeader>
<TableBody>
{enabledModels.map((model) => {
const isConfigured = activeProvidersMap.get(model.provider) ?? false
const providerDisplayName = PROVIDER_NAMES[model.provider] || model.provider
return (
<TableRow key={model.id}>
<TableCell>
{model.type === 'image' ? (
<Badge
variant="outline"
className="bg-primary/10 text-primary border-primary/20 text-xs gap-1"
>
<ImageIcon className="w-3 h-3" />
{m.media_type_image()}
</Badge>
) : (
<Badge
variant="outline"
className="bg-purple-500/10 text-purple-600 dark:text-purple-400 border-purple-500/20 text-xs gap-1"
>
<VideoIcon className="w-3 h-3" />
{m.media_type_video()}
</Badge>
)}
</TableCell>
<TableCell className="font-medium text-sm">
{providerDisplayName}
</TableCell>
<TableCell>
<div className="flex items-center gap-2">
<span className="font-mono text-xs">{model.modelId}</span>
{model.name && (
<span className="text-xs text-muted-foreground">
({model.name})
</span>
)}
{!isConfigured && (
<div
className="flex items-center gap-1 text-xs text-amber-600 dark:text-amber-400 bg-amber-500/10 px-2 py-0.5 rounded"
title={m.model_requires_api_key_warning()}
>
<AlertCircle className="w-3 h-3" />
<span>{m.provider_status_not_configured()}</span>
</div>
)}
</div>
</TableCell>
<TableCell className="text-right">
<Button
variant="ghost"
size="icon"
className="h-8 w-8 text-muted-foreground hover:text-destructive"
onClick={() => setModelToDelete(model)}
disabled={isRemovingModel}
>
<Trash2 className="w-4 h-4" />
</Button>
</TableCell>
</TableRow>
)
})}
</TableBody>
</Table>
</div>
)}
</CardContent>
</Card>
{/* Dialog: Configure Provider API Key */}
<Dialog open={keyDialogOpen} onOpenChange={setKeyDialogOpen}>
<DialogContent className="sm:max-w-[480px]">
<DialogHeader>
<DialogTitle>
{editingProvider
? `${PROVIDER_NAMES[editingProvider.provider] || editingProvider.provider} API Key`
: m.configure_api_key()}
</DialogTitle>
<DialogDescription>
{editingProvider &&
m.api_key_or_env_var_hint({ envKey: editingProvider.defaultEnvKey })}
</DialogDescription>
</DialogHeader>
<div className="space-y-4 py-3">
<div className="space-y-2">
<label className="text-xs font-medium text-foreground">
{m.api_key_or_env_var()}
</label>
<Input
type="password"
value={apiKeyInput}
onChange={(e) => setApiKeyInput(e.target.value)}
placeholder={
editingProvider?.status === 'configured_custom'
? '••••••••'
: editingProvider
? m.api_key_or_env_var_placeholder({
envKey: editingProvider.defaultEnvKey,
})
: ''
}
className="font-mono text-sm"
/>
</div>
</div>
<DialogFooter className="flex items-center justify-between w-full">
{editingProvider?.status === 'configured_custom' ? (
<Button
variant="destructive"
size="sm"
onClick={handleRemoveKey}
disabled={isSavingKey}
>
{m.remove_key()}
</Button>
) : (
<div />
)}
<div className="flex items-center gap-2">
<Button
variant="outline"
onClick={() => setKeyDialogOpen(false)}
disabled={isSavingKey}
>
{m.cancel()}
</Button>
<Button onClick={handleSaveKey} disabled={isSavingKey}>
{isSavingKey && <Loader2 className="w-4 h-4 mr-1.5 animate-spin" />}
{m.save()}
</Button>
</div>
</DialogFooter>
</DialogContent>
</Dialog>
{/* Dialog: Add Model */}
<Dialog open={addDialogOpen} onOpenChange={setAddDialogOpen}>
<DialogContent className="sm:max-w-[500px]">
<DialogHeader>
<DialogTitle>{m.add_media_model()}</DialogTitle>
<DialogDescription>{m.add_media_model_desc()}</DialogDescription>
</DialogHeader>
<div className="space-y-4 py-3">
{/* Type Select */}
<div className="space-y-1.5">
<label className="text-xs font-medium text-foreground">{m.model_type()}</label>
<Select
value={addType}
onValueChange={(val: 'image' | 'video') => {
setAddType(val)
setAddProvider('')
setSelectedModelId('')
setCustomModelId('')
}}
>
<SelectTrigger>
<SelectValue />
</SelectTrigger>
<SelectContent>
<SelectItem value="image">
<div className="flex items-center gap-2">
<ImageIcon className="w-4 h-4" />
<span>{m.media_type_image()}</span>
</div>
</SelectItem>
<SelectItem value="video">
<div className="flex items-center gap-2">
<VideoIcon className="w-4 h-4" />
<span>{m.media_type_video()}</span>
</div>
</SelectItem>
</SelectContent>
</Select>
</div>
{/* Provider Select */}
<div className="space-y-1.5">
<label className="text-xs font-medium text-foreground">{m.select_provider()}</label>
<Select
value={addProvider}
onValueChange={(val) => {
setAddProvider(val)
setSelectedModelId('')
setCustomModelId('')
}}
>
<SelectTrigger>
<SelectValue placeholder={m.select_provider()} />
</SelectTrigger>
<SelectContent>
{compatibleProviders.map((p) => (
<SelectItem key={p.provider} value={p.provider}>
<div className="flex items-center justify-between w-full gap-4">
<span>{PROVIDER_NAMES[p.provider] || p.provider}</span>
{!p.apiKeyConfigured && (
<span className="text-[11px] text-muted-foreground">
({m.provider_status_not_configured()})
</span>
)}
</div>
</SelectItem>
))}
</SelectContent>
</Select>
</div>
{/* Model Select */}
{addProvider && (
<div className="space-y-1.5">
<label className="text-xs font-medium text-foreground">{m.select_model()}</label>
{isLoadingCurated ? (
<div className="flex items-center gap-2 text-xs text-muted-foreground py-2">
<Loader2 className="w-3.5 h-3.5 animate-spin" />
<span>{m.loading_models()}</span>
</div>
) : (
<Select
value={selectedModelId}
onValueChange={(val) => {
setSelectedModelId(val)
if (val !== '__custom__') {
const found = curatedModels?.find((m) => m.modelId === val)
if (found) setModelDisplayName(found.name)
} else {
setModelDisplayName('')
}
}}
>
<SelectTrigger>
<SelectValue placeholder={m.select_model()} />
</SelectTrigger>
<SelectContent>
{curatedModels?.map((curated) => (
<SelectItem key={curated.modelId} value={curated.modelId}>
<div className="flex items-center justify-between w-full gap-2">
<span>{curated.name}</span>
<span className="font-mono text-[11px] text-muted-foreground">
{curated.modelId}
</span>
</div>
</SelectItem>
))}
<SelectItem value="__custom__">
<span className="italic text-muted-foreground">
{m.custom_model_option()}
</span>
</SelectItem>
</SelectContent>
</Select>
)}
</div>
)}
{/* Custom Model ID Input */}
{selectedModelId === '__custom__' && (
<div className="space-y-1.5">
<label className="text-xs font-medium text-foreground">
{m.custom_model_id()}
</label>
<Input
value={customModelId}
onChange={(e) => setCustomModelId(e.target.value)}
placeholder={m.enter_custom_model_id()}
className="font-mono text-sm"
/>
</div>
)}
{/* Display Name Input */}
{addProvider && selectedModelId && (
<div className="space-y-1.5">
<label className="text-xs font-medium text-foreground">
{m.model_display_name()}
</label>
<Input
value={modelDisplayName}
onChange={(e) => setModelDisplayName(e.target.value)}
placeholder={m.model_display_name_placeholder()}
/>
</div>
)}
</div>
<DialogFooter>
<Button
variant="outline"
onClick={() => setAddDialogOpen(false)}
disabled={isAddingModel}
>
{m.cancel()}
</Button>
<Button
onClick={handleAddModelSubmit}
disabled={
isAddingModel ||
!addProvider ||
!selectedModelId ||
(selectedModelId === '__custom__' && !customModelId.trim())
}
>
{isAddingModel && <Loader2 className="w-4 h-4 mr-1.5 animate-spin" />}
{m.add()}
</Button>
</DialogFooter>
</DialogContent>
</Dialog>
{/* Alert Dialog: Confirm Model Deletion */}
<AlertDialog
open={!!modelToDelete}
onOpenChange={(open) => {
if (!open) setModelToDelete(null)
}}
>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>{m.remove_model_confirm()}</AlertDialogTitle>
<AlertDialogDescription>
{modelToDelete &&
m.remove_model_prompt({
modelId: modelToDelete.modelId,
provider: PROVIDER_NAMES[modelToDelete.provider] || modelToDelete.provider,
})}
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel disabled={isRemovingModel}>{m.cancel()}</AlertDialogCancel>
<AlertDialogAction
onClick={() => {
if (modelToDelete) removeModel(modelToDelete.id)
}}
disabled={isRemovingModel}
className="bg-destructive text-destructive-foreground hover:bg-destructive/90"
>
{isRemovingModel && <Loader2 className="w-4 h-4 mr-1.5 animate-spin" />}
{m.delete()}
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
</div>
</ScrollArea>
)
}
@@ -0,0 +1,81 @@
// @vitest-environment happy-dom
import { cleanup, render, screen } from '@testing-library/react'
import React from 'react'
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { QuotaRuleDialog } from './QuotaRuleDialog'
import type { QuotaRuleResponse } from '@shumai/dtos'
vi.mock('@/ui/api/client', () => ({
client: {
api: {
teams: {
':teamId': {
members: {
$get: vi.fn().mockResolvedValue({
ok: true,
json: async () => [],
}),
},
mcp: {
servers: {
$get: vi.fn().mockResolvedValue({
ok: true,
json: async () => ({ servers: [] }),
}),
},
},
},
},
},
},
}))
vi.mock('sonner', () => ({
toast: {
success: vi.fn(),
error: vi.fn(),
},
}))
describe('QuotaRuleDialog', () => {
let queryClient: QueryClient
beforeEach(() => {
queryClient = new QueryClient({
defaultOptions: {
queries: { retry: false },
mutations: { retry: false },
},
})
})
afterEach(() => {
cleanup()
})
it('displays generate_image and generate_video in tool selector for agent_tool_call_count', () => {
const existingRule: QuotaRuleResponse = {
id: 'rule-1',
teamId: 'team-123',
scopeMode: 'each_member',
role: null,
resource: 'agent_tool_call_count',
resourceData: { name: 'generate_image' },
limit: 50,
period: '1day',
enabled: true,
createdAt: '2026-01-01T00:00:00.000Z',
updatedAt: '2026-01-01T00:00:00.000Z',
}
render(
<QueryClientProvider client={queryClient}>
<QuotaRuleDialog open={true} onOpenChange={vi.fn()} teamId="team-123" rule={existingRule} />
</QueryClientProvider>,
)
// The select trigger and option both display the selected tool name
expect(screen.getAllByText('Generate Image').length).toBeGreaterThan(0)
})
})
@@ -74,6 +74,8 @@ const STANDARD_TOOLS = [
{ value: 'create_folder', label: () => m.agent_tool_create_folder_name() },
{ value: 'create_file', label: () => m.agent_tool_create_file_name() },
{ value: 'create_version', label: () => m.agent_tool_create_version_name() },
{ value: 'generate_image', label: () => m.agent_tool_generate_image_name() },
{ value: 'generate_video', label: () => m.agent_tool_generate_video_name() },
]
/* eslint-disable @typescript-eslint/naming-convention */
+44 -1
View File
@@ -529,6 +529,10 @@
"agent_tool_create_file_desc": "Allows the agent to create files in Shumai, either by uploading a local file or by providing the file name and content directly.",
"agent_tool_create_version_name": "Create Version",
"agent_tool_create_version_desc": "Allows the agent to upload and stack a new version of an existing file in Shumai.",
"agent_tool_generate_image_name": "Generate Image",
"agent_tool_generate_image_desc": "Allows the agent to generate images from prompts and reference images using configured AI image models.",
"agent_tool_generate_video_name": "Generate Video",
"agent_tool_generate_video_desc": "Allows the agent to generate videos from text, images, or frame sequences using configured AI video models.",
"enabled": "Enabled",
"disabled": "Disabled",
"no_skills_available": "No skills available.",
@@ -1361,5 +1365,44 @@
"delete_session": "Delete Session",
"thinking_status": "Thinking...",
"contains_drawing_annotations": "Contains drawing annotations",
"page_prefix": "Page {page}"
"page_prefix": "Page {page}",
"image_video_generation": "Image / Video Generation",
"media_generation_settings_description": "Configure providers and enabled models for built-in image and video generation tools.",
"media_providers": "Media Providers",
"media_providers_description": "Configure API keys for built-in media generation providers. Providers can use environment variables or custom keys.",
"enabled_media_models": "Enabled Models",
"enabled_media_models_description": "Models enabled for the generate_image and generate_video tools. The first model of each type serves as default.",
"add_media_model": "Add Model",
"configure_api_key": "Configure API Key",
"edit_api_key": "Edit API Key",
"api_key_or_env_var": "API Key or Environment Variable",
"api_key_or_env_var_placeholder": "Leave empty to use default env var ({envKey})",
"api_key_or_env_var_hint": "Enter an API key or an environment variable name (e.g. {envKey}). Leave empty to restore default environment variable.",
"provider_status_configured_custom": "Configured (Custom)",
"provider_status_configured_env": "Configured (Environment)",
"provider_status_not_configured": "Not Configured",
"supported_types": "Supported",
"model_type": "Model Type",
"media_type_image": "Image",
"media_type_video": "Video",
"select_provider": "Select Provider",
"select_model": "Select Model",
"custom_model_id": "Custom Model ID",
"enter_custom_model_id": "Enter custom model ID",
"model_display_name": "Display Name (Optional)",
"model_display_name_placeholder": "Friendly name for this model",
"custom_model_option": "Custom Model...",
"no_enabled_models": "No media generation models enabled yet. Add at least one image or video model to enable the generation tools.",
"api_key_saved_successfully": "API key updated successfully",
"failed_to_save_api_key": "Failed to update API key",
"model_added_successfully": "Model added successfully",
"failed_to_add_model": "Failed to add model",
"model_removed_successfully": "Model removed successfully",
"failed_to_remove_model": "Failed to remove model",
"remove_model_confirm": "Are you sure you want to remove this model?",
"model_requires_api_key_warning": "This provider is not configured. Tools using this model will not be available until an API key is configured.",
"add_media_model_desc": "Select the media generation type, provider, and model to enable.",
"loading_models": "Loading models...",
"remove_model_prompt": "Remove model {modelId} ({provider}) from enabled models?",
"remove_key": "Remove Key"
}
+44 -1
View File
@@ -529,6 +529,10 @@
"agent_tool_create_file_desc": "允许智能体在 Shumai 中创建文件,既可以通过上传本地文件,也可以直接提供文件名和内容。",
"agent_tool_create_version_name": "创建版本",
"agent_tool_create_version_desc": "允许智能体在 Shumai 中为已有文件上传并叠加新版本。",
"agent_tool_generate_image_name": "生成图片",
"agent_tool_generate_image_desc": "允许智能体使用已配置的 AI 图片模型根据提示词和参考图片生成图片。",
"agent_tool_generate_video_name": "生成视频",
"agent_tool_generate_video_desc": "允许智能体使用已配置的 AI 视频模型根据提示词、图片或首尾帧生成视频。",
"enabled": "已启用",
"disabled": "已禁用",
"no_skills_available": "暂无可用技能。",
@@ -1361,5 +1365,44 @@
"delete_session": "删除会话",
"thinking_status": "思考中...",
"contains_drawing_annotations": "包含标注绘图",
"page_prefix": "第 {page} 页"
"page_prefix": "第 {page} 页",
"image_video_generation": "图像与视频生成",
"media_generation_settings_description": "配置内置图像和视频生成工具的提供商与已启用模型。",
"media_providers": "媒体提供商",
"media_providers_description": "为内置媒体生成提供商配置 API 密钥。提供商可以使用环境变量或自定义密钥。",
"enabled_media_models": "已启用模型",
"enabled_media_models_description": "供 generate_image 和 generate_video 工具使用的已启用模型。每种类型的第一个模型将作为默认模型。",
"add_media_model": "添加模型",
"configure_api_key": "配置 API 密钥",
"edit_api_key": "修改 API 密钥",
"api_key_or_env_var": "API 密钥或环境变量名",
"api_key_or_env_var_placeholder": "留空以使用默认环境变量 ({envKey})",
"api_key_or_env_var_hint": "输入 API 密钥或环境变量名(例如 {envKey})。留空将恢复默认环境变量。",
"provider_status_configured_custom": "已配置(自定义)",
"provider_status_configured_env": "已配置(环境变量)",
"provider_status_not_configured": "未配置",
"supported_types": "支持类型",
"model_type": "模型类型",
"media_type_image": "图像",
"media_type_video": "视频",
"select_provider": "选择提供商",
"select_model": "选择模型",
"custom_model_id": "自定义模型 ID",
"enter_custom_model_id": "输入自定义模型 ID",
"model_display_name": "显示名称(可选)",
"model_display_name_placeholder": "该模型的易读名称",
"custom_model_option": "自定义模型...",
"no_enabled_models": "尚未启用任何媒体生成模型。添加至少一个图像或视频模型以启用生成工具。",
"api_key_saved_successfully": "API 密钥更新成功",
"failed_to_save_api_key": "更新 API 密钥失败",
"model_added_successfully": "模型添加成功",
"failed_to_add_model": "添加模型失败",
"model_removed_successfully": "模型移除成功",
"failed_to_remove_model": "移除模型失败",
"remove_model_confirm": "确定要移除此模型吗?",
"model_requires_api_key_warning": "此提供商尚未配置。在配置 API 密钥之前,使用此模型的工具将不可用。",
"add_media_model_desc": "选择要启用的媒体生成类型、提供商和模型。",
"loading_models": "正在加载模型...",
"remove_model_prompt": "确定要从已启用模型中移除模型 {modelId}({provider})吗?",
"remove_key": "移除密钥"
}
+41
View File
@@ -510,6 +510,10 @@ export * from "./agent_tool_create_file_name.js";
export * from "./agent_tool_create_file_desc.js";
export * from "./agent_tool_create_version_name.js";
export * from "./agent_tool_create_version_desc.js";
export * from "./agent_tool_generate_image_name.js";
export * from "./agent_tool_generate_image_desc.js";
export * from "./agent_tool_generate_video_name.js";
export * from "./agent_tool_generate_video_desc.js";
export * from "./enabled.js";
export * from "./disabled.js";
export * from "./no_skills_available.js";
@@ -1298,4 +1302,41 @@ export * from "./back_to_chat.js";
export * from "./delete_session.js";
export * from "./thinking_status.js";
export * from "./page_prefix.js";
export * from "./image_video_generation.js";
export * from "./media_generation_settings_description.js";
export * from "./media_providers.js";
export * from "./media_providers_description.js";
export * from "./enabled_media_models.js";
export * from "./enabled_media_models_description.js";
export * from "./add_media_model.js";
export * from "./configure_api_key.js";
export * from "./edit_api_key.js";
export * from "./api_key_or_env_var.js";
export * from "./api_key_or_env_var_placeholder.js";
export * from "./api_key_or_env_var_hint.js";
export * from "./provider_status_configured_custom.js";
export * from "./provider_status_configured_env.js";
export * from "./provider_status_not_configured.js";
export * from "./supported_types.js";
export * from "./model_type.js";
export * from "./media_type_image.js";
export * from "./media_type_video.js";
export * from "./custom_model_id.js";
export * from "./enter_custom_model_id.js";
export * from "./model_display_name.js";
export * from "./model_display_name_placeholder.js";
export * from "./custom_model_option.js";
export * from "./no_enabled_models.js";
export * from "./api_key_saved_successfully.js";
export * from "./failed_to_save_api_key.js";
export * from "./model_added_successfully.js";
export * from "./failed_to_add_model.js";
export * from "./model_removed_successfully.js";
export * from "./failed_to_remove_model.js";
export * from "./remove_model_confirm.js";
export * from "./model_requires_api_key_warning.js";
export * from "./add_media_model_desc.js";
export * from "./loading_models.js";
export * from "./remove_model_prompt.js";
export * from "./remove_key.js";
export type LocalizedString = import("../runtime.js").LocalizedString;
+42 -1
View File
@@ -512,6 +512,10 @@ export * from './agent_tool_create_file_name.js'
export * from './agent_tool_create_file_desc.js'
export * from './agent_tool_create_version_name.js'
export * from './agent_tool_create_version_desc.js'
export * from './agent_tool_generate_image_name.js'
export * from './agent_tool_generate_image_desc.js'
export * from './agent_tool_generate_video_name.js'
export * from './agent_tool_generate_video_desc.js'
export * from './enabled.js'
export * from './disabled.js'
export * from './no_skills_available.js'
@@ -1299,4 +1303,41 @@ export * from './entry_id.js'
export * from './back_to_chat.js'
export * from './delete_session.js'
export * from './thinking_status.js'
export * from './page_prefix.js'
export * from './page_prefix.js'
export * from './image_video_generation.js'
export * from './media_generation_settings_description.js'
export * from './media_providers.js'
export * from './media_providers_description.js'
export * from './enabled_media_models.js'
export * from './enabled_media_models_description.js'
export * from './add_media_model.js'
export * from './configure_api_key.js'
export * from './edit_api_key.js'
export * from './api_key_or_env_var.js'
export * from './api_key_or_env_var_placeholder.js'
export * from './api_key_or_env_var_hint.js'
export * from './provider_status_configured_custom.js'
export * from './provider_status_configured_env.js'
export * from './provider_status_not_configured.js'
export * from './supported_types.js'
export * from './model_type.js'
export * from './media_type_image.js'
export * from './media_type_video.js'
export * from './custom_model_id.js'
export * from './enter_custom_model_id.js'
export * from './model_display_name.js'
export * from './model_display_name_placeholder.js'
export * from './custom_model_option.js'
export * from './no_enabled_models.js'
export * from './api_key_saved_successfully.js'
export * from './failed_to_save_api_key.js'
export * from './model_added_successfully.js'
export * from './failed_to_add_model.js'
export * from './model_removed_successfully.js'
export * from './failed_to_remove_model.js'
export * from './remove_model_confirm.js'
export * from './model_requires_api_key_warning.js'
export * from './add_media_model_desc.js'
export * from './loading_models.js'
export * from './remove_model_prompt.js'
export * from './remove_key.js'
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Add Model" |
*
* @param {Add_Media_ModelInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const add_media_model: ((inputs?: Add_Media_ModelInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Add_Media_ModelInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Add_Media_ModelInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Add_Media_ModelInputs */
const en_add_media_model = /** @type {(inputs: Add_Media_ModelInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Add Model`)
};
const zh_add_media_model = /** @type {(inputs: Add_Media_ModelInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`添加模型`)
};
/**
* | output |
* | --- |
* | "Add Model" |
*
* @param {Add_Media_ModelInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const add_media_model = /** @type {((inputs?: Add_Media_ModelInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Add_Media_ModelInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_add_media_model(inputs)
return zh_add_media_model(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Select the media generation type, provider, and model to enable." |
*
* @param {Add_Media_Model_DescInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const add_media_model_desc: ((inputs?: Add_Media_Model_DescInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Add_Media_Model_DescInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Add_Media_Model_DescInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Add_Media_Model_DescInputs */
const en_add_media_model_desc = /** @type {(inputs: Add_Media_Model_DescInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Select the media generation type, provider, and model to enable.`)
};
const zh_add_media_model_desc = /** @type {(inputs: Add_Media_Model_DescInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`选择要启用的媒体生成类型、提供商和模型。`)
};
/**
* | output |
* | --- |
* | "Select the media generation type, provider, and model to enable." |
*
* @param {Add_Media_Model_DescInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const add_media_model_desc = /** @type {((inputs?: Add_Media_Model_DescInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Add_Media_Model_DescInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_add_media_model_desc(inputs)
return zh_add_media_model_desc(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Allows the agent to generate images from prompts and reference images using configured AI image models." |
*
* @param {Agent_Tool_Generate_Image_DescInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const agent_tool_generate_image_desc: ((inputs?: Agent_Tool_Generate_Image_DescInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Agent_Tool_Generate_Image_DescInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Agent_Tool_Generate_Image_DescInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Agent_Tool_Generate_Image_DescInputs */
const en_agent_tool_generate_image_desc = /** @type {(inputs: Agent_Tool_Generate_Image_DescInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Allows the agent to generate images from prompts and reference images using configured AI image models.`)
};
const zh_agent_tool_generate_image_desc = /** @type {(inputs: Agent_Tool_Generate_Image_DescInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`允许智能体使用已配置的 AI 图片模型根据提示词和参考图片生成图片。`)
};
/**
* | output |
* | --- |
* | "Allows the agent to generate images from prompts and reference images using configured AI image models." |
*
* @param {Agent_Tool_Generate_Image_DescInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const agent_tool_generate_image_desc = /** @type {((inputs?: Agent_Tool_Generate_Image_DescInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Agent_Tool_Generate_Image_DescInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_agent_tool_generate_image_desc(inputs)
return zh_agent_tool_generate_image_desc(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Generate Image" |
*
* @param {Agent_Tool_Generate_Image_NameInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const agent_tool_generate_image_name: ((inputs?: Agent_Tool_Generate_Image_NameInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Agent_Tool_Generate_Image_NameInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Agent_Tool_Generate_Image_NameInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Agent_Tool_Generate_Image_NameInputs */
const en_agent_tool_generate_image_name = /** @type {(inputs: Agent_Tool_Generate_Image_NameInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Generate Image`)
};
const zh_agent_tool_generate_image_name = /** @type {(inputs: Agent_Tool_Generate_Image_NameInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`生成图片`)
};
/**
* | output |
* | --- |
* | "Generate Image" |
*
* @param {Agent_Tool_Generate_Image_NameInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const agent_tool_generate_image_name = /** @type {((inputs?: Agent_Tool_Generate_Image_NameInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Agent_Tool_Generate_Image_NameInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_agent_tool_generate_image_name(inputs)
return zh_agent_tool_generate_image_name(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Allows the agent to generate videos from text, images, or frame sequences using configured AI video models." |
*
* @param {Agent_Tool_Generate_Video_DescInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const agent_tool_generate_video_desc: ((inputs?: Agent_Tool_Generate_Video_DescInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Agent_Tool_Generate_Video_DescInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Agent_Tool_Generate_Video_DescInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Agent_Tool_Generate_Video_DescInputs */
const en_agent_tool_generate_video_desc = /** @type {(inputs: Agent_Tool_Generate_Video_DescInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Allows the agent to generate videos from text, images, or frame sequences using configured AI video models.`)
};
const zh_agent_tool_generate_video_desc = /** @type {(inputs: Agent_Tool_Generate_Video_DescInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`允许智能体使用已配置的 AI 视频模型根据提示词、图片或首尾帧生成视频。`)
};
/**
* | output |
* | --- |
* | "Allows the agent to generate videos from text, images, or frame sequences using configured AI video models." |
*
* @param {Agent_Tool_Generate_Video_DescInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const agent_tool_generate_video_desc = /** @type {((inputs?: Agent_Tool_Generate_Video_DescInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Agent_Tool_Generate_Video_DescInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_agent_tool_generate_video_desc(inputs)
return zh_agent_tool_generate_video_desc(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Generate Video" |
*
* @param {Agent_Tool_Generate_Video_NameInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const agent_tool_generate_video_name: ((inputs?: Agent_Tool_Generate_Video_NameInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Agent_Tool_Generate_Video_NameInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Agent_Tool_Generate_Video_NameInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Agent_Tool_Generate_Video_NameInputs */
const en_agent_tool_generate_video_name = /** @type {(inputs: Agent_Tool_Generate_Video_NameInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Generate Video`)
};
const zh_agent_tool_generate_video_name = /** @type {(inputs: Agent_Tool_Generate_Video_NameInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`生成视频`)
};
/**
* | output |
* | --- |
* | "Generate Video" |
*
* @param {Agent_Tool_Generate_Video_NameInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const agent_tool_generate_video_name = /** @type {((inputs?: Agent_Tool_Generate_Video_NameInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Agent_Tool_Generate_Video_NameInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_agent_tool_generate_video_name(inputs)
return zh_agent_tool_generate_video_name(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "API Key or Environment Variable" |
*
* @param {Api_Key_Or_Env_VarInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const api_key_or_env_var: ((inputs?: Api_Key_Or_Env_VarInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Api_Key_Or_Env_VarInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Api_Key_Or_Env_VarInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Api_Key_Or_Env_VarInputs */
const en_api_key_or_env_var = /** @type {(inputs: Api_Key_Or_Env_VarInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`API Key or Environment Variable`)
};
const zh_api_key_or_env_var = /** @type {(inputs: Api_Key_Or_Env_VarInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`API 密钥或环境变量名`)
};
/**
* | output |
* | --- |
* | "API Key or Environment Variable" |
*
* @param {Api_Key_Or_Env_VarInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const api_key_or_env_var = /** @type {((inputs?: Api_Key_Or_Env_VarInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Api_Key_Or_Env_VarInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_api_key_or_env_var(inputs)
return zh_api_key_or_env_var(inputs)
});
+18
View File
@@ -0,0 +1,18 @@
/**
* | output |
* | --- |
* | "Enter an API key or an environment variable name (e.g. {envKey}). Leave empty to restore default environment variable." |
*
* @param {Api_Key_Or_Env_Var_HintInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const api_key_or_env_var_hint: ((inputs: Api_Key_Or_Env_Var_HintInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Api_Key_Or_Env_Var_HintInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Api_Key_Or_Env_Var_HintInputs = {
envKey: NonNullable<unknown>;
};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{ envKey: NonNullable<unknown> }} Api_Key_Or_Env_Var_HintInputs */
const en_api_key_or_env_var_hint = /** @type {(inputs: Api_Key_Or_Env_Var_HintInputs) => LocalizedString} */ (i) => {
return /** @type {LocalizedString} */ (`Enter an API key or an environment variable name (e.g. ${i?.envKey}). Leave empty to restore default environment variable.`)
};
const zh_api_key_or_env_var_hint = /** @type {(inputs: Api_Key_Or_Env_Var_HintInputs) => LocalizedString} */ (i) => {
return /** @type {LocalizedString} */ (`输入 API 密钥或环境变量名(例如 ${i?.envKey})。留空将恢复默认环境变量。`)
};
/**
* | output |
* | --- |
* | "Enter an API key or an environment variable name (e.g. {envKey}). Leave empty to restore default environment variable." |
*
* @param {Api_Key_Or_Env_Var_HintInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const api_key_or_env_var_hint = /** @type {((inputs: Api_Key_Or_Env_Var_HintInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Api_Key_Or_Env_Var_HintInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_api_key_or_env_var_hint(inputs)
return zh_api_key_or_env_var_hint(inputs)
});
+18
View File
@@ -0,0 +1,18 @@
/**
* | output |
* | --- |
* | "Leave empty to use default env var ({envKey})" |
*
* @param {Api_Key_Or_Env_Var_PlaceholderInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const api_key_or_env_var_placeholder: ((inputs: Api_Key_Or_Env_Var_PlaceholderInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Api_Key_Or_Env_Var_PlaceholderInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Api_Key_Or_Env_Var_PlaceholderInputs = {
envKey: NonNullable<unknown>;
};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{ envKey: NonNullable<unknown> }} Api_Key_Or_Env_Var_PlaceholderInputs */
const en_api_key_or_env_var_placeholder = /** @type {(inputs: Api_Key_Or_Env_Var_PlaceholderInputs) => LocalizedString} */ (i) => {
return /** @type {LocalizedString} */ (`Leave empty to use default env var (${i?.envKey})`)
};
const zh_api_key_or_env_var_placeholder = /** @type {(inputs: Api_Key_Or_Env_Var_PlaceholderInputs) => LocalizedString} */ (i) => {
return /** @type {LocalizedString} */ (`留空以使用默认环境变量 (${i?.envKey})`)
};
/**
* | output |
* | --- |
* | "Leave empty to use default env var ({envKey})" |
*
* @param {Api_Key_Or_Env_Var_PlaceholderInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const api_key_or_env_var_placeholder = /** @type {((inputs: Api_Key_Or_Env_Var_PlaceholderInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Api_Key_Or_Env_Var_PlaceholderInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_api_key_or_env_var_placeholder(inputs)
return zh_api_key_or_env_var_placeholder(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "API key updated successfully" |
*
* @param {Api_Key_Saved_SuccessfullyInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const api_key_saved_successfully: ((inputs?: Api_Key_Saved_SuccessfullyInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Api_Key_Saved_SuccessfullyInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Api_Key_Saved_SuccessfullyInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Api_Key_Saved_SuccessfullyInputs */
const en_api_key_saved_successfully = /** @type {(inputs: Api_Key_Saved_SuccessfullyInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`API key updated successfully`)
};
const zh_api_key_saved_successfully = /** @type {(inputs: Api_Key_Saved_SuccessfullyInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`API 密钥更新成功`)
};
/**
* | output |
* | --- |
* | "API key updated successfully" |
*
* @param {Api_Key_Saved_SuccessfullyInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const api_key_saved_successfully = /** @type {((inputs?: Api_Key_Saved_SuccessfullyInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Api_Key_Saved_SuccessfullyInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_api_key_saved_successfully(inputs)
return zh_api_key_saved_successfully(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Configure API Key" |
*
* @param {Configure_Api_KeyInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const configure_api_key: ((inputs?: Configure_Api_KeyInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Configure_Api_KeyInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Configure_Api_KeyInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Configure_Api_KeyInputs */
const en_configure_api_key = /** @type {(inputs: Configure_Api_KeyInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Configure API Key`)
};
const zh_configure_api_key = /** @type {(inputs: Configure_Api_KeyInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`配置 API 密钥`)
};
/**
* | output |
* | --- |
* | "Configure API Key" |
*
* @param {Configure_Api_KeyInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const configure_api_key = /** @type {((inputs?: Configure_Api_KeyInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Configure_Api_KeyInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_configure_api_key(inputs)
return zh_configure_api_key(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Custom Model ID" |
*
* @param {Custom_Model_IdInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const custom_model_id: ((inputs?: Custom_Model_IdInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Custom_Model_IdInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Custom_Model_IdInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Custom_Model_IdInputs */
const en_custom_model_id = /** @type {(inputs: Custom_Model_IdInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Custom Model ID`)
};
const zh_custom_model_id = /** @type {(inputs: Custom_Model_IdInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`自定义模型 ID`)
};
/**
* | output |
* | --- |
* | "Custom Model ID" |
*
* @param {Custom_Model_IdInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const custom_model_id = /** @type {((inputs?: Custom_Model_IdInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Custom_Model_IdInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_custom_model_id(inputs)
return zh_custom_model_id(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Custom Model..." |
*
* @param {Custom_Model_OptionInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const custom_model_option: ((inputs?: Custom_Model_OptionInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Custom_Model_OptionInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Custom_Model_OptionInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Custom_Model_OptionInputs */
const en_custom_model_option = /** @type {(inputs: Custom_Model_OptionInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Custom Model...`)
};
const zh_custom_model_option = /** @type {(inputs: Custom_Model_OptionInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`自定义模型...`)
};
/**
* | output |
* | --- |
* | "Custom Model..." |
*
* @param {Custom_Model_OptionInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const custom_model_option = /** @type {((inputs?: Custom_Model_OptionInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Custom_Model_OptionInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_custom_model_option(inputs)
return zh_custom_model_option(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Edit API Key" |
*
* @param {Edit_Api_KeyInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const edit_api_key: ((inputs?: Edit_Api_KeyInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Edit_Api_KeyInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Edit_Api_KeyInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Edit_Api_KeyInputs */
const en_edit_api_key = /** @type {(inputs: Edit_Api_KeyInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Edit API Key`)
};
const zh_edit_api_key = /** @type {(inputs: Edit_Api_KeyInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`修改 API 密钥`)
};
/**
* | output |
* | --- |
* | "Edit API Key" |
*
* @param {Edit_Api_KeyInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const edit_api_key = /** @type {((inputs?: Edit_Api_KeyInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Edit_Api_KeyInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_edit_api_key(inputs)
return zh_edit_api_key(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Enabled Models" |
*
* @param {Enabled_Media_ModelsInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const enabled_media_models: ((inputs?: Enabled_Media_ModelsInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Enabled_Media_ModelsInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Enabled_Media_ModelsInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Enabled_Media_ModelsInputs */
const en_enabled_media_models = /** @type {(inputs: Enabled_Media_ModelsInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Enabled Models`)
};
const zh_enabled_media_models = /** @type {(inputs: Enabled_Media_ModelsInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`已启用模型`)
};
/**
* | output |
* | --- |
* | "Enabled Models" |
*
* @param {Enabled_Media_ModelsInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const enabled_media_models = /** @type {((inputs?: Enabled_Media_ModelsInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Enabled_Media_ModelsInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_enabled_media_models(inputs)
return zh_enabled_media_models(inputs)
});
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Models enabled for the generate_image and generate_video tools. The first model of each type serves as default." |
*
* @param {Enabled_Media_Models_DescriptionInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const enabled_media_models_description: ((inputs?: Enabled_Media_Models_DescriptionInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Enabled_Media_Models_DescriptionInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Enabled_Media_Models_DescriptionInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Enabled_Media_Models_DescriptionInputs */
const en_enabled_media_models_description = /** @type {(inputs: Enabled_Media_Models_DescriptionInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Models enabled for the generate_image and generate_video tools. The first model of each type serves as default.`)
};
const zh_enabled_media_models_description = /** @type {(inputs: Enabled_Media_Models_DescriptionInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`供 generate_image 和 generate_video 工具使用的已启用模型。每种类型的第一个模型将作为默认模型。`)
};
/**
* | output |
* | --- |
* | "Models enabled for the generate_image and generate_video tools. The first model of each type serves as default." |
*
* @param {Enabled_Media_Models_DescriptionInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const enabled_media_models_description = /** @type {((inputs?: Enabled_Media_Models_DescriptionInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Enabled_Media_Models_DescriptionInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_enabled_media_models_description(inputs)
return zh_enabled_media_models_description(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Enter custom model ID" |
*
* @param {Enter_Custom_Model_IdInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const enter_custom_model_id: ((inputs?: Enter_Custom_Model_IdInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Enter_Custom_Model_IdInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Enter_Custom_Model_IdInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Enter_Custom_Model_IdInputs */
const en_enter_custom_model_id = /** @type {(inputs: Enter_Custom_Model_IdInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Enter custom model ID`)
};
const zh_enter_custom_model_id = /** @type {(inputs: Enter_Custom_Model_IdInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`输入自定义模型 ID`)
};
/**
* | output |
* | --- |
* | "Enter custom model ID" |
*
* @param {Enter_Custom_Model_IdInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const enter_custom_model_id = /** @type {((inputs?: Enter_Custom_Model_IdInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Enter_Custom_Model_IdInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_enter_custom_model_id(inputs)
return zh_enter_custom_model_id(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Failed to add model" |
*
* @param {Failed_To_Add_ModelInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const failed_to_add_model: ((inputs?: Failed_To_Add_ModelInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Failed_To_Add_ModelInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Failed_To_Add_ModelInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Failed_To_Add_ModelInputs */
const en_failed_to_add_model = /** @type {(inputs: Failed_To_Add_ModelInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Failed to add model`)
};
const zh_failed_to_add_model = /** @type {(inputs: Failed_To_Add_ModelInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`添加模型失败`)
};
/**
* | output |
* | --- |
* | "Failed to add model" |
*
* @param {Failed_To_Add_ModelInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const failed_to_add_model = /** @type {((inputs?: Failed_To_Add_ModelInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Failed_To_Add_ModelInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_failed_to_add_model(inputs)
return zh_failed_to_add_model(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Failed to remove model" |
*
* @param {Failed_To_Remove_ModelInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const failed_to_remove_model: ((inputs?: Failed_To_Remove_ModelInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Failed_To_Remove_ModelInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Failed_To_Remove_ModelInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Failed_To_Remove_ModelInputs */
const en_failed_to_remove_model = /** @type {(inputs: Failed_To_Remove_ModelInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Failed to remove model`)
};
const zh_failed_to_remove_model = /** @type {(inputs: Failed_To_Remove_ModelInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`移除模型失败`)
};
/**
* | output |
* | --- |
* | "Failed to remove model" |
*
* @param {Failed_To_Remove_ModelInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const failed_to_remove_model = /** @type {((inputs?: Failed_To_Remove_ModelInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Failed_To_Remove_ModelInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_failed_to_remove_model(inputs)
return zh_failed_to_remove_model(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Failed to update API key" |
*
* @param {Failed_To_Save_Api_KeyInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const failed_to_save_api_key: ((inputs?: Failed_To_Save_Api_KeyInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Failed_To_Save_Api_KeyInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Failed_To_Save_Api_KeyInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Failed_To_Save_Api_KeyInputs */
const en_failed_to_save_api_key = /** @type {(inputs: Failed_To_Save_Api_KeyInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Failed to update API key`)
};
const zh_failed_to_save_api_key = /** @type {(inputs: Failed_To_Save_Api_KeyInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`更新 API 密钥失败`)
};
/**
* | output |
* | --- |
* | "Failed to update API key" |
*
* @param {Failed_To_Save_Api_KeyInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const failed_to_save_api_key = /** @type {((inputs?: Failed_To_Save_Api_KeyInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Failed_To_Save_Api_KeyInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_failed_to_save_api_key(inputs)
return zh_failed_to_save_api_key(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Image / Video Generation" |
*
* @param {Image_Video_GenerationInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const image_video_generation: ((inputs?: Image_Video_GenerationInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Image_Video_GenerationInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Image_Video_GenerationInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Image_Video_GenerationInputs */
const en_image_video_generation = /** @type {(inputs: Image_Video_GenerationInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Image / Video Generation`)
};
const zh_image_video_generation = /** @type {(inputs: Image_Video_GenerationInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`图像与视频生成`)
};
/**
* | output |
* | --- |
* | "Image / Video Generation" |
*
* @param {Image_Video_GenerationInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const image_video_generation = /** @type {((inputs?: Image_Video_GenerationInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Image_Video_GenerationInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_image_video_generation(inputs)
return zh_image_video_generation(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Loading models..." |
*
* @param {Loading_ModelsInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const loading_models: ((inputs?: Loading_ModelsInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Loading_ModelsInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Loading_ModelsInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Loading_ModelsInputs */
const en_loading_models = /** @type {(inputs: Loading_ModelsInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Loading models...`)
};
const zh_loading_models = /** @type {(inputs: Loading_ModelsInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`正在加载模型...`)
};
/**
* | output |
* | --- |
* | "Loading models..." |
*
* @param {Loading_ModelsInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const loading_models = /** @type {((inputs?: Loading_ModelsInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Loading_ModelsInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_loading_models(inputs)
return zh_loading_models(inputs)
});
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Configure providers and enabled models for built-in image and video generation tools." |
*
* @param {Media_Generation_Settings_DescriptionInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const media_generation_settings_description: ((inputs?: Media_Generation_Settings_DescriptionInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Media_Generation_Settings_DescriptionInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Media_Generation_Settings_DescriptionInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Media_Generation_Settings_DescriptionInputs */
const en_media_generation_settings_description = /** @type {(inputs: Media_Generation_Settings_DescriptionInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Configure providers and enabled models for built-in image and video generation tools.`)
};
const zh_media_generation_settings_description = /** @type {(inputs: Media_Generation_Settings_DescriptionInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`配置内置图像和视频生成工具的提供商与已启用模型。`)
};
/**
* | output |
* | --- |
* | "Configure providers and enabled models for built-in image and video generation tools." |
*
* @param {Media_Generation_Settings_DescriptionInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const media_generation_settings_description = /** @type {((inputs?: Media_Generation_Settings_DescriptionInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Media_Generation_Settings_DescriptionInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_media_generation_settings_description(inputs)
return zh_media_generation_settings_description(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Media Providers" |
*
* @param {Media_ProvidersInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const media_providers: ((inputs?: Media_ProvidersInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Media_ProvidersInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Media_ProvidersInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Media_ProvidersInputs */
const en_media_providers = /** @type {(inputs: Media_ProvidersInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Media Providers`)
};
const zh_media_providers = /** @type {(inputs: Media_ProvidersInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`媒体提供商`)
};
/**
* | output |
* | --- |
* | "Media Providers" |
*
* @param {Media_ProvidersInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const media_providers = /** @type {((inputs?: Media_ProvidersInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Media_ProvidersInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_media_providers(inputs)
return zh_media_providers(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Configure API keys for built-in media generation providers. Providers can use environment variables or custom keys." |
*
* @param {Media_Providers_DescriptionInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const media_providers_description: ((inputs?: Media_Providers_DescriptionInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Media_Providers_DescriptionInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Media_Providers_DescriptionInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Media_Providers_DescriptionInputs */
const en_media_providers_description = /** @type {(inputs: Media_Providers_DescriptionInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Configure API keys for built-in media generation providers. Providers can use environment variables or custom keys.`)
};
const zh_media_providers_description = /** @type {(inputs: Media_Providers_DescriptionInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`为内置媒体生成提供商配置 API 密钥。提供商可以使用环境变量或自定义密钥。`)
};
/**
* | output |
* | --- |
* | "Configure API keys for built-in media generation providers. Providers can use environment variables or custom keys." |
*
* @param {Media_Providers_DescriptionInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const media_providers_description = /** @type {((inputs?: Media_Providers_DescriptionInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Media_Providers_DescriptionInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_media_providers_description(inputs)
return zh_media_providers_description(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Image" |
*
* @param {Media_Type_ImageInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const media_type_image: ((inputs?: Media_Type_ImageInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Media_Type_ImageInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Media_Type_ImageInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Media_Type_ImageInputs */
const en_media_type_image = /** @type {(inputs: Media_Type_ImageInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Image`)
};
const zh_media_type_image = /** @type {(inputs: Media_Type_ImageInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`图像`)
};
/**
* | output |
* | --- |
* | "Image" |
*
* @param {Media_Type_ImageInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const media_type_image = /** @type {((inputs?: Media_Type_ImageInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Media_Type_ImageInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_media_type_image(inputs)
return zh_media_type_image(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Video" |
*
* @param {Media_Type_VideoInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const media_type_video: ((inputs?: Media_Type_VideoInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Media_Type_VideoInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Media_Type_VideoInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Media_Type_VideoInputs */
const en_media_type_video = /** @type {(inputs: Media_Type_VideoInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Video`)
};
const zh_media_type_video = /** @type {(inputs: Media_Type_VideoInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`视频`)
};
/**
* | output |
* | --- |
* | "Video" |
*
* @param {Media_Type_VideoInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const media_type_video = /** @type {((inputs?: Media_Type_VideoInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Media_Type_VideoInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_media_type_video(inputs)
return zh_media_type_video(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Model added successfully" |
*
* @param {Model_Added_SuccessfullyInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const model_added_successfully: ((inputs?: Model_Added_SuccessfullyInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Model_Added_SuccessfullyInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Model_Added_SuccessfullyInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Model_Added_SuccessfullyInputs */
const en_model_added_successfully = /** @type {(inputs: Model_Added_SuccessfullyInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Model added successfully`)
};
const zh_model_added_successfully = /** @type {(inputs: Model_Added_SuccessfullyInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`模型添加成功`)
};
/**
* | output |
* | --- |
* | "Model added successfully" |
*
* @param {Model_Added_SuccessfullyInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const model_added_successfully = /** @type {((inputs?: Model_Added_SuccessfullyInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Model_Added_SuccessfullyInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_model_added_successfully(inputs)
return zh_model_added_successfully(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Display Name (Optional)" |
*
* @param {Model_Display_NameInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const model_display_name: ((inputs?: Model_Display_NameInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Model_Display_NameInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Model_Display_NameInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Model_Display_NameInputs */
const en_model_display_name = /** @type {(inputs: Model_Display_NameInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Display Name (Optional)`)
};
const zh_model_display_name = /** @type {(inputs: Model_Display_NameInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`显示名称(可选)`)
};
/**
* | output |
* | --- |
* | "Display Name (Optional)" |
*
* @param {Model_Display_NameInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const model_display_name = /** @type {((inputs?: Model_Display_NameInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Model_Display_NameInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_model_display_name(inputs)
return zh_model_display_name(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Friendly name for this model" |
*
* @param {Model_Display_Name_PlaceholderInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const model_display_name_placeholder: ((inputs?: Model_Display_Name_PlaceholderInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Model_Display_Name_PlaceholderInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Model_Display_Name_PlaceholderInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Model_Display_Name_PlaceholderInputs */
const en_model_display_name_placeholder = /** @type {(inputs: Model_Display_Name_PlaceholderInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Friendly name for this model`)
};
const zh_model_display_name_placeholder = /** @type {(inputs: Model_Display_Name_PlaceholderInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`该模型的易读名称`)
};
/**
* | output |
* | --- |
* | "Friendly name for this model" |
*
* @param {Model_Display_Name_PlaceholderInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const model_display_name_placeholder = /** @type {((inputs?: Model_Display_Name_PlaceholderInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Model_Display_Name_PlaceholderInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_model_display_name_placeholder(inputs)
return zh_model_display_name_placeholder(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Model removed successfully" |
*
* @param {Model_Removed_SuccessfullyInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const model_removed_successfully: ((inputs?: Model_Removed_SuccessfullyInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Model_Removed_SuccessfullyInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Model_Removed_SuccessfullyInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Model_Removed_SuccessfullyInputs */
const en_model_removed_successfully = /** @type {(inputs: Model_Removed_SuccessfullyInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Model removed successfully`)
};
const zh_model_removed_successfully = /** @type {(inputs: Model_Removed_SuccessfullyInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`模型移除成功`)
};
/**
* | output |
* | --- |
* | "Model removed successfully" |
*
* @param {Model_Removed_SuccessfullyInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const model_removed_successfully = /** @type {((inputs?: Model_Removed_SuccessfullyInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Model_Removed_SuccessfullyInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_model_removed_successfully(inputs)
return zh_model_removed_successfully(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "This provider is not configured. Tools using this model will not be available until an API key is configured." |
*
* @param {Model_Requires_Api_Key_WarningInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const model_requires_api_key_warning: ((inputs?: Model_Requires_Api_Key_WarningInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Model_Requires_Api_Key_WarningInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Model_Requires_Api_Key_WarningInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Model_Requires_Api_Key_WarningInputs */
const en_model_requires_api_key_warning = /** @type {(inputs: Model_Requires_Api_Key_WarningInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`This provider is not configured. Tools using this model will not be available until an API key is configured.`)
};
const zh_model_requires_api_key_warning = /** @type {(inputs: Model_Requires_Api_Key_WarningInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`此提供商尚未配置。在配置 API 密钥之前,使用此模型的工具将不可用。`)
};
/**
* | output |
* | --- |
* | "This provider is not configured. Tools using this model will not be available until an API key is configured." |
*
* @param {Model_Requires_Api_Key_WarningInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const model_requires_api_key_warning = /** @type {((inputs?: Model_Requires_Api_Key_WarningInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Model_Requires_Api_Key_WarningInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_model_requires_api_key_warning(inputs)
return zh_model_requires_api_key_warning(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Model Type" |
*
* @param {Model_TypeInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const model_type: ((inputs?: Model_TypeInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Model_TypeInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Model_TypeInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Model_TypeInputs */
const en_model_type = /** @type {(inputs: Model_TypeInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Model Type`)
};
const zh_model_type = /** @type {(inputs: Model_TypeInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`模型类型`)
};
/**
* | output |
* | --- |
* | "Model Type" |
*
* @param {Model_TypeInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const model_type = /** @type {((inputs?: Model_TypeInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Model_TypeInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_model_type(inputs)
return zh_model_type(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "No media generation models enabled yet. Add at least one image or video model to enable the generation tools." |
*
* @param {No_Enabled_ModelsInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const no_enabled_models: ((inputs?: No_Enabled_ModelsInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<No_Enabled_ModelsInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type No_Enabled_ModelsInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} No_Enabled_ModelsInputs */
const en_no_enabled_models = /** @type {(inputs: No_Enabled_ModelsInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`No media generation models enabled yet. Add at least one image or video model to enable the generation tools.`)
};
const zh_no_enabled_models = /** @type {(inputs: No_Enabled_ModelsInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`尚未启用任何媒体生成模型。添加至少一个图像或视频模型以启用生成工具。`)
};
/**
* | output |
* | --- |
* | "No media generation models enabled yet. Add at least one image or video model to enable the generation tools." |
*
* @param {No_Enabled_ModelsInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const no_enabled_models = /** @type {((inputs?: No_Enabled_ModelsInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<No_Enabled_ModelsInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_no_enabled_models(inputs)
return zh_no_enabled_models(inputs)
});
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Configured (Custom)" |
*
* @param {Provider_Status_Configured_CustomInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const provider_status_configured_custom: ((inputs?: Provider_Status_Configured_CustomInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Provider_Status_Configured_CustomInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Provider_Status_Configured_CustomInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Provider_Status_Configured_CustomInputs */
const en_provider_status_configured_custom = /** @type {(inputs: Provider_Status_Configured_CustomInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Configured (Custom)`)
};
const zh_provider_status_configured_custom = /** @type {(inputs: Provider_Status_Configured_CustomInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`已配置(自定义)`)
};
/**
* | output |
* | --- |
* | "Configured (Custom)" |
*
* @param {Provider_Status_Configured_CustomInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const provider_status_configured_custom = /** @type {((inputs?: Provider_Status_Configured_CustomInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Provider_Status_Configured_CustomInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_provider_status_configured_custom(inputs)
return zh_provider_status_configured_custom(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Configured (Environment)" |
*
* @param {Provider_Status_Configured_EnvInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const provider_status_configured_env: ((inputs?: Provider_Status_Configured_EnvInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Provider_Status_Configured_EnvInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Provider_Status_Configured_EnvInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Provider_Status_Configured_EnvInputs */
const en_provider_status_configured_env = /** @type {(inputs: Provider_Status_Configured_EnvInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Configured (Environment)`)
};
const zh_provider_status_configured_env = /** @type {(inputs: Provider_Status_Configured_EnvInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`已配置(环境变量)`)
};
/**
* | output |
* | --- |
* | "Configured (Environment)" |
*
* @param {Provider_Status_Configured_EnvInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const provider_status_configured_env = /** @type {((inputs?: Provider_Status_Configured_EnvInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Provider_Status_Configured_EnvInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_provider_status_configured_env(inputs)
return zh_provider_status_configured_env(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Not Configured" |
*
* @param {Provider_Status_Not_ConfiguredInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const provider_status_not_configured: ((inputs?: Provider_Status_Not_ConfiguredInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Provider_Status_Not_ConfiguredInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Provider_Status_Not_ConfiguredInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Provider_Status_Not_ConfiguredInputs */
const en_provider_status_not_configured = /** @type {(inputs: Provider_Status_Not_ConfiguredInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Not Configured`)
};
const zh_provider_status_not_configured = /** @type {(inputs: Provider_Status_Not_ConfiguredInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`未配置`)
};
/**
* | output |
* | --- |
* | "Not Configured" |
*
* @param {Provider_Status_Not_ConfiguredInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const provider_status_not_configured = /** @type {((inputs?: Provider_Status_Not_ConfiguredInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Provider_Status_Not_ConfiguredInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_provider_status_not_configured(inputs)
return zh_provider_status_not_configured(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Remove Key" |
*
* @param {Remove_KeyInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const remove_key: ((inputs?: Remove_KeyInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Remove_KeyInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Remove_KeyInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Remove_KeyInputs */
const en_remove_key = /** @type {(inputs: Remove_KeyInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Remove Key`)
};
const zh_remove_key = /** @type {(inputs: Remove_KeyInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`移除密钥`)
};
/**
* | output |
* | --- |
* | "Remove Key" |
*
* @param {Remove_KeyInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const remove_key = /** @type {((inputs?: Remove_KeyInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Remove_KeyInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_remove_key(inputs)
return zh_remove_key(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Are you sure you want to remove this model?" |
*
* @param {Remove_Model_ConfirmInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const remove_model_confirm: ((inputs?: Remove_Model_ConfirmInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Remove_Model_ConfirmInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Remove_Model_ConfirmInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Remove_Model_ConfirmInputs */
const en_remove_model_confirm = /** @type {(inputs: Remove_Model_ConfirmInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Are you sure you want to remove this model?`)
};
const zh_remove_model_confirm = /** @type {(inputs: Remove_Model_ConfirmInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`确定要移除此模型吗?`)
};
/**
* | output |
* | --- |
* | "Are you sure you want to remove this model?" |
*
* @param {Remove_Model_ConfirmInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const remove_model_confirm = /** @type {((inputs?: Remove_Model_ConfirmInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Remove_Model_ConfirmInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_remove_model_confirm(inputs)
return zh_remove_model_confirm(inputs)
});
+19
View File
@@ -0,0 +1,19 @@
/**
* | output |
* | --- |
* | "Remove model {modelId} ({provider}) from enabled models?" |
*
* @param {Remove_Model_PromptInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const remove_model_prompt: ((inputs: Remove_Model_PromptInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Remove_Model_PromptInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Remove_Model_PromptInputs = {
modelId: NonNullable<unknown>;
provider: NonNullable<unknown>;
};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{ modelId: NonNullable<unknown>, provider: NonNullable<unknown> }} Remove_Model_PromptInputs */
const en_remove_model_prompt = /** @type {(inputs: Remove_Model_PromptInputs) => LocalizedString} */ (i) => {
return /** @type {LocalizedString} */ (`Remove model ${i?.modelId} (${i?.provider}) from enabled models?`)
};
const zh_remove_model_prompt = /** @type {(inputs: Remove_Model_PromptInputs) => LocalizedString} */ (i) => {
return /** @type {LocalizedString} */ (`确定要从已启用模型中移除模型 ${i?.modelId}(${i?.provider})吗?`)
};
/**
* | output |
* | --- |
* | "Remove model {modelId} ({provider}) from enabled models?" |
*
* @param {Remove_Model_PromptInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const remove_model_prompt = /** @type {((inputs: Remove_Model_PromptInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Remove_Model_PromptInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_remove_model_prompt(inputs)
return zh_remove_model_prompt(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Supported" |
*
* @param {Supported_TypesInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const supported_types: ((inputs?: Supported_TypesInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Supported_TypesInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Supported_TypesInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Supported_TypesInputs */
const en_supported_types = /** @type {(inputs: Supported_TypesInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Supported`)
};
const zh_supported_types = /** @type {(inputs: Supported_TypesInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`支持类型`)
};
/**
* | output |
* | --- |
* | "Supported" |
*
* @param {Supported_TypesInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const supported_types = /** @type {((inputs?: Supported_TypesInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Supported_TypesInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_supported_types(inputs)
return zh_supported_types(inputs)
});
@@ -13,6 +13,7 @@ import { McpConfigCard } from '@/ui/components/settings/McpConfigCard'
import { NotificationSettings } from '@/ui/components/settings/NotificationSettings'
import { DeveloperSettings } from '@/ui/components/settings/DeveloperSettings'
import { QuotasSettings } from '@/ui/components/settings/QuotasSettings'
import { ImageVideoGenerationSettings } from '@/ui/components/settings/ImageVideoGenerationSettings'
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/ui/components/ui/card'
import { cn } from '@/ui/lib/utils'
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'
@@ -24,6 +25,7 @@ import {
Puzzle,
Server,
Shield,
Sparkles,
User,
Bell,
Key,
@@ -53,6 +55,7 @@ type SettingsTab =
| 'skills'
| 'mcp'
| 'providers'
| 'image-video'
| 'agents'
| 'sandbox'
| 'notifications'
@@ -65,6 +68,7 @@ const VALID_SETTINGS_TABS: readonly SettingsTab[] = [
'skills',
'mcp',
'providers',
'image-video',
'agents',
'sandbox',
'notifications',
@@ -163,6 +167,7 @@ function TeamSettingsPage() {
'transcode',
'quotas',
'providers',
'image-video',
'skills',
'mcp',
'agents',
@@ -447,6 +452,22 @@ function TeamSettingsPage() {
)}
</button>
<button
onClick={() => handleTabChange('image-video')}
className={cn(
'w-full flex items-center gap-3 px-4 py-3 text-sm font-medium rounded-lg transition-all',
activeTab === 'image-video'
? 'bg-sidebar-accent text-sidebar-accent-foreground ring-1 ring-sidebar-border'
: 'text-sidebar-foreground/75 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',
)}
>
<Sparkles className="w-5 h-5" />
{m.image_video_generation()}
{activeTab === 'image-video' && (
<div className="ml-auto w-1.5 h-1.5 rounded-full bg-sidebar-primary" />
)}
</button>
<button
onClick={() => handleTabChange('skills')}
className={cn(
@@ -527,6 +548,7 @@ function TeamSettingsPage() {
{activeTab === 'skills' && m.skills_management()}
{activeTab === 'mcp' && m.mcp_servers()}
{activeTab === 'providers' && m.ai_providers()}
{activeTab === 'image-video' && m.image_video_generation()}
{activeTab === 'agents' && m.ai_agents()}
{activeTab === 'sandbox' && m.agent_sandbox_settings()}
{activeTab === 'notifications' && m.notification_settings()}
@@ -539,6 +561,7 @@ function TeamSettingsPage() {
{activeTab === 'skills' && m.skills_description()}
{activeTab === 'mcp' && m.mcp_servers_description()}
{activeTab === 'providers' && m.providers_description()}
{activeTab === 'image-video' && m.media_generation_settings_description()}
{activeTab === 'agents' && m.agents_description()}
{activeTab === 'sandbox' && m.sandbox_description()}
{activeTab === 'notifications' && m.notifications_description()}
@@ -785,6 +808,8 @@ function TeamSettingsPage() {
{activeTab === 'providers' && <ProvidersSettings teamId={teamId} />}
{activeTab === 'image-video' && <ImageVideoGenerationSettings teamId={teamId} />}
{activeTab === 'agents' && (
<div className="h-full overflow-y-auto pr-1">
<AgentsSettings teamId={teamId} />