mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-01 05:14:25 +00:00
feat(quota): add 2-level database-backed resource quota system (#318)
* feat(quota): add database-backed resource quota system * feat(webui): add resource quota management in team settings (#319) * feat(webui): add resource quota settings in team management * refactor(webui): update quotas list to full row layout and restrict skill/mcp to select list * feat(quota): refactor quota system to 2-level rules and records * fix(webui): fix overflow and scroll area in quota usage records dialog * fix(webui): ensure quota records scroll area has explicit max height * feat(webui): improve quota cards interaction and restrict editable fields in edit mode * fix(quota): serialize initial records, validate merged updates, and reset on dimension changes (#320) * feat(quota): replace network quota with agent tools quota (#321) * feat(webui): show remaining time until next refresh in quota usage records * fix(webui): rename bash quota resource to Agent Bash Calls * refactor(quota): remove unused reserved field from quota records * refactor(quota): remove quota rule cache (#322)
This commit is contained in:
@@ -0,0 +1,852 @@
|
||||
import React, { useState, useEffect } from 'react'
|
||||
import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query'
|
||||
import { client } from '@/ui/api/client'
|
||||
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 { Popover, PopoverContent, PopoverTrigger } from '@/ui/components/ui/popover'
|
||||
import { Input } from '@/ui/components/ui/input'
|
||||
import { Label } from '@/ui/components/ui/label'
|
||||
import { Button } from '@/ui/components/ui/button'
|
||||
import { Switch } from '@/ui/components/ui/switch'
|
||||
import { Checkbox } from '@/ui/components/ui/checkbox'
|
||||
import { ScrollArea } from '@/ui/components/ui/scroll-area'
|
||||
import { Avatar, AvatarFallback, AvatarImage } from '@/ui/components/ui/avatar'
|
||||
import {
|
||||
Cpu,
|
||||
DollarSign,
|
||||
Puzzle,
|
||||
Server,
|
||||
Terminal,
|
||||
Wrench,
|
||||
Loader2,
|
||||
Trash2,
|
||||
Users,
|
||||
UserCheck,
|
||||
User,
|
||||
Clock,
|
||||
Search,
|
||||
ChevronDown,
|
||||
} from 'lucide-react'
|
||||
import { toast } from 'sonner'
|
||||
import { m } from '@/ui/paraglide/messages.js'
|
||||
import type {
|
||||
QuotaRuleResponse,
|
||||
QuotaScopeModeEnum,
|
||||
QuotaResourceTypeEnum,
|
||||
QuotaPeriodEnum,
|
||||
QuotaRole,
|
||||
} from '@shumai/dtos'
|
||||
import { formatQuotaPeriod } from '@shumai/dtos'
|
||||
|
||||
interface QuotaRuleDialogProps {
|
||||
open: boolean
|
||||
onOpenChange: (open: boolean) => void
|
||||
teamId: string
|
||||
rule?: QuotaRuleResponse | null
|
||||
onSuccess?: () => void
|
||||
}
|
||||
|
||||
const STANDARD_TOOLS = [
|
||||
{ value: 'analyze_image', label: () => m.agent_tool_analyze_image_name() },
|
||||
{ value: 'screenshot', label: () => m.agent_tool_screenshot_name() },
|
||||
{ value: 'read_pdf_pages', label: () => m.agent_tool_read_pdf_pages_name() },
|
||||
{ value: 'list_assets', label: () => m.agent_tool_list_assets_name() },
|
||||
{ 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() },
|
||||
]
|
||||
|
||||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
const RESOURCE_CONFIG = {
|
||||
agent_total_tokens: {
|
||||
label: () => m.quota_resource_agent_total_tokens(),
|
||||
icon: Cpu,
|
||||
unit: 'tokens',
|
||||
defaultLimit: 100000,
|
||||
},
|
||||
agent_cost: {
|
||||
label: () => m.quota_resource_agent_cost(),
|
||||
icon: DollarSign,
|
||||
unit: '$',
|
||||
defaultLimit: 10,
|
||||
},
|
||||
agent_skill_call_count: {
|
||||
label: () => m.quota_resource_agent_skill_call_count(),
|
||||
icon: Puzzle,
|
||||
unit: 'calls',
|
||||
defaultLimit: 100,
|
||||
},
|
||||
agent_mcp_call_count: {
|
||||
label: () => m.quota_resource_agent_mcp_call_count(),
|
||||
icon: Server,
|
||||
unit: 'calls',
|
||||
defaultLimit: 100,
|
||||
},
|
||||
agent_bash_call_count: {
|
||||
label: () => m.quota_resource_agent_bash_call_count(),
|
||||
icon: Terminal,
|
||||
unit: 'calls',
|
||||
defaultLimit: 50,
|
||||
},
|
||||
agent_tool_call_count: {
|
||||
label: () => m.quota_resource_agent_tool_call_count(),
|
||||
icon: Wrench,
|
||||
unit: 'calls',
|
||||
defaultLimit: 100,
|
||||
},
|
||||
} as const
|
||||
/* eslint-enable @typescript-eslint/naming-convention */
|
||||
|
||||
export const QuotaRuleDialog: React.FC<QuotaRuleDialogProps> = ({
|
||||
open,
|
||||
onOpenChange,
|
||||
teamId,
|
||||
rule,
|
||||
onSuccess,
|
||||
}) => {
|
||||
const queryClient = useQueryClient()
|
||||
const isEditing = !!rule
|
||||
|
||||
const [scopeMode, setScopeMode] = useState<QuotaScopeModeEnum>('each_member')
|
||||
const [roleScope, setRoleScope] = useState<string>('team') // 'team' | 'owner' | 'editor' | 'reviewer'
|
||||
const [selectedUserIds, setSelectedUserIds] = useState<string[]>([])
|
||||
const [resource, setResource] = useState<QuotaResourceTypeEnum>('agent_total_tokens')
|
||||
const [skillId, setSkillId] = useState<string>('')
|
||||
const [mcpServerId, setMcpServerId] = useState<string>('')
|
||||
const [bashMatch, setBashMatch] = useState<string>('*')
|
||||
const [toolName, setToolName] = useState<string>('analyze_image')
|
||||
const [limit, setLimit] = useState<number>(100000)
|
||||
const [period, setPeriod] = useState<QuotaPeriodEnum>('1day')
|
||||
const [enabled, setEnabled] = useState<boolean>(true)
|
||||
const [isDeleteDialogOpen, setIsDeleteDialogOpen] = useState<boolean>(false)
|
||||
const [memberSearch, setMemberSearch] = useState<string>('')
|
||||
|
||||
// Fetch team members
|
||||
const { data: members = [] } = useQuery({
|
||||
queryKey: ['teams', teamId, 'members'],
|
||||
queryFn: async () => {
|
||||
const res = await client.api.teams[':teamId'].members.$get({
|
||||
param: { teamId },
|
||||
query: {},
|
||||
})
|
||||
if (!res.ok) return []
|
||||
return await res.json()
|
||||
},
|
||||
enabled: open,
|
||||
})
|
||||
|
||||
// Fetch team skills when needed
|
||||
const { data: skillsData } = useQuery({
|
||||
queryKey: ['teams', teamId, 'skills'],
|
||||
queryFn: async () => {
|
||||
const res = await client.api.teams[':teamId'].skills.$get({ param: { teamId } })
|
||||
if (!res.ok) return { skills: [] }
|
||||
return await res.json()
|
||||
},
|
||||
enabled: open && resource === 'agent_skill_call_count',
|
||||
})
|
||||
const skills = skillsData?.skills || []
|
||||
|
||||
// Fetch team MCP servers when needed
|
||||
const { data: mcpData } = useQuery({
|
||||
queryKey: ['teams', teamId, 'mcp', 'servers'],
|
||||
queryFn: async () => {
|
||||
const res = await client.api.teams[':teamId'].mcp.servers.$get({ param: { teamId } })
|
||||
if (!res.ok) return { servers: [] }
|
||||
return await res.json()
|
||||
},
|
||||
enabled: open && resource === 'agent_mcp_call_count',
|
||||
})
|
||||
const mcpServers = mcpData?.servers || []
|
||||
|
||||
// Reset or populate form values on open/rule change
|
||||
useEffect(() => {
|
||||
if (rule) {
|
||||
setScopeMode(rule.scopeMode)
|
||||
setRoleScope(rule.role || 'team')
|
||||
setSelectedUserIds(rule.userIds || [])
|
||||
setResource(rule.resource)
|
||||
const resData = (rule.resourceData as Record<string, unknown> | null) || {}
|
||||
setSkillId(typeof resData.id === 'string' ? resData.id : '')
|
||||
setMcpServerId(typeof resData.id === 'string' ? resData.id : '')
|
||||
setBashMatch(typeof resData.match === 'string' ? resData.match : '*')
|
||||
setToolName(
|
||||
typeof resData.name === 'string'
|
||||
? resData.name
|
||||
: typeof resData.toolName === 'string'
|
||||
? resData.toolName
|
||||
: 'analyze_image',
|
||||
)
|
||||
setLimit(rule.limit)
|
||||
setPeriod(formatQuotaPeriod(rule.period) as QuotaPeriodEnum)
|
||||
setEnabled(rule.enabled)
|
||||
} else {
|
||||
setScopeMode('each_member')
|
||||
setRoleScope('team')
|
||||
setSelectedUserIds([])
|
||||
setResource('agent_total_tokens')
|
||||
setSkillId('')
|
||||
setMcpServerId('')
|
||||
setBashMatch('*')
|
||||
setToolName('analyze_image')
|
||||
setLimit(RESOURCE_CONFIG.agent_total_tokens.defaultLimit)
|
||||
setPeriod('1day')
|
||||
setEnabled(true)
|
||||
}
|
||||
}, [rule, open])
|
||||
|
||||
// Handle resource change limit defaults
|
||||
const handleResourceChange = (newRes: QuotaResourceTypeEnum) => {
|
||||
setResource(newRes)
|
||||
if (!isEditing) {
|
||||
setLimit(RESOURCE_CONFIG[newRes]?.defaultLimit || 100)
|
||||
}
|
||||
}
|
||||
|
||||
// Create mutation
|
||||
const createMutation = useMutation({
|
||||
mutationFn: async () => {
|
||||
const resourceData: Record<string, unknown> = {}
|
||||
if (resource === 'agent_skill_call_count') {
|
||||
resourceData.id = skillId
|
||||
} else if (resource === 'agent_mcp_call_count') {
|
||||
resourceData.id = mcpServerId
|
||||
} else if (resource === 'agent_bash_call_count') {
|
||||
resourceData.match = bashMatch.trim() || '*'
|
||||
} else if (resource === 'agent_tool_call_count') {
|
||||
resourceData.name = toolName || 'analyze_image'
|
||||
}
|
||||
|
||||
const res = await client.api.teams[':teamId'].quotas.$post({
|
||||
param: { teamId },
|
||||
json: {
|
||||
scopeMode,
|
||||
role:
|
||||
scopeMode !== 'selected_members' && roleScope !== 'team'
|
||||
? (roleScope as QuotaRole)
|
||||
: null,
|
||||
userIds: scopeMode === 'selected_members' ? selectedUserIds : null,
|
||||
resource,
|
||||
resourceData: Object.keys(resourceData).length > 0 ? resourceData : null,
|
||||
limit: Number(limit),
|
||||
period,
|
||||
enabled,
|
||||
},
|
||||
})
|
||||
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 || m.failed_to_create_quota())
|
||||
}
|
||||
return await res.json()
|
||||
},
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['teams', teamId, 'quotas'] })
|
||||
toast.success(m.quota_created_successfully())
|
||||
onOpenChange(false)
|
||||
onSuccess?.()
|
||||
},
|
||||
onError: (err) => {
|
||||
console.error('CREATE MUTATION ERROR:', err)
|
||||
toast.error(err instanceof Error ? err.message : m.failed_to_create_quota())
|
||||
},
|
||||
})
|
||||
|
||||
// Update mutation
|
||||
const updateMutation = useMutation({
|
||||
mutationFn: async () => {
|
||||
if (!rule) return
|
||||
const resourceData: Record<string, unknown> = {}
|
||||
if (resource === 'agent_skill_call_count') {
|
||||
resourceData.id = skillId
|
||||
} else if (resource === 'agent_mcp_call_count') {
|
||||
resourceData.id = mcpServerId
|
||||
} else if (resource === 'agent_bash_call_count') {
|
||||
resourceData.match = bashMatch.trim() || '*'
|
||||
} else if (resource === 'agent_tool_call_count') {
|
||||
resourceData.name = toolName || 'analyze_image'
|
||||
}
|
||||
|
||||
const res = await client.api.teams[':teamId'].quotas[':id'].$put({
|
||||
param: { teamId, id: rule.id },
|
||||
json: {
|
||||
scopeMode,
|
||||
role:
|
||||
scopeMode !== 'selected_members' && roleScope !== 'team'
|
||||
? (roleScope as QuotaRole)
|
||||
: null,
|
||||
userIds: scopeMode === 'selected_members' ? selectedUserIds : null,
|
||||
resource,
|
||||
resourceData: Object.keys(resourceData).length > 0 ? resourceData : null,
|
||||
limit: Number(limit),
|
||||
period,
|
||||
enabled,
|
||||
},
|
||||
})
|
||||
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 || m.failed_to_update_quota())
|
||||
}
|
||||
return await res.json()
|
||||
},
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['teams', teamId, 'quotas'] })
|
||||
toast.success(m.quota_updated_successfully())
|
||||
onOpenChange(false)
|
||||
onSuccess?.()
|
||||
},
|
||||
onError: (err) => {
|
||||
toast.error(err instanceof Error ? err.message : m.failed_to_update_quota())
|
||||
},
|
||||
})
|
||||
|
||||
// Delete mutation
|
||||
const deleteMutation = useMutation({
|
||||
mutationFn: async () => {
|
||||
if (!rule) return
|
||||
const res = await client.api.teams[':teamId'].quotas[':id'].$delete({
|
||||
param: { teamId, id: rule.id },
|
||||
})
|
||||
if (!res.ok) throw new Error(m.failed_to_delete_quota())
|
||||
},
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['teams', teamId, 'quotas'] })
|
||||
toast.success(m.quota_deleted_successfully())
|
||||
setIsDeleteDialogOpen(false)
|
||||
onOpenChange(false)
|
||||
onSuccess?.()
|
||||
},
|
||||
onError: (err) => {
|
||||
toast.error(err instanceof Error ? err.message : m.failed_to_delete_quota())
|
||||
},
|
||||
})
|
||||
|
||||
const handleSubmit = (e: React.FormEvent) => {
|
||||
e.preventDefault()
|
||||
if (scopeMode === 'selected_members' && selectedUserIds.length === 0) {
|
||||
toast.error(m.select_user())
|
||||
return
|
||||
}
|
||||
if (resource === 'agent_skill_call_count' && !skillId.trim()) {
|
||||
toast.error(m.enter_skill_id())
|
||||
return
|
||||
}
|
||||
if (resource === 'agent_mcp_call_count' && !mcpServerId.trim()) {
|
||||
toast.error(m.enter_mcp_id())
|
||||
return
|
||||
}
|
||||
if (limit <= 0) {
|
||||
toast.error('Limit must be greater than 0')
|
||||
return
|
||||
}
|
||||
|
||||
if (isEditing) {
|
||||
updateMutation.mutate()
|
||||
} else {
|
||||
createMutation.mutate()
|
||||
}
|
||||
}
|
||||
|
||||
const isPending = createMutation.isPending || updateMutation.isPending || deleteMutation.isPending
|
||||
|
||||
const filteredMembers = members.filter((member) => {
|
||||
if (!memberSearch.trim()) return true
|
||||
const q = memberSearch.toLowerCase()
|
||||
return (
|
||||
member.name.toLowerCase().includes(q) ||
|
||||
(member.email && member.email.toLowerCase().includes(q))
|
||||
)
|
||||
})
|
||||
|
||||
const toggleUserSelection = (userId: string) => {
|
||||
setSelectedUserIds((prev) =>
|
||||
prev.includes(userId) ? prev.filter((id) => id !== userId) : [...prev, userId],
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<Dialog open={open} onOpenChange={onOpenChange}>
|
||||
<DialogContent className="sm:max-w-[540px] max-h-[90vh] flex flex-col p-0 overflow-hidden">
|
||||
<DialogHeader className="p-6 pb-4 border-b border-border/60 shrink-0">
|
||||
<DialogTitle className="text-xl font-bold">
|
||||
{isEditing ? m.edit_quota_rule() : m.create_quota_rule()}
|
||||
</DialogTitle>
|
||||
<DialogDescription className="text-sm text-muted-foreground">
|
||||
{isEditing ? m.edit_quota_rule_description() : m.create_quota_rule_description()}
|
||||
</DialogDescription>
|
||||
</DialogHeader>
|
||||
|
||||
<form
|
||||
onSubmit={handleSubmit}
|
||||
noValidate
|
||||
className="flex-1 overflow-y-auto min-h-0 p-6 space-y-5"
|
||||
>
|
||||
{/* Step 1: Scope Mode Selector */}
|
||||
<div className="space-y-2">
|
||||
<Label className="text-sm font-semibold">{m.quota_scope_mode()}</Label>
|
||||
<div className="grid grid-cols-3 gap-2">
|
||||
<Button
|
||||
type="button"
|
||||
variant={scopeMode === 'each_member' ? 'default' : 'outline'}
|
||||
size="sm"
|
||||
disabled={isEditing || isPending}
|
||||
onClick={() => setScopeMode('each_member')}
|
||||
className="flex flex-col h-auto py-2.5 px-2 gap-1 items-center justify-center text-xs"
|
||||
>
|
||||
<User className="w-4 h-4" />
|
||||
<span className="font-semibold">{m.quota_scope_mode_each_member()}</span>
|
||||
</Button>
|
||||
<Button
|
||||
type="button"
|
||||
variant={scopeMode === 'all_members' ? 'default' : 'outline'}
|
||||
size="sm"
|
||||
disabled={isEditing || isPending}
|
||||
onClick={() => setScopeMode('all_members')}
|
||||
className="flex flex-col h-auto py-2.5 px-2 gap-1 items-center justify-center text-xs"
|
||||
>
|
||||
<Users className="w-4 h-4" />
|
||||
<span className="font-semibold">{m.quota_scope_mode_all_members()}</span>
|
||||
</Button>
|
||||
<Button
|
||||
type="button"
|
||||
variant={scopeMode === 'selected_members' ? 'default' : 'outline'}
|
||||
size="sm"
|
||||
disabled={isEditing || isPending}
|
||||
onClick={() => setScopeMode('selected_members')}
|
||||
className="flex flex-col h-auto py-2.5 px-2 gap-1 items-center justify-center text-xs"
|
||||
>
|
||||
<UserCheck className="w-4 h-4" />
|
||||
<span className="font-semibold">{m.quota_scope_mode_selected_members()}</span>
|
||||
</Button>
|
||||
</div>
|
||||
<p className="text-xs text-muted-foreground pt-0.5">
|
||||
{scopeMode === 'each_member' && m.quota_scope_mode_each_member_desc()}
|
||||
{scopeMode === 'all_members' && m.quota_scope_mode_all_members_desc()}
|
||||
{scopeMode === 'selected_members' && m.quota_scope_mode_selected_members_desc()}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{/* Step 2: Target Scope or Multi-Select Users */}
|
||||
{scopeMode !== 'selected_members' ? (
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="quota-role-scope" className="text-sm font-semibold">
|
||||
{m.quota_scope()}
|
||||
</Label>
|
||||
<Select
|
||||
value={roleScope}
|
||||
onValueChange={setRoleScope}
|
||||
disabled={isEditing || isPending}
|
||||
>
|
||||
<SelectTrigger id="quota-role-scope" className="w-full">
|
||||
<SelectValue />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem value="team">{m.quota_scope_team()}</SelectItem>
|
||||
<SelectItem value="owner">{m.quota_scope_role()}: Owner</SelectItem>
|
||||
<SelectItem value="editor">{m.quota_scope_role()}: Editor</SelectItem>
|
||||
<SelectItem value="reviewer">{m.quota_scope_role()}: Reviewer</SelectItem>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
</div>
|
||||
) : (
|
||||
<div className="space-y-2">
|
||||
<Label className="text-sm font-semibold">{m.select_members()}</Label>
|
||||
<Popover>
|
||||
<PopoverTrigger asChild>
|
||||
<Button
|
||||
variant="outline"
|
||||
role="combobox"
|
||||
disabled={isPending}
|
||||
className="w-full justify-between text-left font-normal h-10"
|
||||
>
|
||||
<span className="truncate">
|
||||
{selectedUserIds.length === 0
|
||||
? m.select_members()
|
||||
: m.quota_selected_users_count({ count: selectedUserIds.length })}
|
||||
</span>
|
||||
<ChevronDown className="ml-2 h-4 w-4 shrink-0 opacity-50" />
|
||||
</Button>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent className="w-[320px] p-2" align="start">
|
||||
<div className="space-y-2">
|
||||
<div className="relative">
|
||||
<Search className="w-3.5 h-3.5 absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground" />
|
||||
<Input
|
||||
placeholder={m.quota_search_members()}
|
||||
value={memberSearch}
|
||||
onChange={(e) => setMemberSearch(e.target.value)}
|
||||
className="h-8 pl-8 text-xs"
|
||||
/>
|
||||
</div>
|
||||
<ScrollArea className="h-48">
|
||||
<div className="space-y-1 pr-2">
|
||||
{filteredMembers.map((member) => {
|
||||
const isChecked = selectedUserIds.includes(member.id)
|
||||
return (
|
||||
<div
|
||||
key={member.id}
|
||||
onClick={() => toggleUserSelection(member.id)}
|
||||
className="flex items-center gap-2 p-1.5 rounded-lg hover:bg-muted/60 cursor-pointer text-xs"
|
||||
>
|
||||
<Checkbox
|
||||
checked={isChecked}
|
||||
onCheckedChange={() => toggleUserSelection(member.id)}
|
||||
/>
|
||||
<Avatar className="w-5 h-5">
|
||||
<AvatarImage src={member.image || undefined} />
|
||||
<AvatarFallback className="text-[10px]">
|
||||
{member.name?.[0]?.toUpperCase() || 'U'}
|
||||
</AvatarFallback>
|
||||
</Avatar>
|
||||
<div className="truncate flex-1">
|
||||
<span className="font-medium text-foreground block truncate">
|
||||
{member.name}
|
||||
</span>
|
||||
{member.email && (
|
||||
<span className="text-[10px] text-muted-foreground block truncate">
|
||||
{member.email}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
</ScrollArea>
|
||||
</div>
|
||||
</PopoverContent>
|
||||
</Popover>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Resource Type */}
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="quota-resource" className="text-sm font-semibold">
|
||||
{m.quota_resource()}
|
||||
</Label>
|
||||
<Select
|
||||
value={resource}
|
||||
onValueChange={(val) => handleResourceChange(val as QuotaResourceTypeEnum)}
|
||||
disabled={isEditing || isPending}
|
||||
>
|
||||
<SelectTrigger id="quota-resource" className="w-full">
|
||||
<SelectValue />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem value="agent_total_tokens">
|
||||
<div className="flex items-center gap-2">
|
||||
<Cpu className="w-4 h-4 text-primary" />
|
||||
<span>{m.quota_resource_agent_total_tokens()}</span>
|
||||
</div>
|
||||
</SelectItem>
|
||||
<SelectItem value="agent_cost">
|
||||
<div className="flex items-center gap-2">
|
||||
<DollarSign className="w-4 h-4 text-emerald-500" />
|
||||
<span>{m.quota_resource_agent_cost()}</span>
|
||||
</div>
|
||||
</SelectItem>
|
||||
<SelectItem value="agent_skill_call_count">
|
||||
<div className="flex items-center gap-2">
|
||||
<Puzzle className="w-4 h-4 text-amber-500" />
|
||||
<span>{m.quota_resource_agent_skill_call_count()}</span>
|
||||
</div>
|
||||
</SelectItem>
|
||||
<SelectItem value="agent_mcp_call_count">
|
||||
<div className="flex items-center gap-2">
|
||||
<Server className="w-4 h-4 text-blue-500" />
|
||||
<span>{m.quota_resource_agent_mcp_call_count()}</span>
|
||||
</div>
|
||||
</SelectItem>
|
||||
<SelectItem value="agent_bash_call_count">
|
||||
<div className="flex items-center gap-2">
|
||||
<Terminal className="w-4 h-4 text-purple-500" />
|
||||
<span>{m.quota_resource_agent_bash_call_count()}</span>
|
||||
</div>
|
||||
</SelectItem>
|
||||
<SelectItem value="agent_tool_call_count">
|
||||
<div className="flex items-center gap-2">
|
||||
<Wrench className="w-4 h-4 text-cyan-500" />
|
||||
<span>{m.quota_resource_agent_tool_call_count()}</span>
|
||||
</div>
|
||||
</SelectItem>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
</div>
|
||||
|
||||
{/* Resource Specific Fields */}
|
||||
{resource === 'agent_skill_call_count' && (
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="quota-skill" className="text-sm font-semibold">
|
||||
{m.select_skill()}
|
||||
</Label>
|
||||
{skills.length > 0 ? (
|
||||
<Select
|
||||
value={skillId}
|
||||
onValueChange={setSkillId}
|
||||
disabled={isEditing || isPending}
|
||||
>
|
||||
<SelectTrigger id="quota-skill" className="w-full">
|
||||
<SelectValue placeholder={m.select_skill()} />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
{skills.map((s: { id: string; name: string }) => (
|
||||
<SelectItem key={s.id} value={s.id}>
|
||||
{s.name} ({s.id})
|
||||
</SelectItem>
|
||||
))}
|
||||
</SelectContent>
|
||||
</Select>
|
||||
) : (
|
||||
<Input
|
||||
id="quota-skill"
|
||||
value={skillId}
|
||||
onChange={(e) => setSkillId(e.target.value)}
|
||||
placeholder={m.enter_skill_id()}
|
||||
disabled={isEditing || isPending}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{resource === 'agent_mcp_call_count' && (
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="quota-mcp" className="text-sm font-semibold">
|
||||
{m.select_mcp_server()}
|
||||
</Label>
|
||||
{mcpServers.length > 0 ? (
|
||||
<Select
|
||||
value={mcpServerId}
|
||||
onValueChange={setMcpServerId}
|
||||
disabled={isEditing || isPending}
|
||||
>
|
||||
<SelectTrigger id="quota-mcp" className="w-full">
|
||||
<SelectValue placeholder={m.select_mcp_server()} />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
{mcpServers.map((s: { id: string; name: string }) => (
|
||||
<SelectItem key={s.id} value={s.id}>
|
||||
{s.name} ({s.id})
|
||||
</SelectItem>
|
||||
))}
|
||||
</SelectContent>
|
||||
</Select>
|
||||
) : (
|
||||
<Input
|
||||
id="quota-mcp"
|
||||
value={mcpServerId}
|
||||
onChange={(e) => setMcpServerId(e.target.value)}
|
||||
placeholder={m.enter_mcp_id()}
|
||||
disabled={isEditing || isPending}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{resource === 'agent_bash_call_count' && (
|
||||
<div className="space-y-1.5">
|
||||
<Label htmlFor="quota-bash" className="text-sm font-semibold">
|
||||
{m.bash_command_pattern()}
|
||||
</Label>
|
||||
<Input
|
||||
id="quota-bash"
|
||||
value={bashMatch}
|
||||
onChange={(e) => setBashMatch(e.target.value)}
|
||||
placeholder={m.bash_command_pattern_placeholder()}
|
||||
disabled={isPending}
|
||||
/>
|
||||
<p className="text-xs text-muted-foreground">{m.quota_bash_hint()}</p>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{resource === 'agent_tool_call_count' && (
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="quota-tool" className="text-sm font-semibold">
|
||||
{m.select_tool()}
|
||||
</Label>
|
||||
<Select
|
||||
value={toolName}
|
||||
onValueChange={setToolName}
|
||||
disabled={isEditing || isPending}
|
||||
>
|
||||
<SelectTrigger id="quota-tool" className="w-full">
|
||||
<SelectValue placeholder={m.select_tool()} />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
{STANDARD_TOOLS.map((t) => (
|
||||
<SelectItem key={t.value} value={t.value}>
|
||||
{t.label()}
|
||||
</SelectItem>
|
||||
))}
|
||||
</SelectContent>
|
||||
</Select>
|
||||
<p className="text-xs text-muted-foreground">{m.quota_tool_hint()}</p>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Limit and Period Row */}
|
||||
<div className="grid grid-cols-2 gap-4">
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="quota-limit" className="text-sm font-semibold">
|
||||
{m.quota_limit()} ({RESOURCE_CONFIG[resource]?.unit || ''})
|
||||
</Label>
|
||||
<Input
|
||||
id="quota-limit"
|
||||
type="number"
|
||||
min="0.01"
|
||||
step={resource === 'agent_cost' ? '0.01' : '1'}
|
||||
value={limit}
|
||||
onChange={(e) => setLimit(Number(e.target.value))}
|
||||
placeholder={m.quota_limit_placeholder()}
|
||||
disabled={isPending}
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="quota-period" className="text-sm font-semibold">
|
||||
{m.quota_period()}
|
||||
</Label>
|
||||
<Select
|
||||
value={period}
|
||||
onValueChange={(val) => setPeriod(val as QuotaPeriodEnum)}
|
||||
disabled={isPending}
|
||||
>
|
||||
<SelectTrigger id="quota-period" className="w-full">
|
||||
<SelectValue />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem value="1hour">
|
||||
<div className="flex items-center gap-2">
|
||||
<Clock className="w-3.5 h-3.5 text-muted-foreground" />
|
||||
<span>{m.quota_period_1hour()}</span>
|
||||
</div>
|
||||
</SelectItem>
|
||||
<SelectItem value="5hour">
|
||||
<div className="flex items-center gap-2">
|
||||
<Clock className="w-3.5 h-3.5 text-muted-foreground" />
|
||||
<span>{m.quota_period_5hour()}</span>
|
||||
</div>
|
||||
</SelectItem>
|
||||
<SelectItem value="1day">
|
||||
<div className="flex items-center gap-2">
|
||||
<Clock className="w-3.5 h-3.5 text-muted-foreground" />
|
||||
<span>{m.quota_period_1day()}</span>
|
||||
</div>
|
||||
</SelectItem>
|
||||
<SelectItem value="7day">
|
||||
<div className="flex items-center gap-2">
|
||||
<Clock className="w-3.5 h-3.5 text-muted-foreground" />
|
||||
<span>{m.quota_period_7day()}</span>
|
||||
</div>
|
||||
</SelectItem>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Enabled Switch */}
|
||||
<div className="flex items-center justify-between p-3 rounded-lg border bg-muted/20">
|
||||
<div className="space-y-0.5">
|
||||
<Label htmlFor="quota-enabled" className="text-sm font-medium cursor-pointer">
|
||||
{enabled ? m.quota_enabled() : m.quota_disabled()}
|
||||
</Label>
|
||||
<p className="text-xs text-muted-foreground">
|
||||
{enabled
|
||||
? 'Active and enforcing limits'
|
||||
: 'Inactive, requests will bypass this quota'}
|
||||
</p>
|
||||
</div>
|
||||
<Switch
|
||||
id="quota-enabled"
|
||||
checked={enabled}
|
||||
onCheckedChange={setEnabled}
|
||||
disabled={isPending}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<DialogFooter className="pt-4 flex items-center justify-between gap-2 sm:justify-between border-t border-border/60">
|
||||
{isEditing ? (
|
||||
<Button
|
||||
type="button"
|
||||
variant="destructive"
|
||||
size="sm"
|
||||
onClick={() => setIsDeleteDialogOpen(true)}
|
||||
disabled={isPending}
|
||||
className="gap-1.5"
|
||||
>
|
||||
<Trash2 className="w-4 h-4" />
|
||||
<span>{m.delete_quota()}</span>
|
||||
</Button>
|
||||
) : (
|
||||
<div />
|
||||
)}
|
||||
<div className="flex items-center gap-2">
|
||||
<Button
|
||||
type="button"
|
||||
variant="outline"
|
||||
onClick={() => onOpenChange(false)}
|
||||
disabled={isPending}
|
||||
>
|
||||
{m.cancel()}
|
||||
</Button>
|
||||
<Button type="submit" disabled={isPending} className="gap-2">
|
||||
{isPending && <Loader2 className="w-4 h-4 animate-spin" />}
|
||||
{isEditing ? m.save() : m.create()}
|
||||
</Button>
|
||||
</div>
|
||||
</DialogFooter>
|
||||
</form>
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
|
||||
{/* Delete Confirmation Alert Dialog */}
|
||||
<AlertDialog open={isDeleteDialogOpen} onOpenChange={setIsDeleteDialogOpen}>
|
||||
<AlertDialogContent>
|
||||
<AlertDialogHeader>
|
||||
<AlertDialogTitle>{m.delete_quota()}</AlertDialogTitle>
|
||||
<AlertDialogDescription>{m.delete_quota_confirm()}</AlertDialogDescription>
|
||||
</AlertDialogHeader>
|
||||
<AlertDialogFooter>
|
||||
<AlertDialogCancel disabled={isPending}>{m.cancel()}</AlertDialogCancel>
|
||||
<AlertDialogAction
|
||||
onClick={(e) => {
|
||||
e.preventDefault()
|
||||
deleteMutation.mutate()
|
||||
}}
|
||||
disabled={isPending}
|
||||
className="bg-destructive text-destructive-foreground hover:bg-destructive/90"
|
||||
>
|
||||
{isPending && <Loader2 className="w-4 h-4 animate-spin mr-2" />}
|
||||
{m.delete()}
|
||||
</AlertDialogAction>
|
||||
</AlertDialogFooter>
|
||||
</AlertDialogContent>
|
||||
</AlertDialog>
|
||||
</>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,280 @@
|
||||
import React, { useState } from 'react'
|
||||
import { useQuery } from '@tanstack/react-query'
|
||||
import { client } from '@/ui/api/client'
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
DialogDescription,
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
} from '@/ui/components/ui/dialog'
|
||||
import { Input } from '@/ui/components/ui/input'
|
||||
import { Badge } from '@/ui/components/ui/badge'
|
||||
import { Progress } from '@/ui/components/ui/progress'
|
||||
import { ScrollArea } from '@/ui/components/ui/scroll-area'
|
||||
import { Avatar, AvatarFallback, AvatarImage } from '@/ui/components/ui/avatar'
|
||||
import {
|
||||
Cpu,
|
||||
DollarSign,
|
||||
Puzzle,
|
||||
Server,
|
||||
Terminal,
|
||||
Wrench,
|
||||
Loader2,
|
||||
Users,
|
||||
Search,
|
||||
CheckCircle2,
|
||||
Clock,
|
||||
Activity,
|
||||
} from 'lucide-react'
|
||||
import { m } from '@/ui/paraglide/messages.js'
|
||||
import { formatRemainingTime } from '@/ui/lib/time'
|
||||
import type { QuotaRuleResponse, QuotaResourceTypeEnum, QuotaRecordResponse } from '@shumai/dtos'
|
||||
import { formatQuotaPeriod } from '@shumai/dtos'
|
||||
|
||||
interface QuotaUsageRecordsDialogProps {
|
||||
open: boolean
|
||||
onOpenChange: (open: boolean) => void
|
||||
teamId: string
|
||||
rule: QuotaRuleResponse
|
||||
}
|
||||
|
||||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
const RESOURCE_META: Record<
|
||||
QuotaResourceTypeEnum,
|
||||
{ label: () => string; icon: React.ElementType; unit: string }
|
||||
> = {
|
||||
agent_total_tokens: {
|
||||
label: () => m.quota_resource_agent_total_tokens(),
|
||||
icon: Cpu,
|
||||
unit: 'tokens',
|
||||
},
|
||||
agent_cost: {
|
||||
label: () => m.quota_resource_agent_cost(),
|
||||
icon: DollarSign,
|
||||
unit: '$',
|
||||
},
|
||||
agent_skill_call_count: {
|
||||
label: () => m.quota_resource_agent_skill_call_count(),
|
||||
icon: Puzzle,
|
||||
unit: 'calls',
|
||||
},
|
||||
agent_mcp_call_count: {
|
||||
label: () => m.quota_resource_agent_mcp_call_count(),
|
||||
icon: Server,
|
||||
unit: 'calls',
|
||||
},
|
||||
agent_bash_call_count: {
|
||||
label: () => m.quota_resource_agent_bash_call_count(),
|
||||
icon: Terminal,
|
||||
unit: 'calls',
|
||||
},
|
||||
agent_tool_call_count: {
|
||||
label: () => m.quota_resource_agent_tool_call_count(),
|
||||
icon: Wrench,
|
||||
unit: 'calls',
|
||||
},
|
||||
}
|
||||
/* eslint-enable @typescript-eslint/naming-convention */
|
||||
|
||||
function formatResourceValue(resource: QuotaResourceTypeEnum, val: number): string {
|
||||
if (resource === 'agent_cost') {
|
||||
return `$${val.toFixed(2)}`
|
||||
}
|
||||
return val.toLocaleString()
|
||||
}
|
||||
|
||||
function getPeriodLabel(period: string): string {
|
||||
const norm = formatQuotaPeriod(period)
|
||||
switch (norm) {
|
||||
case '1hour':
|
||||
return m.quota_period_1hour()
|
||||
case '5hour':
|
||||
return m.quota_period_5hour()
|
||||
case '1day':
|
||||
return m.quota_period_1day()
|
||||
case '7day':
|
||||
return m.quota_period_7day()
|
||||
default:
|
||||
return norm
|
||||
}
|
||||
}
|
||||
|
||||
export const QuotaUsageRecordsDialog: React.FC<QuotaUsageRecordsDialogProps> = ({
|
||||
open,
|
||||
onOpenChange,
|
||||
teamId,
|
||||
rule,
|
||||
}) => {
|
||||
const [search, setSearch] = useState('')
|
||||
|
||||
const { data, isLoading } = useQuery({
|
||||
queryKey: ['teams', teamId, 'quotas', rule.id, 'records'],
|
||||
queryFn: async () => {
|
||||
const res = await client.api.teams[':teamId'].quotas[':id'].records.$get({
|
||||
param: { teamId, id: rule.id },
|
||||
})
|
||||
if (!res.ok) return { records: [], total: 0 }
|
||||
return await res.json()
|
||||
},
|
||||
enabled: open,
|
||||
refetchInterval: 10000,
|
||||
})
|
||||
|
||||
const records: QuotaRecordResponse[] = data?.records || []
|
||||
const meta = RESOURCE_META[rule.resource]
|
||||
const Icon = meta?.icon || Activity
|
||||
|
||||
const filteredRecords = records.filter((r) => {
|
||||
if (!search.trim()) return true
|
||||
const q = search.toLowerCase()
|
||||
if (r.user?.name.toLowerCase().includes(q)) return true
|
||||
if (r.user?.email.toLowerCase().includes(q)) return true
|
||||
return false
|
||||
})
|
||||
|
||||
return (
|
||||
<Dialog open={open} onOpenChange={onOpenChange}>
|
||||
<DialogContent className="sm:max-w-[620px] p-0 gap-0 overflow-hidden">
|
||||
<DialogHeader className="p-6 pb-4 border-b border-border/60">
|
||||
<div className="flex items-center gap-3">
|
||||
<div className="p-2 rounded-lg bg-primary/10 text-primary shrink-0">
|
||||
<Icon className="w-5 h-5" />
|
||||
</div>
|
||||
<div>
|
||||
<DialogTitle className="text-lg font-bold flex items-center gap-2">
|
||||
<span>{m.quota_usage_records()}</span>
|
||||
<Badge variant="outline" className="text-xs font-normal">
|
||||
{meta?.label ? meta.label() : rule.resource} -{' '}
|
||||
{formatResourceValue(rule.resource, rule.limit)} {meta?.unit} /{' '}
|
||||
{getPeriodLabel(rule.period)}
|
||||
</Badge>
|
||||
</DialogTitle>
|
||||
<DialogDescription className="text-xs text-muted-foreground mt-0.5">
|
||||
{m.quota_usage_records_description()}
|
||||
</DialogDescription>
|
||||
</div>
|
||||
</div>
|
||||
</DialogHeader>
|
||||
|
||||
{rule.scopeMode !== 'all_members' && records.length > 3 && (
|
||||
<div className="px-6 pt-4 pb-2">
|
||||
<div className="relative">
|
||||
<Search className="w-4 h-4 absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground" />
|
||||
<Input
|
||||
value={search}
|
||||
onChange={(e) => setSearch(e.target.value)}
|
||||
placeholder={m.quota_search_members()}
|
||||
className="pl-9 h-9 text-sm"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<ScrollArea className="max-h-[60vh] p-6 pt-3">
|
||||
{isLoading ? (
|
||||
<div className="flex justify-center py-12">
|
||||
<Loader2 className="w-8 h-8 animate-spin text-primary" />
|
||||
</div>
|
||||
) : filteredRecords.length === 0 ? (
|
||||
<div className="text-center py-10 text-sm text-muted-foreground">
|
||||
{records.length === 0 ? m.no_quotas_title() : 'No matching records found'}
|
||||
</div>
|
||||
) : (
|
||||
<div className="space-y-3">
|
||||
{filteredRecords.map((record, index) => {
|
||||
const percent = record.percent
|
||||
const isOverLimit = percent >= 100
|
||||
const isSharedPool = rule.scopeMode === 'all_members'
|
||||
|
||||
return (
|
||||
<div
|
||||
key={record.id || record.userId || `record-${index}`}
|
||||
className="p-4 rounded-xl border border-border/70 bg-card text-card-foreground shadow-2xs space-y-3"
|
||||
>
|
||||
{/* Top Row: User / Pool Info & Status Badge */}
|
||||
<div className="flex items-center justify-between gap-2">
|
||||
<div className="flex items-center gap-3 min-w-0">
|
||||
{isSharedPool ? (
|
||||
<div className="w-9 h-9 rounded-full bg-primary/10 text-primary flex items-center justify-center shrink-0">
|
||||
<Users className="w-5 h-5" />
|
||||
</div>
|
||||
) : (
|
||||
<Avatar className="w-9 h-9 border border-border/50 shrink-0">
|
||||
<AvatarImage src={record.user?.image || undefined} />
|
||||
<AvatarFallback className="text-xs font-semibold">
|
||||
{record.user?.name?.[0]?.toUpperCase() || 'U'}
|
||||
</AvatarFallback>
|
||||
</Avatar>
|
||||
)}
|
||||
<div className="min-w-0">
|
||||
<div className="font-semibold text-sm text-foreground truncate">
|
||||
{isSharedPool
|
||||
? rule.role
|
||||
? `${m.quota_role_shared_pool()}: ${rule.role}`
|
||||
: m.quota_team_shared_pool()
|
||||
: record.user?.name || record.userId}
|
||||
</div>
|
||||
{!isSharedPool && record.user?.email && (
|
||||
<div className="text-xs text-muted-foreground truncate">
|
||||
{record.user.email}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Status Badge */}
|
||||
<div className="shrink-0">
|
||||
{record.isWindowActive && record.periodEnd ? (
|
||||
<Badge
|
||||
variant="outline"
|
||||
className="gap-1 text-xs text-primary border-primary/30 bg-primary/5"
|
||||
>
|
||||
<Clock className="w-3 h-3" />
|
||||
<span>
|
||||
{m.quota_refreshes_in({
|
||||
time: formatRemainingTime(record.periodEnd),
|
||||
})}
|
||||
</span>
|
||||
</Badge>
|
||||
) : (
|
||||
<Badge
|
||||
variant="secondary"
|
||||
className="gap-1 text-xs text-muted-foreground bg-muted"
|
||||
>
|
||||
<CheckCircle2 className="w-3 h-3 text-emerald-500" />
|
||||
<span>{m.quota_available()}</span>
|
||||
</Badge>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Progress Bar & Details */}
|
||||
<div className="space-y-1.5 pt-1">
|
||||
<Progress value={Math.min(100, Math.max(0, percent))} className="h-2" />
|
||||
<div className="flex items-center justify-between text-xs font-medium">
|
||||
<span
|
||||
className={isOverLimit ? 'text-destructive font-bold' : 'text-foreground'}
|
||||
>
|
||||
{formatResourceValue(rule.resource, record.consumed)} /{' '}
|
||||
{formatResourceValue(rule.resource, rule.limit)} {meta?.unit}
|
||||
</span>
|
||||
<span
|
||||
className={
|
||||
isOverLimit ? 'text-destructive font-bold' : 'text-muted-foreground'
|
||||
}
|
||||
>
|
||||
{percent}%
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
)}
|
||||
</ScrollArea>
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,409 @@
|
||||
import React, { 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 { Badge } from '@/ui/components/ui/badge'
|
||||
import { Switch } from '@/ui/components/ui/switch'
|
||||
import { ScrollArea } from '@/ui/components/ui/scroll-area'
|
||||
import {
|
||||
DropdownMenu,
|
||||
DropdownMenuContent,
|
||||
DropdownMenuItem,
|
||||
DropdownMenuTrigger,
|
||||
} from '@/ui/components/ui/dropdown-menu'
|
||||
import {
|
||||
AlertDialog,
|
||||
AlertDialogAction,
|
||||
AlertDialogCancel,
|
||||
AlertDialogContent,
|
||||
AlertDialogDescription,
|
||||
AlertDialogFooter,
|
||||
AlertDialogHeader,
|
||||
AlertDialogTitle,
|
||||
} from '@/ui/components/ui/alert-dialog'
|
||||
import {
|
||||
Gauge,
|
||||
Plus,
|
||||
Loader2,
|
||||
MoreVertical,
|
||||
Trash2,
|
||||
Cpu,
|
||||
DollarSign,
|
||||
Puzzle,
|
||||
Server,
|
||||
Terminal,
|
||||
Wrench,
|
||||
Users,
|
||||
UserCheck,
|
||||
User,
|
||||
Clock,
|
||||
Eye,
|
||||
} from 'lucide-react'
|
||||
import { toast } from 'sonner'
|
||||
import { m } from '@/ui/paraglide/messages.js'
|
||||
import type { QuotaRuleResponse, QuotaResourceTypeEnum } from '@shumai/dtos'
|
||||
import { formatQuotaPeriod } from '@shumai/dtos'
|
||||
import { QuotaRuleDialog } from './QuotaRuleDialog'
|
||||
import { QuotaUsageRecordsDialog } from './QuotaUsageRecordsDialog'
|
||||
|
||||
interface QuotasSettingsProps {
|
||||
teamId: string
|
||||
}
|
||||
|
||||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
const RESOURCE_META: Record<
|
||||
QuotaResourceTypeEnum,
|
||||
{ label: () => string; icon: React.ElementType; unit: string }
|
||||
> = {
|
||||
agent_total_tokens: {
|
||||
label: () => m.quota_resource_agent_total_tokens(),
|
||||
icon: Cpu,
|
||||
unit: 'tokens',
|
||||
},
|
||||
agent_cost: {
|
||||
label: () => m.quota_resource_agent_cost(),
|
||||
icon: DollarSign,
|
||||
unit: '$',
|
||||
},
|
||||
agent_skill_call_count: {
|
||||
label: () => m.quota_resource_agent_skill_call_count(),
|
||||
icon: Puzzle,
|
||||
unit: 'calls',
|
||||
},
|
||||
agent_mcp_call_count: {
|
||||
label: () => m.quota_resource_agent_mcp_call_count(),
|
||||
icon: Server,
|
||||
unit: 'calls',
|
||||
},
|
||||
agent_bash_call_count: {
|
||||
label: () => m.quota_resource_agent_bash_call_count(),
|
||||
icon: Terminal,
|
||||
unit: 'calls',
|
||||
},
|
||||
agent_tool_call_count: {
|
||||
label: () => m.quota_resource_agent_tool_call_count(),
|
||||
icon: Wrench,
|
||||
unit: 'calls',
|
||||
},
|
||||
}
|
||||
/* eslint-enable @typescript-eslint/naming-convention */
|
||||
|
||||
function getPeriodLabel(period: string): string {
|
||||
const norm = formatQuotaPeriod(period)
|
||||
switch (norm) {
|
||||
case '1hour':
|
||||
return m.quota_period_1hour()
|
||||
case '5hour':
|
||||
return m.quota_period_5hour()
|
||||
case '1day':
|
||||
return m.quota_period_1day()
|
||||
case '7day':
|
||||
return m.quota_period_7day()
|
||||
default:
|
||||
return norm
|
||||
}
|
||||
}
|
||||
|
||||
function formatResourceValue(resource: QuotaResourceTypeEnum, val: number): string {
|
||||
if (resource === 'agent_cost') {
|
||||
return `$${val.toFixed(2)}`
|
||||
}
|
||||
return val.toLocaleString()
|
||||
}
|
||||
|
||||
export const QuotasSettings: React.FC<QuotasSettingsProps> = ({ teamId }) => {
|
||||
const queryClient = useQueryClient()
|
||||
const [isCreateOpen, setIsCreateOpen] = useState(false)
|
||||
const [selectedRule, setSelectedRule] = useState<QuotaRuleResponse | null>(null)
|
||||
const [viewingUsageRule, setViewingUsageRule] = useState<QuotaRuleResponse | null>(null)
|
||||
const [deletingRule, setDeletingRule] = useState<QuotaRuleResponse | null>(null)
|
||||
|
||||
// Fetch quota rules
|
||||
const { data, isLoading } = useQuery({
|
||||
queryKey: ['teams', teamId, 'quotas'],
|
||||
queryFn: async () => {
|
||||
const res = await client.api.teams[':teamId'].quotas.$get({ param: { teamId } })
|
||||
if (!res.ok) throw new Error(m.failed_load_settings())
|
||||
return await res.json()
|
||||
},
|
||||
})
|
||||
|
||||
// Quick toggle enabled mutation
|
||||
const toggleMutation = useMutation({
|
||||
mutationFn: async ({ id, enabled }: { id: string; enabled: boolean }) => {
|
||||
const res = await client.api.teams[':teamId'].quotas[':id'].$put({
|
||||
param: { teamId, id },
|
||||
json: { enabled },
|
||||
})
|
||||
if (!res.ok) throw new Error(m.failed_to_update_quota())
|
||||
return await res.json()
|
||||
},
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['teams', teamId, 'quotas'] })
|
||||
toast.success(m.quota_status_updated())
|
||||
},
|
||||
onError: (err) => {
|
||||
toast.error(err instanceof Error ? err.message : m.failed_to_update_quota())
|
||||
},
|
||||
})
|
||||
|
||||
// Delete rule mutation
|
||||
const deleteMutation = useMutation({
|
||||
mutationFn: async (id: string) => {
|
||||
const res = await client.api.teams[':teamId'].quotas[':id'].$delete({
|
||||
param: { teamId, id },
|
||||
})
|
||||
if (!res.ok) throw new Error(m.failed_to_delete_quota())
|
||||
},
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['teams', teamId, 'quotas'] })
|
||||
toast.success(m.quota_deleted_successfully())
|
||||
setDeletingRule(null)
|
||||
},
|
||||
onError: (err) => {
|
||||
toast.error(err instanceof Error ? err.message : m.failed_to_delete_quota())
|
||||
},
|
||||
})
|
||||
|
||||
const rules: QuotaRuleResponse[] = data?.rules || []
|
||||
|
||||
return (
|
||||
<ScrollArea className="h-full">
|
||||
<div className="space-y-6 pr-4 pb-10">
|
||||
<Card>
|
||||
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-6">
|
||||
<div className="flex items-center gap-3">
|
||||
<div className="p-2 bg-primary/10 text-primary rounded-lg">
|
||||
<Gauge className="w-6 h-6" />
|
||||
</div>
|
||||
<div>
|
||||
<CardTitle className="text-xl font-bold">{m.resource_quotas()}</CardTitle>
|
||||
<CardDescription>{m.resource_quotas_description()}</CardDescription>
|
||||
</div>
|
||||
</div>
|
||||
<Button onClick={() => setIsCreateOpen(true)} className="gap-2">
|
||||
<Plus className="w-4 h-4" /> {m.add_quota()}
|
||||
</Button>
|
||||
</CardHeader>
|
||||
|
||||
<CardContent>
|
||||
{isLoading ? (
|
||||
<div className="flex justify-center py-12">
|
||||
<Loader2 className="w-8 h-8 animate-spin text-primary" />
|
||||
</div>
|
||||
) : rules.length === 0 ? (
|
||||
<div className="text-center py-12 border-2 border-dashed border-border rounded-xl">
|
||||
<div className="mx-auto w-12 h-12 bg-muted rounded-full flex items-center justify-center mb-4 text-muted-foreground">
|
||||
<Gauge className="w-6 h-6" />
|
||||
</div>
|
||||
<h3 className="text-base font-semibold text-foreground mb-1">
|
||||
{m.no_quotas_title()}
|
||||
</h3>
|
||||
<p className="text-sm text-muted-foreground max-w-md mx-auto mb-6">
|
||||
{m.no_quotas_description()}
|
||||
</p>
|
||||
<Button onClick={() => setIsCreateOpen(true)} className="gap-2">
|
||||
<Plus className="w-4 h-4" /> {m.add_quota()}
|
||||
</Button>
|
||||
</div>
|
||||
) : (
|
||||
<div className="flex flex-col gap-4">
|
||||
{rules.map((rule) => {
|
||||
const meta = RESOURCE_META[rule.resource]
|
||||
const resData = (rule.resourceData as Record<string, unknown> | null) || {}
|
||||
|
||||
return (
|
||||
<div
|
||||
key={rule.id}
|
||||
onClick={() => setSelectedRule(rule)}
|
||||
className={`group relative flex flex-col justify-between p-5 rounded-xl border bg-card text-card-foreground shadow-2xs transition-all hover:border-primary/40 hover:shadow-xs cursor-pointer ${
|
||||
!rule.enabled ? 'opacity-60 bg-muted/20' : ''
|
||||
}`}
|
||||
>
|
||||
{/* Top Row: Resource, Details, Switch, Actions */}
|
||||
<div className="space-y-3">
|
||||
<div className="flex items-start justify-between gap-2">
|
||||
<div>
|
||||
<div className="font-semibold text-base text-foreground group-hover:text-primary transition-colors flex items-center gap-2">
|
||||
<span>{meta?.label ? meta.label() : rule.resource}</span>
|
||||
</div>
|
||||
{/* Subtitle / target details */}
|
||||
<div className="text-xs text-muted-foreground line-clamp-1">
|
||||
{rule.resource === 'agent_skill_call_count' && (
|
||||
<span>Skill: {String(resData.id || '')}</span>
|
||||
)}
|
||||
{rule.resource === 'agent_mcp_call_count' && (
|
||||
<span>Server: {String(resData.id || '')}</span>
|
||||
)}
|
||||
{rule.resource === 'agent_bash_call_count' && (
|
||||
<span>Match: {String(resData.match || '*')}</span>
|
||||
)}
|
||||
{rule.resource === 'agent_tool_call_count' && (
|
||||
<span>Tool: {String(resData.name || resData.toolName || '*')}</span>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Quick Switch & Card Menu */}
|
||||
<div
|
||||
className="flex items-center gap-2"
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
>
|
||||
<Switch
|
||||
checked={rule.enabled}
|
||||
onCheckedChange={(checked) =>
|
||||
toggleMutation.mutate({ id: rule.id, enabled: checked })
|
||||
}
|
||||
disabled={toggleMutation.isPending}
|
||||
/>
|
||||
<DropdownMenu modal={false}>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
aria-label="Quota actions"
|
||||
className="h-8 w-8 text-muted-foreground hover:text-foreground"
|
||||
>
|
||||
<MoreVertical className="w-4 h-4" />
|
||||
</Button>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent align="end">
|
||||
<DropdownMenuItem
|
||||
onClick={() => setDeletingRule(rule)}
|
||||
className="text-destructive focus:text-destructive"
|
||||
>
|
||||
<Trash2 className="w-4 h-4 mr-2" />
|
||||
{m.delete()}
|
||||
</DropdownMenuItem>
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Badges Row & View Usage Action */}
|
||||
<div className="flex flex-wrap items-center justify-between gap-2 pt-2 border-t border-border/50">
|
||||
<div className="flex flex-wrap items-center gap-1.5">
|
||||
{/* Scope Mode & Role badge */}
|
||||
{rule.scopeMode === 'all_members' && (
|
||||
<Badge variant="secondary" className="gap-1 text-xs">
|
||||
<Users className="w-3 h-3" />
|
||||
<span>
|
||||
{m.quota_scope_mode_all_members()}
|
||||
{rule.role ? ` (${rule.role})` : ` (${m.quota_scope_team()})`}
|
||||
</span>
|
||||
</Badge>
|
||||
)}
|
||||
{rule.scopeMode === 'each_member' && (
|
||||
<Badge variant="secondary" className="gap-1 text-xs">
|
||||
<User className="w-3 h-3" />
|
||||
<span>
|
||||
{m.quota_scope_mode_each_member()}
|
||||
{rule.role ? ` (${rule.role})` : ` (${m.quota_scope_team()})`}
|
||||
</span>
|
||||
</Badge>
|
||||
)}
|
||||
{rule.scopeMode === 'selected_members' && (
|
||||
<Badge variant="secondary" className="gap-1 text-xs">
|
||||
<UserCheck className="w-3 h-3" />
|
||||
<span>
|
||||
{m.quota_scope_mode_selected_members()} (
|
||||
{rule.userIds?.length || 0})
|
||||
</span>
|
||||
</Badge>
|
||||
)}
|
||||
|
||||
{/* Limit & Period badge */}
|
||||
<Badge variant="outline" className="gap-1 text-xs">
|
||||
<Clock className="w-3 h-3" />
|
||||
<span>
|
||||
{formatResourceValue(rule.resource, rule.limit)} {meta?.unit} /{' '}
|
||||
{getPeriodLabel(rule.period)}
|
||||
</span>
|
||||
</Badge>
|
||||
</div>
|
||||
|
||||
{/* View Usage Button */}
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation()
|
||||
setViewingUsageRule(rule)
|
||||
}}
|
||||
className="gap-1.5 text-xs h-7 px-2.5"
|
||||
>
|
||||
<Eye className="w-3.5 h-3.5 text-primary" />
|
||||
<span>{m.quota_view_usage()}</span>
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
)}
|
||||
</CardContent>
|
||||
</Card>
|
||||
</div>
|
||||
|
||||
{/* Create / Edit Rule Dialog */}
|
||||
{(isCreateOpen || !!selectedRule) && (
|
||||
<QuotaRuleDialog
|
||||
open={isCreateOpen || !!selectedRule}
|
||||
onOpenChange={(open) => {
|
||||
if (!open) {
|
||||
setIsCreateOpen(false)
|
||||
setSelectedRule(null)
|
||||
}
|
||||
}}
|
||||
teamId={teamId}
|
||||
rule={selectedRule}
|
||||
/>
|
||||
)}
|
||||
|
||||
{/* View Usage Records Dialog */}
|
||||
{!!viewingUsageRule && (
|
||||
<QuotaUsageRecordsDialog
|
||||
open={!!viewingUsageRule}
|
||||
onOpenChange={(open) => {
|
||||
if (!open) setViewingUsageRule(null)
|
||||
}}
|
||||
teamId={teamId}
|
||||
rule={viewingUsageRule}
|
||||
/>
|
||||
)}
|
||||
|
||||
{/* Delete Confirmation Alert Dialog */}
|
||||
<AlertDialog
|
||||
open={!!deletingRule}
|
||||
onOpenChange={(open) => {
|
||||
if (!open) setDeletingRule(null)
|
||||
}}
|
||||
>
|
||||
<AlertDialogContent>
|
||||
<AlertDialogHeader>
|
||||
<AlertDialogTitle>{m.delete_quota()}</AlertDialogTitle>
|
||||
<AlertDialogDescription>{m.delete_quota_confirm()}</AlertDialogDescription>
|
||||
</AlertDialogHeader>
|
||||
<AlertDialogFooter>
|
||||
<AlertDialogCancel disabled={deleteMutation.isPending}>{m.cancel()}</AlertDialogCancel>
|
||||
<AlertDialogAction
|
||||
onClick={(e) => {
|
||||
e.preventDefault()
|
||||
if (deletingRule) {
|
||||
deleteMutation.mutate(deletingRule.id)
|
||||
}
|
||||
}}
|
||||
disabled={deleteMutation.isPending}
|
||||
className="bg-destructive text-destructive-foreground hover:bg-destructive/90"
|
||||
>
|
||||
{deleteMutation.isPending && <Loader2 className="w-4 h-4 animate-spin mr-2" />}
|
||||
{m.delete()}
|
||||
</AlertDialogAction>
|
||||
</AlertDialogFooter>
|
||||
</AlertDialogContent>
|
||||
</AlertDialog>
|
||||
</ScrollArea>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
import { describe, it, expect } from 'vitest'
|
||||
import { formatRemainingTime } from './time'
|
||||
|
||||
describe('formatRemainingTime', () => {
|
||||
const baseNow = new Date('2026-08-17T12:00:00Z')
|
||||
|
||||
it('formats hours and minutes', () => {
|
||||
const target = new Date('2026-08-17T15:18:00Z')
|
||||
expect(formatRemainingTime(target, baseNow)).toBe('3h 18m')
|
||||
})
|
||||
|
||||
it('formats exact hours', () => {
|
||||
const target = new Date('2026-08-17T15:00:00Z')
|
||||
expect(formatRemainingTime(target, baseNow)).toBe('3h')
|
||||
})
|
||||
|
||||
it('formats minutes only', () => {
|
||||
const target = new Date('2026-08-17T12:45:00Z')
|
||||
expect(formatRemainingTime(target, baseNow)).toBe('45m')
|
||||
})
|
||||
|
||||
it('formats days and hours', () => {
|
||||
const target = new Date('2026-08-19T16:00:00Z')
|
||||
expect(formatRemainingTime(target, baseNow)).toBe('2d 4h')
|
||||
})
|
||||
|
||||
it('formats days only', () => {
|
||||
const target = new Date('2026-08-19T12:00:00Z')
|
||||
expect(formatRemainingTime(target, baseNow)).toBe('2d')
|
||||
})
|
||||
|
||||
it('handles less than 1 minute', () => {
|
||||
const target = new Date('2026-08-17T12:00:30Z')
|
||||
expect(formatRemainingTime(target, baseNow)).toBe('< 1m')
|
||||
})
|
||||
|
||||
it('handles past or equal dates', () => {
|
||||
const past = new Date('2026-08-17T11:00:00Z')
|
||||
expect(formatRemainingTime(past, baseNow)).toBe('< 1m')
|
||||
expect(formatRemainingTime(baseNow, baseNow)).toBe('< 1m')
|
||||
})
|
||||
|
||||
it('accepts ISO strings', () => {
|
||||
expect(formatRemainingTime('2026-08-17T15:18:00Z', baseNow)).toBe('3h 18m')
|
||||
})
|
||||
})
|
||||
@@ -42,3 +42,32 @@ export const formatDateAgo = (dateString: string) => {
|
||||
const count = daysAgo >= 0 ? daysAgo : 0
|
||||
return count === 1 ? m.n_days_ago_singular({ count }) : m.n_days_ago_plural({ count })
|
||||
}
|
||||
|
||||
export const formatRemainingTime = (targetDate: string | Date, now: Date = new Date()): string => {
|
||||
const targetMs =
|
||||
typeof targetDate === 'string'
|
||||
? parseISO(targetDate).getTime()
|
||||
: targetDate instanceof Date
|
||||
? targetDate.getTime()
|
||||
: NaN
|
||||
if (isNaN(targetMs)) {
|
||||
return '< 1m'
|
||||
}
|
||||
const diffMs = targetMs - now.getTime()
|
||||
if (diffMs <= 0) {
|
||||
return '< 1m'
|
||||
}
|
||||
|
||||
const totalSeconds = Math.floor(diffMs / 1000)
|
||||
const days = Math.floor(totalSeconds / 86400)
|
||||
const hours = Math.floor((totalSeconds % 86400) / 3600)
|
||||
const minutes = Math.floor((totalSeconds % 3600) / 60)
|
||||
|
||||
if (days > 0) {
|
||||
return hours > 0 ? `${days}d ${hours}h` : `${days}d`
|
||||
}
|
||||
if (hours > 0) {
|
||||
return minutes > 0 ? `${hours}h ${minutes}m` : `${hours}h`
|
||||
}
|
||||
return minutes > 0 ? `${minutes}m` : '< 1m'
|
||||
}
|
||||
|
||||
@@ -1049,5 +1049,83 @@
|
||||
"agents_md_placeholder": "Give AI agents instructions and context for this project or folder.\n\nShumai automatically loads this file, along with AGENTS.md files from parent folders up to the project level, whenever an agent works here.\n\nUse it to define things like:\n- What this project or folder contains\n- Rules the agent should follow\n- Terminology, style, or workflow\n- How metadata and autofill should be generated",
|
||||
"agents_md_readonly_hint": "Only team owners can edit this file.",
|
||||
"agents_md_save_failed": "Failed to save",
|
||||
"agents_md_loading": "Loading AGENTS.md..."
|
||||
"agents_md_loading": "Loading AGENTS.md...",
|
||||
"quotas": "Quotas",
|
||||
"resource_quotas": "Resource Quotas",
|
||||
"resource_quotas_description": "Manage and limit resource usage across team members, roles, and AI operations.",
|
||||
"add_quota": "Add Quota",
|
||||
"create_quota_rule": "Create Quota Rule",
|
||||
"edit_quota_rule": "Edit Quota Rule",
|
||||
"edit_quota_rule_description": "Configure resource limits, target scopes, and evaluation periods.",
|
||||
"create_quota_rule_description": "Set up a new resource quota to prevent unexpected usage.",
|
||||
"quota_scope": "Scope",
|
||||
"quota_scope_team": "Entire Team",
|
||||
"quota_scope_role": "Role-based",
|
||||
"quota_scope_user": "Specific User",
|
||||
"quota_scope_team_description": "Applies collectively to the entire team",
|
||||
"quota_scope_role_description": "Applies to members with the specified role",
|
||||
"quota_scope_user_description": "Applies exclusively to the selected user",
|
||||
"quota_resource": "Resource",
|
||||
"quota_resource_agent_total_tokens": "AI Tokens",
|
||||
"quota_resource_agent_cost": "AI Cost ($)",
|
||||
"quota_resource_agent_skill_call_count": "Skill Calls",
|
||||
"quota_resource_agent_mcp_call_count": "MCP Server Calls",
|
||||
"quota_resource_agent_bash_call_count": "Agent Bash Calls",
|
||||
"quota_resource_agent_tool_call_count": "Agent Tool Calls",
|
||||
"quota_period": "Period Window",
|
||||
"quota_period_1hour": "1 Hour",
|
||||
"quota_period_5hour": "5 Hours",
|
||||
"quota_period_1day": "1 Day",
|
||||
"quota_period_7day": "7 Days",
|
||||
"quota_limit": "Limit",
|
||||
"quota_limit_placeholder": "e.g. 100000",
|
||||
"quota_enabled": "Enabled",
|
||||
"quota_disabled": "Disabled",
|
||||
"quota_current_usage": "Current Usage",
|
||||
"quota_consumed": "Consumed",
|
||||
"quota_remaining": "Remaining",
|
||||
"quota_period_resets": "Resets in",
|
||||
"quota_active_window": "Active Window",
|
||||
"no_quotas_title": "No resource quotas configured",
|
||||
"no_quotas_description": "Set limits on AI tokens, costs, skill executions, and agent tool calls to manage team usage.",
|
||||
"delete_quota": "Delete Quota",
|
||||
"delete_quota_confirm": "Are you sure you want to delete this quota rule? This action cannot be undone.",
|
||||
"quota_created_successfully": "Quota rule created successfully",
|
||||
"quota_updated_successfully": "Quota rule updated successfully",
|
||||
"quota_deleted_successfully": "Quota rule deleted successfully",
|
||||
"failed_to_create_quota": "Failed to create quota rule",
|
||||
"failed_to_update_quota": "Failed to update quota rule",
|
||||
"failed_to_delete_quota": "Failed to delete quota rule",
|
||||
"quota_status_updated": "Quota status updated",
|
||||
"quota_scope_mode": "Target Mode",
|
||||
"quota_scope_mode_each_member": "Each Member",
|
||||
"quota_scope_mode_each_member_desc": "Individual limit for each matching member",
|
||||
"quota_scope_mode_all_members": "All Members",
|
||||
"quota_scope_mode_all_members_desc": "Shared pooled limit across all matching members",
|
||||
"quota_scope_mode_selected_members": "Selected Members",
|
||||
"quota_scope_mode_selected_members_desc": "Individual limit for selected users",
|
||||
"quota_view_usage": "View Usage",
|
||||
"quota_usage_records": "Usage Records",
|
||||
"quota_usage_records_description": "Real-time usage breakdown for this quota rule.",
|
||||
"quota_team_shared_pool": "Team Shared Pool",
|
||||
"quota_role_shared_pool": "Role Shared Pool",
|
||||
"quota_available": "Quota available",
|
||||
"quota_active": "Active",
|
||||
"quota_refreshes_in": "Refreshes in {time}",
|
||||
"quota_search_members": "Search members...",
|
||||
"quota_selected_users_count": "{count} members selected",
|
||||
"select_members": "Select Members",
|
||||
"select_role": "Select Role",
|
||||
"select_user": "Select User",
|
||||
"select_skill": "Select Skill",
|
||||
"select_mcp_server": "Select MCP Server",
|
||||
"select_tool": "Select Tool",
|
||||
"custom_id": "Custom ID",
|
||||
"enter_custom_id": "Enter custom ID",
|
||||
"bash_command_pattern": "Bash Match Wildcard",
|
||||
"bash_command_pattern_placeholder": "e.g. * or npm*",
|
||||
"enter_skill_id": "Enter Skill ID",
|
||||
"enter_mcp_id": "Enter MCP Server ID",
|
||||
"quota_bash_hint": "Supports wildcards (*). Examples: git *, npm test, curl *, python script.py (use * for all commands)",
|
||||
"quota_tool_hint": "Select a specific agent tool to configure its quota limit"
|
||||
}
|
||||
|
||||
@@ -1049,5 +1049,83 @@
|
||||
"agents_md_placeholder": "为在此项目或文件夹中工作的 AI Agent 提供指引和上下文。\n\n当 Agent 在此处工作时,Shumai 会自动加载此文件以及向上追溯至项目根目录各级父文件夹中的 AGENTS.md 文件。\n\n您可以用它来定义:\n- 此项目或文件夹包含的内容\n- Agent 应当遵守的规则\n- 术语、风格或工作流规范\n- 元数据和自动填充的生成方式",
|
||||
"agents_md_readonly_hint": "只有团队所有者可以修改此文件。",
|
||||
"agents_md_save_failed": "保存失败",
|
||||
"agents_md_loading": "正在加载 AGENTS.md..."
|
||||
"agents_md_loading": "正在加载 AGENTS.md...",
|
||||
"quotas": "配额",
|
||||
"resource_quotas": "资源配额",
|
||||
"resource_quotas_description": "管理并限制团队成员、角色以及 AI 操作的资源使用。",
|
||||
"add_quota": "添加配额",
|
||||
"create_quota_rule": "创建配额规则",
|
||||
"edit_quota_rule": "编辑配额规则",
|
||||
"edit_quota_rule_description": "配置资源上限、目标范围以及评估周期。",
|
||||
"create_quota_rule_description": "设置新的资源配额以防止意外的超量使用。",
|
||||
"quota_scope": "范围",
|
||||
"quota_scope_team": "整个团队",
|
||||
"quota_scope_role": "按角色",
|
||||
"quota_scope_user": "指定用户",
|
||||
"quota_scope_team_description": "对整个团队累计生效",
|
||||
"quota_scope_role_description": "对具有指定角色的成员生效",
|
||||
"quota_scope_user_description": "仅对选定的用户生效",
|
||||
"quota_resource": "资源类型",
|
||||
"quota_resource_agent_total_tokens": "AI Token 总量",
|
||||
"quota_resource_agent_cost": "AI 费用 ($)",
|
||||
"quota_resource_agent_skill_call_count": "Skill 调用次数",
|
||||
"quota_resource_agent_mcp_call_count": "MCP 服务调用次数",
|
||||
"quota_resource_agent_bash_call_count": "智能体 Bash 执行次数",
|
||||
"quota_resource_agent_tool_call_count": "智能体工具调用次数",
|
||||
"quota_period": "周期窗口",
|
||||
"quota_period_1hour": "1 小时",
|
||||
"quota_period_5hour": "5 小时",
|
||||
"quota_period_1day": "1 天",
|
||||
"quota_period_7day": "7 天",
|
||||
"quota_limit": "上限",
|
||||
"quota_limit_placeholder": "例如 100000",
|
||||
"quota_enabled": "已启用",
|
||||
"quota_disabled": "已禁用",
|
||||
"quota_current_usage": "当前使用量",
|
||||
"quota_consumed": "已消耗",
|
||||
"quota_remaining": "剩余额度",
|
||||
"quota_period_resets": "重置于",
|
||||
"quota_active_window": "生效周期",
|
||||
"no_quotas_title": "暂未配置资源配额",
|
||||
"no_quotas_description": "为 AI Token、费用、Skill 执行和智能体工具调用设置限制,以便管理团队的使用情况。",
|
||||
"delete_quota": "删除配额",
|
||||
"delete_quota_confirm": "确定要删除此配额规则吗?此操作无法撤销。",
|
||||
"quota_created_successfully": "配额规则创建成功",
|
||||
"quota_updated_successfully": "配额规则更新成功",
|
||||
"quota_deleted_successfully": "配额规则删除成功",
|
||||
"failed_to_create_quota": "创建配额规则失败",
|
||||
"failed_to_update_quota": "更新配额规则失败",
|
||||
"failed_to_delete_quota": "删除配额规则失败",
|
||||
"quota_status_updated": "配额状态已更新",
|
||||
"quota_scope_mode": "目标模式",
|
||||
"quota_scope_mode_each_member": "每个成员",
|
||||
"quota_scope_mode_each_member_desc": "为每个符合条件的成员分别设定独立的配额上限",
|
||||
"quota_scope_mode_all_members": "所有成员",
|
||||
"quota_scope_mode_all_members_desc": "所有符合条件的成员共同享有总配额上限",
|
||||
"quota_scope_mode_selected_members": "指定成员",
|
||||
"quota_scope_mode_selected_members_desc": "为选定的成员分别设定独立的配额上限",
|
||||
"quota_view_usage": "查看使用量",
|
||||
"quota_usage_records": "使用记录",
|
||||
"quota_usage_records_description": "该配额规则的实时使用明细与生效状态。",
|
||||
"quota_team_shared_pool": "团队共享配额池",
|
||||
"quota_role_shared_pool": "角色共享配额池",
|
||||
"quota_available": "配额可用",
|
||||
"quota_active": "使用中",
|
||||
"quota_refreshes_in": "{time} 后重置",
|
||||
"quota_search_members": "搜索成员...",
|
||||
"quota_selected_users_count": "已选择 {count} 位成员",
|
||||
"select_members": "选择成员",
|
||||
"select_role": "选择角色",
|
||||
"select_user": "选择用户",
|
||||
"select_skill": "选择 Skill",
|
||||
"select_mcp_server": "选择 MCP 服务",
|
||||
"select_tool": "选择工具",
|
||||
"custom_id": "自定义 ID",
|
||||
"enter_custom_id": "输入自定义 ID",
|
||||
"bash_command_pattern": "Bash 命令通配符",
|
||||
"bash_command_pattern_placeholder": "例如 * 或 npm*",
|
||||
"enter_skill_id": "输入技能 ID",
|
||||
"enter_mcp_id": "输入 MCP 服务 ID",
|
||||
"quota_bash_hint": "支持通配符 (*)。示例:git *、npm test、curl *、python script.py(使用 * 匹配所有命令)",
|
||||
"quota_tool_hint": "选择特定的智能体工具以配置其配额限制"
|
||||
}
|
||||
|
||||
+78
@@ -994,4 +994,82 @@ export * from "./agents_md_placeholder.js";
|
||||
export * from "./agents_md_readonly_hint.js";
|
||||
export * from "./agents_md_save_failed.js";
|
||||
export * from "./agents_md_loading.js";
|
||||
export * from "./quotas.js";
|
||||
export * from "./resource_quotas.js";
|
||||
export * from "./resource_quotas_description.js";
|
||||
export * from "./add_quota.js";
|
||||
export * from "./create_quota_rule.js";
|
||||
export * from "./edit_quota_rule.js";
|
||||
export * from "./edit_quota_rule_description.js";
|
||||
export * from "./create_quota_rule_description.js";
|
||||
export * from "./quota_scope.js";
|
||||
export * from "./quota_scope_team.js";
|
||||
export * from "./quota_scope_role.js";
|
||||
export * from "./quota_scope_user.js";
|
||||
export * from "./quota_scope_team_description.js";
|
||||
export * from "./quota_scope_role_description.js";
|
||||
export * from "./quota_scope_user_description.js";
|
||||
export * from "./quota_resource.js";
|
||||
export * from "./quota_resource_agent_total_tokens.js";
|
||||
export * from "./quota_resource_agent_cost.js";
|
||||
export * from "./quota_resource_agent_skill_call_count.js";
|
||||
export * from "./quota_resource_agent_mcp_call_count.js";
|
||||
export * from "./quota_resource_agent_bash_call_count.js";
|
||||
export * from "./quota_resource_agent_tool_call_count.js";
|
||||
export * from "./quota_period.js";
|
||||
export * from "./quota_period_1hour.js";
|
||||
export * from "./quota_period_5hour.js";
|
||||
export * from "./quota_period_1day.js";
|
||||
export * from "./quota_period_7day.js";
|
||||
export * from "./quota_limit.js";
|
||||
export * from "./quota_limit_placeholder.js";
|
||||
export * from "./quota_enabled.js";
|
||||
export * from "./quota_disabled.js";
|
||||
export * from "./quota_current_usage.js";
|
||||
export * from "./quota_consumed.js";
|
||||
export * from "./quota_remaining.js";
|
||||
export * from "./quota_period_resets.js";
|
||||
export * from "./quota_active_window.js";
|
||||
export * from "./no_quotas_title.js";
|
||||
export * from "./no_quotas_description.js";
|
||||
export * from "./delete_quota.js";
|
||||
export * from "./delete_quota_confirm.js";
|
||||
export * from "./quota_created_successfully.js";
|
||||
export * from "./quota_updated_successfully.js";
|
||||
export * from "./quota_deleted_successfully.js";
|
||||
export * from "./failed_to_create_quota.js";
|
||||
export * from "./failed_to_update_quota.js";
|
||||
export * from "./failed_to_delete_quota.js";
|
||||
export * from "./quota_status_updated.js";
|
||||
export * from "./quota_scope_mode.js";
|
||||
export * from "./quota_scope_mode_each_member.js";
|
||||
export * from "./quota_scope_mode_each_member_desc.js";
|
||||
export * from "./quota_scope_mode_all_members.js";
|
||||
export * from "./quota_scope_mode_all_members_desc.js";
|
||||
export * from "./quota_scope_mode_selected_members.js";
|
||||
export * from "./quota_scope_mode_selected_members_desc.js";
|
||||
export * from "./quota_view_usage.js";
|
||||
export * from "./quota_usage_records.js";
|
||||
export * from "./quota_usage_records_description.js";
|
||||
export * from "./quota_team_shared_pool.js";
|
||||
export * from "./quota_role_shared_pool.js";
|
||||
export * from "./quota_available.js";
|
||||
export * from "./quota_active.js";
|
||||
export * from "./quota_refreshes_in.js";
|
||||
export * from "./quota_search_members.js";
|
||||
export * from "./quota_selected_users_count.js";
|
||||
export * from "./select_members.js";
|
||||
export * from "./select_role.js";
|
||||
export * from "./select_user.js";
|
||||
export * from "./select_skill.js";
|
||||
export * from "./select_mcp_server.js";
|
||||
export * from "./select_tool.js";
|
||||
export * from "./custom_id.js";
|
||||
export * from "./enter_custom_id.js";
|
||||
export * from "./bash_command_pattern.js";
|
||||
export * from "./bash_command_pattern_placeholder.js";
|
||||
export * from "./enter_skill_id.js";
|
||||
export * from "./enter_mcp_id.js";
|
||||
export * from "./quota_bash_hint.js";
|
||||
export * from "./quota_tool_hint.js";
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
|
||||
+79
-1
@@ -995,4 +995,82 @@ export * from './agents_md.js'
|
||||
export * from './agents_md_placeholder.js'
|
||||
export * from './agents_md_readonly_hint.js'
|
||||
export * from './agents_md_save_failed.js'
|
||||
export * from './agents_md_loading.js'
|
||||
export * from './agents_md_loading.js'
|
||||
export * from './quotas.js'
|
||||
export * from './resource_quotas.js'
|
||||
export * from './resource_quotas_description.js'
|
||||
export * from './add_quota.js'
|
||||
export * from './create_quota_rule.js'
|
||||
export * from './edit_quota_rule.js'
|
||||
export * from './edit_quota_rule_description.js'
|
||||
export * from './create_quota_rule_description.js'
|
||||
export * from './quota_scope.js'
|
||||
export * from './quota_scope_team.js'
|
||||
export * from './quota_scope_role.js'
|
||||
export * from './quota_scope_user.js'
|
||||
export * from './quota_scope_team_description.js'
|
||||
export * from './quota_scope_role_description.js'
|
||||
export * from './quota_scope_user_description.js'
|
||||
export * from './quota_resource.js'
|
||||
export * from './quota_resource_agent_total_tokens.js'
|
||||
export * from './quota_resource_agent_cost.js'
|
||||
export * from './quota_resource_agent_skill_call_count.js'
|
||||
export * from './quota_resource_agent_mcp_call_count.js'
|
||||
export * from './quota_resource_agent_bash_call_count.js'
|
||||
export * from './quota_resource_agent_tool_call_count.js'
|
||||
export * from './quota_period.js'
|
||||
export * from './quota_period_1hour.js'
|
||||
export * from './quota_period_5hour.js'
|
||||
export * from './quota_period_1day.js'
|
||||
export * from './quota_period_7day.js'
|
||||
export * from './quota_limit.js'
|
||||
export * from './quota_limit_placeholder.js'
|
||||
export * from './quota_enabled.js'
|
||||
export * from './quota_disabled.js'
|
||||
export * from './quota_current_usage.js'
|
||||
export * from './quota_consumed.js'
|
||||
export * from './quota_remaining.js'
|
||||
export * from './quota_period_resets.js'
|
||||
export * from './quota_active_window.js'
|
||||
export * from './no_quotas_title.js'
|
||||
export * from './no_quotas_description.js'
|
||||
export * from './delete_quota.js'
|
||||
export * from './delete_quota_confirm.js'
|
||||
export * from './quota_created_successfully.js'
|
||||
export * from './quota_updated_successfully.js'
|
||||
export * from './quota_deleted_successfully.js'
|
||||
export * from './failed_to_create_quota.js'
|
||||
export * from './failed_to_update_quota.js'
|
||||
export * from './failed_to_delete_quota.js'
|
||||
export * from './quota_status_updated.js'
|
||||
export * from './quota_scope_mode.js'
|
||||
export * from './quota_scope_mode_each_member.js'
|
||||
export * from './quota_scope_mode_each_member_desc.js'
|
||||
export * from './quota_scope_mode_all_members.js'
|
||||
export * from './quota_scope_mode_all_members_desc.js'
|
||||
export * from './quota_scope_mode_selected_members.js'
|
||||
export * from './quota_scope_mode_selected_members_desc.js'
|
||||
export * from './quota_view_usage.js'
|
||||
export * from './quota_usage_records.js'
|
||||
export * from './quota_usage_records_description.js'
|
||||
export * from './quota_team_shared_pool.js'
|
||||
export * from './quota_role_shared_pool.js'
|
||||
export * from './quota_available.js'
|
||||
export * from './quota_active.js'
|
||||
export * from './quota_refreshes_in.js'
|
||||
export * from './quota_search_members.js'
|
||||
export * from './quota_selected_users_count.js'
|
||||
export * from './select_members.js'
|
||||
export * from './select_role.js'
|
||||
export * from './select_user.js'
|
||||
export * from './select_skill.js'
|
||||
export * from './select_mcp_server.js'
|
||||
export * from './select_tool.js'
|
||||
export * from './custom_id.js'
|
||||
export * from './enter_custom_id.js'
|
||||
export * from './bash_command_pattern.js'
|
||||
export * from './bash_command_pattern_placeholder.js'
|
||||
export * from './enter_skill_id.js'
|
||||
export * from './enter_mcp_id.js'
|
||||
export * from './quota_bash_hint.js'
|
||||
export * from './quota_tool_hint.js'
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Add Quota" |
|
||||
*
|
||||
* @param {Add_QuotaInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const add_quota: ((inputs?: Add_QuotaInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Add_QuotaInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Add_QuotaInputs = {};
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Add_QuotaInputs */
|
||||
|
||||
const en_add_quota = /** @type {(inputs: Add_QuotaInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Add Quota`)
|
||||
};
|
||||
|
||||
const zh_add_quota = /** @type {(inputs: Add_QuotaInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`添加配额`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Add Quota" |
|
||||
*
|
||||
* @param {Add_QuotaInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const add_quota = /** @type {((inputs?: Add_QuotaInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Add_QuotaInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_add_quota(inputs)
|
||||
return zh_add_quota(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Bash Match Wildcard" |
|
||||
*
|
||||
* @param {Bash_Command_PatternInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const bash_command_pattern: ((inputs?: Bash_Command_PatternInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Bash_Command_PatternInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Bash_Command_PatternInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Bash_Command_PatternInputs */
|
||||
|
||||
const en_bash_command_pattern = /** @type {(inputs: Bash_Command_PatternInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Bash Match Wildcard`)
|
||||
};
|
||||
|
||||
const zh_bash_command_pattern = /** @type {(inputs: Bash_Command_PatternInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Bash 命令通配符`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Bash Match Wildcard" |
|
||||
*
|
||||
* @param {Bash_Command_PatternInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const bash_command_pattern = /** @type {((inputs?: Bash_Command_PatternInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Bash_Command_PatternInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_bash_command_pattern(inputs)
|
||||
return zh_bash_command_pattern(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "e.g. * or npm*" |
|
||||
*
|
||||
* @param {Bash_Command_Pattern_PlaceholderInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const bash_command_pattern_placeholder: ((inputs?: Bash_Command_Pattern_PlaceholderInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Bash_Command_Pattern_PlaceholderInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Bash_Command_Pattern_PlaceholderInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Bash_Command_Pattern_PlaceholderInputs */
|
||||
|
||||
const en_bash_command_pattern_placeholder = /** @type {(inputs: Bash_Command_Pattern_PlaceholderInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`e.g. * or npm*`)
|
||||
};
|
||||
|
||||
const zh_bash_command_pattern_placeholder = /** @type {(inputs: Bash_Command_Pattern_PlaceholderInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`例如 * 或 npm*`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "e.g. * or npm*" |
|
||||
*
|
||||
* @param {Bash_Command_Pattern_PlaceholderInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const bash_command_pattern_placeholder = /** @type {((inputs?: Bash_Command_Pattern_PlaceholderInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Bash_Command_Pattern_PlaceholderInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_bash_command_pattern_placeholder(inputs)
|
||||
return zh_bash_command_pattern_placeholder(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Create Quota Rule" |
|
||||
*
|
||||
* @param {Create_Quota_RuleInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const create_quota_rule: ((inputs?: Create_Quota_RuleInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Create_Quota_RuleInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Create_Quota_RuleInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Create_Quota_RuleInputs */
|
||||
|
||||
const en_create_quota_rule = /** @type {(inputs: Create_Quota_RuleInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Create Quota Rule`)
|
||||
};
|
||||
|
||||
const zh_create_quota_rule = /** @type {(inputs: Create_Quota_RuleInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`创建配额规则`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Create Quota Rule" |
|
||||
*
|
||||
* @param {Create_Quota_RuleInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const create_quota_rule = /** @type {((inputs?: Create_Quota_RuleInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Create_Quota_RuleInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_create_quota_rule(inputs)
|
||||
return zh_create_quota_rule(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Set up a new resource quota to prevent unexpected usage." |
|
||||
*
|
||||
* @param {Create_Quota_Rule_DescriptionInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const create_quota_rule_description: ((inputs?: Create_Quota_Rule_DescriptionInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Create_Quota_Rule_DescriptionInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Create_Quota_Rule_DescriptionInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Create_Quota_Rule_DescriptionInputs */
|
||||
|
||||
const en_create_quota_rule_description = /** @type {(inputs: Create_Quota_Rule_DescriptionInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Set up a new resource quota to prevent unexpected usage.`)
|
||||
};
|
||||
|
||||
const zh_create_quota_rule_description = /** @type {(inputs: Create_Quota_Rule_DescriptionInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`设置新的资源配额以防止意外的超量使用。`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Set up a new resource quota to prevent unexpected usage." |
|
||||
*
|
||||
* @param {Create_Quota_Rule_DescriptionInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const create_quota_rule_description = /** @type {((inputs?: Create_Quota_Rule_DescriptionInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Create_Quota_Rule_DescriptionInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_create_quota_rule_description(inputs)
|
||||
return zh_create_quota_rule_description(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Custom ID" |
|
||||
*
|
||||
* @param {Custom_IdInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const custom_id: ((inputs?: Custom_IdInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Custom_IdInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Custom_IdInputs = {};
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Custom_IdInputs */
|
||||
|
||||
const en_custom_id = /** @type {(inputs: Custom_IdInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Custom ID`)
|
||||
};
|
||||
|
||||
const zh_custom_id = /** @type {(inputs: Custom_IdInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`自定义 ID`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Custom ID" |
|
||||
*
|
||||
* @param {Custom_IdInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const custom_id = /** @type {((inputs?: Custom_IdInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Custom_IdInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_custom_id(inputs)
|
||||
return zh_custom_id(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Delete Quota" |
|
||||
*
|
||||
* @param {Delete_QuotaInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const delete_quota: ((inputs?: Delete_QuotaInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Delete_QuotaInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Delete_QuotaInputs = {};
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Delete_QuotaInputs */
|
||||
|
||||
const en_delete_quota = /** @type {(inputs: Delete_QuotaInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Delete Quota`)
|
||||
};
|
||||
|
||||
const zh_delete_quota = /** @type {(inputs: Delete_QuotaInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`删除配额`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Delete Quota" |
|
||||
*
|
||||
* @param {Delete_QuotaInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const delete_quota = /** @type {((inputs?: Delete_QuotaInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Delete_QuotaInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_delete_quota(inputs)
|
||||
return zh_delete_quota(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Are you sure you want to delete this quota rule? This action cannot be undone." |
|
||||
*
|
||||
* @param {Delete_Quota_ConfirmInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const delete_quota_confirm: ((inputs?: Delete_Quota_ConfirmInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Delete_Quota_ConfirmInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Delete_Quota_ConfirmInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Delete_Quota_ConfirmInputs */
|
||||
|
||||
const en_delete_quota_confirm = /** @type {(inputs: Delete_Quota_ConfirmInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Are you sure you want to delete this quota rule? This action cannot be undone.`)
|
||||
};
|
||||
|
||||
const zh_delete_quota_confirm = /** @type {(inputs: Delete_Quota_ConfirmInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`确定要删除此配额规则吗?此操作无法撤销。`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Are you sure you want to delete this quota rule? This action cannot be undone." |
|
||||
*
|
||||
* @param {Delete_Quota_ConfirmInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const delete_quota_confirm = /** @type {((inputs?: Delete_Quota_ConfirmInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Delete_Quota_ConfirmInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_delete_quota_confirm(inputs)
|
||||
return zh_delete_quota_confirm(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Edit Quota Rule" |
|
||||
*
|
||||
* @param {Edit_Quota_RuleInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const edit_quota_rule: ((inputs?: Edit_Quota_RuleInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Edit_Quota_RuleInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Edit_Quota_RuleInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Edit_Quota_RuleInputs */
|
||||
|
||||
const en_edit_quota_rule = /** @type {(inputs: Edit_Quota_RuleInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Edit Quota Rule`)
|
||||
};
|
||||
|
||||
const zh_edit_quota_rule = /** @type {(inputs: Edit_Quota_RuleInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`编辑配额规则`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Edit Quota Rule" |
|
||||
*
|
||||
* @param {Edit_Quota_RuleInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const edit_quota_rule = /** @type {((inputs?: Edit_Quota_RuleInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Edit_Quota_RuleInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_edit_quota_rule(inputs)
|
||||
return zh_edit_quota_rule(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Configure resource limits, target scopes, and evaluation periods." |
|
||||
*
|
||||
* @param {Edit_Quota_Rule_DescriptionInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const edit_quota_rule_description: ((inputs?: Edit_Quota_Rule_DescriptionInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Edit_Quota_Rule_DescriptionInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Edit_Quota_Rule_DescriptionInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Edit_Quota_Rule_DescriptionInputs */
|
||||
|
||||
const en_edit_quota_rule_description = /** @type {(inputs: Edit_Quota_Rule_DescriptionInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Configure resource limits, target scopes, and evaluation periods.`)
|
||||
};
|
||||
|
||||
const zh_edit_quota_rule_description = /** @type {(inputs: Edit_Quota_Rule_DescriptionInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`配置资源上限、目标范围以及评估周期。`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Configure resource limits, target scopes, and evaluation periods." |
|
||||
*
|
||||
* @param {Edit_Quota_Rule_DescriptionInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const edit_quota_rule_description = /** @type {((inputs?: Edit_Quota_Rule_DescriptionInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Edit_Quota_Rule_DescriptionInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_edit_quota_rule_description(inputs)
|
||||
return zh_edit_quota_rule_description(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Enter custom ID" |
|
||||
*
|
||||
* @param {Enter_Custom_IdInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const enter_custom_id: ((inputs?: Enter_Custom_IdInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Enter_Custom_IdInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Enter_Custom_IdInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Enter_Custom_IdInputs */
|
||||
|
||||
const en_enter_custom_id = /** @type {(inputs: Enter_Custom_IdInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Enter custom ID`)
|
||||
};
|
||||
|
||||
const zh_enter_custom_id = /** @type {(inputs: Enter_Custom_IdInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`输入自定义 ID`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Enter custom ID" |
|
||||
*
|
||||
* @param {Enter_Custom_IdInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const enter_custom_id = /** @type {((inputs?: Enter_Custom_IdInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Enter_Custom_IdInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_enter_custom_id(inputs)
|
||||
return zh_enter_custom_id(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Enter MCP Server ID" |
|
||||
*
|
||||
* @param {Enter_Mcp_IdInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const enter_mcp_id: ((inputs?: Enter_Mcp_IdInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Enter_Mcp_IdInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Enter_Mcp_IdInputs = {};
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Enter_Mcp_IdInputs */
|
||||
|
||||
const en_enter_mcp_id = /** @type {(inputs: Enter_Mcp_IdInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Enter MCP Server ID`)
|
||||
};
|
||||
|
||||
const zh_enter_mcp_id = /** @type {(inputs: Enter_Mcp_IdInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`输入 MCP 服务 ID`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Enter MCP Server ID" |
|
||||
*
|
||||
* @param {Enter_Mcp_IdInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const enter_mcp_id = /** @type {((inputs?: Enter_Mcp_IdInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Enter_Mcp_IdInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_enter_mcp_id(inputs)
|
||||
return zh_enter_mcp_id(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Enter Skill ID" |
|
||||
*
|
||||
* @param {Enter_Skill_IdInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const enter_skill_id: ((inputs?: Enter_Skill_IdInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Enter_Skill_IdInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Enter_Skill_IdInputs = {};
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Enter_Skill_IdInputs */
|
||||
|
||||
const en_enter_skill_id = /** @type {(inputs: Enter_Skill_IdInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Enter Skill ID`)
|
||||
};
|
||||
|
||||
const zh_enter_skill_id = /** @type {(inputs: Enter_Skill_IdInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`输入技能 ID`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Enter Skill ID" |
|
||||
*
|
||||
* @param {Enter_Skill_IdInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const enter_skill_id = /** @type {((inputs?: Enter_Skill_IdInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Enter_Skill_IdInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_enter_skill_id(inputs)
|
||||
return zh_enter_skill_id(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Failed to create quota rule" |
|
||||
*
|
||||
* @param {Failed_To_Create_QuotaInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const failed_to_create_quota: ((inputs?: Failed_To_Create_QuotaInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Failed_To_Create_QuotaInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Failed_To_Create_QuotaInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Failed_To_Create_QuotaInputs */
|
||||
|
||||
const en_failed_to_create_quota = /** @type {(inputs: Failed_To_Create_QuotaInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Failed to create quota rule`)
|
||||
};
|
||||
|
||||
const zh_failed_to_create_quota = /** @type {(inputs: Failed_To_Create_QuotaInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`创建配额规则失败`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Failed to create quota rule" |
|
||||
*
|
||||
* @param {Failed_To_Create_QuotaInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const failed_to_create_quota = /** @type {((inputs?: Failed_To_Create_QuotaInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Failed_To_Create_QuotaInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_failed_to_create_quota(inputs)
|
||||
return zh_failed_to_create_quota(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Failed to delete quota rule" |
|
||||
*
|
||||
* @param {Failed_To_Delete_QuotaInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const failed_to_delete_quota: ((inputs?: Failed_To_Delete_QuotaInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Failed_To_Delete_QuotaInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Failed_To_Delete_QuotaInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Failed_To_Delete_QuotaInputs */
|
||||
|
||||
const en_failed_to_delete_quota = /** @type {(inputs: Failed_To_Delete_QuotaInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Failed to delete quota rule`)
|
||||
};
|
||||
|
||||
const zh_failed_to_delete_quota = /** @type {(inputs: Failed_To_Delete_QuotaInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`删除配额规则失败`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Failed to delete quota rule" |
|
||||
*
|
||||
* @param {Failed_To_Delete_QuotaInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const failed_to_delete_quota = /** @type {((inputs?: Failed_To_Delete_QuotaInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Failed_To_Delete_QuotaInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_failed_to_delete_quota(inputs)
|
||||
return zh_failed_to_delete_quota(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Failed to update quota rule" |
|
||||
*
|
||||
* @param {Failed_To_Update_QuotaInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const failed_to_update_quota: ((inputs?: Failed_To_Update_QuotaInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Failed_To_Update_QuotaInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Failed_To_Update_QuotaInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Failed_To_Update_QuotaInputs */
|
||||
|
||||
const en_failed_to_update_quota = /** @type {(inputs: Failed_To_Update_QuotaInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Failed to update quota rule`)
|
||||
};
|
||||
|
||||
const zh_failed_to_update_quota = /** @type {(inputs: Failed_To_Update_QuotaInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`更新配额规则失败`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Failed to update quota rule" |
|
||||
*
|
||||
* @param {Failed_To_Update_QuotaInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const failed_to_update_quota = /** @type {((inputs?: Failed_To_Update_QuotaInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Failed_To_Update_QuotaInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_failed_to_update_quota(inputs)
|
||||
return zh_failed_to_update_quota(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Set limits on AI tokens, costs, skill executions, and agent tool calls to manage team usage." |
|
||||
*
|
||||
* @param {No_Quotas_DescriptionInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const no_quotas_description: ((inputs?: No_Quotas_DescriptionInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<No_Quotas_DescriptionInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type No_Quotas_DescriptionInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} No_Quotas_DescriptionInputs */
|
||||
|
||||
const en_no_quotas_description = /** @type {(inputs: No_Quotas_DescriptionInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Set limits on AI tokens, costs, skill executions, and agent tool calls to manage team usage.`)
|
||||
};
|
||||
|
||||
const zh_no_quotas_description = /** @type {(inputs: No_Quotas_DescriptionInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`为 AI Token、费用、Skill 执行和智能体工具调用设置限制,以便管理团队的使用情况。`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Set limits on AI tokens, costs, skill executions, and agent tool calls to manage team usage." |
|
||||
*
|
||||
* @param {No_Quotas_DescriptionInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const no_quotas_description = /** @type {((inputs?: No_Quotas_DescriptionInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<No_Quotas_DescriptionInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_no_quotas_description(inputs)
|
||||
return zh_no_quotas_description(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "No resource quotas configured" |
|
||||
*
|
||||
* @param {No_Quotas_TitleInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const no_quotas_title: ((inputs?: No_Quotas_TitleInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<No_Quotas_TitleInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type No_Quotas_TitleInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} No_Quotas_TitleInputs */
|
||||
|
||||
const en_no_quotas_title = /** @type {(inputs: No_Quotas_TitleInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`No resource quotas configured`)
|
||||
};
|
||||
|
||||
const zh_no_quotas_title = /** @type {(inputs: No_Quotas_TitleInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`暂未配置资源配额`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "No resource quotas configured" |
|
||||
*
|
||||
* @param {No_Quotas_TitleInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const no_quotas_title = /** @type {((inputs?: No_Quotas_TitleInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<No_Quotas_TitleInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_no_quotas_title(inputs)
|
||||
return zh_no_quotas_title(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Active" |
|
||||
*
|
||||
* @param {Quota_ActiveInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_active: ((inputs?: Quota_ActiveInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Quota_ActiveInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Quota_ActiveInputs = {};
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Quota_ActiveInputs */
|
||||
|
||||
const en_quota_active = /** @type {(inputs: Quota_ActiveInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Active`)
|
||||
};
|
||||
|
||||
const zh_quota_active = /** @type {(inputs: Quota_ActiveInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`使用中`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Active" |
|
||||
*
|
||||
* @param {Quota_ActiveInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_active = /** @type {((inputs?: Quota_ActiveInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Quota_ActiveInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_quota_active(inputs)
|
||||
return zh_quota_active(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Active Window" |
|
||||
*
|
||||
* @param {Quota_Active_WindowInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_active_window: ((inputs?: Quota_Active_WindowInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Quota_Active_WindowInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Quota_Active_WindowInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Quota_Active_WindowInputs */
|
||||
|
||||
const en_quota_active_window = /** @type {(inputs: Quota_Active_WindowInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Active Window`)
|
||||
};
|
||||
|
||||
const zh_quota_active_window = /** @type {(inputs: Quota_Active_WindowInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`生效周期`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Active Window" |
|
||||
*
|
||||
* @param {Quota_Active_WindowInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_active_window = /** @type {((inputs?: Quota_Active_WindowInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Quota_Active_WindowInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_quota_active_window(inputs)
|
||||
return zh_quota_active_window(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Quota available" |
|
||||
*
|
||||
* @param {Quota_AvailableInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_available: ((inputs?: Quota_AvailableInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Quota_AvailableInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Quota_AvailableInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Quota_AvailableInputs */
|
||||
|
||||
const en_quota_available = /** @type {(inputs: Quota_AvailableInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Quota available`)
|
||||
};
|
||||
|
||||
const zh_quota_available = /** @type {(inputs: Quota_AvailableInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`配额可用`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Quota available" |
|
||||
*
|
||||
* @param {Quota_AvailableInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_available = /** @type {((inputs?: Quota_AvailableInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Quota_AvailableInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_quota_available(inputs)
|
||||
return zh_quota_available(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Supports wildcards (*). Examples: git *, npm test, curl *, python script.py (use * for all commands)" |
|
||||
*
|
||||
* @param {Quota_Bash_HintInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_bash_hint: ((inputs?: Quota_Bash_HintInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Quota_Bash_HintInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Quota_Bash_HintInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Quota_Bash_HintInputs */
|
||||
|
||||
const en_quota_bash_hint = /** @type {(inputs: Quota_Bash_HintInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Supports wildcards (*). Examples: git *, npm test, curl *, python script.py (use * for all commands)`)
|
||||
};
|
||||
|
||||
const zh_quota_bash_hint = /** @type {(inputs: Quota_Bash_HintInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`支持通配符 (*)。示例:git *、npm test、curl *、python script.py(使用 * 匹配所有命令)`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Supports wildcards (*). Examples: git *, npm test, curl *, python script.py (use * for all commands)" |
|
||||
*
|
||||
* @param {Quota_Bash_HintInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_bash_hint = /** @type {((inputs?: Quota_Bash_HintInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Quota_Bash_HintInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_quota_bash_hint(inputs)
|
||||
return zh_quota_bash_hint(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Consumed" |
|
||||
*
|
||||
* @param {Quota_ConsumedInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_consumed: ((inputs?: Quota_ConsumedInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Quota_ConsumedInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Quota_ConsumedInputs = {};
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Quota_ConsumedInputs */
|
||||
|
||||
const en_quota_consumed = /** @type {(inputs: Quota_ConsumedInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Consumed`)
|
||||
};
|
||||
|
||||
const zh_quota_consumed = /** @type {(inputs: Quota_ConsumedInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`已消耗`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Consumed" |
|
||||
*
|
||||
* @param {Quota_ConsumedInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_consumed = /** @type {((inputs?: Quota_ConsumedInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Quota_ConsumedInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_quota_consumed(inputs)
|
||||
return zh_quota_consumed(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Quota rule created successfully" |
|
||||
*
|
||||
* @param {Quota_Created_SuccessfullyInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_created_successfully: ((inputs?: Quota_Created_SuccessfullyInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Quota_Created_SuccessfullyInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Quota_Created_SuccessfullyInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Quota_Created_SuccessfullyInputs */
|
||||
|
||||
const en_quota_created_successfully = /** @type {(inputs: Quota_Created_SuccessfullyInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Quota rule created successfully`)
|
||||
};
|
||||
|
||||
const zh_quota_created_successfully = /** @type {(inputs: Quota_Created_SuccessfullyInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`配额规则创建成功`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Quota rule created successfully" |
|
||||
*
|
||||
* @param {Quota_Created_SuccessfullyInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_created_successfully = /** @type {((inputs?: Quota_Created_SuccessfullyInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Quota_Created_SuccessfullyInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_quota_created_successfully(inputs)
|
||||
return zh_quota_created_successfully(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Current Usage" |
|
||||
*
|
||||
* @param {Quota_Current_UsageInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_current_usage: ((inputs?: Quota_Current_UsageInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Quota_Current_UsageInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Quota_Current_UsageInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Quota_Current_UsageInputs */
|
||||
|
||||
const en_quota_current_usage = /** @type {(inputs: Quota_Current_UsageInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Current Usage`)
|
||||
};
|
||||
|
||||
const zh_quota_current_usage = /** @type {(inputs: Quota_Current_UsageInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`当前使用量`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Current Usage" |
|
||||
*
|
||||
* @param {Quota_Current_UsageInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_current_usage = /** @type {((inputs?: Quota_Current_UsageInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Quota_Current_UsageInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_quota_current_usage(inputs)
|
||||
return zh_quota_current_usage(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Quota rule deleted successfully" |
|
||||
*
|
||||
* @param {Quota_Deleted_SuccessfullyInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_deleted_successfully: ((inputs?: Quota_Deleted_SuccessfullyInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Quota_Deleted_SuccessfullyInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Quota_Deleted_SuccessfullyInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Quota_Deleted_SuccessfullyInputs */
|
||||
|
||||
const en_quota_deleted_successfully = /** @type {(inputs: Quota_Deleted_SuccessfullyInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Quota rule deleted successfully`)
|
||||
};
|
||||
|
||||
const zh_quota_deleted_successfully = /** @type {(inputs: Quota_Deleted_SuccessfullyInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`配额规则删除成功`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Quota rule deleted successfully" |
|
||||
*
|
||||
* @param {Quota_Deleted_SuccessfullyInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_deleted_successfully = /** @type {((inputs?: Quota_Deleted_SuccessfullyInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Quota_Deleted_SuccessfullyInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_quota_deleted_successfully(inputs)
|
||||
return zh_quota_deleted_successfully(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Disabled" |
|
||||
*
|
||||
* @param {Quota_DisabledInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_disabled: ((inputs?: Quota_DisabledInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Quota_DisabledInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Quota_DisabledInputs = {};
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Quota_DisabledInputs */
|
||||
|
||||
const en_quota_disabled = /** @type {(inputs: Quota_DisabledInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Disabled`)
|
||||
};
|
||||
|
||||
const zh_quota_disabled = /** @type {(inputs: Quota_DisabledInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`已禁用`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Disabled" |
|
||||
*
|
||||
* @param {Quota_DisabledInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_disabled = /** @type {((inputs?: Quota_DisabledInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Quota_DisabledInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_quota_disabled(inputs)
|
||||
return zh_quota_disabled(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Enabled" |
|
||||
*
|
||||
* @param {Quota_EnabledInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_enabled: ((inputs?: Quota_EnabledInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Quota_EnabledInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Quota_EnabledInputs = {};
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Quota_EnabledInputs */
|
||||
|
||||
const en_quota_enabled = /** @type {(inputs: Quota_EnabledInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Enabled`)
|
||||
};
|
||||
|
||||
const zh_quota_enabled = /** @type {(inputs: Quota_EnabledInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`已启用`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Enabled" |
|
||||
*
|
||||
* @param {Quota_EnabledInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_enabled = /** @type {((inputs?: Quota_EnabledInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Quota_EnabledInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_quota_enabled(inputs)
|
||||
return zh_quota_enabled(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Limit" |
|
||||
*
|
||||
* @param {Quota_LimitInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_limit: ((inputs?: Quota_LimitInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Quota_LimitInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Quota_LimitInputs = {};
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Quota_LimitInputs */
|
||||
|
||||
const en_quota_limit = /** @type {(inputs: Quota_LimitInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Limit`)
|
||||
};
|
||||
|
||||
const zh_quota_limit = /** @type {(inputs: Quota_LimitInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`上限`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Limit" |
|
||||
*
|
||||
* @param {Quota_LimitInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_limit = /** @type {((inputs?: Quota_LimitInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Quota_LimitInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_quota_limit(inputs)
|
||||
return zh_quota_limit(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "e.g. 100000" |
|
||||
*
|
||||
* @param {Quota_Limit_PlaceholderInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_limit_placeholder: ((inputs?: Quota_Limit_PlaceholderInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Quota_Limit_PlaceholderInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Quota_Limit_PlaceholderInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Quota_Limit_PlaceholderInputs */
|
||||
|
||||
const en_quota_limit_placeholder = /** @type {(inputs: Quota_Limit_PlaceholderInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`e.g. 100000`)
|
||||
};
|
||||
|
||||
const zh_quota_limit_placeholder = /** @type {(inputs: Quota_Limit_PlaceholderInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`例如 100000`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "e.g. 100000" |
|
||||
*
|
||||
* @param {Quota_Limit_PlaceholderInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_limit_placeholder = /** @type {((inputs?: Quota_Limit_PlaceholderInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Quota_Limit_PlaceholderInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_quota_limit_placeholder(inputs)
|
||||
return zh_quota_limit_placeholder(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Period Window" |
|
||||
*
|
||||
* @param {Quota_PeriodInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_period: ((inputs?: Quota_PeriodInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Quota_PeriodInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Quota_PeriodInputs = {};
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Quota_PeriodInputs */
|
||||
|
||||
const en_quota_period = /** @type {(inputs: Quota_PeriodInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Period Window`)
|
||||
};
|
||||
|
||||
const zh_quota_period = /** @type {(inputs: Quota_PeriodInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`周期窗口`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Period Window" |
|
||||
*
|
||||
* @param {Quota_PeriodInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_period = /** @type {((inputs?: Quota_PeriodInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Quota_PeriodInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_quota_period(inputs)
|
||||
return zh_quota_period(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "1 Day" |
|
||||
*
|
||||
* @param {Quota_Period_1dayInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_period_1day: ((inputs?: Quota_Period_1dayInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Quota_Period_1dayInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Quota_Period_1dayInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Quota_Period_1dayInputs */
|
||||
|
||||
const en_quota_period_1day = /** @type {(inputs: Quota_Period_1dayInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`1 Day`)
|
||||
};
|
||||
|
||||
const zh_quota_period_1day = /** @type {(inputs: Quota_Period_1dayInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`1 天`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "1 Day" |
|
||||
*
|
||||
* @param {Quota_Period_1dayInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_period_1day = /** @type {((inputs?: Quota_Period_1dayInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Quota_Period_1dayInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_quota_period_1day(inputs)
|
||||
return zh_quota_period_1day(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "1 Hour" |
|
||||
*
|
||||
* @param {Quota_Period_1hourInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_period_1hour: ((inputs?: Quota_Period_1hourInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Quota_Period_1hourInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Quota_Period_1hourInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Quota_Period_1hourInputs */
|
||||
|
||||
const en_quota_period_1hour = /** @type {(inputs: Quota_Period_1hourInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`1 Hour`)
|
||||
};
|
||||
|
||||
const zh_quota_period_1hour = /** @type {(inputs: Quota_Period_1hourInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`1 小时`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "1 Hour" |
|
||||
*
|
||||
* @param {Quota_Period_1hourInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_period_1hour = /** @type {((inputs?: Quota_Period_1hourInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Quota_Period_1hourInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_quota_period_1hour(inputs)
|
||||
return zh_quota_period_1hour(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "5 Hours" |
|
||||
*
|
||||
* @param {Quota_Period_5hourInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_period_5hour: ((inputs?: Quota_Period_5hourInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Quota_Period_5hourInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Quota_Period_5hourInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Quota_Period_5hourInputs */
|
||||
|
||||
const en_quota_period_5hour = /** @type {(inputs: Quota_Period_5hourInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`5 Hours`)
|
||||
};
|
||||
|
||||
const zh_quota_period_5hour = /** @type {(inputs: Quota_Period_5hourInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`5 小时`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "5 Hours" |
|
||||
*
|
||||
* @param {Quota_Period_5hourInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_period_5hour = /** @type {((inputs?: Quota_Period_5hourInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Quota_Period_5hourInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_quota_period_5hour(inputs)
|
||||
return zh_quota_period_5hour(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "7 Days" |
|
||||
*
|
||||
* @param {Quota_Period_7dayInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_period_7day: ((inputs?: Quota_Period_7dayInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Quota_Period_7dayInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Quota_Period_7dayInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Quota_Period_7dayInputs */
|
||||
|
||||
const en_quota_period_7day = /** @type {(inputs: Quota_Period_7dayInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`7 Days`)
|
||||
};
|
||||
|
||||
const zh_quota_period_7day = /** @type {(inputs: Quota_Period_7dayInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`7 天`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "7 Days" |
|
||||
*
|
||||
* @param {Quota_Period_7dayInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_period_7day = /** @type {((inputs?: Quota_Period_7dayInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Quota_Period_7dayInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_quota_period_7day(inputs)
|
||||
return zh_quota_period_7day(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Resets in" |
|
||||
*
|
||||
* @param {Quota_Period_ResetsInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_period_resets: ((inputs?: Quota_Period_ResetsInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Quota_Period_ResetsInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Quota_Period_ResetsInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Quota_Period_ResetsInputs */
|
||||
|
||||
const en_quota_period_resets = /** @type {(inputs: Quota_Period_ResetsInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Resets in`)
|
||||
};
|
||||
|
||||
const zh_quota_period_resets = /** @type {(inputs: Quota_Period_ResetsInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`重置于`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Resets in" |
|
||||
*
|
||||
* @param {Quota_Period_ResetsInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_period_resets = /** @type {((inputs?: Quota_Period_ResetsInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Quota_Period_ResetsInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_quota_period_resets(inputs)
|
||||
return zh_quota_period_resets(inputs)
|
||||
});
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Refreshes in {time}" |
|
||||
*
|
||||
* @param {Quota_Refreshes_InInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_refreshes_in: ((inputs: Quota_Refreshes_InInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Quota_Refreshes_InInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Quota_Refreshes_InInputs = {
|
||||
time: NonNullable<unknown>;
|
||||
};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{ time: NonNullable<unknown> }} Quota_Refreshes_InInputs */
|
||||
|
||||
const en_quota_refreshes_in = /** @type {(inputs: Quota_Refreshes_InInputs) => LocalizedString} */ (i) => {
|
||||
return /** @type {LocalizedString} */ (`Refreshes in ${i?.time}`)
|
||||
};
|
||||
|
||||
const zh_quota_refreshes_in = /** @type {(inputs: Quota_Refreshes_InInputs) => LocalizedString} */ (i) => {
|
||||
return /** @type {LocalizedString} */ (`${i?.time} 后重置`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Refreshes in {time}" |
|
||||
*
|
||||
* @param {Quota_Refreshes_InInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_refreshes_in = /** @type {((inputs: Quota_Refreshes_InInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Quota_Refreshes_InInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_quota_refreshes_in(inputs)
|
||||
return zh_quota_refreshes_in(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Remaining" |
|
||||
*
|
||||
* @param {Quota_RemainingInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_remaining: ((inputs?: Quota_RemainingInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Quota_RemainingInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Quota_RemainingInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Quota_RemainingInputs */
|
||||
|
||||
const en_quota_remaining = /** @type {(inputs: Quota_RemainingInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Remaining`)
|
||||
};
|
||||
|
||||
const zh_quota_remaining = /** @type {(inputs: Quota_RemainingInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`剩余额度`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Remaining" |
|
||||
*
|
||||
* @param {Quota_RemainingInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_remaining = /** @type {((inputs?: Quota_RemainingInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Quota_RemainingInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_quota_remaining(inputs)
|
||||
return zh_quota_remaining(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Resource" |
|
||||
*
|
||||
* @param {Quota_ResourceInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_resource: ((inputs?: Quota_ResourceInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Quota_ResourceInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Quota_ResourceInputs = {};
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Quota_ResourceInputs */
|
||||
|
||||
const en_quota_resource = /** @type {(inputs: Quota_ResourceInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Resource`)
|
||||
};
|
||||
|
||||
const zh_quota_resource = /** @type {(inputs: Quota_ResourceInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`资源类型`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Resource" |
|
||||
*
|
||||
* @param {Quota_ResourceInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_resource = /** @type {((inputs?: Quota_ResourceInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Quota_ResourceInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_quota_resource(inputs)
|
||||
return zh_quota_resource(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Agent Bash Calls" |
|
||||
*
|
||||
* @param {Quota_Resource_Agent_Bash_Call_CountInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_resource_agent_bash_call_count: ((inputs?: Quota_Resource_Agent_Bash_Call_CountInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Quota_Resource_Agent_Bash_Call_CountInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Quota_Resource_Agent_Bash_Call_CountInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Quota_Resource_Agent_Bash_Call_CountInputs */
|
||||
|
||||
const en_quota_resource_agent_bash_call_count = /** @type {(inputs: Quota_Resource_Agent_Bash_Call_CountInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Agent Bash Calls`)
|
||||
};
|
||||
|
||||
const zh_quota_resource_agent_bash_call_count = /** @type {(inputs: Quota_Resource_Agent_Bash_Call_CountInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`智能体 Bash 执行次数`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Agent Bash Calls" |
|
||||
*
|
||||
* @param {Quota_Resource_Agent_Bash_Call_CountInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_resource_agent_bash_call_count = /** @type {((inputs?: Quota_Resource_Agent_Bash_Call_CountInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Quota_Resource_Agent_Bash_Call_CountInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_quota_resource_agent_bash_call_count(inputs)
|
||||
return zh_quota_resource_agent_bash_call_count(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "AI Cost ($)" |
|
||||
*
|
||||
* @param {Quota_Resource_Agent_CostInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_resource_agent_cost: ((inputs?: Quota_Resource_Agent_CostInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Quota_Resource_Agent_CostInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Quota_Resource_Agent_CostInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Quota_Resource_Agent_CostInputs */
|
||||
|
||||
const en_quota_resource_agent_cost = /** @type {(inputs: Quota_Resource_Agent_CostInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`AI Cost ($)`)
|
||||
};
|
||||
|
||||
const zh_quota_resource_agent_cost = /** @type {(inputs: Quota_Resource_Agent_CostInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`AI 费用 ($)`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "AI Cost ($)" |
|
||||
*
|
||||
* @param {Quota_Resource_Agent_CostInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_resource_agent_cost = /** @type {((inputs?: Quota_Resource_Agent_CostInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Quota_Resource_Agent_CostInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_quota_resource_agent_cost(inputs)
|
||||
return zh_quota_resource_agent_cost(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "MCP Server Calls" |
|
||||
*
|
||||
* @param {Quota_Resource_Agent_Mcp_Call_CountInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_resource_agent_mcp_call_count: ((inputs?: Quota_Resource_Agent_Mcp_Call_CountInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Quota_Resource_Agent_Mcp_Call_CountInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Quota_Resource_Agent_Mcp_Call_CountInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Quota_Resource_Agent_Mcp_Call_CountInputs */
|
||||
|
||||
const en_quota_resource_agent_mcp_call_count = /** @type {(inputs: Quota_Resource_Agent_Mcp_Call_CountInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`MCP Server Calls`)
|
||||
};
|
||||
|
||||
const zh_quota_resource_agent_mcp_call_count = /** @type {(inputs: Quota_Resource_Agent_Mcp_Call_CountInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`MCP 服务调用次数`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "MCP Server Calls" |
|
||||
*
|
||||
* @param {Quota_Resource_Agent_Mcp_Call_CountInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_resource_agent_mcp_call_count = /** @type {((inputs?: Quota_Resource_Agent_Mcp_Call_CountInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Quota_Resource_Agent_Mcp_Call_CountInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_quota_resource_agent_mcp_call_count(inputs)
|
||||
return zh_quota_resource_agent_mcp_call_count(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Skill Calls" |
|
||||
*
|
||||
* @param {Quota_Resource_Agent_Skill_Call_CountInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_resource_agent_skill_call_count: ((inputs?: Quota_Resource_Agent_Skill_Call_CountInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Quota_Resource_Agent_Skill_Call_CountInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Quota_Resource_Agent_Skill_Call_CountInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Quota_Resource_Agent_Skill_Call_CountInputs */
|
||||
|
||||
const en_quota_resource_agent_skill_call_count = /** @type {(inputs: Quota_Resource_Agent_Skill_Call_CountInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Skill Calls`)
|
||||
};
|
||||
|
||||
const zh_quota_resource_agent_skill_call_count = /** @type {(inputs: Quota_Resource_Agent_Skill_Call_CountInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Skill 调用次数`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Skill Calls" |
|
||||
*
|
||||
* @param {Quota_Resource_Agent_Skill_Call_CountInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_resource_agent_skill_call_count = /** @type {((inputs?: Quota_Resource_Agent_Skill_Call_CountInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Quota_Resource_Agent_Skill_Call_CountInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_quota_resource_agent_skill_call_count(inputs)
|
||||
return zh_quota_resource_agent_skill_call_count(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Agent Tool Calls" |
|
||||
*
|
||||
* @param {Quota_Resource_Agent_Tool_Call_CountInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_resource_agent_tool_call_count: ((inputs?: Quota_Resource_Agent_Tool_Call_CountInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Quota_Resource_Agent_Tool_Call_CountInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Quota_Resource_Agent_Tool_Call_CountInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Quota_Resource_Agent_Tool_Call_CountInputs */
|
||||
|
||||
const en_quota_resource_agent_tool_call_count = /** @type {(inputs: Quota_Resource_Agent_Tool_Call_CountInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Agent Tool Calls`)
|
||||
};
|
||||
|
||||
const zh_quota_resource_agent_tool_call_count = /** @type {(inputs: Quota_Resource_Agent_Tool_Call_CountInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`智能体工具调用次数`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Agent Tool Calls" |
|
||||
*
|
||||
* @param {Quota_Resource_Agent_Tool_Call_CountInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_resource_agent_tool_call_count = /** @type {((inputs?: Quota_Resource_Agent_Tool_Call_CountInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Quota_Resource_Agent_Tool_Call_CountInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_quota_resource_agent_tool_call_count(inputs)
|
||||
return zh_quota_resource_agent_tool_call_count(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "AI Tokens" |
|
||||
*
|
||||
* @param {Quota_Resource_Agent_Total_TokensInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_resource_agent_total_tokens: ((inputs?: Quota_Resource_Agent_Total_TokensInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Quota_Resource_Agent_Total_TokensInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Quota_Resource_Agent_Total_TokensInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Quota_Resource_Agent_Total_TokensInputs */
|
||||
|
||||
const en_quota_resource_agent_total_tokens = /** @type {(inputs: Quota_Resource_Agent_Total_TokensInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`AI Tokens`)
|
||||
};
|
||||
|
||||
const zh_quota_resource_agent_total_tokens = /** @type {(inputs: Quota_Resource_Agent_Total_TokensInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`AI Token 总量`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "AI Tokens" |
|
||||
*
|
||||
* @param {Quota_Resource_Agent_Total_TokensInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_resource_agent_total_tokens = /** @type {((inputs?: Quota_Resource_Agent_Total_TokensInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Quota_Resource_Agent_Total_TokensInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_quota_resource_agent_total_tokens(inputs)
|
||||
return zh_quota_resource_agent_total_tokens(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Role Shared Pool" |
|
||||
*
|
||||
* @param {Quota_Role_Shared_PoolInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const quota_role_shared_pool: ((inputs?: Quota_Role_Shared_PoolInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Quota_Role_Shared_PoolInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Quota_Role_Shared_PoolInputs = {};
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user