Commit 98433092 by CaIon

feat(web): improve plugin management and marketplace

parent 99974a81
/*
Copyright (C) 2023-2026 QuantumNous
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import { createHash, webcrypto } from 'node:crypto'
import {
QueryClient,
QueryClientProvider,
QueryObserver,
} from '@tanstack/react-query'
import { act, render, screen, waitFor, within } from '@testing-library/react'
import userEvent from '@testing-library/user-event'
import { afterEach, expect, test, vi } from 'vitest'
import {
MarketplaceInstallDialog,
type MarketplaceInstallTarget,
} from '../components/marketplace-install-dialog'
const api = vi.hoisted(() => ({
getTaskPlugin: vi.fn(),
installMarketplacePlugin: vi.fn(),
activateTaskPlugin: vi.fn(),
}))
vi.mock('../api', () => api)
const clients: QueryClient[] = []
const source =
'// comment\nconst plugin = "demo";\nfunction run() { return 42 }'
function renderDialog(
upgrade = false,
sha256?: string,
multiple = false,
installedVersion = '1.0'
) {
const target: MarketplaceInstallTarget = {
source: { name: 'Official', index_url: 'https://example.com/index.json' },
plugin: {
key: 'demo',
name: 'Demo',
latest: '1.1',
versions: [
{
version: '1.1',
path: 'plugin.js',
sha256,
baseUrl: `https://example.com/${'long-path/'.repeat(15)}`,
},
],
},
version: '1.1',
installState: upgrade
? { status: 'upgradable', installedVersion, latestVersion: '1.1' }
: { status: 'not_installed' },
}
if (multiple) {
target.plugin.versions.push({
version: '1.0',
path: 'old.js',
baseUrl: 'https://old.example.com',
sha256: createHash('sha256').update('const old = 0').digest('hex'),
})
}
const client = new QueryClient({
defaultOptions: { queries: { retry: false }, mutations: { retry: false } },
})
clients.push(client)
const onOpenChange = vi.fn()
const view = render(
<QueryClientProvider client={client}>
<MarketplaceInstallDialog target={target} onOpenChange={onOpenChange} />
</QueryClientProvider>
)
return {
client,
onOpenChange,
reopen: () => {
view.rerender(
<QueryClientProvider client={client}>
<MarketplaceInstallDialog target={null} onOpenChange={onOpenChange} />
</QueryClientProvider>
)
view.rerender(
<QueryClientProvider client={client}>
<MarketplaceInstallDialog
target={target}
onOpenChange={onOpenChange}
/>
</QueryClientProvider>
)
},
}
}
afterEach(() => {
clients.forEach((client) => client.clear())
clients.length = 0
vi.unstubAllGlobals()
vi.resetAllMocks()
})
test('loading keeps installation disabled and footer outside the bounded scroll body', () => {
vi.stubGlobal(
'fetch',
vi.fn(() => new Promise(() => {}))
)
renderDialog()
const dialog = screen.getByRole('dialog')
expect(dialog).toHaveClass(
'sm:max-w-3xl',
'max-h-[calc(100vh-2rem)]',
'overflow-hidden'
)
const footer = dialog.querySelector('[data-slot=dialog-footer]')
const body = [...dialog.children].find((element) =>
element.classList.contains('overflow-y-auto')
)
expect(body).toBeDefined()
if (!body || !footer) throw new Error('Missing dialog scroll body or footer')
expect(body.contains(footer)).toBe(false)
expect(
screen.getByRole('button', { name: 'Install and enable' })
).toBeDisabled()
expect(screen.getByText('Fetching plugin source...')).toBeInTheDocument()
})
test('download failure shows the error and prevents installation', async () => {
vi.stubGlobal('fetch', vi.fn().mockRejectedValue(new Error('offline')))
renderDialog()
expect(
await screen.findByText(/Could not fetch the plugin source/)
).toBeInTheDocument()
expect(
screen.getByRole('button', { name: 'Install and enable' })
).toBeDisabled()
})
test('hash mismatch blocks installation and the complete hash can be copied', async () => {
const user = userEvent.setup()
vi.stubGlobal('crypto', webcrypto)
vi.stubGlobal(
'fetch',
vi.fn(async () => new Response(source))
)
const hash = 'a'.repeat(64)
renderDialog(false, hash)
expect(await screen.findByText('Integrity check failed')).toBeInTheDocument()
expect(
screen.getByRole('button', { name: 'Install and enable' })
).toBeDisabled()
expect(screen.queryByText(hash)).not.toBeInTheDocument()
const details = screen.getByRole('button', { name: 'Integrity hash' })
expect(details).toHaveAttribute('aria-expanded', 'false')
details.focus()
await user.keyboard('{Enter}')
expect(details).toHaveAttribute('aria-expanded', 'true')
expect(screen.getByText(hash)).toHaveClass('break-all')
await user.click(screen.getByRole('button', { name: 'Copy to clipboard' }))
expect(await navigator.clipboard.readText()).toBe(hash)
})
test('first install shows source on demand and disables repeat submission until success', async () => {
const user = userEvent.setup()
vi.stubGlobal(
'fetch',
vi.fn(async () => new Response(source))
)
let resolveInstall!: (value: unknown) => void
api.installMarketplacePlugin.mockImplementation(
() =>
new Promise((resolve) => {
resolveInstall = resolve
})
)
const { onOpenChange } = renderDialog()
await user.click(screen.getByRole('tab', { name: 'Full source' }))
await waitFor(() =>
expect(
screen.getByRole('button', { name: 'Install and enable' })
).toBeEnabled()
)
expect(screen.getByText('const')).toHaveClass('tok-keyword')
expect(screen.getByText('"demo"')).toHaveClass('tok-string')
expect(screen.getByText('// comment')).toHaveClass('tok-comment')
expect(screen.getByText('42')).toHaveClass('tok-number')
expect(screen.getByText('run')).toHaveClass('tok-definition')
await user.click(screen.getByRole('button', { name: 'Install and enable' }))
expect(
await screen.findByRole('button', { name: 'Installing...' })
).toBeDisabled()
expect(api.installMarketplacePlugin).toHaveBeenCalledWith({
source,
sourceSha256: undefined,
remark: 'Official v1.1',
icon: undefined,
})
resolveInstall({ meta: { name: 'Demo', version: '1.1' } })
await waitFor(() => expect(onOpenChange).toHaveBeenCalledWith(false))
})
test('installed plugins allow opening differences and switching to full source with the keyboard', async () => {
const user = userEvent.setup()
vi.stubGlobal(
'fetch',
vi.fn(async () => new Response(source))
)
api.getTaskPlugin.mockResolvedValue({
meta: { version: '1.0' },
source: 'const old = 0',
})
renderDialog(true)
const diffTab = await screen.findByRole('tab', {
name: 'Version differences',
})
await user.click(diffTab)
expect(diffTab).toHaveAttribute('aria-selected', 'true')
expect(await screen.findByText('- const old = 0')).toBeInTheDocument()
diffTab.focus()
await user.keyboard('{ArrowRight}{Enter}')
expect(screen.getByRole('tab', { name: 'Full source' })).toHaveAttribute(
'aria-selected',
'true'
)
expect(
screen.getByRole('button', { name: 'Install and enable' })
).toBeEnabled()
})
const metaSource = `export const meta = {
models: ['incho_music', 'voice', 'instrumental', 'remix', 'ambient', 'lyrics', 'extended'],
baseUrl: 'https://open.yinchaoyongxian.com',
protocols: [{name: 'openai_responses', supports: ['stream', 'sync', 'background'], models: ['incho_music']}],
routes: [
{method: 'POST', path: '/incho/submit/:action', type: 'submit'},
{method: 'GET', path: '/incho/fetch/:task_id', type: 'query'},
],
};`
test('shows all four Incho interfaces and explains absent authentication and extra domains', async () => {
vi.stubGlobal(
'fetch',
vi.fn(async () => new Response(metaSource))
)
renderDialog()
const endpoints = screen.getByRole('region', { name: 'Supported interfaces' })
expect(
await within(endpoints).findByText('/incho/submit/:action')
).toBeVisible()
expect(within(endpoints).getByText('/incho/fetch/:task_id')).toBeVisible()
const create = within(endpoints).getByText('/v1/responses').closest('li')
const query = within(endpoints)
.getByText('/v1/responses/{response_id}')
.closest('li')
if (!create || !query) throw new Error('Missing protocol endpoints')
expect(within(create).getByText('POST')).toBeVisible()
expect(within(create).getByText('stream')).toBeVisible()
expect(within(create).getByText('sync')).toBeVisible()
expect(within(create).getByText('background')).toBeVisible()
expect(within(query).queryByText('stream')).not.toBeInTheDocument()
const connections = screen.getByRole('region', {
name: 'Connection settings',
})
expect(
within(connections).getByText('No extra domains declared')
).toBeVisible()
expect(
within(connections).getByText(
'Not declared; an API key may still be required.'
)
).toBeVisible()
expect(
within(connections).queryByText('From marketplace index')
).not.toBeInTheDocument()
expect(
screen.queryByText('Some plugin information could not be read')
).not.toBeInTheDocument()
})
test('keyboard users can expand the full model list and inspect a protocol model scope', async () => {
const user = userEvent.setup()
vi.stubGlobal(
'fetch',
vi.fn(async () => new Response(metaSource))
)
renderDialog()
const more = await screen.findByRole('button', { name: 'More models (1)' })
const models = screen.getByRole('region', { name: 'Supported models' })
expect(within(models).queryByText('extended')).not.toBeInTheDocument()
more.focus()
await user.keyboard('{Enter}')
expect(more).toHaveAttribute('aria-expanded', 'true')
expect(within(models).getByText('extended')).toBeVisible()
const scope = screen.getByRole('button', { name: 'Model scope' })
scope.focus()
await user.keyboard('{Enter}')
expect(scope).toHaveAttribute('aria-expanded', 'true')
const scopePanel = screen.getByRole('dialog', { name: 'Model scope' })
expect(within(scopePanel).getByText('incho_music')).toBeVisible()
})
test('unreadable metadata can be retried without preventing installation or inventing domain restrictions', async () => {
const user = userEvent.setup()
vi.stubGlobal(
'fetch',
vi
.fn()
.mockResolvedValueOnce(new Response('export const meta = makeMeta();'))
.mockResolvedValueOnce(new Response(metaSource))
)
renderDialog()
expect(
await screen.findByText('Some plugin information could not be read')
).toBeVisible()
expect(
screen.queryByText('No extra domains declared')
).not.toBeInTheDocument()
expect(
screen.getByRole('button', { name: 'Install and enable' })
).toBeEnabled()
await user.click(screen.getByRole('button', { name: 'Retry' }))
await waitFor(() =>
expect(
screen.queryByText('Some plugin information could not be read')
).not.toBeInTheDocument()
)
expect(
within(
screen.getByRole('region', { name: 'Supported interfaces' })
).getByText('/incho/submit/:action')
).toBeVisible()
})
test('a matching hash shows verification separately from code safety and keeps hash details collapsed', async () => {
vi.stubGlobal('crypto', webcrypto)
vi.stubGlobal(
'fetch',
vi.fn(async () => new Response(metaSource))
)
const hash = createHash('sha256').update(metaSource).digest('hex')
renderDialog(false, hash)
expect(await screen.findByText('File integrity verified')).toBeVisible()
expect(
screen.getByText(
'A matching hash confirms the published file, not the safety of its code.'
)
).toBeVisible()
expect(screen.queryByText(hash)).not.toBeInTheDocument()
expect(
screen.getByRole('button', { name: 'Install and enable' })
).toBeEnabled()
})
test('a browser without WebCrypto reports that verification is unavailable instead of claiming success', async () => {
vi.stubGlobal('crypto', {})
vi.stubGlobal(
'fetch',
vi.fn(async () => new Response(metaSource))
)
renderDialog(false, 'a'.repeat(64))
expect(
await screen.findByText(
'Integrity verification unavailable in this environment'
)
).toBeVisible()
expect(screen.queryByText('File integrity verified')).not.toBeInTheDocument()
expect(
screen.getByRole('button', { name: 'Install and enable' })
).toBeEnabled()
})
test('selecting a historical version installs its source and hash', async () => {
const user = userEvent.setup()
vi.stubGlobal('crypto', webcrypto)
vi.stubGlobal(
'fetch',
vi.fn(
async (url: string) =>
new Response(url.endsWith('old.js') ? 'const old = 0' : source)
)
)
api.installMarketplacePlugin.mockResolvedValue({
meta: { key: 'demo', name: 'Demo', version: '1.0' },
plugin: { active: true },
})
renderDialog(false, undefined, true)
const selector = screen.getByRole('combobox', { name: 'Select version' })
expect(selector).toHaveValue('1.1 · Latest version')
await user.click(selector)
await user.click(screen.getByRole('option', { name: '1.0' }))
const install = screen.getByRole('button', { name: 'Install and enable' })
await waitFor(() => expect(install).toBeEnabled())
expect(
within(
screen.getByRole('region', { name: 'Connection settings' })
).getByText('https://old.example.com')
).toBeVisible()
await user.click(install)
expect(api.activateTaskPlugin).not.toHaveBeenCalled()
expect(api.installMarketplacePlugin).toHaveBeenCalledWith({
source: 'const old = 0',
sourceSha256: createHash('sha256').update('const old = 0').digest('hex'),
remark: 'Official v1.0',
icon: undefined,
})
})
test('a single published version remains visible and cannot be changed', () => {
vi.stubGlobal(
'fetch',
vi.fn(() => new Promise(() => {}))
)
renderDialog()
expect(
screen.getByRole('combobox', { name: 'Select version' })
).toBeDisabled()
expect(screen.getByRole('combobox', { name: 'Select version' })).toHaveValue(
'1.1 · Latest version'
)
})
test.each(['0.9', '1.1', '1.0'])(
'installing 1.0 from active %s shows the target diff and activates the saved version',
async (installedVersion) => {
const user = userEvent.setup()
vi.stubGlobal('crypto', webcrypto)
vi.stubGlobal(
'fetch',
vi.fn(
async (url: string) =>
new Response(url.endsWith('old.js') ? 'const old = 0' : source)
)
)
api.getTaskPlugin.mockResolvedValue({
meta: { version: installedVersion },
source: 'const current = 1',
})
api.installMarketplacePlugin.mockResolvedValue({
meta: { key: 'demo', name: 'Demo', version: '1.0' },
plugin: { active: false },
})
let finishActivation!: () => void
api.activateTaskPlugin.mockImplementation(
() =>
new Promise<void>((resolve) => {
finishActivation = resolve
})
)
const { onOpenChange } = renderDialog(
true,
undefined,
true,
installedVersion
)
const selector = screen.getByRole('combobox', { name: 'Select version' })
await user.click(selector)
await user.click(
screen.getByRole('option', {
name: installedVersion === '1.0' ? '1.0 · Active version' : '1.0',
})
)
if (installedVersion === '1.0') {
await user.click(screen.getByRole('tab', { name: 'Version differences' }))
}
expect(await screen.findByText('+ const old = 0')).toBeVisible()
expect(
screen.getByText(`Current v${installedVersion} → install v1.0`)
).toBeVisible()
await user.click(screen.getByRole('button', { name: 'Install and enable' }))
await waitFor(() =>
expect(api.activateTaskPlugin).toHaveBeenCalledWith('demo', '1.0')
)
expect(selector).toBeDisabled()
expect(onOpenChange).not.toHaveBeenCalled()
await act(async () => finishActivation())
await waitFor(() => expect(onOpenChange).toHaveBeenCalledWith(false))
}
)
test('a late response for the previous version cannot replace the selected source', async () => {
const user = userEvent.setup()
vi.stubGlobal('crypto', webcrypto)
let finishLatest!: (value: Response) => void
vi.stubGlobal(
'fetch',
vi.fn((url: string) =>
url.endsWith('old.js')
? Promise.resolve(new Response('const old = 0'))
: new Promise<Response>((resolve) => {
finishLatest = resolve
})
)
)
api.installMarketplacePlugin.mockResolvedValue({
meta: { name: 'Demo', version: '1.0' },
plugin: { active: true },
})
const { reopen } = renderDialog(false, undefined, true)
const selector = screen.getByRole('combobox', { name: 'Select version' })
selector.focus()
await user.keyboard('1.0{ArrowDown}{Enter}')
await waitFor(() =>
expect(
screen.getByRole('button', { name: 'Install and enable' })
).toBeEnabled()
)
await act(async () => finishLatest(new Response(source)))
expect(selector).toHaveValue('1.0')
await user.click(screen.getByRole('button', { name: 'Install and enable' }))
expect(api.installMarketplacePlugin).toHaveBeenCalledWith(
expect.objectContaining({
source: 'const old = 0',
remark: 'Official v1.0',
})
)
reopen()
expect(screen.getByRole('combobox', { name: 'Select version' })).toHaveValue(
'1.1 · Latest version'
)
})
test.each(['download', 'hash'])(
'switching versions blocks installation on %s failure',
async (failure) => {
const user = userEvent.setup()
vi.stubGlobal('crypto', webcrypto)
let finishOld!: (value: Response) => void
vi.stubGlobal(
'fetch',
vi.fn((url: string) =>
url.endsWith('old.js')
? new Promise<Response>((resolve) => {
finishOld = resolve
})
: Promise.resolve(new Response(source))
)
)
renderDialog(false, undefined, true)
await waitFor(() =>
expect(
screen.getByRole('button', { name: 'Install and enable' })
).toBeEnabled()
)
await user.click(screen.getByRole('combobox', { name: 'Select version' }))
await user.click(screen.getByRole('option', { name: '1.0' }))
expect(
screen.getByRole('button', { name: 'Install and enable' })
).toBeDisabled()
await act(async () =>
finishOld(
new Response('wrong source', {
status: failure === 'download' ? 500 : 200,
})
)
)
if (failure === 'hash') {
expect(await screen.findByText('Integrity check failed')).toBeVisible()
} else {
expect(
await screen.findByText(/Could not fetch the plugin source/)
).toBeVisible()
}
expect(
screen.getByRole('button', { name: 'Install and enable' })
).toBeDisabled()
}
)
test('activation failure stays open and changing version clears the installation error', async () => {
const user = userEvent.setup()
vi.stubGlobal(
'fetch',
vi.fn(async () => new Response(source))
)
api.installMarketplacePlugin.mockResolvedValue({
meta: { key: 'demo', name: 'Demo', version: '1.1' },
plugin: { active: false },
})
api.activateTaskPlugin.mockRejectedValue(new Error('activation failed'))
const { onOpenChange } = renderDialog(false, undefined, true)
await waitFor(() =>
expect(
screen.getByRole('button', { name: 'Install and enable' })
).toBeEnabled()
)
await user.click(screen.getByRole('button', { name: 'Install and enable' }))
expect(await screen.findByText('activation failed')).toBeVisible()
expect(onOpenChange).not.toHaveBeenCalled()
await user.click(screen.getByRole('combobox', { name: 'Select version' }))
await user.click(screen.getByRole('option', { name: '1.0' }))
expect(screen.queryByText('activation failed')).not.toBeInTheDocument()
})
test('details come first and only choosing a different installed version opens differences', async () => {
const user = userEvent.setup()
vi.stubGlobal(
'fetch',
vi.fn(async () => new Response(source))
)
api.getTaskPlugin.mockResolvedValue({ meta: { version: '1.0' }, source })
renderDialog(true, undefined, true)
const details = screen.getByRole('tab', { name: 'Plugin details' })
const diff = screen.getByRole('tab', { name: 'Version differences' })
expect(screen.getAllByRole('tab')[0]).toBe(details)
expect(details).toHaveAttribute('aria-selected', 'true')
await user.click(screen.getByRole('combobox', { name: 'Select version' }))
await user.click(screen.getByRole('option', { name: '1.0 · Active version' }))
expect(details).toHaveAttribute('aria-selected', 'true')
await user.click(screen.getByRole('combobox', { name: 'Select version' }))
await user.click(screen.getByRole('option', { name: '1.1 · Latest version' }))
expect(diff).toHaveAttribute('aria-selected', 'true')
expect(await screen.findByText('No source changes')).toBeVisible()
expect(
screen.queryByRole('region', { name: 'Supported interfaces' })
).not.toBeInTheDocument()
await user.click(screen.getByRole('combobox', { name: 'Select version' }))
await user.click(screen.getByRole('option', { name: '1.0 · Active version' }))
expect(details).toHaveAttribute('aria-selected', 'true')
})
test('first installation opens plugin details and offers full source without a differences tab', () => {
vi.stubGlobal(
'fetch',
vi.fn(() => new Promise(() => {}))
)
renderDialog()
expect(screen.getByRole('tab', { name: 'Plugin details' })).toHaveAttribute(
'aria-selected',
'true'
)
expect(screen.getByRole('tab', { name: 'Full source' })).toBeVisible()
expect(
screen.queryByRole('tab', { name: 'Version differences' })
).not.toBeInTheDocument()
})
test('a factory plugin uses its built-in source as the diff baseline and installs the selected override', async () => {
const user = userEvent.setup()
vi.stubGlobal('crypto', webcrypto)
vi.stubGlobal(
'fetch',
vi.fn(
async (url: string) =>
new Response(url.endsWith('old.js') ? 'const old = 0' : source)
)
)
api.getTaskPlugin.mockResolvedValue({
layer: 'factory',
meta: { version: '1.1' },
source: 'const factory = 1',
})
api.installMarketplacePlugin.mockResolvedValue({
layer: 'override',
meta: { key: 'demo', name: 'Demo', version: '1.0' },
plugin: { active: true },
})
const { client, onOpenChange } = renderDialog(true, undefined, true, '1.1')
const installed = [
{ meta: { key: 'demo', version: '1.1' }, source: 'factory' },
]
const updated = [
{ meta: { key: 'demo', version: '1.0' }, source: 'override_over_factory' },
]
client.setQueryData(['task-plugins'], installed)
const observer = new QueryObserver(client, {
queryKey: ['task-plugins'],
queryFn: async () => updated,
staleTime: Infinity,
})
const unsubscribe = observer.subscribe(() => {})
expect(screen.getByRole('tab', { name: 'Plugin details' })).toHaveAttribute(
'aria-selected',
'true'
)
await user.click(screen.getByRole('combobox', { name: 'Select version' }))
await user.click(screen.getByRole('option', { name: '1.0' }))
expect(await screen.findByText('- const factory = 1')).toBeVisible()
expect(screen.getByText('+ const old = 0')).toBeVisible()
await user.click(screen.getByRole('button', { name: 'Install and enable' }))
expect(api.installMarketplacePlugin).toHaveBeenCalledWith({
source: 'const old = 0',
sourceSha256: createHash('sha256').update('const old = 0').digest('hex'),
remark: 'Official v1.0',
icon: undefined,
})
await waitFor(() => expect(onOpenChange).toHaveBeenCalledWith(false))
await waitFor(() => expect(observer.getCurrentResult().data).toEqual(updated))
unsubscribe()
})
/*
Copyright (C) 2023-2026 QuantumNous
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { render, waitFor } from '@testing-library/react'
import { afterEach, describe, expect, test, vi } from 'vitest'
import { MarketplacePluginCard } from '../components/marketplace-plugin-card'
import type { MarketplacePlugin } from '../types'
vi.mock('@/lib/lobe-icon', () => ({
getLobeIcon: () => null,
}))
const INDEX_URL =
'https://raw.githubusercontent.com/QuantumNous/new-api-plugins/main/index.json'
function plugin(overrides?: Partial<MarketplacePlugin>): MarketplacePlugin {
return {
key: 'incho',
name: 'Incho',
icon: 'text',
latest: '1.0.1',
versions: [
{ version: '1.0.1', path: 'plugins/tasks/incho/1.0.1/plugin.js' },
],
iconFile: { path: 'plugins/tasks/incho/icon.svg' },
...overrides,
}
}
function renderCard(target: MarketplacePlugin) {
const client = new QueryClient({
defaultOptions: { queries: { retry: false } },
})
return render(
<QueryClientProvider client={client}>
<MarketplacePluginCard
plugin={target}
indexUrl={INDEX_URL}
installState={{ status: 'not_installed' }}
onInstall={() => undefined}
/>
</QueryClientProvider>
)
}
afterEach(() => {
vi.unstubAllGlobals()
})
describe('marketplace card logo', () => {
test('fetches the sidecar icon from the index origin and renders it as a data URI', async () => {
const fetchMock = vi.fn(
async () =>
new Response('<svg/>', {
status: 200,
headers: { 'content-type': 'text/plain; charset=utf-8' },
})
)
vi.stubGlobal('fetch', fetchMock)
const { container } = renderCard(plugin())
await waitFor(() => {
const image = container.querySelector('img')
expect(image?.getAttribute('src')).toBe(
'data:image/svg+xml;base64,PHN2Zy8+'
)
})
expect(fetchMock).toHaveBeenCalledWith(
'https://raw.githubusercontent.com/QuantumNous/new-api-plugins/main/plugins/tasks/incho/icon.svg'
)
})
test('shows the text avatar when the icon file cannot be fetched', async () => {
vi.stubGlobal(
'fetch',
vi.fn(async () => new Response('', { status: 404 }))
)
const { container } = renderCard(plugin())
await waitFor(() => expect(container.textContent).toContain('IN'))
expect(container.querySelector('img')).toBeNull()
})
test('does not fetch anything for a plugin without a sidecar icon', () => {
const fetchMock = vi.fn()
vi.stubGlobal('fetch', fetchMock)
const { container } = renderCard(plugin({ iconFile: undefined }))
expect(fetchMock).not.toHaveBeenCalled()
expect(container.querySelector('img')).toBeNull()
})
})
test.each([{ channelTypes: undefined }, { channelTypes: [] }])(
'shows the generic task channel type when channelTypes is $channelTypes',
({ channelTypes }) => {
const { getByText } = renderCard(
plugin({ iconFile: undefined, channelTypes })
)
expect(getByText('Channel type').nextElementSibling).toHaveTextContent(
'Task Plugin'
)
}
)
......@@ -29,7 +29,6 @@ import {
isStaleFactoryOverride,
marketplaceBuiltInVersion,
parseMarketplaceIndex,
resolveMarketplaceActionPolicy,
resolvePluginSourceUrl,
} from '../lib/marketplace'
import type {
......@@ -365,6 +364,83 @@ describe('marketplace index parsing', () => {
})
assert.equal(index.plugins[0].icon, undefined)
})
test('drops an inline data URI icon so logos only come from sidecar files', () => {
const index = parseMarketplaceIndex({
indexVersion: 1,
plugins: [
{
key: 'sunoapi',
latest: '1.0.0',
icon: 'data:image/png;base64,iVBORw0KGgo=',
versions: [{ version: '1.0.0', path: 'a/plugin.js' }],
},
],
})
assert.equal(index.plugins[0].icon, undefined)
})
test('drops a remote http icon so the marketplace page cannot beacon the author', () => {
const index = parseMarketplaceIndex({
indexVersion: 1,
plugins: [
{
key: 'sunoapi',
latest: '1.0.0',
icon: 'https://evil.example/icon.png',
versions: [{ version: '1.0.0', path: 'a/plugin.js' }],
},
],
})
assert.equal(index.plugins[0].icon, undefined)
})
test('keeps an iconFile entry pointing at an svg or png and drops other extensions', () => {
const index = parseMarketplaceIndex({
indexVersion: 1,
plugins: [
{
key: 'incho',
latest: '1.0.1',
iconFile: { path: ' plugins/tasks/incho/icon.svg ', sha256: 'abc' },
versions: [{ version: '1.0.1', path: 'a/plugin.js' }],
},
{
key: 'other',
latest: '1.0.0',
iconFile: { path: 'plugins/tasks/other/icon.js' },
versions: [{ version: '1.0.0', path: 'b/plugin.js' }],
},
],
})
assert.deepEqual(index.plugins[0].iconFile, {
path: 'plugins/tasks/incho/icon.svg',
sha256: 'abc',
})
assert.equal(index.plugins[1].iconFile, undefined)
})
test('keeps a version baseUrl after trim and omits a blank one', () => {
const index = parseMarketplaceIndex({
indexVersion: 1,
plugins: [
{
key: 'sunoapi',
latest: '1.1.0',
versions: [
{
version: '1.1.0',
path: 'a/plugin.js',
baseUrl: ' http://127.0.0.1:8000 ',
},
{ version: '1.0.0', path: 'b/plugin.js', baseUrl: ' ' },
],
},
],
})
assert.equal(index.plugins[0].versions[0].baseUrl, 'http://127.0.0.1:8000')
assert.equal(index.plugins[0].versions[1].baseUrl, undefined)
})
})
describe('install state derivation', () => {
......@@ -419,41 +495,7 @@ describe('install state derivation', () => {
})
})
describe('marketplace action policy', () => {
test('factory-served plugin returns the informational system-update state', () => {
assert.deepEqual(
resolveMarketplaceActionPolicy(
installedPlugin('doubao', '1.0.0', { source: 'factory' })
),
{ kind: 'system_update' }
)
})
test('overridden factory plugin still allows marketplace install', () => {
assert.deepEqual(
resolveMarketplaceActionPolicy(
installedPlugin('doubao', '1.2.0', {
source: 'override_over_factory',
factory_meta: factoryMeta('doubao', '1.0.0'),
})
),
{ kind: 'install' }
)
})
test('third-party plugin still allows marketplace install', () => {
assert.deepEqual(
resolveMarketplaceActionPolicy(installedPlugin('doubao', '1.0.0')),
{ kind: 'install' }
)
})
test('uninstalled plugin still allows marketplace install', () => {
assert.deepEqual(resolveMarketplaceActionPolicy(undefined), {
kind: 'install',
})
})
describe('marketplace built-in version', () => {
test('factory-served built-in version is the installed meta version', () => {
assert.equal(
marketplaceBuiltInVersion(
......@@ -585,3 +627,72 @@ describe('source integrity and trust labels', () => {
)
})
})
describe('marketplace display metadata', () => {
test('sorts by descending priority and ascending key with zero defaults', () => {
const index = parseMarketplaceIndex({
indexVersion: 1,
plugins: [
marketplacePlugin({ key: 'low', sortPriority: -10 }),
marketplacePlugin({ key: 'zero' }),
marketplacePlugin({ key: 'beta', sortPriority: 20 }),
marketplacePlugin({ key: 'alpha', sortPriority: 20 }),
],
})
assert.deepEqual(
index.plugins.map((plugin) => plugin.key),
['alpha', 'beta', 'zero', 'low']
)
})
test.each([1.5, '2', null, Number.NaN, Infinity, -2147483649, 2147483648])(
'defaults invalid priority %s to zero',
(sortPriority) => {
const index = parseMarketplaceIndex({
indexVersion: 1,
plugins: [{ ...marketplacePlugin(), sortPriority }],
})
assert.equal(index.plugins[0].sortPriority, 0)
}
)
test.each([-2147483648, 0, 2147483647])(
'preserves priority %s',
(sortPriority) => {
const index = parseMarketplaceIndex({
indexVersion: 1,
plugins: [marketplacePlugin({ sortPriority })],
})
assert.equal(index.plugins[0].sortPriority, sortPriority)
}
)
test('preserves HTTPS website paths, queries and fragments', () => {
const website = 'https://example.com/docs?q=1#intro'
const index = parseMarketplaceIndex({
indexVersion: 1,
plugins: [marketplacePlugin({ website })],
})
assert.equal(index.plugins[0].website, website)
})
test.each([
'',
'http://example.com',
'/docs',
'https:///docs',
'https://user:pass@example.com',
'https://@example.com',
'javascript:alert(1)',
'https://-example.com',
'https://example.com:99999',
'https://example.com/a b',
])('hides invalid website %s without dropping the plugin', (website) => {
const index = parseMarketplaceIndex({
indexVersion: 1,
plugins: [marketplacePlugin({ website })],
})
assert.equal(index.plugins.length, 1)
assert.equal(index.plugins[0].website, undefined)
})
})
......@@ -22,8 +22,10 @@ import {
type ColumnDef,
} from '@tanstack/react-table'
import { render, screen } from '@testing-library/react'
import userEvent from '@testing-library/user-event'
import { describe, expect, test, vi } from 'vitest'
import { MarketplacePluginCard } from '../components/marketplace-plugin-card'
import { PluginCard } from '../components/plugin-card'
import type { TaskPluginListItem } from '../types'
......@@ -78,23 +80,21 @@ function PluginCardHarness({ item }: { item: TaskPluginListItem }) {
}
describe('PluginCard layout', () => {
test('given a plugin, the versions read as pills beside the source and runtime badges', () => {
test('given a plugin, the plugin version reads as a pill beside the source and runtime badges', () => {
render(<PluginCardHarness item={makeItem()} />)
const version = screen.getByText('v1.2.3')
const apiVersion = screen.getByText('API v1')
const badgeRow = version.parentElement
expect(badgeRow).toBe(apiVersion.parentElement)
expect(screen.queryByText('API v1')).not.toBeInTheDocument()
expect(badgeRow).toHaveClass('flex-wrap')
expect(badgeRow?.textContent).toContain('source-badge')
expect(badgeRow?.textContent).toContain('runtime-badge')
})
test('given a plugin, the version pills carry labelled accessible names', () => {
test('given a plugin, the plugin version carries a labelled accessible name', () => {
render(<PluginCardHarness item={makeItem()} />)
expect(screen.getByLabelText('Active version 1.2.3')).toBeInTheDocument()
expect(screen.getByLabelText('API version v1')).toBeInTheDocument()
})
test('given a description, it is clamped to two lines', () => {
......@@ -160,3 +160,55 @@ describe('PluginCard layout', () => {
expect(screen.getByText('enabled-switch')).toBeInTheDocument()
})
})
describe('PluginCard website', () => {
test('shows an HTTPS website with safe new-tab attributes', () => {
const item = makeItem()
item.meta.website = 'https://example.com/docs'
render(<PluginCardHarness item={item} />)
const link = screen.getByRole('link', { name: 'Plugin website' })
expect(link).toHaveAttribute('href', item.meta.website)
expect(link).toHaveAttribute('target', '_blank')
expect(link).toHaveAttribute('rel', 'noopener noreferrer')
})
test.each([undefined, 'http://example.com', 'javascript:alert(1)'])(
'hides website %s',
(website) => {
const item = makeItem()
item.meta.website = website
render(<PluginCardHarness item={item} />)
expect(
screen.queryByRole('link', { name: 'Plugin website' })
).not.toBeInTheDocument()
}
)
})
test.each(['override', 'factory', 'override_over_factory'] as const)(
'marketplace entry for %s offers installation',
async (source) => {
const user = userEvent.setup()
const onInstall = vi.fn()
render(
<MarketplacePluginCard
plugin={{
key: 'kling',
name: 'Kling',
latest: '1.2.3',
versions: [{ version: '1.2.3', path: 'plugin.js' }],
}}
installed={makeItem({ source })}
installState={{ status: 'up_to_date', installedVersion: '1.2.3' }}
onInstall={onInstall}
/>
)
expect(
screen.queryByRole('button', { name: 'Select version' })
).not.toBeInTheDocument()
await user.click(screen.getByRole('button', { name: 'Install' }))
expect(onInstall).toHaveBeenCalledOnce()
expect(
screen.queryByText('Updates with the system')
).not.toBeInTheDocument()
}
)
......@@ -17,8 +17,12 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { render, screen } from '@testing-library/react'
import { afterEach, describe, expect, test } from 'vitest'
import { act, render, screen, waitFor, within } from '@testing-library/react'
import userEvent from '@testing-library/user-event'
import { useState } from 'react'
import { afterEach, describe, expect, test, vi } from 'vitest'
import { api } from '@/lib/api'
import { PluginDetailSheet } from '../components/plugin-detail-sheet'
import type {
......@@ -66,11 +70,12 @@ function renderSheet(metaOverrides: Partial<TaskPluginMeta>) {
queryClient.setQueryData(['task-plugin', item.meta.key], detail)
queryClient.setQueryData(['task-plugin-versions', item.meta.key], [])
queryClients.push(queryClient)
render(
const view = render(
<QueryClientProvider client={queryClient}>
<PluginDetailSheet plugin={item} onOpenChange={() => undefined} />
</QueryClientProvider>
)
return { ...view, queryClient, item, detail }
}
/**
......@@ -96,8 +101,10 @@ describe('PluginDetailSheet metadata fields', () => {
// 'Actions' remains a column header in the version-history table, so the
// removed metadata row is asserted through the metadata card's own list.
const models = await screen.findByText('Models')
const metadataList = models.closest('dl')
const region = await screen.findByRole('region', {
name: 'Plugin metadata',
})
const metadataList = region.querySelector('dl')
expect(metadataList).not.toBeNull()
expect(metadataList?.textContent).not.toContain('Actions')
})
......@@ -105,9 +112,10 @@ describe('PluginDetailSheet metadata fields', () => {
test('given a plugin with several models, the models value renders as one wrapping list', async () => {
renderSheet({ models: ['kling-v1', 'kling-v1-6', 'kling-v2-master'] })
expect(
await screen.findByText('kling-v1, kling-v1-6, kling-v2-master')
).toBeInTheDocument()
const models = await screen.findByRole('region', { name: 'Models' })
for (const name of ['kling-v1', 'kling-v1-6', 'kling-v2-master']) {
expect(within(models).getByText(name)).toBeVisible()
}
})
})
......@@ -188,8 +196,13 @@ describe('PluginDetailSheet host protocol endpoints', () => {
protocols: [{ name: 'openai_video', models: ['kling-v1'] }],
})
const hint = await screen.findByText('Model scope')
expect(hint).toHaveAttribute('title', 'kling-v1')
const user = userEvent.setup()
const hint = await screen.findByRole('button', { name: 'Model scope' })
hint.focus()
await user.keyboard('{Enter}')
const scope = screen.getByRole('dialog', { name: 'Model scope' })
expect(within(scope).getByText('kling-v1')).toBeVisible()
expect(within(scope).queryByText('kling-v2-master')).toBeNull()
})
test('given a claim binding every model, no model scope marker is rendered', async () => {
......@@ -217,7 +230,9 @@ describe('PluginDetailSheet native routes', () => {
],
})
expect(await screen.findByText('Native routes')).toBeInTheDocument()
expect(
await screen.findByText('Plugin-defined interfaces')
).toBeInTheDocument()
const submitRow = endpointRow('/kling/v1/videos/text2video')
expect(submitRow.textContent).toContain('POST')
expect(submitRow.textContent).toContain('submit')
......@@ -230,10 +245,306 @@ describe('PluginDetailSheet native routes', () => {
renderSheet({ protocols: [], routes: [] })
expect(await screen.findByText('Endpoints')).toBeInTheDocument()
expect(screen.queryByText('Native routes')).toBeNull()
const placeholders = screen
.getAllByText('—')
.filter((node) => node.tagName === 'P')
expect(placeholders).toHaveLength(1)
expect(screen.queryByText('Plugin-defined interfaces')).toBeNull()
expect(
within(screen.getByRole('region', { name: 'Endpoints' })).getByText(
'Not declared'
)
).toBeVisible()
})
})
test('shows the plugin sort priority and HTTPS website in details', async () => {
renderSheet({ sortPriority: 42, website: 'https://example.com/plugin' })
expect(await screen.findByText('Sort priority')).toBeInTheDocument()
expect(screen.getByText('42')).toBeInTheDocument()
expect(screen.getByRole('link', { name: 'Plugin website' })).toHaveAttribute(
'href',
'https://example.com/plugin'
)
})
test('defaults to overview and switches tabs with the keyboard', async () => {
const user = userEvent.setup()
renderSheet({})
const overview = screen.getByRole('tab', { name: 'Overview' })
expect(overview).toHaveAttribute('aria-selected', 'true')
await user.click(overview)
await user.keyboard('{ArrowRight}')
await waitFor(() =>
expect(
screen.getByRole('tab', { name: 'Billing parameters' })
).toHaveFocus()
)
await user.keyboard('{Enter}')
expect(
screen.getByRole('tab', { name: 'Billing parameters' })
).toHaveAttribute('aria-selected', 'true')
await waitFor(() =>
expect(screen.getByText('No billing parameters declared')).toBeVisible()
)
expect(screen.queryByRole('region', { name: 'Models' })).toBeNull()
await user.click(screen.getByRole('tab', { name: 'Plugin source' }))
await waitFor(() =>
expect(screen.getByText('No source available')).toBeVisible()
)
await user.click(screen.getByRole('tab', { name: 'Version history' }))
await waitFor(() =>
expect(screen.getByText('No version history')).toBeVisible()
)
})
test('copies model names with newlines and copies original URL, key and endpoint path', async () => {
const user = userEvent.setup()
const clipboard = vi
.spyOn(navigator.clipboard, 'writeText')
.mockResolvedValue()
renderSheet({
models: ['a', 'b'],
baseUrl: 'http://localhost:3000',
protocols: ['openai_video'],
})
await user.click(screen.getByRole('button', { name: 'Copy all models' }))
expect(clipboard).toHaveBeenLastCalledWith('a\nb')
await user.click(screen.getByRole('button', { name: 'Copy base URL' }))
expect(clipboard).toHaveBeenLastCalledWith('http://localhost:3000')
await user.click(screen.getByRole('button', { name: 'Copy plugin key' }))
expect(clipboard).toHaveBeenLastCalledWith('kling')
await user.click(
within(endpointRow('/v1/videos/{task_id}')).getByRole('button', {
name: 'Copy endpoint path',
})
)
expect(clipboard).toHaveBeenLastCalledWith('/v1/videos/{task_id}')
})
test('mounts sandbox on first visit and preserves input when switching tabs', async () => {
const createRange = document.createRange.bind(document)
vi.spyOn(document, 'createRange').mockImplementation(() => {
const range = createRange()
Object.defineProperties(range, {
getBoundingClientRect: { value: () => new DOMRect() },
getClientRects: { value: () => Object.assign([], { item: () => null }) },
})
return range
})
const user = userEvent.setup()
renderSheet({})
expect(
screen.queryByRole('textbox', { name: 'Arguments JSON', hidden: true })
).toBeNull()
await user.click(screen.getByRole('tab', { name: 'Plugin sandbox' }))
const editor = screen.getByRole('textbox', { name: 'Arguments JSON' })
const editable = editor.querySelector<HTMLElement>('[contenteditable=true]')
if (!editable) throw new Error('Missing editable sandbox input')
act(() => editable.focus())
await user.paste('42')
expect(editor).toHaveTextContent('42')
await user.click(screen.getByRole('tab', { name: 'Overview' }))
expect(editor).not.toBeVisible()
await user.click(screen.getByRole('tab', { name: 'Plugin sandbox' }))
expect(
screen.getByRole('textbox', { name: 'Arguments JSON' })
).toHaveTextContent('42')
})
test('closing and reopening resets navigation and restores focus to the opener', async () => {
const user = userEvent.setup()
const fixture = renderSheet({})
fixture.unmount()
function Harness() {
const [open, setOpen] = useState(false)
return (
<>
<button type='button' onClick={() => setOpen(true)}>
Open plugin
</button>
<PluginDetailSheet
plugin={open ? fixture.item : null}
onOpenChange={setOpen}
/>
</>
)
}
render(
<QueryClientProvider client={fixture.queryClient}>
<Harness />
</QueryClientProvider>
)
const opener = screen.getByRole('button', { name: 'Open plugin' })
await user.click(opener)
await user.click(screen.getByRole('tab', { name: 'Plugin source' }))
await user.keyboard('{Escape}')
expect(opener).toHaveFocus()
await user.click(opener)
expect(screen.getByRole('tab', { name: 'Overview' })).toHaveAttribute(
'aria-selected',
'true'
)
})
test('detail loading and failure show feedback and retry recovers the overview', async () => {
const fixture = renderSheet({})
fixture.unmount()
fixture.queryClient.removeQueries({ queryKey: ['task-plugin', 'kling'] })
let rejectRequest!: (reason: Error) => void
const request = vi.spyOn(api, 'get').mockImplementationOnce(
() =>
new Promise((_resolve, reject) => {
rejectRequest = reject
})
)
render(
<QueryClientProvider client={fixture.queryClient}>
<PluginDetailSheet plugin={fixture.item} onOpenChange={() => undefined} />
</QueryClientProvider>
)
expect(screen.getByText('Loading...')).toBeVisible()
await act(async () => rejectRequest(new Error('Detail unavailable')))
await waitFor(() =>
expect(screen.getByText('Detail unavailable')).toBeVisible()
)
request.mockResolvedValueOnce({
data: { success: true, data: fixture.detail },
})
await userEvent.setup().click(screen.getByRole('button', { name: 'Retry' }))
expect(await screen.findByRole('region', { name: 'Models' })).toBeVisible()
})
test('keeps header and navigation outside the scrolling content with long metadata', async () => {
renderSheet({
models: ['very-long-model-name-'.repeat(20)],
routes: [
{ method: 'GET', path: '/very-long-path/'.repeat(20), type: 'query' },
],
})
const panel = screen.getByRole('tabpanel', { name: 'Overview' })
expect(panel).toHaveClass('min-h-0', 'overflow-y-auto')
expect(panel).not.toContainElement(screen.getByRole('tablist'))
expect(panel).not.toContainElement(screen.getByRole('heading', { level: 2 }))
expect(screen.getByText('very-long-model-name-'.repeat(20))).toHaveClass(
'break-all',
'h-auto'
)
expect(screen.getByText('/very-long-path/'.repeat(20))).toHaveClass(
'break-all'
)
})
test('version loading and failure allow retry without hiding the overview', async () => {
const user = userEvent.setup()
const fixture = renderSheet({})
fixture.unmount()
fixture.queryClient.removeQueries({ queryKey: ['task-plugin-versions'] })
let rejectRequest!: (reason: Error) => void
const request = vi.spyOn(api, 'get').mockImplementationOnce(
() =>
new Promise((_resolve, reject) => {
rejectRequest = reject
})
)
render(
<QueryClientProvider client={fixture.queryClient}>
<PluginDetailSheet plugin={fixture.item} onOpenChange={() => undefined} />
</QueryClientProvider>
)
expect(screen.getByRole('region', { name: 'Models' })).toBeVisible()
await user.click(screen.getByRole('tab', { name: 'Version history' }))
expect(screen.getByText('Loading...')).toBeVisible()
await act(async () => rejectRequest(new Error('Versions unavailable')))
await waitFor(() =>
expect(screen.getByText('Versions unavailable')).toBeVisible()
)
request.mockResolvedValueOnce({ data: { success: true, data: [] } })
await user.click(screen.getByRole('button', { name: 'Retry' }))
await waitFor(() =>
expect(screen.getByText('No version history')).toBeVisible()
)
})
test('switching plugins returns to overview and never carries the previous comparison', async () => {
const user = userEvent.setup()
const fixture = renderSheet({})
const nextItem = {
...fixture.item,
meta: { ...fixture.item.meta, key: 'next', name: 'Next plugin' },
}
fixture.queryClient.setQueryData(['task-plugin', 'next'], {
...fixture.detail,
meta: nextItem.meta,
})
fixture.queryClient.setQueryData(['task-plugin-versions', 'next'], [])
await user.click(screen.getByRole('tab', { name: 'Source diff' }))
fixture.rerender(
<QueryClientProvider client={fixture.queryClient}>
<PluginDetailSheet plugin={nextItem} onOpenChange={() => undefined} />
</QueryClientProvider>
)
expect(screen.getByRole('tab', { name: 'Overview' })).toHaveAttribute(
'aria-selected',
'true'
)
expect(screen.getByRole('heading', { level: 2 })).toHaveTextContent(
'Next plugin'
)
})
test('comparison selection shows loading, retries failure, and resets after reopening', async () => {
const user = userEvent.setup()
const fixture = renderSheet({})
await act(async () => {
fixture.queryClient.setQueryData(
['task-plugin-versions', 'kling'],
[
{ id: 1, version: '1.2.3', active: true },
{ id: 2, version: '1.0.0', active: false },
]
)
})
let rejectRequest!: (reason: Error) => void
const request = vi.spyOn(api, 'get').mockImplementationOnce(
() =>
new Promise((_resolve, reject) => {
rejectRequest = reject
})
)
await user.click(screen.getByRole('tab', { name: 'Source diff' }))
const selector = screen.getByRole('combobox', {
name: 'Select a version to compare',
})
expect(selector).toHaveValue('')
await user.click(selector)
await user.click(await screen.findByRole('option', { name: '1.0.0' }))
expect(screen.getByText('Loading...')).toBeVisible()
await act(async () => rejectRequest(new Error('Comparison unavailable')))
await waitFor(() =>
expect(screen.getByText('Comparison unavailable')).toBeVisible()
)
request.mockResolvedValueOnce({
data: {
success: true,
data: { ...fixture.detail, source: 'previous source' },
},
})
await user.click(screen.getByRole('button', { name: 'Retry' }))
expect(await screen.findByText(/previous source/)).toBeVisible()
fixture.rerender(
<QueryClientProvider client={fixture.queryClient}>
<PluginDetailSheet plugin={null} onOpenChange={() => undefined} />
</QueryClientProvider>
)
fixture.rerender(
<QueryClientProvider client={fixture.queryClient}>
<PluginDetailSheet plugin={fixture.item} onOpenChange={() => undefined} />
</QueryClientProvider>
)
expect(screen.getByRole('tab', { name: 'Overview' })).toHaveAttribute(
'aria-selected',
'true'
)
await user.click(screen.getByRole('tab', { name: 'Source diff' }))
expect(
screen.getByRole('combobox', { name: 'Select a version to compare' })
).toHaveValue('')
expect(screen.queryByText(/previous source/)).toBeNull()
})
/*
Copyright (C) 2023-2026 QuantumNous
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import assert from 'node:assert/strict'
import { describe, test } from 'vitest'
import {
encodePluginIconFile,
fetchPluginIconDataUri,
MAX_PLUGIN_ICON_BYTES,
PluginIconFileError,
pluginIconMediaType,
} from '../lib/plugin-icon-file'
describe('pluginIconMediaType', () => {
test('maps svg and png extensions case-insensitively and rejects everything else', () => {
assert.equal(pluginIconMediaType('icon.svg'), 'image/svg+xml')
assert.equal(pluginIconMediaType('ICON.PNG'), 'image/png')
assert.equal(pluginIconMediaType('icon.jpg'), null)
assert.equal(pluginIconMediaType('plugin.js'), null)
})
})
describe('encodePluginIconFile', () => {
test('encodes an svg file as the data URI the gateway stores', async () => {
const file = new File(['<svg/>'], 'icon.svg', { type: '' })
assert.equal(
await encodePluginIconFile(file),
'data:image/svg+xml;base64,PHN2Zy8+'
)
})
test('rejects a file that is not svg or png', async () => {
const file = new File(['x'], 'icon.gif', { type: 'image/gif' })
await assert.rejects(encodePluginIconFile(file), (error: unknown) => {
assert.ok(error instanceof PluginIconFileError)
assert.equal(error.reason, 'unsupported_type')
return true
})
})
test('rejects a file over the size cap before reading it', async () => {
const file = new File(
[new Uint8Array(MAX_PLUGIN_ICON_BYTES + 1)],
'icon.png'
)
await assert.rejects(encodePluginIconFile(file), (error: unknown) => {
assert.ok(error instanceof PluginIconFileError)
assert.equal(error.reason, 'too_large')
return true
})
})
})
describe('fetchPluginIconDataUri', () => {
const okResponse = (body: string) =>
new Response(body, {
status: 200,
headers: { 'content-type': 'image/svg+xml' },
})
test('returns a data URI for a reachable svg even when the host labels it text/plain', async () => {
const result = await fetchPluginIconDataUri(
'https://raw.example/plugins/tasks/incho/icon.svg',
{
fetchImpl: async () =>
new Response('<svg/>', {
status: 200,
headers: {
'content-type': 'text/plain; charset=utf-8',
'x-content-type-options': 'nosniff',
},
}),
}
)
assert.equal(result, 'data:image/svg+xml;base64,PHN2Zy8+')
})
test('keeps the logo when the index digest matches and drops it on a mismatch', async () => {
const url = 'https://raw.example/plugins/tasks/incho/icon.svg'
assert.equal(
await fetchPluginIconDataUri(url, {
sha256:
'd4dc56669143034f31aa309635d4113d9ad76a02b1739da22c965ed2049be9e6',
fetchImpl: async () => okResponse('<svg/>'),
}),
'data:image/svg+xml;base64,PHN2Zy8+'
)
assert.equal(
await fetchPluginIconDataUri(url, {
sha256: 'deadbeef',
fetchImpl: async () => okResponse('<svg/>'),
}),
null
)
})
test('returns null for a non-image path, a failed response, or a network error', async () => {
assert.equal(
await fetchPluginIconDataUri('https://raw.example/icon.js', {
fetchImpl: async () => okResponse('x'),
}),
null
)
assert.equal(
await fetchPluginIconDataUri('https://raw.example/icon.svg', {
fetchImpl: async () => new Response('', { status: 404 }),
}),
null
)
assert.equal(
await fetchPluginIconDataUri('https://raw.example/icon.svg', {
fetchImpl: async () => {
throw new TypeError('offline')
},
}),
null
)
})
})
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { cleanup, fireEvent, render, waitFor } from '@testing-library/react'
import { AxiosError, type AxiosAdapter } from 'axios'
/*
Copyright (C) 2023-2026 QuantumNous
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import { StrictMode } from 'react'
import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest'
import { TaskPluginChannelBadge } from '@/features/channels/components/channel-type-badge'
import { api } from '@/lib/api'
import { ROLE } from '@/lib/roles'
import { useAuthStore } from '@/stores/auth-store'
import { PluginIcon } from '../components/plugin-icon'
vi.mock('@/lib/lobe-icon', () => ({
getLobeIcon: () => <svg data-testid='lobe-icon' />,
}))
const originalAdapter = api.defaults.adapter
const originalAuth = useAuthStore.getState().auth
const logo = new Blob(['<svg xmlns="http://www.w3.org/2000/svg"/>'], {
type: 'image/svg+xml',
})
const createObjectURL = vi.fn(() => 'blob:plugin-logo')
const revokeObjectURL = vi.fn()
let client: QueryClient
let adapter: ReturnType<typeof vi.fn<AxiosAdapter>>
beforeEach(() => {
client = new QueryClient({ defaultOptions: { queries: { retry: false } } })
createObjectURL.mockClear()
revokeObjectURL.mockClear()
vi.stubGlobal(
'URL',
Object.assign(class extends URL {}, { createObjectURL, revokeObjectURL })
)
useAuthStore.setState({
auth: { ...originalAuth, accessToken: 'test-icon-access-token' },
})
adapter = vi.fn(async (config) => ({
data: logo,
status: 200,
statusText: 'OK',
headers: {},
config,
}))
api.defaults.adapter = adapter
})
afterEach(() => {
cleanup()
client.clear()
api.defaults.adapter = originalAdapter
useAuthStore.setState({ auth: originalAuth })
vi.unstubAllGlobals()
})
function GatewayLogo(props: { pluginKey?: string }) {
return (
<QueryClientProvider client={client}>
<PluginIcon
plugin={{
key: props.pluginKey ?? 'incho',
name: props.pluginKey ?? 'Incho',
hasIcon: true,
}}
size={24}
/>
</QueryClientProvider>
)
}
describe('PluginIcon image rendering', () => {
test('loads the plugin logo on first channel render with an empty cache in StrictMode', async () => {
useAuthStore.setState({
auth: {
...useAuthStore.getState().auth,
user: { id: 1, username: 'root', role: ROLE.SUPER_ADMIN },
},
})
adapter.mockImplementation(async (config) => ({
data:
config.url === '/api/task_plugin_options'
? {
success: true,
data: [
{ key: 'incho', name: 'Incho', hasIcon: true, models: [] },
],
}
: logo,
status: 200,
statusText: 'OK',
headers: {},
config,
}))
const { container } = render(
<StrictMode>
<QueryClientProvider client={client}>
<TaskPluginChannelBadge pluginKey='incho' />
</QueryClientProvider>
</StrictMode>
)
await waitFor(() =>
expect(container.querySelector('img')?.getAttribute('src')).toBe(
'blob:plugin-logo'
)
)
expect(container.textContent).toContain('Incho')
expect(createObjectURL).toHaveBeenCalledWith(logo)
})
test('fetches protected logos with the dashboard bearer header and renders a blob image', async () => {
const { container, unmount } = render(<GatewayLogo />)
await waitFor(() =>
expect(container.querySelector('img')?.getAttribute('src')).toBe(
'blob:plugin-logo'
)
)
expect(adapter).toHaveBeenCalledTimes(1)
const config = adapter.mock.calls[0][0]
expect(config.url).toBe('/api/plugin/task/incho/icon')
expect(config.headers.get('Authorization')).toBe(
'Bearer test-icon-access-token'
)
expect(config.responseType).toBe('blob')
expect(createObjectURL).toHaveBeenCalledWith(logo)
expect(container.querySelector('img')?.getAttribute('width')).toBe('24')
expect(container.querySelector('svg')).toBeNull()
unmount()
expect(revokeObjectURL).toHaveBeenCalledWith('blob:plugin-logo')
})
test.each(['failure', 'non-image'])(
'keeps the avatar for %s responses',
async (outcome) => {
adapter.mockImplementationOnce(async (config) => {
if (outcome === 'failure') {
throw new AxiosError('missing logo', undefined, config)
}
return {
data: new Blob(['{}'], { type: 'application/json' }),
status: 200,
statusText: 'OK',
headers: {},
config,
}
})
const { container } = render(<GatewayLogo />)
await waitFor(() => expect(client.isFetching()).toBe(0))
expect(container.querySelector('img')).toBeNull()
expect(container.textContent).toBe('IN')
expect(createObjectURL).not.toHaveBeenCalled()
}
)
test('removes the previous plugin logo while a different plugin loads', async () => {
const { container, rerender } = render(<GatewayLogo />)
await waitFor(() => expect(container.querySelector('img')).not.toBeNull())
adapter.mockImplementationOnce(() => new Promise(() => {}))
rerender(<GatewayLogo pluginKey='second' />)
expect(container.querySelector('img')).toBeNull()
expect(container.textContent).toBe('SE')
await waitFor(() =>
expect(revokeObjectURL).toHaveBeenCalledWith('blob:plugin-logo')
)
})
test('falls back to text instead of a channel brand when an image cannot be decoded', async () => {
const { container } = render(
<PluginIcon
plugin={{
key: 'sunoapi',
name: 'SunoAPI',
channelTypes: [36],
iconSrc: 'https://example.com/broken.svg',
}}
/>
)
await waitFor(() => expect(container.querySelector('img')).not.toBeNull())
fireEvent.error(container.querySelector('img') as HTMLImageElement)
expect(container.querySelector('img')).toBeNull()
expect(container.textContent).toBe('SU')
})
test('uses public marketplace images directly without authenticated requests', () => {
const { container } = render(
<PluginIcon
plugin={{
key: 'incho',
hasIcon: true,
iconSrc: 'https://example.com/icon.svg',
}}
/>
)
expect(container.querySelector('img')?.getAttribute('src')).toBe(
'https://example.com/icon.svg'
)
expect(adapter).not.toHaveBeenCalled()
})
test('ignores inline manifest images and still supports LobeHub icons', () => {
const { container, rerender, getByTestId } = render(
<PluginIcon
plugin={{ key: 'sunoapi', icon: 'data:image/png;base64,iVBORw0KGgo=' }}
/>
)
expect(container.querySelector('img')).toBeNull()
expect(container.textContent).toBe('SU')
rerender(<PluginIcon plugin={{ key: 'sora', icon: 'Sora.Color' }} />)
expect(getByTestId('lobe-icon')).toBeTruthy()
})
})
......@@ -17,9 +17,11 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import assert from 'node:assert/strict'
import { describe, test } from 'vitest'
import {
pluginIconUrl,
resolvePluginIcon,
TEXT_AVATAR_PALETTE,
textAvatarClass,
......@@ -37,13 +39,14 @@ describe('resolvePluginIcon', () => {
)
})
test('uses the first channel type when icon is absent', () => {
test('uses a text avatar when icon is absent even with a declared channel type', () => {
assert.deepEqual(
resolvePluginIcon({
channelTypes: [55, 1],
key: 'sora',
channelTypes: [36],
key: 'sunoapi',
name: 'SunoAPI',
}),
{ kind: 'lobe', name: 'OpenAI.Color' }
{ kind: 'text', label: 'SU', colorSeed: 'sunoapi' }
)
})
......@@ -89,6 +92,62 @@ describe('resolvePluginIcon', () => {
})
})
describe('resolvePluginIcon image logos', () => {
test('serves a gateway-held sidecar logo through the icon endpoint, ahead of meta.icon and channelTypes', () => {
assert.deepEqual(
resolvePluginIcon({
icon: 'Sora.Color',
channelTypes: [1],
key: 'in cho',
hasIcon: true,
}),
{ kind: 'image', src: '/api/plugin/task/in%20cho/icon' }
)
})
test('prefers an explicit image source over the gateway endpoint', () => {
assert.deepEqual(
resolvePluginIcon({
key: 'incho',
hasIcon: true,
iconSrc: 'https://raw.example/plugins/tasks/incho/icon.svg',
}),
{ kind: 'image', src: 'https://raw.example/plugins/tasks/incho/icon.svg' }
)
})
test('ignores an inline data URI in meta.icon and falls back to the text avatar', () => {
assert.deepEqual(
resolvePluginIcon({
icon: 'data:image/png;base64,iVBORw0KGgo=',
channelTypes: [1],
key: 'x',
}),
{ kind: 'text', label: 'X', colorSeed: 'x' }
)
})
test('ignores a remote URL in meta.icon and falls back to the text avatar', () => {
assert.deepEqual(
resolvePluginIcon({
icon: 'https://evil.example/icon.png',
key: 'x',
name: 'Suno',
}),
{ kind: 'text', label: 'SU', colorSeed: 'x' }
)
})
})
describe('pluginIconUrl', () => {
test('pins a version through the query string', () => {
assert.equal(
pluginIconUrl('incho', '1.0.1'),
'/api/plugin/task/incho/icon?version=1.0.1'
)
})
})
describe('textAvatarClass', () => {
test('is deterministic for the same seed', () => {
assert.equal(textAvatarClass('sunoapi'), textAvatarClass('sunoapi'))
......
/*
Copyright (C) 2023-2026 QuantumNous
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import { describe, expect, test, vi } from 'vitest'
import { parseMarketplaceIndex } from '../lib/marketplace'
import {
parsePluginMetaPreview,
resolvePluginMetaPreview,
} from '../lib/plugin-meta-preview'
import type { MarketplacePlugin } from '../types'
const inchoMeta = `export const meta = {
apiVersion: 1, key: "incho", name: "Incho", version: "1.0.1",
models: ["incho_music"],
baseUrl: "https://open.yinchaoyongxian.com",
protocols: [{name: "openai_responses", supports: ["stream", "sync", "background"]}],
routes: [
{method: "POST", path: "/incho/submit/:action", type: "submit", decode: "decodeSubmit"},
{method: "GET", path: "/incho/fetch/:task_id", type: "query"},
],
};`
const plugin: MarketplacePlugin = {
key: 'incho',
name: 'Incho',
latest: '1.0.1',
versions: [
{ version: '1.0.1', path: 'new.js' },
{ version: '1.0.0', path: 'old.js', baseUrl: 'https://old.example.com' },
],
models: ['latest-model'],
protocols: ['openai_video'],
channelTypes: [61],
}
test('reads the selected Incho models, protocols and both native routes without requiring runtime hooks', () => {
const preview = parsePluginMetaPreview(inchoMeta)
expect(preview.status).toBe('parsed')
expect(preview.fields.models).toEqual({
state: 'value',
origin: 'source',
value: ['incho_music'],
})
expect(preview.fields.protocols).toEqual({
state: 'value',
origin: 'source',
value: [
{ name: 'openai_responses', supports: ['stream', 'sync', 'background'] },
],
})
expect(preview.fields.routes).toEqual({
state: 'value',
origin: 'source',
value: [
{ method: 'POST', path: '/incho/submit/:action', type: 'submit' },
{ method: 'GET', path: '/incho/fetch/:task_id', type: 'query' },
],
})
expect(preview.fields.allowedHosts).toEqual({
state: 'missing',
origin: 'source',
})
expect(preview.fields.auth).toEqual({ state: 'missing', origin: 'source' })
})
test('supports comments, trailing commas, quoted keys and JavaScript string escapes', () => {
const preview =
parsePluginMetaPreview(String.raw`export const /* declaration */ meta /* name */ = /* value */ {
"models": [/* model */ '\x69ncho_\u006dusic', 'line\nquote\'slash\\',],
baseUrl: "https://example.com/\u{1F3B5}",
auth: {type: 'api_key'}, channelTypes: [+61, 0x18],
};`)
expect(preview.status).toBe('parsed')
expect(preview.fields.models).toEqual({
state: 'value',
origin: 'source',
value: ['incho_music', "line\nquote'slash\\"],
})
expect(preview.fields.baseUrl).toEqual({
state: 'value',
origin: 'source',
value: 'https://example.com/🎵',
})
expect(preview.fields.auth).toEqual({
state: 'value',
origin: 'source',
value: 'api_key',
})
expect(preview.fields.channelTypes).toEqual({
state: 'value',
origin: 'source',
value: [61, 24],
})
})
describe('unreadable declarations never produce partial lists or execute code', () => {
test.each([
'export const meta = { ...external, models: ["m"] };',
'export const meta = { models: ["m"], [key]: [] };',
'export const meta = makeMeta();',
'export const meta = { models: ["m"] }; meta.models.push("changed");',
'export const meta = { models: ["m"] }; mutate(meta);',
'export const meta = { models: ["m"] ',
'const meta = { models: ["m"] }; export {meta};',
])('keeps every field unknown for %s', (source) => {
const preview = parsePluginMetaPreview(source)
expect(preview.status).toBe('unavailable')
expect(
Object.values(preview.fields).every((field) => field.state === 'unknown')
).toBe(true)
})
test.each([
'routes: [{method: "GET", path: "/a", type: "query"}, other]',
'routes: [{method: "GET", path: "/a", type: "query", ...overrides}]',
'routes: [{method: "GET", path: "/a", type: "unsupported"}]',
'routes: [], routes: []',
'get routes() { throw new Error("must not execute") }',
'routes: [,]',
])('marks only the affected field unknown for %s', (declaration) => {
const preview = parsePluginMetaPreview(
`export const meta = {models: ['m'], ${declaration}};`
)
expect(preview.status).toBe('partial')
expect(preview.fields.routes).toEqual({ state: 'unknown' })
expect(preview.fields.models).toEqual({
state: 'value',
origin: 'source',
value: ['m'],
})
})
test('does not invoke a metadata expression or top-level plugin statement', () => {
const probe = vi.fn()
vi.stubGlobal('previewProbe', probe)
try {
const preview = parsePluginMetaPreview(
'previewProbe(); export const meta = {models: ["m"], routes: previewProbe()};'
)
expect(preview.status).toBe('partial')
expect(probe).not.toHaveBeenCalled()
} finally {
vi.unstubAllGlobals()
}
})
})
test('keeps source omissions and empty arrays distinct and does not overwrite them with index values', () => {
const source = parsePluginMetaPreview(
'export const meta = {models: [], allowedHosts: []};'
)
const resolved = resolvePluginMetaPreview(plugin, plugin.versions[0], source)
expect(resolved.models).toEqual({
state: 'value',
origin: 'source',
value: [],
})
expect(resolved.allowedHosts).toEqual({
state: 'value',
origin: 'source',
value: [],
})
expect(resolved.protocols).toEqual({ state: 'missing', origin: 'source' })
})
test('only uses plugin-level index hints for the latest version and marks fallback provenance', () => {
const source = parsePluginMetaPreview('export const meta = buildMeta();')
const latest = resolvePluginMetaPreview(plugin, plugin.versions[0], source)
expect(latest.protocols).toEqual({
state: 'value',
origin: 'index',
value: ['openai_video'],
})
const older = resolvePluginMetaPreview(plugin, plugin.versions[1], source)
expect(older.models.state).toBe('unknown')
expect(older.protocols.state).toBe('unknown')
expect(older.channelTypes.state).toBe('unknown')
expect(older.baseUrl).toEqual({
state: 'value',
origin: 'index',
value: 'https://old.example.com',
})
})
test('preserves valid protocol declarations and empty model lists from the marketplace index', () => {
const index = parseMarketplaceIndex({
indexVersion: 1,
name: 'test',
plugins: [plugin, { ...plugin, key: 'empty', models: [], protocols: [] }],
})
expect(
index.plugins.find((entry) => entry.key === 'incho')?.protocols
).toEqual(['openai_video'])
expect(index.plugins.find((entry) => entry.key === 'empty')?.models).toEqual(
[]
)
expect(
index.plugins.find((entry) => entry.key === 'empty')?.protocols
).toEqual([])
})
/*
Copyright (C) 2023-2026 QuantumNous
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { act, render, screen, waitFor, within } from '@testing-library/react'
import userEvent from '@testing-library/user-event'
import { afterEach, expect, test, vi } from 'vitest'
import { api } from '@/lib/api'
import { PluginsTable } from '../components/plugins-table'
import type { TaskPluginListItem } from '../types'
vi.mock('@/lib/lobe-icon', () => ({ getLobeIcon: () => null }))
const clients: QueryClient[] = []
afterEach(() => {
for (const client of clients) client.clear()
clients.length = 0
localStorage.removeItem('task-plugins-view-mode')
})
function renderPlugins(
enabled: boolean,
view: 'card' | 'table' = 'card',
source: TaskPluginListItem['source'] = 'override'
) {
localStorage.setItem('task-plugins-view-mode', view)
const item: TaskPluginListItem = {
meta: {
key: 'example',
name: 'Example',
version: '1.0.0',
apiVersion: 1,
author: { name: 'Example' },
models: [],
fetchMode: 'per_task',
},
source,
enabled,
active: true,
source_hash: '',
remark: '',
runtime_status: enabled ? 'registered' : 'disabled',
channel_count: 0,
in_flight_count: 0,
}
if (source === 'override_over_factory') {
item.factory_meta = { ...item.meta, version: '0.9.0' }
}
const client = new QueryClient({
defaultOptions: {
queries: { retry: false, staleTime: Infinity },
mutations: { retry: false },
},
})
clients.push(client)
client.setQueryData(['task-plugins'], [item])
vi.spyOn(api, 'get').mockResolvedValue({
data: { success: true, data: [{ ...item, enabled: !enabled }] },
})
render(
<QueryClientProvider client={client}>
<PluginsTable onDetails={() => undefined} onUpload={() => undefined} />
</QueryClientProvider>
)
return screen.getAllByRole('switch', { name: 'Enable plugin example' })[0]
}
test.each([
['card', true],
['card', false],
['table', true],
['table', false],
] as const)(
'%s view: changing enabled=%s requires confirmation and cancellation preserves status',
async (view, enabled) => {
const user = userEvent.setup()
const post = vi
.spyOn(api, 'post')
.mockResolvedValue({ data: { success: true, data: null } })
const toggle = renderPlugins(enabled, view)
await user.click(toggle)
expect(post).not.toHaveBeenCalled()
expect(toggle).toHaveAttribute('aria-checked', String(enabled))
const title = enabled ? 'Disable plugin?' : 'Enable plugin?'
const dialog = await screen.findByRole('alertdialog', { name: title })
expect(dialog).toHaveTextContent('Example')
await user.click(within(dialog).getByRole('button', { name: 'Cancel' }))
await waitFor(() =>
expect(screen.queryByRole('alertdialog')).not.toBeInTheDocument()
)
expect(post).not.toHaveBeenCalled()
expect(toggle).toHaveAttribute('aria-checked', String(enabled))
await user.click(
screen.getAllByRole('switch', { name: 'Enable plugin example' })[0]
)
await user.click(
within(await screen.findByRole('alertdialog', { name: title })).getByRole(
'button',
{ name: enabled ? 'Disable' : 'Enable' }
)
)
await waitFor(() =>
expect(post).toHaveBeenCalledExactlyOnceWith(
'/api/plugin/task/example/status',
{ enabled: !enabled },
expect.any(Object)
)
)
await waitFor(() =>
expect(screen.queryByRole('alertdialog')).not.toBeInTheDocument()
)
expect(
screen.getAllByRole('switch', { name: 'Enable plugin example' })[0]
).toHaveAttribute('aria-checked', String(!enabled))
}
)
test('keyboard toggle opens confirmation and Escape cancels without a request', async () => {
const user = userEvent.setup()
const post = vi.spyOn(api, 'post')
const toggle = renderPlugins(true)
act(() => toggle.focus())
await user.keyboard(' ')
await screen.findByRole('alertdialog', { name: 'Disable plugin?' })
await user.keyboard('{Escape}')
await waitFor(() =>
expect(screen.queryByRole('alertdialog')).not.toBeInTheDocument()
)
expect(post).not.toHaveBeenCalled()
expect(toggle).toHaveAttribute('aria-checked', 'true')
})
test('failed status request leaves confirmation available to retry and preserves the switch', async () => {
const user = userEvent.setup()
let finish!: (value: { data: { success: boolean; message: string } }) => void
const post = vi.spyOn(api, 'post').mockImplementationOnce(
() =>
new Promise((resolve) => {
finish = resolve
})
)
const toggle = renderPlugins(true)
await user.click(toggle)
const dialog = await screen.findByRole('alertdialog', {
name: 'Disable plugin?',
})
const confirm = within(dialog).getByRole('button', { name: 'Disable' })
await user.click(confirm)
expect(confirm).toBeDisabled()
expect(within(dialog).getByRole('button', { name: 'Cancel' })).toBeDisabled()
expect(screen.getAllByRole('switch', { hidden: true })[0]).toHaveAttribute(
'aria-checked',
'true'
)
await user.click(confirm)
expect(post).toHaveBeenCalledTimes(1)
await act(async () =>
finish({ data: { success: false, message: 'Status update failed' } })
)
await waitFor(() => expect(confirm).toBeEnabled())
expect(toggle).toHaveAttribute('aria-checked', 'true')
expect(dialog).toBeInTheDocument()
})
test('confirmed disable blocked by usage opens the existing cascade confirmation', async () => {
const user = userEvent.setup()
const post = vi
.spyOn(api, 'post')
.mockResolvedValueOnce({
data: {
success: false,
message: 'Plugin in use',
data: {
channels: [{ id: 7, name: 'Video channel' }],
in_flight_count: 1,
},
},
})
.mockResolvedValueOnce({ data: { success: true, data: null } })
await user.click(renderPlugins(true))
await user.click(
within(
await screen.findByRole('alertdialog', { name: 'Disable plugin?' })
).getByRole('button', { name: 'Disable' })
)
const usage = await screen.findByRole('alertdialog', {
name: 'Plugin is still in use',
})
expect(
screen.queryByRole('alertdialog', { name: 'Disable plugin?' })
).not.toBeInTheDocument()
expect(usage).toHaveTextContent('Video channel')
await user.click(
within(usage).getByRole('button', { name: 'Cascade disable channels' })
)
await waitFor(() =>
expect(post).toHaveBeenLastCalledWith(
'/api/plugin/task/example/status',
{ enabled: false },
expect.objectContaining({ params: { cascade: true } })
)
)
await waitFor(() =>
expect(screen.queryByRole('alertdialog')).not.toBeInTheDocument()
)
})
test.each(['factory', 'override_over_factory'] as const)(
'%s deletion protects the factory plugin while allowing custom version removal',
async (source) => {
const user = userEvent.setup()
renderPlugins(true, 'table', source)
await user.click(screen.getAllByRole('button', { name: 'Open menu' })[0])
const remove = screen.getByRole('menuitem', {
name: 'Delete active custom version',
})
if (source === 'factory') {
expect(remove).toHaveAttribute('aria-disabled', 'true')
} else {
expect(remove).not.toHaveAttribute('aria-disabled', 'true')
await user.click(remove)
expect(
await screen.findByRole('alertdialog', {
name: 'Delete plugin version?',
})
).toBeVisible()
}
}
)
/*
Copyright (C) 2023-2026 QuantumNous
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { render, screen } from '@testing-library/react'
import userEvent from '@testing-library/user-event'
import { afterEach, expect, test, vi } from 'vitest'
import { MarketplacePluginCard } from '../components/marketplace-plugin-card'
import { PluginWebsiteLink } from '../components/plugin-website-link'
import { PluginsTable } from '../components/plugins-table'
import type { TaskPluginListItem } from '../types'
vi.mock('@/lib/lobe-icon', () => ({ getLobeIcon: () => null }))
const clients: QueryClient[] = []
afterEach(() => {
for (const client of clients) client.clear()
clients.length = 0
localStorage.removeItem('task-plugins-view-mode')
})
const website = 'https://example.com/plugin'
test('marketplace card shows the plugin website separately from installation', () => {
render(
<MarketplacePluginCard
indexUrl='https://example.com/index.json'
plugin={{
key: 'example',
name: 'Example',
website,
latest: '1.0.0',
versions: [{ version: '1.0.0', path: 'plugin.js' }],
}}
installState={{ status: 'not_installed' }}
onInstall={() => undefined}
/>
)
expect(screen.getByRole('link', { name: 'Plugin website' })).toHaveAttribute(
'href',
website
)
expect(screen.getByRole('button', { name: 'Install' })).toBeEnabled()
})
test('installed table shows the same safe website as the plugin card', () => {
localStorage.setItem('task-plugins-view-mode', 'table')
const client = new QueryClient({
defaultOptions: { queries: { retry: false, staleTime: Infinity } },
})
clients.push(client)
const item: TaskPluginListItem = {
meta: {
key: 'example',
name: 'Example',
website,
sortPriority: 10,
version: '1.0.0',
apiVersion: 1,
author: { name: 'Example' },
models: [],
fetchMode: 'per_task',
},
source: 'factory',
enabled: true,
active: true,
source_hash: '',
remark: '',
runtime_status: 'registered',
channel_count: 0,
in_flight_count: 0,
}
client.setQueryData(['task-plugins'], [item])
render(
<QueryClientProvider client={client}>
<PluginsTable onDetails={() => undefined} onUpload={() => undefined} />
</QueryClientProvider>
)
const links = screen.getAllByRole('link', { name: 'Plugin website' })
for (const link of links) {
expect(link).toHaveAttribute('href', website)
expect(link).toHaveAttribute('rel', 'noopener noreferrer')
}
})
test('website link is reachable and activated using the keyboard', async () => {
const user = userEvent.setup()
render(<PluginWebsiteLink website={website} />)
const link = screen.getByRole('link', { name: 'Plugin website' })
const click = vi.fn((event: Event) => event.preventDefault())
link.addEventListener('click', click)
await user.tab()
expect(link).toHaveFocus()
await user.keyboard('{Enter}')
expect(click).toHaveBeenCalledOnce()
link.removeEventListener('click', click)
})
......@@ -86,10 +86,18 @@ export async function getTaskPluginVersions(key: string) {
return requireSuccess(response.data)
}
export async function uploadTaskPlugin(source: string, remark: string) {
/**
* `icon` is the sidecar icon.svg / icon.png as a data URI. It is stored apart
* from the source, so the JavaScript stays readable in diffs and reviews.
*/
export async function uploadTaskPlugin(
source: string,
remark: string,
icon?: string
) {
const response = await api.post<ApiResponse<TaskPluginDetail>>(
'/api/plugin/task',
{ source, remark },
{ source, remark, icon: icon || undefined },
mutationConfig
)
return requireSuccess(response.data)
......@@ -105,6 +113,7 @@ export async function installMarketplacePlugin(request: {
source: string
sourceSha256?: string
remark: string
icon?: string
}) {
const response = await api.post<ApiResponse<TaskPluginDetail>>(
'/api/plugin/task',
......@@ -113,6 +122,7 @@ export async function installMarketplacePlugin(request: {
sourceSha256: request.sourceSha256,
enabled: true,
remark: request.remark,
icon: request.icon || undefined,
},
mutationConfig
)
......@@ -176,8 +186,8 @@ export async function getTaskPluginEnabledOption() {
)
const options = requireSuccess(response.data)
return (
options.find((option) => option.key === 'TaskPluginEnabled')
?.value === 'true'
options.find((option) => option.key === 'TaskPluginEnabled')?.value ===
'true'
)
}
......
import { javascript } from '@codemirror/lang-javascript'
/*
Copyright (C) 2023-2026 QuantumNous
......@@ -16,11 +17,14 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import { javascript } from '@codemirror/lang-javascript'
import { syntaxHighlighting } from '@codemirror/language'
import { EditorState } from '@codemirror/state'
import { EditorView, lineNumbers } from '@codemirror/view'
import { classHighlighter } from '@lezer/highlight'
import { useEffect, useRef } from 'react'
import { cn } from '@/lib/utils'
type JavaScriptViewerProps = {
value: string
className?: string
......@@ -39,12 +43,24 @@ export function JavaScriptViewer(props: JavaScriptViewerProps) {
extensions: [
lineNumbers(),
javascript(),
syntaxHighlighting(classHighlighter),
EditorState.readOnly.of(true),
EditorView.editable.of(false),
EditorView.lineWrapping,
EditorView.theme({
'&': { height: '100%', backgroundColor: 'transparent' },
'.cm-scroller': { overflow: 'auto', fontFamily: 'monospace' },
'.cm-scroller': {
overflow: 'auto',
fontFamily: 'var(--font-mono)',
lineHeight: '1.65',
},
'.cm-content': { padding: '12px 0' },
'.cm-gutters': {
backgroundColor: 'transparent',
color: 'var(--muted-foreground)',
borderColor: 'var(--border)',
},
'.cm-line': { padding: '0 12px' },
}),
],
}),
......@@ -56,5 +72,19 @@ export function JavaScriptViewer(props: JavaScriptViewerProps) {
}
}, [props.value])
return <div ref={containerRef} className={props.className} />
return (
<div
ref={containerRef}
className={cn(
'[&_.tok-keyword]:text-purple-700 dark:[&_.tok-keyword]:text-purple-300',
'[&_.tok-string]:text-green-800 dark:[&_.tok-string]:text-green-300',
'[&_.tok-number]:text-orange-800 dark:[&_.tok-number]:text-orange-300 [&_.tok-bool]:text-orange-800 dark:[&_.tok-bool]:text-orange-300',
'[&_.tok-comment]:text-muted-foreground [&_.tok-comment]:italic',
'[&_.tok-variableName.tok-function]:text-blue-700 dark:[&_.tok-variableName.tok-function]:text-blue-300',
'[&_.tok-definition]:text-blue-700 dark:[&_.tok-definition]:text-blue-300',
'[&_.tok-propertyName]:text-teal-800 dark:[&_.tok-propertyName]:text-teal-300',
props.className
)}
/>
)
}
......@@ -16,73 +16,244 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import { useMemo, type ReactNode } from 'react'
import { useTranslation } from 'react-i18next'
import { ErrorState } from '@/components/error-state'
import { Badge } from '@/components/ui/badge'
import { getChannelTypeLabel } from '@/features/channels/lib'
import type { MarketplaceIndexVersion, MarketplacePlugin } from '../types'
import {
parsePluginMetaPreview,
resolvePluginMetaPreview,
} from '../lib/plugin-meta-preview'
import type {
MarketplaceIndexVersion,
MarketplacePlugin,
PluginPreviewField,
} from '../types'
import { PluginEndpoints } from './plugin-endpoints'
import { PluginModelList } from './plugin-model-list'
type MarketplaceCapabilitiesProps = {
plugin: MarketplacePlugin
version?: MarketplaceIndexVersion
source?: string
onRetry?: () => void
}
/**
* The sensitive declarations an administrator needs before installing: where the
* plugin may send requests, which channel types it can bind, how it
* authenticates, and whether the source pins an integrity hash. Reading these is
* far more effective than expecting a full source review, so they are surfaced
* above the source viewer rather than buried in it.
*/
export function MarketplaceCapabilities(props: MarketplaceCapabilitiesProps) {
/** Make index fallbacks visible beside the fact they describe. */
function PreviewFact(props: {
field: PluginPreviewField<unknown>
children: ReactNode
}) {
const { t } = useTranslation()
const allowedHosts = props.version?.allowedHosts
const channelTypes = props.plugin.channelTypes
return (
<div className='space-y-2 rounded-md border p-3 text-sm'>
<p className='font-medium'>{t('Declared capabilities')}</p>
<dl className='grid gap-2 sm:grid-cols-2'>
<div>
<dt className='text-muted-foreground text-xs'>
{t('Allowed hosts')}
</dt>
<dd className='font-mono text-xs break-all'>
{allowedHosts?.length ? allowedHosts.join(', ') : t('Not declared')}
</dd>
<div className='min-w-0 space-y-1.5'>
{props.children}
{props.field.state === 'value' && props.field.origin === 'index' && (
<Badge
variant='outline'
className='text-muted-foreground text-[11px] font-normal'
>
{t('From marketplace index')}
</Badge>
)}
</div>
<div>
<dt className='text-muted-foreground text-xs'>
{t('Channel types')}
</dt>
<dd className='text-xs'>
{channelTypes?.length
? channelTypes
.map((type) => `${getChannelTypeLabel(type)} (#${type})`)
)
}
function EndpointPreviewNote(props: {
field: PluginPreviewField<unknown[]>
label: string
}) {
const { t } = useTranslation()
if (props.field.state === 'value' && props.field.value.length > 0) {
return props.field.origin === 'index' ? (
<p className='text-muted-foreground text-xs'>
{props.label} · {t('From marketplace index')}
</p>
) : null
}
let message = t('Information unavailable')
if (props.field.state === 'missing' || props.field.state === 'value') {
message = t('Not declared by this plugin')
}
return (
<p className='text-muted-foreground text-xs'>
{props.label}: {message}
</p>
)
}
export function MarketplaceCapabilities(props: MarketplaceCapabilitiesProps) {
const { t } = useTranslation()
const parsed = useMemo(
() =>
props.source === undefined
? undefined
: parsePluginMetaPreview(props.source),
[props.source]
)
const fields = resolvePluginMetaPreview(props.plugin, props.version, parsed)
let channels = t('Information unavailable')
if (fields.channelTypes.state === 'missing') channels = t('Task Plugin')
if (fields.channelTypes.state === 'value') {
channels = fields.channelTypes.value.length
? fields.channelTypes.value
.map((type) => `${t(getChannelTypeLabel(type))} (#${type})`)
.join(', ')
: t('Not declared')}
</dd>
</div>
<div>
<dt className='text-muted-foreground text-xs'>
{t('Authentication')}
</dt>
<dd className='font-mono text-xs'>
{props.version?.auth || t('Not declared')}
</dd>
</div>
<div>
: t('Task Plugin')
}
let hosts = t('Information unavailable')
if (fields.allowedHosts.state === 'missing') {
hosts = t('No extra domains declared')
}
if (fields.allowedHosts.state === 'value') {
hosts =
fields.allowedHosts.value.join(', ') || t('No extra domains declared')
}
let authentication = t('Information unavailable')
if (fields.auth.state === 'missing') {
authentication = t('Not declared; an API key may still be required.')
}
if (fields.auth.state === 'value') {
authentication = fields.auth.value
if (!authentication) {
authentication = t('Not declared; an API key may still be required.')
}
if (authentication === 'api_key') authentication = t('API Key')
if (authentication === 'none') {
authentication = t('None (plugin declaration)')
}
if (authentication === 'oauth2_jwt' || authentication === 'vertex_oauth') {
authentication = t('OAuth 2.0 service account')
}
}
let baseUrl = t('Information unavailable')
if (fields.baseUrl.state === 'missing') {
baseUrl = t('Not declared by this plugin')
}
if (fields.baseUrl.state === 'value') {
baseUrl = fields.baseUrl.value || t('Not declared by this plugin')
}
const connections = [
{
title: t('Applicable channels'),
value: channels,
field: fields.channelTypes,
hint: t('Channel types you can use when binding this plugin.'),
},
{
title: t('Upstream authentication'),
value: authentication,
field: fields.auth,
hint: t(
'Authentication for upstream requests; channel credentials may still be used.'
),
},
{
title: t('Default API address'),
value: baseUrl,
field: fields.baseUrl,
hint: t('Used when a Task Plugin channel has no API address configured.'),
},
{
title: t('Additional request domains'),
value: hosts,
field: fields.allowedHosts,
hint: t(
'Extra destinations beyond the channel API address. The channel address remains accessible.'
),
},
]
return (
<div className='min-w-0 space-y-5'>
{parsed && parsed.status !== 'parsed' && (
<ErrorState
title={t('Some plugin information could not be read')}
description={t(
'Dynamic declarations cannot be previewed. Retry or review the source below.'
)}
onRetry={props.onRetry}
className='min-h-0 border p-3'
/>
)}
<section className='min-w-0 space-y-3' aria-label={t('Supported models')}>
<h3 className='text-sm font-medium'>{t('Supported models')}</h3>
<PreviewFact field={fields.models}>
{fields.models.state === 'value' && fields.models.value.length > 0 ? (
<PluginModelList models={fields.models.value} />
) : (
<p className='text-muted-foreground text-xs'>
{fields.models.state === 'unknown'
? t('Information unavailable')
: t('Not declared by this plugin')}
</p>
)}
</PreviewFact>
</section>
<section
className='min-w-0 rounded-lg border p-4'
aria-label={t('Supported interfaces')}
>
<PluginEndpoints
title={t('Supported interfaces')}
protocols={
fields.protocols.state === 'value'
? fields.protocols.value
: undefined
}
routes={
fields.routes.state === 'value' ? fields.routes.value : undefined
}
protocolsNote={
<EndpointPreviewNote
label={t('Standard protocol interfaces')}
field={fields.protocols}
/>
}
routesNote={
<EndpointPreviewNote
label={t('Plugin-defined interfaces')}
field={fields.routes}
/>
}
/>
</section>
<section className='space-y-3' aria-label={t('Connection settings')}>
<h3 className='text-sm font-medium'>{t('Connection settings')}</h3>
<dl className='bg-muted/20 grid gap-x-6 gap-y-4 rounded-lg border p-4 sm:grid-cols-2'>
{connections.map((connection, index) => (
<div
key={connection.title}
className={
index >= 2
? 'min-w-0 space-y-1.5 sm:col-span-2'
: 'min-w-0 space-y-1.5'
}
>
<dt className='text-muted-foreground text-xs'>
{t('Integrity hash')}
{connection.title}
</dt>
<dd className='font-mono text-xs break-all'>
{props.version?.sha256 ?? t('Not provided by this source')}
<dd>
<PreviewFact field={connection.field}>
<p className='text-xs leading-relaxed break-all'>
{connection.value}
</p>
</PreviewFact>
<p className='text-muted-foreground mt-1.5 text-xs leading-relaxed'>
{connection.hint}
</p>
</dd>
</div>
))}
</dl>
<p className='text-muted-foreground text-xs'>
</section>
<p className='text-muted-foreground text-xs leading-relaxed'>
{t(
'These values come from the source index and are shown for review only. The gateway admits the plugin based on the metadata compiled from its source.'
'This preview reads static plugin declarations. The gateway validates the plugin during installation.'
)}
</p>
</div>
......
......@@ -18,28 +18,28 @@ For commercial licensing, please contact support@quantumnous.com
*/
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'
import { AlertTriangle, Download } from 'lucide-react'
import { useState } from 'react'
import { useTranslation } from 'react-i18next'
import { toast } from 'sonner'
import { Dialog } from '@/components/dialog'
import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert'
import { Button } from '@/components/ui/button'
import {
Dialog,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
DialogTitle,
} from '@/components/ui/dialog'
import { Combobox } from '@/components/ui/combobox'
import { Spinner } from '@/components/ui/spinner'
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'
import { getTaskPlugin, installMarketplacePlugin } from '../api'
import {
activateTaskPlugin,
getTaskPlugin,
installMarketplacePlugin,
} from '../api'
import {
findMarketplaceVersion,
resolvePluginSourceUrl,
type InstallState,
} from '../lib/marketplace'
import { fetchPluginIconDataUri } from '../lib/plugin-icon-file'
import {
computeSourceSha256,
fetchPluginSourceText,
......@@ -48,6 +48,8 @@ import {
import type { MarketplacePlugin, MarketplaceSource } from '../types'
import { JavaScriptViewer } from './javascript-viewer'
import { MarketplaceCapabilities } from './marketplace-capabilities'
import { PluginIcon } from './plugin-icon'
import { PluginIntegrityCheck } from './plugin-integrity-check'
import { SourceDiff } from './source-diff'
export type MarketplaceInstallTarget = {
......@@ -63,28 +65,41 @@ type MarketplaceInstallDialogProps = {
}
export function MarketplaceInstallDialog(props: MarketplaceInstallDialogProps) {
if (!props.target) return null
return (
<MarketplaceInstallContent
key={`${props.target.source.index_url}-${props.target.plugin.key}-${props.target.version}`}
target={props.target}
onOpenChange={props.onOpenChange}
/>
)
}
function MarketplaceInstallContent(
props: MarketplaceInstallDialogProps & { target: MarketplaceInstallTarget }
) {
const { t } = useTranslation()
const queryClient = useQueryClient()
const target = props.target
const pluginKey = target?.plugin.key ?? ''
const entry = target
? findMarketplaceVersion(target.plugin, target.version)
: undefined
const isUpgrade = target
? target.installState.status !== 'not_installed'
: false
const [selectedVersion, setSelectedVersion] = useState(target.version)
const pluginKey = target.plugin.key
const entry = findMarketplaceVersion(target.plugin, selectedVersion)
const hasInstalledPlugin = target.installState.status !== 'not_installed'
const [reviewTab, setReviewTab] = useState('details')
const sourceQuery = useQuery({
queryKey: [
'task-plugin-marketplace-source',
target?.source.index_url,
target.source.index_url,
pluginKey,
target?.version,
selectedVersion,
entry?.path,
entry?.sha256,
],
enabled: Boolean(target && entry),
enabled: Boolean(entry),
retry: false,
queryFn: async () => {
if (!target || !entry) throw new Error('missing marketplace entry')
if (!entry) throw new Error('missing marketplace entry')
const url = resolvePluginSourceUrl(target.source.index_url, entry.path)
if (!url) {
throw new Error(
......@@ -96,7 +111,20 @@ export function MarketplaceInstallDialog(props: MarketplaceInstallDialogProps) {
// the server re-hashes what it received, so a tampered browser cannot pass
// a mismatched source off as verified.
const digest = await computeSourceSha256(text)
return { url, text, digest }
// The logo is cosmetic: a missing or malformed icon file must never block
// the install, so a failed fetch simply yields no icon.
const iconUrl = target.plugin.iconFile
? resolvePluginSourceUrl(
target.source.index_url,
target.plugin.iconFile.path
)
: null
const icon = iconUrl
? await fetchPluginIconDataUri(iconUrl, {
sha256: target.plugin.iconFile?.sha256,
})
: null
return { url, text, digest, icon }
},
})
......@@ -104,24 +132,39 @@ export function MarketplaceInstallDialog(props: MarketplaceInstallDialogProps) {
const installedQuery = useQuery({
queryKey: ['task-plugin', pluginKey],
queryFn: () => getTaskPlugin(pluginKey),
enabled: Boolean(target) && isUpgrade,
enabled: hasInstalledPlugin,
})
const installMutation = useMutation({
mutationFn: () => {
if (!target || !sourceQuery.data) throw new Error('source not fetched')
return installMarketplacePlugin({
mutationFn: async () => {
if (
!entry ||
!sourceQuery.data ||
sourceQuery.isFetching ||
sourceQuery.isError ||
digestMismatch
) {
throw new Error('source not fetched')
}
const detail = await installMarketplacePlugin({
source: sourceQuery.data.text,
sourceSha256: entry?.sha256,
remark: `${target.source.name} v${target.version}`,
sourceSha256: entry.sha256,
remark: `${target.source.name} v${selectedVersion}`,
icon: sourceQuery.data.icon ?? undefined,
})
if (detail.plugin && !detail.plugin.active) {
await activateTaskPlugin(detail.meta.key, detail.meta.version)
}
return detail
},
onSuccess: (detail) => {
onSettled: () => {
queryClient.invalidateQueries({ queryKey: ['task-plugins'] })
queryClient.invalidateQueries({ queryKey: ['task-plugin', pluginKey] })
queryClient.invalidateQueries({
queryKey: ['task-plugin-versions', pluginKey],
})
},
onSuccess: (detail) => {
toast.success(
t('Installed {{name}} v{{version}}', {
name: detail.meta.name,
......@@ -153,135 +196,207 @@ export function MarketplaceInstallDialog(props: MarketplaceInstallDialogProps) {
let confirmLabel = t('Install and enable')
if (installMutation.isPending) confirmLabel = t('Installing...')
else if (isUpgrade) confirmLabel = t('Upgrade and enable')
// Rendering the body needs a target; the dialog itself is driven by its
// presence, so an absent target simply means the dialog is closed.
if (!target) return null
return (
<Dialog open onOpenChange={props.onOpenChange}>
<DialogContent className='max-h-[90vh] max-w-4xl overflow-y-auto'>
<DialogHeader>
<DialogTitle>
{isUpgrade
? t('Upgrade {{name}}', { name: target.plugin.name })
: t('Install {{name}}', { name: target.plugin.name })}
</DialogTitle>
<DialogDescription>
{t('{{key}} · version {{version}} · from {{source}}', {
key: pluginKey,
version: target.version,
source: target.source.name,
})}
</DialogDescription>
</DialogHeader>
<Alert variant='destructive'>
<AlertTriangle />
<AlertTitle>{t('Third-party plugin risk')}</AlertTitle>
<AlertDescription>
{t(
'Uploading a plugin is an administrator-level trust decision. A plugin can access channel credentials and shape upstream requests. Review its source and diff before activation.'
)}
</AlertDescription>
</Alert>
<MarketplaceCapabilities plugin={target.plugin} version={entry} />
{!entry?.sha256 && (
<Alert>
<AlertTitle>{t('No integrity hash')}</AlertTitle>
<AlertDescription>
{t(
'This source does not publish a sha256 for this version, so the downloaded source cannot be pinned to what the source intended.'
)}
</AlertDescription>
</Alert>
)}
{digestMismatch && (
<Alert variant='destructive'>
<AlertTriangle />
<AlertTitle>{t('Integrity check failed')}</AlertTitle>
<AlertDescription>
{t(
'The downloaded source does not match the sha256 declared in the index. Do not install it.'
)}
</AlertDescription>
</Alert>
)}
const sourcePreview = sourceQuery.data ? (
<JavaScriptViewer
value={sourceQuery.data.text}
className='bg-muted/30 h-[min(22rem,35vh)] min-w-0 overflow-hidden rounded-lg border text-xs'
/>
) : null
{sourceQuery.isLoading && (
const sourceStatus = (
<>
{sourceQuery.isFetching && (
<div className='flex items-center gap-2 text-sm'>
<Spinner />
{t('Fetching plugin source...')}
</div>
)}
{fetchErrorMessage && (
<p role='alert' className='text-destructive text-sm'>
{fetchErrorMessage}
</p>
)}
</>
)
{sourceQuery.data && (
<Tabs defaultValue={isUpgrade ? 'diff' : 'source'}>
<TabsList>
<TabsTrigger value='source'>{t('Source')}</TabsTrigger>
{isUpgrade && (
<TabsTrigger value='diff'>{t('Source diff')}</TabsTrigger>
return (
<Dialog
open
initialFocus={false}
onOpenChange={props.onOpenChange}
contentClassName='sm:max-w-3xl'
headerClassName='gap-1.5 pr-6'
bodyClassName='space-y-3'
descriptionClassName='pl-12 text-xs break-words'
title={
<span className='flex min-w-0 items-center gap-3'>
<PluginIcon
plugin={{
...target.plugin,
iconSrc: sourceQuery.data?.icon ?? undefined,
}}
size={36}
/>
<span className='min-w-0 text-lg font-semibold break-words'>
{t('Install {{name}}', { name: target.plugin.name })}
</span>
</span>
}
description={t('{{key}} · from {{source}}', {
key: pluginKey,
source: target.source.name,
})}
footer={
<>
<Button variant='outline' onClick={() => props.onOpenChange(false)}>
{t('Cancel')}
</Button>
<Button
disabled={
!entry ||
!sourceQuery.data ||
sourceQuery.isFetching ||
sourceQuery.isError ||
digestMismatch ||
installMutation.isPending
}
onClick={() => installMutation.mutate()}
>
<Download />
{confirmLabel}
</Button>
</>
}
>
<div className='space-y-2'>
<Combobox
aria-label={t('Select version')}
value={selectedVersion}
disabled={
target.plugin.versions.length <= 1 || installMutation.isPending
}
options={target.plugin.versions.map((version) => {
const labels = [version.version]
if (version.version === target.plugin.latest) {
labels.push(t('Latest version'))
}
if (
target.installState.status !== 'not_installed' &&
version.version === target.installState.installedVersion
) {
labels.push(t('Active version'))
}
return { value: version.version, label: labels.join(' · ') }
})}
onValueChange={(version) => {
if (
!version ||
version === selectedVersion ||
installMutation.isPending
) {
return
}
installMutation.reset()
setSelectedVersion(version)
if (target.installState.status !== 'not_installed') {
setReviewTab(
version === target.installState.installedVersion
? 'details'
: 'diff'
)
}
}}
/>
{target.installState.status !== 'not_installed' && (
<p className='text-muted-foreground text-xs'>
{t('Current v{{from}} → install v{{to}}', {
from: target.installState.installedVersion,
to: selectedVersion,
})}
</p>
)}
</div>
<Tabs
value={reviewTab}
onValueChange={setReviewTab}
className='min-w-0 gap-3'
>
<TabsList className='w-full'>
<TabsTrigger value='details'>{t('Plugin details')}</TabsTrigger>
{hasInstalledPlugin && (
<TabsTrigger value='diff'>{t('Version differences')}</TabsTrigger>
)}
<TabsTrigger value='source'>{t('Full source')}</TabsTrigger>
</TabsList>
<TabsContent value='source'>
<JavaScriptViewer
value={sourceQuery.data.text}
className='h-[28rem] overflow-hidden rounded-md border'
/>
</TabsContent>
{isUpgrade && (
<TabsContent value='diff' className='space-y-2'>
{hasInstalledPlugin && (
<TabsContent value='diff' className='min-w-0 space-y-2'>
{sourceStatus}
{installedQuery.isLoading && (
<div className='flex items-center gap-2 text-sm'>
<Spinner />
{t('Loading installed source...')}
</div>
)}
{installedQuery.data && (
<>
<p className='text-muted-foreground text-xs'>
{t('Installed v{{from}} → marketplace v{{to}}', {
from: installedQuery.data.meta.version,
to: target.version,
})}
{installedQuery.error && (
<p role='alert' className='text-destructive text-sm'>
{installedQuery.error.message}
</p>
)}
{sourceQuery.data &&
!sourceQuery.isError &&
installedQuery.data &&
!installedQuery.isError && (
<SourceDiff
before={installedQuery.data.source}
after={sourceQuery.data.text}
className='bg-muted/30 max-h-[min(22rem,35vh)]'
/>
</>
)}
{installedQuery.error && (
<p role='alert' className='text-destructive text-sm'>
{installedQuery.error.message}
</p>
)}
</TabsContent>
)}
<TabsContent value='details' className='min-w-0 space-y-2'>
{sourceStatus}
<MarketplaceCapabilities
plugin={target.plugin}
version={entry}
source={sourceQuery.data?.text}
onRetry={() => {
void sourceQuery.refetch()
}}
/>
</TabsContent>
<TabsContent value='source' className='min-w-0 space-y-2'>
{sourceStatus}
{!sourceQuery.isError && sourcePreview}
</TabsContent>
</Tabs>
<Alert className='border-amber-500/20 bg-amber-500/5 py-2 [&>svg]:text-amber-600 dark:[&>svg]:text-amber-400'>
<AlertTriangle />
<AlertDescription className='text-foreground/80 text-xs leading-relaxed'>
{t(
'Plugins can access channel credentials. Review the source and differences before installing.'
)}
</AlertDescription>
</Alert>
<PluginIntegrityCheck
compact
sourceAvailable={Boolean(sourceQuery.data)}
expected={entry?.sha256}
digest={sourceQuery.data?.digest}
isLoading={sourceQuery.isFetching}
/>
{target.installState.status === 'diverged' && (
<Alert>
<AlertTitle>
{t('Installed version is not in this index')}
</AlertTitle>
<AlertTitle>{t('Installed version is not in this index')}</AlertTitle>
<AlertDescription>
{t(
'v{{installed}} is installed but this source does not list it. Installing replaces it with v{{target}}.',
{
installed: target.installState.installedVersion,
target: target.version,
target: selectedVersion,
}
)}
</AlertDescription>
......@@ -291,7 +406,7 @@ export function MarketplaceInstallDialog(props: MarketplaceInstallDialogProps) {
{installMutation.error && (
<div className='space-y-1'>
<p className='text-destructive text-sm font-medium'>
{t('The gateway rejected this plugin')}
{t('Plugin installation failed')}
</p>
{/* Verbatim: preflight rejections name the conflicting plugin. */}
<p className='text-destructive text-sm whitespace-pre-wrap'>
......@@ -304,22 +419,6 @@ export function MarketplaceInstallDialog(props: MarketplaceInstallDialogProps) {
</p>
</div>
)}
<DialogFooter>
<Button variant='outline' onClick={() => props.onOpenChange(false)}>
{t('Cancel')}
</Button>
<Button
disabled={
!sourceQuery.data || digestMismatch || installMutation.isPending
}
onClick={() => installMutation.mutate()}
>
<Download />
{confirmLabel}
</Button>
</DialogFooter>
</DialogContent>
</Dialog>
)
}
......@@ -259,6 +259,7 @@ function MarketplaceSourceSection(props: MarketplaceSourceSectionProps) {
<MarketplacePluginCard
key={plugin.key}
plugin={plugin}
indexUrl={props.source.index_url}
installState={installState}
installed={props.installed.find(
(item) => item.meta.key === plugin.key
......
......@@ -16,6 +16,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import { useQuery } from '@tanstack/react-query'
import {
ArrowUpCircle,
CheckCircle2,
......@@ -32,14 +33,18 @@ import { resolveLocalizedText } from '@/lib/localized-text'
import {
findMarketplaceVersion,
marketplaceBuiltInVersion,
resolveMarketplaceActionPolicy,
resolvePluginSourceUrl,
type InstallState,
} from '../lib/marketplace'
import { fetchPluginIconDataUri } from '../lib/plugin-icon-file'
import type { MarketplacePlugin, TaskPluginListItem } from '../types'
import { PluginIcon } from './plugin-icon'
import { PluginWebsiteLink } from './plugin-website-link'
type MarketplacePluginCardProps = {
plugin: MarketplacePlugin
/** Index URL the plugin came from; sidecar logos resolve against it. */
indexUrl?: string
installState: InstallState
installed?: TaskPluginListItem
onInstall: () => void
......@@ -52,15 +57,28 @@ export function MarketplacePluginCard(props: MarketplacePluginCardProps) {
const channelTypes = plugin.channelTypes ?? []
const latestEntry = findMarketplaceVersion(plugin, plugin.latest)
const labelClass = 'text-muted-foreground text-[11px] font-medium select-none'
const actionPolicy = resolveMarketplaceActionPolicy(props.installed)
const builtInVersion = marketplaceBuiltInVersion(props.installed)
// Same-origin-as-index rule as the source itself: a logo is only ever
// fetched from the repository the administrator chose to trust.
const iconUrl =
plugin.iconFile && props.indexUrl
? resolvePluginSourceUrl(props.indexUrl, plugin.iconFile.path)
: null
return (
<div className='flex h-full flex-col gap-2.5 rounded-xl border p-3'>
<div className='flex items-start justify-between gap-2'>
<div className='flex min-w-0 flex-1 items-center gap-2.5'>
<span className='mt-0.5 shrink-0'>
{iconUrl ? (
<MarketplacePluginLogo
plugin={plugin}
iconUrl={iconUrl}
sha256={plugin.iconFile?.sha256}
/>
) : (
<PluginIcon plugin={plugin} size={20} />
)}
</span>
<div className='min-w-0'>
<div className='truncate text-sm font-medium'>{plugin.name}</div>
......@@ -72,6 +90,8 @@ export function MarketplacePluginCard(props: MarketplacePluginCardProps) {
<InstallStateBadge state={props.installState} />
</div>
<PluginWebsiteLink website={plugin.website} />
{description ? (
<p className='text-muted-foreground line-clamp-2 text-xs'>
{description}
......@@ -87,8 +107,8 @@ export function MarketplacePluginCard(props: MarketplacePluginCardProps) {
<div className={labelClass}>{t('Channel type')}</div>
<div className='truncate text-xs'>
{channelTypes.length > 0
? getChannelTypeLabel(channelTypes[0])
: '—'}
? t(getChannelTypeLabel(channelTypes[0]))
: t('Task Plugin')}
</div>
</div>
<div className='min-w-0'>
......@@ -117,9 +137,6 @@ export function MarketplacePluginCard(props: MarketplacePluginCardProps) {
)}
<div className='mt-auto border-t pt-2'>
{actionPolicy.kind === 'system_update' ? (
<Badge variant='secondary'>{t('Updates with the system')}</Badge>
) : (
<Button
size='sm'
variant={
......@@ -129,9 +146,8 @@ export function MarketplacePluginCard(props: MarketplacePluginCardProps) {
onClick={props.onInstall}
>
<Download />
{getActionLabel(props.installState, t)}
{t('Install')}
</Button>
)}
</div>
</div>
)
......@@ -174,11 +190,35 @@ function InstallStateBadge({ state }: { state: InstallState }) {
)
}
function getActionLabel(
state: InstallState,
t: (key: string, options?: Record<string, unknown>) => string
): string {
if (state.status === 'not_installed') return t('Install')
if (state.status === 'up_to_date') return t('Reinstall latest')
return t('Review and upgrade')
type MarketplacePluginLogoProps = {
plugin: MarketplacePlugin
iconUrl: string
sha256?: string
}
/**
* Loads the sidecar logo through fetch and shows it as a data URI. Linking the
* raw file with `<img src>` fails on hosts that serve SVG as text/plain with
* nosniff (raw.githubusercontent.com does), and fetching also lets the index
* digest be checked before anything is displayed. Until the bytes arrive, or if
* they never do, the manifest icon or text avatar renders instead.
*/
function MarketplacePluginLogo(props: MarketplacePluginLogoProps) {
const iconQuery = useQuery({
queryKey: [
'task-plugin-marketplace-icon',
props.iconUrl,
props.sha256 ?? '',
],
queryFn: () =>
fetchPluginIconDataUri(props.iconUrl, { sha256: props.sha256 }),
staleTime: Number.POSITIVE_INFINITY,
retry: false,
})
return (
<PluginIcon
plugin={{ ...props.plugin, iconSrc: iconQuery.data ?? undefined }}
size={20}
/>
)
}
......@@ -25,6 +25,7 @@ import { resolveLocalizedText } from '@/lib/localized-text'
import type { TaskPluginListItem } from '../types'
import { PluginIcon } from './plugin-icon'
import { PluginWebsiteLink } from './plugin-website-link'
/**
* A card is one grid cell, so the model list has to stay a fixed number of
......@@ -40,7 +41,7 @@ const MAX_VISIBLE_MODELS = 4
* and the actions menu.
*
* The card answers "which plugin is this and is it live" — identity, source,
* runtime state, the versions, the models it binds, and the enable toggle.
* runtime state, the plugin version, the models it binds, and the enable toggle.
* Manifest detail (billing parameters, endpoints, source) belongs to the detail
* sheet: rendering it here made every card a different height and buried the
* plugin's own description under its parameter descriptions.
......@@ -71,7 +72,10 @@ function PluginCardComponent({ row }: { row: Row<TaskPluginListItem> }) {
<div className='flex items-start justify-between gap-2'>
<div className='flex min-w-0 flex-1 items-center gap-2.5'>
<span className='mt-0.5 shrink-0'>
<PluginIcon plugin={row.original.meta} size={20} />
<PluginIcon
plugin={{ ...row.original.meta, hasIcon: row.original.has_icon }}
size={20}
/>
</span>
<div className='min-w-0'>
<div className='truncate text-sm font-medium'>
......@@ -87,9 +91,9 @@ function PluginCardComponent({ row }: { row: Row<TaskPluginListItem> }) {
</div>
</div>
{/* Row 2: source + runtime badges next to the version pills, all wrapping
freely. The versions read as pills rather than labelled stats because
`v1.2.3` and `API v1` already name themselves. */}
<PluginWebsiteLink website={row.original.meta.website} />
{/* Row 2: source, runtime, and plugin version badges wrap freely. */}
<div className='flex flex-wrap items-center gap-1.5'>
{renderCell('source')}
{renderCell('runtime')}
......@@ -100,13 +104,6 @@ function PluginCardComponent({ row }: { row: Row<TaskPluginListItem> }) {
>
{row.original.meta.version ? `v${row.original.meta.version}` : '—'}
</Badge>
<Badge
variant='secondary'
className='font-mono font-normal'
aria-label={`${t('API version')} v${row.original.meta.apiVersion}`}
>
API v{row.original.meta.apiVersion}
</Badge>
</div>
{description ? (
......
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'
import { RotateCcw, X } from 'lucide-react'
import { useState } from 'react'
import { useTranslation } from 'react-i18next'
import { toast } from 'sonner'
import { CopyButton } from '@/components/copy-button'
import { EmptyState } from '@/components/empty-state'
import { ErrorState } from '@/components/error-state'
import { LoadingState } from '@/components/loading-state'
import { Badge } from '@/components/ui/badge'
import { Button } from '@/components/ui/button'
/*
Copyright (C) 2023-2026 QuantumNous
......@@ -17,19 +29,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import { Combobox } from '@/components/ui/combobox'
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'
import { RotateCcw } from 'lucide-react'
import { useState } from 'react'
import { useTranslation } from 'react-i18next'
import { toast } from 'sonner'
import { Badge } from '@/components/ui/badge'
import { Button } from '@/components/ui/button'
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'
import {
Sheet,
SheetContent,
SheetClose,
SheetDescription,
SheetHeader,
SheetTitle,
......@@ -52,6 +55,7 @@ import {
} from '../api'
import type { TaskPluginListItem } from '../types'
import { JavaScriptViewer } from './javascript-viewer'
import { PluginIcon } from './plugin-icon'
import { PluginMetadataCard } from './plugin-metadata-card'
import { PluginSandbox } from './plugin-sandbox'
import { SourceDiff } from './source-diff'
......@@ -63,9 +67,24 @@ type PluginDetailSheetProps = {
}
export function PluginDetailSheet(props: PluginDetailSheetProps) {
return (
<Sheet open={Boolean(props.plugin)} onOpenChange={props.onOpenChange}>
{props.plugin && (
<PluginDetailContent
key={props.plugin.meta.key}
plugin={props.plugin}
/>
)}
</Sheet>
)
}
function PluginDetailContent(props: { plugin: TaskPluginListItem }) {
const { t, i18n } = useTranslation()
const queryClient = useQueryClient()
const key = props.plugin?.meta.key ?? ''
const [activeTab, setActiveTab] = useState('overview')
const [sandboxVisited, setSandboxVisited] = useState(false)
const [compareVersion, setCompareVersion] = useState('')
const detailQuery = useQuery({
queryKey: ['task-plugin', key],
......@@ -85,6 +104,7 @@ export function PluginDetailSheet(props: PluginDetailSheetProps) {
const activateMutation = useMutation({
mutationFn: (version: string) => activateTaskPlugin(key, version),
onSuccess: () => {
setCompareVersion('')
toast.success(t('Plugin version activated'))
queryClient.invalidateQueries({ queryKey: ['task-plugins'] })
queryClient.invalidateQueries({ queryKey: ['task-plugin', key] })
......@@ -98,55 +118,132 @@ export function PluginDetailSheet(props: PluginDetailSheetProps) {
detail?.meta.description ?? props.plugin?.meta.description,
i18n.language
)
let detailState = null
if (detailQuery.isPending) detailState = <LoadingState />
else if (detailQuery.isError) {
detailState = (
<ErrorState
description={detailQuery.error.message}
onRetry={() => void detailQuery.refetch()}
/>
)
} else if (!detail) detailState = <EmptyState />
let versionsState = null
if (versionsQuery.isPending) versionsState = <LoadingState />
else if (versionsQuery.isError) {
versionsState = (
<ErrorState
description={versionsQuery.error.message}
onRetry={() => void versionsQuery.refetch()}
/>
)
} else if (!versions.length) {
versionsState = <EmptyState title={t('No version history')} />
}
const panelClassName =
'min-h-0 min-w-0 flex-1 overflow-y-auto overscroll-contain p-4 sm:p-6 data-hidden:hidden'
return (
<Sheet open={Boolean(props.plugin)} onOpenChange={props.onOpenChange}>
<SheetContent className='w-full overflow-y-auto sm:max-w-4xl'>
<SheetHeader>
<SheetTitle>
{detail?.meta.name ?? props.plugin?.meta.name}
<SheetContent
showCloseButton={false}
className='w-full gap-0 overflow-hidden sm:max-w-4xl'
>
<SheetClose
render={
<Button
variant='ghost'
size='icon-sm'
className='absolute top-3 right-3'
aria-label={t('Close')}
/>
}
>
<X aria-hidden='true' />
</SheetClose>
<SheetHeader className='shrink-0 gap-2 border-b p-4 pr-12 sm:p-6 sm:pr-14'>
<SheetTitle className='flex min-w-0 items-start gap-3'>
<span className='shrink-0'>
<PluginIcon
plugin={{
...(detail?.meta ?? props.plugin.meta),
hasIcon: detail?.has_icon ?? props.plugin.has_icon,
}}
size={32}
/>
</span>
<span className='min-w-0 text-lg font-semibold break-words'>
{detail?.meta.name ?? props.plugin.meta.name}
</span>
</SheetTitle>
<SheetDescription>
<span className='block font-mono'>{key}</span>
{description ? (
<span className='mt-1 block'>{description}</span>
) : null}
<div className='flex min-w-0 items-center gap-1'>
<span className='text-muted-foreground min-w-0 font-mono text-xs break-all'>
{key}
</span>
<CopyButton
value={key}
className='size-7'
iconClassName='size-3.5'
aria-label={t('Copy plugin key')}
/>
<Badge
variant='secondary'
className='ml-auto h-auto max-w-[35%] shrink-0 font-mono break-all whitespace-normal'
>
{detail?.meta.version ?? props.plugin.meta.version}
</Badge>
</div>
<SheetDescription className='max-h-24 overflow-y-auto text-xs leading-relaxed break-words'>
{description || t('Not declared')}
</SheetDescription>
</SheetHeader>
<div className='space-y-4 px-4 pb-6'>
{detail && (
<>
<PluginMetadataCard meta={detail.meta} />
<Card>
<CardHeader>
<CardTitle>{t('Billing parameters')}</CardTitle>
</CardHeader>
<CardContent>
{detail.meta.usageSchema &&
Object.keys(detail.meta.usageSchema).length > 0 ? (
<UsageSchemaTable schema={detail.meta.usageSchema} />
) : (
<p className='text-muted-foreground text-sm'>
{t('No billing parameters declared')}
</p>
)}
</CardContent>
</Card>
</>
)}
<Tabs defaultValue='source'>
<TabsList>
<TabsTrigger value='source'>{t('Source')}</TabsTrigger>
<Tabs
value={activeTab}
onValueChange={(value) => {
setActiveTab(String(value))
if (value === 'sandbox') setSandboxVisited(true)
}}
className='min-h-0 min-w-0 flex-1 gap-0'
>
<div className='shrink-0 overflow-x-auto border-b px-4 sm:px-6'>
<TabsList
variant='line'
className='min-w-max justify-start gap-4 group-data-horizontal/tabs:h-11'
aria-label={t('Plugin details')}
>
<TabsTrigger value='overview'>{t('Overview')}</TabsTrigger>
<TabsTrigger value='billing'>{t('Billing parameters')}</TabsTrigger>
<TabsTrigger value='source'>{t('Plugin source')}</TabsTrigger>
<TabsTrigger value='versions'>{t('Version history')}</TabsTrigger>
<TabsTrigger value='diff'>{t('Source diff')}</TabsTrigger>
<TabsTrigger value='sandbox'>{t('Sandbox')}</TabsTrigger>
<TabsTrigger value='sandbox'>{t('Plugin sandbox')}</TabsTrigger>
</TabsList>
<TabsContent value='source'>
</div>
<TabsContent value='overview' className={panelClassName}>
{detailState ?? (detail && <PluginMetadataCard meta={detail.meta} />)}
</TabsContent>
<TabsContent value='billing' className={panelClassName}>
{detailState ??
(detail?.meta.usageSchema &&
Object.keys(detail.meta.usageSchema).length > 0 ? (
<UsageSchemaTable schema={detail.meta.usageSchema} />
) : (
<EmptyState title={t('No billing parameters declared')} />
))}
</TabsContent>
<TabsContent value='source' className={panelClassName}>
{detailState ??
(detail?.source ? (
<JavaScriptViewer
value={detail?.source ?? ''}
className='h-[32rem] overflow-hidden rounded-md border'
value={detail.source}
className='bg-muted/20 h-full min-h-48 overflow-hidden rounded-lg border'
/>
) : (
<EmptyState title={t('No source available')} />
))}
</TabsContent>
<TabsContent value='versions'>
<TabsContent value='versions' className={panelClassName}>
{versionsState ?? (
<Table>
<TableHeader>
<TableRow>
......@@ -160,7 +257,9 @@ export function PluginDetailSheet(props: PluginDetailSheetProps) {
{versions.map((version) => (
<TableRow key={version.id}>
<TableCell>{version.version}</TableCell>
<TableCell>{version.remark || '—'}</TableCell>
<TableCell className='max-w-64 break-words whitespace-normal'>
{version.remark || '—'}
</TableCell>
<TableCell>
{version.active ? <Badge>{t('Active')}</Badge> : '—'}
</TableCell>
......@@ -168,12 +267,8 @@ export function PluginDetailSheet(props: PluginDetailSheetProps) {
<Button
size='sm'
variant='outline'
disabled={
version.active || activateMutation.isPending
}
onClick={() =>
activateMutation.mutate(version.version)
}
disabled={version.active || activateMutation.isPending}
onClick={() => activateMutation.mutate(version.version)}
>
<RotateCcw />
{t('Activate / Roll back')}
......@@ -183,28 +278,57 @@ export function PluginDetailSheet(props: PluginDetailSheetProps) {
))}
</TableBody>
</Table>
)}
</TabsContent>
<TabsContent value='diff' className='space-y-3'>
<TabsContent value='diff' className={`${panelClassName} space-y-3`}>
{detailState ?? versionsState ?? (
<>
<Combobox
options={versions.filter((version) => version.version !== detail?.meta.version).map((version) => ({ value: version.version, label: version.version }))}
options={versions
.filter((version) => version.version !== detail?.meta.version)
.map((version) => ({
value: version.version,
label: version.version,
}))}
value={compareVersion}
onValueChange={(value) => setCompareVersion(value ?? '')}
placeholder={t('Select a version to compare')}
aria-label={t('Select a version to compare')}
/>
{compareQuery.data && detail && (
/>
{!compareVersion && (
<EmptyState title={t('Select a version to compare')} />
)}
{compareVersion && compareQuery.isPending && <LoadingState />}
{compareVersion && compareQuery.isError && (
<ErrorState
description={compareQuery.error.message}
onRetry={() => void compareQuery.refetch()}
/>
)}
{compareVersion &&
!compareQuery.isPending &&
!compareQuery.isError &&
!compareQuery.data && <EmptyState />}
{compareVersion &&
!compareQuery.isError &&
compareQuery.data &&
detail && (
<SourceDiff
before={compareQuery.data.source}
after={detail.source}
/>
)}
</>
)}
</TabsContent>
<TabsContent value='sandbox'>
<PluginSandbox pluginKey={key} />
<TabsContent
value='sandbox'
keepMounted={sandboxVisited}
className={panelClassName}
>
{sandboxVisited && <PluginSandbox pluginKey={key} />}
</TabsContent>
</Tabs>
</div>
</SheetContent>
</Sheet>
)
}
/*
Copyright (C) 2023-2026 QuantumNous
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import type { ReactNode } from 'react'
import { useTranslation } from 'react-i18next'
import { CopyButton } from '@/components/copy-button'
import { Badge } from '@/components/ui/badge'
import { HOST_PROTOCOL_ENDPOINTS } from '../lib/host-protocols'
import type { TaskPluginMeta, TaskPluginRoute } from '../types'
import { PluginModelList } from './plugin-model-list'
/**
* One HTTP endpoint the gateway serves for this plugin. Methods and paths are
* wire vocabulary and stay raw; `children` carries the trailing annotations
* (supported request forms, native route type) that belong to this endpoint.
*/
function EndpointRow(props: {
method: string
path: string
children?: ReactNode
}) {
const { t } = useTranslation()
return (
<li className='grid grid-cols-[3.5rem_minmax(0,1fr)_auto] items-start gap-2 py-2'>
<Badge
variant='outline'
className='mt-1 justify-center font-mono font-normal'
>
{props.method}
</Badge>
<div className='min-w-0 space-y-1.5 pt-1'>
<span className='block font-mono text-xs break-all'>{props.path}</span>
<div className='flex flex-wrap items-center gap-1.5'>
{props.children}
</div>
</div>
<CopyButton
value={props.path}
className='size-7'
iconClassName='size-3.5'
aria-label={t('Copy endpoint path')}
/>
</li>
)
}
/**
* The endpoints a plugin exposes: first the host protocol endpoints derived
* from each `meta.protocols` claim, then the native routes it declares itself.
*
* The supported request forms of a mode-bearing protocol are rendered on the
* create endpoint rather than next to the protocol name, because `supports`
* gates exactly that call — retrieval of a created resource is always
* available. Mode names are wire vocabulary and are never translated.
*/
export function PluginEndpoints(props: {
title?: ReactNode
protocolsNote?: ReactNode
routesNote?: ReactNode
protocols?: TaskPluginMeta['protocols']
routes?: TaskPluginRoute[]
}) {
const { t } = useTranslation()
const claims = props.protocols ?? []
const routes = props.routes ?? []
return (
<div className='space-y-3'>
<h3 className='text-sm font-semibold'>{props.title ?? t('Endpoints')}</h3>
{claims.length === 0 &&
routes.length === 0 &&
!props.protocolsNote &&
!props.routesNote ? (
<p className='text-muted-foreground text-sm'>{t('Not declared')}</p>
) : null}
{props.protocolsNote}
{claims.length > 0 && (
<p className='text-xs font-medium'>
{t('Standard protocol interfaces')}
</p>
)}
{claims.map((claim) => {
const name = typeof claim === 'string' ? claim : claim.name
const supports = typeof claim === 'string' ? undefined : claim.supports
const models = typeof claim === 'string' ? undefined : claim.models
const endpoints = HOST_PROTOCOL_ENDPOINTS[name] ?? []
const modeLabels = {
stream: t('Streaming'),
sync: t('Synchronous'),
background: t('Background'),
}
const chips = supports?.map((mode) => (
<Badge
key={mode}
variant='secondary'
className='font-mono font-normal'
>
<span>{mode}</span>
<span className='font-sans'>{modeLabels[mode]}</span>
</Badge>
))
// Chips belong on the create row, but a claim naming a protocol absent
// from the frozen table has no rows at all; keep the declared forms
// visible on the group header rather than dropping them silently.
const hasCreateRow = endpoints.some((endpoint) => endpoint.modeBearing)
return (
<div key={name} className='bg-muted/30 space-y-1.5 rounded-md p-3'>
<div className='flex flex-wrap items-center gap-x-2 gap-y-1'>
<span className='text-muted-foreground min-w-0 font-mono text-xs break-all'>
{name}
</span>
{models?.length ? (
<PluginModelList
models={models}
collapsedLabel={t('Model scope')}
/>
) : null}
{hasCreateRow ? null : chips}
</div>
<ul className='divide-y'>
{endpoints.map((endpoint) => (
<EndpointRow
key={`${endpoint.method} ${endpoint.path}`}
method={endpoint.method}
path={endpoint.path}
>
<span className='text-muted-foreground text-xs'>
{endpoint.method === 'POST'
? t('Submit request')
: t('Retrieve result')}
</span>
{endpoint.modeBearing ? chips : null}
</EndpointRow>
))}
</ul>
</div>
)
})}
{props.routesNote}
{routes.length > 0 ? (
<div className='bg-muted/30 space-y-1.5 rounded-md p-3'>
<p className='text-muted-foreground text-xs'>
{t('Plugin-defined interfaces')}
</p>
<ul className='divide-y'>
{routes.map((route) => (
<EndpointRow
key={`${route.method} ${route.path}`}
method={route.method}
path={route.path}
>
<span className='text-muted-foreground font-mono text-[11px]'>
{route.type}
</span>
<span className='text-muted-foreground text-xs'>
{route.type === 'submit' && t('Submit request')}
{route.type === 'query' && t('Retrieve result')}
{route.type === 'dynamic' && t('Dynamic operation')}
</span>
{route.models?.length ? (
<PluginModelList
models={route.models}
collapsedLabel={t('Model scope')}
/>
) : null}
</EndpointRow>
))}
</ul>
</div>
) : null}
</div>
)
}
......@@ -16,10 +16,15 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import { useQuery } from '@tanstack/react-query'
import { useEffect, useState } from 'react'
import { api } from '@/lib/api'
import { getLobeIcon } from '@/lib/lobe-icon'
import { cn } from '@/lib/utils'
import {
pluginIconUrl,
resolvePluginIcon,
textAvatarClass,
type PluginIconInput,
......@@ -30,12 +35,88 @@ type PluginIconProps = {
size?: number
}
function GatewayPluginIcon(props: PluginIconProps) {
const query = useQuery({
queryKey: ['task-plugin', props.plugin.key, 'icon'],
queryFn: async ({ signal }) => {
// An img request cannot carry the dashboard Bearer token. Fetch through
// the shared client, then keep SVG in the browser's inert image mode.
const response = await api.get<Blob>(pluginIconUrl(props.plugin.key), {
responseType: 'blob',
signal,
// React Query owns deduplication and cancellation for this key. The
// HTTP client's shared promise can still belong to an aborted mount.
disableDuplicate: true,
skipErrorHandler: true,
skipBusinessError: true,
})
return response.data.type.startsWith('image/') ? response.data : null
},
staleTime: 5 * 60 * 1000,
retry: false,
})
const [image, setImage] = useState<{ blob: Blob; src: string } | null>(null)
useEffect(() => {
if (!query.data) return
const src = URL.createObjectURL(query.data)
setImage({ blob: query.data, src })
return () => URL.revokeObjectURL(src)
}, [query.data])
return (
<PluginIcon
plugin={{
...props.plugin,
hasIcon: false,
iconSrc: image?.blob === query.data ? image?.src : undefined,
}}
size={props.size}
/>
)
}
export function PluginIcon(props: PluginIconProps) {
const size = props.size ?? 20
const descriptor = resolvePluginIcon(props.plugin)
const [failedSrc, setFailedSrc] = useState<string | null>(null)
if (props.plugin.hasIcon && !props.plugin.iconSrc) {
return <GatewayPluginIcon key={props.plugin.key} {...props} />
}
let descriptor = resolvePluginIcon(props.plugin)
if (descriptor.kind === 'image' && descriptor.src === failedSrc) {
// The image did not load (missing file, blocked content type): show what
// the manifest declares instead of a broken-image glyph.
descriptor = resolvePluginIcon({
...props.plugin,
iconSrc: undefined,
hasIcon: false,
})
}
if (descriptor.kind === 'lobe') {
return <>{getLobeIcon(descriptor.name, size)}</>
}
if (descriptor.kind === 'image') {
const src = descriptor.src
// Logos are drawn only through <img>: the browser's image mode runs SVG
// without scripts, external loads, or DOM access, so no sanitizer is
// needed and the bytes must never reach dangerouslySetInnerHTML.
return (
<span
aria-hidden='true'
className='bg-muted/40 inline-flex shrink-0 items-center justify-center overflow-hidden rounded-md'
style={{ width: size, height: size }}
>
<img
src={src}
alt=''
width={size}
height={size}
draggable={false}
className='h-full w-full object-contain'
onError={() => setFailedSrc(src)}
/>
</span>
)
}
return (
<div
aria-hidden='true'
......
/*
Copyright (C) 2023-2026 QuantumNous
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import { AlertTriangle, CheckCircle2, ChevronDown, Info } from 'lucide-react'
import { useTranslation } from 'react-i18next'
import { CopyButton } from '@/components/copy-button'
import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert'
import { Button } from '@/components/ui/button'
import {
Collapsible,
CollapsibleContent,
CollapsibleTrigger,
} from '@/components/ui/collapsible'
import { Spinner } from '@/components/ui/spinner'
type PluginIntegrityCheckProps = {
compact?: boolean
expected?: string
digest?: string | null
isLoading: boolean
sourceAvailable: boolean
}
export function PluginIntegrityCheck(props: PluginIntegrityCheckProps) {
const { t } = useTranslation()
let status: 'pending' | 'verified' | 'failed' | 'unavailable' | 'missing' =
'missing'
let label = t('No integrity hash')
if (props.expected) {
status = 'unavailable'
label = props.sourceAvailable
? t('Integrity verification unavailable in this environment')
: t('File could not be verified')
if (props.isLoading) {
status = 'pending'
label = t('Checking file integrity...')
} else if (props.digest) {
status =
props.digest.toLowerCase() === props.expected.toLowerCase()
? 'verified'
: 'failed'
label =
status === 'verified'
? t('File integrity verified')
: t('Integrity check failed')
}
}
return (
<section
className={props.compact ? 'space-y-1' : 'space-y-3'}
aria-label={t('File verification')}
>
{!props.compact && (
<h3 className='text-sm font-medium'>{t('File verification')}</h3>
)}
<Alert
variant={status === 'failed' ? 'destructive' : 'default'}
className={props.compact ? 'py-2' : undefined}
>
{status === 'pending' && <Spinner />}
{status === 'verified' && (
<CheckCircle2
className='text-green-700 dark:text-green-400'
aria-hidden='true'
/>
)}
{status === 'failed' && <AlertTriangle aria-hidden='true' />}
{(status === 'unavailable' || status === 'missing') && (
<Info aria-hidden='true' />
)}
<AlertTitle>{label}</AlertTitle>
<AlertDescription className='text-xs leading-relaxed'>
{status === 'failed' &&
t(
'The downloaded source does not match the sha256 declared in the index. Do not install it.'
)}
{status === 'unavailable' &&
t(
'The source is unavailable or this browser cannot calculate SHA-256. The gateway checks the published hash during installation.'
)}
{status === 'missing' &&
t(
'This source does not publish a sha256 for this version, so the downloaded source cannot be pinned to what the source intended.'
)}
{(status === 'verified' || status === 'pending') &&
t(
'A matching hash confirms the published file, not the safety of its code.'
)}
</AlertDescription>
</Alert>
{props.expected && (
<Collapsible>
<CollapsibleTrigger
render={
<Button
variant='ghost'
size='sm'
className='group h-auto gap-1 px-1 py-1 text-xs'
/>
}
>
{t('Integrity hash')}
<ChevronDown
className='size-3 transition-transform group-aria-expanded:rotate-180'
aria-hidden='true'
/>
</CollapsibleTrigger>
<CollapsibleContent>
<div className='bg-muted/20 mt-2 flex min-w-0 items-start gap-2 rounded-lg border p-3'>
<code className='min-w-0 flex-1 text-xs leading-relaxed break-all'>
{props.expected}
</code>
<CopyButton
value={props.expected}
className='size-6'
iconClassName='size-3.5'
/>
</div>
</CollapsibleContent>
</Collapsible>
)}
</section>
)
}
......@@ -16,199 +16,116 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import type { ReactNode } from 'react'
import { useTranslation } from 'react-i18next'
import { CopyButton } from '@/components/copy-button'
import { Badge } from '@/components/ui/badge'
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'
import { getChannelTypeLabel } from '@/features/channels/lib/channel-utils'
import { HOST_PROTOCOL_ENDPOINTS } from '../lib/host-protocols'
import type { TaskPluginMeta, TaskPluginRoute } from '../types'
import { getPluginWebsite } from '../lib/plugin-website'
import type { TaskPluginMeta } from '../types'
import { PluginEndpoints } from './plugin-endpoints'
import { PluginModelList } from './plugin-model-list'
import { PluginWebsiteLink } from './plugin-website-link'
type PluginMetadataCardProps = {
meta: TaskPluginMeta
}
/**
* Marks a protocol claim or native route that binds only a subset of
* `meta.models`. The subset can be long enough to dominate the section, so the
* members stay in the title tooltip and only the marker is laid out.
*/
function ModelScopeHint(props: { models: string[] }) {
const { t } = useTranslation()
return (
<span
className='text-muted-foreground text-[11px]'
title={props.models.join(', ')}
>
{t('Model scope')}
</span>
)
}
/**
* One HTTP endpoint the gateway serves for this plugin. Methods and paths are
* wire vocabulary and stay raw; `children` carries the trailing annotations
* (supported request forms, native route type) that belong to this endpoint.
*/
function EndpointRow(props: {
method: string
path: string
children?: ReactNode
}) {
return (
<li className='flex flex-wrap items-center gap-x-2 gap-y-1'>
<Badge variant='outline' className='shrink-0 font-mono font-normal'>
{props.method}
</Badge>
<span className='min-w-0 font-mono text-xs break-all' title={props.path}>
{props.path}
</span>
{props.children}
</li>
)
}
/**
* The endpoints a plugin exposes: first the host protocol endpoints derived
* from each `meta.protocols` claim, then the native routes it declares itself.
*
* The supported request forms of a mode-bearing protocol are rendered on the
* create endpoint rather than next to the protocol name, because `supports`
* gates exactly that call — retrieval of a created resource is always
* available. Mode names are wire vocabulary and are never translated.
*/
function PluginEndpoints(props: {
protocols?: TaskPluginMeta['protocols']
routes?: TaskPluginRoute[]
}) {
const { t } = useTranslation()
const claims = props.protocols ?? []
const routes = props.routes ?? []
return (
<div className='space-y-3'>
<p className='text-muted-foreground text-xs font-medium'>
{t('Endpoints')}
</p>
{claims.length === 0 && routes.length === 0 ? (
<p className='text-muted-foreground text-xs'>—</p>
) : null}
{claims.map((claim) => {
const name = typeof claim === 'string' ? claim : claim.name
const supports = typeof claim === 'string' ? undefined : claim.supports
const models = typeof claim === 'string' ? undefined : claim.models
const endpoints = HOST_PROTOCOL_ENDPOINTS[name] ?? []
const chips = supports?.map((mode) => (
<Badge
key={mode}
variant='secondary'
className='font-mono font-normal'
>
{mode}
</Badge>
))
// Chips belong on the create row, but a claim naming a protocol absent
// from the frozen table has no rows at all; keep the declared forms
// visible on the group header rather than dropping them silently.
const hasCreateRow = endpoints.some((endpoint) => endpoint.modeBearing)
return (
<div key={name} className='space-y-1.5'>
<div className='flex flex-wrap items-center gap-x-2 gap-y-1'>
<span className='text-muted-foreground font-mono text-xs'>
{name}
</span>
{models?.length ? <ModelScopeHint models={models} /> : null}
{hasCreateRow ? null : chips}
</div>
<ul className='space-y-1.5 pl-3'>
{endpoints.map((endpoint) => (
<EndpointRow
key={`${endpoint.method} ${endpoint.path}`}
method={endpoint.method}
path={endpoint.path}
>
{endpoint.modeBearing ? chips : null}
</EndpointRow>
))}
</ul>
</div>
)
})}
{routes.length > 0 ? (
<div className='space-y-1.5'>
<p className='text-muted-foreground text-xs'>{t('Native routes')}</p>
<ul className='space-y-1.5 pl-3'>
{routes.map((route) => (
<EndpointRow
key={`${route.method} ${route.path}`}
method={route.method}
path={route.path}
>
<span className='text-muted-foreground font-mono text-[11px]'>
{route.type}
</span>
{route.models?.length ? (
<ModelScopeHint models={route.models} />
) : null}
</EndpointRow>
))}
</ul>
</div>
) : null}
</div>
)
}
type PluginMetadataCardProps = { meta: TaskPluginMeta }
/**
* The manifest facts an administrator checks before binding a channel: the
* scalar declarations, then every endpoint the gateway serves for this plugin.
* Labels are translated; manifest values stay raw and monospaced so they can be
* compared against the plugin source verbatim.
*/
export function PluginMetadataCard(props: PluginMetadataCardProps) {
const { t } = useTranslation()
const fields: { label: string; value: string; wide?: boolean }[] = [
{ label: t('Version'), value: props.meta.version },
{ label: t('API version'), value: String(props.meta.apiVersion) },
{
label: t('Channel types'),
value: props.meta.channelTypes?.join(', ') ?? '',
},
const models = props.meta.models ?? []
const fields = [
{ label: t('Sort priority'), value: String(props.meta.sortPriority ?? 0) },
{ label: t('Fetch mode'), value: props.meta.fetchMode },
{
label: t('Models'),
value: props.meta.models?.join(', ') ?? '',
wide: true,
label: t('Channel types'),
value: props.meta.channelTypes?.length
? props.meta.channelTypes
.map((type) => `${t(getChannelTypeLabel(type))} (#${type})`)
.join(', ')
: t('Task Plugin'),
},
]
let canCopyBaseUrl = false
try {
const url = new URL(props.meta.baseUrl ?? '')
canCopyBaseUrl = url.protocol === 'https:' || url.protocol === 'http:'
} catch {
/* A missing or invalid URL is displayed verbatim without a copy action. */
}
return (
<Card>
<CardHeader>
<CardTitle>{t('Plugin metadata')}</CardTitle>
</CardHeader>
<CardContent className='space-y-4'>
<dl className='grid gap-x-4 gap-y-3 sm:grid-cols-2'>
{fields.map((field) => (
<div
key={field.label}
className={field.wide ? 'sm:col-span-2' : ''}
<div className='min-w-0 space-y-4'>
<section
className='rounded-lg border p-4'
aria-label={t('Plugin metadata')}
>
<h3 className='mb-4 text-sm font-semibold'>{t('Plugin metadata')}</h3>
<dl className='grid gap-x-6 gap-y-4 sm:grid-cols-2'>
{fields.map((field) => (
<div key={field.label} className='min-w-0 space-y-1'>
<dt className='text-muted-foreground text-xs'>{field.label}</dt>
<dd className='font-mono text-xs break-words'>
{field.value || '—'}
<dd className='text-sm break-words'>
{field.value || t('Not declared')}
</dd>
</div>
))}
<div className='min-w-0 space-y-1'>
<dt className='text-muted-foreground text-xs'>
{t('Plugin website')}
</dt>
<dd>
{getPluginWebsite(props.meta.website) ? (
<PluginWebsiteLink website={props.meta.website} />
) : (
<span className='text-sm'>{t('Not declared')}</span>
)}
</dd>
</div>
<div className='min-w-0 space-y-1 sm:col-span-2'>
<dt className='text-muted-foreground text-xs'>
{t('Default base URL')}
</dt>
<dd className='flex items-start gap-2'>
<span className='min-w-0 flex-1 pt-1 font-mono text-xs break-all'>
{props.meta.baseUrl || t('Not declared')}
</span>
{canCopyBaseUrl && (
<CopyButton
value={props.meta.baseUrl ?? ''}
className='size-7'
iconClassName='size-3.5'
aria-label={t('Copy base URL')}
/>
)}
</dd>
</div>
</dl>
<div className='border-t pt-4'>
</section>
<section className='rounded-lg border p-4' aria-label={t('Models')}>
<div className='mb-3 flex items-center gap-2'>
<h3 className='text-sm font-semibold'>{t('Models')}</h3>
<Badge variant='secondary'>{models.length}</Badge>
{models.length > 0 && (
<CopyButton
value={models.join('\n')}
className='ml-auto size-7'
iconClassName='size-3.5'
aria-label={t('Copy all models')}
/>
)}
</div>
{models.length ? (
<PluginModelList models={models} maxVisible={models.length} />
) : (
<p className='text-muted-foreground text-sm'>{t('Not declared')}</p>
)}
</section>
<section className='rounded-lg border p-4' aria-label={t('Endpoints')}>
<PluginEndpoints
protocols={props.meta.protocols}
routes={props.meta.routes}
/>
</section>
</div>
</CardContent>
</Card>
)
}
/*
Copyright (C) 2023-2026 QuantumNous
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import { ChevronDown } from 'lucide-react'
import { useTranslation } from 'react-i18next'
import { Badge } from '@/components/ui/badge'
import { Button } from '@/components/ui/button'
import {
Collapsible,
CollapsibleContent,
CollapsibleTrigger,
} from '@/components/ui/collapsible'
import {
Popover,
PopoverContent,
PopoverTrigger,
} from '@/components/ui/popover'
type PluginModelListProps = {
models: string[]
collapsedLabel?: string
maxVisible?: number
}
/** Model lists remain available to touch and keyboard users, even on narrow screens. */
export function PluginModelList(props: PluginModelListProps) {
const { t } = useTranslation()
if (props.collapsedLabel) {
return (
<Popover>
<PopoverTrigger render={<Button variant='outline' size='xs' />}>
{props.collapsedLabel}
</PopoverTrigger>
<PopoverContent
aria-label={props.collapsedLabel}
className='max-h-64 max-w-[calc(100vw-2rem)] overflow-y-auto'
>
<p className='mb-2 text-sm font-medium'>{props.collapsedLabel}</p>
<ul className='space-y-1 font-mono text-xs'>
{props.models.map((model) => (
<li key={model} className='break-all'>
{model}
</li>
))}
</ul>
</PopoverContent>
</Popover>
)
}
const visible = props.models.slice(0, props.maxVisible ?? 6)
const hidden = props.models.slice(props.maxVisible ?? 6)
return (
<div className='min-w-0 space-y-2'>
{visible.length > 0 && (
<div className='flex flex-wrap gap-1.5'>
{visible.map((model) => (
<Badge
key={model}
variant='secondary'
className='h-auto max-w-full rounded-md font-mono font-normal break-all whitespace-normal'
>
{model}
</Badge>
))}
</div>
)}
{hidden.length > 0 && (
<Collapsible>
<CollapsibleTrigger
render={
<Button
variant='ghost'
size='sm'
className='h-auto max-w-full gap-1 px-1 py-1 text-xs whitespace-normal'
/>
}
>
{props.collapsedLabel ??
t('More models ({{count}})', { count: hidden.length })}
<ChevronDown className='size-3 shrink-0' aria-hidden='true' />
</CollapsibleTrigger>
<CollapsibleContent>
<div className='flex flex-wrap gap-1.5 pt-2'>
{hidden.map((model) => (
<Badge
key={model}
variant='secondary'
className='h-auto max-w-full rounded-md font-mono font-normal break-all whitespace-normal'
>
{model}
</Badge>
))}
</div>
</CollapsibleContent>
</Collapsible>
)}
</div>
)
}
/*
Copyright (C) 2023-2026 QuantumNous
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import { LinkSquare01Icon } from '@hugeicons/core-free-icons'
import { HugeiconsIcon } from '@hugeicons/react'
import { useTranslation } from 'react-i18next'
import { Button } from '@/components/ui/button'
import { getPluginWebsite } from '../lib/plugin-website'
export function PluginWebsiteLink(props: { website?: string }) {
const { t } = useTranslation()
const website = getPluginWebsite(props.website)
if (!website) return null
return (
<Button
role='link'
variant='link'
size='xs'
className='h-auto max-w-full justify-start px-0 text-xs whitespace-normal'
render={<a href={website} target='_blank' rel='noopener noreferrer' />}
>
<HugeiconsIcon icon={LinkSquare01Icon} aria-hidden='true' />
{t('Plugin website')}
</Button>
)
}
......@@ -47,6 +47,7 @@ import { isStaleFactoryOverride } from '../lib/marketplace'
import type { TaskPluginListItem, TaskPluginUsage } from '../types'
import { PluginCard } from './plugin-card'
import { PluginIcon } from './plugin-icon'
import { PluginWebsiteLink } from './plugin-website-link'
const VIEW_MODE_STORAGE_KEY = 'task-plugins-view-mode'
......@@ -68,6 +69,10 @@ export function PluginsTable(props: PluginsTableProps) {
const [statusTarget, setStatusTarget] = useState<TaskPluginListItem | null>(
null
)
const [statusConfirmation, setStatusConfirmation] = useState<{
plugin: TaskPluginListItem
enabled: boolean
} | null>(null)
const pluginsQuery = useQuery({
queryKey: ['task-plugins'],
queryFn: listTaskPlugins,
......@@ -84,11 +89,14 @@ export function PluginsTable(props: PluginsTableProps) {
}) => setTaskPluginStatus(key, enabled, options),
onSuccess: () => {
queryClient.invalidateQueries({ queryKey: ['task-plugins'] })
setStatusConfirmation(null)
setStatusTarget(null)
setBlockedAction(null)
setBlockedUsage(null)
},
onError: (error) => {
if (error instanceof TaskPluginUsageError) {
setStatusConfirmation(null)
setBlockedUsage(error.usage)
setBlockedAction('disable')
return
......@@ -130,7 +138,13 @@ export function PluginsTable(props: PluginsTableProps) {
title={description || undefined}
>
<span className='shrink-0'>
<PluginIcon plugin={row.original.meta} size={18} />
<PluginIcon
plugin={{
...row.original.meta,
hasIcon: row.original.has_icon,
}}
size={18}
/>
</span>
<div className='min-w-0'>
<div className='truncate text-sm font-medium'>
......@@ -139,6 +153,7 @@ export function PluginsTable(props: PluginsTableProps) {
<div className='text-muted-foreground truncate font-mono text-xs'>
{row.original.meta.key}
</div>
<PluginWebsiteLink website={row.original.meta.website} />
</div>
</div>
)
......@@ -190,11 +205,11 @@ export function PluginsTable(props: PluginsTableProps) {
cell: ({ row }) => {
const channelTypes = row.original.meta.channelTypes ?? []
if (channelTypes.length === 0) {
return <span className='text-muted-foreground text-xs'>—</span>
return <span className='text-xs'>{t('Task Plugin')}</span>
}
return (
<span className='text-xs'>
{getChannelTypeLabel(channelTypes[0])}
{t(getChannelTypeLabel(channelTypes[0]))}
<span className='text-muted-foreground ml-1'>
{channelTypes.map((type) => `#${type}`).join(' ')}
</span>
......@@ -203,15 +218,6 @@ export function PluginsTable(props: PluginsTableProps) {
},
},
{
accessorKey: 'meta.apiVersion',
header: t('API version'),
cell: ({ row }) => (
<span className='font-mono text-xs'>
v{row.original.meta.apiVersion}
</span>
),
},
{
id: 'models',
header: t('Models'),
cell: ({ row }) => row.original.meta.models?.length ?? 0,
......@@ -227,9 +233,8 @@ export function PluginsTable(props: PluginsTableProps) {
checked={row.original.enabled}
disabled={statusMutation.isPending}
onCheckedChange={(checked) => {
setStatusTarget(row.original)
statusMutation.mutate({
key: row.original.meta.key,
setStatusConfirmation({
plugin: row.original,
enabled: checked,
})
}}
......@@ -364,6 +369,42 @@ export function PluginsTable(props: PluginsTableProps) {
toolbarProps={{ searchPlaceholder: t('Filter plugins...') }}
/>
<ConfirmDialog
open={Boolean(statusConfirmation)}
onOpenChange={(open) => {
if (!open && !statusMutation.isPending) setStatusConfirmation(null)
}}
title={
statusConfirmation?.enabled
? t('Enable plugin?')
: t('Disable plugin?')
}
desc={
statusConfirmation?.enabled
? t('Are you sure you want to enable plugin {{name}} ({{key}})?', {
name: statusConfirmation.plugin.meta.name,
key: statusConfirmation.plugin.meta.key,
})
: t(
'Disable plugin {{name}} ({{key}})? Requests using this plugin may be affected.',
{
name: statusConfirmation?.plugin.meta.name,
key: statusConfirmation?.plugin.meta.key,
}
)
}
destructive={!statusConfirmation?.enabled}
isLoading={statusMutation.isPending}
confirmText={statusConfirmation?.enabled ? t('Enable') : t('Disable')}
handleConfirm={() => {
if (!statusConfirmation || statusMutation.isPending) return
setStatusTarget(statusConfirmation.plugin)
statusMutation.mutate({
key: statusConfirmation.plugin.meta.key,
enabled: statusConfirmation.enabled,
})
}}
/>
<ConfirmDialog
open={Boolean(deleteTarget)}
onOpenChange={(open) => {
if (!open) setDeleteTarget(null)
......
......@@ -18,7 +18,9 @@ For commercial licensing, please contact support@quantumnous.com
*/
import { useTranslation } from 'react-i18next'
type SourceDiffProps = { before: string; after: string }
import { cn } from '@/lib/utils'
type SourceDiffProps = { before: string; after: string; className?: string }
type DiffLine = { id: string; kind: 'same' | 'added' | 'removed'; text: string }
......@@ -60,10 +62,23 @@ function diffLines(before: string, after: string): DiffLine[] {
export function SourceDiff(props: SourceDiffProps) {
const { t } = useTranslation()
if (props.before === props.after) {
return (
<p
role='status'
className='text-muted-foreground rounded-md border px-3 py-6 text-center text-sm'
>
{t('No source changes')}
</p>
)
}
const lines = diffLines(props.before, props.after)
return (
<div
className='max-h-96 overflow-auto rounded-md border font-mono text-xs'
className={cn(
'max-h-96 overflow-auto rounded-md border font-mono text-xs',
props.className
)}
aria-label={t('Source diff')}
>
{lines.map((line) => {
......
......@@ -26,16 +26,27 @@ import { CodeBlockEditor } from '@/components/ai-elements/code-block'
import { Dialog } from '@/components/dialog'
import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert'
import { Button } from '@/components/ui/button'
import { Field, FieldGroup, FieldLabel } from '@/components/ui/field'
import {
Field,
FieldDescription,
FieldError,
FieldGroup,
FieldLabel,
} from '@/components/ui/field'
import { Input } from '@/components/ui/input'
import { Spinner } from '@/components/ui/spinner'
import { uploadTaskPlugin } from '../api'
import {
encodePluginIconFile,
PluginIconFileError,
} from '../lib/plugin-icon-file'
import {
MAX_PLUGIN_SOURCE_BYTES,
pluginSourceByteLength,
} from '../lib/plugin-url'
import type { TaskPluginDetail } from '../types'
import { PluginIcon } from './plugin-icon'
import { PluginSourcePicker } from './plugin-source-picker'
import { PluginUrlImportField } from './plugin-url-import-field'
......@@ -51,11 +62,14 @@ export function UploadDialog(props: UploadDialogProps) {
const [source, setSource] = useState('')
const [fileName, setFileName] = useState('')
const [remark, setRemark] = useState('')
const [icon, setIcon] = useState('')
const [iconFileName, setIconFileName] = useState('')
const [iconError, setIconError] = useState('')
const [result, setResult] = useState<TaskPluginDetail | null>(null)
const [importUrl, setImportUrl] = useState('')
const [importError, setImportError] = useState('')
const mutation = useMutation({
mutationFn: () => uploadTaskPlugin(source, remark),
mutationFn: () => uploadTaskPlugin(source, remark, icon),
onSuccess: (data) => {
setResult(data)
queryClient.invalidateQueries({ queryKey: ['task-plugins'] })
......@@ -82,12 +96,36 @@ export function UploadDialog(props: UploadDialogProps) {
setResult(null)
}
const handleIconFile = async (file: File | undefined) => {
if (!file) return
try {
setIcon(await encodePluginIconFile(file))
setIconFileName(file.name)
setIconError('')
} catch (error) {
setIcon('')
setIconFileName('')
if (
error instanceof PluginIconFileError &&
error.reason === 'too_large'
) {
setIconError(t('Plugin icon exceeds the 512 KiB limit.'))
} else {
setIconError(t('Plugin icon must be an .svg or .png file.'))
}
}
setResult(null)
}
const close = (open: boolean) => {
props.onOpenChange(open)
if (!open) {
setSource('')
setFileName('')
setRemark('')
setIcon('')
setIconFileName('')
setIconError('')
setResult(null)
setImportUrl('')
setImportError('')
......@@ -178,6 +216,49 @@ export function UploadDialog(props: UploadDialogProps) {
/>
<Field>
<FieldLabel htmlFor='task-plugin-icon'>{t('Plugin icon')}</FieldLabel>
<div className='flex items-center gap-3'>
{icon ? (
<PluginIcon
plugin={{ key: result?.meta.key ?? 'upload', iconSrc: icon }}
size={32}
/>
) : null}
<Input
id='task-plugin-icon'
type='file'
accept='.svg,.png,image/svg+xml,image/png'
aria-invalid={iconError ? true : undefined}
onChange={(event) => {
void handleIconFile(event.target.files?.[0])
event.target.value = ''
}}
/>
{icon ? (
<Button
type='button'
variant='ghost'
size='sm'
onClick={() => {
setIcon('')
setIconFileName('')
setIconError('')
}}
>
{t('Remove')}
</Button>
) : null}
</div>
<FieldDescription>
{iconFileName ||
t(
'Optional icon.svg or icon.png shipped next to plugin.js, up to 512 KiB. Stored separately from the source.'
)}
</FieldDescription>
{iconError ? <FieldError>{iconError}</FieldError> : null}
</Field>
<Field>
<FieldLabel htmlFor='task-plugin-remark'>{t('Remark')}</FieldLabel>
<Input
id='task-plugin-remark'
......@@ -204,8 +285,7 @@ export function UploadDialog(props: UploadDialogProps) {
<CircleCheck className='text-primary' />
<AlertTitle>{t('Parsed plugin metadata')}</AlertTitle>
<AlertDescription className='font-mono'>
{result.meta.key} · {result.meta.name} · v{result.meta.version} ·
API v{result.meta.apiVersion}
{result.meta.key} · {result.meta.name} · v{result.meta.version}
</AlertDescription>
</Alert>
) : null}
......
......@@ -26,6 +26,7 @@ import {
TableHeader,
TableRow,
} from '@/components/ui/table'
import { taskEnumLabel } from '@/features/pricing/lib/task-price-display'
import type { BillingUsageSchema } from '@/features/pricing/types'
import { resolveLocalizedText } from '@/lib/localized-text'
......@@ -73,13 +74,24 @@ export function UsageSchemaTable(props: UsageSchemaTableProps) {
<TableBody>
{entries.map(([name, definition]) => (
<TableRow key={name}>
<TableCell className='font-mono'>{name}</TableCell>
<TableCell className='max-w-64 font-mono text-xs break-words whitespace-normal'>
{name}
</TableCell>
<TableCell>{t(getUsageTypeLabelKey(definition.type))}</TableCell>
<TableCell>{formatUsageUnit(definition.unit, t)}</TableCell>
<TableCell className='font-mono'>
{definition.enum?.join(', ') || '—'}
<TableCell className='max-w-64 font-mono text-xs break-words whitespace-normal'>
{definition.enum
?.map((value) => {
const label = taskEnumLabel(
definition,
value,
i18n.language
)
return label === value ? value : `${value} → ${label}`
})
.join(', ') || '—'}
</TableCell>
<TableCell className='min-w-48 whitespace-normal'>
<TableCell className='min-w-48 break-words whitespace-normal'>
{resolveLocalizedText(definition.description, i18n.language) ||
'—'}
</TableCell>
......
......@@ -20,8 +20,11 @@ import type {
MarketplaceIndex,
MarketplaceIndexVersion,
MarketplacePlugin,
MarketplacePluginIcon,
TaskPluginListItem,
} from '../types'
import { pluginProtocolClaimsSchema } from './plugin-meta-preview'
import { getPluginWebsite } from './plugin-website'
export const SUPPORTED_INDEX_VERSION = 1
......@@ -89,7 +92,12 @@ export function parseMarketplaceIndex(payload: unknown): MarketplaceIndex {
return {
indexVersion,
name: typeof raw.name === 'string' ? raw.name : '',
plugins,
plugins: plugins.sort((left, right) => {
const difference = (right.sortPriority ?? 0) - (left.sortPriority ?? 0)
if (difference !== 0) return difference
if (left.key === right.key) return 0
return left.key < right.key ? -1 : 1
}),
}
}
......@@ -124,6 +132,10 @@ function parseMarketplacePlugin(entry: unknown): MarketplacePlugin | null {
: undefined,
kind: kind || undefined,
allowedHosts: stringArray(rawVersion.allowedHosts),
baseUrl:
typeof rawVersion.baseUrl === 'string' && rawVersion.baseUrl.trim()
? rawVersion.baseUrl.trim()
: undefined,
auth: typeof rawVersion.auth === 'string' ? rawVersion.auth : undefined,
})
}
......@@ -135,21 +147,55 @@ function parseMarketplacePlugin(entry: unknown): MarketplacePlugin | null {
? declaredLatest
: versions[0].version
// `icon` is a LobeHub name or the text scheme, exactly what meta.icon admits.
// Inline data URIs and remote URLs are dropped: image logos ship as sidecar
// files declared in `iconFile`, and are only ever loaded from the index's own
// origin, so an index cannot turn the marketplace page into a beacon.
let icon: string | undefined
if (typeof raw.icon === 'string') {
const trimmed = raw.icon.trim()
if (trimmed && trimmed.length <= 128) {
if (
trimmed &&
trimmed.length <= 128 &&
!trimmed.startsWith('data:') &&
!trimmed.includes('://')
) {
icon = trimmed
}
}
let iconFile: MarketplacePluginIcon | undefined
if (raw.iconFile && typeof raw.iconFile === 'object') {
const rawIconFile = raw.iconFile as Record<string, unknown>
const iconPath =
typeof rawIconFile.path === 'string' ? rawIconFile.path.trim() : ''
if (/\.(svg|png)$/i.test(iconPath)) {
iconFile = {
path: iconPath,
sha256:
typeof rawIconFile.sha256 === 'string'
? rawIconFile.sha256.trim()
: undefined,
}
}
}
return {
key,
sortPriority:
typeof raw.sortPriority === 'number' &&
Number.isInteger(raw.sortPriority) &&
raw.sortPriority >= -2147483648 &&
raw.sortPriority <= 2147483647
? raw.sortPriority
: 0,
website: getPluginWebsite(raw.website),
name: typeof raw.name === 'string' && raw.name ? raw.name : key,
icon,
iconFile,
description: parseMarketplaceDescription(raw.description),
channelTypes: numberArray(raw.channelTypes),
models: stringArray(raw.models),
protocols: pluginProtocolClaimsSchema.safeParse(raw.protocols).data,
latest,
versions,
}
......@@ -173,8 +219,10 @@ function parseMarketplaceDescription(
function stringArray(value: unknown): string[] | undefined {
if (!Array.isArray(value)) return undefined
const items = value.filter((item): item is string => typeof item === 'string')
return items.length > 0 ? items : undefined
if (!value.every((item) => typeof item === 'string' && item.length > 0)) {
return undefined
}
return value
}
function numberArray(value: unknown): number[] | undefined {
......@@ -234,25 +282,6 @@ export function deriveInstallState(
}
}
export type MarketplaceActionPolicy =
| { kind: 'install' }
| { kind: 'system_update' }
/**
* Factory-served plugins are compiled into the binary and must only update
* with a system release. Marketplace install would create a permanent override
* that shadows every future built-in update — that action is suppressed.
* Overrides and third-party plugins still install/upgrade normally.
*/
export function resolveMarketplaceActionPolicy(
installed?: TaskPluginListItem
): MarketplaceActionPolicy {
if (installed?.source === 'factory') {
return { kind: 'system_update' }
}
return { kind: 'install' }
}
/**
* Built-in version shown next to the marketplace latest. Factory-served items
* do not carry `factory_meta` (their `meta` *is* the factory meta); overridden
......
/*
Copyright (C) 2023-2026 QuantumNous
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
/** Mirrors the gateway's cap on an uploaded plugin logo. */
export const MAX_PLUGIN_ICON_BYTES = 512 * 1024
export type PluginIconMediaType = 'image/png' | 'image/svg+xml'
/**
* Media type of a sidecar logo file, decided by extension because browsers
* report an empty or vendor-specific type for SVG files on some platforms.
* Returns null for anything that is not icon.svg / icon.png material.
*/
export function pluginIconMediaType(
fileName: string
): PluginIconMediaType | null {
const lower = fileName.toLowerCase()
if (lower.endsWith('.svg')) return 'image/svg+xml'
if (lower.endsWith('.png')) return 'image/png'
return null
}
export type PluginIconFileFailure = 'unsupported_type' | 'too_large'
export class PluginIconFileError extends Error {
constructor(public reason: PluginIconFileFailure) {
super(reason)
}
}
function bytesToBase64(bytes: Uint8Array): string {
let binary = ''
const chunk = 0x8000
for (let offset = 0; offset < bytes.length; offset += chunk) {
binary += String.fromCharCode(...bytes.subarray(offset, offset + chunk))
}
return btoa(binary)
}
/**
* Encodes a sidecar logo as the data URI the upload endpoint stores. The bytes
* never enter the plugin source; they travel in their own request field.
*/
export async function encodePluginIconFile(file: File): Promise<string> {
const mediaType = pluginIconMediaType(file.name)
if (!mediaType) throw new PluginIconFileError('unsupported_type')
if (file.size > MAX_PLUGIN_ICON_BYTES) {
throw new PluginIconFileError('too_large')
}
const bytes = new Uint8Array(await file.arrayBuffer())
return `data:${mediaType};base64,${bytesToBase64(bytes)}`
}
async function sha256Hex(
bytes: Uint8Array<ArrayBuffer>
): Promise<string | null> {
if (!globalThis.crypto?.subtle) return null
const digest = await globalThis.crypto.subtle.digest('SHA-256', bytes)
return [...new Uint8Array(digest)]
.map((byte) => byte.toString(16).padStart(2, '0'))
.join('')
}
export type FetchPluginIconOptions = {
/** Index-declared digest; a mismatch yields null so a swapped file is never shown or stored. */
sha256?: string
fetchImpl?: typeof fetch
}
/**
* Fetches a marketplace plugin's sidecar logo from the index repository and
* returns it as a data URI, both for display and for the upload request. The
* bytes are fetched rather than linked with `<img src>` because raw hosting
* such as raw.githubusercontent.com serves SVG as text/plain with nosniff,
* which browsers refuse to render as an image. Returns null when the fetch
* fails, the file is not an SVG/PNG within the cap, or the digest does not
* match: a logo must never block installation, so errors are swallowed.
*/
export async function fetchPluginIconDataUri(
url: string,
options: FetchPluginIconOptions = {}
): Promise<string | null> {
const mediaType = pluginIconMediaType(new URL(url).pathname)
if (!mediaType) return null
const fetchImpl = options.fetchImpl ?? globalThis.fetch
let response: Response
try {
response = await fetchImpl(url)
} catch {
return null
}
if (!response.ok) return null
const bytes = new Uint8Array(await response.arrayBuffer())
if (bytes.length === 0 || bytes.length > MAX_PLUGIN_ICON_BYTES) return null
const expected = options.sha256?.trim().toLowerCase()
if (expected) {
const actual = await sha256Hex(bytes)
if (actual !== null && actual !== expected) return null
}
return `data:${mediaType};base64,${bytesToBase64(bytes)}`
}
......@@ -16,29 +16,51 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import { getChannelTypeIcon } from '@/features/channels/lib/channel-utils'
export type PluginIconDescriptor =
| { kind: 'lobe'; name: string }
| { kind: 'image'; src: string }
| { kind: 'text'; label: string; colorSeed: string }
/**
* Where the gateway serves a plugin's sidecar logo (icon.svg / icon.png shipped
* next to plugin.js). The bytes never travel inside list JSON; the browser
* loads them like any other image.
*/
export function pluginIconUrl(key: string, version?: string): string {
const base = `/api/plugin/task/${encodeURIComponent(key)}/icon`
return version ? `${base}?version=${encodeURIComponent(version)}` : base
}
export type PluginIconInput = {
icon?: string
channelTypes?: number[] | null
key: string
name?: string
/** True when the gateway holds a sidecar logo for this plugin. */
hasIcon?: boolean
/** Direct image source, used by marketplace cards whose logo lives in the index repository. */
iconSrc?: string
}
/**
* Resolves how a plugin logo should render.
*
* Priority: explicit `icon` (a LobeHub icon name, or the `text` /
* `text:<label>` scheme for a generated text avatar), then the first declared
* channel type's icon, then a text avatar derived from the plugin name — so a
* plugin without any logo still gets a stable, branded-looking mark instead of
* a generic placeholder.
* Priority: a shipped image logo (`iconSrc`, or `hasIcon` served by the
* gateway), then explicit `meta.icon` (a LobeHub icon name, or the `text` /
* `text:<label>` scheme for a generated text avatar), then a text avatar derived
* from the plugin name. Channel compatibility does not imply brand identity.
* Inline data URIs and remote URLs in `meta.icon` are
* not honoured: logos ship as sidecar files, never inside the manifest.
*/
export function resolvePluginIcon(input: PluginIconInput): PluginIconDescriptor {
export function resolvePluginIcon(
input: PluginIconInput
): PluginIconDescriptor {
if (input.iconSrc) {
return { kind: 'image', src: input.iconSrc }
}
if (input.hasIcon) {
return { kind: 'image', src: pluginIconUrl(input.key) }
}
const icon = input.icon?.trim()
if (icon) {
if (icon === 'text' || icon.startsWith('text:')) {
......@@ -49,11 +71,9 @@ export function resolvePluginIcon(input: PluginIconInput): PluginIconDescriptor
colorSeed: input.key,
}
}
if (!icon.startsWith('data:') && !icon.includes('://')) {
return { kind: 'lobe', name: icon }
}
const channelTypes = input.channelTypes
if (channelTypes != null && channelTypes.length > 0) {
return { kind: 'lobe', name: `${getChannelTypeIcon(channelTypes[0])}.Color` }
}
return { kind: 'text', label: deriveTextLabel(input), colorSeed: input.key }
}
......
/*
Copyright (C) 2023-2026 QuantumNous
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import { javascriptLanguage } from '@codemirror/lang-javascript'
import { z } from 'zod'
import type {
MarketplaceIndexVersion,
MarketplacePlugin,
PluginMetaPreview,
PluginPreviewField,
PluginPreviewValues,
} from '../types'
import { MAX_PLUGIN_SOURCE_BYTES, pluginSourceByteLength } from './plugin-url'
const nonemptyString = z.string().min(1)
export const pluginProtocolClaimsSchema = z.array(
z.union([
nonemptyString,
z.object({
name: nonemptyString,
models: z.array(nonemptyString).optional(),
supports: z.array(z.enum(['stream', 'sync', 'background'])).optional(),
}),
])
)
const previewSchemas = {
models: z.array(nonemptyString),
protocols: pluginProtocolClaimsSchema,
routes: z.array(
z.object({
method: nonemptyString,
path: nonemptyString,
type: z.enum(['submit', 'query', 'dynamic']),
models: z.array(nonemptyString).optional(),
})
),
channelTypes: z.array(z.number().int().nonnegative()),
baseUrl: z.string(),
allowedHosts: z.array(nonemptyString),
auth: z
.union([z.string(), z.object({ type: z.string() })])
.transform((auth) => (typeof auth === 'string' ? auth : auth.type)),
}
type SyntaxNode = ReturnType<typeof javascriptLanguage.parser.parse>['topNode']
const unresolved = Symbol('unresolved static metadata')
type StaticValue =
| string
| number
| boolean
| null
| StaticValue[]
| { [key: string]: StaticValue }
/** Decode JavaScript string tokens without evaluating code, including JS-only escapes. */
function readStaticString(token: string): string | typeof unresolved {
const quote = token[0]
if (!['"', "'", '`'].includes(quote) || token.at(-1) !== quote) {
return unresolved
}
let result = ''
for (let i = 1; i < token.length - 1; i += 1) {
const character = token[i]
if (character !== '\\') {
result += character
continue
}
i += 1
const escape = token[i]
if (escape === undefined) return unresolved
const escapes: Record<string, string> = {
b: '\b',
f: '\f',
n: '\n',
r: '\r',
t: '\t',
v: '\v',
}
if (Object.hasOwn(escapes, escape)) {
result += escapes[escape]
} else if (escape === '\n' || escape === '\u2028' || escape === '\u2029') {
continue
} else if (escape === '\r') {
if (token[i + 1] === '\n') i += 1
} else if (escape === '0' && !/[0-9]/.test(token[i + 1] ?? '')) {
result += '\0'
} else if (escape === 'u' || escape === 'x') {
const braced = escape === 'u' && token[i + 1] === '{'
const start = i + (braced ? 2 : 1)
const end = braced
? token.indexOf('}', start)
: start + (escape === 'x' ? 2 : 4)
const digits = token.slice(start, end)
if (end < start || !/^[0-9a-f]+$/i.test(digits)) return unresolved
const code = Number.parseInt(digits, 16)
if (code > 0x10ffff) return unresolved
result += String.fromCodePoint(code)
i = braced ? end : end - 1
} else if (/[0-9]/.test(escape)) {
return unresolved
} else {
result += escape
}
}
return result
}
/** Dynamic keys/spreads could replace any field, so the entire object is unknown. */
function staticObjectProperties(
source: string,
node: SyntaxNode
): Map<string, SyntaxNode | null> | null {
if (node.name !== 'ObjectExpression') return null
const fields = new Map<string, SyntaxNode | null>()
for (const property of node.getChildren('Property')) {
const keyNode = property.firstChild
if (
!keyNode ||
!['PropertyDefinition', 'String', 'Number', 'get', 'set'].includes(
keyNode.name
)
) {
return null
}
const namedKey = ['get', 'set'].includes(keyNode.name)
? property.getChild('PropertyDefinition')
: keyNode
if (!namedKey) return null
const token = source.slice(namedKey.from, namedKey.to)
const key = namedKey.name === 'String' ? readStaticString(token) : token
if (key === unresolved || key.includes('\\') || key === '__proto__') {
return null
}
const colon = property.getChild(':')
let value = colon?.nextSibling ?? null
while (value && ['LineComment', 'BlockComment'].includes(value.name)) {
value = value.nextSibling
}
fields.set(key, fields.has(key) ? null : value)
}
return fields
}
function readStaticValue(
source: string,
node: SyntaxNode,
depth = 0
): StaticValue | typeof unresolved {
if (depth > 64) return unresolved
const token = source.slice(node.from, node.to)
if (node.name === 'String') return readStaticString(token)
if (node.name === 'TemplateString' && !node.getChild('Interpolation')) {
return readStaticString(token)
}
if (node.name === 'Number') {
const number = Number(token.replaceAll('_', ''))
return Number.isFinite(number) ? number : unresolved
}
if (node.name === 'BooleanLiteral') return token === 'true'
if (node.name === 'null') return null
if (node.name === 'UnaryExpression') {
const operand = node.lastChild
const operator = node.firstChild
if (!operand || !operator || operand.name !== 'Number') return unresolved
const sign = source.slice(operator.from, operator.to)
if (sign !== '-' && sign !== '+') return unresolved
const value = readStaticValue(source, operand, depth + 1)
if (typeof value !== 'number') return unresolved
return sign === '-' ? -value : value
}
if (node.name === 'ArrayExpression') {
const values: StaticValue[] = []
let expectsValue = true
for (let child = node.firstChild; child; child = child.nextSibling) {
if (['[', ']', 'LineComment', 'BlockComment'].includes(child.name)) {
continue
}
if (child.name === ',') {
if (expectsValue) return unresolved
expectsValue = true
continue
}
if (!expectsValue) return unresolved
const value = readStaticValue(source, child, depth + 1)
if (value === unresolved) return unresolved
values.push(value)
expectsValue = false
}
return values
}
if (node.name === 'ObjectExpression') {
const properties = staticObjectProperties(source, node)
if (!properties) return unresolved
const result: { [key: string]: StaticValue } = Object.create(null)
for (const [key, valueNode] of properties) {
if (!valueNode) return unresolved
const value = readStaticValue(source, valueNode, depth + 1)
if (value === unresolved) return unresolved
result[key] = value
}
return result
}
return unresolved
}
/** Inspect only the exported literal declaration. Never compile or run the plugin. */
export function parsePluginMetaPreview(source: string): PluginMetaPreview {
const fields = Object.fromEntries(
Object.keys(previewSchemas).map((key) => [key, { state: 'unknown' }])
) as PluginMetaPreview['fields']
const result: PluginMetaPreview = { status: 'unavailable', fields }
if (pluginSourceByteLength(source) > MAX_PLUGIN_SOURCE_BYTES) return result
const tree = javascriptLanguage.parser.parse(source)
let invalid = false
tree.iterate({
enter: (node) => {
if (node.type.isError) invalid = true
},
})
if (invalid) return result
let meta: SyntaxNode | null = null
for (const exported of tree.topNode.getChildren('ExportDeclaration')) {
const declaration = exported.getChild('VariableDeclaration')
if (!declaration?.getChild('const')) continue
for (const variable of declaration.getChildren('VariableDefinition')) {
if (source.slice(variable.from, variable.to) !== 'meta') continue
if (meta) return result
let next = variable.nextSibling
while (next && ['LineComment', 'BlockComment'].includes(next.name)) {
next = next.nextSibling
}
if (next?.name !== 'Equals') return result
next = next.nextSibling
while (next && ['LineComment', 'BlockComment'].includes(next.name)) {
next = next.nextSibling
}
meta = next
}
}
if (!meta) return result
// A reference elsewhere may mutate or pass the object to arbitrary code.
// Do not present the initial literal as complete when that is possible.
tree.iterate({
enter: (node) => {
if (
node.name === 'VariableName' &&
source.slice(node.from, node.to) === 'meta'
) {
invalid = true
}
},
})
if (invalid) return result
const properties = staticObjectProperties(source, meta)
if (!properties) return result
result.status = 'parsed'
for (const key of Object.keys(
previewSchemas
) as (keyof PluginPreviewValues)[]) {
if (!properties.has(key)) {
fields[key] = { state: 'missing', origin: 'source' }
continue
}
const node = properties.get(key)
const value = node ? readStaticValue(source, node) : unresolved
const parsed = previewSchemas[key].safeParse(value)
if (!parsed.success) {
result.status = 'partial'
continue
}
// Each schema corresponds to the same-named field in PluginPreviewValues.
Object.assign(fields, {
[key]: { state: 'value', value: parsed.data, origin: 'source' },
})
}
return result
}
/** Source absence is a fact; only unresolved source fields fall back to index hints. */
export function resolvePluginMetaPreview(
plugin: MarketplacePlugin,
version: MarketplaceIndexVersion | undefined,
source: PluginMetaPreview | undefined
): PluginMetaPreview['fields'] {
const latest = version?.version === plugin.latest
const index = {
models: latest ? plugin.models : undefined,
protocols: latest ? plugin.protocols : undefined,
channelTypes: latest ? plugin.channelTypes : undefined,
routes: undefined,
baseUrl: version?.baseUrl,
allowedHosts: version?.allowedHosts,
auth: version?.auth,
}
const fields = {} as PluginMetaPreview['fields']
for (const key of Object.keys(
previewSchemas
) as (keyof PluginPreviewValues)[]) {
const fromSource = source?.fields[key]
let field: PluginPreviewField<unknown> = fromSource ?? { state: 'unknown' }
if (!fromSource || fromSource.state === 'unknown') {
const parsed = previewSchemas[key].safeParse(index[key])
if (parsed.success) {
field = { state: 'value', value: parsed.data, origin: 'index' }
}
}
Object.assign(fields, { [key]: field })
}
return fields
}
/*
Copyright (C) 2023-2026 QuantumNous
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
/** Accept only explicit HTTPS links; never let URL repair malformed input. */
export function getPluginWebsite(value: unknown): string | undefined {
if (typeof value !== 'string') return undefined
const website = value.trim()
if (!/^https:\/\/[^/?#]+/i.test(website) || /[\s\p{Cc}\\]/u.test(website)) {
return undefined
}
const authority = website.slice(8).split(/[/?#]/, 1)[0]
if (
/[@%]/.test(authority) ||
[...authority].some((character) => character.charCodeAt(0) > 127)
) {
return undefined
}
try {
const url = new URL(website)
if (
url.protocol !== 'https:' ||
!url.hostname ||
url.username ||
url.password
) {
return undefined
}
const host = url.hostname.replace(/\.$/, '')
if (
!host.startsWith('[') &&
(host.length > 253 ||
!host
.split('.')
.every((label) =>
/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/i.test(label)
))
) {
return undefined
}
return website
} catch {
return undefined
}
}
......@@ -39,6 +39,8 @@ export type TaskPluginRoute = {
}
export type TaskPluginMeta = {
sortPriority?: number
website?: string
apiVersion: number
key: string
name: string
......@@ -49,6 +51,7 @@ export type TaskPluginMeta = {
name: string
url?: string
}
baseUrl?: string
channelTypes?: number[] | null
models: string[] | null
fetchMode: string
......@@ -76,6 +79,7 @@ export type TaskPluginListItem = {
enabled: boolean
active: boolean
source_hash: string
has_icon?: boolean
remark: string
runtime_status:
| 'registered'
......@@ -99,6 +103,7 @@ export type TaskPluginDetail = {
meta: TaskPluginMeta
source: string
layer: 'factory' | 'override'
has_icon?: boolean
}
export type ApiResponse<T> = {
......@@ -119,9 +124,10 @@ export type MarketplaceSource = {
}
/**
* A single installable version from a marketplace index. `allowedHosts`, `auth`
* and `sha256` are optional: older or hand-rolled indexes may omit them, and
* the confirmation dialog degrades to a warning rather than refusing to render.
* A single installable version from a marketplace index. `allowedHosts`,
* `baseUrl`, `auth` and `sha256` are optional: older or hand-rolled indexes may
* omit them, and the confirmation dialog degrades to a warning rather than
* refusing to render.
*/
export type MarketplaceIndexVersion = {
version: string
......@@ -130,13 +136,25 @@ export type MarketplaceIndexVersion = {
minApiVersion?: number
kind?: string
allowedHosts?: string[]
baseUrl?: string
auth?: string
}
export type MarketplacePluginIcon = {
/** Index-relative path of the sidecar icon.svg / icon.png, resolved like `path`. */
path: string
sha256?: string
}
export type MarketplacePlugin = {
protocols?: TaskPluginProtocolClaim[]
sortPriority?: number
website?: string
key: string
name: string
icon?: string
/** Sidecar logo published by the index; rendered from the source repository. */
iconFile?: MarketplacePluginIcon
description?: string | Record<string, string>
channelTypes?: number[]
models?: string[]
......@@ -149,3 +167,28 @@ export type MarketplaceIndex = {
name: string
plugins: MarketplacePlugin[]
}
/** A missing source property is distinct from an empty value or an unreadable expression. */
export type PluginPreviewField<T> =
| { state: 'value'; value: T; origin: 'source' | 'index' }
| { state: 'missing'; origin: 'source' }
| { state: 'unknown' }
export type PluginPreviewValues = {
models: string[]
protocols: TaskPluginProtocolClaim[]
routes: TaskPluginRoute[]
channelTypes: number[]
baseUrl: string
allowedHosts: string[]
auth: string
}
export type PluginMetaPreview = {
status: 'parsed' | 'partial' | 'unavailable'
fields: {
[Key in keyof PluginPreviewValues]: PluginPreviewField<
PluginPreviewValues[Key]
>
}
}
......@@ -75,6 +75,7 @@
"{{currency}} price per 1M tokens.": "{{currency}} price per 1M tokens.",
"{{field}} updated to {{value}}": "{{field}} updated to {{value}}",
"{{field}} updated to {{value}} for tag: {{tag}}": "{{field}} updated to {{value}} for tag: {{tag}}",
"{{key}} · from {{source}}": "{{key}} · from {{source}}",
"{{key}} · version {{version}} · from {{source}}": "{{key}} · version {{version}} · from {{source}}",
"{{method}} {{route}}": "{{method}} {{route}}",
"{{modality}} not supported": "{{modality}} not supported",
......@@ -141,6 +142,7 @@
"80,443,8080": "80,443,8080",
"A billing multiplier. Lower ratios mean lower API call costs.": "A billing multiplier. Lower ratios mean lower API call costs.",
"A focused home for keys, balance, routing, and service health.": "A focused home for keys, balance, routing, and service health.",
"A matching hash confirms the published file, not the safety of its code.": "A matching hash confirms the published file, not the safety of its code.",
"A security operation is already in progress.": "A security operation is already in progress.",
"A selected model no longer exists. Reload the model list.": "A selected model no longer exists. Reload the model list.",
"A vendor with this name already exists.": "A vendor with this name already exists.",
......@@ -270,13 +272,17 @@
"Add your API keys, set up channels and configure access permissions": "Add your API keys, set up channels and configure access permissions",
"Added {{count}} model(s)": "Added {{count}} model(s)",
"Added {{count}} models from \"{{name}}\"": "Added {{count}} models from \"{{name}}\"",
"Added once per request. Set to 0 for usage-only billing.": "Added once per request. Set to 0 for usage-only billing.",
"Added successfully": "Added successfully",
"Added to the usage cost. Set to 0 for no additional charge.": "Added to the usage cost. Set to 0 for no additional charge.",
"Additional charge": "Additional charge",
"Additional Conditions": "Additional Conditions",
"Additional information": "Additional information",
"Additional Information": "Additional Information",
"Additional Limit": "Additional Limit",
"Additional Limits": "Additional Limits",
"Additional metered capability": "Additional metered capability",
"Additional request domains": "Additional request domains",
"Additional verification required": "Additional verification required",
"Adjust filters, then search to refresh the logs.": "Adjust filters, then search to refresh the logs.",
"Adjust Quota": "Adjust Quota",
......@@ -349,6 +355,7 @@
"All Must Match (AND)": "All Must Match (AND)",
"All nodes": "All nodes",
"All playground messages saved in this browser will be removed. This cannot be undone.": "All playground messages saved in this browser will be removed. This cannot be undone.",
"All requests": "All requests",
"All requests must include": "All requests must include",
"All results": "All results",
"All routes": "All routes",
......@@ -366,6 +373,7 @@
"Allow accountFilter parameter": "Allow accountFilter parameter",
"Allow balance redemption": "Allow balance redemption",
"Allow Claude beta query passthrough": "Allow Claude beta query passthrough",
"Allow clients to query configured prices via `/api/ratio`.": "Allow clients to query configured prices via `/api/ratio`.",
"Allow clients to query configured ratios via `/api/ratio`.": "Allow clients to query configured ratios via `/api/ratio`.",
"Allow HTTP image requests": "Allow HTTP image requests",
"Allow include usage obfuscation passthrough": "Allow include usage obfuscation passthrough",
......@@ -490,6 +498,8 @@
"Append to existing keys": "Append to existing keys",
"Append value to array / string / object end": "Append value to array / string / object end",
"appended": "appended",
"Applicable channels": "Applicable channels",
"Applicable conditions": "Applicable conditions",
"Application": "Application",
"Applied {{name}} pricing to {{count}} models": "Applied {{name}} pricing to {{count}} models",
"Applied changes": "Applied changes",
......@@ -526,6 +536,7 @@
"Are you sure you want to delete this key? This action cannot be undone.": "Are you sure you want to delete this key? This action cannot be undone.",
"Are you sure you want to disable all enabled keys?": "Are you sure you want to disable all enabled keys?",
"Are you sure you want to enable all keys?": "Are you sure you want to enable all keys?",
"Are you sure you want to enable plugin {{name}} ({{key}})?": "Are you sure you want to enable plugin {{name}} ({{key}})?",
"Are you sure you want to manually complete this order? The user will be credited with the corresponding quota.": "Are you sure you want to manually complete this order? The user will be credited with the corresponding quota.",
"Are you sure you want to sign out? You will need to sign in again to access your account.": "Are you sure you want to sign out? You will need to sign in again to access your account.",
"Are you sure you want to unbind {{provider}} for this user? The user will no longer be able to log in via this method.": "Are you sure you want to unbind {{provider}} for this user? The user will no longer be able to log in via this method.",
......@@ -584,6 +595,7 @@
"auth.resetPasswordConfirm.retry": "Retry ({{seconds}}s)",
"auth.resetPasswordConfirm.success": "Your password has been reset successfully",
"Authentication": "Authentication",
"Authentication for upstream requests; channel credentials may still be used.": "Authentication for upstream requests; channel credentials may still be used.",
"Authentication Method": "Authentication Method",
"Authenticator code": "Authenticator code",
"Authenticator code or backup code": "Authenticator code or backup code",
......@@ -648,6 +660,7 @@
"Back to login": "Back to login",
"Back to Models": "Back to Models",
"Backed up": "Backed up",
"Background": "Background",
"Background job tracker for queued work.": "Background job tracker for queued work.",
"Backup Code": "Backup Code",
"Backup code must be in format XXXX-XXXX": "Backup code must be in format XXXX-XXXX",
......@@ -891,6 +904,7 @@
"Channel type": "Channel type",
"Channel type is required": "Channel type is required",
"Channel types": "Channel types",
"Channel types you can use when binding this plugin.": "Channel types you can use when binding this plugin.",
"Channel updated successfully": "Channel updated successfully",
"Channel-specific settings (JSON format)": "Channel-specific settings (JSON format)",
"Channel:": "Channel:",
......@@ -927,6 +941,7 @@
"Check-in successful! Received": "Check-in successful! Received",
"Checked in": "Checked in",
"Checking connection": "Checking connection",
"Checking file integrity...": "Checking file integrity...",
"Checking name...": "Checking name...",
"Checking updates...": "Checking updates...",
"checkout.session.completed": "checkout.session.completed",
......@@ -1178,6 +1193,7 @@
"Connection failed": "Connection failed",
"Connection info detected in clipboard": "Connection info detected in clipboard",
"Connection info filled in": "Connection info filled in",
"Connection settings": "Connection settings",
"Connection successful": "Connection successful",
"Console": "Console",
"Console area": "Console area",
......@@ -1234,12 +1250,15 @@
"Copy All": "Copy All",
"Copy all backup codes": "Copy all backup codes",
"Copy All Codes": "Copy All Codes",
"Copy all models": "Copy all models",
"Copy API key": "Copy API key",
"Copy base URL": "Copy base URL",
"Copy billing expression": "Copy billing expression",
"Copy callback URL": "Copy callback URL",
"Copy Channel": "Copy Channel",
"Copy code": "Copy code",
"Copy Connection Info": "Copy Connection Info",
"Copy endpoint path": "Copy endpoint path",
"Copy failed": "Copy failed",
"Copy Field": "Copy Field",
"Copy Header": "Copy Header",
......@@ -1248,6 +1267,7 @@
"Copy Link": "Copy Link",
"Copy model name": "Copy model name",
"Copy model names": "Copy model names",
"Copy plugin key": "Copy plugin key",
"Copy prompt": "Copy prompt",
"Copy ready-to-run curl": "Copy ready-to-run curl",
"Copy redemption code": "Copy redemption code",
......@@ -1276,6 +1296,7 @@
"Cost = 10 × 0.8 = 8": "Cost = 10 × 0.8 = 8",
"Cost = 10 × 1.0 = 10": "Cost = 10 × 1.0 = 10",
"Cost = model price × that one ratio. Nothing else from the group settings enters the formula.": "Cost = model price × that one ratio. Nothing else from the group settings enters the formula.",
"Cost calculator": "Cost calculator",
"Cost in {{currency}} per request, regardless of tokens used.": "Cost in {{currency}} per request, regardless of tokens used.",
"Cost in USD per request, regardless of tokens used.": "Cost in USD per request, regardless of tokens used.",
"Cost Tracking": "Cost Tracking",
......@@ -1368,8 +1389,10 @@
"Current Password": "Current Password",
"Current password is incorrect.": "Current password is incorrect.",
"Current Price": "Current Price",
"Current pricing conditions": "Current pricing conditions",
"Current quota": "Current quota",
"Current token": "Current token",
"Current v{{from}} → install v{{to}}": "Current v{{from}} → install v{{to}}",
"Current value": "Current value",
"Current Value": "Current Value",
"Current vendor": "Current vendor",
......@@ -1438,8 +1461,10 @@
"Default": "Default",
"Default / range": "Default / range",
"Default administrator permissions can be overridden for this user.": "Default administrator permissions can be overridden for this user.",
"Default API address": "Default API address",
"Default API Version *": "Default API Version *",
"Default API version for this channel": "Default API version for this channel",
"Default base URL": "Default base URL",
"Default Bearer": "Default Bearer",
"Default Collapse Sidebar": "Default Collapse Sidebar",
"Default consumption chart": "Default consumption chart",
......@@ -1578,6 +1603,8 @@
"Disable All": "Disable All",
"Disable custom task plugins?": "Disable custom task plugins?",
"Disable on failure": "Disable on failure",
"Disable plugin {{name}} ({{key}})? Requests using this plugin may be affected.": "Disable plugin {{name}} ({{key}})? Requests using this plugin may be affected.",
"Disable plugin?": "Disable plugin?",
"Disable selected channels": "Disable selected channels",
"Disable selected models": "Disable selected models",
"Disable store passthrough": "Disable store passthrough",
......@@ -1674,6 +1701,8 @@
"Duration Settings": "Duration Settings",
"Duration Unit": "Duration Unit",
"Duration Value": "Duration Value",
"Dynamic declarations cannot be previewed. Retry or review the source below.": "Dynamic declarations cannot be previewed. Retry or review the source below.",
"Dynamic operation": "Dynamic operation",
"Dynamic Pricing": "Dynamic Pricing",
"e.g. ¥ or HK$": "e.g. ¥ or HK$",
"e.g. 401, 403, 429, 500-599": "e.g. 401, 403, 429, 500-599",
......@@ -1809,6 +1838,7 @@
"Enable Passkey": "Enable Passkey",
"Enable Performance Monitoring": "Enable Performance Monitoring",
"Enable plugin {{key}}": "Enable plugin {{key}}",
"Enable plugin?": "Enable plugin?",
"Enable rate limiting": "Enable rate limiting",
"Enable Request Passthrough": "Enable Request Passthrough",
"Enable selected channels": "Enable selected channels",
......@@ -1906,6 +1936,7 @@
"Enter password (8–128 characters)": "Enter password (8–128 characters)",
"Enter quota in {{currency}}": "Enter quota in {{currency}}",
"Enter quota in tokens": "Enter quota in tokens",
"Enter sample usage to estimate the cost. Group and request multipliers are not included.": "Enter sample usage to estimate the cost. Group and request multipliers are not included.",
"Enter secret key": "Enter secret key",
"Enter system prompt (user prompt takes priority)": "Enter system prompt (user prompt takes priority)",
"Enter tag name (optional)": "Enter tag name (optional)",
......@@ -2017,6 +2048,7 @@
"External operations mode": "External operations mode",
"External Speed Test": "External Speed Test",
"Extra": "Extra",
"Extra destinations beyond the channel API address. The channel address remains accessible.": "Extra destinations beyond the channel API address. The channel address remains accessible.",
"Extra Notes (Optional)": "Extra Notes (Optional)",
"Extra visible": "Extra visible",
"Extra visible to {{group}}": "Extra visible to {{group}}",
......@@ -2220,7 +2252,10 @@
"Field Path": "Field Path",
"Fields": "Fields",
"File": "File",
"File could not be verified": "File could not be verified",
"File integrity verified": "File integrity verified",
"File Search": "File Search",
"File verification": "File verification",
"Files to Retain": "Files to Retain",
"Fill All Models": "Fill All Models",
"Fill Codex CLI / Claude CLI Templates": "Fill Codex CLI / Claude CLI Templates",
......@@ -2283,6 +2318,7 @@
"Fix Abilities": "Repair Channel Consistency",
"Fix order": "Fix order",
"Fixed abilities: {{success}} succeeded, {{fails}} failed": "Channel consistency repaired: {{success}} succeeded, {{fails}} failed",
"Fixed fee per request": "Fixed fee per request",
"Fixed price": "Fixed price",
"Fixed price (USD)": "Fixed price (USD)",
"Fixed request price": "Fixed request price",
......@@ -2344,6 +2380,7 @@
"Friendly name to identify this channel": "Friendly name to identify this channel",
"From Address": "From Address",
"From IO.NET deployment": "From IO.NET deployment",
"From marketplace index": "From marketplace index",
"From model redirect, not yet added to models list": "From model redirect, not yet added to models list",
"Full API Key": "Full API Key",
"Full Base URL (supports": "Full Base URL (supports",
......@@ -2351,6 +2388,7 @@
"Full input length": "Full input length",
"Full JSON": "Full JSON",
"Full layout": "Full layout",
"Full source": "Full source",
"Full upstream catalog": "Full upstream catalog",
"Full width": "Full width",
"Function calling": "Function calling",
......@@ -2612,6 +2650,7 @@
"Index": "Index",
"Index request failed with HTTP {{status}}": "Index request failed with HTTP {{status}}",
"Index URL": "Index URL",
"Information unavailable": "Information unavailable",
"Inherit global Auto order": "Inherit global Auto order",
"Inherit vendor icon": "Inherit vendor icon",
"Inherited from {{vendor}}": "Inherited from {{vendor}}",
......@@ -2647,6 +2686,7 @@
"Integrations": "Integrations",
"Integrity check failed": "Integrity check failed",
"Integrity hash": "Integrity hash",
"Integrity verification unavailable in this environment": "Integrity verification unavailable in this environment",
"Inter-group overrides": "Inter-group overrides",
"Inter-group ratio overrides": "Inter-group ratio overrides",
"Interface Language": "Interface Language",
......@@ -3126,6 +3166,7 @@
"More": "More",
"More Apps": "More Apps",
"more mapping": "more mapping",
"More models ({{count}})": "More models ({{count}})",
"More templates...": "More templates...",
"More than 999 days left": "More than 999 days left",
"More...": "More...",
......@@ -3286,6 +3327,7 @@
"No encryption": "No encryption",
"No endpoints configured. Switch to JSON mode or add rows to define endpoints.": "No endpoints configured. Switch to JSON mode or add rows to define endpoints.",
"No endpoints inferred from channels": "No endpoints inferred from channels",
"No extra domains declared": "No extra domains declared",
"No FAQ entries available": "No FAQ entries available",
"No FAQ entries yet. Click \"Add FAQ\" to create one.": "No FAQ entries yet. Click \"Add FAQ\" to create one.",
"No files match the accepted types.": "No files match the accepted types.",
......@@ -3387,6 +3429,8 @@
"No rules yet": "No rules yet",
"No rules yet. Add a group below to get started.": "No rules yet. Add a group below to get started.",
"No separate media pricing configured.": "No separate media pricing configured.",
"No source available": "No source available",
"No source changes": "No source changes",
"No status code mappings configured.": "No status code mappings configured.",
"No stores on this merchant yet. Set a return URL and click Create to mint your first pair.": "No stores on this merchant yet. Set a return URL and click Create to mint your first pair.",
"No subscription plans yet": "No subscription plans yet",
......@@ -3415,6 +3459,7 @@
"No vendor data available": "No vendor data available",
"No vendors found": "No vendors found",
"No verification method is available for this action.": "No verification method is available for this action.",
"No version history": "No version history",
"No X Found": "No X Found",
"Node": "Node",
"Node filters": "Node filters",
......@@ -3424,6 +3469,7 @@
"Non-stream": "Non-stream",
"Non-zero invitation rewards require compliance confirmation in Payment Gateway settings.": "Non-zero invitation rewards require compliance confirmation in Payment Gateway settings.",
"None": "None",
"None (plugin declaration)": "None (plugin declaration)",
"noreply@example.com": "noreply@example.com",
"Normalized:": "Normalized:",
"Not available": "Not available",
......@@ -3431,6 +3477,8 @@
"Not bound": "Not bound",
"Not configured": "Not configured",
"Not declared": "Not declared",
"Not declared by this plugin": "Not declared by this plugin",
"Not declared; an API key may still be required.": "Not declared; an API key may still be required.",
"Not Equals": "Not Equals",
"Not found upstream": "Not found upstream",
"Not generated": "Not generated",
......@@ -3466,6 +3514,7 @@
"Number of top log probabilities returned per token": "Number of top log probabilities returned per token",
"Number of users invited": "Number of users invited",
"OAuth": "OAuth",
"OAuth 2.0 service account": "OAuth 2.0 service account",
"OAuth authorization timed out. Please try again.": "OAuth authorization timed out. Please try again.",
"OAuth authorization was cancelled.": "OAuth authorization was cancelled.",
"OAuth binding timed out. Please try again.": "OAuth binding timed out. Please try again.",
......@@ -3595,6 +3644,7 @@
"Optimized network architecture ensures millisecond response times": "Optimized network architecture ensures millisecond response times",
"Optional callback override. Leave blank to use server address": "Optional callback override. Leave blank to use server address",
"Optional icon identifier for the login button": "Optional icon identifier for the login button",
"Optional icon.svg or icon.png shipped next to plugin.js, up to 512 KiB. Stored separately from the source.": "Optional icon.svg or icon.png shipped next to plugin.js, up to 512 KiB. Stored separately from the source.",
"Optional JSON policy to restrict access based on user info fields": "Optional JSON policy to restrict access based on user info fields",
"Optional minimum recharge amount for this method.": "Optional minimum recharge amount for this method.",
"Optional multiplier per user group used when calculating recharge pricing. Provide a JSON object such as": "Optional multiplier per user group used when calculating recharge pricing. Provide a JSON object such as",
......@@ -3618,6 +3668,7 @@
"Original Model": "Original Model",
"Original value": "Original value",
"Other": "Other",
"Other cases": "Other cases",
"Other channels": "Other channels",
"Other groups": "Other groups",
"Other models": "Other models",
......@@ -3884,16 +3935,26 @@
"Please wait for the current generation to complete": "Please wait for the current generation to complete",
"Plugin": "Plugin",
"Plugin author": "Plugin author",
"Plugin default": "Plugin default",
"Plugin details": "Plugin details",
"Plugin Generation": "Plugin Generation",
"Plugin icon": "Plugin icon",
"Plugin icon exceeds the 512 KiB limit.": "Plugin icon exceeds the 512 KiB limit.",
"Plugin icon must be an .svg or .png file.": "Plugin icon must be an .svg or .png file.",
"Plugin indexes are fetched by your browser. Installing runs the same review and admission pipeline as a manual upload.": "Plugin indexes are fetched by your browser. Installing runs the same review and admission pipeline as a manual upload.",
"Plugin installation failed": "Plugin installation failed",
"Plugin is still in use": "Plugin is still in use",
"Plugin key": "Plugin key",
"Plugin metadata": "Plugin metadata",
"Plugin sandbox": "Plugin sandbox",
"Plugin source": "Plugin source",
"Plugin source exceeds the 1 MiB limit.": "Plugin source exceeds the 1 MiB limit.",
"Plugin uploaded successfully": "Plugin uploaded successfully",
"Plugin version activated": "Plugin version activated",
"Plugin version deleted": "Plugin version deleted",
"Plugin website": "Plugin website",
"Plugin-defined interfaces": "Plugin-defined interfaces",
"Plugins can access channel credentials. Review the source and differences before installing.": "Plugins can access channel credentials. Review the source and differences before installing.",
"Policy JSON": "Policy JSON",
"Polling": "Polling",
"Polling mode requires Redis and memory cache, otherwise performance will be significantly degraded": "Polling mode requires Redis and memory cache, otherwise performance will be significantly degraded",
......@@ -3978,13 +4039,17 @@
"Price:": "Price:",
"Price: High to Low": "Price: High to Low",
"Price: Low to High": "Price: Low to High",
"Prices are in {{currency}}, with units shown below. Use USD when editing expressions directly.": "Prices are in {{currency}}, with units shown below. Use USD when editing expressions directly.",
"Prices for each set of conditions": "Prices for each set of conditions",
"Prices shown per": "Prices shown per",
"Prices shown per usage unit": "Prices shown per usage unit",
"Prices synced successfully": "Prices synced successfully",
"Prices vary by usage tier and request conditions": "Prices vary by usage tier and request conditions",
"Pricing": "Pricing",
"Pricing & Display": "Pricing & Display",
"Pricing by condition": "Pricing by condition",
"Pricing by Group": "Pricing by Group",
"Pricing conditions": "Pricing conditions",
"Pricing Configuration": "Pricing Configuration",
"Pricing currency": "Pricing currency",
"Pricing group example": "Pricing group example",
......@@ -4391,6 +4456,7 @@
"Retain last N days": "Retain last N days",
"Retain last N files": "Retain last N files",
"Retention days": "Retention days",
"Retrieve result": "Retrieve result",
"Retry": "Retry",
"Retry Chain": "Retry Chain",
"Retry Settings": "Retry Settings",
......@@ -4681,6 +4747,7 @@
"Select theme preset": "Select theme preset",
"Select time granularity": "Select time granularity",
"Select vendor": "Select vendor",
"Select version": "Select version",
"Selectable groups": "Selectable groups",
"selected": "selected",
"Selected {{count}}": "Selected {{count}}",
......@@ -4688,7 +4755,7 @@
"Selected conflicts were overwritten successfully.": "Selected conflicts were overwritten successfully.",
"Selected nodes": "Selected nodes",
"Selected when creating a token and used as the default billing group for API calls.": "Selected when creating a token and used as the default billing group for API calls.",
"Selecting a plugin fills its declared models.": "Selecting a plugin fills its declared models.",
"Selecting a plugin fills its declared models and default base URL.": "Selecting a plugin fills its declared models and default base URL.",
"Self-Use Mode": "Self-Use Mode",
"Send": "Send",
"Send a request": "Send a request",
......@@ -4725,6 +4792,8 @@
"Set filters to narrow down your log search results.": "Set filters to narrow down your log search results.",
"Set Header": "Set Header",
"Set Password": "Set Password",
"Set prices for each set of conditions below. Cost = usage × unit price + additional charge. Token prices are per million tokens.": "Set prices for each set of conditions below. Cost = usage × unit price + additional charge. Token prices are per million tokens.",
"Set prices for each set of conditions below. Cost = usage × unit price + fixed fee. Token prices are per million tokens.": "Set prices for each set of conditions below. Cost = usage × unit price + fixed fee. Token prices are per million tokens.",
"Set Project to io.cloud when creating/selecting key": "Set Project to io.cloud when creating/selecting key",
"Set quota amount and limits": "Set quota amount and limits",
"Set Request Header": "Set Request Header",
......@@ -4825,12 +4894,14 @@
"socks5://user:pass@host:port": "socks5://user:pass@host:port",
"Soft Errors": "Soft Errors",
"Some channels failed: {{errorMsg}}": "Some channels failed: {{errorMsg}}",
"Some plugin information could not be read": "Some plugin information could not be read",
"Something went wrong!": "Something went wrong!",
"Sonnet Model": "Sonnet Model",
"Sora": "Sora",
"Sort": "Sort",
"Sort by ID": "Sort by ID",
"Sort Order": "Sort Order",
"Sort priority": "Sort priority",
"Source": "Source",
"Source diff": "Source diff",
"Source Endpoint": "Source Endpoint",
......@@ -4860,6 +4931,7 @@
"stale": "stale",
"Standard": "Standard",
"Standard price": "Standard price",
"Standard protocol interfaces": "Standard protocol interfaces",
"Start": "Start",
"Start ≤ end: within the day; start > end: across midnight": "Start ≤ end: within the day; start > end: across midnight",
"Start a conversation to see messages here": "Start a conversation to see messages here",
......@@ -4920,6 +4992,7 @@
"Structured output": "Structured output",
"Submit": "Submit",
"Submit directly": "Submit directly",
"Submit request": "Submit request",
"Submit Result": "Submit Result",
"Submit Time": "Submit Time",
"Submitted": "Submitted",
......@@ -4961,7 +5034,9 @@
"Supported Applications": "Supported Applications",
"Supported endpoints": "Supported endpoints",
"Supported Imagine Models": "Supported Imagine Models",
"Supported interfaces": "Supported interfaces",
"Supported modalities": "Supported modalities",
"Supported models": "Supported models",
"Supported operators: eq, ne, gt, gte, lt, lte, in, not_in, contains, not_contains, exists, not_exists. Leave empty to allow all users.": "Supported operators: eq, ne, gt, gte, lt, lte, in, not_in, contains, not_contains, exists, not_exists. Leave empty to allow all users.",
"Supported parameters": "Supported parameters",
"Supported variables": "Supported variables",
......@@ -4994,6 +5069,7 @@
"Sync Upstream Models": "Sync Upstream Models",
"Synced upstream models": "Synced upstream models",
"Synchronize models and vendors from an upstream source": "Synchronize models and vendors from an upstream source",
"Synchronous": "Synchronous",
"Syncing prices, please wait...": "Syncing prices, please wait...",
"Syncing...": "Syncing...",
"System": "System",
......@@ -5146,6 +5222,7 @@
"The site exchange rate is invalid. Prices are shown in USD.": "The site exchange rate is invalid. Prices are shown in USD.",
"The site is not available at the moment.": "The site is not available at the moment.",
"The slug is appended to the URL:": "The slug is appended to the URL:",
"The source is unavailable or this browser cannot calculate SHA-256. The gateway checks the published hash during installation.": "The source is unavailable or this browser cannot calculate SHA-256. The gateway checks the published hash during installation.",
"The sync will fetch missing models and vendors from the selected source. Existing records are updated only when you approve conflicts.": "The sync will fetch missing models and vendors from the selected source. Existing records are updated only when you approve conflicts.",
"The system always bills in USD. Site currency makes entering and converting prices easier; amounts are converted to USD using the site exchange rate. Switching currencies does not change the actual price. Raw billing expressions always use USD.": "The system always bills in USD. Site currency makes entering and converting prices easier; amounts are converted to USD using the site exchange rate. Switching currencies does not change the actual price. Raw billing expressions always use USD.",
"The Telegram authorization request is invalid or expired.": "The Telegram authorization request is invalid or expired.",
......@@ -5156,6 +5233,7 @@
"The two-factor setup has expired or changed. Start setup again.": "The two-factor setup has expired or changed. Start setup again.",
"The unique identifier for this model": "The unique identifier for this model",
"The unique name for this vendor": "The unique name for this vendor",
"The upstream address this plugin sends requests to. The plugin declares no default, so it must be filled in.": "The upstream address this plugin sends requests to. The plugin declares no default, so it must be filled in.",
"The upstream channel that served the requests": "The upstream channel that served the requests",
"The upstream natively supports all three protocols; every selected route is forwarded without conversion.": "The upstream natively supports all three protocols; every selected route is forwarded without conversion.",
"The upstream response is valid JSON, but it does not match the OpenAI credit_summary format. The channel balance was not updated.": "The upstream response is valid JSON, but it does not match the OpenAI credit_summary format. The channel balance was not updated.",
......@@ -5188,6 +5266,8 @@
"This action will permanently remove 2FA protection from your account.": "This action will permanently remove 2FA protection from your account.",
"This announcement will be removed from the list.": "This announcement will be removed from the list.",
"This API shortcut will be removed from the list.": "This API shortcut will be removed from the list.",
"This base URL points at a private or local network host. Make sure it is an upstream you control.": "This base URL points at a private or local network host. Make sure it is an upstream you control.",
"This base URL uses plain HTTP, so the channel key is sent unencrypted.": "This base URL uses plain HTTP, so the channel key is sent unencrypted.",
"This callback URL updates from the slug field and is the value to register with your provider.": "This callback URL updates from the slug field and is the value to register with your provider.",
"This channel has no configured models.": "This channel has no configured models.",
"This channel is not an Ollama channel.": "This channel is not an Ollama channel.",
......@@ -5223,6 +5303,7 @@
"This plan does not allow balance redemption": "This plan does not allow balance redemption",
"This plugin has no factory fallback. Deleting or disabling it makes this platform unavailable.": "This plugin has no factory fallback. Deleting or disabling it makes this platform unavailable.",
"This plugin path does not resolve within the source repository.": "This plugin path does not resolve within the source repository.",
"This preview reads static plugin declarations. The gateway validates the plugin during installation.": "This preview reads static plugin declarations. The gateway validates the plugin during installation.",
"This project must be used in compliance with the": "This project must be used in compliance with the",
"This removes {{count}} failed models from this channel. This action cannot be undone.": "This removes {{count}} failed models from this channel. This action cannot be undone.",
"This route discovers upstream OpenAI models and cannot be split or matched by client model rules.": "This route discovers upstream OpenAI models and cannot be split or matched by client model rules.",
......@@ -5495,6 +5576,7 @@
"Unit price (local currency / USD)": "Unit price (local currency / USD)",
"Unit price (USD)": "Unit price (USD)",
"Unit price must be greater than 0": "Unit price must be greater than 0",
"Unit price: {{field}}": "Unit price: {{field}}",
"Units per USD": "Units per USD",
"Unknown": "Unknown",
"Unknown device": "Unknown device",
......@@ -5579,6 +5661,7 @@
"Uploading...": "Uploading...",
"Upscale": "Upscale",
"Upstream": "Upstream",
"Upstream authentication": "Upstream authentication",
"Upstream did not return reset credit details.": "Upstream did not return reset credit details.",
"Upstream JSON response": "Upstream JSON response",
"Upstream Model Detection Settings": "Upstream Model Detection Settings",
......@@ -5621,6 +5704,7 @@
"URL to your logo image (optional)": "URL to your logo image (optional)",
"US dollar (USD)": "US dollar (USD)",
"Usage": "Usage",
"Usage · {{price}}": "Usage · {{price}}",
"Usage at a glance": "Usage at a glance",
"Usage guide": "Usage guide",
"Usage logs": "Usage logs",
......@@ -5643,6 +5727,7 @@
"Use authenticator code": "Use authenticator code",
"Use backup code": "Use backup code",
"Use Bearer for all protocols": "Use Bearer for all protocols",
"Use default": "Use default",
"Use disk cache when request body exceeds this size": "Use disk cache when request body exceeds this size",
"Use exact client model names, separated by commas. Prefixes and wildcards are not supported.": "Use exact client model names, separated by commas. Prefixes and wildcards are not supported.",
"Use exact model names such as gpt-4o, or regex rules prefixed with re: such as re:^gemini-.": "Use exact model names such as gpt-4o, or regex rules prefixed with re: such as re:^gemini-.",
......@@ -5674,6 +5759,7 @@
"Used to authenticate with io.net deployment API": "Used to authenticate with io.net deployment API",
"Used to authenticate with the worker. Leave blank to keep the existing secret.": "Used to authenticate with the worker. Leave blank to keep the existing secret.",
"Used to decide the payment flow. Built-in keys include stripe for Stripe and waffo_pancake for Waffo Pancake; other values are sent to Epay as the type parameter.": "Used to decide the payment flow. Built-in keys include stripe for Stripe and waffo_pancake for Waffo Pancake; other values are sent to Epay as the type parameter.",
"Used when a Task Plugin channel has no API address configured.": "Used when a Task Plugin channel has no API address configured.",
"Used:": "Used:",
"User": "User",
"User {{id}}": "User {{id}}",
......@@ -5783,6 +5869,7 @@
"Verifying credentials and pulling stores from your Pancake account...": "Verifying credentials and pulling stores from your Pancake account...",
"Verifying your {{provider}} account": "Verifying your {{provider}} account",
"Version": "Version",
"Version differences": "Version differences",
"Version history": "Version history",
"Version Overrides": "Version Overrides",
"Versions": "Versions",
......
......@@ -75,6 +75,7 @@
"{{currency}} price per 1M tokens.": "Prix en {{currency}} par million de tokens.",
"{{field}} updated to {{value}}": "{{field}} mis à jour en {{value}}",
"{{field}} updated to {{value}} for tag: {{tag}}": "{{field}} mis à jour en {{value}} pour le tag : {{tag}}",
"{{key}} · from {{source}}": "{{key}} · source : {{source}}",
"{{key}} · version {{version}} · from {{source}}": "{{key}} · version {{version}} · depuis {{source}}",
"{{method}} {{route}}": "{{method}} {{route}}",
"{{modality}} not supported": "{{modality}} non pris en charge",
......@@ -141,6 +142,7 @@
"80,443,8080": "80,443,8080",
"A billing multiplier. Lower ratios mean lower API call costs.": "Un multiplicateur de facturation. Plus le ratio est faible, plus le coût des appels API est bas.",
"A focused home for keys, balance, routing, and service health.": "Un accueil dédié aux clés, au solde, au routage et à l'état du service.",
"A matching hash confirms the published file, not the safety of its code.": "Une empreinte identique confirme le fichier publié, pas la sécurité de son code.",
"A security operation is already in progress.": "Une opération de sécurité est déjà en cours.",
"A selected model no longer exists. Reload the model list.": "Un modèle sélectionné n’existe plus. Rechargez la liste.",
"A vendor with this name already exists.": "Un fournisseur porte déjà ce nom.",
......@@ -270,13 +272,17 @@
"Add your API keys, set up channels and configure access permissions": "Ajoutez vos clés API, configurez les canaux et les permissions d'accès",
"Added {{count}} model(s)": "{{count}} modèle(s) ajouté(s)",
"Added {{count}} models from \"{{name}}\"": "{{count}} modèles ajoutés depuis « {{name}} »",
"Added once per request. Set to 0 for usage-only billing.": "Ajoutés une fois par requête. Saisissez 0 pour facturer uniquement l’usage.",
"Added successfully": "Ajouté avec succès",
"Added to the usage cost. Set to 0 for no additional charge.": "Montant ajouté au coût d’usage. Saisissez 0 pour ne rien ajouter.",
"Additional charge": "Supplément",
"Additional Conditions": "Conditions supplémentaires",
"Additional information": "Informations supplémentaires",
"Additional Information": "Informations supplémentaires",
"Additional Limit": "Limite supplémentaire",
"Additional Limits": "Limites supplémentaires",
"Additional metered capability": "Fonctionnalité supplémentaire facturée à l’usage",
"Additional request domains": "Domaines supplémentaires",
"Additional verification required": "Vérification supplémentaire requise",
"Adjust filters, then search to refresh the logs.": "Ajustez les filtres, puis lancez la recherche pour actualiser les journaux.",
"Adjust Quota": "Ajuster le quota",
......@@ -349,6 +355,7 @@
"All Must Match (AND)": "Toutes doivent correspondre (AND)",
"All nodes": "Tous les nœuds",
"All playground messages saved in this browser will be removed. This cannot be undone.": "Tous les messages du Playground enregistrés dans ce navigateur seront supprimés. Cette action est irréversible.",
"All requests": "Toutes les requêtes",
"All requests must include": "Toutes les requêtes doivent inclure",
"All results": "Tous les résultats",
"All routes": "Toutes les routes",
......@@ -366,6 +373,7 @@
"Allow accountFilter parameter": "Autoriser le paramètre accountFilter",
"Allow balance redemption": "Autoriser le paiement avec le solde",
"Allow Claude beta query passthrough": "Autoriser le passage des requêtes bêta Claude",
"Allow clients to query configured prices via `/api/ratio`.": "Autoriser les clients à consulter les prix configurés via `/api/ratio`.",
"Allow clients to query configured ratios via `/api/ratio`.": "Autoriser les clients à interroger les ratios configurés via `/api/ratio`.",
"Allow HTTP image requests": "Autoriser les requêtes d'images HTTP",
"Allow include usage obfuscation passthrough": "Autoriser le passage de l'obfuscation d'utilisation",
......@@ -490,6 +498,8 @@
"Append to existing keys": "Ajouter aux clés existantes",
"Append value to array / string / object end": "Ajouter la valeur à la fin du tableau / chaîne / objet",
"appended": "ajouté",
"Applicable channels": "Canaux compatibles",
"Applicable conditions": "Conditions applicables",
"Application": "Application",
"Applied {{name}} pricing to {{count}} models": "Tarification de {{name}} appliquée à {{count}} modèles",
"Applied changes": "Modifications appliquées",
......@@ -526,6 +536,7 @@
"Are you sure you want to delete this key? This action cannot be undone.": "Êtes-vous sûr de vouloir supprimer cette clé ? Cette action ne peut pas être annulée.",
"Are you sure you want to disable all enabled keys?": "Êtes-vous sûr de vouloir désactiver toutes les clés activées ?",
"Are you sure you want to enable all keys?": "Êtes-vous sûr de vouloir activer toutes les clés ?",
"Are you sure you want to enable plugin {{name}} ({{key}})?": "Voulez-vous activer le plugin {{name}} ({{key}}) ?",
"Are you sure you want to manually complete this order? The user will be credited with the corresponding quota.": "Êtes-vous sûr de vouloir compléter manuellement cette commande ? L'utilisateur sera crédité du quota correspondant.",
"Are you sure you want to sign out? You will need to sign in again to access your account.": "Êtes-vous sûr de vouloir vous déconnecter ? Vous devrez vous reconnecter pour accéder à votre compte.",
"Are you sure you want to unbind {{provider}} for this user? The user will no longer be able to log in via this method.": "Êtes-vous sûr de vouloir dissocier {{provider}} de cet utilisateur ? L'utilisateur ne pourra plus se connecter via cette méthode.",
......@@ -584,6 +595,7 @@
"auth.resetPasswordConfirm.retry": "Réessayer ({{seconds}}s)",
"auth.resetPasswordConfirm.success": "Votre mot de passe a été réinitialisé avec succès",
"Authentication": "Authentification",
"Authentication for upstream requests; channel credentials may still be used.": "Authentification des requêtes au fournisseur ; les identifiants du canal peuvent rester nécessaires.",
"Authentication Method": "Méthode d'authentification",
"Authenticator code": "Code d'authentification",
"Authenticator code or backup code": "Code d’authentification ou de secours",
......@@ -648,6 +660,7 @@
"Back to login": "Retour à la connexion",
"Back to Models": "Retour aux modèles",
"Backed up": "Sauvegardé",
"Background": "En arrière-plan",
"Background job tracker for queued work.": "Suivi des tâches en arrière-plan pour les travaux en file d'attente.",
"Backup Code": "Code de secours",
"Backup code must be in format XXXX-XXXX": "Le code de sauvegarde doit être au format XXXX-XXXX",
......@@ -891,6 +904,7 @@
"Channel type": "Type de canal",
"Channel type is required": "Le type de canal est requis",
"Channel types": "Types de canaux",
"Channel types you can use when binding this plugin.": "Types de canaux utilisables pour associer ce plugin.",
"Channel updated successfully": "Canal mis à jour avec succès",
"Channel-specific settings (JSON format)": "Paramètres spécifiques aux canaux (format JSON)",
"Channel:": "Canal :",
......@@ -927,6 +941,7 @@
"Check-in successful! Received": "Connexion réussie ! Reçu",
"Checked in": "Vérifié",
"Checking connection": "Vérification de la connexion",
"Checking file integrity...": "Vérification du fichier…",
"Checking name...": "Vérification du nom...",
"Checking updates...": "Vérification des mises à jour...",
"checkout.session.completed": "checkout.session.completed",
......@@ -1178,6 +1193,7 @@
"Connection failed": "Connexion échouée",
"Connection info detected in clipboard": "Infos de connexion détectées dans le presse-papiers",
"Connection info filled in": "Infos de connexion remplies",
"Connection settings": "Configuration de connexion",
"Connection successful": "Connexion réussie",
"Console": "Console",
"Console area": "Zone de console",
......@@ -1234,12 +1250,15 @@
"Copy All": "Tout copier",
"Copy all backup codes": "Copier tous les codes de sauvegarde",
"Copy All Codes": "Copier tous les codes",
"Copy all models": "Copier tous les modèles",
"Copy API key": "Copier la clé API",
"Copy base URL": "Copier l’URL de base",
"Copy billing expression": "Copier l’expression de facturation",
"Copy callback URL": "Copier l'URL de rappel",
"Copy Channel": "Copier le canal",
"Copy code": "Copier le code",
"Copy Connection Info": "Copier les infos de connexion",
"Copy endpoint path": "Copier le chemin du point de terminaison",
"Copy failed": "Copie échouée",
"Copy Field": "Copier le champ",
"Copy Header": "Copier l'en-tête",
......@@ -1248,6 +1267,7 @@
"Copy Link": "Copier le lien",
"Copy model name": "Copier le nom du modèle",
"Copy model names": "Copier les noms des modèles",
"Copy plugin key": "Copier l’identifiant du plugin",
"Copy prompt": "Copier le prompt",
"Copy ready-to-run curl": "Copier le curl prêt à exécuter",
"Copy redemption code": "Copier le code de rachat",
......@@ -1276,6 +1296,7 @@
"Cost = 10 × 0.8 = 8": "Coût = 10 × 0,8 = 8",
"Cost = 10 × 1.0 = 10": "Coût = 10 × 1,0 = 10",
"Cost = model price × that one ratio. Nothing else from the group settings enters the formula.": "Coût = prix du modèle × ce seul taux. Rien d’autre dans les réglages de groupes n’entre dans la formule.",
"Cost calculator": "Calcul des frais",
"Cost in {{currency}} per request, regardless of tokens used.": "Coût en {{currency}} par requête, quel que soit le nombre de tokens utilisés.",
"Cost in USD per request, regardless of tokens used.": "Coût en USD par requête, quel que soit le nombre de jetons utilisés.",
"Cost Tracking": "Suivi des coûts",
......@@ -1368,8 +1389,10 @@
"Current Password": "Mot de passe actuel",
"Current password is incorrect.": "Le mot de passe actuel est incorrect.",
"Current Price": "Prix actuel",
"Current pricing conditions": "Conditions tarifaires actuelles",
"Current quota": "Quota actuel",
"Current token": "Jeton actuel",
"Current v{{from}} → install v{{to}}": "Version actuelle v{{from}} → à installer v{{to}}",
"Current value": "Valeur actuelle",
"Current Value": "Valeur actuelle",
"Current vendor": "Fournisseur actuel",
......@@ -1438,8 +1461,10 @@
"Default": "Par défaut",
"Default / range": "Défaut / plage",
"Default administrator permissions can be overridden for this user.": "Les autorisations administrateur par défaut peuvent être remplacées pour cet utilisateur.",
"Default API address": "Adresse API par défaut",
"Default API Version *": "Version API par défaut *",
"Default API version for this channel": "Version API par défaut pour ce canal",
"Default base URL": "URL de base par défaut",
"Default Bearer": "Bearer par defaut",
"Default Collapse Sidebar": "Réduire la barre latérale par défaut",
"Default consumption chart": "Graphique de consommation par défaut",
......@@ -1578,6 +1603,8 @@
"Disable All": "Désactiver tout",
"Disable custom task plugins?": "Désactiver les plugins personnalisés ?",
"Disable on failure": "Désactiver en cas d'échec",
"Disable plugin {{name}} ({{key}})? Requests using this plugin may be affected.": "Désactiver le plugin {{name}} ({{key}}) ? Les requêtes utilisant ce plugin peuvent être affectées.",
"Disable plugin?": "Désactiver le plugin ?",
"Disable selected channels": "Désactiver les canaux sélectionnés",
"Disable selected models": "Désactiver les modèles sélectionnés",
"Disable store passthrough": "Désactiver la transmission du champ store",
......@@ -1674,6 +1701,8 @@
"Duration Settings": "Paramètres de durée",
"Duration Unit": "Unité de durée",
"Duration Value": "Valeur de durée",
"Dynamic declarations cannot be previewed. Retry or review the source below.": "Les déclarations dynamiques ne peuvent pas être prévisualisées. Réessayez ou consultez le code ci-dessous.",
"Dynamic operation": "Opération dynamique",
"Dynamic Pricing": "Tarification dynamique",
"e.g. ¥ or HK$": "par ex. ¥ ou HK$",
"e.g. 401, 403, 429, 500-599": "ex. 401, 403, 429, 500-599",
......@@ -1809,6 +1838,7 @@
"Enable Passkey": "Activer Passkey",
"Enable Performance Monitoring": "Activer la surveillance des performances",
"Enable plugin {{key}}": "Activer le plugin {{key}}",
"Enable plugin?": "Activer le plugin ?",
"Enable rate limiting": "Activer la limitation de débit",
"Enable Request Passthrough": "Activer le Passthrough de requêtes",
"Enable selected channels": "Activer les canaux sélectionnés",
......@@ -1906,6 +1936,7 @@
"Enter password (8–128 characters)": "Saisissez un mot de passe (8 à 128 caractères)",
"Enter quota in {{currency}}": "Saisir le quota en {{currency}}",
"Enter quota in tokens": "Saisir le quota en tokens",
"Enter sample usage to estimate the cost. Group and request multipliers are not included.": "Saisissez l’usage d’une requête pour estimer son coût, hors multiplicateurs de groupe et de requête.",
"Enter secret key": "Saisir la clé secrète",
"Enter system prompt (user prompt takes priority)": "Saisir l'invite système (l'invite utilisateur est prioritaire)",
"Enter tag name (optional)": "Saisir le nom du tag (facultatif)",
......@@ -2017,6 +2048,7 @@
"External operations mode": "Mode opérations externes",
"External Speed Test": "Test de vitesse externe",
"Extra": "Supplémentaire",
"Extra destinations beyond the channel API address. The channel address remains accessible.": "Destinations autorisées en plus de l’adresse API du canal, qui reste accessible.",
"Extra Notes (Optional)": "Notes supplémentaires (facultatif)",
"Extra visible": "Visible en plus",
"Extra visible to {{group}}": "Visible en plus pour {{group}}",
......@@ -2220,7 +2252,10 @@
"Field Path": "Chemin du champ",
"Fields": "Champs",
"File": "Fichier",
"File could not be verified": "Fichier non vérifié",
"File integrity verified": "Intégrité du fichier vérifiée",
"File Search": "Recherche de fichiers",
"File verification": "Vérification du fichier",
"Files to Retain": "Fichiers à conserver",
"Fill All Models": "Remplir tous les modèles",
"Fill Codex CLI / Claude CLI Templates": "Remplir les modèles Codex CLI / Claude CLI",
......@@ -2283,6 +2318,7 @@
"Fix Abilities": "Réparer la cohérence des canaux",
"Fix order": "Corriger l’ordre",
"Fixed abilities: {{success}} succeeded, {{fails}} failed": "Cohérence des canaux réparée : {{success}} réussie(s), {{fails}} échouée(s)",
"Fixed fee per request": "Frais fixes par requête",
"Fixed price": "Prix fixe",
"Fixed price (USD)": "Prix fixe (USD)",
"Fixed request price": "Prix fixe par requête",
......@@ -2344,6 +2380,7 @@
"Friendly name to identify this channel": "Nom convivial pour identifier ce canal",
"From Address": "De l'adresse",
"From IO.NET deployment": "Depuis le déploiement IO.NET",
"From marketplace index": "D’après l’index du catalogue",
"From model redirect, not yet added to models list": "Depuis la redirection du modèle, pas encore ajouté à la liste des modèles",
"Full API Key": "Clé API complète",
"Full Base URL (supports": "URL de base complète (prend en charge",
......@@ -2351,6 +2388,7 @@
"Full input length": "Longueur complète de l’entrée",
"Full JSON": "JSON complet",
"Full layout": "Disposition complète",
"Full source": "Code source complet",
"Full upstream catalog": "Catalogue amont complet",
"Full width": "Pleine largeur",
"Function calling": "Appel de fonction",
......@@ -2612,6 +2650,7 @@
"Index": "Index",
"Index request failed with HTTP {{status}}": "Échec de la requête d’index : HTTP {{status}}",
"Index URL": "URL de l’index",
"Information unavailable": "Information indisponible",
"Inherit global Auto order": "Hériter de l’ordre Auto global",
"Inherit vendor icon": "Hériter de l’icône du fournisseur",
"Inherited from {{vendor}}": "Héritée de {{vendor}}",
......@@ -2647,6 +2686,7 @@
"Integrations": "Intégrations",
"Integrity check failed": "Échec du contrôle d’intégrité",
"Integrity hash": "Empreinte d’intégrité",
"Integrity verification unavailable in this environment": "Vérification indisponible dans cet environnement",
"Inter-group overrides": "Dérogations inter-groupes",
"Inter-group ratio overrides": "Dérogations de ratio inter-groupes",
"Interface Language": "Langue de l'interface",
......@@ -3126,6 +3166,7 @@
"More": "Plus",
"More Apps": "Plus",
"more mapping": "plus de mappage",
"More models ({{count}})": "Autres modèles ({{count}})",
"More templates...": "Autres modèles…",
"More than 999 days left": "Plus de 999 jours restants",
"More...": "Plus...",
......@@ -3286,6 +3327,7 @@
"No encryption": "Aucun chiffrement",
"No endpoints configured. Switch to JSON mode or add rows to define endpoints.": "Aucun point de terminaison configuré. Passez en mode JSON ou ajoutez des lignes pour définir les points de terminaison.",
"No endpoints inferred from channels": "Aucun point de terminaison déduit des canaux",
"No extra domains declared": "Aucun domaine supplémentaire déclaré",
"No FAQ entries available": "Aucune entrée FAQ disponible",
"No FAQ entries yet. Click \"Add FAQ\" to create one.": "Aucune entrée FAQ pour l'instant. Cliquez sur \"Ajouter une FAQ\" pour en créer une.",
"No files match the accepted types.": "Aucun fichier ne correspond aux types acceptés.",
......@@ -3387,6 +3429,8 @@
"No rules yet": "Aucune règle",
"No rules yet. Add a group below to get started.": "Aucune règle pour le moment. Ajoutez un groupe ci-dessous pour commencer.",
"No separate media pricing configured.": "Aucune tarification multimédia séparée n’est configurée.",
"No source available": "Aucun code source disponible",
"No source changes": "Aucune modification du code",
"No status code mappings configured.": "Aucun mappage de codes de statut configuré.",
"No stores on this merchant yet. Set a return URL and click Create to mint your first pair.": "Ce marchand n’a pas encore de boutique. Définissez une URL de retour puis cliquez sur Créer pour générer votre première paire.",
"No subscription plans yet": "Aucun plan d'abonnement pour le moment",
......@@ -3415,6 +3459,7 @@
"No vendor data available": "Aucune donnée de fournisseur disponible",
"No vendors found": "Aucun fournisseur trouvé",
"No verification method is available for this action.": "Aucune méthode de vérification disponible pour cette action.",
"No version history": "Aucun historique des versions",
"No X Found": "Aucun X trouvé",
"Node": "Nœud",
"Node filters": "Filtres de nœuds",
......@@ -3424,6 +3469,7 @@
"Non-stream": "Non-streaming",
"Non-zero invitation rewards require compliance confirmation in Payment Gateway settings.": "Les récompenses d’invitation non nulles nécessitent une confirmation de conformité dans les paramètres de la passerelle de paiement.",
"None": "Aucun",
"None (plugin declaration)": "Aucune (déclaration du plugin)",
"noreply@example.com": "noreply@example.com",
"Normalized:": "Normalisé :",
"Not available": "Non disponible",
......@@ -3431,6 +3477,8 @@
"Not bound": "Non lié",
"Not configured": "Non configuré",
"Not declared": "Non déclaré",
"Not declared by this plugin": "Non déclaré par ce plugin",
"Not declared; an API key may still be required.": "Non déclarée ; une clé API peut rester nécessaire.",
"Not Equals": "Différent de",
"Not found upstream": "Absent de la source",
"Not generated": "Non généré",
......@@ -3466,6 +3514,7 @@
"Number of top log probabilities returned per token": "Nombre de log-probabilités retournées par jeton",
"Number of users invited": "Nombre d'utilisateurs invités",
"OAuth": "OAuth",
"OAuth 2.0 service account": "Compte de service OAuth 2.0",
"OAuth authorization timed out. Please try again.": "L’autorisation OAuth a expiré. Réessayez.",
"OAuth authorization was cancelled.": "L’autorisation OAuth a été annulée.",
"OAuth binding timed out. Please try again.": "La liaison OAuth a expiré. Veuillez réessayer.",
......@@ -3595,6 +3644,7 @@
"Optimized network architecture ensures millisecond response times": "Architecture réseau optimisée garantissant des temps de réponse en millisecondes",
"Optional callback override. Leave blank to use server address": "Remplacement optionnel du callback. Laisser vide pour utiliser l'adresse du serveur",
"Optional icon identifier for the login button": "Identifiant d'icône optionnel pour le bouton de connexion",
"Optional icon.svg or icon.png shipped next to plugin.js, up to 512 KiB. Stored separately from the source.": "Facultatif : icon.svg ou icon.png livré à côté de plugin.js, jusqu'à 512 Kio. Stocké séparément de la source.",
"Optional JSON policy to restrict access based on user info fields": "Politique JSON optionnelle pour restreindre l'accès en fonction des champs d'informations utilisateur",
"Optional minimum recharge amount for this method.": "Montant minimum de recharge optionnel pour cette méthode.",
"Optional multiplier per user group used when calculating recharge pricing. Provide a JSON object such as": "Multiplicateur optionnel par groupe d'utilisateurs utilisé lors du calcul des prix de recharge. Fournissez un objet JSON tel que",
......@@ -3618,6 +3668,7 @@
"Original Model": "Modèle Original",
"Original value": "Valeur d'origine",
"Other": "Autre",
"Other cases": "Autres cas",
"Other channels": "Autres canaux",
"Other groups": "Autres groupes",
"Other models": "Autres modèles",
......@@ -3884,16 +3935,26 @@
"Please wait for the current generation to complete": "Veuillez attendre la fin de la génération en cours",
"Plugin": "Plugin",
"Plugin author": "Auteur du plugin",
"Plugin default": "Valeur par défaut du plugin",
"Plugin details": "Détails du plugin",
"Plugin Generation": "Génération du plugin",
"Plugin icon": "Icône du plugin",
"Plugin icon exceeds the 512 KiB limit.": "L'icône du plugin dépasse la limite de 512 Kio.",
"Plugin icon must be an .svg or .png file.": "L'icône du plugin doit être un fichier .svg ou .png.",
"Plugin indexes are fetched by your browser. Installing runs the same review and admission pipeline as a manual upload.": "Les index de plugins sont récupérés par votre navigateur. L’installation suit exactement le même circuit d’examen et d’admission qu’un import manuel.",
"Plugin installation failed": "Échec de l’installation du plugin",
"Plugin is still in use": "Le plugin est encore utilisé",
"Plugin key": "Clé du plugin",
"Plugin metadata": "Métadonnées du plugin",
"Plugin sandbox": "Bac à sable du plugin",
"Plugin source": "Source du plugin",
"Plugin source exceeds the 1 MiB limit.": "Le code du plugin dépasse la limite de 1 Mio.",
"Plugin uploaded successfully": "Plugin importé avec succès",
"Plugin version activated": "Version du plugin activée",
"Plugin version deleted": "Version du plugin supprimée",
"Plugin website": "Site du plugin",
"Plugin-defined interfaces": "Interfaces définies par le plugin",
"Plugins can access channel credentials. Review the source and differences before installing.": "Les plugins peuvent accéder aux identifiants des canaux. Examinez le code et les différences avant l’installation.",
"Policy JSON": "JSON de stratégie",
"Polling": "Sondage",
"Polling mode requires Redis and memory cache, otherwise performance will be significantly degraded": "Le mode d'interrogation nécessite Redis et un cache mémoire, sinon les performances seront considérablement dégradées",
......@@ -3978,13 +4039,17 @@
"Price:": "Prix :",
"Price: High to Low": "Prix : Du plus élevé au plus bas",
"Price: Low to High": "Prix : Du plus bas au plus élevé",
"Prices are in {{currency}}, with units shown below. Use USD when editing expressions directly.": "Prix en {{currency}}, selon les unités indiquées ci-dessous. Utilisez les USD pour modifier directement les expressions.",
"Prices for each set of conditions": "Prix selon les conditions",
"Prices shown per": "Prix affichés par",
"Prices shown per usage unit": "Prix affichés par unité d'utilisation",
"Prices synced successfully": "Prix synchronisés avec succès",
"Prices vary by usage tier and request conditions": "Les prix varient selon le palier d’utilisation et les conditions de requête",
"Pricing": "Tarification",
"Pricing & Display": "Tarification et Affichage",
"Pricing by condition": "Tarification par condition",
"Pricing by Group": "Tarification par groupe",
"Pricing conditions": "Conditions tarifaires",
"Pricing Configuration": "Configuration de la tarification",
"Pricing currency": "Devise de tarification",
"Pricing group example": "Exemple de groupe tarifaire",
......@@ -4391,6 +4456,7 @@
"Retain last N days": "Conserver les N derniers jours",
"Retain last N files": "Conserver les N derniers fichiers",
"Retention days": "Jours de rétention",
"Retrieve result": "Consulter le résultat",
"Retry": "Réessayer",
"Retry Chain": "Chaîne de tentatives",
"Retry Settings": "Paramètres de relance",
......@@ -4681,6 +4747,7 @@
"Select theme preset": "Sélectionner un préréglage de thème",
"Select time granularity": "Sélectionner la granularité temporelle",
"Select vendor": "Sélectionner le fournisseur",
"Select version": "Choisir une version",
"Selectable groups": "Groupes sélectionnables",
"selected": "sélectionné",
"Selected {{count}}": "{{count}} sélectionné(s)",
......@@ -4688,7 +4755,7 @@
"Selected conflicts were overwritten successfully.": "Les conflits sélectionnés ont été écrasés avec succès.",
"Selected nodes": "Nœuds sélectionnés",
"Selected when creating a token and used as the default billing group for API calls.": "Sélectionné lors de la création d’un jeton et utilisé comme groupe de facturation par défaut pour les appels API.",
"Selecting a plugin fills its declared models.": "La sélection remplit les modèles déclarés.",
"Selecting a plugin fills its declared models and default base URL.": "La sélection remplit les modèles déclarés et l'URL de base par défaut.",
"Self-Use Mode": "Mode d'utilisation personnelle",
"Send": "Envoyer",
"Send a request": "Envoyer une requête",
......@@ -4725,6 +4792,8 @@
"Set filters to narrow down your log search results.": "Définir des filtres pour affiner vos résultats de recherche de journaux.",
"Set Header": "Définir l'en-tête",
"Set Password": "Définir un mot de passe",
"Set prices for each set of conditions below. Cost = usage × unit price + additional charge. Token prices are per million tokens.": "Définissez les prix selon les conditions ci-dessous. Coût = usage × prix unitaire + supplément. Les prix des tokens sont par million.",
"Set prices for each set of conditions below. Cost = usage × unit price + fixed fee. Token prices are per million tokens.": "Définissez les prix selon les conditions ci-dessous. Coût = usage × prix unitaire + frais fixes. Les prix des tokens sont par million.",
"Set Project to io.cloud when creating/selecting key": "Définir le projet sur io.cloud lors de la création/sélection de la clé",
"Set quota amount and limits": "Définir le quota et les limites",
"Set Request Header": "Définir un en-tête de requête",
......@@ -4825,12 +4894,14 @@
"socks5://user:pass@host:port": "socks5://user:pass@host:port",
"Soft Errors": "Erreurs douces",
"Some channels failed: {{errorMsg}}": "Certains canaux ont échoué : {{errorMsg}}",
"Some plugin information could not be read": "Certaines informations du plugin sont illisibles",
"Something went wrong!": "Quelque chose s'est mal passé !",
"Sonnet Model": "Modèle Sonnet",
"Sora": "Sora",
"Sort": "Trier",
"Sort by ID": "Trier par ID",
"Sort Order": "Ordre de tri",
"Sort priority": "Priorité de tri",
"Source": "Source",
"Source diff": "Différence du code source",
"Source Endpoint": "Point source",
......@@ -4860,6 +4931,7 @@
"stale": "expiré",
"Standard": "Standard",
"Standard price": "Prix standard",
"Standard protocol interfaces": "Interfaces des protocoles standard",
"Start": "Début",
"Start ≤ end: within the day; start > end: across midnight": "Début ≤ fin : plage dans la journée ; début > fin : plage après minuit",
"Start a conversation to see messages here": "Démarrez une conversation pour voir les messages ici",
......@@ -4920,6 +4992,7 @@
"Structured output": "Sortie structurée",
"Submit": "Soumettre",
"Submit directly": "Soumettre directement",
"Submit request": "Envoyer une requête",
"Submit Result": "Soumettre le résultat",
"Submit Time": "Heure de soumission",
"Submitted": "Soumis",
......@@ -4961,7 +5034,9 @@
"Supported Applications": "Applications prises en charge",
"Supported endpoints": "Points de terminaison pris en charge",
"Supported Imagine Models": "Modèles Imagine pris en charge",
"Supported interfaces": "Interfaces prises en charge",
"Supported modalities": "Modalités prises en charge",
"Supported models": "Modèles pris en charge",
"Supported operators: eq, ne, gt, gte, lt, lte, in, not_in, contains, not_contains, exists, not_exists. Leave empty to allow all users.": "Opérateurs pris en charge : eq, ne, gt, gte, lt, lte, in, not_in, contains, not_contains, exists, not_exists. Laissez vide pour autoriser tous les utilisateurs.",
"Supported parameters": "Paramètres pris en charge",
"Supported variables": "Variables supportées",
......@@ -4994,6 +5069,7 @@
"Sync Upstream Models": "Synchroniser les modèles amont",
"Synced upstream models": "Modèles en amont synchronisés",
"Synchronize models and vendors from an upstream source": "Synchroniser les modèles et les fournisseurs à partir d'une source amont",
"Synchronous": "Synchrone",
"Syncing prices, please wait...": "Synchronisation des prix, veuillez patienter...",
"Syncing...": "Synchronisation...",
"System": "Système",
......@@ -5146,6 +5222,7 @@
"The site exchange rate is invalid. Prices are shown in USD.": "Le taux de change du site est invalide. Les prix sont affichés en USD.",
"The site is not available at the moment.": "Le site n'est pas disponible pour le moment.",
"The slug is appended to the URL:": "Le slug est ajouté à l'URL :",
"The source is unavailable or this browser cannot calculate SHA-256. The gateway checks the published hash during installation.": "Le code est indisponible ou le navigateur ne peut pas calculer SHA-256. La passerelle vérifie l’empreinte publiée à l’installation.",
"The sync will fetch missing models and vendors from the selected source. Existing records are updated only when you approve conflicts.": "La synchronisation récupérera les modèles et fournisseurs manquants à partir de la source sélectionnée. Les enregistrements existants ne sont mis à jour que lorsque vous approuvez les conflits.",
"The system always bills in USD. Site currency makes entering and converting prices easier; amounts are converted to USD using the site exchange rate. Switching currencies does not change the actual price. Raw billing expressions always use USD.": "Le système facture toujours en USD. La devise du site facilite la saisie et la conversion des prix ; les montants sont convertis en USD au taux du site. Changer de devise ne modifie pas le prix réel. Les expressions de facturation brutes utilisent toujours les USD.",
"The Telegram authorization request is invalid or expired.": "La demande d’autorisation Telegram est invalide ou a expiré.",
......@@ -5156,6 +5233,7 @@
"The two-factor setup has expired or changed. Start setup again.": "La configuration à deux facteurs a expiré ou changé. Recommencez.",
"The unique identifier for this model": "L'identifiant unique de ce modèle",
"The unique name for this vendor": "Le nom unique de ce fournisseur",
"The upstream address this plugin sends requests to. The plugin declares no default, so it must be filled in.": "Adresse amont vers laquelle ce plugin envoie ses requêtes. Le plugin ne déclare aucune valeur par défaut, elle doit donc être renseignée.",
"The upstream channel that served the requests": "Le canal en amont ayant servi les requêtes",
"The upstream natively supports all three protocols; every selected route is forwarded without conversion.": "Le service amont prend nativement en charge les trois protocoles ; chaque route sélectionnée est transférée sans conversion.",
"The upstream response is valid JSON, but it does not match the OpenAI credit_summary format. The channel balance was not updated.": "La réponse amont est un JSON valide, mais ne correspond pas au format OpenAI credit_summary. Le solde du canal n'a pas été mis à jour.",
......@@ -5188,6 +5266,8 @@
"This action will permanently remove 2FA protection from your account.": "Cette action supprimera définitivement la protection 2FA de votre compte.",
"This announcement will be removed from the list.": "Cette annonce sera retirée de la liste.",
"This API shortcut will be removed from the list.": "Ce raccourci API sera retiré de la liste.",
"This base URL points at a private or local network host. Make sure it is an upstream you control.": "Cette URL de base pointe vers un hôte privé ou local. Vérifiez qu'il s'agit d'un amont que vous contrôlez.",
"This base URL uses plain HTTP, so the channel key is sent unencrypted.": "Cette URL de base utilise HTTP en clair : la clé du canal sera envoyée sans chiffrement.",
"This callback URL updates from the slug field and is the value to register with your provider.": "Cette URL de rappel se met à jour à partir du champ slug et doit être enregistrée auprès de votre fournisseur.",
"This channel has no configured models.": "Ce canal n'a aucun modèle configuré.",
"This channel is not an Ollama channel.": "Ce canal n'est pas un canal Ollama.",
......@@ -5223,6 +5303,7 @@
"This plan does not allow balance redemption": "Ce forfait ne permet pas le paiement avec le solde",
"This plugin has no factory fallback. Deleting or disabling it makes this platform unavailable.": "Ce plugin ne dispose d’aucune version intégrée de secours. Sa suppression ou désactivation rend la plateforme indisponible.",
"This plugin path does not resolve within the source repository.": "Ce chemin de plugin ne pointe pas dans le dépôt de la source.",
"This preview reads static plugin declarations. The gateway validates the plugin during installation.": "Cet aperçu lit les déclarations statiques du plugin. La passerelle valide le plugin à l’installation.",
"This project must be used in compliance with the": "Ce projet doit être utilisé conformément aux",
"This removes {{count}} failed models from this channel. This action cannot be undone.": "Cela supprime {{count}} modèles en échec de ce canal. Cette action est irréversible.",
"This route discovers upstream OpenAI models and cannot be split or matched by client model rules.": "Cette route découvre les modèles OpenAI en amont et ne peut être ni divisée ni associée par des règles de modèles clients.",
......@@ -5495,6 +5576,7 @@
"Unit price (local currency / USD)": "Prix unitaire (devise locale / USD)",
"Unit price (USD)": "Prix unitaire (USD)",
"Unit price must be greater than 0": "Le prix unitaire doit être supérieur à 0",
"Unit price: {{field}}": "Prix unitaire : {{field}}",
"Units per USD": "Unités par USD",
"Unknown": "Inconnu",
"Unknown device": "Appareil inconnu",
......@@ -5579,6 +5661,7 @@
"Uploading...": "Importation...",
"Upscale": "Agrandir",
"Upstream": "Amont",
"Upstream authentication": "Authentification du fournisseur",
"Upstream did not return reset credit details.": "L'amont n'a renvoyé aucun détail de crédit de réinitialisation.",
"Upstream JSON response": "Réponse JSON amont",
"Upstream Model Detection Settings": "Paramètres de détection des modèles en amont",
......@@ -5621,6 +5704,7 @@
"URL to your logo image (optional)": "URL de votre image de logo (facultatif)",
"US dollar (USD)": "Dollar américain (USD)",
"Usage": "Utilisation",
"Usage · {{price}}": "Usage · {{price}}",
"Usage at a glance": "Vue d'ensemble de l'utilisation",
"Usage guide": "Guide d'utilisation",
"Usage logs": "Journaux d'utilisation",
......@@ -5643,6 +5727,7 @@
"Use authenticator code": "Utiliser le code de l'authentificateur",
"Use backup code": "Utiliser un code de secours",
"Use Bearer for all protocols": "Utiliser Bearer pour tous les protocoles",
"Use default": "Utiliser la valeur par défaut",
"Use disk cache when request body exceeds this size": "Utiliser le cache disque quand le corps de requête dépasse cette taille",
"Use exact client model names, separated by commas. Prefixes and wildcards are not supported.": "Utilisez les noms exacts des modèles client, séparés par des virgules. Les préfixes et jokers ne sont pas pris en charge.",
"Use exact model names such as gpt-4o, or regex rules prefixed with re: such as re:^gemini-.": "Utilisez des noms de modèle exacts comme gpt-4o, ou des règles regex préfixées par re: comme re:^gemini-.",
......@@ -5674,6 +5759,7 @@
"Used to authenticate with io.net deployment API": "Utilisée pour l'authentification auprès de l'API de déploiement io.net",
"Used to authenticate with the worker. Leave blank to keep the existing secret.": "Utilisé pour l'authentification auprès du worker. Laissez vide pour conserver le secret existant.",
"Used to decide the payment flow. Built-in keys include stripe for Stripe and waffo_pancake for Waffo Pancake; other values are sent to Epay as the type parameter.": "Détermine le flux de paiement utilisé au clic. Les clés intégrées incluent stripe pour Stripe et waffo_pancake pour Waffo Pancake ; les autres valeurs sont envoyées à Epay comme paramètre type.",
"Used when a Task Plugin channel has no API address configured.": "Utilisée si aucune adresse API n’est définie pour le canal du plugin de tâches.",
"Used:": "Utilisé :",
"User": "Utilisateurs",
"User {{id}}": "Utilisateur {{id}}",
......@@ -5783,6 +5869,7 @@
"Verifying credentials and pulling stores from your Pancake account...": "Vérification des identifiants et récupération des boutiques depuis votre compte Pancake...",
"Verifying your {{provider}} account": "Vérification de votre compte {{provider}}",
"Version": "Version",
"Version differences": "Différences de versions",
"Version history": "Historique des versions",
"Version Overrides": "Remplacements de version",
"Versions": "Versions",
......
......@@ -75,6 +75,7 @@
"{{currency}} price per 1M tokens.": "100万トークンあたりの価格({{currency}})。",
"{{field}} updated to {{value}}": "{{field}} を {{value}} に更新しました",
"{{field}} updated to {{value}} for tag: {{tag}}": "タグ「{{tag}}」の {{field}} を {{value}} に更新しました",
"{{key}} · from {{source}}": "{{key}} · 配布元 {{source}}",
"{{key}} · version {{version}} · from {{source}}": "{{key}} · バージョン {{version}} · 提供元 {{source}}",
"{{method}} {{route}}": "{{method}} {{route}}",
"{{modality}} not supported": "{{modality}} はサポートされていません",
......@@ -141,6 +142,7 @@
"80,443,8080": "80,443,8080",
"A billing multiplier. Lower ratios mean lower API call costs.": "課金倍率です。倍率が低いほど API 呼び出しコストは低くなります。",
"A focused home for keys, balance, routing, and service health.": "キー、残高、ルーティング、サービス状態を集約したホームです。",
"A matching hash confirms the published file, not the safety of its code.": "ハッシュの一致は公開ファイルとの同一性を示すだけで、コードの安全性は保証しません。",
"A security operation is already in progress.": "セキュリティ操作を実行中です。",
"A selected model no longer exists. Reload the model list.": "選択したモデルは既に削除されています。一覧を再読み込みしてください。",
"A vendor with this name already exists.": "この名前のプロバイダーは既に存在します。",
......@@ -270,13 +272,17 @@
"Add your API keys, set up channels and configure access permissions": "APIキーを追加し、チャネルを設定してアクセス権限を構成します",
"Added {{count}} model(s)": "{{count}} 個のモデルを追加しました",
"Added {{count}} models from \"{{name}}\"": "「{{name}}」から {{count}} 個のモデルを追加しました",
"Added once per request. Set to 0 for usage-only billing.": "リクエストごとに1回加算します。従量課金のみの場合は0を入力してください。",
"Added successfully": "追加に成功しました",
"Added to the usage cost. Set to 0 for no additional charge.": "使用量に応じた料金に加算する金額です。加算しない場合は0を入力してください。",
"Additional charge": "追加料金",
"Additional Conditions": "追加条件",
"Additional information": "追加情報",
"Additional Information": "追加情報",
"Additional Limit": "追加上限",
"Additional Limits": "追加上限",
"Additional metered capability": "追加の従量制機能",
"Additional request domains": "追加のアクセス先ドメイン",
"Additional verification required": "追加の確認が必要です",
"Adjust filters, then search to refresh the logs.": "フィルターを調整してから検索し、ログを更新します。",
"Adjust Quota": "クォータを調整",
......@@ -349,6 +355,7 @@
"All Must Match (AND)": "すべて一致(AND)",
"All nodes": "すべてのノード",
"All playground messages saved in this browser will be removed. This cannot be undone.": "このブラウザに保存されたすべての Playground メッセージが削除されます。この操作は元に戻せません。",
"All requests": "すべてのリクエスト",
"All requests must include": "すべてのリクエストには",
"All results": "すべての結果",
"All routes": "すべてのルート",
......@@ -366,6 +373,7 @@
"Allow accountFilter parameter": "accountFilter パラメータを許可",
"Allow balance redemption": "残高での交換を許可",
"Allow Claude beta query passthrough": "Claude ベータクエリのパススルーを許可",
"Allow clients to query configured prices via `/api/ratio`.": "クライアントが `/api/ratio` 経由で設定された価格を照会できるようにします。",
"Allow clients to query configured ratios via `/api/ratio`.": "クライアントが `/api/ratio` 経由で設定された比率を照会できるようにします。",
"Allow HTTP image requests": "HTTP画像リクエストを許可",
"Allow include usage obfuscation passthrough": "使用量難読化のパススルーを許可",
......@@ -490,6 +498,8 @@
"Append to existing keys": "既存のキーに追加",
"Append value to array / string / object end": "配列/文字列/オブジェクトの末尾に値を追加",
"appended": "追加済み",
"Applicable channels": "対応チャネル",
"Applicable conditions": "適用条件",
"Application": "アプリケーション",
"Applied {{name}} pricing to {{count}} models": "{{name}} の料金を {{count}} 個のモデルに適用しました",
"Applied changes": "適用済みの変更",
......@@ -526,6 +536,7 @@
"Are you sure you want to delete this key? This action cannot be undone.": "このキーを削除してもよろしいですか?この操作は元に戻せません。",
"Are you sure you want to disable all enabled keys?": "すべての有効なキーを無効にすることをよろしいですか?",
"Are you sure you want to enable all keys?": "すべてのキーを有効にすることをよろしいですか?",
"Are you sure you want to enable plugin {{name}} ({{key}})?": "プラグイン {{name}}({{key}})を有効にしてもよろしいですか?",
"Are you sure you want to manually complete this order? The user will be credited with the corresponding quota.": "この注文を手動で完了してもよろしいですか?ユーザーには対応するクォータがクレジットされます。",
"Are you sure you want to sign out? You will need to sign in again to access your account.": "ログアウトしてもよろしいですか?アカウントにアクセスするには再度ログインする必要があります。",
"Are you sure you want to unbind {{provider}} for this user? The user will no longer be able to log in via this method.": "このユーザーの{{provider}}連携を解除してもよろしいですか?このユーザーはこの方法でログインできなくなります。",
......@@ -584,6 +595,7 @@
"auth.resetPasswordConfirm.retry": "再試行 ({{seconds}}秒)",
"auth.resetPasswordConfirm.success": "パスワードが正常にリセットされました",
"Authentication": "認証",
"Authentication for upstream requests; channel credentials may still be used.": "上流サービスへの認証方式です。チャネルの認証情報が使われる場合もあります。",
"Authentication Method": "認証方式",
"Authenticator code": "認証コード",
"Authenticator code or backup code": "認証アプリのコードまたはバックアップコード",
......@@ -648,6 +660,7 @@
"Back to login": "ログインに戻る",
"Back to Models": "モデルに戻る",
"Backed up": "バックアップ済み",
"Background": "バックグラウンド",
"Background job tracker for queued work.": "キューされた作業のためのバックグラウンドジョブトラッカー。",
"Backup Code": "バックアップコード",
"Backup code must be in format XXXX-XXXX": "バックアップコードはXXXX-XXXX形式で入力してください",
......@@ -891,6 +904,7 @@
"Channel type": "チャネルタイプ",
"Channel type is required": "チャネルタイプが必要です",
"Channel types": "チャネルタイプ",
"Channel types you can use when binding this plugin.": "このプラグインを紐付ける際に選択できるチャネルの種類です。",
"Channel updated successfully": "チャネルが正常に更新されました",
"Channel-specific settings (JSON format)": "チャネル固有の設定 (JSON 形式)",
"Channel:": "チャネル:",
......@@ -927,6 +941,7 @@
"Check-in successful! Received": "チェックインに成功しました!受け取りました",
"Checked in": "チェックイン済み",
"Checking connection": "接続を確認しています",
"Checking file integrity...": "ファイルを検証中…",
"Checking name...": "名前をチェック中...",
"Checking updates...": "更新を確認中...",
"checkout.session.completed": "checkout.session.completed",
......@@ -1178,6 +1193,7 @@
"Connection failed": "接続に失敗しました",
"Connection info detected in clipboard": "クリップボードに接続情報が見つかりました",
"Connection info filled in": "接続情報を入力しました",
"Connection settings": "接続設定",
"Connection successful": "接続に成功しました",
"Console": "コンソール",
"Console area": "コンソールエリア",
......@@ -1234,12 +1250,15 @@
"Copy All": "すべてコピー",
"Copy all backup codes": "すべてのバックアップコードをコピー",
"Copy All Codes": "すべてのコードをコピー",
"Copy all models": "すべてのモデルをコピー",
"Copy API key": "APIキーをコピー",
"Copy base URL": "ベース URL をコピー",
"Copy billing expression": "課金式をコピー",
"Copy callback URL": "コールバック URL をコピー",
"Copy Channel": "チャネルをコピー",
"Copy code": "コードをコピー",
"Copy Connection Info": "接続情報をコピー",
"Copy endpoint path": "エンドポイントのパスをコピー",
"Copy failed": "コピーに失敗しました",
"Copy Field": "フィールドをコピー",
"Copy Header": "ヘッダーをコピー",
......@@ -1248,6 +1267,7 @@
"Copy Link": "リンクをコピー",
"Copy model name": "モデル名をコピー",
"Copy model names": "モデル名をコピー",
"Copy plugin key": "プラグイン識別子をコピー",
"Copy prompt": "プロンプトをコピー",
"Copy ready-to-run curl": "そのまま実行できる curl をコピー",
"Copy redemption code": "引き換えコードをコピー",
......@@ -1276,6 +1296,7 @@
"Cost = 10 × 0.8 = 8": "費用 = 10 × 0.8 = 8",
"Cost = 10 × 1.0 = 10": "費用 = 10 × 1.0 = 10",
"Cost = model price × that one ratio. Nothing else from the group settings enters the formula.": "費用 = モデル価格 × この1つの倍率。グループ設定の他の項目は計算式に入りません。",
"Cost calculator": "料金シミュレーション",
"Cost in {{currency}} per request, regardless of tokens used.": "トークン使用量に関係なく、リクエストごとにかかる料金({{currency}})。",
"Cost in USD per request, regardless of tokens used.": "使用されたトークンに関係なく、リクエストあたりのUSDでのコスト。",
"Cost Tracking": "コスト追跡",
......@@ -1368,8 +1389,10 @@
"Current Password": "現在のパスワード",
"Current password is incorrect.": "現在のパスワードが正しくありません。",
"Current Price": "現在の価格",
"Current pricing conditions": "現在の料金条件",
"Current quota": "現在のクォータ",
"Current token": "現在のトークン",
"Current v{{from}} → install v{{to}}": "現在 v{{from}} → インストール v{{to}}",
"Current value": "現在の値",
"Current Value": "現在の値",
"Current vendor": "現在のプロバイダー",
......@@ -1438,8 +1461,10 @@
"Default": "デフォルト",
"Default / range": "デフォルト / 範囲",
"Default administrator permissions can be overridden for this user.": "このユーザーには既定の管理者権限を上書きできます。",
"Default API address": "既定の API アドレス",
"Default API Version *": "デフォルトのAPIバージョン *",
"Default API version for this channel": "このチャネルのデフォルトのAPIバージョン",
"Default base URL": "既定の Base URL",
"Default Bearer": "既定の Bearer",
"Default Collapse Sidebar": "デフォルトのサイドバー折りたたみ",
"Default consumption chart": "デフォルトの消費チャート",
......@@ -1578,6 +1603,8 @@
"Disable All": "すべて無効にする",
"Disable custom task plugins?": "カスタムタスクプラグインを無効化しますか?",
"Disable on failure": "失敗時に無効にする",
"Disable plugin {{name}} ({{key}})? Requests using this plugin may be affected.": "プラグイン {{name}}({{key}})を無効にしますか?このプラグインを使用するリクエストに影響する可能性があります。",
"Disable plugin?": "プラグインを無効にしますか?",
"Disable selected channels": "選択したチャネルを無効にする",
"Disable selected models": "選択したモデルを無効にする",
"Disable store passthrough": "ストアパススルーを無効にする",
......@@ -1674,6 +1701,8 @@
"Duration Settings": "有効期間設定",
"Duration Unit": "期間単位",
"Duration Value": "期間値",
"Dynamic declarations cannot be previewed. Retry or review the source below.": "動的に生成される宣言はプレビューできません。再試行するか、下のソースを確認してください。",
"Dynamic operation": "動的操作",
"Dynamic Pricing": "ダイナミック価格設定",
"e.g. ¥ or HK$": "例: ¥ または HK$",
"e.g. 401, 403, 429, 500-599": "例:401, 403, 429, 500-599",
......@@ -1809,6 +1838,7 @@
"Enable Passkey": "Passkeyを有効にする",
"Enable Performance Monitoring": "パフォーマンス監視を有効にする",
"Enable plugin {{key}}": "プラグイン {{key}} を有効化",
"Enable plugin?": "プラグインを有効にしますか?",
"Enable rate limiting": "レート制限を有効にする",
"Enable Request Passthrough": "リクエストパススルーを有効にする",
"Enable selected channels": "選択したチャネルを有効にする",
......@@ -1906,6 +1936,7 @@
"Enter password (8–128 characters)": "パスワードを入力(8~128文字)",
"Enter quota in {{currency}}": "{{currency}} でクォータを入力",
"Enter quota in tokens": "トークン単位でクォータを入力",
"Enter sample usage to estimate the cost. Group and request multipliers are not included.": "1回のリクエストの使用量を入力して料金を確認できます。グループ倍率とリクエストルールの倍率は含みません。",
"Enter secret key": "シークレットキーを入力",
"Enter system prompt (user prompt takes priority)": "システムプロンプトを入力 (ユーザープロンプトが優先されます)",
"Enter tag name (optional)": "タグ名を入力 (オプション)",
......@@ -2017,6 +2048,7 @@
"External operations mode": "外部運用モード",
"External Speed Test": "外部スピードテスト",
"Extra": "追加",
"Extra destinations beyond the channel API address. The channel address remains accessible.": "チャネルの API アドレスに加えてアクセスできるドメインです。チャネルのアドレス自体にもアクセスできます。",
"Extra Notes (Optional)": "追加のメモ (オプション)",
"Extra visible": "追加表示",
"Extra visible to {{group}}": "{{group}} に追加表示",
......@@ -2220,7 +2252,10 @@
"Field Path": "フィールドパス",
"Fields": "項目",
"File": "ファイル",
"File could not be verified": "ファイルを検証できませんでした",
"File integrity verified": "ファイルの整合性を確認済み",
"File Search": "ファイル検索",
"File verification": "ファイルの検証",
"Files to Retain": "保持ファイル数",
"Fill All Models": "すべてのモデルを埋める",
"Fill Codex CLI / Claude CLI Templates": "Codex CLI / Claude CLI テンプレートを入力",
......@@ -2283,6 +2318,7 @@
"Fix Abilities": "チャネル整合性を修復",
"Fix order": "順序を修正",
"Fixed abilities: {{success}} succeeded, {{fails}} failed": "チャネル整合性を修復しました:成功 {{success}} 件、失敗 {{fails}} 件",
"Fixed fee per request": "リクエストごとの固定料金",
"Fixed price": "固定価格",
"Fixed price (USD)": "固定価格 (USD)",
"Fixed request price": "固定リクエスト価格",
......@@ -2344,6 +2380,7 @@
"Friendly name to identify this channel": "このチャネルを識別するための表示名",
"From Address": "差出人アドレス",
"From IO.NET deployment": "IO.NET展開から",
"From marketplace index": "マーケットプレイスの索引より",
"From model redirect, not yet added to models list": "モデルリダイレクトから、まだモデルリストに追加されていません",
"Full API Key": "完全なAPIキー",
"Full Base URL (supports": "完全なベースURL (サポート",
......@@ -2351,6 +2388,7 @@
"Full input length": "完全な入力長",
"Full JSON": "完全な JSON",
"Full layout": "フルレイアウト",
"Full source": "ソースコード全体",
"Full upstream catalog": "上流の全カタログ",
"Full width": "全幅",
"Function calling": "関数呼び出し",
......@@ -2612,6 +2650,7 @@
"Index": "インデックス",
"Index request failed with HTTP {{status}}": "インデックスの取得に失敗しました(HTTP {{status}})",
"Index URL": "インデックス URL",
"Information unavailable": "情報を取得できません",
"Inherit global Auto order": "グローバル Auto 順序を継承",
"Inherit vendor icon": "プロバイダーのアイコンを継承",
"Inherited from {{vendor}}": "{{vendor}} から継承",
......@@ -2647,6 +2686,7 @@
"Integrations": "統合",
"Integrity check failed": "整合性チェックに失敗しました",
"Integrity hash": "整合性ハッシュ",
"Integrity verification unavailable in this environment": "現在の環境では検証できません",
"Inter-group overrides": "グループ間上書き",
"Inter-group ratio overrides": "グループ間比率上書き",
"Interface Language": "インターフェース言語",
......@@ -3126,6 +3166,7 @@
"More": "もっと見る",
"More Apps": "さらに",
"more mapping": "さらにマッピング",
"More models ({{count}})": "その他のモデル({{count}})",
"More templates...": "ほかのテンプレート…",
"More than 999 days left": "999日以上",
"More...": "その他...",
......@@ -3286,6 +3327,7 @@
"No encryption": "暗号化なし",
"No endpoints configured. Switch to JSON mode or add rows to define endpoints.": "エンドポイントが設定されていません。JSONモードに切り替えるか、エンドポイントを定義するために行を追加してください。",
"No endpoints inferred from channels": "チャネルから取得したエンドポイントなし",
"No extra domains declared": "追加ドメインの宣言なし",
"No FAQ entries available": "FAQエントリがありません",
"No FAQ entries yet. Click \"Add FAQ\" to create one.": "FAQエントリはまだありません。「FAQを追加」をクリックして作成してください。",
"No files match the accepted types.": "許可された種類に一致するファイルがありません。",
......@@ -3387,6 +3429,8 @@
"No rules yet": "ルールがありません",
"No rules yet. Add a group below to get started.": "まだルールがありません。下にグループを追加して開始してください。",
"No separate media pricing configured.": "個別のメディア料金は設定されていません。",
"No source available": "ソースコードはありません",
"No source changes": "ソースコードに変更はありません",
"No status code mappings configured.": "ステータスコードのマッピングが設定されていません。",
"No stores on this merchant yet. Set a return URL and click Create to mint your first pair.": "このマーチャントにはまだストアがありません。戻り URL を設定し、作成をクリックして最初のペアを作成してください。",
"No subscription plans yet": "サブスクリプションプランがありません",
......@@ -3415,6 +3459,7 @@
"No vendor data available": "ベンダーデータがありません",
"No vendors found": "プロバイダーが見つかりません",
"No verification method is available for this action.": "この操作に利用できる確認方法がありません。",
"No version history": "バージョン履歴はありません",
"No X Found": "X が見つかりません",
"Node": "ノード",
"Node filters": "ノードフィルター",
......@@ -3424,6 +3469,7 @@
"Non-stream": "非ストリーミング",
"Non-zero invitation rewards require compliance confirmation in Payment Gateway settings.": "0 以外の招待報酬には、支払いゲートウェイ設定でのコンプライアンス確認が必要です。",
"None": "なし",
"None (plugin declaration)": "なし(プラグインの宣言)",
"noreply@example.com": "noreply@example.com",
"Normalized:": "正規化:",
"Not available": "利用できません",
......@@ -3431,6 +3477,8 @@
"Not bound": "未バインド",
"Not configured": "未設定",
"Not declared": "未宣言",
"Not declared by this plugin": "プラグインによる宣言なし",
"Not declared; an API key may still be required.": "認証方式の宣言がありません。API キーが必要な場合があります。",
"Not Equals": "等しくない",
"Not found upstream": "上流に見つかりません",
"Not generated": "未生成",
......@@ -3466,6 +3514,7 @@
"Number of top log probabilities returned per token": "トークンごとに返される上位対数確率の数",
"Number of users invited": "招待されたユーザー数",
"OAuth": "OAuth",
"OAuth 2.0 service account": "OAuth 2.0 サービスアカウント",
"OAuth authorization timed out. Please try again.": "OAuth認可がタイムアウトしました。もう一度お試しください。",
"OAuth authorization was cancelled.": "OAuth認可がキャンセルされました。",
"OAuth binding timed out. Please try again.": "OAuth 連携がタイムアウトしました。もう一度お試しください。",
......@@ -3595,6 +3644,7 @@
"Optimized network architecture ensures millisecond response times": "最適化されたネットワークアーキテクチャによりミリ秒単位の応答時間を保証",
"Optional callback override. Leave blank to use server address": "オプションのコールバック上書き。サーバーアドレスを使用するには空欄のままにします",
"Optional icon identifier for the login button": "ログインボタン用のオプションのアイコン識別子",
"Optional icon.svg or icon.png shipped next to plugin.js, up to 512 KiB. Stored separately from the source.": "任意。plugin.js と同じ階層の icon.svg または icon.png(最大 512 KiB)。ソースとは別に保存されます。",
"Optional JSON policy to restrict access based on user info fields": "ユーザー情報フィールドに基づいてアクセスを制限するためのオプションのJSONポリシー",
"Optional minimum recharge amount for this method.": "この方法のオプションの最小チャージ額。",
"Optional multiplier per user group used when calculating recharge pricing. Provide a JSON object such as": "チャージ料金を計算する際に使用されるユーザーグループごとのオプションの乗数。次のようなJSONオブジェクトを提供してください",
......@@ -3618,6 +3668,7 @@
"Original Model": "オリジナルモデル",
"Original value": "元の値",
"Other": "その他",
"Other cases": "その他の場合",
"Other channels": "その他のチャネル",
"Other groups": "その他のグループ",
"Other models": "その他のモデル",
......@@ -3884,16 +3935,26 @@
"Please wait for the current generation to complete": "現在の生成が完了するまでお待ちください",
"Plugin": "プラグイン",
"Plugin author": "プラグイン作成者",
"Plugin default": "プラグインの既定値",
"Plugin details": "プラグインの詳細",
"Plugin Generation": "プラグイン世代",
"Plugin icon": "プラグインアイコン",
"Plugin icon exceeds the 512 KiB limit.": "プラグインアイコンが 512 KiB の上限を超えています。",
"Plugin icon must be an .svg or .png file.": "プラグインアイコンは .svg または .png ファイルである必要があります。",
"Plugin indexes are fetched by your browser. Installing runs the same review and admission pipeline as a manual upload.": "プラグインのインデックスはブラウザが取得します。インストール時の確認と受け入れの流れは手動アップロードと全く同じです。",
"Plugin installation failed": "プラグインのインストールに失敗しました",
"Plugin is still in use": "プラグインは使用中です",
"Plugin key": "プラグインキー",
"Plugin metadata": "プラグインメタデータ",
"Plugin sandbox": "プラグインサンドボックス",
"Plugin source": "プラグインソース",
"Plugin source exceeds the 1 MiB limit.": "プラグインのソースが 1 MiB の上限を超えています。",
"Plugin uploaded successfully": "プラグインをアップロードしました",
"Plugin version activated": "プラグインバージョンを有効化しました",
"Plugin version deleted": "プラグインバージョンを削除しました",
"Plugin website": "プラグイン公式サイト",
"Plugin-defined interfaces": "プラグイン独自のインターフェース",
"Plugins can access channel credentials. Review the source and differences before installing.": "プラグインはチャネルの認証情報にアクセスできます。インストール前にソースコードと差分を確認してください。",
"Policy JSON": "ポリシーJSON",
"Polling": "ポーリング",
"Polling mode requires Redis and memory cache, otherwise performance will be significantly degraded": "ポーリングモードにはRedisとメモリキャッシュが必要です。そうでない場合、パフォーマンスが大幅に低下します",
......@@ -3978,13 +4039,17 @@
"Price:": "価格:",
"Price: High to Low": "価格:高い順",
"Price: Low to High": "価格:低い順",
"Prices are in {{currency}}, with units shown below. Use USD when editing expressions directly.": "価格は{{currency}}で入力してください。単位は下に表示されています。式を直接編集する場合は米ドルを使用してください。",
"Prices for each set of conditions": "各条件に対応する料金",
"Prices shown per": "価格表示単位",
"Prices shown per usage unit": "使用単位ごとの価格を表示",
"Prices synced successfully": "価格が正常に同期されました",
"Prices vary by usage tier and request conditions": "価格は利用ティアとリクエスト条件で変動します",
"Pricing": "価格設定",
"Pricing & Display": "価格設定と表示",
"Pricing by condition": "条件別料金",
"Pricing by Group": "グループ別価格設定",
"Pricing conditions": "料金条件",
"Pricing Configuration": "価格設定",
"Pricing currency": "価格設定の通貨",
"Pricing group example": "料金グループの例",
......@@ -4391,6 +4456,7 @@
"Retain last N days": "最新N日間を保持",
"Retain last N files": "最新N個のファイルを保持",
"Retention days": "保持日数",
"Retrieve result": "結果を取得",
"Retry": "再試行",
"Retry Chain": "リトライチェーン",
"Retry Settings": "再試行設定",
......@@ -4681,6 +4747,7 @@
"Select theme preset": "テーマプリセットを選択",
"Select time granularity": "時間の粒度を選択",
"Select vendor": "ベンダーを選択",
"Select version": "バージョンを選択",
"Selectable groups": "選択可能なグループ",
"selected": "選択済み",
"Selected {{count}}": "{{count}} 件選択済み",
......@@ -4688,7 +4755,7 @@
"Selected conflicts were overwritten successfully.": "選択した競合が正常に上書きされました。",
"Selected nodes": "選択したノード",
"Selected when creating a token and used as the default billing group for API calls.": "トークン作成時に選択され、API 呼び出しのデフォルト課金グループとして使われます。",
"Selecting a plugin fills its declared models.": "プラグインを選択すると宣言済みモデルが入力されます。",
"Selecting a plugin fills its declared models and default base URL.": "プラグインを選択すると宣言済みモデルと既定の Base URL が入力されます。",
"Self-Use Mode": "セルフユースモード",
"Send": "送信",
"Send a request": "リクエストを送信",
......@@ -4725,6 +4792,8 @@
"Set filters to narrow down your log search results.": "ログ検索結果を絞り込むためにフィルターを設定します。",
"Set Header": "ヘッダーを設定",
"Set Password": "パスワードを設定",
"Set prices for each set of conditions below. Cost = usage × unit price + additional charge. Token prices are per million tokens.": "以下の条件ごとに料金を設定してください。料金 = 使用量 × 単価 + 追加料金。トークン単価は100万トークンあたりで入力します。",
"Set prices for each set of conditions below. Cost = usage × unit price + fixed fee. Token prices are per million tokens.": "以下の条件ごとに料金を設定してください。料金 = 使用量 × 単価 + 固定料金。トークン単価は100万トークンあたりで入力します。",
"Set Project to io.cloud when creating/selecting key": "キーを作成/選択する際にプロジェクトを io.cloud に設定",
"Set quota amount and limits": "クォータ量と制限を設定",
"Set Request Header": "リクエストヘッダーを設定",
......@@ -4825,12 +4894,14 @@
"socks5://user:pass@host:port": "socks5://user:pass@host:port",
"Soft Errors": "ソフトエラー",
"Some channels failed: {{errorMsg}}": "一部のチャネルが失敗しました:{{errorMsg}}",
"Some plugin information could not be read": "プラグイン情報の一部を読み取れません",
"Something went wrong!": "問題が発生しました!",
"Sonnet Model": "Sonnet モデル",
"Sora": "Sora",
"Sort": "並べ替え",
"Sort by ID": "IDでソート",
"Sort Order": "並び順",
"Sort priority": "並び順の優先度",
"Source": "ソース",
"Source diff": "ソース差分",
"Source Endpoint": "ソースエンドポイント",
......@@ -4860,6 +4931,7 @@
"stale": "期限切れ",
"Standard": "標準",
"Standard price": "標準価格",
"Standard protocol interfaces": "標準プロトコルのインターフェース",
"Start": "開始",
"Start ≤ end: within the day; start > end: across midnight": "開始 ≤ 終了は日内範囲、開始 > 終了は日をまたぐ範囲",
"Start a conversation to see messages here": "会話を開始すると、ここにメッセージが表示されます",
......@@ -4920,6 +4992,7 @@
"Structured output": "構造化出力",
"Submit": "送信",
"Submit directly": "直接送信",
"Submit request": "リクエストを送信",
"Submit Result": "結果を送信",
"Submit Time": "送信時刻",
"Submitted": "送信済み",
......@@ -4961,7 +5034,9 @@
"Supported Applications": "サポートされているアプリケーション",
"Supported endpoints": "対応エンドポイント",
"Supported Imagine Models": "対応Imagineモデル",
"Supported interfaces": "対応インターフェース",
"Supported modalities": "サポートされるモダリティ",
"Supported models": "対応モデル",
"Supported operators: eq, ne, gt, gte, lt, lte, in, not_in, contains, not_contains, exists, not_exists. Leave empty to allow all users.": "対応演算子:eq、ne、gt、gte、lt、lte、in、not_in、contains、not_contains、exists、not_exists。すべてのユーザーを許可する場合は空のままにしてください。",
"Supported parameters": "対応パラメータ",
"Supported variables": "サポートされる変数",
......@@ -4994,6 +5069,7 @@
"Sync Upstream Models": "アップストリームモデルを同期",
"Synced upstream models": "上流モデルを同期しました",
"Synchronize models and vendors from an upstream source": "アップストリームソースからモデルとベンダーを同期",
"Synchronous": "同期実行",
"Syncing prices, please wait...": "価格を同期中、しばらくお待ちください...",
"Syncing...": "同期中...",
"System": "システム",
......@@ -5146,6 +5222,7 @@
"The site exchange rate is invalid. Prices are shown in USD.": "サイトの為替レートが無効なため、価格は米ドルで表示されます。",
"The site is not available at the moment.": "現在、このサイトは利用できません。",
"The slug is appended to the URL:": "スラッグがURLに追加されます:",
"The source is unavailable or this browser cannot calculate SHA-256. The gateway checks the published hash during installation.": "ソースを取得できないか、ブラウザが SHA-256 を計算できません。インストール時にゲートウェイが公開ハッシュを確認します。",
"The sync will fetch missing models and vendors from the selected source. Existing records are updated only when you approve conflicts.": "同期により、選択されたソースから不足しているモデルとベンダーが取得されます。既存のレコードは、競合を承認した場合にのみ更新されます。",
"The system always bills in USD. Site currency makes entering and converting prices easier; amounts are converted to USD using the site exchange rate. Switching currencies does not change the actual price. Raw billing expressions always use USD.": "システムの内部計算は常に米ドルです。サイト通貨は価格の入力と換算を簡単にするためのもので、金額はサイトの為替レートで米ドルに換算されます。通貨を切り替えても実際の価格は変わりません。課金式の直接編集では常に米ドルを使用します。",
"The Telegram authorization request is invalid or expired.": "Telegram の認証リクエストが無効か、有効期限が切れています。",
......@@ -5156,6 +5233,7 @@
"The two-factor setup has expired or changed. Start setup again.": "二段階認証の設定が期限切れか変更されています。設定をやり直してください。",
"The unique identifier for this model": "このモデルの一意の識別子",
"The unique name for this vendor": "このベンダーの一意の名前",
"The upstream address this plugin sends requests to. The plugin declares no default, so it must be filled in.": "このプラグインがリクエストを送信する上流アドレスです。既定値が宣言されていないため、入力が必要です。",
"The upstream channel that served the requests": "リクエストを処理した上流チャネル",
"The upstream natively supports all three protocols; every selected route is forwarded without conversion.": "上流が3つのプロトコルをネイティブ対応し、選択したルートを変換せず転送します。",
"The upstream response is valid JSON, but it does not match the OpenAI credit_summary format. The channel balance was not updated.": "上流レスポンスは有効な JSON ですが、OpenAI credit_summary 形式ではありません。チャネル残高は更新されていません。",
......@@ -5188,6 +5266,8 @@
"This action will permanently remove 2FA protection from your account.": "この操作により、アカウントから2FA保護が完全に削除されます。",
"This announcement will be removed from the list.": "このお知らせはリストから削除されます。",
"This API shortcut will be removed from the list.": "この API ショートカットはリストから削除されます。",
"This base URL points at a private or local network host. Make sure it is an upstream you control.": "この Base URL はプライベートまたはローカルネットワークのホストを指しています。自身が管理する上流であることを確認してください。",
"This base URL uses plain HTTP, so the channel key is sent unencrypted.": "この Base URL は平文の HTTP を使用しているため、チャネルキーが暗号化されずに送信されます。",
"This callback URL updates from the slug field and is the value to register with your provider.": "このコールバック URL は slug フィールドに合わせて更新されます。プロバイダーに登録する値です。",
"This channel has no configured models.": "このチャンネルには構成されたモデルがありません。",
"This channel is not an Ollama channel.": "このチャネルはOllamaチャネルではありません。",
......@@ -5223,6 +5303,7 @@
"This plan does not allow balance redemption": "このプランでは残高での交換は許可されていません",
"This plugin has no factory fallback. Deleting or disabling it makes this platform unavailable.": "このプラグインには組み込みのフォールバックがありません。削除または無効化するとプラットフォームが利用できなくなります。",
"This plugin path does not resolve within the source repository.": "このプラグインのパスはソースリポジトリ内を指していません。",
"This preview reads static plugin declarations. The gateway validates the plugin during installation.": "このプレビューはプラグインの静的な宣言を読み取ります。インストール時にゲートウェイが検証します。",
"This project must be used in compliance with the": "このプロジェクトは、以下を遵守して使用する必要があります",
"This removes {{count}} failed models from this channel. This action cannot be undone.": "この操作はこのチャンネルから失敗した {{count}} 個のモデルを削除します。元に戻せません。",
"This route discovers upstream OpenAI models and cannot be split or matched by client model rules.": "このルートはアップストリームの OpenAI モデルを検出するためのもので、分割やクライアントモデルルールによる照合はできません。",
......@@ -5495,6 +5576,7 @@
"Unit price (local currency / USD)": "単価 (現地通貨 / USD)",
"Unit price (USD)": "単価 (USD)",
"Unit price must be greater than 0": "単価は 0 より大きい必要があります",
"Unit price: {{field}}": "{{field}}の単価",
"Units per USD": "USDあたりのユニット数",
"Unknown": "不明",
"Unknown device": "不明なデバイス",
......@@ -5579,6 +5661,7 @@
"Uploading...": "アップロード中...",
"Upscale": "アップスケール",
"Upstream": "アップストリーム",
"Upstream authentication": "上流サービスの認証",
"Upstream did not return reset credit details.": "上流からリセット回数の詳細が返されませんでした。",
"Upstream JSON response": "上流 JSON レスポンス",
"Upstream Model Detection Settings": "アップストリームモデル検出設定",
......@@ -5621,6 +5704,7 @@
"URL to your logo image (optional)": "ロゴ画像のURL (オプション)",
"US dollar (USD)": "米ドル(USD)",
"Usage": "使用量",
"Usage · {{price}}": "使用量 · {{price}}",
"Usage at a glance": "使用状況の概要",
"Usage guide": "使用ガイド",
"Usage logs": "使用ログ",
......@@ -5643,6 +5727,7 @@
"Use authenticator code": "認証コードを使用",
"Use backup code": "バックアップコードを使用",
"Use Bearer for all protocols": "すべてのプロトコルで Bearer を使用",
"Use default": "既定値を使用",
"Use disk cache when request body exceeds this size": "リクエストボディがこのサイズを超えた場合にディスクキャッシュを使用",
"Use exact client model names, separated by commas. Prefixes and wildcards are not supported.": "クライアントの正確なモデル名をカンマ区切りで入力します。プレフィックスやワイルドカードは使えません。",
"Use exact model names such as gpt-4o, or regex rules prefixed with re: such as re:^gemini-.": "gpt-4o のような完全一致のモデル名、または re:^gemini- のように re: で始まる正規表現ルールを使えます。",
......@@ -5674,6 +5759,7 @@
"Used to authenticate with io.net deployment API": "io.net デプロイ API の認証に使用します",
"Used to authenticate with the worker. Leave blank to keep the existing secret.": "ワーカーの認証に使用されます。既存のシークレットを保持するには、空欄のままにしてください。",
"Used to decide the payment flow. Built-in keys include stripe for Stripe and waffo_pancake for Waffo Pancake; other values are sent to Epay as the type parameter.": "クリック後に使用する決済フローを決定します。組み込みキーは Stripe 用の stripe、Waffo Pancake 用の waffo_pancake です。それ以外の値は Epay の type パラメーターとして送信されます。",
"Used when a Task Plugin channel has no API address configured.": "タスクプラグインのチャネルに API アドレスが未設定の場合に使われます。",
"Used:": "使用済み:",
"User": "ユーザー",
"User {{id}}": "ユーザー {{id}}",
......@@ -5783,6 +5869,7 @@
"Verifying credentials and pulling stores from your Pancake account...": "認証情報を検証し、Pancake アカウントからストアを取得しています...",
"Verifying your {{provider}} account": "{{provider}}アカウントを確認しています",
"Version": "バージョン",
"Version differences": "バージョンの差分",
"Version history": "バージョン履歴",
"Version Overrides": "バージョンオーバーライド",
"Versions": "バージョン",
......
......@@ -75,6 +75,7 @@
"{{currency}} price per 1M tokens.": "Цена в {{currency}} за 1 млн токенов.",
"{{field}} updated to {{value}}": "{{field}} обновлено на {{value}}",
"{{field}} updated to {{value}} for tag: {{tag}}": "{{field}} обновлено на {{value}} для тега: {{tag}}",
"{{key}} · from {{source}}": "{{key}} · источник: {{source}}",
"{{key}} · version {{version}} · from {{source}}": "{{key}} · версия {{version}} · из {{source}}",
"{{method}} {{route}}": "{{method}} {{route}}",
"{{modality}} not supported": "{{modality}} не поддерживается",
......@@ -141,6 +142,7 @@
"80,443,8080": "80,443,8080",
"A billing multiplier. Lower ratios mean lower API call costs.": "Множитель тарификации. Чем ниже коэффициент, тем ниже стоимость вызовов API.",
"A focused home for keys, balance, routing, and service health.": "Единый экран для ключей, баланса, маршрутов и состояния сервиса.",
"A matching hash confirms the published file, not the safety of its code.": "Совпадение хеша подтверждает соответствие опубликованному файлу, но не безопасность кода.",
"A security operation is already in progress.": "Операция безопасности уже выполняется.",
"A selected model no longer exists. Reload the model list.": "Выбранная модель больше не существует. Обновите список моделей.",
"A vendor with this name already exists.": "Поставщик с таким именем уже существует.",
......@@ -270,13 +272,17 @@
"Add your API keys, set up channels and configure access permissions": "Добавьте ваши API-ключи, настройте каналы и права доступа",
"Added {{count}} model(s)": "Добавлено {{count}} моделей",
"Added {{count}} models from \"{{name}}\"": "Добавлено {{count}} моделей из «{{name}}»",
"Added once per request. Set to 0 for usage-only billing.": "Добавляется один раз за запрос. Укажите 0 для оплаты только за использование.",
"Added successfully": "Успешно добавлено",
"Added to the usage cost. Set to 0 for no additional charge.": "Сумма сверх стоимости использования. Укажите 0, если доплата не нужна.",
"Additional charge": "Доплата",
"Additional Conditions": "Дополнительные условия",
"Additional information": "Дополнительная информация",
"Additional Information": "Дополнительная информация",
"Additional Limit": "Доп. лимит",
"Additional Limits": "Дополнительные лимиты",
"Additional metered capability": "Дополнительная зарезервированная ёмкость (metered)",
"Additional request domains": "Дополнительные домены",
"Additional verification required": "Требуется дополнительная проверка",
"Adjust filters, then search to refresh the logs.": "Настройте фильтры, затем выполните поиск, чтобы обновить журналы.",
"Adjust Quota": "Изменить квоту",
......@@ -349,6 +355,7 @@
"All Must Match (AND)": "Все должны совпасть (AND)",
"All nodes": "Все узлы",
"All playground messages saved in this browser will be removed. This cannot be undone.": "Все сообщения Playground, сохраненные в этом браузере, будут удалены. Это действие нельзя отменить.",
"All requests": "Все запросы",
"All requests must include": "Все запросы должны содержать",
"All results": "Все результаты",
"All routes": "Все маршруты",
......@@ -366,6 +373,7 @@
"Allow accountFilter parameter": "Разрешить параметр accountFilter",
"Allow balance redemption": "Разрешить оплату балансом",
"Allow Claude beta query passthrough": "Разрешить проброс бета-запросов Claude",
"Allow clients to query configured prices via `/api/ratio`.": "Разрешить клиентам запрашивать настроенные цены через `/api/ratio`.",
"Allow clients to query configured ratios via `/api/ratio`.": "Разрешить клиентам запрашивать настроенные соотношения через `/api/ratio`.",
"Allow HTTP image requests": "Разрешить HTTP-запросы изображений",
"Allow include usage obfuscation passthrough": "Разрешить проброс обфускации использования",
......@@ -490,6 +498,8 @@
"Append to existing keys": "Добавить к существующим ключам",
"Append value to array / string / object end": "Добавить значение в конец массива / строки / объекта",
"appended": "добавлено",
"Applicable channels": "Совместимые каналы",
"Applicable conditions": "Условия применения",
"Application": "Приложение",
"Applied {{name}} pricing to {{count}} models": "Тариф {{name}} применён к {{count}} моделям",
"Applied changes": "Применённые изменения",
......@@ -526,6 +536,7 @@
"Are you sure you want to delete this key? This action cannot be undone.": "Вы уверены, что хотите удалить этот ключ? Это действие нельзя отменить.",
"Are you sure you want to disable all enabled keys?": "Вы уверены, что хотите отключить все включённые ключи?",
"Are you sure you want to enable all keys?": "Вы уверены, что хотите включить все ключи?",
"Are you sure you want to enable plugin {{name}} ({{key}})?": "Вы уверены, что хотите включить плагин {{name}} ({{key}})?",
"Are you sure you want to manually complete this order? The user will be credited with the corresponding quota.": "Вы уверены, что хотите вручную завершить этот заказ? Пользователю будет начислена соответствующая квота.",
"Are you sure you want to sign out? You will need to sign in again to access your account.": "Вы уверены, что хотите выйти? Вам нужно будет войти снова, чтобы получить доступ к аккаунту.",
"Are you sure you want to unbind {{provider}} for this user? The user will no longer be able to log in via this method.": "Вы уверены, что хотите отвязать {{provider}} для этого пользователя? Пользователь больше не сможет входить через этот метод.",
......@@ -584,6 +595,7 @@
"auth.resetPasswordConfirm.retry": "Повторить ({{seconds}}с)",
"auth.resetPasswordConfirm.success": "Ваш пароль успешно сброшен",
"Authentication": "Аутентификация",
"Authentication for upstream requests; channel credentials may still be used.": "Способ аутентификации запросов к провайдеру; учётные данные канала всё ещё могут использоваться.",
"Authentication Method": "Метод аутентификации",
"Authenticator code": "Код аутентификатора",
"Authenticator code or backup code": "Код аутентификатора или резервный код",
......@@ -648,6 +660,7 @@
"Back to login": "Вернуться к входу",
"Back to Models": "Вернуться к моделям",
"Backed up": "Резервная копия создана",
"Background": "В фоновом режиме",
"Background job tracker for queued work.": "Отслеживатель фоновых заданий для задач в очереди.",
"Backup Code": "Резервный код",
"Backup code must be in format XXXX-XXXX": "Резервный код должен быть в формате XXXX-XXXX",
......@@ -891,6 +904,7 @@
"Channel type": "Тип канала",
"Channel type is required": "Тип канала обязателен",
"Channel types": "Типы каналов",
"Channel types you can use when binding this plugin.": "Типы каналов, к которым можно привязать этот плагин.",
"Channel updated successfully": "Канал успешно обновлён",
"Channel-specific settings (JSON format)": "Настройки, специфичные для канала (формат JSON)",
"Channel:": "Канал:",
......@@ -927,6 +941,7 @@
"Check-in successful! Received": "Прибытие прошло успешно! Получено",
"Checked in": "Зарегистрирован",
"Checking connection": "Проверка подключения",
"Checking file integrity...": "Проверка целостности файла…",
"Checking name...": "Проверяю имя...",
"Checking updates...": "Проверка обновлений...",
"checkout.session.completed": "checkout.session.completed",
......@@ -1178,6 +1193,7 @@
"Connection failed": "Не удалось подключиться",
"Connection info detected in clipboard": "В буфере обмена найдены данные подключения",
"Connection info filled in": "Данные подключения заполнены",
"Connection settings": "Настройки подключения",
"Connection successful": "Подключение успешно",
"Console": "Консоль",
"Console area": "Область консоли",
......@@ -1234,12 +1250,15 @@
"Copy All": "Скопировать все",
"Copy all backup codes": "Скопировать все резервные коды",
"Copy All Codes": "Скопировать все коды",
"Copy all models": "Копировать все модели",
"Copy API key": "Скопировать ключ API",
"Copy base URL": "Копировать базовый URL",
"Copy billing expression": "Копировать выражение тарификации",
"Copy callback URL": "Скопировать URL обратного вызова",
"Copy Channel": "Скопировать канал",
"Copy code": "Копировать код",
"Copy Connection Info": "Копировать данные подключения",
"Copy endpoint path": "Копировать путь эндпоинта",
"Copy failed": "Не удалось скопировать",
"Copy Field": "Копировать поле",
"Copy Header": "Копировать заголовок",
......@@ -1248,6 +1267,7 @@
"Copy Link": "Копировать ссылку",
"Copy model name": "Скопировать имя модели",
"Copy model names": "Скопировать имена моделей",
"Copy plugin key": "Копировать идентификатор плагина",
"Copy prompt": "Копировать промпт",
"Copy ready-to-run curl": "Скопировать готовый curl",
"Copy redemption code": "Скопировать код активации",
......@@ -1276,6 +1296,7 @@
"Cost = 10 × 0.8 = 8": "Стоимость = 10 × 0,8 = 8",
"Cost = 10 × 1.0 = 10": "Стоимость = 10 × 1,0 = 10",
"Cost = model price × that one ratio. Nothing else from the group settings enters the formula.": "Стоимость = цена модели × этот единственный коэффициент. Другие настройки групп в формуле не участвуют.",
"Cost calculator": "Расчёт стоимости",
"Cost in {{currency}} per request, regardless of tokens used.": "Стоимость запроса в {{currency}}, независимо от числа токенов.",
"Cost in USD per request, regardless of tokens used.": "Стоимость в долларах США за запрос, независимо от использованных токенов.",
"Cost Tracking": "Отслеживание затрат",
......@@ -1368,8 +1389,10 @@
"Current Password": "Текущий пароль",
"Current password is incorrect.": "Текущий пароль неверен.",
"Current Price": "Текущая цена",
"Current pricing conditions": "Текущие условия тарификации",
"Current quota": "Текущая квота",
"Current token": "Текущий токен",
"Current v{{from}} → install v{{to}}": "Текущая v{{from}} → установка v{{to}}",
"Current value": "Текущее значение",
"Current Value": "Текущее значение",
"Current vendor": "Текущий поставщик",
......@@ -1438,8 +1461,10 @@
"Default": "По умолчанию",
"Default / range": "По умолчанию / диапазон",
"Default administrator permissions can be overridden for this user.": "Для этого пользователя можно переопределить стандартные права администратора.",
"Default API address": "Адрес API по умолчанию",
"Default API Version *": "Версия API по умолчанию *",
"Default API version for this channel": "Версия API по умолчанию для этого канала",
"Default base URL": "Базовый URL по умолчанию",
"Default Bearer": "Bearer по умолчанию",
"Default Collapse Sidebar": "Сворачивать боковую панель по умолчанию",
"Default consumption chart": "График потребления по умолчанию",
......@@ -1578,6 +1603,8 @@
"Disable All": "Отключить все",
"Disable custom task plugins?": "Отключить пользовательские плагины задач?",
"Disable on failure": "Отключить при сбое",
"Disable plugin {{name}} ({{key}})? Requests using this plugin may be affected.": "Отключить плагин {{name}} ({{key}})? Это может повлиять на запросы, использующие этот плагин.",
"Disable plugin?": "Отключить плагин?",
"Disable selected channels": "Отключить выбранные каналы",
"Disable selected models": "Отключить выбранные модели",
"Disable store passthrough": "Отключить сквозной переход магазина",
......@@ -1674,6 +1701,8 @@
"Duration Settings": "Настройки срока действия",
"Duration Unit": "Единица срока",
"Duration Value": "Значение срока",
"Dynamic declarations cannot be previewed. Retry or review the source below.": "Динамические объявления нельзя просмотреть заранее. Повторите попытку или изучите исходный код ниже.",
"Dynamic operation": "Динамическая операция",
"Dynamic Pricing": "Динамическое ценообразование",
"e.g. ¥ or HK$": "напр. ¥ или HK$",
"e.g. 401, 403, 429, 500-599": "напр. 401, 403, 429, 500-599",
......@@ -1809,6 +1838,7 @@
"Enable Passkey": "Включить Passkey",
"Enable Performance Monitoring": "Включить мониторинг производительности",
"Enable plugin {{key}}": "Включить плагин {{key}}",
"Enable plugin?": "Включить плагин?",
"Enable rate limiting": "Включить ограничение скорости",
"Enable Request Passthrough": "Включить сквозную передачу запросов",
"Enable selected channels": "Включить выбранные каналы",
......@@ -1906,6 +1936,7 @@
"Enter password (8–128 characters)": "Введите пароль (8–128 символов)",
"Enter quota in {{currency}}": "Введите квоту в {{currency}}",
"Enter quota in tokens": "Введите квоту в токенах",
"Enter sample usage to estimate the cost. Group and request multipliers are not included.": "Введите объём использования для одного запроса. Множители группы и правил запроса не учитываются.",
"Enter secret key": "Введите секретный ключ",
"Enter system prompt (user prompt takes priority)": "Введите системный промпт (пользовательский промпт имеет приоритет)",
"Enter tag name (optional)": "Введите имя тега (необязательно)",
......@@ -2017,6 +2048,7 @@
"External operations mode": "Режим внешних операций",
"External Speed Test": "Внешний тест скорости",
"Extra": "Дополнительно",
"Extra destinations beyond the channel API address. The channel address remains accessible.": "Дополнительные адреса помимо API канала. Сам адрес канала остаётся доступным.",
"Extra Notes (Optional)": "Дополнительные примечания (необязательно)",
"Extra visible": "Дополнительно видимая",
"Extra visible to {{group}}": "Дополнительно видима для {{group}}",
......@@ -2220,7 +2252,10 @@
"Field Path": "Путь к полю",
"Fields": "Поля",
"File": "Файл",
"File could not be verified": "Файл не проверен",
"File integrity verified": "Целостность файла подтверждена",
"File Search": "Поиск файлов",
"File verification": "Проверка файла",
"Files to Retain": "Файлов для хранения",
"Fill All Models": "Заполнить все модели",
"Fill Codex CLI / Claude CLI Templates": "Заполнить шаблоны Codex CLI / Claude CLI",
......@@ -2283,6 +2318,7 @@
"Fix Abilities": "Восстановить согласованность каналов",
"Fix order": "Исправить порядок",
"Fixed abilities: {{success}} succeeded, {{fails}} failed": "Согласованность каналов восстановлена: успешно {{success}}, ошибок {{fails}}",
"Fixed fee per request": "Фиксированная плата за запрос",
"Fixed price": "Фиксированная цена",
"Fixed price (USD)": "Фиксированная цена (USD)",
"Fixed request price": "Фиксированная цена запроса",
......@@ -2344,6 +2380,7 @@
"Friendly name to identify this channel": "Дружественное имя для идентификации этого канала",
"From Address": "Отправитель",
"From IO.NET deployment": "Из развертывания IO.NET",
"From marketplace index": "Из индекса каталога",
"From model redirect, not yet added to models list": "Из перенаправления модели, еще не добавлено в список моделей",
"Full API Key": "Полный ключ API",
"Full Base URL (supports": "Полный базовый URL (поддерживает",
......@@ -2351,6 +2388,7 @@
"Full input length": "Полная длина входа",
"Full JSON": "Полный JSON",
"Full layout": "Полная разметка",
"Full source": "Полный исходный код",
"Full upstream catalog": "Полный каталог источника",
"Full width": "Полная ширина",
"Function calling": "Вызов функций",
......@@ -2612,6 +2650,7 @@
"Index": "Индекс",
"Index request failed with HTTP {{status}}": "Запрос индекса завершился ошибкой HTTP {{status}}",
"Index URL": "URL индекса",
"Information unavailable": "Информация недоступна",
"Inherit global Auto order": "Наследовать глобальный порядок Auto",
"Inherit vendor icon": "Использовать иконку поставщика",
"Inherited from {{vendor}}": "От поставщика {{vendor}}",
......@@ -2647,6 +2686,7 @@
"Integrations": "Интеграции",
"Integrity check failed": "Проверка целостности не пройдена",
"Integrity hash": "Хеш целостности",
"Integrity verification unavailable in this environment": "Проверка недоступна в этой среде",
"Inter-group overrides": "Переопределения между группами",
"Inter-group ratio overrides": "Переопределения соотношений между группами",
"Interface Language": "Язык интерфейса",
......@@ -3126,6 +3166,7 @@
"More": "Ещё",
"More Apps": "Еще",
"more mapping": "больше сопоставлений",
"More models ({{count}})": "Другие модели ({{count}})",
"More templates...": "Другие шаблоны…",
"More than 999 days left": "Более 999 дней",
"More...": "Подробнее...",
......@@ -3286,6 +3327,7 @@
"No encryption": "Без шифрования",
"No endpoints configured. Switch to JSON mode or add rows to define endpoints.": "Конечные точки не настроены. Переключитесь в режим JSON или добавьте строки для определения конечных точек.",
"No endpoints inferred from channels": "Конечные точки не определены по каналам",
"No extra domains declared": "Дополнительные домены не объявлены",
"No FAQ entries available": "Нет доступных записей FAQ",
"No FAQ entries yet. Click \"Add FAQ\" to create one.": "Пока нет записей FAQ. Нажмите \"Добавить FAQ\", чтобы создать одну.",
"No files match the accepted types.": "Нет файлов, соответствующих допустимым типам.",
......@@ -3387,6 +3429,8 @@
"No rules yet": "Правила отсутствуют",
"No rules yet. Add a group below to get started.": "Правил пока нет. Добавьте группу ниже, чтобы начать.",
"No separate media pricing configured.": "Отдельные цены для медиа не настроены.",
"No source available": "Исходный код недоступен",
"No source changes": "Исходный код не изменён",
"No status code mappings configured.": "Сопоставления кодов состояния не настроены.",
"No stores on this merchant yet. Set a return URL and click Create to mint your first pair.": "У этого продавца пока нет магазинов. Укажите URL возврата и нажмите Создать, чтобы создать первую пару.",
"No subscription plans yet": "Планов подписки пока нет",
......@@ -3415,6 +3459,7 @@
"No vendor data available": "Данных по поставщикам нет",
"No vendors found": "Поставщики не найдены",
"No verification method is available for this action.": "Для этой операции нет доступного способа подтверждения.",
"No version history": "История версий отсутствует",
"No X Found": "X не найдено",
"Node": "Узел",
"Node filters": "Фильтры узлов",
......@@ -3424,6 +3469,7 @@
"Non-stream": "Не потоковый",
"Non-zero invitation rewards require compliance confirmation in Payment Gateway settings.": "Ненулевые награды за приглашения требуют подтверждения соответствия в настройках платежного шлюза.",
"None": "Нет",
"None (plugin declaration)": "Нет (объявлено плагином)",
"noreply@example.com": "noreply@example.com",
"Normalized:": "Нормализовано:",
"Not available": "Недоступно",
......@@ -3431,6 +3477,8 @@
"Not bound": "Не привязан",
"Not configured": "Не настроено",
"Not declared": "Не заявлено",
"Not declared by this plugin": "Не объявлено плагином",
"Not declared; an API key may still be required.": "Способ не объявлен; ключ API всё ещё может требоваться.",
"Not Equals": "Не равно",
"Not found upstream": "Не найдено в источнике",
"Not generated": "Не создан",
......@@ -3466,6 +3514,7 @@
"Number of top log probabilities returned per token": "Количество top-вероятностей на токен",
"Number of users invited": "Количество приглашенных пользователей",
"OAuth": "OAuth",
"OAuth 2.0 service account": "Сервисный аккаунт OAuth 2.0",
"OAuth authorization timed out. Please try again.": "Время авторизации OAuth истекло. Повторите попытку.",
"OAuth authorization was cancelled.": "Авторизация OAuth отменена.",
"OAuth binding timed out. Please try again.": "Время ожидания привязки OAuth истекло. Повторите попытку.",
......@@ -3595,6 +3644,7 @@
"Optimized network architecture ensures millisecond response times": "Оптимизированная сетевая архитектура обеспечивает время отклика в миллисекунды",
"Optional callback override. Leave blank to use server address": "Необязательное переопределение обратного вызова. Оставьте пустым, чтобы использовать адрес сервера",
"Optional icon identifier for the login button": "Необязательный идентификатор иконки для кнопки входа",
"Optional icon.svg or icon.png shipped next to plugin.js, up to 512 KiB. Stored separately from the source.": "Необязательно: icon.svg или icon.png рядом с plugin.js, до 512 КиБ. Хранится отдельно от исходного кода.",
"Optional JSON policy to restrict access based on user info fields": "Необязательная политика JSON для ограничения доступа на основе полей информации о пользователе",
"Optional minimum recharge amount for this method.": "Необязательная минимальная сумма пополнения для этого метода.",
"Optional multiplier per user group used when calculating recharge pricing. Provide a JSON object such as": "Необязательный множитель для группы пользователей, используемый при расчете цен на пополнение. Предоставьте JSON-объект, например",
......@@ -3618,6 +3668,7 @@
"Original Model": "Оригинальная модель",
"Original value": "Исходное значение",
"Other": "Другое",
"Other cases": "Остальные случаи",
"Other channels": "Другие каналы",
"Other groups": "Другие группы",
"Other models": "Другие модели",
......@@ -3884,16 +3935,26 @@
"Please wait for the current generation to complete": "Дождитесь завершения текущей генерации",
"Plugin": "Плагин",
"Plugin author": "Автор плагина",
"Plugin default": "Значение плагина по умолчанию",
"Plugin details": "Сведения о плагине",
"Plugin Generation": "Поколение плагина",
"Plugin icon": "Иконка плагина",
"Plugin icon exceeds the 512 KiB limit.": "Иконка плагина превышает лимит 512 КиБ.",
"Plugin icon must be an .svg or .png file.": "Иконка плагина должна быть файлом .svg или .png.",
"Plugin indexes are fetched by your browser. Installing runs the same review and admission pipeline as a manual upload.": "Индексы плагинов загружает ваш браузер. Установка проходит тот же путь проверки и допуска, что и загрузка вручную.",
"Plugin installation failed": "Не удалось установить плагин",
"Plugin is still in use": "Плагин всё ещё используется",
"Plugin key": "Ключ плагина",
"Plugin metadata": "Метаданные плагина",
"Plugin sandbox": "Песочница плагина",
"Plugin source": "Исходный код плагина",
"Plugin source exceeds the 1 MiB limit.": "Код плагина превышает лимит 1 МиБ.",
"Plugin uploaded successfully": "Плагин успешно загружен",
"Plugin version activated": "Версия плагина активирована",
"Plugin version deleted": "Версия плагина удалена",
"Plugin website": "Сайт плагина",
"Plugin-defined interfaces": "Собственные интерфейсы плагина",
"Plugins can access channel credentials. Review the source and differences before installing.": "Плагины могут получать доступ к учётным данным каналов. Перед установкой проверьте исходный код и различия.",
"Policy JSON": "JSON политики",
"Polling": "Опрос",
"Polling mode requires Redis and memory cache, otherwise performance will be significantly degraded": "Режим опроса требует Redis и кэш памяти, в противном случае производительность будет значительно снижена",
......@@ -3978,13 +4039,17 @@
"Price:": "Цена:",
"Price: High to Low": "Цена: от высокой к низкой",
"Price: Low to High": "Цена: от низкой к высокой",
"Prices are in {{currency}}, with units shown below. Use USD when editing expressions directly.": "Цены указаны в {{currency}}, единицы — ниже. При ручном редактировании выражений используйте USD.",
"Prices for each set of conditions": "Цены для каждого набора условий",
"Prices shown per": "Цены указаны за",
"Prices shown per usage unit": "Цены указаны за единицу использования",
"Prices synced successfully": "Цены успешно синхронизированы",
"Prices vary by usage tier and request conditions": "Цена зависит от уровня использования и условий запроса",
"Pricing": "Ценообразование",
"Pricing & Display": "Цены и отображение",
"Pricing by condition": "Тарификация по условиям",
"Pricing by Group": "Ценообразование по группам",
"Pricing conditions": "Условия тарификации",
"Pricing Configuration": "Конфигурация ценообразования",
"Pricing currency": "Валюта цен",
"Pricing group example": "Пример группы тарификации",
......@@ -4391,6 +4456,7 @@
"Retain last N days": "Хранить последние N дней",
"Retain last N files": "Хранить последние N файлов",
"Retention days": "Дней хранения",
"Retrieve result": "Получить результат",
"Retry": "Повторить попытку",
"Retry Chain": "Цепочка повторов",
"Retry Settings": "Настройки повторов",
......@@ -4681,6 +4747,7 @@
"Select theme preset": "Выберите пресет темы",
"Select time granularity": "Выбрать детализацию времени",
"Select vendor": "Выбрать поставщика",
"Select version": "Выбрать версию",
"Selectable groups": "Выбираемые группы",
"selected": "выбрано",
"Selected {{count}}": "Выбрано: {{count}}",
......@@ -4688,7 +4755,7 @@
"Selected conflicts were overwritten successfully.": "Выбранные конфликты успешно перезаписаны.",
"Selected nodes": "Выбранные узлы",
"Selected when creating a token and used as the default billing group for API calls.": "Выбирается при создании токена и используется как группа тарификации по умолчанию для вызовов API.",
"Selecting a plugin fills its declared models.": "Выбор плагина заполняет заявленные модели.",
"Selecting a plugin fills its declared models and default base URL.": "Выбор плагина заполняет заявленные модели и базовый URL по умолчанию.",
"Self-Use Mode": "Режим самоиспользования",
"Send": "Отправить",
"Send a request": "Отправить запрос",
......@@ -4725,6 +4792,8 @@
"Set filters to narrow down your log search results.": "Установите фильтры, чтобы сузить результаты поиска по журналам.",
"Set Header": "Установить заголовок",
"Set Password": "Установить пароль",
"Set prices for each set of conditions below. Cost = usage × unit price + additional charge. Token prices are per million tokens.": "Задайте цены для условий ниже. Стоимость = объём × цена за единицу + доплата. Цены токенов указываются за миллион.",
"Set prices for each set of conditions below. Cost = usage × unit price + fixed fee. Token prices are per million tokens.": "Задайте цены для условий ниже. Стоимость = объём × цена за единицу + фиксированная плата. Цены токенов указываются за миллион.",
"Set Project to io.cloud when creating/selecting key": "Установите Проект в io.cloud при создании/выборе ключа",
"Set quota amount and limits": "Настройте квоту и лимиты",
"Set Request Header": "Установить заголовок запроса",
......@@ -4825,12 +4894,14 @@
"socks5://user:pass@host:port": "socks5://user:pass@host:port",
"Soft Errors": "Мягкие ошибки",
"Some channels failed: {{errorMsg}}": "Некоторые каналы не удались: {{errorMsg}}",
"Some plugin information could not be read": "Не удалось прочитать часть данных плагина",
"Something went wrong!": "Что-то пошло не так!",
"Sonnet Model": "Модель Sonnet",
"Sora": "Sora",
"Sort": "Сортировать",
"Sort by ID": "Сортировать по ID",
"Sort Order": "Порядок сортировки",
"Sort priority": "Приоритет сортировки",
"Source": "Источник",
"Source diff": "Различия исходного кода",
"Source Endpoint": "Исходная точка",
......@@ -4860,6 +4931,7 @@
"stale": "устарел",
"Standard": "Стандартный",
"Standard price": "Стандартная цена",
"Standard protocol interfaces": "Интерфейсы стандартных протоколов",
"Start": "Начало",
"Start ≤ end: within the day; start > end: across midnight": "Начало ≤ конца — в пределах дня, начало > конца — через полночь",
"Start a conversation to see messages here": "Начните разговор, чтобы увидеть сообщения здесь",
......@@ -4920,6 +4992,7 @@
"Structured output": "Структурированный вывод",
"Submit": "Отправить",
"Submit directly": "Отправить напрямую",
"Submit request": "Отправить запрос",
"Submit Result": "Отправить результат",
"Submit Time": "Время отправки",
"Submitted": "Отправлено",
......@@ -4961,7 +5034,9 @@
"Supported Applications": "Поддерживаемые приложения",
"Supported endpoints": "Поддерживаемые конечные точки",
"Supported Imagine Models": "Поддерживаемые модели Imagine",
"Supported interfaces": "Поддерживаемые интерфейсы",
"Supported modalities": "Поддерживаемые модальности",
"Supported models": "Поддерживаемые модели",
"Supported operators: eq, ne, gt, gte, lt, lte, in, not_in, contains, not_contains, exists, not_exists. Leave empty to allow all users.": "Поддерживаемые операторы: eq, ne, gt, gte, lt, lte, in, not_in, contains, not_contains, exists, not_exists. Оставьте поле пустым, чтобы разрешить доступ всем пользователям.",
"Supported parameters": "Поддерживаемые параметры",
"Supported variables": "Поддерживаемые переменные",
......@@ -4994,6 +5069,7 @@
"Sync Upstream Models": "Синхронизировать модели Upstream",
"Synced upstream models": "Вышестоящие модели синхронизированы",
"Synchronize models and vendors from an upstream source": "Синхронизировать модели и поставщиков из upstream источника",
"Synchronous": "Синхронно",
"Syncing prices, please wait...": "Синхронизация цен, подождите...",
"Syncing...": "Синхронизация...",
"System": "Система",
......@@ -5146,6 +5222,7 @@
"The site exchange rate is invalid. Prices are shown in USD.": "Курс сайта недействителен. Цены отображаются в USD.",
"The site is not available at the moment.": "Сайт в данный момент недоступен.",
"The slug is appended to the URL:": "Слаг добавляется к URL:",
"The source is unavailable or this browser cannot calculate SHA-256. The gateway checks the published hash during installation.": "Исходный код недоступен или браузер не может вычислить SHA-256. При установке шлюз проверит опубликованный хеш.",
"The sync will fetch missing models and vendors from the selected source. Existing records are updated only when you approve conflicts.": "Синхронизация получит отсутствующие модели и поставщиков из выбранного источника. Существующие записи обновляются только после подтверждения конфликтов.",
"The system always bills in USD. Site currency makes entering and converting prices easier; amounts are converted to USD using the site exchange rate. Switching currencies does not change the actual price. Raw billing expressions always use USD.": "Система всегда рассчитывает стоимость в USD. Валюта сайта упрощает ввод и пересчёт цен; суммы переводятся в USD по курсу сайта. Переключение валюты не меняет фактическую цену. В исходных выражениях тарификации всегда используется USD.",
"The Telegram authorization request is invalid or expired.": "Запрос авторизации Telegram недействителен или истёк.",
......@@ -5156,6 +5233,7 @@
"The two-factor setup has expired or changed. Start setup again.": "Настройка двухфакторной аутентификации истекла или изменилась. Начните заново.",
"The unique identifier for this model": "Уникальный идентификатор для этой модели",
"The unique name for this vendor": "Уникальное имя для этого поставщика",
"The upstream address this plugin sends requests to. The plugin declares no default, so it must be filled in.": "Адрес вышестоящего сервиса, на который плагин отправляет запросы. Плагин не объявляет значение по умолчанию, поэтому поле обязательно.",
"The upstream channel that served the requests": "Вышестоящий канал, обслуживший запросы",
"The upstream natively supports all three protocols; every selected route is forwarded without conversion.": "Поставщик нативно поддерживает все три протокола; выбранные маршруты пересылаются без преобразования.",
"The upstream response is valid JSON, but it does not match the OpenAI credit_summary format. The channel balance was not updated.": "Ответ поставщика содержит допустимый JSON, но не соответствует формату OpenAI credit_summary. Баланс канала не обновлён.",
......@@ -5188,6 +5266,8 @@
"This action will permanently remove 2FA protection from your account.": "Это действие безвозвратно удалит защиту 2FA из вашей учетной записи.",
"This announcement will be removed from the list.": "Это объявление будет удалено из списка.",
"This API shortcut will be removed from the list.": "Этот ярлык API будет удален из списка.",
"This base URL points at a private or local network host. Make sure it is an upstream you control.": "Этот базовый URL указывает на частный или локальный хост. Убедитесь, что это подконтрольный вам вышестоящий сервис.",
"This base URL uses plain HTTP, so the channel key is sent unencrypted.": "Этот базовый URL использует незашифрованный HTTP, поэтому ключ канала передаётся в открытом виде.",
"This callback URL updates from the slug field and is the value to register with your provider.": "Этот URL обратного вызова обновляется на основе поля slug; зарегистрируйте его у провайдера.",
"This channel has no configured models.": "У этого канала нет настроенных моделей.",
"This channel is not an Ollama channel.": "Этот канал не является каналом Ollama.",
......@@ -5223,6 +5303,7 @@
"This plan does not allow balance redemption": "Этот план не разрешает оплату балансом",
"This plugin has no factory fallback. Deleting or disabling it makes this platform unavailable.": "У этого плагина нет встроенной резервной версии. Его удаление или отключение сделает платформу недоступной.",
"This plugin path does not resolve within the source repository.": "Этот путь плагина не ведёт внутрь репозитория источника.",
"This preview reads static plugin declarations. The gateway validates the plugin during installation.": "Предпросмотр показывает статические объявления плагина. Шлюз проверит плагин при установке.",
"This project must be used in compliance with the": "Этот проект должен использоваться в соответствии с",
"This removes {{count}} failed models from this channel. This action cannot be undone.": "Это удалит {{count}} неуспешных моделей из этого канала. Действие необратимо.",
"This route discovers upstream OpenAI models and cannot be split or matched by client model rules.": "Этот маршрут обнаруживает модели OpenAI вышестоящего сервиса; его нельзя разделять или сопоставлять по правилам клиентских моделей.",
......@@ -5495,6 +5576,7 @@
"Unit price (local currency / USD)": "Цена за единицу (местная валюта / USD)",
"Unit price (USD)": "Цена за единицу (USD)",
"Unit price must be greater than 0": "Цена за единицу должна быть больше 0",
"Unit price: {{field}}": "Цена за единицу: {{field}}",
"Units per USD": "Единиц за USD",
"Unknown": "Неизвестно",
"Unknown device": "Неизвестное устройство",
......@@ -5579,6 +5661,7 @@
"Uploading...": "Загрузка...",
"Upscale": "Увеличение",
"Upstream": "Источник",
"Upstream authentication": "Аутентификация у провайдера",
"Upstream did not return reset credit details.": "Вышестоящий сервис не вернул сведения о сбросах лимита.",
"Upstream JSON response": "JSON-ответ поставщика",
"Upstream Model Detection Settings": "Настройки обнаружения моделей провайдера",
......@@ -5621,6 +5704,7 @@
"URL to your logo image (optional)": "URL изображения вашего логотипа (необязательно)",
"US dollar (USD)": "Доллар США (USD)",
"Usage": "Использование",
"Usage · {{price}}": "Объём · {{price}}",
"Usage at a glance": "Краткий обзор использования",
"Usage guide": "Руководство",
"Usage logs": "Журналы использования",
......@@ -5643,6 +5727,7 @@
"Use authenticator code": "Использовать код аутентификатора",
"Use backup code": "Использовать резервный код",
"Use Bearer for all protocols": "Использовать Bearer для всех протоколов",
"Use default": "Использовать значение по умолчанию",
"Use disk cache when request body exceeds this size": "Использовать дисковый кэш, когда тело запроса превышает этот размер",
"Use exact client model names, separated by commas. Prefixes and wildcards are not supported.": "Укажите точные имена моделей клиента через запятую. Префиксы и подстановочные знаки не поддерживаются.",
"Use exact model names such as gpt-4o, or regex rules prefixed with re: such as re:^gemini-.": "Используйте точные имена моделей, например gpt-4o, или regex-правила с префиксом re:, например re:^gemini-.",
......@@ -5674,6 +5759,7 @@
"Used to authenticate with io.net deployment API": "Используется для аутентификации в API развертывания io.net",
"Used to authenticate with the worker. Leave blank to keep the existing secret.": "Используется для аутентификации с воркером. Оставьте пустым, чтобы сохранить существующий секрет.",
"Used to decide the payment flow. Built-in keys include stripe for Stripe and waffo_pancake for Waffo Pancake; other values are sent to Epay as the type parameter.": "Определяет платежный сценарий после нажатия. Встроенные ключи: stripe для Stripe и waffo_pancake для Waffo Pancake; остальные значения отправляются в Epay как параметр type.",
"Used when a Task Plugin channel has no API address configured.": "Используется, если для канала плагина задач не задан адрес API.",
"Used:": "Использовано:",
"User": "Пользователь",
"User {{id}}": "Пользователь {{id}}",
......@@ -5783,6 +5869,7 @@
"Verifying credentials and pulling stores from your Pancake account...": "Проверяем учетные данные и загружаем магазины из вашего аккаунта Pancake...",
"Verifying your {{provider}} account": "Проверка аккаунта {{provider}}",
"Version": "Версия",
"Version differences": "Различия версий",
"Version history": "История версий",
"Version Overrides": "Переопределения версий",
"Versions": "Версии",
......
......@@ -75,6 +75,7 @@
"{{currency}} price per 1M tokens.": "Giá bằng {{currency}} cho mỗi 1 triệu token.",
"{{field}} updated to {{value}}": "{{field}} đã cập nhật thành {{value}}",
"{{field}} updated to {{value}} for tag: {{tag}}": "{{field}} đã cập nhật thành {{value}} cho nhãn: {{tag}}",
"{{key}} · from {{source}}": "{{key}} · nguồn {{source}}",
"{{key}} · version {{version}} · from {{source}}": "{{key}} · phiên bản {{version}} · từ {{source}}",
"{{method}} {{route}}": "{{method}} {{route}}",
"{{modality}} not supported": "Không hỗ trợ {{modality}}",
......@@ -141,6 +142,7 @@
"80,443,8080": "80,443,8080",
"A billing multiplier. Lower ratios mean lower API call costs.": "Hệ số tính phí. Tỷ lệ càng thấp thì chi phí gọi API càng thấp.",
"A focused home for keys, balance, routing, and service health.": "Trang tổng quan tập trung cho khóa, số dư, định tuyến và trạng thái dịch vụ.",
"A matching hash confirms the published file, not the safety of its code.": "Mã băm khớp chỉ xác nhận tệp đúng với bản phát hành, không đảm bảo mã an toàn.",
"A security operation is already in progress.": "Một thao tác bảo mật đang được thực hiện.",
"A selected model no longer exists. Reload the model list.": "Một mô hình đã chọn không còn tồn tại. Hãy tải lại danh sách.",
"A vendor with this name already exists.": "Nhà cung cấp có tên này đã tồn tại.",
......@@ -270,13 +272,17 @@
"Add your API keys, set up channels and configure access permissions": "Thêm khóa API, thiết lập kênh và cấu hình quyền truy cập",
"Added {{count}} model(s)": "Đã thêm {{count}} mô hình",
"Added {{count}} models from \"{{name}}\"": "Đã thêm {{count}} mô hình từ “{{name}}”",
"Added once per request. Set to 0 for usage-only billing.": "Cộng một lần cho mỗi yêu cầu. Nhập 0 để chỉ tính phí theo mức sử dụng.",
"Added successfully": "Thêm thành công",
"Added to the usage cost. Set to 0 for no additional charge.": "Khoản cộng thêm vào chi phí sử dụng. Nhập 0 nếu không thu thêm.",
"Additional charge": "Phí bổ sung",
"Additional Conditions": "Điều kiện bổ sung",
"Additional information": "Thông tin bổ sung",
"Additional Information": "Thông tin bổ sung",
"Additional Limit": "Hạn mức bổ sung",
"Additional Limits": "Các hạn mức bổ sung",
"Additional metered capability": "Tính năng tính phí theo mức dùng bổ sung",
"Additional request domains": "Miền truy cập bổ sung",
"Additional verification required": "Cần xác minh bổ sung",
"Adjust filters, then search to refresh the logs.": "Điều chỉnh bộ lọc, sau đó tìm kiếm để làm mới nhật ký.",
"Adjust Quota": "Điều chỉnh hạn mức",
......@@ -349,6 +355,7 @@
"All Must Match (AND)": "Tất cả phải khớp (AND)",
"All nodes": "Tất cả nút",
"All playground messages saved in this browser will be removed. This cannot be undone.": "Tất cả tin nhắn Playground đã lưu trong trình duyệt này sẽ bị xóa. Không thể hoàn tác hành động này.",
"All requests": "Tất cả yêu cầu",
"All requests must include": "Mọi yêu cầu phải có header",
"All results": "Tất cả kết quả",
"All routes": "Tất cả tuyến",
......@@ -366,6 +373,7 @@
"Allow accountFilter parameter": "Cho phép tham số accountFilter",
"Allow balance redemption": "Cho phép thanh toán bằng số dư",
"Allow Claude beta query passthrough": "Cho phép chuyển tiếp truy vấn beta Claude",
"Allow clients to query configured prices via `/api/ratio`.": "Cho phép ứng dụng khách truy vấn giá đã cấu hình qua `/api/ratio`.",
"Allow clients to query configured ratios via `/api/ratio`.": "Cho phép khách hàng truy vấn các tỷ lệ đã cấu hình thông qua `/api/ratio`.",
"Allow HTTP image requests": "Cho phép yêu cầu hình ảnh HTTP",
"Allow include usage obfuscation passthrough": "Cho phép chuyển tiếp che giấu sử dụng",
......@@ -490,6 +498,8 @@
"Append to existing keys": "Add to existing keys",
"Append value to array / string / object end": "Thêm giá trị vào cuối mảng / chuỗi / đối tượng",
"appended": "đã thêm vào cuối, được phụ lục",
"Applicable channels": "Kênh tương thích",
"Applicable conditions": "Điều kiện áp dụng",
"Application": "Ứng dụng",
"Applied {{name}} pricing to {{count}} models": "Đã áp dụng giá của {{name}} cho {{count}} mô hình",
"Applied changes": "Thay đổi đã áp dụng",
......@@ -526,6 +536,7 @@
"Are you sure you want to delete this key? This action cannot be undone.": "Bạn có chắc chắn muốn xóa khóa này? Hành động này không thể hoàn tác.",
"Are you sure you want to disable all enabled keys?": "Bạn có chắc chắn muốn vô hiệu hóa tất cả các khóa đang bật không?",
"Are you sure you want to enable all keys?": "Bạn có chắc chắn muốn bật tất cả các khóa không?",
"Are you sure you want to enable plugin {{name}} ({{key}})?": "Bạn có chắc muốn bật plugin {{name}} ({{key}})?",
"Are you sure you want to manually complete this order? The user will be credited with the corresponding quota.": "Bạn có chắc muốn hoàn thành thủ công đơn hàng này không? Người dùng sẽ được cộng hạn mức tương ứng.",
"Are you sure you want to sign out? You will need to sign in again to access your account.": "Bạn có chắc chắn muốn đăng xuất? Bạn sẽ cần đăng nhập lại để truy cập tài khoản của mình.",
"Are you sure you want to unbind {{provider}} for this user? The user will no longer be able to log in via this method.": "Bạn có chắc chắn muốn hủy liên kết {{provider}} cho người dùng này? Người dùng sẽ không thể đăng nhập bằng phương thức này nữa.",
......@@ -584,6 +595,7 @@
"auth.resetPasswordConfirm.retry": "Thử lại ({{seconds}} giây)",
"auth.resetPasswordConfirm.success": "Mật khẩu của bạn đã được đặt lại thành công",
"Authentication": "Xác thực",
"Authentication for upstream requests; channel credentials may still be used.": "Cách xác thực yêu cầu tới nhà cung cấp; plugin vẫn có thể dùng thông tin xác thực của kênh.",
"Authentication Method": "Phương thức xác thực",
"Authenticator code": "Mã xác thực",
"Authenticator code or backup code": "Mã xác thực hoặc mã dự phòng",
......@@ -648,6 +660,7 @@
"Back to login": "Quay lại đăng nhập",
"Back to Models": "Quay lại Mô hình",
"Backed up": "Đã sao lưu",
"Background": "Chạy nền",
"Background job tracker for queued work.": "Theo dõi công việc nền cho công việc chờ xử lý.",
"Backup Code": "Mã dự phòng",
"Backup code must be in format XXXX-XXXX": "Mã dự phòng phải có định dạng XXXX-XXXX",
......@@ -891,6 +904,7 @@
"Channel type": "Loại kênh",
"Channel type is required": "Loại kênh là bắt buộc",
"Channel types": "Loại kênh",
"Channel types you can use when binding this plugin.": "Các loại kênh có thể chọn khi liên kết plugin này.",
"Channel updated successfully": "Kênh đã được cập nhật thành công",
"Channel-specific settings (JSON format)": "Cài đặt dành riêng cho kênh (định dạng JSON)",
"Channel:": "Kênh:",
......@@ -927,6 +941,7 @@
"Check-in successful! Received": "Điểm danh thành công! Đã nhận",
"Checked in": "Đã check-in",
"Checking connection": "Đang kiểm tra kết nối",
"Checking file integrity...": "Đang kiểm tra tính toàn vẹn của tệp…",
"Checking name...": "Đang kiểm tra tên...",
"Checking updates...": "Đang kiểm tra cập nhật...",
"checkout.session.completed": "thanh toán.phiên.hoàn thành",
......@@ -1178,6 +1193,7 @@
"Connection failed": "Kết nối thất bại",
"Connection info detected in clipboard": "Đã phát hiện thông tin kết nối trong bảng tạm",
"Connection info filled in": "Đã điền thông tin kết nối",
"Connection settings": "Cấu hình kết nối",
"Connection successful": "Kết nối thành công",
"Console": "Bảng điều khiển",
"Console area": "Khu vực bảng điều khiển",
......@@ -1234,12 +1250,15 @@
"Copy All": "Sao chép tất cả",
"Copy all backup codes": "Sao chép tất cả mã dự phòng",
"Copy All Codes": "Sao chép Tất cả Mã",
"Copy all models": "Sao chép tất cả mô hình",
"Copy API key": "Sao chép khóa API",
"Copy base URL": "Sao chép URL cơ sở",
"Copy billing expression": "Sao chép biểu thức tính phí",
"Copy callback URL": "Sao chép URL callback",
"Copy Channel": "Sao chép kênh",
"Copy code": "Sao chép mã",
"Copy Connection Info": "Sao chép thông tin kết nối",
"Copy endpoint path": "Sao chép đường dẫn điểm cuối",
"Copy failed": "Sao chép thất bại",
"Copy Field": "Sao chép trường",
"Copy Header": "Sao chép tiêu đề",
......@@ -1248,6 +1267,7 @@
"Copy Link": "Sao chép liên kết",
"Copy model name": "Sao chép tên mô hình",
"Copy model names": "Sao chép tên mô hình",
"Copy plugin key": "Sao chép mã định danh plugin",
"Copy prompt": "Sao chép prompt",
"Copy ready-to-run curl": "Sao chép curl có thể chạy ngay",
"Copy redemption code": "Sao chép mã đổi thưởng",
......@@ -1276,6 +1296,7 @@
"Cost = 10 × 0.8 = 8": "Chi phí = 10 × 0.8 = 8",
"Cost = 10 × 1.0 = 10": "Chi phí = 10 × 1.0 = 10",
"Cost = model price × that one ratio. Nothing else from the group settings enters the formula.": "Chi phí = giá mô hình × đúng một hệ số đó. Không có mục nào khác trong cài đặt nhóm tham gia công thức.",
"Cost calculator": "Ước tính chi phí",
"Cost in {{currency}} per request, regardless of tokens used.": "Chi phí mỗi yêu cầu bằng {{currency}}, không phụ thuộc số token sử dụng.",
"Cost in USD per request, regardless of tokens used.": "Chi phí bằng USD cho mỗi yêu cầu, bất kể số lượng token được sử dụng.",
"Cost Tracking": "Theo dõi chi phí",
......@@ -1368,8 +1389,10 @@
"Current Password": "Mật khẩu hiện tại",
"Current password is incorrect.": "Mật khẩu hiện tại không đúng.",
"Current Price": "Giá hiện tại",
"Current pricing conditions": "Điều kiện tính giá hiện tại",
"Current quota": "Hạn mức hiện tại",
"Current token": "Token hiện tại",
"Current v{{from}} → install v{{to}}": "Hiện tại v{{from}} → cài đặt v{{to}}",
"Current value": "Giá trị hiện tại",
"Current Value": "Present value",
"Current vendor": "Nhà cung cấp hiện tại",
......@@ -1438,8 +1461,10 @@
"Default": "Mặc định",
"Default / range": "Mặc định / khoảng",
"Default administrator permissions can be overridden for this user.": "Có thể ghi đè quyền quản trị viên mặc định cho người dùng này.",
"Default API address": "Địa chỉ API mặc định",
"Default API Version *": "Phiên bản API mặc định *",
"Default API version for this channel": "Phiên bản API mặc định cho kênh này",
"Default base URL": "Base URL mặc định",
"Default Bearer": "Bearer mặc định",
"Default Collapse Sidebar": "Mặc định Thu gọn Thanh bên",
"Default consumption chart": "Biểu đồ tiêu thụ mặc định",
......@@ -1578,6 +1603,8 @@
"Disable All": "Vô hiệu hóa tất cả",
"Disable custom task plugins?": "Tắt plugin tác vụ tùy chỉnh?",
"Disable on failure": "Vô hiệu hóa khi lỗi",
"Disable plugin {{name}} ({{key}})? Requests using this plugin may be affected.": "Tắt plugin {{name}} ({{key}})? Các yêu cầu sử dụng plugin này có thể bị ảnh hưởng.",
"Disable plugin?": "Tắt plugin?",
"Disable selected channels": "Vô hiệu hóa các kênh đã chọn",
"Disable selected models": "Vô hiệu hóa các mô hình đã chọn",
"Disable store passthrough": "Vô hiệu hóa chuyển tiếp store",
......@@ -1674,6 +1701,8 @@
"Duration Settings": "Cài đặt thời lượng",
"Duration Unit": "Đơn vị thời lượng",
"Duration Value": "Giá trị thời lượng",
"Dynamic declarations cannot be previewed. Retry or review the source below.": "Không thể xem trước khai báo được tạo động. Hãy thử lại hoặc xem mã nguồn bên dưới.",
"Dynamic operation": "Thao tác động",
"Dynamic Pricing": "Giá linh hoạt",
"e.g. ¥ or HK$": "ví dụ ¥ hoặc HK$",
"e.g. 401, 403, 429, 500-599": "vd. 401, 403, 429, 500-599",
......@@ -1809,6 +1838,7 @@
"Enable Passkey": "Bật khóa truy cập",
"Enable Performance Monitoring": "Bật giám sát hiệu suất",
"Enable plugin {{key}}": "Bật plugin {{key}}",
"Enable plugin?": "Bật plugin?",
"Enable rate limiting": "Bật giới hạn tốc độ",
"Enable Request Passthrough": "Bật Truyền qua Yêu cầu",
"Enable selected channels": "Kích hoạt các kênh đã chọn",
......@@ -1906,6 +1936,7 @@
"Enter password (8–128 characters)": "Nhập mật khẩu (8–128 ký tự)",
"Enter quota in {{currency}}": "Nhập hạn mức bằng {{currency}}",
"Enter quota in tokens": "Nhập hạn mức bằng token",
"Enter sample usage to estimate the cost. Group and request multipliers are not included.": "Nhập mức sử dụng của một yêu cầu để ước tính chi phí, chưa áp dụng hệ số nhóm và quy tắc yêu cầu.",
"Enter secret key": "Nhập khóa bí mật",
"Enter system prompt (user prompt takes priority)": "Nhập lời nhắc hệ thống (lời nhắc người dùng được ưu tiên)",
"Enter tag name (optional)": "Nhập tên thẻ (tùy chọn)",
......@@ -2017,6 +2048,7 @@
"External operations mode": "Chế độ vận hành bên ngoài",
"External Speed Test": "Kiểm tra tốc độ bên ngoài",
"Extra": "Thêm",
"Extra destinations beyond the channel API address. The channel address remains accessible.": "Các miền được truy cập ngoài địa chỉ API của kênh. Địa chỉ kênh vẫn truy cập được.",
"Extra Notes (Optional)": "Ghi chú bổ sung (Tùy chọn)",
"Extra visible": "Hiển thị thêm",
"Extra visible to {{group}}": "Hiển thị thêm cho {{group}}",
......@@ -2220,7 +2252,10 @@
"Field Path": "Đường dẫn trường",
"Fields": "Các trường",
"File": "Tệp",
"File could not be verified": "Chưa thể xác minh tệp",
"File integrity verified": "Đã xác minh tính toàn vẹn của tệp",
"File Search": "Tìm kiếm tệp",
"File verification": "Xác minh tệp",
"Files to Retain": "Số tệp giữ lại",
"Fill All Models": "Điền Tất Cả Mô Hình",
"Fill Codex CLI / Claude CLI Templates": "Điền mẫu Codex CLI / Claude CLI",
......@@ -2283,6 +2318,7 @@
"Fix Abilities": "Sửa tính nhất quán kênh",
"Fix order": "Sửa thứ tự",
"Fixed abilities: {{success}} succeeded, {{fails}} failed": "Đã sửa tính nhất quán kênh: {{success}} thành công, {{fails}} thất bại",
"Fixed fee per request": "Phí cố định mỗi yêu cầu",
"Fixed price": "Giá cố định",
"Fixed price (USD)": "Giá cố định (USD)",
"Fixed request price": "Giá cố định theo yêu cầu",
......@@ -2344,6 +2380,7 @@
"Friendly name to identify this channel": "Tên thân thiện để nhận dạng kênh này",
"From Address": "Địa chỉ Người gửi",
"From IO.NET deployment": "Từ triển khai IO.NET",
"From marketplace index": "Từ chỉ mục kho plugin",
"From model redirect, not yet added to models list": "Từ chuyển hướng mô hình, chưa được thêm vào danh sách mô hình",
"Full API Key": "Khóa API đầy đủ",
"Full Base URL (supports": "URL cơ sở đầy đủ (hỗ trợ",
......@@ -2351,6 +2388,7 @@
"Full input length": "Độ dài đầu vào đầy đủ",
"Full JSON": "JSON đầy đủ",
"Full layout": "Bố cục đầy đủ",
"Full source": "Toàn bộ mã nguồn",
"Full upstream catalog": "Toàn bộ danh mục nguồn",
"Full width": "Toàn chiều rộng",
"Function calling": "Gọi hàm",
......@@ -2612,6 +2650,7 @@
"Index": "Chỉ mục",
"Index request failed with HTTP {{status}}": "Yêu cầu chỉ mục thất bại với HTTP {{status}}",
"Index URL": "URL chỉ mục",
"Information unavailable": "Chưa đọc được thông tin",
"Inherit global Auto order": "Kế thừa thứ tự Auto toàn cục",
"Inherit vendor icon": "Kế thừa biểu tượng nhà cung cấp",
"Inherited from {{vendor}}": "Kế thừa từ {{vendor}}",
......@@ -2647,6 +2686,7 @@
"Integrations": "Tích hợp",
"Integrity check failed": "Kiểm tra tính toàn vẹn thất bại",
"Integrity hash": "Mã băm toàn vẹn",
"Integrity verification unavailable in this environment": "Không thể xác minh trong môi trường hiện tại",
"Inter-group overrides": "Ghi đè liên nhóm",
"Inter-group ratio overrides": "Tỷ lệ liên nhóm ghi đè",
"Interface Language": "Ngôn ngữ giao diện",
......@@ -3126,6 +3166,7 @@
"More": "Thêm",
"More Apps": "Thêm",
"more mapping": "thêm lập bản đồ",
"More models ({{count}})": "Mô hình khác ({{count}})",
"More templates...": "Thêm mẫu...",
"More than 999 days left": "Hơn 999 ngày",
"More...": "Thêm...",
......@@ -3286,6 +3327,7 @@
"No encryption": "Không mã hóa",
"No endpoints configured. Switch to JSON mode or add rows to define endpoints.": "Chưa cấu hình endpoint nào. Chuyển sang chế độ JSON hoặc thêm hàng để định nghĩa endpoint.",
"No endpoints inferred from channels": "Không xác định được điểm cuối từ kênh",
"No extra domains declared": "Không khai báo miền bổ sung",
"No FAQ entries available": "Không có mục FAQ nào.",
"No FAQ entries yet. Click \"Add FAQ\" to create one.": "Chưa có mục FAQ nào. Nhấp vào \"Thêm FAQ\" để tạo một mục.",
"No files match the accepted types.": "Không có tệp nào khớp với các loại được chấp nhận.",
......@@ -3387,6 +3429,8 @@
"No rules yet": "Chưa có quy tắc",
"No rules yet. Add a group below to get started.": "Chưa có quy tắc nào. Thêm một nhóm bên dưới để bắt đầu.",
"No separate media pricing configured.": "Chưa cấu hình giá phương tiện riêng.",
"No source available": "Chưa có mã nguồn",
"No source changes": "Mã nguồn không thay đổi",
"No status code mappings configured.": "Chưa cấu hình ánh xạ mã trạng thái.",
"No stores on this merchant yet. Set a return URL and click Create to mint your first pair.": "Merchant này chưa có cửa hàng. Đặt URL trả về và nhấn Tạo để tạo cặp đầu tiên.",
"No subscription plans yet": "Chưa có gói đăng ký nào",
......@@ -3415,6 +3459,7 @@
"No vendor data available": "Không có dữ liệu nhà cung cấp",
"No vendors found": "Không tìm thấy nhà cung cấp",
"No verification method is available for this action.": "Không có phương thức xác minh khả dụng cho thao tác này.",
"No version history": "Chưa có lịch sử phiên bản",
"No X Found": "Không tìm thấy X",
"Node": "Nút",
"Node filters": "Bộ lọc nút",
......@@ -3424,6 +3469,7 @@
"Non-stream": "Không phát trực tuyến",
"Non-zero invitation rewards require compliance confirmation in Payment Gateway settings.": "Phần thưởng mời khác 0 yêu cầu xác nhận tuân thủ trong cài đặt Cổng thanh toán.",
"None": "Không có",
"None (plugin declaration)": "Không có (theo khai báo plugin)",
"noreply@example.com": "noreply@example.com",
"Normalized:": "Chuẩn hóa:",
"Not available": "Không khả dụng",
......@@ -3431,6 +3477,8 @@
"Not bound": "Không bị ràng buộc",
"Not configured": "Chưa cấu hình",
"Not declared": "Không khai báo",
"Not declared by this plugin": "Plugin chưa khai báo",
"Not declared; an API key may still be required.": "Chưa khai báo cách xác thực; vẫn có thể cần khóa API.",
"Not Equals": "Không bằng",
"Not found upstream": "Không tìm thấy ở nguồn",
"Not generated": "Chưa tạo",
......@@ -3466,6 +3514,7 @@
"Number of top log probabilities returned per token": "Số log probabilities hàng đầu trên mỗi token",
"Number of users invited": "Số người dùng được mời",
"OAuth": "OAuth",
"OAuth 2.0 service account": "Tài khoản dịch vụ OAuth 2.0",
"OAuth authorization timed out. Please try again.": "Ủy quyền OAuth đã hết thời gian chờ. Vui lòng thử lại.",
"OAuth authorization was cancelled.": "Đã hủy ủy quyền OAuth.",
"OAuth binding timed out. Please try again.": "Liên kết OAuth đã hết thời gian chờ. Vui lòng thử lại.",
......@@ -3595,6 +3644,7 @@
"Optimized network architecture ensures millisecond response times": "Kiến trúc mạng tối ưu đảm bảo thời gian phản hồi mili giây",
"Optional callback override. Leave blank to use server address": "Tùy chọn ghi đè callback. Để trống để sử dụng địa chỉ máy chủ",
"Optional icon identifier for the login button": "Định danh biểu tượng tùy chọn cho nút đăng nhập",
"Optional icon.svg or icon.png shipped next to plugin.js, up to 512 KiB. Stored separately from the source.": "Tùy chọn: icon.svg hoặc icon.png đặt cạnh plugin.js, tối đa 512 KiB. Lưu tách biệt với mã nguồn.",
"Optional JSON policy to restrict access based on user info fields": "Chính sách JSON tùy chọn để hạn chế truy cập dựa trên các trường thông tin người dùng",
"Optional minimum recharge amount for this method.": "Số tiền nạp tối thiểu tùy chọn cho phương thức này.",
"Optional multiplier per user group used when calculating recharge pricing. Provide a JSON object such as": "Hệ số nhân tùy chọn cho mỗi nhóm người dùng, được sử dụng khi tính toán giá nạp tiền. Cung cấp một đối tượng JSON như",
......@@ -3618,6 +3668,7 @@
"Original Model": "Nguyên mẫu",
"Original value": "Giá trị gốc",
"Other": "Khác",
"Other cases": "Các trường hợp khác",
"Other channels": "Kênh khác",
"Other groups": "Nhóm khác",
"Other models": "Mô hình khác",
......@@ -3884,16 +3935,26 @@
"Please wait for the current generation to complete": "Vui lòng đợi lượt tạo hiện tại hoàn tất",
"Plugin": "Plugin",
"Plugin author": "Tác giả plugin",
"Plugin default": "Mặc định của plugin",
"Plugin details": "Chi tiết plugin",
"Plugin Generation": "Thế hệ plugin",
"Plugin icon": "Biểu tượng plugin",
"Plugin icon exceeds the 512 KiB limit.": "Biểu tượng plugin vượt quá giới hạn 512 KiB.",
"Plugin icon must be an .svg or .png file.": "Biểu tượng plugin phải là tệp .svg hoặc .png.",
"Plugin indexes are fetched by your browser. Installing runs the same review and admission pipeline as a manual upload.": "Chỉ mục plugin do trình duyệt của bạn tải. Việc cài đặt đi qua đúng quy trình xem xét và kiểm duyệt như khi tải lên thủ công.",
"Plugin installation failed": "Cài đặt plugin thất bại",
"Plugin is still in use": "Plugin vẫn đang được sử dụng",
"Plugin key": "Khóa plugin",
"Plugin metadata": "Siêu dữ liệu plugin",
"Plugin sandbox": "Môi trường thử nghiệm plugin",
"Plugin source": "Mã nguồn plugin",
"Plugin source exceeds the 1 MiB limit.": "Mã nguồn plugin vượt giới hạn 1 MiB.",
"Plugin uploaded successfully": "Đã tải plugin lên",
"Plugin version activated": "Đã kích hoạt phiên bản plugin",
"Plugin version deleted": "Đã xóa phiên bản plugin",
"Plugin website": "Trang web plugin",
"Plugin-defined interfaces": "Giao diện do plugin định nghĩa",
"Plugins can access channel credentials. Review the source and differences before installing.": "Plugin có thể truy cập thông tin xác thực kênh. Hãy kiểm tra mã nguồn và các khác biệt trước khi cài đặt.",
"Policy JSON": "JSON chính sách",
"Polling": "Thăm dò",
"Polling mode requires Redis and memory cache, otherwise performance will be significantly degraded": "Chế độ thăm dò yêu cầu Redis và bộ nhớ đệm, nếu không hiệu suất sẽ bị suy giảm đáng kể.",
......@@ -3978,13 +4039,17 @@
"Price:": "Giá:",
"Price: High to Low": "Giá: Từ cao đến thấp",
"Price: Low to High": "Giá: Thấp đến Cao",
"Prices are in {{currency}}, with units shown below. Use USD when editing expressions directly.": "Giá tính bằng {{currency}}, theo đơn vị ghi bên dưới. Khi sửa trực tiếp biểu thức, hãy dùng USD.",
"Prices for each set of conditions": "Giá tương ứng với từng điều kiện",
"Prices shown per": "Giá hiển thị theo",
"Prices shown per usage unit": "Giá hiển thị theo từng đơn vị sử dụng",
"Prices synced successfully": "Đồng bộ giá thành công",
"Prices vary by usage tier and request conditions": "Giá thay đổi theo bậc dùng và điều kiện yêu cầu",
"Pricing": "Giá cả",
"Pricing & Display": "Giá cả & Hiển thị",
"Pricing by condition": "Định giá theo điều kiện",
"Pricing by Group": "Giá theo Nhóm",
"Pricing conditions": "Điều kiện tính giá",
"Pricing Configuration": "Price configuration",
"Pricing currency": "Tiền tệ định giá",
"Pricing group example": "Ví dụ nhóm định giá",
......@@ -4391,6 +4456,7 @@
"Retain last N days": "Giữ lại N ngày gần nhất",
"Retain last N files": "Giữ lại N tệp gần nhất",
"Retention days": "Số ngày lưu giữ",
"Retrieve result": "Truy vấn kết quả",
"Retry": "Thử lại",
"Retry Chain": "Chuỗi thử lại",
"Retry Settings": "Cài đặt thử lại",
......@@ -4681,6 +4747,7 @@
"Select theme preset": "Chọn tùy chỉnh chủ đề",
"Select time granularity": "Chọn độ chi tiết thời gian",
"Select vendor": "Chọn nhà cung cấp",
"Select version": "Chọn phiên bản",
"Selectable groups": "Nhóm có thể chọn",
"selected": "đã chọn",
"Selected {{count}}": "Đã chọn {{count}}",
......@@ -4688,7 +4755,7 @@
"Selected conflicts were overwritten successfully.": "Các xung đột được chọn đã được ghi đè thành công.",
"Selected nodes": "Nút đã chọn",
"Selected when creating a token and used as the default billing group for API calls.": "Được chọn khi tạo token và dùng làm nhóm tính phí mặc định cho các lệnh gọi API.",
"Selecting a plugin fills its declared models.": "Chọn plugin sẽ điền các model đã khai báo.",
"Selecting a plugin fills its declared models and default base URL.": "Chọn plugin sẽ điền các model đã khai báo và Base URL mặc định.",
"Self-Use Mode": "Chế độ tự sử dụng",
"Send": "Gửi",
"Send a request": "Gửi yêu cầu",
......@@ -4725,6 +4792,8 @@
"Set filters to narrow down your log search results.": "Đặt bộ lọc để thu hẹp kết quả tìm kiếm nhật ký của bạn.",
"Set Header": "Đặt tiêu đề",
"Set Password": "Đặt mật khẩu",
"Set prices for each set of conditions below. Cost = usage × unit price + additional charge. Token prices are per million tokens.": "Đặt giá cho từng điều kiện bên dưới. Chi phí = mức sử dụng × đơn giá + phí bổ sung. Đơn giá token tính trên mỗi triệu token.",
"Set prices for each set of conditions below. Cost = usage × unit price + fixed fee. Token prices are per million tokens.": "Đặt giá cho từng điều kiện bên dưới. Chi phí = mức sử dụng × đơn giá + phí cố định. Đơn giá token tính trên mỗi triệu token.",
"Set Project to io.cloud when creating/selecting key": "Đặt Dự án thành io.cloud khi tạo/chọn khóa",
"Set quota amount and limits": "Thiết lập hạn mức và giới hạn",
"Set Request Header": "Đặt header yêu cầu",
......@@ -4825,12 +4894,14 @@
"socks5://user:pass@host:port": "socks5://user:pass@host:port",
"Soft Errors": "Lỗi mềm",
"Some channels failed: {{errorMsg}}": "Một số kênh thất bại: {{errorMsg}}",
"Some plugin information could not be read": "Không đọc được một số thông tin plugin",
"Something went wrong!": "Có gì đó không ổn!",
"Sonnet Model": "Mô hình Sonnet",
"Sora": "Sora",
"Sort": "Sắp xếp",
"Sort by ID": "Sắp xếp theo ID",
"Sort Order": "Thứ tự sắp xếp",
"Sort priority": "Ưu tiên sắp xếp",
"Source": "Nguồn",
"Source diff": "So sánh mã nguồn",
"Source Endpoint": "Điểm nguồn",
......@@ -4860,6 +4931,7 @@
"stale": "mất kết nối",
"Standard": "Tiêu chuẩn",
"Standard price": "Giá tiêu chuẩn",
"Standard protocol interfaces": "Giao diện giao thức chuẩn",
"Start": "Bắt đầu",
"Start ≤ end: within the day; start > end: across midnight": "Bắt đầu ≤ kết thúc: trong ngày; bắt đầu > kết thúc: qua nửa đêm",
"Start a conversation to see messages here": "Bắt đầu một cuộc trò chuyện để xem tin nhắn tại đây",
......@@ -4920,6 +4992,7 @@
"Structured output": "Đầu ra có cấu trúc",
"Submit": "Gửi",
"Submit directly": "Gửi trực tiếp",
"Submit request": "Gửi yêu cầu",
"Submit Result": "Gửi Kết quả",
"Submit Time": "Thời gian gửi",
"Submitted": "Đã gửi",
......@@ -4961,7 +5034,9 @@
"Supported Applications": "Ứng dụng được hỗ trợ",
"Supported endpoints": "Điểm cuối được hỗ trợ",
"Supported Imagine Models": "Mô hình Imagine được hỗ trợ",
"Supported interfaces": "Giao diện được hỗ trợ",
"Supported modalities": "Phương thức hỗ trợ",
"Supported models": "Mô hình được hỗ trợ",
"Supported operators: eq, ne, gt, gte, lt, lte, in, not_in, contains, not_contains, exists, not_exists. Leave empty to allow all users.": "Toán tử được hỗ trợ: eq, ne, gt, gte, lt, lte, in, not_in, contains, not_contains, exists, not_exists. Để trống để cho phép tất cả người dùng.",
"Supported parameters": "Tham số hỗ trợ",
"Supported variables": "Biến được hỗ trợ",
......@@ -4994,6 +5069,7 @@
"Sync Upstream Models": "Đồng bộ các mô hình nguồn",
"Synced upstream models": "Đã đồng bộ mô hình thượng nguồn",
"Synchronize models and vendors from an upstream source": "Đồng bộ hóa các mô hình và nhà cung cấp từ một nguồn thượng nguồn",
"Synchronous": "Đồng bộ",
"Syncing prices, please wait...": "Đang đồng bộ giá, vui lòng đợi...",
"Syncing...": "Đang đồng bộ...",
"System": "Hệ thống",
......@@ -5146,6 +5222,7 @@
"The site exchange rate is invalid. Prices are shown in USD.": "Tỷ giá trang web không hợp lệ. Giá được hiển thị bằng USD.",
"The site is not available at the moment.": "Trang web hiện không khả dụng.",
"The slug is appended to the URL:": "Slug được gắn vào URL:",
"The source is unavailable or this browser cannot calculate SHA-256. The gateway checks the published hash during installation.": "Mã nguồn chưa có hoặc trình duyệt không tính được SHA-256. Cổng sẽ kiểm tra mã băm đã công bố khi cài đặt.",
"The sync will fetch missing models and vendors from the selected source. Existing records are updated only when you approve conflicts.": "Đồng bộ hóa sẽ tìm nạp các mẫu và nhà cung cấp còn thiếu từ nguồn đã chọn. Các bản ghi hiện có chỉ được cập nhật khi bạn chấp thuận các xung đột.",
"The system always bills in USD. Site currency makes entering and converting prices easier; amounts are converted to USD using the site exchange rate. Switching currencies does not change the actual price. Raw billing expressions always use USD.": "Hệ thống luôn tính phí bằng USD. Tiền tệ trang web giúp nhập và quy đổi giá thuận tiện hơn; số tiền được quy đổi sang USD theo tỷ giá của trang web. Đổi tiền tệ không làm thay đổi giá thực tế. Biểu thức tính phí gốc luôn dùng USD.",
"The Telegram authorization request is invalid or expired.": "Yêu cầu ủy quyền Telegram không hợp lệ hoặc đã hết hạn.",
......@@ -5156,6 +5233,7 @@
"The two-factor setup has expired or changed. Start setup again.": "Thiết lập xác thực hai yếu tố đã hết hạn hoặc thay đổi. Vui lòng thiết lập lại.",
"The unique identifier for this model": "Mã định danh duy nhất cho mô hình này",
"The unique name for this vendor": "Tên duy nhất cho nhà cung cấp này",
"The upstream address this plugin sends requests to. The plugin declares no default, so it must be filled in.": "Địa chỉ upstream mà plugin gửi yêu cầu tới. Plugin không khai báo giá trị mặc định nên bắt buộc phải điền.",
"The upstream channel that served the requests": "Kênh thượng nguồn đã phục vụ các yêu cầu",
"The upstream natively supports all three protocols; every selected route is forwarded without conversion.": "Thượng nguồn hỗ trợ nguyên bản cả ba giao thức; mọi route đã chọn được chuyển tiếp mà không chuyển đổi.",
"The upstream response is valid JSON, but it does not match the OpenAI credit_summary format. The channel balance was not updated.": "Phản hồi thượng nguồn là JSON hợp lệ nhưng không khớp định dạng OpenAI credit_summary. Số dư kênh chưa được cập nhật.",
......@@ -5188,6 +5266,8 @@
"This action will permanently remove 2FA protection from your account.": "Hành động này sẽ vĩnh viễn gỡ bỏ tính năng bảo vệ",
"This announcement will be removed from the list.": "Thông báo này sẽ bị xóa khỏi danh sách.",
"This API shortcut will be removed from the list.": "Lối tắt API này sẽ bị xóa khỏi danh sách.",
"This base URL points at a private or local network host. Make sure it is an upstream you control.": "Base URL này trỏ tới máy chủ mạng nội bộ hoặc cục bộ. Hãy chắc chắn đây là upstream do bạn kiểm soát.",
"This base URL uses plain HTTP, so the channel key is sent unencrypted.": "Base URL này dùng HTTP không mã hóa, khóa kênh sẽ được gửi ở dạng chưa mã hóa.",
"This callback URL updates from the slug field and is the value to register with your provider.": "URL callback này cập nhật theo trường slug và là giá trị cần đăng ký với nhà cung cấp.",
"This channel has no configured models.": "Kênh này không có mô hình nào được cấu hình.",
"This channel is not an Ollama channel.": "Kênh này không phải là kênh Ollama.",
......@@ -5223,6 +5303,7 @@
"This plan does not allow balance redemption": "Gói này không cho phép thanh toán bằng số dư",
"This plugin has no factory fallback. Deleting or disabling it makes this platform unavailable.": "Plugin này không có bản tích hợp dự phòng. Xóa hoặc tắt plugin sẽ khiến nền tảng không khả dụng.",
"This plugin path does not resolve within the source repository.": "Đường dẫn plugin này không nằm trong kho của nguồn.",
"This preview reads static plugin declarations. The gateway validates the plugin during installation.": "Bản xem trước đọc khai báo tĩnh của plugin. Cổng sẽ kiểm tra plugin khi cài đặt.",
"This project must be used in compliance with the": "Dự án này phải được sử dụng tuân thủ theo",
"This removes {{count}} failed models from this channel. This action cannot be undone.": "Thao tác này sẽ xóa {{count}} mô hình thất bại khỏi kênh này. Không thể hoàn tác.",
"This route discovers upstream OpenAI models and cannot be split or matched by client model rules.": "Tuyến này khám phá các mô hình OpenAI thượng nguồn và không thể tách hoặc đối sánh bằng quy tắc mô hình phía máy khách.",
......@@ -5495,6 +5576,7 @@
"Unit price (local currency / USD)": "Đơn giá (tiền tệ địa phương / USD)",
"Unit price (USD)": "Đơn giá (USD)",
"Unit price must be greater than 0": "Đơn giá phải lớn hơn 0",
"Unit price: {{field}}": "Đơn giá: {{field}}",
"Units per USD": "Đơn vị trên USD",
"Unknown": "Không rõ",
"Unknown device": "Thiết bị không xác định",
......@@ -5579,6 +5661,7 @@
"Uploading...": "Đang tải lên...",
"Upscale": "Phóng to",
"Upstream": "Thượng nguồn",
"Upstream authentication": "Xác thực với nhà cung cấp",
"Upstream did not return reset credit details.": "Upstream không trả về chi tiết lượt đặt lại.",
"Upstream JSON response": "Phản hồi JSON thượng nguồn",
"Upstream Model Detection Settings": "Cài đặt phát hiện mô hình nguồn",
......@@ -5621,6 +5704,7 @@
"URL to your logo image (optional)": "URL hình ảnh logo của bạn (tùy chọn)",
"US dollar (USD)": "Đô la Mỹ (USD)",
"Usage": "Sử dụng",
"Usage · {{price}}": "Mức sử dụng · {{price}}",
"Usage at a glance": "Tổng quan mức dùng",
"Usage guide": "Hướng dẫn sử dụng",
"Usage logs": "Nhật ký sử dụng",
......@@ -5643,6 +5727,7 @@
"Use authenticator code": "Sử dụng mã xác thực",
"Use backup code": "Sử dụng mã dự phòng",
"Use Bearer for all protocols": "Dùng Bearer cho mọi giao thức",
"Use default": "Dùng mặc định",
"Use disk cache when request body exceeds this size": "Sử dụng bộ nhớ đệm đĩa khi nội dung yêu cầu vượt quá kích thước này",
"Use exact client model names, separated by commas. Prefixes and wildcards are not supported.": "Nhập tên model chính xác từ yêu cầu client, ngăn cách bằng dấu phẩy. Không hỗ trợ tiền tố hoặc ký tự đại diện.",
"Use exact model names such as gpt-4o, or regex rules prefixed with re: such as re:^gemini-.": "Dùng tên model chính xác như gpt-4o, hoặc quy tắc regex có tiền tố re: như re:^gemini-.",
......@@ -5674,6 +5759,7 @@
"Used to authenticate with io.net deployment API": "Dùng để xác thực với API triển khai io.net",
"Used to authenticate with the worker. Leave blank to keep the existing secret.": "Dùng để xác thực với worker. Để trống để giữ nguyên secret hiện có.",
"Used to decide the payment flow. Built-in keys include stripe for Stripe and waffo_pancake for Waffo Pancake; other values are sent to Epay as the type parameter.": "Dùng để quyết định luồng thanh toán khi người dùng nhấp. Các khóa có sẵn gồm stripe cho Stripe và waffo_pancake cho Waffo Pancake; các giá trị khác được gửi tới Epay dưới dạng tham số type.",
"Used when a Task Plugin channel has no API address configured.": "Dùng khi kênh plugin tác vụ chưa được cấu hình địa chỉ API.",
"Used:": "Đã dùng:",
"User": "Người dùng",
"User {{id}}": "Người dùng {{id}}",
......@@ -5783,6 +5869,7 @@
"Verifying credentials and pulling stores from your Pancake account...": "Đang xác minh thông tin xác thực và lấy cửa hàng từ tài khoản Pancake của bạn...",
"Verifying your {{provider}} account": "Đang xác minh tài khoản {{provider}} của bạn",
"Version": "Phiên bản",
"Version differences": "Khác biệt phiên bản",
"Version history": "Lịch sử phiên bản",
"Version Overrides": "Ghi đè phiên bản",
"Versions": "Phiên bản",
......
......@@ -75,6 +75,7 @@
"{{currency}} price per 1M tokens.": "每百萬 Token 的價格,單位為 {{currency}}。",
"{{field}} updated to {{value}}": "{{field}} 已更新為 {{value}}",
"{{field}} updated to {{value}} for tag: {{tag}}": "標籤「{{tag}}」的 {{field}} 已更新為 {{value}}",
"{{key}} · from {{source}}": "{{key}} · 來自 {{source}}",
"{{key}} · version {{version}} · from {{source}}": "{{key}} · 版本 {{version}} · 來自 {{source}}",
"{{method}} {{route}}": "{{method}} {{route}}",
"{{modality}} not supported": "不支援 {{modality}}",
......@@ -141,6 +142,7 @@
"80,443,8080": "80,443,8080",
"A billing multiplier. Lower ratios mean lower API call costs.": "收費乘數,倍率越低,API 呼叫費用越低。",
"A focused home for keys, balance, routing, and service health.": "集中展示金鑰、餘額、路由和服務健康狀態。",
"A matching hash confirms the published file, not the safety of its code.": "校驗一致僅表示檔案與發布版本相符,不代表程式碼安全。",
"A security operation is already in progress.": "已有安全操作正在進行。",
"A selected model no longer exists. Reload the model list.": "所選模型已不存在,請重新載入模型清單。",
"A vendor with this name already exists.": "此供應商名稱已存在。",
......@@ -270,13 +272,17 @@
"Add your API keys, set up channels and configure access permissions": "新增 API 金鑰,設定渠道並設定存取權限",
"Added {{count}} model(s)": "已新增 {{count}} 個模型",
"Added {{count}} models from \"{{name}}\"": "已從「{{name}}」新增 {{count}} 個模型",
"Added once per request. Set to 0 for usage-only billing.": "每次請求額外收取一次;不收固定費用時填 0。",
"Added successfully": "新增成功",
"Added to the usage cost. Set to 0 for no additional charge.": "在用量費用基礎上加收的金額,不加收時填 0。",
"Additional charge": "加收費用",
"Additional Conditions": "附加條件",
"Additional information": "附加資訊",
"Additional Information": "附加資訊",
"Additional Limit": "附加額度",
"Additional Limits": "附加額度",
"Additional metered capability": "附加收費能力",
"Additional request domains": "額外存取網域",
"Additional verification required": "需要進一步驗證",
"Adjust filters, then search to refresh the logs.": "調整篩選條件,然後搜尋以重新整理日誌。",
"Adjust Quota": "調整額度",
......@@ -349,6 +355,7 @@
"All Must Match (AND)": "全部滿足(AND)",
"All nodes": "全部節點",
"All playground messages saved in this browser will be removed. This cannot be undone.": "儲存在此瀏覽器中的所有遊樂場訊息都將被移除。此操作無法撤銷。",
"All requests": "所有請求",
"All requests must include": "所有請求必須攜帶",
"All results": "所有結果",
"All routes": "全部路由",
......@@ -366,6 +373,7 @@
"Allow accountFilter parameter": "允許 accountFilter 參數",
"Allow balance redemption": "允許餘額兌換",
"Allow Claude beta query passthrough": "允許 Claude beta 查詢透傳",
"Allow clients to query configured prices via `/api/ratio`.": "允許用戶端透過 `/api/ratio` 查詢已設定的價格。",
"Allow clients to query configured ratios via `/api/ratio`.": "允許用戶端透過 `/api/ratio` 查詢已設定的比例。",
"Allow HTTP image requests": "允許 HTTP 圖像請求",
"Allow include usage obfuscation passthrough": "允許 include 用量混淆透傳",
......@@ -490,6 +498,8 @@
"Append to existing keys": "追加到現有金鑰",
"Append value to array / string / object end": "把值追加到陣列/字串/物件最後",
"appended": "已追加",
"Applicable channels": "適用管道",
"Applicable conditions": "適用條件",
"Application": "套用程式",
"Applied {{name}} pricing to {{count}} models": "已將 {{name}} 的定價套用到 {{count}} 個模型",
"Applied changes": "已套用的變更",
......@@ -526,6 +536,7 @@
"Are you sure you want to delete this key? This action cannot be undone.": "您確定要刪除此金鑰嗎?此操作無法撤銷。",
"Are you sure you want to disable all enabled keys?": "您確定要停用所有已啟用的金鑰嗎?",
"Are you sure you want to enable all keys?": "您確定要啟用所有金鑰嗎?",
"Are you sure you want to enable plugin {{name}} ({{key}})?": "確定要啟用外掛程式 {{name}}({{key}})嗎?",
"Are you sure you want to manually complete this order? The user will be credited with the corresponding quota.": "您確定要手動完成此訂單嗎?用戶將獲得相應的配額。",
"Are you sure you want to sign out? You will need to sign in again to access your account.": "您確定要登出嗎?您需要再次登入才能存取您的用戶。",
"Are you sure you want to unbind {{provider}} for this user? The user will no longer be able to log in via this method.": "確定要解綁該用戶的 {{provider}} 連結嗎?解綁後該用戶將無法透過此方式登入。",
......@@ -584,6 +595,7 @@
"auth.resetPasswordConfirm.retry": "重試 ({{seconds}}s)",
"auth.resetPasswordConfirm.success": "您的密碼已成功重設",
"Authentication": "身份驗證",
"Authentication for upstream requests; channel credentials may still be used.": "用於呼叫上游服務的驗證方式;外掛仍可能使用管道憑證。",
"Authentication Method": "認證方式",
"Authenticator code": "身份驗證器代碼",
"Authenticator code or backup code": "驗證器驗證碼或備用碼",
......@@ -648,6 +660,7 @@
"Back to login": "返回登入",
"Back to Models": "返回模型",
"Backed up": "已備份",
"Background": "背景執行",
"Background job tracker for queued work.": "佇列工作的背景作業追蹤器。",
"Backup Code": "備用代碼",
"Backup code must be in format XXXX-XXXX": "備用代碼必須為 XXXX-XXXX 格式",
......@@ -891,6 +904,7 @@
"Channel type": "渠道類型",
"Channel type is required": "渠道類型是必填的",
"Channel types": "渠道類型",
"Channel types you can use when binding this plugin.": "綁定此外掛時可選擇的管道類型。",
"Channel updated successfully": "渠道更新成功",
"Channel-specific settings (JSON format)": "渠道特定設定(JSON 格式)",
"Channel:": "渠道:",
......@@ -927,6 +941,7 @@
"Check-in successful! Received": "簽到成功!獲得",
"Checked in": "已簽到",
"Checking connection": "檢查連接",
"Checking file integrity...": "正在校驗檔案…",
"Checking name...": "正在檢查名稱...",
"Checking updates...": "檢查更新中...",
"checkout.session.completed": "checkout.session.completed",
......@@ -1178,6 +1193,7 @@
"Connection failed": "連接失敗",
"Connection info detected in clipboard": "偵測到剪貼簿中的連線資訊",
"Connection info filled in": "連線資訊已填入",
"Connection settings": "連線設定",
"Connection successful": "連接成功",
"Console": "控制台",
"Console area": "控制台區域",
......@@ -1234,12 +1250,15 @@
"Copy All": "全部複製",
"Copy all backup codes": "複製所有備用代碼",
"Copy All Codes": "複製所有代碼",
"Copy all models": "複製全部模型",
"Copy API key": "複製 API 金鑰",
"Copy base URL": "複製 Base URL",
"Copy billing expression": "複製計費運算式",
"Copy callback URL": "複製回呼 URL",
"Copy Channel": "複製渠道",
"Copy code": "複製代碼",
"Copy Connection Info": "複製連接資訊",
"Copy endpoint path": "複製端點路徑",
"Copy failed": "複製失敗",
"Copy Field": "複製欄位",
"Copy Header": "複製請求頭",
......@@ -1248,6 +1267,7 @@
"Copy Link": "複製連結",
"Copy model name": "複製模型名稱",
"Copy model names": "複製模型名稱清單",
"Copy plugin key": "複製外掛識別碼",
"Copy prompt": "複製提示詞",
"Copy ready-to-run curl": "複製可直接執行的 curl",
"Copy redemption code": "複製兌換碼",
......@@ -1276,6 +1296,7 @@
"Cost = 10 × 0.8 = 8": "費用 = 10 × 0.8 = 8",
"Cost = 10 × 1.0 = 10": "費用 = 10 × 1.0 = 10",
"Cost = model price × that one ratio. Nothing else from the group settings enters the formula.": "費用 = 模型價格 × 這一個倍率。分組設定裡的其他項都不參與該公式。",
"Cost calculator": "費用試算",
"Cost in {{currency}} per request, regardless of tokens used.": "每次請求的費用({{currency}}),與 Token 用量無關。",
"Cost in USD per request, regardless of tokens used.": "每請求的美元費用,不考慮使用的令牌數。",
"Cost Tracking": "成本追蹤",
......@@ -1368,8 +1389,10 @@
"Current Password": "目前密碼",
"Current password is incorrect.": "目前密碼不正確。",
"Current Price": "目前價格",
"Current pricing conditions": "目前計價條件",
"Current quota": "目前額度",
"Current token": "目前權杖",
"Current v{{from}} → install v{{to}}": "目前版本 v{{from}} → 安裝版本 v{{to}}",
"Current value": "目前值",
"Current Value": "目前值",
"Current vendor": "目前供應商",
......@@ -1438,8 +1461,10 @@
"Default": "預設",
"Default / range": "預設值 / 範圍",
"Default administrator permissions can be overridden for this user.": "可以為此用戶覆蓋預設管理員權限。",
"Default API address": "預設 API 位址",
"Default API Version *": "預設 API 版本 *",
"Default API version for this channel": "此渠道的預設 API 版本",
"Default base URL": "預設 Base URL",
"Default Bearer": "預設 Bearer",
"Default Collapse Sidebar": "預設摺疊側邊欄",
"Default consumption chart": "預設消耗分佈圖",
......@@ -1578,6 +1603,8 @@
"Disable All": "停用全部",
"Disable custom task plugins?": "停用自訂任務外掛?",
"Disable on failure": "失敗時停用",
"Disable plugin {{name}} ({{key}})? Requests using this plugin may be affected.": "停用外掛程式 {{name}}({{key}})?使用此外掛程式的請求可能受到影響。",
"Disable plugin?": "停用外掛程式?",
"Disable selected channels": "停用選定的渠道",
"Disable selected models": "停用選定的模型",
"Disable store passthrough": "禁止透傳 store",
......@@ -1674,6 +1701,8 @@
"Duration Settings": "有效期設定",
"Duration Unit": "有效期單位",
"Duration Value": "有效期數值",
"Dynamic declarations cannot be previewed. Retry or review the source below.": "動態產生的宣告無法預覽。可重試,或查看下方原始碼。",
"Dynamic operation": "動態操作",
"Dynamic Pricing": "動態收費",
"e.g. ¥ or HK$": "例如,¥ 或 HK$",
"e.g. 401, 403, 429, 500-599": "例如 401、403、429、500-599",
......@@ -1809,6 +1838,7 @@
"Enable Passkey": "啟用 Passkey",
"Enable Performance Monitoring": "啟用效能監控",
"Enable plugin {{key}}": "啟用外掛 {{key}}",
"Enable plugin?": "啟用外掛程式?",
"Enable rate limiting": "啟用速率限制",
"Enable Request Passthrough": "啟用請求透傳",
"Enable selected channels": "啟用選定的渠道",
......@@ -1906,6 +1936,7 @@
"Enter password (8–128 characters)": "輸入密碼(8–128 個字元)",
"Enter quota in {{currency}}": "輸入 {{currency}} 額度",
"Enter quota in tokens": "輸入令牌配額",
"Enter sample usage to estimate the cost. Group and request multipliers are not included.": "填寫一次請求的用量,查看預估費用。結果未乘以群組倍率和請求規則倍率。",
"Enter secret key": "輸入金鑰",
"Enter system prompt (user prompt takes priority)": "輸入系統提示詞(用戶提示詞優先)",
"Enter tag name (optional)": "輸入標籤名稱(可選)",
......@@ -2017,6 +2048,7 @@
"External operations mode": "對外運營模式",
"External Speed Test": "外部速度測試",
"Extra": "額外",
"Extra destinations beyond the channel API address. The channel address remains accessible.": "管道 API 位址之外可存取的額外網域;管道位址本身仍可存取。",
"Extra Notes (Optional)": "額外備註(可選)",
"Extra visible": "額外可見",
"Extra visible to {{group}}": "對 {{group}} 額外可見",
......@@ -2220,7 +2252,10 @@
"Field Path": "欄位路徑",
"Fields": "欄位",
"File": "檔案",
"File could not be verified": "檔案尚未校驗",
"File integrity verified": "檔案校驗通過",
"File Search": "檔案搜尋",
"File verification": "檔案校驗",
"Files to Retain": "保留檔案數",
"Fill All Models": "填充所有模型",
"Fill Codex CLI / Claude CLI Templates": "填充 Codex CLI / Claude CLI 模板",
......@@ -2283,6 +2318,7 @@
"Fix Abilities": "修復渠道一致性",
"Fix order": "修復順序",
"Fixed abilities: {{success}} succeeded, {{fails}} failed": "渠道一致性修復完成:{{success}} 個成功,{{fails}} 個失敗",
"Fixed fee per request": "每次請求固定費用",
"Fixed price": "固定價格",
"Fixed price (USD)": "固定價格 (USD)",
"Fixed request price": "固定按次價格",
......@@ -2344,6 +2380,7 @@
"Friendly name to identify this channel": "用於識別此渠道的友好名稱",
"From Address": "發件地址",
"From IO.NET deployment": "來自 IO.NET 部署",
"From marketplace index": "來自外掛來源索引",
"From model redirect, not yet added to models list": "來自模型重新導向,尚未加入模型列表",
"Full API Key": "完整 API 金鑰",
"Full Base URL (supports": "完整基礎 URL (支援",
......@@ -2351,6 +2388,7 @@
"Full input length": "完整輸入長度",
"Full JSON": "完整 JSON",
"Full layout": "全屏佈局",
"Full source": "完整原始碼",
"Full upstream catalog": "完整上游目錄",
"Full width": "全寬",
"Function calling": "函數呼叫",
......@@ -2612,6 +2650,7 @@
"Index": "索引",
"Index request failed with HTTP {{status}}": "索引請求失敗,HTTP {{status}}",
"Index URL": "索引 URL",
"Information unavailable": "暫時無法讀取",
"Inherit global Auto order": "繼承全域 Auto 順序",
"Inherit vendor icon": "繼承供應商圖示",
"Inherited from {{vendor}}": "繼承自 {{vendor}}",
......@@ -2647,6 +2686,7 @@
"Integrations": "整合",
"Integrity check failed": "完整性驗證失敗",
"Integrity hash": "完整性雜湊",
"Integrity verification unavailable in this environment": "目前環境無法校驗",
"Inter-group overrides": "分組間覆蓋",
"Inter-group ratio overrides": "分組間比例覆蓋",
"Interface Language": "介面語言",
......@@ -3126,6 +3166,7 @@
"More": "更多",
"More Apps": "更多",
"more mapping": "更多映射",
"More models ({{count}})": "更多模型({{count}})",
"More templates...": "更多模板...",
"More than 999 days left": "剩餘超過 999 日",
"More...": "更多...",
......@@ -3286,6 +3327,7 @@
"No encryption": "無加密",
"No endpoints configured. Switch to JSON mode or add rows to define endpoints.": "未設定端點。切換到 JSON 模式或新增列來定義端點。",
"No endpoints inferred from channels": "未從渠道推導出端點",
"No extra domains declared": "未宣告額外網域",
"No FAQ entries available": "暫無 FAQ 條目",
"No FAQ entries yet. Click \"Add FAQ\" to create one.": "暫無常見問題條目。點擊「新增常見問題」來建立一個。",
"No files match the accepted types.": "沒有檔案匹配接受的類型。",
......@@ -3387,6 +3429,8 @@
"No rules yet": "暫無規則",
"No rules yet. Add a group below to get started.": "暫無規則。請在下方新增分組以開始。",
"No separate media pricing configured.": "未設定單獨的媒體定價。",
"No source available": "暫無原始碼",
"No source changes": "原始碼無變更",
"No status code mappings configured.": "未設定狀態碼映射。",
"No stores on this merchant yet. Set a return URL and click Create to mint your first pair.": "此商戶暫無店鋪。設定返回 URL 後點擊建立來生成第一組配對。",
"No subscription plans yet": "暫無訂閱套餐",
......@@ -3415,6 +3459,7 @@
"No vendor data available": "暫無廠商數據",
"No vendors found": "找不到供應商",
"No verification method is available for this action.": "此操作沒有可用的驗證方式。",
"No version history": "暫無版本歷史",
"No X Found": "未找到 X",
"Node": "節點",
"Node filters": "節點篩選",
......@@ -3424,6 +3469,7 @@
"Non-stream": "非流",
"Non-zero invitation rewards require compliance confirmation in Payment Gateway settings.": "非零邀請獎勵需要先在支付閘道設定中確認合規條款。",
"None": "無",
"None (plugin declaration)": "無(外掛宣告)",
"noreply@example.com": "noreply@example.com",
"Normalized:": "已歸一化:",
"Not available": "不可用",
......@@ -3431,6 +3477,8 @@
"Not bound": "未連結",
"Not configured": "未設定",
"Not declared": "未宣告",
"Not declared by this plugin": "外掛未宣告",
"Not declared; an API key may still be required.": "外掛未宣告驗證方式,仍可能需要 API Key。",
"Not Equals": "不等於",
"Not found upstream": "上游找不到",
"Not generated": "尚未產生",
......@@ -3466,6 +3514,7 @@
"Number of top log probabilities returned per token": "每個 token 返回的 top 概率數量",
"Number of users invited": "已邀請的用戶數量",
"OAuth": "OAuth",
"OAuth 2.0 service account": "OAuth 2.0 服務帳號",
"OAuth authorization timed out. Please try again.": "OAuth 授權已逾時,請重試。",
"OAuth authorization was cancelled.": "OAuth 授權已取消。",
"OAuth binding timed out. Please try again.": "OAuth 綁定逾時,請重試。",
......@@ -3595,6 +3644,7 @@
"Optimized network architecture ensures millisecond response times": "優化的網絡架構,確保毫秒級回應時間",
"Optional callback override. Leave blank to use server address": "可選的Callback覆蓋。留空以使用伺服器地址",
"Optional icon identifier for the login button": "登入按鈕的可選圖標標識符",
"Optional icon.svg or icon.png shipped next to plugin.js, up to 512 KiB. Stored separately from the source.": "可選,與 plugin.js 同層的 icon.svg 或 icon.png,最大 512 KiB,與原始碼分開儲存。",
"Optional JSON policy to restrict access based on user info fields": "可選的 JSON 政策,用於基於用戶資訊欄位限制存取",
"Optional minimum recharge amount for this method.": "此方法的可選最低儲值金額。",
"Optional multiplier per user group used when calculating recharge pricing. Provide a JSON object such as": "計算儲值定價時使用的每個用戶分組可選乘數。請提供一個 JSON 物件,例如",
......@@ -3618,6 +3668,7 @@
"Original Model": "原始模型",
"Original value": "原始值",
"Other": "其他",
"Other cases": "其他情況",
"Other channels": "其他渠道",
"Other groups": "其他分組",
"Other models": "其他模型",
......@@ -3884,16 +3935,26 @@
"Please wait for the current generation to complete": "請等待目前生成完成",
"Plugin": "外掛",
"Plugin author": "外掛作者",
"Plugin default": "外掛預設值",
"Plugin details": "外掛詳情",
"Plugin Generation": "外掛執行代次",
"Plugin icon": "外掛圖示",
"Plugin icon exceeds the 512 KiB limit.": "外掛圖示超過 512 KiB 限制。",
"Plugin icon must be an .svg or .png file.": "外掛圖示必須是 .svg 或 .png 檔案。",
"Plugin indexes are fetched by your browser. Installing runs the same review and admission pipeline as a manual upload.": "外掛索引由你的瀏覽器取得。安裝時走的審查與准入流程與手動上傳完全一致。",
"Plugin installation failed": "外掛安裝失敗",
"Plugin is still in use": "外掛仍在使用中",
"Plugin key": "外掛键",
"Plugin metadata": "外掛元数据",
"Plugin sandbox": "外掛沙盒",
"Plugin source": "外掛原始碼",
"Plugin source exceeds the 1 MiB limit.": "外掛原始碼超過 1 MiB 上限。",
"Plugin uploaded successfully": "外掛上傳成功",
"Plugin version activated": "外掛版本已激活",
"Plugin version deleted": "外掛版本已刪除",
"Plugin website": "外掛官網",
"Plugin-defined interfaces": "外掛自訂介面",
"Plugins can access channel credentials. Review the source and differences before installing.": "外掛可存取渠道憑證。安裝前請檢查原始碼與差異。",
"Policy JSON": "政策 JSON",
"Polling": "輪詢",
"Polling mode requires Redis and memory cache, otherwise performance will be significantly degraded": "輪詢模式需要 Redis 和記憶體緩存,否則效能將顯著下降",
......@@ -3978,13 +4039,17 @@
"Price:": "價格:",
"Price: High to Low": "價格:從高到低",
"Price: Low to High": "價格:從低到高",
"Prices are in {{currency}}, with units shown below. Use USD when editing expressions directly.": "價格以 {{currency}} 計,單位見下方標示。手動編輯運算式時請使用美元。",
"Prices for each set of conditions": "不同條件對應的價格",
"Prices shown per": "價格顯示單位",
"Prices shown per usage unit": "價格按每個用量單位顯示",
"Prices synced successfully": "價格同步成功",
"Prices vary by usage tier and request conditions": "價格根據用量檔位和請求條件動態調整",
"Pricing": "定價",
"Pricing & Display": "定價與顯示",
"Pricing by condition": "按條件計價",
"Pricing by Group": "按分組定價",
"Pricing conditions": "計價條件",
"Pricing Configuration": "定價設定",
"Pricing currency": "定價貨幣",
"Pricing group example": "定價分組示例",
......@@ -4391,6 +4456,7 @@
"Retain last N days": "保留最近N天",
"Retain last N files": "保留最近 N 個檔案",
"Retention days": "保留天數",
"Retrieve result": "查詢結果",
"Retry": "重試",
"Retry Chain": "重試鏈路",
"Retry Settings": "重試設定",
......@@ -4681,6 +4747,7 @@
"Select theme preset": "選擇主題預設",
"Select time granularity": "選擇時間粒度",
"Select vendor": "選擇供應商",
"Select version": "選擇版本",
"Selectable groups": "可選分組",
"selected": "已選擇",
"Selected {{count}}": "已選 {{count}} 個",
......@@ -4688,7 +4755,7 @@
"Selected conflicts were overwritten successfully.": "選中的衝突已成功覆蓋。",
"Selected nodes": "已選節點",
"Selected when creating a token and used as the default billing group for API calls.": "建立令牌時選擇,用作 API 呼叫的預設收費分組。",
"Selecting a plugin fills its declared models.": "選擇外掛後將自動填入其宣告的模型。",
"Selecting a plugin fills its declared models and default base URL.": "選擇外掛後將自動填入其宣告的模型和預設 Base URL。",
"Self-Use Mode": "自用模式",
"Send": "發送",
"Send a request": "發送請求",
......@@ -4725,6 +4792,8 @@
"Set filters to narrow down your log search results.": "設定篩選器以縮小日誌搜尋結果範圍。",
"Set Header": "設請求頭",
"Set Password": "設定密碼",
"Set prices for each set of conditions below. Cost = usage × unit price + additional charge. Token prices are per million tokens.": "為下方不同條件分別填寫價格。費用 = 用量 × 單價 + 加收費用;Token 單價按每百萬 Token 填寫。",
"Set prices for each set of conditions below. Cost = usage × unit price + fixed fee. Token prices are per million tokens.": "為下方不同條件分別填寫價格。費用 = 用量 × 單價 + 固定費用;Token 單價按每百萬 Token 填寫。",
"Set Project to io.cloud when creating/selecting key": "建立/選擇金鑰時將項目設定為 io.cloud",
"Set quota amount and limits": "設定令牌可用額度和數量",
"Set Request Header": "設定請求頭",
......@@ -4825,12 +4894,14 @@
"socks5://user:pass@host:port": "socks5://user:pass@host:port",
"Soft Errors": "軟錯誤",
"Some channels failed: {{errorMsg}}": "部分渠道失敗:{{errorMsg}}",
"Some plugin information could not be read": "部分外掛資訊無法讀取",
"Something went wrong!": "出現錯誤!",
"Sonnet Model": "Sonnet 模型",
"Sora": "Sora",
"Sort": "排序",
"Sort by ID": "使用 ID 排序",
"Sort Order": "排序",
"Sort priority": "排序優先級",
"Source": "來源",
"Source diff": "原始碼差异",
"Source Endpoint": "來源端點",
......@@ -4860,6 +4931,7 @@
"stale": "失聯",
"Standard": "標準",
"Standard price": "標準價格",
"Standard protocol interfaces": "標準協定介面",
"Start": "開始",
"Start ≤ end: within the day; start > end: across midnight": "開始 ≤ 結束為當日區間,開始 > 結束為跨午夜區間",
"Start a conversation to see messages here": "開始對話以在此處查看訊息",
......@@ -4920,6 +4992,7 @@
"Structured output": "結構化輸出",
"Submit": "提交",
"Submit directly": "直接提交",
"Submit request": "提交請求",
"Submit Result": "提交結果",
"Submit Time": "提交時間",
"Submitted": "已提交",
......@@ -4961,7 +5034,9 @@
"Supported Applications": "常用套用支援",
"Supported endpoints": "支援的端點",
"Supported Imagine Models": "支援的 Imagine 模型",
"Supported interfaces": "支援的介面",
"Supported modalities": "支援的模態",
"Supported models": "支援的模型",
"Supported operators: eq, ne, gt, gte, lt, lte, in, not_in, contains, not_contains, exists, not_exists. Leave empty to allow all users.": "支援的操作符:eq、ne、gt、gte、lt、lte、in、not_in、contains、not_contains、exists、not_exists。留空則允許所有用戶。",
"Supported parameters": "支援的參數",
"Supported variables": "支援變數",
......@@ -4994,6 +5069,7 @@
"Sync Upstream Models": "同步上游模型",
"Synced upstream models": "同步上游模型",
"Synchronize models and vendors from an upstream source": "從上游源同步模型和供應商",
"Synchronous": "同步執行",
"Syncing prices, please wait...": "正在同步價格,請稍候...",
"Syncing...": "同步中...",
"System": "系統",
......@@ -5146,6 +5222,7 @@
"The site exchange rate is invalid. Prices are shown in USD.": "站點匯率無效,價格以美元顯示。",
"The site is not available at the moment.": "該站點目前不可用。",
"The slug is appended to the URL:": "別名將附加到 URL:",
"The source is unavailable or this browser cannot calculate SHA-256. The gateway checks the published hash during installation.": "原始碼尚不可用,或瀏覽器無法計算 SHA-256。安裝時閘道會核對發布的校驗值。",
"The sync will fetch missing models and vendors from the selected source. Existing records are updated only when you approve conflicts.": "同步將從選定的源獲取缺失的模型和供應商。僅在您批准衝突時才會更新現有記錄。",
"The system always bills in USD. Site currency makes entering and converting prices easier; amounts are converted to USD using the site exchange rate. Switching currencies does not change the actual price. Raw billing expressions always use USD.": "系統底層統一使用美元計價。選擇站點貨幣是為了方便輸入和換算,金額會按站點匯率轉換為美元。切換貨幣不會改變實際價格;原始計費表達式一律使用美元。",
"The Telegram authorization request is invalid or expired.": "Telegram 授權要求無效或已過期。",
......@@ -5156,6 +5233,7 @@
"The two-factor setup has expired or changed. Start setup again.": "兩步驗證設定已過期或變更,請重新設定。",
"The unique identifier for this model": "此模型的唯一標識符",
"The unique name for this vendor": "此供應商的唯一名稱",
"The upstream address this plugin sends requests to. The plugin declares no default, so it must be filled in.": "外掛傳送請求的上游位址。該外掛未宣告預設位址,必須手動填寫。",
"The upstream channel that served the requests": "處理請求的上游渠道",
"The upstream natively supports all three protocols; every selected route is forwarded without conversion.": "上游原生支援三種協議,所選路由均不經轉換直接轉發。",
"The upstream response is valid JSON, but it does not match the OpenAI credit_summary format. The channel balance was not updated.": "上游回應是有效 JSON,但不符合 OpenAI credit_summary 格式,渠道餘額未更新。",
......@@ -5188,6 +5266,8 @@
"This action will permanently remove 2FA protection from your account.": "此操作將永久移除您用戶的 2FA 保護。",
"This announcement will be removed from the list.": "此公告將從列表中移除。",
"This API shortcut will be removed from the list.": "此 API 快捷方式將從列表中移除。",
"This base URL points at a private or local network host. Make sure it is an upstream you control.": "該 Base URL 指向內網或本機位址,請確認這是你可控的上游服務。",
"This base URL uses plain HTTP, so the channel key is sent unencrypted.": "該 Base URL 使用明文 HTTP,渠道金鑰將以未加密方式傳送。",
"This callback URL updates from the slug field and is the value to register with your provider.": "此回呼 URL 會依 slug 欄位即時更新,請將它註冊到你的提供商。",
"This channel has no configured models.": "該渠道沒有設定模型。",
"This channel is not an Ollama channel.": "該渠道不是 Ollama 渠道。",
......@@ -5223,6 +5303,7 @@
"This plan does not allow balance redemption": "該套餐不允許使用餘額兌換",
"This plugin has no factory fallback. Deleting or disabling it makes this platform unavailable.": "此外掛没有內建回落版本,刪除或禁用后该平台将不可用。",
"This plugin path does not resolve within the source repository.": "該外掛路徑並未指向來源儲存庫內的位置。",
"This preview reads static plugin declarations. The gateway validates the plugin during installation.": "此預覽讀取外掛的靜態宣告,安裝時由閘道校驗外掛。",
"This project must be used in compliance with the": "此項目的使用必須遵守",
"This removes {{count}} failed models from this channel. This action cannot be undone.": "此操作將從該渠道移除 {{count}} 個測試失敗的模型,且無法撤銷。",
"This route discovers upstream OpenAI models and cannot be split or matched by client model rules.": "此路由用於探索上游 OpenAI 模型,無法拆分或使用用戶端模型規則配對。",
......@@ -5495,6 +5576,7 @@
"Unit price (local currency / USD)": "單價(本地貨幣 / USD)",
"Unit price (USD)": "單價 (USD)",
"Unit price must be greater than 0": "單價必須大於 0",
"Unit price: {{field}}": "{{field}} 單價",
"Units per USD": "每 USD 單位數",
"Unknown": "未知",
"Unknown device": "未知裝置",
......@@ -5579,6 +5661,7 @@
"Uploading...": "上傳中...",
"Upscale": "放大",
"Upstream": "上游",
"Upstream authentication": "上游驗證方式",
"Upstream did not return reset credit details.": "上游未返回重置次數詳情。",
"Upstream JSON response": "上游 JSON 回應",
"Upstream Model Detection Settings": "偵測上游模型設定",
......@@ -5621,6 +5704,7 @@
"URL to your logo image (optional)": "您的徽標圖片 URL(可選)",
"US dollar (USD)": "美元(USD)",
"Usage": "用量",
"Usage · {{price}}": "用量 · {{price}}",
"Usage at a glance": "用量概覽",
"Usage guide": "使用教學",
"Usage logs": "使用日誌",
......@@ -5643,6 +5727,7 @@
"Use authenticator code": "使用驗證器代碼",
"Use backup code": "使用備用代碼",
"Use Bearer for all protocols": "所有協議統一使用 Bearer",
"Use default": "使用預設值",
"Use disk cache when request body exceeds this size": "請求體超過此大小時使用磁碟緩存",
"Use exact client model names, separated by commas. Prefixes and wildcards are not supported.": "填寫客戶端請求裡的精確 model 名,多個用英文逗號分隔。不支援前綴或萬用字元。",
"Use exact model names such as gpt-4o, or regex rules prefixed with re: such as re:^gemini-.": "可以填寫 gpt-4o 這類精確模型名,也可以填寫 re:^gemini- 這類以 re: 開頭的正則規則。",
......@@ -5674,6 +5759,7 @@
"Used to authenticate with io.net deployment API": "用於 io.net 部署 API 鑒權",
"Used to authenticate with the worker. Leave blank to keep the existing secret.": "用於與 Worker 進行身份驗證。留空以保留現有金鑰。",
"Used to decide the payment flow. Built-in keys include stripe for Stripe and waffo_pancake for Waffo Pancake; other values are sent to Epay as the type parameter.": "用於決定點擊後走哪個支付流程。stripe 走 Stripe,waffo_pancake 走 Waffo Pancake;其他值會作為 Epay 的 type 參數提交。",
"Used when a Task Plugin channel has no API address configured.": "任務外掛管道未填寫 API 位址時使用此預設值。",
"Used:": "已使用:",
"User": "用戶",
"User {{id}}": "用戶 {{id}}",
......@@ -5783,6 +5869,7 @@
"Verifying credentials and pulling stores from your Pancake account...": "正在驗證憑證並從你的 Pancake 用戶拉取店鋪...",
"Verifying your {{provider}} account": "正在驗證 {{provider}} 帳號",
"Version": "版本",
"Version differences": "版本差異",
"Version history": "版本历史",
"Version Overrides": "版本覆蓋",
"Versions": "版本",
......
......@@ -75,6 +75,7 @@
"{{currency}} price per 1M tokens.": "每百万 Token 的价格,单位为 {{currency}}。",
"{{field}} updated to {{value}}": "{{field}} 已更新为 {{value}}",
"{{field}} updated to {{value}} for tag: {{tag}}": "标签「{{tag}}」的 {{field}} 已更新为 {{value}}",
"{{key}} · from {{source}}": "{{key}} · 来自 {{source}}",
"{{key}} · version {{version}} · from {{source}}": "{{key}} · 版本 {{version}} · 来自 {{source}}",
"{{method}} {{route}}": "{{method}} {{route}}",
"{{modality}} not supported": "不支持 {{modality}}",
......@@ -141,6 +142,7 @@
"80,443,8080": "80,443,8080",
"A billing multiplier. Lower ratios mean lower API call costs.": "计费乘数,倍率越低,API 调用费用越低。",
"A focused home for keys, balance, routing, and service health.": "集中展示密钥、余额、路由和服务健康状态。",
"A matching hash confirms the published file, not the safety of its code.": "校验一致仅说明文件与发布版本相符,不代表代码安全。",
"A security operation is already in progress.": "已有安全操作正在进行。",
"A selected model no longer exists. Reload the model list.": "所选模型已不存在,请重新加载模型列表。",
"A vendor with this name already exists.": "此供应商名称已存在。",
......@@ -270,13 +272,17 @@
"Add your API keys, set up channels and configure access permissions": "添加 API 密钥,设置渠道并配置访问权限",
"Added {{count}} model(s)": "已添加 {{count}} 个模型",
"Added {{count}} models from \"{{name}}\"": "已从“{{name}}”添加 {{count}} 个模型",
"Added once per request. Set to 0 for usage-only billing.": "每次请求额外收取一次;不收固定费用时填 0。",
"Added successfully": "新增成功",
"Added to the usage cost. Set to 0 for no additional charge.": "在用量费用基础上加收的金额,不加收时填 0。",
"Additional charge": "加收费用",
"Additional Conditions": "附加条件",
"Additional information": "附加信息",
"Additional Information": "附加信息",
"Additional Limit": "附加额度",
"Additional Limits": "附加额度",
"Additional metered capability": "附加计费能力",
"Additional request domains": "额外访问域名",
"Additional verification required": "需要进一步验证",
"Adjust filters, then search to refresh the logs.": "调整筛选条件,然后搜索以刷新日志。",
"Adjust Quota": "调整额度",
......@@ -349,6 +355,7 @@
"All Must Match (AND)": "全部满足(AND)",
"All nodes": "全部节点",
"All playground messages saved in this browser will be removed. This cannot be undone.": "保存在此浏览器中的所有游乐场消息都将被移除。此操作无法撤销。",
"All requests": "所有请求",
"All requests must include": "所有请求必须携带",
"All results": "全部结果",
"All routes": "全部路由",
......@@ -366,6 +373,7 @@
"Allow accountFilter parameter": "允许 accountFilter 参数",
"Allow balance redemption": "允许余额兑换",
"Allow Claude beta query passthrough": "允许 Claude beta 查询透传",
"Allow clients to query configured prices via `/api/ratio`.": "允许客户端通过 `/api/ratio` 查询配置的价格。",
"Allow clients to query configured ratios via `/api/ratio`.": "允许客户端通过 `/api/ratio` 查询配置的比例。",
"Allow HTTP image requests": "允许 HTTP 图像请求",
"Allow include usage obfuscation passthrough": "允许 include 用量混淆透传",
......@@ -490,6 +498,8 @@
"Append to existing keys": "追加到现有密钥",
"Append value to array / string / object end": "把值追加到数组/字符串/对象末尾",
"appended": "已追加",
"Applicable channels": "适用渠道",
"Applicable conditions": "适用条件",
"Application": "应用",
"Applied {{name}} pricing to {{count}} models": "已将 {{name}} 的定价应用到 {{count}} 个模型",
"Applied changes": "已应用的变更",
......@@ -526,6 +536,7 @@
"Are you sure you want to delete this key? This action cannot be undone.": "您确定要删除此密钥吗?此操作无法撤销。",
"Are you sure you want to disable all enabled keys?": "您确定要禁用所有已启用的密钥吗?",
"Are you sure you want to enable all keys?": "您确定要启用所有密钥吗?",
"Are you sure you want to enable plugin {{name}} ({{key}})?": "确定要启用插件 {{name}}({{key}})吗?",
"Are you sure you want to manually complete this order? The user will be credited with the corresponding quota.": "您确定要手动完成此订单吗?用户将获得相应的配额。",
"Are you sure you want to sign out? You will need to sign in again to access your account.": "您确定要退出登录吗?您需要再次登录才能访问您的账户。",
"Are you sure you want to unbind {{provider}} for this user? The user will no longer be able to log in via this method.": "确定要解绑该用户的 {{provider}} 绑定吗?解绑后该用户将无法通过此方式登录。",
......@@ -584,6 +595,7 @@
"auth.resetPasswordConfirm.retry": "重试 ({{seconds}}s)",
"auth.resetPasswordConfirm.success": "您的密码已成功重置",
"Authentication": "身份验证",
"Authentication for upstream requests; channel credentials may still be used.": "用于调用上游服务的认证方式;插件仍可能使用渠道凭据。",
"Authentication Method": "认证方式",
"Authenticator code": "身份验证器代码",
"Authenticator code or backup code": "认证器验证码或备用码",
......@@ -648,6 +660,7 @@
"Back to login": "返回登录",
"Back to Models": "返回模型",
"Backed up": "已备份",
"Background": "后台执行",
"Background job tracker for queued work.": "队列工作的后台作业跟踪器。",
"Backup Code": "备用代码",
"Backup code must be in format XXXX-XXXX": "备份代码必须为 XXXX-XXXX 格式",
......@@ -891,6 +904,7 @@
"Channel type": "渠道类型",
"Channel type is required": "渠道类型是必填的",
"Channel types": "渠道类型",
"Channel types you can use when binding this plugin.": "绑定此插件时可选择的渠道类型。",
"Channel updated successfully": "渠道更新成功",
"Channel-specific settings (JSON format)": "渠道特定设置(JSON 格式)",
"Channel:": "渠道:",
......@@ -927,6 +941,7 @@
"Check-in successful! Received": "签到成功!获得",
"Checked in": "已签到",
"Checking connection": "检查连接",
"Checking file integrity...": "正在校验文件…",
"Checking name...": "正在检查名称...",
"Checking updates...": "检查更新中...",
"checkout.session.completed": "checkout.session.completed",
......@@ -1178,6 +1193,7 @@
"Connection failed": "连接失败",
"Connection info detected in clipboard": "检测到剪贴板中的连接信息",
"Connection info filled in": "连接信息已填入",
"Connection settings": "连接配置",
"Connection successful": "连接成功",
"Console": "控制台",
"Console area": "控制台区域",
......@@ -1234,12 +1250,15 @@
"Copy All": "全部复制",
"Copy all backup codes": "复制所有备份代码",
"Copy All Codes": "复制所有代码",
"Copy all models": "复制全部模型",
"Copy API key": "复制 API 密钥",
"Copy base URL": "复制 Base URL",
"Copy billing expression": "复制计费表达式",
"Copy callback URL": "复制回调 URL",
"Copy Channel": "复制渠道",
"Copy code": "复制代码",
"Copy Connection Info": "复制连接信息",
"Copy endpoint path": "复制端点路径",
"Copy failed": "复制失败",
"Copy Field": "复制字段",
"Copy Header": "复制请求头",
......@@ -1248,6 +1267,7 @@
"Copy Link": "复制链接",
"Copy model name": "复制模型名称",
"Copy model names": "复制模型名称列表",
"Copy plugin key": "复制插件标识",
"Copy prompt": "复制提示词",
"Copy ready-to-run curl": "复制可直接运行的 curl",
"Copy redemption code": "复制兑换码",
......@@ -1276,6 +1296,7 @@
"Cost = 10 × 0.8 = 8": "费用 = 10 × 0.8 = 8",
"Cost = 10 × 1.0 = 10": "费用 = 10 × 1.0 = 10",
"Cost = model price × that one ratio. Nothing else from the group settings enters the formula.": "费用 = 模型价格 × 这一个倍率。分组设置里的其他项都不参与该公式。",
"Cost calculator": "费用试算",
"Cost in {{currency}} per request, regardless of tokens used.": "每次请求的费用({{currency}}),与 Token 用量无关。",
"Cost in USD per request, regardless of tokens used.": "每请求的美元费用,不考虑使用的令牌数。",
"Cost Tracking": "成本跟踪",
......@@ -1368,8 +1389,10 @@
"Current Password": "当前密码",
"Current password is incorrect.": "当前密码不正确。",
"Current Price": "当前价格",
"Current pricing conditions": "当前计价条件",
"Current quota": "当前额度",
"Current token": "当前令牌",
"Current v{{from}} → install v{{to}}": "当前版本 v{{from}} → 安装版本 v{{to}}",
"Current value": "当前值",
"Current Value": "当前值",
"Current vendor": "当前供应商",
......@@ -1438,8 +1461,10 @@
"Default": "默认",
"Default / range": "默认值 / 范围",
"Default administrator permissions can be overridden for this user.": "可以为此用户覆盖默认管理员权限。",
"Default API address": "默认 API 地址",
"Default API Version *": "默认 API 版本 *",
"Default API version for this channel": "此渠道的默认 API 版本",
"Default base URL": "默认 Base URL",
"Default Bearer": "默认 Bearer",
"Default Collapse Sidebar": "默认折叠侧边栏",
"Default consumption chart": "默认消耗分布图",
......@@ -1578,6 +1603,8 @@
"Disable All": "禁用全部",
"Disable custom task plugins?": "禁用自定义任务插件?",
"Disable on failure": "失败时禁用",
"Disable plugin {{name}} ({{key}})? Requests using this plugin may be affected.": "禁用插件 {{name}}({{key}})?使用此插件的请求可能受到影响。",
"Disable plugin?": "禁用插件?",
"Disable selected channels": "禁用选定的渠道",
"Disable selected models": "禁用选定的模型",
"Disable store passthrough": "禁止透传 store",
......@@ -1674,6 +1701,8 @@
"Duration Settings": "有效期设置",
"Duration Unit": "有效期单位",
"Duration Value": "有效期数值",
"Dynamic declarations cannot be previewed. Retry or review the source below.": "动态生成的声明无法预览。可重试,或查看下方源码。",
"Dynamic operation": "动态操作",
"Dynamic Pricing": "动态计费",
"e.g. ¥ or HK$": "例如,¥ 或 HK$",
"e.g. 401, 403, 429, 500-599": "例如 401、403、429、500-599",
......@@ -1809,6 +1838,7 @@
"Enable Passkey": "启用 Passkey",
"Enable Performance Monitoring": "启用性能监控",
"Enable plugin {{key}}": "启用插件 {{key}}",
"Enable plugin?": "启用插件?",
"Enable rate limiting": "启用速率限制",
"Enable Request Passthrough": "启用请求透传",
"Enable selected channels": "启用选定的渠道",
......@@ -1906,6 +1936,7 @@
"Enter password (8–128 characters)": "输入密码(8–128 个字符)",
"Enter quota in {{currency}}": "输入 {{currency}} 额度",
"Enter quota in tokens": "输入令牌配额",
"Enter sample usage to estimate the cost. Group and request multipliers are not included.": "填写一次请求的用量,查看预计费用。结果未乘以分组倍率和请求规则倍率。",
"Enter secret key": "输入密钥",
"Enter system prompt (user prompt takes priority)": "输入系统提示词(用户提示词优先)",
"Enter tag name (optional)": "输入标签名称(可选)",
......@@ -2017,6 +2048,7 @@
"External operations mode": "对外运营模式",
"External Speed Test": "外部速度测试",
"Extra": "额外",
"Extra destinations beyond the channel API address. The channel address remains accessible.": "渠道 API 地址之外可访问的额外域名;渠道地址本身仍可访问。",
"Extra Notes (Optional)": "额外备注(可选)",
"Extra visible": "额外可见",
"Extra visible to {{group}}": "对 {{group}} 额外可见",
......@@ -2220,7 +2252,10 @@
"Field Path": "字段路径",
"Fields": "字段",
"File": "文件",
"File could not be verified": "文件尚未校验",
"File integrity verified": "文件校验通过",
"File Search": "文件搜索",
"File verification": "文件校验",
"Files to Retain": "保留文件数",
"Fill All Models": "填充所有模型",
"Fill Codex CLI / Claude CLI Templates": "填充 Codex CLI / Claude CLI 模板",
......@@ -2283,6 +2318,7 @@
"Fix Abilities": "修复渠道一致性",
"Fix order": "修复顺序",
"Fixed abilities: {{success}} succeeded, {{fails}} failed": "渠道一致性修复完成:{{success}} 个成功,{{fails}} 个失败",
"Fixed fee per request": "每次请求固定费用",
"Fixed price": "固定价格",
"Fixed price (USD)": "固定价格 (USD)",
"Fixed request price": "固定按次价格",
......@@ -2344,6 +2380,7 @@
"Friendly name to identify this channel": "用于识别此渠道的友好名称",
"From Address": "发件地址",
"From IO.NET deployment": "来自 IO.NET 部署",
"From marketplace index": "来自插件源索引",
"From model redirect, not yet added to models list": "来自模型重定向,尚未加入模型列表",
"Full API Key": "完整 API 密钥",
"Full Base URL (supports": "完整基础 URL (支持",
......@@ -2351,6 +2388,7 @@
"Full input length": "完整输入长度",
"Full JSON": "完整 JSON",
"Full layout": "全屏布局",
"Full source": "完整源码",
"Full upstream catalog": "完整上游目录",
"Full width": "全宽",
"Function calling": "函数调用",
......@@ -2612,6 +2650,7 @@
"Index": "索引",
"Index request failed with HTTP {{status}}": "索引请求失败,HTTP {{status}}",
"Index URL": "索引 URL",
"Information unavailable": "暂时无法读取",
"Inherit global Auto order": "继承全局 Auto 顺序",
"Inherit vendor icon": "继承供应商图标",
"Inherited from {{vendor}}": "继承自 {{vendor}}",
......@@ -2647,6 +2686,7 @@
"Integrations": "集成",
"Integrity check failed": "完整性校验失败",
"Integrity hash": "完整性哈希",
"Integrity verification unavailable in this environment": "当前环境无法校验",
"Inter-group overrides": "分组间覆盖",
"Inter-group ratio overrides": "分组间比例覆盖",
"Interface Language": "界面语言",
......@@ -3126,6 +3166,7 @@
"More": "更多",
"More Apps": "更多",
"more mapping": "更多映射",
"More models ({{count}})": "更多模型({{count}})",
"More templates...": "更多模板...",
"More than 999 days left": "剩余超过 999 天",
"More...": "更多...",
......@@ -3286,6 +3327,7 @@
"No encryption": "无加密",
"No endpoints configured. Switch to JSON mode or add rows to define endpoints.": "未配置端点。切换到 JSON 模式或添加行来定义端点。",
"No endpoints inferred from channels": "未从渠道推导出端点",
"No extra domains declared": "未声明额外域名",
"No FAQ entries available": "暂无 FAQ 条目",
"No FAQ entries yet. Click \"Add FAQ\" to create one.": "暂无常见问题条目。点击“添加常见问题”来创建一个。",
"No files match the accepted types.": "没有文件匹配接受的类型。",
......@@ -3387,6 +3429,8 @@
"No rules yet": "暂无规则",
"No rules yet. Add a group below to get started.": "暂无规则。请在下方添加分组以开始。",
"No separate media pricing configured.": "未配置单独的媒体定价。",
"No source available": "暂无源码",
"No source changes": "源码无变化",
"No status code mappings configured.": "未配置状态码映射。",
"No stores on this merchant yet. Set a return URL and click Create to mint your first pair.": "此商户暂无店铺。设置返回 URL 后点击创建来生成第一组配对。",
"No subscription plans yet": "暂无订阅套餐",
......@@ -3415,6 +3459,7 @@
"No vendor data available": "暂无厂商数据",
"No vendors found": "未找到供应商",
"No verification method is available for this action.": "此操作没有可用的验证方式。",
"No version history": "暂无版本历史",
"No X Found": "未找到 X",
"Node": "节点",
"Node filters": "节点筛选",
......@@ -3424,6 +3469,7 @@
"Non-stream": "非流",
"Non-zero invitation rewards require compliance confirmation in Payment Gateway settings.": "非零邀请奖励需要先在支付网关设置中确认合规条款。",
"None": "无",
"None (plugin declaration)": "无(插件声明)",
"noreply@example.com": "noreply@example.com",
"Normalized:": "已归一化:",
"Not available": "不可用",
......@@ -3431,6 +3477,8 @@
"Not bound": "未绑定",
"Not configured": "未配置",
"Not declared": "未声明",
"Not declared by this plugin": "插件未声明",
"Not declared; an API key may still be required.": "插件未声明认证方式,仍可能需要 API Key。",
"Not Equals": "不等于",
"Not found upstream": "上游未找到",
"Not generated": "未生成",
......@@ -3466,6 +3514,7 @@
"Number of top log probabilities returned per token": "每个 token 返回的 top 概率数量",
"Number of users invited": "已邀请的用户数量",
"OAuth": "OAuth",
"OAuth 2.0 service account": "OAuth 2.0 服务账号",
"OAuth authorization timed out. Please try again.": "OAuth 授权已超时,请重试。",
"OAuth authorization was cancelled.": "OAuth 授权已取消。",
"OAuth binding timed out. Please try again.": "OAuth 绑定超时,请重试。",
......@@ -3595,6 +3644,7 @@
"Optimized network architecture ensures millisecond response times": "优化的网络架构,确保毫秒级响应时间",
"Optional callback override. Leave blank to use server address": "可选的回调覆盖。留空以使用服务器地址",
"Optional icon identifier for the login button": "登录按钮的可选图标标识符",
"Optional icon.svg or icon.png shipped next to plugin.js, up to 512 KiB. Stored separately from the source.": "可选,与 plugin.js 同级的 icon.svg 或 icon.png,最大 512 KiB,与源码分开存储。",
"Optional JSON policy to restrict access based on user info fields": "可选的 JSON 策略,用于基于用户信息字段限制访问",
"Optional minimum recharge amount for this method.": "此方法的可选最低充值金额。",
"Optional multiplier per user group used when calculating recharge pricing. Provide a JSON object such as": "计算充值定价时使用的每个用户分组可选乘数。请提供一个 JSON 对象,例如",
......@@ -3618,6 +3668,7 @@
"Original Model": "原始模型",
"Original value": "原始值",
"Other": "其他",
"Other cases": "其他情况",
"Other channels": "其他渠道",
"Other groups": "其他分组",
"Other models": "其他模型",
......@@ -3884,16 +3935,26 @@
"Please wait for the current generation to complete": "请等待当前生成完成",
"Plugin": "插件",
"Plugin author": "插件作者",
"Plugin default": "插件默认值",
"Plugin details": "插件详情",
"Plugin Generation": "插件运行代次",
"Plugin icon": "插件图标",
"Plugin icon exceeds the 512 KiB limit.": "插件图标超过 512 KiB 限制。",
"Plugin icon must be an .svg or .png file.": "插件图标必须是 .svg 或 .png 文件。",
"Plugin indexes are fetched by your browser. Installing runs the same review and admission pipeline as a manual upload.": "插件索引由你的浏览器拉取。安装时走的审查与准入流程与手动上传完全一致。",
"Plugin installation failed": "插件安装失败",
"Plugin is still in use": "插件仍在使用中",
"Plugin key": "插件键",
"Plugin metadata": "插件元数据",
"Plugin sandbox": "插件沙盒",
"Plugin source": "插件源码",
"Plugin source exceeds the 1 MiB limit.": "插件源码超过 1 MiB 上限。",
"Plugin uploaded successfully": "插件上传成功",
"Plugin version activated": "插件版本已激活",
"Plugin version deleted": "插件版本已删除",
"Plugin website": "插件官网",
"Plugin-defined interfaces": "插件自定义接口",
"Plugins can access channel credentials. Review the source and differences before installing.": "插件可访问渠道凭据。安装前请审查源码与差异。",
"Policy JSON": "策略 JSON",
"Polling": "轮询",
"Polling mode requires Redis and memory cache, otherwise performance will be significantly degraded": "轮询模式需要 Redis 和内存缓存,否则性能将显著下降",
......@@ -3978,13 +4039,17 @@
"Price:": "价格:",
"Price: High to Low": "价格:从高到低",
"Price: Low to High": "价格:从低到高",
"Prices are in {{currency}}, with units shown below. Use USD when editing expressions directly.": "价格以 {{currency}} 计,单位见下方标注。手动编辑表达式时请使用美元。",
"Prices for each set of conditions": "不同条件对应的价格",
"Prices shown per": "价格显示单位",
"Prices shown per usage unit": "价格按每个用量单位显示",
"Prices synced successfully": "价格同步成功",
"Prices vary by usage tier and request conditions": "价格根据用量档位和请求条件动态调整",
"Pricing": "定价",
"Pricing & Display": "定价与显示",
"Pricing by condition": "按条件计价",
"Pricing by Group": "按分组定价",
"Pricing conditions": "计价条件",
"Pricing Configuration": "定价配置",
"Pricing currency": "定价货币",
"Pricing group example": "定价分组示例",
......@@ -4391,6 +4456,7 @@
"Retain last N days": "保留最近N天",
"Retain last N files": "保留最近 N 个文件",
"Retention days": "保留天数",
"Retrieve result": "查询结果",
"Retry": "重试",
"Retry Chain": "重试链路",
"Retry Settings": "重试设置",
......@@ -4681,6 +4747,7 @@
"Select theme preset": "选择主题预设",
"Select time granularity": "选择时间粒度",
"Select vendor": "选择供应商",
"Select version": "选择版本",
"Selectable groups": "可选分组",
"selected": "已选择",
"Selected {{count}}": "已选 {{count}} 个",
......@@ -4688,7 +4755,7 @@
"Selected conflicts were overwritten successfully.": "选中的冲突已成功覆盖。",
"Selected nodes": "已选节点",
"Selected when creating a token and used as the default billing group for API calls.": "创建令牌时选择,用作 API 调用的默认计费分组。",
"Selecting a plugin fills its declared models.": "选择插件后将自动填入其声明的模型。",
"Selecting a plugin fills its declared models and default base URL.": "选择插件后将自动填入其声明的模型和默认 Base URL。",
"Self-Use Mode": "自用模式",
"Send": "发送",
"Send a request": "发送请求",
......@@ -4725,6 +4792,8 @@
"Set filters to narrow down your log search results.": "设置筛选器以缩小日志搜索结果范围。",
"Set Header": "设请求头",
"Set Password": "设置密码",
"Set prices for each set of conditions below. Cost = usage × unit price + additional charge. Token prices are per million tokens.": "为下方不同条件分别填写价格。费用 = 用量 × 单价 + 加收费用;Token 单价按每百万 Token 填写。",
"Set prices for each set of conditions below. Cost = usage × unit price + fixed fee. Token prices are per million tokens.": "为下方不同条件分别填写价格。费用 = 用量 × 单价 + 固定费用;Token 单价按每百万 Token 填写。",
"Set Project to io.cloud when creating/selecting key": "创建/选择密钥时将项目设置为 io.cloud",
"Set quota amount and limits": "设置令牌可用额度和数量",
"Set Request Header": "设置请求头",
......@@ -4825,12 +4894,14 @@
"socks5://user:pass@host:port": "socks5://user:pass@host:port",
"Soft Errors": "软错误",
"Some channels failed: {{errorMsg}}": "部分渠道失败:{{errorMsg}}",
"Some plugin information could not be read": "部分插件信息无法读取",
"Something went wrong!": "出现错误!",
"Sonnet Model": "Sonnet 模型",
"Sora": "Sora",
"Sort": "排序",
"Sort by ID": "使用 ID 排序",
"Sort Order": "排序",
"Sort priority": "排序优先级",
"Source": "来源",
"Source diff": "源码差异",
"Source Endpoint": "来源端点",
......@@ -4860,6 +4931,7 @@
"stale": "失联",
"Standard": "标准",
"Standard price": "标准价格",
"Standard protocol interfaces": "标准协议接口",
"Start": "开始",
"Start ≤ end: within the day; start > end: across midnight": "开始 ≤ 结束为当日区间,开始 > 结束为跨零点区间",
"Start a conversation to see messages here": "开始对话以在此处查看消息",
......@@ -4920,6 +4992,7 @@
"Structured output": "结构化输出",
"Submit": "提交",
"Submit directly": "直接提交",
"Submit request": "提交请求",
"Submit Result": "提交结果",
"Submit Time": "提交时间",
"Submitted": "已提交",
......@@ -4961,7 +5034,9 @@
"Supported Applications": "常用应用支持",
"Supported endpoints": "支持的端点",
"Supported Imagine Models": "支持的 Imagine 模型",
"Supported interfaces": "支持的接口",
"Supported modalities": "支持的模态",
"Supported models": "支持的模型",
"Supported operators: eq, ne, gt, gte, lt, lte, in, not_in, contains, not_contains, exists, not_exists. Leave empty to allow all users.": "支持的操作符:eq、ne、gt、gte、lt、lte、in、not_in、contains、not_contains、exists、not_exists。留空则允许所有用户。",
"Supported parameters": "支持的参数",
"Supported variables": "支持变量",
......@@ -4994,6 +5069,7 @@
"Sync Upstream Models": "同步上游模型",
"Synced upstream models": "同步上游模型",
"Synchronize models and vendors from an upstream source": "从上游源同步模型和供应商",
"Synchronous": "同步执行",
"Syncing prices, please wait...": "正在同步价格,请稍候...",
"Syncing...": "同步中...",
"System": "系统",
......@@ -5146,6 +5222,7 @@
"The site exchange rate is invalid. Prices are shown in USD.": "站点汇率无效,价格以美元显示。",
"The site is not available at the moment.": "该站点目前不可用。",
"The slug is appended to the URL:": "别名将附加到 URL:",
"The source is unavailable or this browser cannot calculate SHA-256. The gateway checks the published hash during installation.": "源码尚不可用,或浏览器无法计算 SHA-256。安装时网关会核对发布的校验值。",
"The sync will fetch missing models and vendors from the selected source. Existing records are updated only when you approve conflicts.": "同步将从选定的源获取缺失的模型和供应商。仅在您批准冲突时才会更新现有记录。",
"The system always bills in USD. Site currency makes entering and converting prices easier; amounts are converted to USD using the site exchange rate. Switching currencies does not change the actual price. Raw billing expressions always use USD.": "系统底层统一使用美元计价。选择站点货币是为了方便输入和换算,金额会按站点汇率转换为美元。切换货币不会改变实际价格;原始计费表达式始终使用美元。",
"The Telegram authorization request is invalid or expired.": "Telegram 授权请求无效或已过期。",
......@@ -5156,6 +5233,7 @@
"The two-factor setup has expired or changed. Start setup again.": "两步验证设置已过期或变更,请重新设置。",
"The unique identifier for this model": "此模型的唯一标识符",
"The unique name for this vendor": "此供应商的唯一名称",
"The upstream address this plugin sends requests to. The plugin declares no default, so it must be filled in.": "插件发送请求的上游地址。该插件未声明默认地址,必须手动填写。",
"The upstream channel that served the requests": "处理请求的上游渠道",
"The upstream natively supports all three protocols; every selected route is forwarded without conversion.": "上游原生支持三种协议,所选路由均不经转换直接转发。",
"The upstream response is valid JSON, but it does not match the OpenAI credit_summary format. The channel balance was not updated.": "上游响应是有效 JSON,但不符合 OpenAI credit_summary 格式,渠道余额未更新。",
......@@ -5188,6 +5266,8 @@
"This action will permanently remove 2FA protection from your account.": "此操作将永久移除您账户的 2FA 保护。",
"This announcement will be removed from the list.": "此公告将从列表中移除。",
"This API shortcut will be removed from the list.": "此 API 快捷方式将从列表中移除。",
"This base URL points at a private or local network host. Make sure it is an upstream you control.": "该 Base URL 指向内网或本机地址,请确认这是你可控的上游服务。",
"This base URL uses plain HTTP, so the channel key is sent unencrypted.": "该 Base URL 使用明文 HTTP,渠道密钥将以未加密方式发送。",
"This callback URL updates from the slug field and is the value to register with your provider.": "此回调 URL 会根据 slug 字段实时更新,请将它注册到你的提供商。",
"This channel has no configured models.": "该渠道没有配置模型。",
"This channel is not an Ollama channel.": "该渠道不是 Ollama 渠道。",
......@@ -5223,6 +5303,7 @@
"This plan does not allow balance redemption": "该套餐不允许使用余额兑换",
"This plugin has no factory fallback. Deleting or disabling it makes this platform unavailable.": "此插件没有出厂回落版本,删除或禁用后该平台将不可用。",
"This plugin path does not resolve within the source repository.": "该插件路径未指向源仓库内的位置。",
"This preview reads static plugin declarations. The gateway validates the plugin during installation.": "此预览读取插件的静态声明,安装时由网关校验插件。",
"This project must be used in compliance with the": "此项目的使用必须遵守",
"This removes {{count}} failed models from this channel. This action cannot be undone.": "此操作将从该渠道移除 {{count}} 个测试失败的模型,且无法撤销。",
"This route discovers upstream OpenAI models and cannot be split or matched by client model rules.": "此路由用于发现上游 OpenAI 模型,不能拆分或使用客户端模型规则匹配。",
......@@ -5495,6 +5576,7 @@
"Unit price (local currency / USD)": "单价(本地货币 / USD)",
"Unit price (USD)": "单价 (USD)",
"Unit price must be greater than 0": "单价必须大于 0",
"Unit price: {{field}}": "{{field}} 单价",
"Units per USD": "每 USD 单位数",
"Unknown": "未知",
"Unknown device": "未知设备",
......@@ -5579,6 +5661,7 @@
"Uploading...": "上传中...",
"Upscale": "放大",
"Upstream": "上游",
"Upstream authentication": "上游认证方式",
"Upstream did not return reset credit details.": "上游未返回重置次数详情。",
"Upstream JSON response": "上游 JSON 响应",
"Upstream Model Detection Settings": "检测上游模型设置",
......@@ -5621,6 +5704,7 @@
"URL to your logo image (optional)": "您的徽标图片 URL(可选)",
"US dollar (USD)": "美元(USD)",
"Usage": "用量",
"Usage · {{price}}": "用量 · {{price}}",
"Usage at a glance": "用量概览",
"Usage guide": "使用教程",
"Usage logs": "使用日志",
......@@ -5643,6 +5727,7 @@
"Use authenticator code": "使用验证器代码",
"Use backup code": "使用备用代码",
"Use Bearer for all protocols": "所有协议统一使用 Bearer",
"Use default": "使用默认值",
"Use disk cache when request body exceeds this size": "请求体超过此大小时使用磁盘缓存",
"Use exact client model names, separated by commas. Prefixes and wildcards are not supported.": "填写客户端请求里的精确 model 名,多个用英文逗号分隔。不支持前缀或通配符。",
"Use exact model names such as gpt-4o, or regex rules prefixed with re: such as re:^gemini-.": "可以填写 gpt-4o 这类精确模型名,也可以填写 re:^gemini- 这类以 re: 开头的正则规则。",
......@@ -5674,6 +5759,7 @@
"Used to authenticate with io.net deployment API": "用于 io.net 部署 API 鉴权",
"Used to authenticate with the worker. Leave blank to keep the existing secret.": "用于与 Worker 进行身份验证。留空以保留现有密钥。",
"Used to decide the payment flow. Built-in keys include stripe for Stripe and waffo_pancake for Waffo Pancake; other values are sent to Epay as the type parameter.": "用于决定点击后走哪个支付流程。stripe 走 Stripe,waffo_pancake 走 Waffo Pancake;其他值会作为 Epay 的 type 参数提交。",
"Used when a Task Plugin channel has no API address configured.": "任务插件渠道未填写 API 地址时使用此默认值。",
"Used:": "已使用:",
"User": "用户",
"User {{id}}": "用户 {{id}}",
......@@ -5783,6 +5869,7 @@
"Verifying credentials and pulling stores from your Pancake account...": "正在验证凭证并从你的 Pancake 账户拉取店铺...",
"Verifying your {{provider}} account": "正在验证 {{provider}} 账号",
"Version": "版本",
"Version differences": "版本差异",
"Version history": "版本历史",
"Version Overrides": "版本覆盖",
"Versions": "版本",
......
......@@ -52,6 +52,23 @@ Object.defineProperty(window, 'matchMedia', {
}),
})
// jsdom does not implement Range geometry. CodeMirror measures text through
// these browser APIs; actual wrapping and scrolling are checked in browser QA.
if (!Range.prototype.getClientRects) {
Object.defineProperty(Range.prototype, 'getClientRects', {
configurable: true,
writable: true,
value: () => [],
})
}
if (!Range.prototype.getBoundingClientRect) {
Object.defineProperty(Range.prototype, 'getBoundingClientRect', {
configurable: true,
writable: true,
value: () => new DOMRect(),
})
}
window.requestAnimationFrame = (callback: FrameRequestCallback) =>
window.setTimeout(() => callback(performance.now()), 0)
window.cancelAnimationFrame = (handle: number) => window.clearTimeout(handle)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment