mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-18 08:20:59 +00:00
chore: merge master into dev/4.11.x
This commit is contained in:
@@ -48,6 +48,7 @@
|
||||
"@radix-ui/react-scroll-area": "^1.2.9",
|
||||
"@radix-ui/react-select": "^2.2.4",
|
||||
"@radix-ui/react-separator": "^1.1.8",
|
||||
"@radix-ui/react-slider": "^1.4.7",
|
||||
"@radix-ui/react-slot": "^1.2.3",
|
||||
"@radix-ui/react-switch": "^1.2.4",
|
||||
"@radix-ui/react-tabs": "^1.1.11",
|
||||
|
||||
Generated
+540
-534
File diff suppressed because it is too large
Load Diff
@@ -146,6 +146,7 @@ function getValueSchema(spec: DynamicFormValueSpec) {
|
||||
return z.object({
|
||||
primary: z.string(),
|
||||
fallbacks: z.array(z.string()),
|
||||
reasoning: z.record(z.string()),
|
||||
});
|
||||
case DynamicFormItemType.PROMPT_EDITOR:
|
||||
return z.array(
|
||||
@@ -497,12 +498,24 @@ export default function DynamicFormComponent({
|
||||
(v): v is string => typeof v === 'string',
|
||||
)
|
||||
: [],
|
||||
reasoning:
|
||||
obj.reasoning != null &&
|
||||
typeof obj.reasoning === 'object' &&
|
||||
!Array.isArray(obj.reasoning)
|
||||
? Object.fromEntries(
|
||||
Object.entries(obj.reasoning).filter(
|
||||
(entry): entry is [string, string] =>
|
||||
typeof entry[1] === 'string',
|
||||
),
|
||||
)
|
||||
: {},
|
||||
};
|
||||
}
|
||||
// Legacy string format or any other unexpected type
|
||||
return {
|
||||
primary: typeof value === 'string' ? value : '',
|
||||
fallbacks: [],
|
||||
reasoning: {},
|
||||
};
|
||||
}
|
||||
if (item.type === 'prompt-editor') {
|
||||
|
||||
@@ -25,6 +25,7 @@ import {
|
||||
EmbeddingModel,
|
||||
RerankModel,
|
||||
PluginTool,
|
||||
ReasoningLevel,
|
||||
} from '@/app/infra/entities/api';
|
||||
import { toast } from 'sonner';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
@@ -67,6 +68,9 @@ import SettingsDialog, {
|
||||
} from '@/app/home/components/settings-dialog/SettingsDialog';
|
||||
import ToolResourceSelectors from '@/app/home/components/dynamic-form/ToolResourceSelectors';
|
||||
import { LANGBOT_MODELS_PROVIDER_REQUESTER } from '@/app/home/components/models-dialog/types';
|
||||
import ReasoningLevelPicker, {
|
||||
REASONING_LEVELS,
|
||||
} from '@/app/home/components/reasoning/ReasoningLevelPicker';
|
||||
|
||||
function hasUsableUuid<T extends { uuid?: string | null }>(
|
||||
item: T,
|
||||
@@ -990,7 +994,11 @@ export default function DynamicFormItemComponent({
|
||||
];
|
||||
|
||||
const rawModelValue = field.value;
|
||||
const modelValue: { primary: string; fallbacks: string[] } =
|
||||
const modelValue: {
|
||||
primary: string;
|
||||
fallbacks: string[];
|
||||
reasoning: Record<string, ReasoningLevel>;
|
||||
} =
|
||||
rawModelValue != null &&
|
||||
typeof rawModelValue === 'object' &&
|
||||
!Array.isArray(rawModelValue)
|
||||
@@ -1009,10 +1017,29 @@ export default function DynamicFormItemComponent({
|
||||
.fallbacks as unknown[]
|
||||
).filter((v): v is string => typeof v === 'string')
|
||||
: [],
|
||||
reasoning:
|
||||
(rawModelValue as Record<string, unknown>).reasoning != null &&
|
||||
typeof (rawModelValue as Record<string, unknown>).reasoning ===
|
||||
'object' &&
|
||||
!Array.isArray(
|
||||
(rawModelValue as Record<string, unknown>).reasoning,
|
||||
)
|
||||
? (Object.fromEntries(
|
||||
Object.entries(
|
||||
(rawModelValue as Record<string, unknown>)
|
||||
.reasoning as Record<string, unknown>,
|
||||
).filter(
|
||||
(entry): entry is [string, ReasoningLevel] =>
|
||||
typeof entry[1] === 'string' &&
|
||||
REASONING_LEVELS.includes(entry[1] as ReasoningLevel),
|
||||
),
|
||||
) as Record<string, ReasoningLevel>)
|
||||
: {},
|
||||
}
|
||||
: {
|
||||
primary: typeof rawModelValue === 'string' ? rawModelValue : '',
|
||||
fallbacks: [],
|
||||
reasoning: {},
|
||||
};
|
||||
|
||||
const renderModelSelect = (
|
||||
@@ -1159,20 +1186,79 @@ export default function DynamicFormItemComponent({
|
||||
field.onChange({ ...modelValue, ...patch });
|
||||
};
|
||||
|
||||
const updateModelReasoning = (
|
||||
modelUuid: string,
|
||||
level: ReasoningLevel,
|
||||
) => {
|
||||
if (!modelUuid) return;
|
||||
const updated = { ...modelValue.reasoning };
|
||||
if (level === 'provider_default') {
|
||||
delete updated[modelUuid];
|
||||
} else {
|
||||
updated[modelUuid] = level;
|
||||
}
|
||||
updateValue({ reasoning: updated });
|
||||
};
|
||||
|
||||
const replaceModel = (
|
||||
currentUuid: string,
|
||||
nextUuid: string,
|
||||
patch: Partial<typeof modelValue>,
|
||||
) => {
|
||||
const nextValue = { ...modelValue, ...patch };
|
||||
const updatedReasoning = { ...modelValue.reasoning };
|
||||
const currentModelStillSelected =
|
||||
nextValue.primary === currentUuid ||
|
||||
nextValue.fallbacks.includes(currentUuid);
|
||||
if (
|
||||
currentUuid &&
|
||||
currentUuid !== nextUuid &&
|
||||
!currentModelStillSelected
|
||||
) {
|
||||
delete updatedReasoning[currentUuid];
|
||||
}
|
||||
updateValue({ ...nextValue, reasoning: updatedReasoning });
|
||||
};
|
||||
|
||||
const renderReasoningPicker = (modelUuid: string) => {
|
||||
if (!modelUuid) return null;
|
||||
const model = llmModels.find(
|
||||
(candidate) => candidate.uuid === modelUuid,
|
||||
);
|
||||
const currentLevel =
|
||||
modelValue.reasoning[modelUuid] || 'provider_default';
|
||||
const availableLevels = model?.reasoning_capabilities?.levels || [
|
||||
'provider_default',
|
||||
];
|
||||
const levels = REASONING_LEVELS.filter(
|
||||
(level) => availableLevels.includes(level) || level === currentLevel,
|
||||
);
|
||||
|
||||
return (
|
||||
<ReasoningLevelPicker
|
||||
value={currentLevel}
|
||||
levels={levels}
|
||||
onChange={(level) => updateModelReasoning(modelUuid, level)}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
const addFallbackModel = () => {
|
||||
updateValue({ fallbacks: [...modelValue.fallbacks, ''] });
|
||||
};
|
||||
|
||||
const updateFallbackModel = (index: number, value: string) => {
|
||||
const updated = [...modelValue.fallbacks];
|
||||
const currentUuid = updated[index];
|
||||
updated[index] = value;
|
||||
updateValue({ fallbacks: updated });
|
||||
replaceModel(currentUuid, value, { fallbacks: updated });
|
||||
};
|
||||
|
||||
const removeFallbackModel = (index: number) => {
|
||||
const updated = [...modelValue.fallbacks];
|
||||
const removedUuid = updated[index];
|
||||
updated.splice(index, 1);
|
||||
updateValue({ fallbacks: updated });
|
||||
replaceModel(removedUuid, '', { fallbacks: updated });
|
||||
};
|
||||
|
||||
const moveFallbackModel = (index: number, direction: 'up' | 'down') => {
|
||||
@@ -1197,10 +1283,12 @@ export default function DynamicFormItemComponent({
|
||||
<div className="min-w-0 flex-1">
|
||||
{renderModelSelect(
|
||||
modelValue.primary,
|
||||
(val) => updateValue({ primary: val }),
|
||||
(val) =>
|
||||
replaceModel(modelValue.primary, val, { primary: val }),
|
||||
t('models.selectModel'),
|
||||
)}
|
||||
</div>
|
||||
{renderReasoningPicker(modelValue.primary)}
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<Button
|
||||
@@ -1234,15 +1322,18 @@ export default function DynamicFormItemComponent({
|
||||
</p>
|
||||
{modelValue.fallbacks.map((fbUuid: string, index: number) => (
|
||||
<div key={index} className="flex min-w-0 items-center gap-2">
|
||||
<span className="text-xs text-muted-foreground w-4 shrink-0">
|
||||
<span className="w-4 shrink-0 text-xs text-muted-foreground">
|
||||
{index + 1}.
|
||||
</span>
|
||||
<div className="min-w-0 flex-1">
|
||||
{renderModelSelect(
|
||||
fbUuid,
|
||||
(val) => updateFallbackModel(index, val),
|
||||
t('models.selectModel'),
|
||||
)}
|
||||
<div className="flex min-w-0 flex-1 items-center gap-1.5">
|
||||
<div className="min-w-0 flex-1">
|
||||
{renderModelSelect(
|
||||
fbUuid,
|
||||
(val) => updateFallbackModel(index, val),
|
||||
t('models.selectModel'),
|
||||
)}
|
||||
</div>
|
||||
{renderReasoningPicker(fbUuid)}
|
||||
</div>
|
||||
<div className="flex gap-1 shrink-0">
|
||||
<Button
|
||||
|
||||
@@ -5,6 +5,56 @@ export type DynamicFormSaveValueSpec = Pick<
|
||||
'default' | 'name' | 'type'
|
||||
>;
|
||||
|
||||
const reasoningLevels = new Set([
|
||||
'disabled',
|
||||
'enabled',
|
||||
'minimal',
|
||||
'low',
|
||||
'medium',
|
||||
'high',
|
||||
'xhigh',
|
||||
'max',
|
||||
]);
|
||||
|
||||
function normalizeModelFallbackValue(value: unknown): {
|
||||
primary: string;
|
||||
fallbacks: string[];
|
||||
reasoning: Record<string, string>;
|
||||
} {
|
||||
const raw =
|
||||
value != null && typeof value === 'object' && !Array.isArray(value)
|
||||
? (value as Record<string, unknown>)
|
||||
: {};
|
||||
const primary =
|
||||
typeof raw.primary === 'string'
|
||||
? raw.primary
|
||||
: typeof value === 'string'
|
||||
? value
|
||||
: '';
|
||||
const fallbacks = Array.isArray(raw.fallbacks)
|
||||
? raw.fallbacks.filter(
|
||||
(fallback): fallback is string => typeof fallback === 'string',
|
||||
)
|
||||
: [];
|
||||
const selectedModels = new Set([primary, ...fallbacks].filter(Boolean));
|
||||
const rawReasoning =
|
||||
raw.reasoning != null &&
|
||||
typeof raw.reasoning === 'object' &&
|
||||
!Array.isArray(raw.reasoning)
|
||||
? (raw.reasoning as Record<string, unknown>)
|
||||
: {};
|
||||
const reasoning = Object.fromEntries(
|
||||
Object.entries(rawReasoning).filter(
|
||||
([modelUuid, level]) =>
|
||||
selectedModels.has(modelUuid) &&
|
||||
typeof level === 'string' &&
|
||||
reasoningLevels.has(level),
|
||||
),
|
||||
) as Record<string, string>;
|
||||
|
||||
return { primary, fallbacks, reasoning };
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the value snapshot emitted to parent forms for persistence.
|
||||
* Only single-line string fields trim surrounding whitespace; multiline text
|
||||
@@ -16,10 +66,14 @@ export function normalizeDynamicFormValuesForSave(
|
||||
): Record<string, unknown> {
|
||||
return specs.reduce<Record<string, unknown>>((values, spec) => {
|
||||
const value = formValues[spec.name] ?? spec.default;
|
||||
values[spec.name] =
|
||||
spec.type === 'string' && typeof value === 'string'
|
||||
? value.trim()
|
||||
: value;
|
||||
if (spec.type === 'model-fallback-selector') {
|
||||
values[spec.name] = normalizeModelFallbackValue(value);
|
||||
} else {
|
||||
values[spec.name] =
|
||||
spec.type === 'string' && typeof value === 'string'
|
||||
? value.trim()
|
||||
: value;
|
||||
}
|
||||
return values;
|
||||
}, {});
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useState, useEffect } from 'react';
|
||||
import { Plus, Boxes } from 'lucide-react';
|
||||
import { httpClient, systemInfo } from '@/app/infra/http/HttpClient';
|
||||
import { ModelProvider } from '@/app/infra/entities/api';
|
||||
import { ModelProvider, ReasoningConfig } from '@/app/infra/entities/api';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
@@ -15,6 +15,7 @@ import ProviderForm from './component/provider-form/ProviderForm';
|
||||
import { ProviderCard } from './components';
|
||||
import {
|
||||
ExtraArg,
|
||||
DEFAULT_REASONING_CONFIG,
|
||||
ModelType,
|
||||
ScanModelsResult,
|
||||
SelectedScannedModel,
|
||||
@@ -285,6 +286,7 @@ export default function ModelsPanel({
|
||||
name: string,
|
||||
abilities: string[],
|
||||
extraArgs: ExtraArg[],
|
||||
reasoningConfig: ReasoningConfig,
|
||||
contextLength?: number | null,
|
||||
) {
|
||||
if (!name.trim()) {
|
||||
@@ -300,6 +302,7 @@ export default function ModelsPanel({
|
||||
name,
|
||||
provider_uuid: providerUuid,
|
||||
abilities,
|
||||
reasoning_config: reasoningConfig,
|
||||
context_length: parseContextLength(
|
||||
contextLength,
|
||||
t('models.contextLengthInvalid'),
|
||||
@@ -361,6 +364,7 @@ export default function ModelsPanel({
|
||||
name: item.model.name,
|
||||
provider_uuid: providerUuid,
|
||||
abilities: item.abilities,
|
||||
reasoning_config: DEFAULT_REASONING_CONFIG,
|
||||
context_length: item.model.context_length ?? null,
|
||||
extra_args: {},
|
||||
} as never);
|
||||
@@ -398,6 +402,7 @@ export default function ModelsPanel({
|
||||
name: string,
|
||||
abilities: string[],
|
||||
extraArgs: ExtraArg[],
|
||||
reasoningConfig: ReasoningConfig,
|
||||
contextLength?: number | null,
|
||||
) {
|
||||
if (!name.trim()) {
|
||||
@@ -413,6 +418,7 @@ export default function ModelsPanel({
|
||||
name,
|
||||
provider_uuid: providerUuid,
|
||||
abilities,
|
||||
reasoning_config: reasoningConfig,
|
||||
context_length: parseContextLength(
|
||||
contextLength,
|
||||
t('models.contextLengthInvalid'),
|
||||
@@ -469,6 +475,7 @@ export default function ModelsPanel({
|
||||
modelType: ModelType,
|
||||
abilities: string[],
|
||||
extraArgs: ExtraArg[],
|
||||
reasoningConfig: ReasoningConfig,
|
||||
) {
|
||||
setIsTesting(true);
|
||||
setTestResult(null);
|
||||
@@ -491,6 +498,7 @@ export default function ModelsPanel({
|
||||
provider_uuid: '',
|
||||
provider: providerData,
|
||||
abilities,
|
||||
reasoning_config: reasoningConfig,
|
||||
extra_args: extraArgsObj,
|
||||
} as never);
|
||||
} else if (modelType === 'embedding') {
|
||||
@@ -554,13 +562,21 @@ export default function ModelsPanel({
|
||||
onSpaceLogin={handleSpaceLogin}
|
||||
onOpenAddModel={() => setAddModelPopoverOpen(provider.uuid)}
|
||||
onCloseAddModel={() => setAddModelPopoverOpen(null)}
|
||||
onAddModel={(modelType, name, abilities, extraArgs, contextLength) =>
|
||||
onAddModel={(
|
||||
modelType,
|
||||
name,
|
||||
abilities,
|
||||
extraArgs,
|
||||
reasoningConfig,
|
||||
contextLength,
|
||||
) =>
|
||||
handleAddModel(
|
||||
provider.uuid,
|
||||
modelType,
|
||||
name,
|
||||
abilities,
|
||||
extraArgs,
|
||||
reasoningConfig,
|
||||
contextLength,
|
||||
)
|
||||
}
|
||||
@@ -576,6 +592,7 @@ export default function ModelsPanel({
|
||||
name,
|
||||
abilities,
|
||||
extraArgs,
|
||||
reasoningConfig,
|
||||
contextLength,
|
||||
) =>
|
||||
handleUpdateModel(
|
||||
@@ -585,6 +602,7 @@ export default function ModelsPanel({
|
||||
name,
|
||||
abilities,
|
||||
extraArgs,
|
||||
reasoningConfig,
|
||||
contextLength,
|
||||
)
|
||||
}
|
||||
@@ -593,8 +611,15 @@ export default function ModelsPanel({
|
||||
onDeleteModel={(modelId, modelType) =>
|
||||
handleDeleteModel(provider.uuid, modelId, modelType)
|
||||
}
|
||||
onTestModel={(name, modelType, abilities, extraArgs) =>
|
||||
handleTestModel(provider.uuid, name, modelType, abilities, extraArgs)
|
||||
onTestModel={(name, modelType, abilities, extraArgs, reasoningConfig) =>
|
||||
handleTestModel(
|
||||
provider.uuid,
|
||||
name,
|
||||
modelType,
|
||||
abilities,
|
||||
extraArgs,
|
||||
reasoningConfig,
|
||||
)
|
||||
}
|
||||
isSubmitting={isSubmitting}
|
||||
isTesting={isTesting}
|
||||
|
||||
@@ -6,6 +6,7 @@ import {
|
||||
ArrowUpDown,
|
||||
Eye,
|
||||
Wrench,
|
||||
BrainCircuit,
|
||||
Check,
|
||||
RefreshCw,
|
||||
} from 'lucide-react';
|
||||
@@ -20,8 +21,12 @@ import {
|
||||
} from '@/components/ui/popover';
|
||||
import { Tabs, TabsList, TabsTrigger } from '@/components/ui/tabs';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { ScannedProviderModel } from '@/app/infra/entities/api';
|
||||
import {
|
||||
ReasoningConfig,
|
||||
ScannedProviderModel,
|
||||
} from '@/app/infra/entities/api';
|
||||
import {
|
||||
DEFAULT_REASONING_CONFIG,
|
||||
ExtraArg,
|
||||
ModelType,
|
||||
ScanModelsResult,
|
||||
@@ -42,6 +47,7 @@ interface AddModelPopoverProps {
|
||||
name: string,
|
||||
abilities: string[],
|
||||
extraArgs: ExtraArg[],
|
||||
reasoningConfig: ReasoningConfig,
|
||||
contextLength?: number | null,
|
||||
) => Promise<void>;
|
||||
onScanModels: (modelType?: ModelType) => Promise<ScanModelsResult>;
|
||||
@@ -54,6 +60,7 @@ interface AddModelPopoverProps {
|
||||
modelType: ModelType,
|
||||
abilities: string[],
|
||||
extraArgs: ExtraArg[],
|
||||
reasoningConfig: ReasoningConfig,
|
||||
) => Promise<void>;
|
||||
isSubmitting: boolean;
|
||||
isTesting: boolean;
|
||||
@@ -143,11 +150,24 @@ export default function AddModelPopover({
|
||||
tab === 'llm' && contextLength.trim()
|
||||
? Number(contextLength.trim())
|
||||
: null;
|
||||
await onAddModel(tab, name, abilities, extraArgs, parsedContextLength);
|
||||
await onAddModel(
|
||||
tab,
|
||||
name,
|
||||
abilities,
|
||||
extraArgs,
|
||||
DEFAULT_REASONING_CONFIG,
|
||||
parsedContextLength,
|
||||
);
|
||||
};
|
||||
|
||||
const handleTest = async () => {
|
||||
await onTestModel(name, tab, tab === 'llm' ? abilities : [], extraArgs);
|
||||
await onTestModel(
|
||||
name,
|
||||
tab,
|
||||
tab === 'llm' ? abilities : [],
|
||||
extraArgs,
|
||||
DEFAULT_REASONING_CONFIG,
|
||||
);
|
||||
};
|
||||
|
||||
const handleScan = async () => {
|
||||
@@ -322,7 +342,7 @@ export default function AddModelPopover({
|
||||
{tab === 'llm' && (
|
||||
<div className="space-y-2">
|
||||
<Label>{t('models.abilities')}</Label>
|
||||
<div className="flex gap-4">
|
||||
<div className="flex flex-wrap gap-4">
|
||||
<div className="flex items-center gap-2">
|
||||
<Checkbox
|
||||
id="add-vision"
|
||||
@@ -349,6 +369,19 @@ export default function AddModelPopover({
|
||||
{t('models.functionCallAbility')}
|
||||
</Label>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
<Checkbox
|
||||
id="add-reasoning"
|
||||
checked={abilities.includes('reasoning')}
|
||||
onCheckedChange={(checked) =>
|
||||
toggleAbility('reasoning', checked as boolean)
|
||||
}
|
||||
/>
|
||||
<Label htmlFor="add-reasoning" className="text-sm">
|
||||
<BrainCircuit className="h-3 w-3 inline mr-1" />
|
||||
{t('models.reasoningAbility')}
|
||||
</Label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useState, useEffect } from 'react';
|
||||
import { Trash2, Eye, Wrench, Check } from 'lucide-react';
|
||||
import { Trash2, Eye, Wrench, Check, BrainCircuit } from 'lucide-react';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { Label } from '@/components/ui/label';
|
||||
@@ -11,8 +11,17 @@ import {
|
||||
PopoverTrigger,
|
||||
} from '@/components/ui/popover';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { LLMModel, EmbeddingModel } from '@/app/infra/entities/api';
|
||||
import { ExtraArg, ModelType, TestResult } from '../types';
|
||||
import {
|
||||
LLMModel,
|
||||
EmbeddingModel,
|
||||
ReasoningConfig,
|
||||
} from '@/app/infra/entities/api';
|
||||
import {
|
||||
DEFAULT_REASONING_CONFIG,
|
||||
ExtraArg,
|
||||
ModelType,
|
||||
TestResult,
|
||||
} from '../types';
|
||||
import ExtraArgsEditor from './ExtraArgsEditor';
|
||||
import { userInfo } from '@/app/infra/http';
|
||||
|
||||
@@ -32,12 +41,14 @@ interface ModelItemProps {
|
||||
name: string,
|
||||
abilities: string[],
|
||||
extraArgs: ExtraArg[],
|
||||
reasoningConfig: ReasoningConfig,
|
||||
contextLength?: number | null,
|
||||
) => Promise<void>;
|
||||
onTestModel: (
|
||||
name: string,
|
||||
abilities: string[],
|
||||
extraArgs: ExtraArg[],
|
||||
reasoningConfig: ReasoningConfig,
|
||||
) => Promise<void>;
|
||||
isSubmitting: boolean;
|
||||
isTesting: boolean;
|
||||
@@ -103,7 +114,6 @@ export default function ModelItem({
|
||||
const [editExtraArgs, setEditExtraArgs] = useState<ExtraArg[]>(
|
||||
convertExtraArgsToArray(model.extra_args),
|
||||
);
|
||||
|
||||
const isEditOpen = editModelPopoverOpen === model.uuid;
|
||||
const isDeleteOpen = deleteConfirmOpen === model.uuid;
|
||||
|
||||
@@ -133,12 +143,20 @@ export default function ModelItem({
|
||||
editName,
|
||||
editAbilities,
|
||||
editExtraArgs,
|
||||
modelType === 'llm'
|
||||
? (model as LLMModel).reasoning_config || DEFAULT_REASONING_CONFIG
|
||||
: DEFAULT_REASONING_CONFIG,
|
||||
parsedContextLength,
|
||||
);
|
||||
};
|
||||
|
||||
const handleTest = async () => {
|
||||
await onTestModel(editName, editAbilities, editExtraArgs);
|
||||
await onTestModel(
|
||||
editName,
|
||||
editAbilities,
|
||||
editExtraArgs,
|
||||
DEFAULT_REASONING_CONFIG,
|
||||
);
|
||||
};
|
||||
|
||||
const toggleAbility = (ability: string, checked: boolean) => {
|
||||
@@ -149,6 +167,12 @@ export default function ModelItem({
|
||||
}
|
||||
};
|
||||
|
||||
const supportsReasoning =
|
||||
modelType === 'llm' &&
|
||||
((model as LLMModel).reasoning_capabilities?.supported === true ||
|
||||
(model as LLMModel).abilities?.includes('reasoning'));
|
||||
const canSaveModel = !isLangBotModels;
|
||||
|
||||
// Check if popover should be disabled (space models when not logged in)
|
||||
const isPopoverDisabled =
|
||||
!canManage || (isLangBotModels && userInfo?.account_type !== 'space');
|
||||
@@ -194,6 +218,12 @@ export default function ModelItem({
|
||||
<Wrench className="h-3 w-3" />
|
||||
</Badge>
|
||||
)}
|
||||
{supportsReasoning && (
|
||||
<Badge variant="outline" className="text-xs gap-1">
|
||||
<BrainCircuit className="h-3 w-3" />
|
||||
{t('models.reasoningAbility')}
|
||||
</Badge>
|
||||
)}
|
||||
</div>
|
||||
{canManage && !isLangBotModels && (
|
||||
<Popover
|
||||
@@ -270,7 +300,7 @@ export default function ModelItem({
|
||||
{modelType === 'llm' && (
|
||||
<div className="space-y-2">
|
||||
<Label>{t('models.abilities')}</Label>
|
||||
<div className="flex gap-4">
|
||||
<div className="flex flex-wrap gap-4">
|
||||
<div className="flex items-center gap-2">
|
||||
<Checkbox
|
||||
id={`edit-vision-${model.uuid}`}
|
||||
@@ -305,6 +335,23 @@ export default function ModelItem({
|
||||
{t('models.functionCallAbility')}
|
||||
</Label>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
<Checkbox
|
||||
id={`edit-reasoning-${model.uuid}`}
|
||||
checked={editAbilities.includes('reasoning')}
|
||||
disabled={isLangBotModels}
|
||||
onCheckedChange={(checked) =>
|
||||
toggleAbility('reasoning', checked as boolean)
|
||||
}
|
||||
/>
|
||||
<Label
|
||||
htmlFor={`edit-reasoning-${model.uuid}`}
|
||||
className="text-sm"
|
||||
>
|
||||
<BrainCircuit className="h-3 w-3 inline mr-1" />
|
||||
{t('models.reasoningAbility')}
|
||||
</Label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
@@ -336,7 +383,7 @@ export default function ModelItem({
|
||||
/>
|
||||
|
||||
<div className="flex gap-2">
|
||||
{!isLangBotModels && (
|
||||
{canSaveModel && (
|
||||
<Button
|
||||
className="flex-1"
|
||||
size="sm"
|
||||
@@ -347,7 +394,7 @@ export default function ModelItem({
|
||||
</Button>
|
||||
)}
|
||||
<Button
|
||||
className={isLangBotModels ? 'w-full' : 'flex-1'}
|
||||
className={canSaveModel ? 'flex-1' : 'w-full'}
|
||||
size="sm"
|
||||
variant="outline"
|
||||
onClick={handleTest}
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
Radar,
|
||||
} from 'lucide-react';
|
||||
import { httpClient, systemInfo } from '@/app/infra/http/HttpClient';
|
||||
import { ModelProvider } from '@/app/infra/entities/api';
|
||||
import { ModelProvider, ReasoningConfig } from '@/app/infra/entities/api';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import {
|
||||
Collapsible,
|
||||
@@ -63,6 +63,7 @@ interface ProviderCardProps {
|
||||
name: string,
|
||||
abilities: string[],
|
||||
extraArgs: ExtraArg[],
|
||||
reasoningConfig: ReasoningConfig,
|
||||
contextLength?: number | null,
|
||||
) => Promise<void>;
|
||||
onScanModels: (modelType?: ModelType) => Promise<ScanModelsResult>;
|
||||
@@ -78,6 +79,7 @@ interface ProviderCardProps {
|
||||
name: string,
|
||||
abilities: string[],
|
||||
extraArgs: ExtraArg[],
|
||||
reasoningConfig: ReasoningConfig,
|
||||
contextLength?: number | null,
|
||||
) => Promise<void>;
|
||||
onOpenDeleteConfirm: (modelId: string) => void;
|
||||
@@ -88,6 +90,7 @@ interface ProviderCardProps {
|
||||
modelType: ModelType,
|
||||
abilities: string[],
|
||||
extraArgs: ExtraArg[],
|
||||
reasoningConfig: ReasoningConfig,
|
||||
) => Promise<void>;
|
||||
isSubmitting: boolean;
|
||||
isTesting: boolean;
|
||||
@@ -432,6 +435,7 @@ export default function ProviderCard({
|
||||
name,
|
||||
abilities,
|
||||
extraArgs,
|
||||
reasoningConfig,
|
||||
contextLength,
|
||||
) =>
|
||||
onUpdateModel(
|
||||
@@ -440,11 +444,23 @@ export default function ProviderCard({
|
||||
name,
|
||||
abilities,
|
||||
extraArgs,
|
||||
reasoningConfig,
|
||||
contextLength,
|
||||
)
|
||||
}
|
||||
onTestModel={(name, abilities, extraArgs) =>
|
||||
onTestModel(name, 'llm', abilities, extraArgs)
|
||||
onTestModel={(
|
||||
name,
|
||||
abilities,
|
||||
extraArgs,
|
||||
reasoningConfig,
|
||||
) =>
|
||||
onTestModel(
|
||||
name,
|
||||
'llm',
|
||||
abilities,
|
||||
extraArgs,
|
||||
reasoningConfig,
|
||||
)
|
||||
}
|
||||
isSubmitting={isSubmitting}
|
||||
isTesting={isTesting}
|
||||
@@ -466,17 +482,34 @@ export default function ProviderCard({
|
||||
onOpenDeleteConfirm={onOpenDeleteConfirm}
|
||||
onCloseDeleteConfirm={onCloseDeleteConfirm}
|
||||
onDeleteModel={() => onDeleteModel(model.uuid, 'embedding')}
|
||||
onUpdateModel={(name, abilities, extraArgs) =>
|
||||
onUpdateModel={(
|
||||
name,
|
||||
abilities,
|
||||
extraArgs,
|
||||
reasoningConfig,
|
||||
) =>
|
||||
onUpdateModel(
|
||||
model.uuid,
|
||||
'embedding',
|
||||
name,
|
||||
abilities,
|
||||
extraArgs,
|
||||
reasoningConfig,
|
||||
)
|
||||
}
|
||||
onTestModel={(name, abilities, extraArgs) =>
|
||||
onTestModel(name, 'embedding', abilities, extraArgs)
|
||||
onTestModel={(
|
||||
name,
|
||||
abilities,
|
||||
extraArgs,
|
||||
reasoningConfig,
|
||||
) =>
|
||||
onTestModel(
|
||||
name,
|
||||
'embedding',
|
||||
abilities,
|
||||
extraArgs,
|
||||
reasoningConfig,
|
||||
)
|
||||
}
|
||||
isSubmitting={isSubmitting}
|
||||
isTesting={isTesting}
|
||||
@@ -498,17 +531,34 @@ export default function ProviderCard({
|
||||
onOpenDeleteConfirm={onOpenDeleteConfirm}
|
||||
onCloseDeleteConfirm={onCloseDeleteConfirm}
|
||||
onDeleteModel={() => onDeleteModel(model.uuid, 'rerank')}
|
||||
onUpdateModel={(name, abilities, extraArgs) =>
|
||||
onUpdateModel={(
|
||||
name,
|
||||
abilities,
|
||||
extraArgs,
|
||||
reasoningConfig,
|
||||
) =>
|
||||
onUpdateModel(
|
||||
model.uuid,
|
||||
'rerank',
|
||||
name,
|
||||
abilities,
|
||||
extraArgs,
|
||||
reasoningConfig,
|
||||
)
|
||||
}
|
||||
onTestModel={(name, abilities, extraArgs) =>
|
||||
onTestModel(name, 'rerank', abilities, extraArgs)
|
||||
onTestModel={(
|
||||
name,
|
||||
abilities,
|
||||
extraArgs,
|
||||
reasoningConfig,
|
||||
) =>
|
||||
onTestModel(
|
||||
name,
|
||||
'rerank',
|
||||
abilities,
|
||||
extraArgs,
|
||||
reasoningConfig,
|
||||
)
|
||||
}
|
||||
isSubmitting={isSubmitting}
|
||||
isTesting={isTesting}
|
||||
|
||||
@@ -5,6 +5,7 @@ import {
|
||||
ModelProvider,
|
||||
ProviderScanDebugInfo,
|
||||
ScannedProviderModel,
|
||||
ReasoningConfig,
|
||||
} from '@/app/infra/entities/api';
|
||||
|
||||
export type ExtraArg = {
|
||||
@@ -16,6 +17,10 @@ export type ExtraArg = {
|
||||
|
||||
export type ModelType = 'llm' | 'embedding' | 'rerank';
|
||||
|
||||
export const DEFAULT_REASONING_CONFIG: ReasoningConfig = {
|
||||
level: 'provider_default',
|
||||
};
|
||||
|
||||
export interface ProviderModels {
|
||||
llm: LLMModel[];
|
||||
embedding: EmbeddingModel[];
|
||||
@@ -53,12 +58,14 @@ export interface ModelItemProps {
|
||||
name: string,
|
||||
abilities: string[],
|
||||
extraArgs: ExtraArg[],
|
||||
reasoningConfig: ReasoningConfig,
|
||||
contextLength?: number | null,
|
||||
) => Promise<void>;
|
||||
onTest: (
|
||||
name: string,
|
||||
abilities: string[],
|
||||
extraArgs: ExtraArg[],
|
||||
reasoningConfig: ReasoningConfig,
|
||||
) => Promise<void>;
|
||||
isSubmitting: boolean;
|
||||
isTesting: boolean;
|
||||
@@ -90,6 +97,7 @@ export interface ProviderCardProps {
|
||||
name: string,
|
||||
abilities: string[],
|
||||
extraArgs: ExtraArg[],
|
||||
reasoningConfig: ReasoningConfig,
|
||||
contextLength?: number | null,
|
||||
) => Promise<void>;
|
||||
onScanModels: (modelType?: ModelType) => Promise<ScanModelsResult>;
|
||||
@@ -105,6 +113,7 @@ export interface ProviderCardProps {
|
||||
name: string,
|
||||
abilities: string[],
|
||||
extraArgs: ExtraArg[],
|
||||
reasoningConfig: ReasoningConfig,
|
||||
contextLength?: number | null,
|
||||
) => Promise<void>;
|
||||
onOpenDeleteConfirm: (modelId: string) => void;
|
||||
@@ -115,6 +124,7 @@ export interface ProviderCardProps {
|
||||
modelType: ModelType,
|
||||
abilities: string[],
|
||||
extraArgs: ExtraArg[],
|
||||
reasoningConfig: ReasoningConfig,
|
||||
) => Promise<void>;
|
||||
isSubmitting: boolean;
|
||||
isTesting: boolean;
|
||||
|
||||
@@ -15,6 +15,7 @@ import {
|
||||
XCircle,
|
||||
} from 'lucide-react';
|
||||
import QRCode from 'qrcode';
|
||||
import { getActiveWorkspaceUuid } from '@/app/infra/http/workspaceContext';
|
||||
|
||||
export type QrLoginPlatform =
|
||||
| 'feishu'
|
||||
@@ -55,12 +56,12 @@ const PLATFORM_CONFIGS: Record<QrLoginPlatform, PlatformConfig> = {
|
||||
},
|
||||
weixin: {
|
||||
titleKey: 'weixin.scanLogin',
|
||||
connectingKey: 'feishu.connecting',
|
||||
connectingKey: 'weixin.connecting',
|
||||
scanQRCodeKey: 'weixin.scanQRCode',
|
||||
waitingKey: 'feishu.waitingForScan',
|
||||
waitingKey: 'weixin.waitingForScan',
|
||||
successKey: 'weixin.loginSuccess',
|
||||
failedKey: 'weixin.loginFailed',
|
||||
retryKey: 'feishu.retry',
|
||||
retryKey: 'weixin.retry',
|
||||
apiBase: '/api/v1/platform/adapters/weixin/login',
|
||||
extractSuccess: (data) => ({
|
||||
token: data.token,
|
||||
@@ -146,6 +147,8 @@ export default function QrCodeLoginDialog({
|
||||
const checkExpiredRef = useRef<ReturnType<typeof setInterval> | null>(null);
|
||||
const abortRef = useRef<AbortController | null>(null);
|
||||
const sessionIdRef = useRef<string | null>(null);
|
||||
const sessionWorkspaceUuidRef = useRef<string | null>(null);
|
||||
const sessionApiBaseRef = useRef('');
|
||||
const baseUrlRef = useRef('');
|
||||
const cleanedRef = useRef(false);
|
||||
|
||||
@@ -180,18 +183,23 @@ export default function QrCodeLoginDialog({
|
||||
}
|
||||
if (sessionIdRef.current) {
|
||||
const token = localStorage.getItem('token');
|
||||
const baseUrl =
|
||||
import.meta.env.VITE_API_BASE_URL || window.location.origin;
|
||||
const workspaceUuid = sessionWorkspaceUuidRef.current;
|
||||
fetch(
|
||||
`${baseUrl}${platformConfigRef.current.apiBase}/${sessionIdRef.current}`,
|
||||
`${baseUrlRef.current}${sessionApiBaseRef.current}/${sessionIdRef.current}`,
|
||||
{
|
||||
method: 'DELETE',
|
||||
headers: { Authorization: `Bearer ${token}` },
|
||||
headers: {
|
||||
Authorization: `Bearer ${token}`,
|
||||
...(workspaceUuid ? { 'X-Workspace-Id': workspaceUuid } : {}),
|
||||
},
|
||||
keepalive: true,
|
||||
},
|
||||
).catch(() => {});
|
||||
sessionIdRef.current = null;
|
||||
}
|
||||
sessionWorkspaceUuidRef.current = null;
|
||||
sessionApiBaseRef.current = '';
|
||||
baseUrlRef.current = '';
|
||||
}, []);
|
||||
|
||||
const startLogin = useCallback(async () => {
|
||||
@@ -204,6 +212,7 @@ export default function QrCodeLoginDialog({
|
||||
setSuccessMeta('');
|
||||
|
||||
const token = localStorage.getItem('token');
|
||||
const workspaceUuid = getActiveWorkspaceUuid();
|
||||
const baseUrl = import.meta.env.VITE_API_BASE_URL || window.location.origin;
|
||||
baseUrlRef.current = baseUrl;
|
||||
const cfg = platformConfigRef.current;
|
||||
@@ -214,7 +223,10 @@ export default function QrCodeLoginDialog({
|
||||
|
||||
const res = await fetch(`${baseUrl}${cfg.apiBase}`, {
|
||||
method: 'POST',
|
||||
headers: { Authorization: `Bearer ${token}` },
|
||||
headers: {
|
||||
Authorization: `Bearer ${token}`,
|
||||
...(workspaceUuid ? { 'X-Workspace-Id': workspaceUuid } : {}),
|
||||
},
|
||||
signal: controller.signal,
|
||||
});
|
||||
|
||||
@@ -225,6 +237,8 @@ export default function QrCodeLoginDialog({
|
||||
|
||||
const { session_id, qr_data_url, qr_url, expire_at } = json.data;
|
||||
sessionIdRef.current = session_id;
|
||||
sessionWorkspaceUuidRef.current = workspaceUuid;
|
||||
sessionApiBaseRef.current = cfg.apiBase;
|
||||
|
||||
if (qr_data_url) {
|
||||
setQrDataUrl(qr_data_url);
|
||||
@@ -270,11 +284,19 @@ export default function QrCodeLoginDialog({
|
||||
`${baseUrlRef.current}${cfg.apiBase}/${sessionIdRef.current}`,
|
||||
{
|
||||
method: 'DELETE',
|
||||
headers: { Authorization: `Bearer ${token}` },
|
||||
headers: {
|
||||
Authorization: `Bearer ${token}`,
|
||||
...(workspaceUuid
|
||||
? { 'X-Workspace-Id': workspaceUuid }
|
||||
: {}),
|
||||
},
|
||||
keepalive: true,
|
||||
},
|
||||
).catch(() => {});
|
||||
sessionIdRef.current = null;
|
||||
sessionWorkspaceUuidRef.current = null;
|
||||
sessionApiBaseRef.current = '';
|
||||
baseUrlRef.current = '';
|
||||
}
|
||||
setState('expired');
|
||||
}
|
||||
@@ -286,7 +308,12 @@ export default function QrCodeLoginDialog({
|
||||
try {
|
||||
const pollRes = await fetch(
|
||||
`${baseUrl}${cfg.apiBase}/status/${session_id}`,
|
||||
{ headers: { Authorization: `Bearer ${token}` } },
|
||||
{
|
||||
headers: {
|
||||
Authorization: `Bearer ${token}`,
|
||||
...(workspaceUuid ? { 'X-Workspace-Id': workspaceUuid } : {}),
|
||||
},
|
||||
},
|
||||
);
|
||||
if (!pollRes.ok) return;
|
||||
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
import { BrainCircuit, ChevronDown, ChevronRight } from 'lucide-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { ReasoningLevel } from '@/app/infra/entities/api';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import {
|
||||
Popover,
|
||||
PopoverContent,
|
||||
PopoverTrigger,
|
||||
} from '@/components/ui/popover';
|
||||
import { Slider } from '@/components/ui/slider';
|
||||
|
||||
export const REASONING_LEVELS: ReasoningLevel[] = [
|
||||
'provider_default',
|
||||
'disabled',
|
||||
'enabled',
|
||||
'minimal',
|
||||
'low',
|
||||
'medium',
|
||||
'high',
|
||||
'xhigh',
|
||||
'max',
|
||||
];
|
||||
|
||||
export const REASONING_LEVEL_LABEL_KEYS: Record<ReasoningLevel, string> = {
|
||||
provider_default: 'models.reasoningLevels.providerDefault',
|
||||
disabled: 'models.reasoningLevels.disabled',
|
||||
enabled: 'models.reasoningLevels.enabled',
|
||||
minimal: 'models.reasoningLevels.minimal',
|
||||
low: 'models.reasoningLevels.low',
|
||||
medium: 'models.reasoningLevels.medium',
|
||||
high: 'models.reasoningLevels.high',
|
||||
xhigh: 'models.reasoningLevels.xhigh',
|
||||
max: 'models.reasoningLevels.max',
|
||||
};
|
||||
|
||||
interface ReasoningLevelPickerProps {
|
||||
value: ReasoningLevel;
|
||||
levels: ReasoningLevel[];
|
||||
disabled?: boolean;
|
||||
onChange: (value: ReasoningLevel) => void;
|
||||
}
|
||||
|
||||
export default function ReasoningLevelPicker({
|
||||
value,
|
||||
levels,
|
||||
disabled = false,
|
||||
onChange,
|
||||
}: ReasoningLevelPickerProps) {
|
||||
const { t } = useTranslation();
|
||||
const safeLevels: ReasoningLevel[] =
|
||||
levels.length > 0 ? levels : ['provider_default'];
|
||||
const safeValue: ReasoningLevel = safeLevels.includes(value)
|
||||
? value
|
||||
: safeLevels[0];
|
||||
const currentLabel = t(REASONING_LEVEL_LABEL_KEYS[safeValue]);
|
||||
const isExplicit = safeValue !== 'provider_default';
|
||||
const currentIndex = Math.max(0, safeLevels.indexOf(safeValue));
|
||||
|
||||
return (
|
||||
<Popover>
|
||||
<PopoverTrigger asChild>
|
||||
<Button
|
||||
type="button"
|
||||
variant="outline"
|
||||
size="sm"
|
||||
disabled={disabled || safeLevels.length <= 1}
|
||||
aria-label={`${t('models.reasoningLevel')}: ${currentLabel}`}
|
||||
className="h-9 w-9 shrink-0 gap-1.5 px-2.5 text-xs font-normal sm:w-auto sm:max-w-36"
|
||||
>
|
||||
<BrainCircuit
|
||||
className={`size-4 shrink-0 ${isExplicit ? 'text-primary' : 'text-muted-foreground'}`}
|
||||
/>
|
||||
<span className="hidden min-w-0 truncate sm:block">
|
||||
{currentLabel}
|
||||
</span>
|
||||
<ChevronDown className="hidden size-3.5 shrink-0 text-muted-foreground sm:block" />
|
||||
</Button>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent align="end" className="w-[272px] p-4">
|
||||
<div className="flex h-5 items-center gap-0.5 text-sm text-muted-foreground">
|
||||
<span>{currentLabel}</span>
|
||||
<ChevronRight className="size-3.5" />
|
||||
</div>
|
||||
<Slider
|
||||
className="mt-5"
|
||||
min={0}
|
||||
max={Math.max(0, safeLevels.length - 1)}
|
||||
step={1}
|
||||
value={[currentIndex]}
|
||||
aria-label={t('models.reasoningLevel')}
|
||||
aria-valuetext={currentLabel}
|
||||
onValueChange={([index]) => onChange(safeLevels[index])}
|
||||
/>
|
||||
</PopoverContent>
|
||||
</Popover>
|
||||
);
|
||||
}
|
||||
@@ -57,6 +57,7 @@ function PluginListView() {
|
||||
const [debugInfo, setDebugInfo] = useState<{
|
||||
debug_url: string;
|
||||
plugin_debug_key: string;
|
||||
expires_at: string;
|
||||
} | null>(null);
|
||||
const [debugPopoverOpen, setDebugPopoverOpen] = useState(false);
|
||||
const [copiedDebugUrl, setCopiedDebugUrl] = useState(false);
|
||||
@@ -275,6 +276,13 @@ function PluginListView() {
|
||||
)}
|
||||
</Button>
|
||||
</div>
|
||||
{debugInfo?.expires_at && (
|
||||
<p className="text-xs text-muted-foreground pl-[58px]">
|
||||
{t('plugins.debugKeyExpires', {
|
||||
time: new Date(debugInfo.expires_at).toLocaleString(),
|
||||
})}
|
||||
</p>
|
||||
)}
|
||||
{!debugInfo?.plugin_debug_key && (
|
||||
<p className="text-xs text-muted-foreground ml-[58px]">
|
||||
{t('plugins.debugKeyDisabled')}
|
||||
|
||||
@@ -99,9 +99,33 @@ export interface LLMModel {
|
||||
provider?: ModelProvider;
|
||||
abilities?: string[];
|
||||
context_length?: number | null;
|
||||
reasoning_config?: ReasoningConfig;
|
||||
reasoning_capabilities?: ReasoningCapabilities;
|
||||
extra_args?: object;
|
||||
}
|
||||
|
||||
export type ReasoningLevel =
|
||||
| 'provider_default'
|
||||
| 'disabled'
|
||||
| 'enabled'
|
||||
| 'minimal'
|
||||
| 'low'
|
||||
| 'medium'
|
||||
| 'high'
|
||||
| 'xhigh'
|
||||
| 'max';
|
||||
|
||||
export interface ReasoningConfig {
|
||||
level: ReasoningLevel;
|
||||
}
|
||||
|
||||
export interface ReasoningCapabilities {
|
||||
supported: boolean;
|
||||
levels: ReasoningLevel[];
|
||||
legacy_levels?: ReasoningLevel[];
|
||||
source: 'litellm' | 'provider' | 'manual' | 'unknown';
|
||||
}
|
||||
|
||||
export interface ApiRespProviderEmbeddingModels {
|
||||
models: EmbeddingModel[];
|
||||
}
|
||||
|
||||
@@ -1193,6 +1193,7 @@ export class BackendClient extends BaseHttpClient {
|
||||
public getPluginDebugInfo(): Promise<{
|
||||
debug_url: string;
|
||||
plugin_debug_key: string;
|
||||
expires_at: string;
|
||||
}> {
|
||||
return this.get('/api/v1/plugins/debug-info');
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
import * as React from 'react';
|
||||
import * as SliderPrimitive from '@radix-ui/react-slider';
|
||||
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
const Slider = React.forwardRef<
|
||||
React.ComponentRef<typeof SliderPrimitive.Root>,
|
||||
React.ComponentPropsWithoutRef<typeof SliderPrimitive.Root>
|
||||
>(({ className, ...props }, ref) => (
|
||||
<SliderPrimitive.Root
|
||||
ref={ref}
|
||||
data-slot="slider"
|
||||
className={cn(
|
||||
'relative flex w-full touch-none select-none items-center data-[disabled]:opacity-50',
|
||||
className,
|
||||
)}
|
||||
{...props}
|
||||
>
|
||||
<SliderPrimitive.Track
|
||||
data-slot="slider-track"
|
||||
className="relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20"
|
||||
>
|
||||
<SliderPrimitive.Range
|
||||
data-slot="slider-range"
|
||||
className="absolute h-full bg-primary"
|
||||
/>
|
||||
</SliderPrimitive.Track>
|
||||
<SliderPrimitive.Thumb
|
||||
data-slot="slider-thumb"
|
||||
className="block size-4 shrink-0 rounded-full border border-primary/50 bg-background shadow transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"
|
||||
/>
|
||||
</SliderPrimitive.Root>
|
||||
));
|
||||
Slider.displayName = SliderPrimitive.Root.displayName;
|
||||
|
||||
export { Slider };
|
||||
@@ -87,18 +87,18 @@ const enUS = {
|
||||
'Recommended: Use official stable model APIs and cloud services',
|
||||
loginLocal: 'Login with local account',
|
||||
loginWithPassword: 'Login with password',
|
||||
spaceLoginTitle: 'Login with Space',
|
||||
spaceLoginTitle: 'Login with LangBot Account',
|
||||
spaceLoginDescription:
|
||||
'Scan the QR code or visit the link below to authorize',
|
||||
spaceLoginUserCode: 'Your code',
|
||||
spaceLoginExpires: 'Code expires in {{seconds}} seconds',
|
||||
spaceLoginWaiting: 'Waiting for authorization...',
|
||||
spaceLoginSuccess: 'Authorization successful',
|
||||
spaceLoginFailed: 'Space login failed',
|
||||
spaceLoginFailed: 'LangBot Account login failed',
|
||||
spaceLoginExpired: 'Authorization code expired, please try again',
|
||||
spaceLoginCancel: 'Cancel',
|
||||
spaceLoginVisitLink: 'Visit link',
|
||||
spaceLoginProcessing: 'Logging in with Space',
|
||||
spaceLoginProcessing: 'Logging in with LangBot Account',
|
||||
spaceLoginProcessingDescription:
|
||||
'Please wait while we complete your login...',
|
||||
spaceLoginSuccessDescription: 'Redirecting to LangBot...',
|
||||
@@ -107,7 +107,7 @@ const enUS = {
|
||||
backToLogin: 'Back to Login',
|
||||
backToHome: 'Back to Home',
|
||||
spaceAccountCannotChangePassword:
|
||||
'Space accounts cannot change password here',
|
||||
'LangBot Accounts cannot change password here',
|
||||
theme: 'Theme',
|
||||
changePassword: 'Change Password',
|
||||
currentPassword: 'Current Password',
|
||||
@@ -216,6 +216,19 @@ const enUS = {
|
||||
selectModelAbilities: 'Select model abilities',
|
||||
visionAbility: 'Vision Ability',
|
||||
functionCallAbility: 'Function Call',
|
||||
reasoningAbility: 'Reasoning',
|
||||
reasoningLevel: 'Reasoning level',
|
||||
reasoningLevels: {
|
||||
providerDefault: 'Provider default',
|
||||
disabled: 'Off',
|
||||
enabled: 'On',
|
||||
minimal: 'Minimal',
|
||||
low: 'Low',
|
||||
medium: 'Medium',
|
||||
high: 'High',
|
||||
xhigh: 'Extra high',
|
||||
max: 'Maximum',
|
||||
},
|
||||
contextLength: 'Context Window',
|
||||
contextLengthPlaceholder: 'Unknown',
|
||||
contextLengthInvalid: 'Context window must be a positive integer',
|
||||
@@ -243,8 +256,9 @@ const enUS = {
|
||||
llmModels: 'LLM Models',
|
||||
localProvider: 'Local',
|
||||
localProviderDescription: 'Models configured and managed locally',
|
||||
spaceProviderDescription: 'Models synced from your Space account',
|
||||
spaceDisabledForLocalAccount: 'Login with Space to use cloud models',
|
||||
spaceProviderDescription: 'Models synced from your LangBot Account',
|
||||
spaceDisabledForLocalAccount:
|
||||
'Login with LangBot Account to use cloud models',
|
||||
syncModels: 'Sync',
|
||||
syncSuccess: 'Sync complete: {{created}} created, {{updated}} updated',
|
||||
syncError: 'Sync failed: ',
|
||||
@@ -280,15 +294,15 @@ const enUS = {
|
||||
langbotModelsDescription: 'Cloud models powered by LangBot Space',
|
||||
credits: 'Credits',
|
||||
loginWithSpace: 'Login with LangBot Account',
|
||||
loginToUseModels: 'Login with Space to use cloud models',
|
||||
loginToUseModels: 'Login with LangBot Account to use cloud models',
|
||||
ownerMustBindSpace:
|
||||
'The Workspace owner must connect Space for LangBot Models.',
|
||||
'The Workspace owner must connect a LangBot Account for LangBot Models.',
|
||||
usesOwnerSpaceBilling:
|
||||
"Uses the Workspace owner's Space billing and credits.",
|
||||
"Uses the Workspace owner's LangBot Account billing and credits.",
|
||||
noModels: 'No models configured',
|
||||
langbotModels: 'LangBot Models',
|
||||
spaceTrialTooltip:
|
||||
'Free trial credits available! Login with Space to access cloud models with zero configuration.',
|
||||
'Free trial credits available! Login with LangBot Account to access cloud models with zero configuration.',
|
||||
unlockModels: 'Login to use',
|
||||
editProvider: 'Edit Provider',
|
||||
addProvider: 'Add Provider',
|
||||
@@ -769,9 +783,9 @@ const enUS = {
|
||||
debugInfoTitle: 'Plugin Debug Information',
|
||||
debugUrl: 'Debug URL',
|
||||
debugKey: 'Debug Key',
|
||||
debugKeyExpires: 'Rotates at {{time}}; each Workspace has a different key',
|
||||
noDebugKey: '(Not Set)',
|
||||
debugKeyDisabled:
|
||||
'Debug key is not set, plugin debugging does not require authentication',
|
||||
debugKeyDisabled: 'Debug credential is temporarily unavailable',
|
||||
boxStatusTitle: 'Box Runtime',
|
||||
boxStatus: 'Status',
|
||||
boxConnected: 'Connected',
|
||||
@@ -1455,13 +1469,13 @@ const enUS = {
|
||||
adminAccountNote:
|
||||
'The account you use here will be set as the administrator account',
|
||||
register: 'Register',
|
||||
initWithSpace: 'Initialize with Space',
|
||||
initWithSpace: 'Initialize with LangBot Account',
|
||||
spaceRecommended:
|
||||
'Recommended: Use official stable model APIs and cloud services',
|
||||
spaceInfoTip1:
|
||||
'Space provides unified account authentication services without uploading any of your sensitive information.',
|
||||
spaceInfoTip2:
|
||||
'Logging in with a Space account gives you access to LangBot Models and other cloud services, including free model call credits to help you get started quickly.',
|
||||
'Logging in with a LangBot Account gives you access to LangBot Models and other cloud services, including free model call credits to help you get started quickly.',
|
||||
spaceInfoTip3:
|
||||
'Your login method does not affect other features. You can configure and use models from other sources at any time.',
|
||||
registerLocal: 'Register local account',
|
||||
@@ -1518,32 +1532,32 @@ const enUS = {
|
||||
passwordNotSet: 'Not Set',
|
||||
passwordSetDescription:
|
||||
'Password is set, you can login with email and password',
|
||||
spaceStatus: 'Space Account',
|
||||
spaceStatus: 'LangBot Account',
|
||||
spaceBound: 'Bound',
|
||||
spaceNotBound: 'Not Bound',
|
||||
spaceBoundDescription:
|
||||
'Space account bound, official model APIs and cloud services available',
|
||||
bindSpace: 'Bind Space Account',
|
||||
'LangBot Account bound, official model APIs and cloud services available',
|
||||
bindSpace: 'Bind LangBot Account',
|
||||
bindSpaceDescription: 'Bind to use official model APIs and cloud services',
|
||||
bindSpaceButton: 'Bind',
|
||||
bindSpaceConfirmTitle: 'Confirm Binding',
|
||||
bindSpaceConfirmDescription:
|
||||
'You are about to bind your local instance to a Space account',
|
||||
'You are about to bind your local instance to a LangBot Account',
|
||||
bindSpaceWarning:
|
||||
'After binding, your login email will be changed from {{localEmail}} to the Space account email.',
|
||||
bindSpaceSuccess: 'Space account bound successfully',
|
||||
bindSpaceFailed: 'Failed to bind Space account',
|
||||
'After binding, your login email will be changed from {{localEmail}} to the LangBot Account email.',
|
||||
bindSpaceSuccess: 'LangBot Account bound successfully',
|
||||
bindSpaceFailed: 'Failed to bind LangBot Account',
|
||||
bindSpaceInvalidState:
|
||||
'Invalid bind request. Please try again from account settings.',
|
||||
setPasswordHint: 'Set a password to login with email and password',
|
||||
spaceEmailMismatch:
|
||||
'The Space login email does not match the local account email.',
|
||||
'The LangBot Account login email does not match the local account email.',
|
||||
space_account_not_registeredTitle: 'Account not registered',
|
||||
space_account_not_registered:
|
||||
'No local account is registered for this Space email. Ask the Workspace owner for an invitation.',
|
||||
space_account_binding_requiredTitle: 'Space connection required',
|
||||
'No local account is registered for this LangBot Account email. Ask the Workspace owner for an invitation.',
|
||||
space_account_binding_requiredTitle: 'LangBot Account connection required',
|
||||
space_account_binding_required:
|
||||
'This local account must connect Space from Account settings before using Space login.',
|
||||
'This local account must connect a LangBot Account from Account settings before using LangBot Account login.',
|
||||
},
|
||||
workspace: {
|
||||
title: 'Workspace',
|
||||
@@ -2044,7 +2058,6 @@ const enUS = {
|
||||
botCreateSuccess: 'Bot created successfully!',
|
||||
botSaveSuccess: 'Bot configuration saved and enabled!',
|
||||
createError: 'Failed to create resources',
|
||||
spaceAuthError: 'Failed to initiate Space authorization',
|
||||
skipSaveError: 'Failed to save skip status. Please try again.',
|
||||
completeSaveError: 'Failed to save completion status. Please try again.',
|
||||
step: {
|
||||
@@ -2202,6 +2215,9 @@ const enUS = {
|
||||
'Scan the QR code below with WeChat to authorize and automatically fill in the token',
|
||||
loginSuccess: 'Login successful! Token has been filled in',
|
||||
loginFailed: 'Login failed',
|
||||
connecting: 'Connecting to WeChat service...',
|
||||
waitingForScan: 'Waiting for scan',
|
||||
retry: 'Retry',
|
||||
},
|
||||
dingtalk: {
|
||||
createApp: 'One-Click Create DingTalk App',
|
||||
|
||||
@@ -88,19 +88,19 @@ const esES = {
|
||||
'Recomendado: Usa API de modelos oficiales estables y servicios en la nube',
|
||||
loginLocal: 'Iniciar sesión con cuenta local',
|
||||
loginWithPassword: 'Iniciar sesión con contraseña',
|
||||
spaceLoginTitle: 'Iniciar sesión con Space',
|
||||
spaceLoginTitle: 'Iniciar sesión con una cuenta de LangBot',
|
||||
spaceLoginDescription:
|
||||
'Escanea el código QR o visita el enlace para autorizar',
|
||||
spaceLoginUserCode: 'Tu código',
|
||||
spaceLoginExpires: 'El código expira en {{seconds}} segundos',
|
||||
spaceLoginWaiting: 'Esperando autorización...',
|
||||
spaceLoginSuccess: 'Autorización exitosa',
|
||||
spaceLoginFailed: 'Error de inicio de sesión con Space',
|
||||
spaceLoginFailed: 'Error de inicio de sesión con una cuenta de LangBot',
|
||||
spaceLoginExpired:
|
||||
'El código de autorización ha expirado, por favor inténtalo de nuevo',
|
||||
spaceLoginCancel: 'Cancelar',
|
||||
spaceLoginVisitLink: 'Visitar enlace',
|
||||
spaceLoginProcessing: 'Iniciando sesión con Space',
|
||||
spaceLoginProcessing: 'Iniciando sesión con una cuenta de LangBot',
|
||||
spaceLoginProcessingDescription:
|
||||
'Por favor espera mientras completamos tu inicio de sesión...',
|
||||
spaceLoginSuccessDescription: 'Redirigiendo a LangBot...',
|
||||
@@ -109,7 +109,7 @@ const esES = {
|
||||
backToLogin: 'Volver al inicio de sesión',
|
||||
backToHome: 'Volver al inicio',
|
||||
spaceAccountCannotChangePassword:
|
||||
'Las cuentas de Space no pueden cambiar la contraseña aquí',
|
||||
'Las cuentas de LangBot no pueden cambiar la contraseña aquí',
|
||||
theme: 'Tema',
|
||||
changePassword: 'Cambiar contraseña',
|
||||
currentPassword: 'Contraseña actual',
|
||||
@@ -220,6 +220,19 @@ const esES = {
|
||||
selectModelAbilities: 'Seleccionar capacidades del modelo',
|
||||
visionAbility: 'Capacidad de visión',
|
||||
functionCallAbility: 'Llamada a funciones',
|
||||
reasoningAbility: 'Razonamiento',
|
||||
reasoningLevel: 'Nivel de razonamiento',
|
||||
reasoningLevels: {
|
||||
providerDefault: 'Predeterminado del proveedor',
|
||||
disabled: 'Desactivado',
|
||||
enabled: 'Activado',
|
||||
minimal: 'Mínimo',
|
||||
low: 'Bajo',
|
||||
medium: 'Medio',
|
||||
high: 'Alto',
|
||||
xhigh: 'Extra alto',
|
||||
max: 'Máximo',
|
||||
},
|
||||
contextLength: 'Ventana de contexto',
|
||||
contextLengthPlaceholder: 'Desconocido',
|
||||
contextLengthInvalid: 'La ventana de contexto debe ser un entero positivo',
|
||||
@@ -248,9 +261,10 @@ const esES = {
|
||||
llmModels: 'Modelos LLM',
|
||||
localProvider: 'Local',
|
||||
localProviderDescription: 'Modelos configurados y gestionados localmente',
|
||||
spaceProviderDescription: 'Modelos sincronizados desde tu cuenta de Space',
|
||||
spaceProviderDescription:
|
||||
'Modelos sincronizados desde tu cuenta de LangBot',
|
||||
spaceDisabledForLocalAccount:
|
||||
'Inicia sesión con Space para usar modelos en la nube',
|
||||
'Inicia sesión con una cuenta de LangBot para usar modelos en la nube',
|
||||
syncModels: 'Sincronizar',
|
||||
syncSuccess:
|
||||
'Sincronización completa: {{created}} creados, {{updated}} actualizados',
|
||||
@@ -289,11 +303,12 @@ const esES = {
|
||||
langbotModelsDescription: 'Modelos en la nube impulsados por LangBot Space',
|
||||
credits: 'Créditos',
|
||||
loginWithSpace: 'Iniciar sesión con una cuenta de LangBot',
|
||||
loginToUseModels: 'Inicia sesión con Space para usar modelos en la nube',
|
||||
loginToUseModels:
|
||||
'Inicia sesión con una cuenta de LangBot para usar modelos en la nube',
|
||||
noModels: 'No hay modelos configurados',
|
||||
langbotModels: 'Modelos LangBot',
|
||||
spaceTrialTooltip:
|
||||
'¡Créditos de prueba gratuitos disponibles! Inicia sesión con Space para acceder a modelos en la nube sin configuración.',
|
||||
'¡Créditos de prueba gratuitos disponibles! Inicia sesión con una cuenta de LangBot para acceder a modelos en la nube sin configuración.',
|
||||
unlockModels: 'Inicia sesión para usar',
|
||||
editProvider: 'Editar proveedor',
|
||||
addProvider: 'Añadir proveedor',
|
||||
@@ -328,9 +343,9 @@ const esES = {
|
||||
},
|
||||
|
||||
ownerMustBindSpace:
|
||||
'The Workspace owner must connect Space for LangBot Models.',
|
||||
'The Workspace owner must connect a LangBot Account for LangBot Models.',
|
||||
usesOwnerSpaceBilling:
|
||||
"Uses the Workspace owner's Space billing and credits.",
|
||||
"Uses the Workspace owner's LangBot Account billing and credits.",
|
||||
},
|
||||
bots: {
|
||||
title: 'Bots',
|
||||
@@ -592,9 +607,11 @@ const esES = {
|
||||
debugInfoTitle: 'Información de depuración del plugin',
|
||||
debugUrl: 'URL de depuración',
|
||||
debugKey: 'Clave de depuración',
|
||||
debugKeyExpires:
|
||||
'Rota a las {{time}}; cada Workspace tiene una clave distinta',
|
||||
noDebugKey: '(No establecida)',
|
||||
debugKeyDisabled:
|
||||
'La clave de depuración no está configurada, la depuración del plugin no requiere autenticación',
|
||||
'La credencial de depuración no está disponible temporalmente',
|
||||
boxStatusTitle: 'Box Runtime',
|
||||
boxStatus: 'Estado',
|
||||
boxConnected: 'Conectado',
|
||||
@@ -1295,13 +1312,13 @@ const esES = {
|
||||
adminAccountNote:
|
||||
'La cuenta que uses aquí se establecerá como cuenta de administrador',
|
||||
register: 'Registrarse',
|
||||
initWithSpace: 'Inicializar con Space',
|
||||
initWithSpace: 'Inicializar con una cuenta de LangBot',
|
||||
spaceRecommended:
|
||||
'Recomendado: Usa API de modelos oficiales estables y servicios en la nube',
|
||||
spaceInfoTip1:
|
||||
'Space proporciona servicios de autenticación unificada de cuentas sin subir ninguna de tu información sensible.',
|
||||
spaceInfoTip2:
|
||||
'Iniciar sesión con una cuenta de Space te da acceso a los modelos de LangBot y otros servicios en la nube, incluyendo créditos gratuitos de llamadas a modelos para ayudarte a comenzar rápidamente.',
|
||||
'Iniciar sesión con una cuenta de LangBot te da acceso a los modelos de LangBot y otros servicios en la nube, incluyendo créditos gratuitos de llamadas a modelos para ayudarte a comenzar rápidamente.',
|
||||
spaceInfoTip3:
|
||||
'Tu método de inicio de sesión no afecta otras funciones. Puedes configurar y usar modelos de otras fuentes en cualquier momento.',
|
||||
registerLocal: 'Registrar cuenta local',
|
||||
@@ -1359,35 +1376,35 @@ const esES = {
|
||||
passwordNotSet: 'No establecida',
|
||||
passwordSetDescription:
|
||||
'La contraseña está establecida, puedes iniciar sesión con correo y contraseña',
|
||||
spaceStatus: 'Cuenta de Space',
|
||||
spaceStatus: 'Cuenta de LangBot',
|
||||
spaceBound: 'Vinculada',
|
||||
spaceNotBound: 'No vinculada',
|
||||
spaceBoundDescription:
|
||||
'Cuenta de Space vinculada, API de modelos oficiales y servicios en la nube disponibles',
|
||||
bindSpace: 'Vincular cuenta de Space',
|
||||
'Cuenta de LangBot vinculada, API de modelos oficiales y servicios en la nube disponibles',
|
||||
bindSpace: 'Vincular cuenta de LangBot',
|
||||
bindSpaceDescription:
|
||||
'Vincular para usar API de modelos oficiales y servicios en la nube',
|
||||
bindSpaceButton: 'Vincular',
|
||||
bindSpaceConfirmTitle: 'Confirmar vinculación',
|
||||
bindSpaceConfirmDescription:
|
||||
'Estás a punto de vincular tu instancia local a una cuenta de Space',
|
||||
'Estás a punto de vincular tu instancia local a una cuenta de LangBot',
|
||||
bindSpaceWarning:
|
||||
'Después de vincular, tu correo de inicio de sesión se cambiará de {{localEmail}} al correo de la cuenta de Space.',
|
||||
bindSpaceSuccess: 'Cuenta de Space vinculada correctamente',
|
||||
bindSpaceFailed: 'Error al vincular la cuenta de Space',
|
||||
'Después de vincular, tu correo de inicio de sesión se cambiará de {{localEmail}} al correo de la cuenta de LangBot.',
|
||||
bindSpaceSuccess: 'Cuenta de LangBot vinculada correctamente',
|
||||
bindSpaceFailed: 'Error al vincular la cuenta de LangBot',
|
||||
bindSpaceInvalidState:
|
||||
'Solicitud de vinculación no válida. Por favor, inténtalo de nuevo desde la configuración de la cuenta.',
|
||||
setPasswordHint:
|
||||
'Establece una contraseña para iniciar sesión con correo y contraseña',
|
||||
spaceEmailMismatch:
|
||||
'El correo de inicio de sesión de Space no coincide con el correo de la cuenta local',
|
||||
'El correo de la cuenta de LangBot no coincide con el correo de la cuenta local',
|
||||
|
||||
space_account_not_registeredTitle: 'Account not registered',
|
||||
space_account_not_registered:
|
||||
'No local account is registered for this Space email. Ask the Workspace owner for an invitation.',
|
||||
space_account_binding_requiredTitle: 'Space connection required',
|
||||
'No local account is registered for this LangBot Account email. Ask the Workspace owner for an invitation.',
|
||||
space_account_binding_requiredTitle: 'LangBot Account connection required',
|
||||
space_account_binding_required:
|
||||
'This local account must connect Space from Account settings before using Space login.',
|
||||
'This local account must connect a LangBot Account from Account settings before using LangBot Account login.',
|
||||
},
|
||||
monitoring: {
|
||||
title: 'Panel de control',
|
||||
@@ -1716,7 +1733,6 @@ const esES = {
|
||||
botCreateSuccess: '¡Bot creado correctamente!',
|
||||
botSaveSuccess: '¡Configuración del Bot guardada y activada!',
|
||||
createError: 'Error al crear los recursos',
|
||||
spaceAuthError: 'Error al iniciar la autorización de Space',
|
||||
skipSaveError:
|
||||
'Error al guardar el estado de omisión. Por favor, inténtalo de nuevo.',
|
||||
completeSaveError:
|
||||
@@ -1799,6 +1815,9 @@ const esES = {
|
||||
loginSuccess:
|
||||
'¡Inicio de sesión correcto! El token se ha rellenado automáticamente',
|
||||
loginFailed: 'Error al iniciar sesión',
|
||||
connecting: 'Conectando con el servicio de WeChat...',
|
||||
waitingForScan: 'Esperando escaneo',
|
||||
retry: 'Reintentar',
|
||||
},
|
||||
dingtalk: {
|
||||
createApp: 'Crear aplicación de DingTalk con un clic',
|
||||
|
||||
@@ -88,19 +88,19 @@ const jaJP = {
|
||||
'おすすめ:公式の安定したモデル API とクラウドサービスを利用',
|
||||
loginLocal: 'ローカルアカウントでログイン',
|
||||
loginWithPassword: 'パスワードでログイン',
|
||||
spaceLoginTitle: 'Space でログイン',
|
||||
spaceLoginTitle: 'LangBot アカウントでログイン',
|
||||
spaceLoginDescription:
|
||||
'QRコードをスキャンするか、下のリンクにアクセスして認証してください',
|
||||
spaceLoginUserCode: '認証コード',
|
||||
spaceLoginExpires: 'コードは {{seconds}} 秒後に期限切れになります',
|
||||
spaceLoginWaiting: '認証を待っています...',
|
||||
spaceLoginSuccess: '認証に成功しました',
|
||||
spaceLoginFailed: 'Space ログインに失敗しました',
|
||||
spaceLoginFailed: 'LangBot アカウントログインに失敗しました',
|
||||
spaceLoginExpired:
|
||||
'認証コードの有効期限が切れました。もう一度お試しください',
|
||||
spaceLoginCancel: 'キャンセル',
|
||||
spaceLoginVisitLink: 'リンクにアクセス',
|
||||
spaceLoginProcessing: 'Space でログイン中',
|
||||
spaceLoginProcessing: 'LangBot アカウントでログイン中',
|
||||
spaceLoginProcessingDescription:
|
||||
'ログインを完了しています。しばらくお待ちください...',
|
||||
spaceLoginSuccessDescription: 'LangBot にリダイレクト中...',
|
||||
@@ -109,7 +109,7 @@ const jaJP = {
|
||||
backToLogin: 'ログインに戻る',
|
||||
backToHome: 'ホームに戻る',
|
||||
spaceAccountCannotChangePassword:
|
||||
'Space アカウントはここでパスワードを変更できません',
|
||||
'LangBot アカウントはここでパスワードを変更できません',
|
||||
theme: 'テーマ',
|
||||
changePassword: 'パスワードを変更',
|
||||
currentPassword: '現在のパスワード',
|
||||
@@ -219,6 +219,19 @@ const jaJP = {
|
||||
selectModelAbilities: 'モデル機能を選択',
|
||||
visionAbility: '視覚機能',
|
||||
functionCallAbility: '関数呼び出し',
|
||||
reasoningAbility: '推論',
|
||||
reasoningLevel: '推論レベル',
|
||||
reasoningLevels: {
|
||||
providerDefault: 'Provider デフォルト',
|
||||
disabled: 'オフ',
|
||||
enabled: 'オン',
|
||||
minimal: '最小',
|
||||
low: '低',
|
||||
medium: '中',
|
||||
high: '高',
|
||||
xhigh: '最高',
|
||||
max: '最大',
|
||||
},
|
||||
contextLength: 'コンテキストウィンドウ',
|
||||
contextLengthPlaceholder: '不明',
|
||||
contextLengthInvalid:
|
||||
@@ -246,8 +259,9 @@ const jaJP = {
|
||||
llmModels: 'LLM モデル',
|
||||
localProvider: 'ローカル',
|
||||
localProviderDescription: 'ローカルで設定・管理されているモデル',
|
||||
spaceProviderDescription: 'Space アカウントから同期されたモデル',
|
||||
spaceDisabledForLocalAccount: 'Space でログインしてクラウドモデルを使用',
|
||||
spaceProviderDescription: 'LangBot アカウントから同期されたモデル',
|
||||
spaceDisabledForLocalAccount:
|
||||
'LangBot アカウントでログインしてクラウドモデルを使用',
|
||||
syncModels: '同期',
|
||||
syncSuccess: '同期完了:{{created}} 件作成、{{updated}} 件更新',
|
||||
syncError: '同期に失敗しました:',
|
||||
@@ -285,15 +299,15 @@ const jaJP = {
|
||||
langbotModelsDescription: 'LangBot Space が提供するクラウドモデル',
|
||||
credits: 'クレジット',
|
||||
loginWithSpace: 'LangBot アカウントでログイン',
|
||||
loginToUseModels: 'Space でログインしてクラウドモデルを使用',
|
||||
loginToUseModels: 'LangBot アカウントでログインしてクラウドモデルを使用',
|
||||
ownerMustBindSpace:
|
||||
'LangBot モデルを使うにはワークスペース所有者が Space を連携する必要があります。',
|
||||
'LangBot モデルを使うにはワークスペース所有者が LangBot アカウントを連携する必要があります。',
|
||||
usesOwnerSpaceBilling:
|
||||
'ワークスペース所有者の Space 課金とクレジットを使用します。',
|
||||
'ワークスペース所有者の LangBot アカウント課金とクレジットを使用します。',
|
||||
noModels: 'モデルがありません',
|
||||
langbotModels: 'LangBot モデル',
|
||||
spaceTrialTooltip:
|
||||
'無料トライアルクレジットが利用可能!Space でログインして、設定不要でクラウドモデルを使用できます。',
|
||||
'無料トライアルクレジットが利用可能!LangBot アカウントでログインして、設定不要でクラウドモデルを使用できます。',
|
||||
unlockModels: 'ログインして使用',
|
||||
editProvider: 'プロバイダーを編集',
|
||||
addProvider: 'プロバイダーを追加',
|
||||
@@ -783,9 +797,10 @@ const jaJP = {
|
||||
debugInfoTitle: 'プラグインデバッグ情報',
|
||||
debugUrl: 'デバッグURL',
|
||||
debugKey: 'デバッグキー',
|
||||
debugKeyExpires:
|
||||
'{{time}} にローテーションします。Workspace ごとにキーが異なります',
|
||||
noDebugKey: '(未設定)',
|
||||
debugKeyDisabled:
|
||||
'デバッグキーが設定されていません。プラグインデバッグには認証が不要です',
|
||||
debugKeyDisabled: 'デバッグ認証情報を一時的に利用できません',
|
||||
boxStatusTitle: 'Box ランタイム',
|
||||
boxStatus: 'ステータス',
|
||||
boxConnected: '接続済み',
|
||||
@@ -1467,13 +1482,13 @@ const jaJP = {
|
||||
adminAccountNote:
|
||||
'ここで初期化されたアカウントは管理者アカウントとして使用されます',
|
||||
register: '登録',
|
||||
initWithSpace: 'Space で初期化',
|
||||
initWithSpace: 'LangBot アカウントで初期化',
|
||||
spaceRecommended:
|
||||
'おすすめ:公式の安定したモデル API とクラウドサービスを利用',
|
||||
spaceInfoTip1:
|
||||
'Space は統一されたアカウント認証サービスを提供し、機密情報をアップロードすることはありません。',
|
||||
spaceInfoTip2:
|
||||
'Space アカウントでログインすると、LangBot Models などのクラウドサービスを利用でき、無料のモデル呼び出しクレジットで迅速に開始できます。',
|
||||
'LangBot アカウントでログインすると、LangBot Models などのクラウドサービスを利用でき、無料のモデル呼び出しクレジットで迅速に開始できます。',
|
||||
spaceInfoTip3:
|
||||
'ログイン方法は他の機能に影響しません。いつでも他のソースからモデルを設定して使用できます。',
|
||||
registerLocal: 'ローカルアカウントを登録',
|
||||
@@ -1530,33 +1545,33 @@ const jaJP = {
|
||||
passwordNotSet: '未設定',
|
||||
passwordSetDescription:
|
||||
'パスワードが設定されています。メールとパスワードでログインできます',
|
||||
spaceStatus: 'Space アカウント',
|
||||
spaceStatus: 'LangBot アカウント',
|
||||
spaceBound: '連携済み',
|
||||
spaceNotBound: '未連携',
|
||||
spaceBoundDescription:
|
||||
'Space アカウントと連携済み、公式モデル API とクラウドサービスが利用可能',
|
||||
bindSpace: 'Space アカウントを連携',
|
||||
'LangBot アカウントと連携済み、公式モデル API とクラウドサービスが利用可能',
|
||||
bindSpace: 'LangBot アカウントを連携',
|
||||
bindSpaceDescription: '連携して公式モデル API とクラウドサービスを利用',
|
||||
bindSpaceButton: '連携',
|
||||
bindSpaceConfirmTitle: '連携を確認',
|
||||
bindSpaceConfirmDescription:
|
||||
'ローカルインスタンスを Space アカウントに連携しようとしています',
|
||||
'ローカルインスタンスを LangBot アカウントに連携しようとしています',
|
||||
bindSpaceWarning:
|
||||
'連携後、ログインメールアドレスは {{localEmail}} から Space アカウントのメールアドレスに変更されます。',
|
||||
bindSpaceSuccess: 'Space アカウントの連携に成功しました',
|
||||
bindSpaceFailed: 'Space アカウントの連携に失敗しました',
|
||||
'連携後、ログインメールアドレスは {{localEmail}} から LangBot アカウントのメールアドレスに変更されます。',
|
||||
bindSpaceSuccess: 'LangBot アカウントの連携に成功しました',
|
||||
bindSpaceFailed: 'LangBot アカウントの連携に失敗しました',
|
||||
bindSpaceInvalidState:
|
||||
'無効な連携リクエストです。アカウント設定から再度お試しください。',
|
||||
setPasswordHint:
|
||||
'パスワードを設定するとメールとパスワードでログインできます',
|
||||
spaceEmailMismatch:
|
||||
'Spaceログインのメールアドレスがローカルアカウントのメールアドレスと一致しません',
|
||||
'LangBot アカウントのメールアドレスがローカルアカウントのメールアドレスと一致しません',
|
||||
space_account_not_registeredTitle: 'アカウントが登録されていません',
|
||||
space_account_not_registered:
|
||||
'この Space メールアドレスのローカルアカウントはありません。ワークスペース所有者に招待を依頼してください。',
|
||||
space_account_binding_requiredTitle: 'Space の連携が必要です',
|
||||
'この LangBot アカウントのメールアドレスのローカルアカウントはありません。ワークスペース所有者に招待を依頼してください。',
|
||||
space_account_binding_requiredTitle: 'LangBot アカウントの連携が必要です',
|
||||
space_account_binding_required:
|
||||
'Space ログインを使用する前に、アカウント設定でこのローカルアカウントを Space に連携してください。',
|
||||
'LangBot アカウントログインを使用する前に、アカウント設定でこのローカルアカウントを LangBot アカウントに連携してください。',
|
||||
},
|
||||
workspace: {
|
||||
title: 'ワークスペース',
|
||||
@@ -1966,7 +1981,6 @@ const jaJP = {
|
||||
botCreateSuccess: 'ボットが正常に作成されました!',
|
||||
botSaveSuccess: 'ボット設定が保存され、有効になりました!',
|
||||
createError: 'リソースの作成に失敗しました',
|
||||
spaceAuthError: 'Space 認証の開始に失敗しました',
|
||||
skipSaveError: 'スキップ状態の保存に失敗しました。もう一度お試しください。',
|
||||
completeSaveError: '完了状態の保存に失敗しました。もう一度お試しください。',
|
||||
step: {
|
||||
@@ -2125,6 +2139,9 @@ const jaJP = {
|
||||
scanQRCode: '以下のQRコードをWeChatでスキャンし、トークンを自動入力',
|
||||
loginSuccess: 'ログイン成功!トークンが自動入力されました',
|
||||
loginFailed: 'ログイン失敗',
|
||||
connecting: 'WeChatサービスに接続中...',
|
||||
waitingForScan: 'スキャン待ち',
|
||||
retry: '再試行',
|
||||
},
|
||||
dingtalk: {
|
||||
createApp: 'ワンクリックでDingTalkアプリ作成',
|
||||
|
||||
@@ -85,18 +85,18 @@ const ruRU = {
|
||||
'Рекомендуется: Используйте официальные стабильные API моделей и облачные сервисы',
|
||||
loginLocal: 'Войти с локальной учётной записью',
|
||||
loginWithPassword: 'Войти с паролем',
|
||||
spaceLoginTitle: 'Войти через Space',
|
||||
spaceLoginTitle: 'Войти с аккаунтом LangBot',
|
||||
spaceLoginDescription:
|
||||
'Отсканируйте QR-код или перейдите по ссылке ниже для авторизации',
|
||||
spaceLoginUserCode: 'Ваш код',
|
||||
spaceLoginExpires: 'Код истекает через {{seconds}} секунд',
|
||||
spaceLoginWaiting: 'Ожидание авторизации...',
|
||||
spaceLoginSuccess: 'Авторизация успешна',
|
||||
spaceLoginFailed: 'Ошибка входа через Space',
|
||||
spaceLoginFailed: 'Ошибка входа с аккаунтом LangBot',
|
||||
spaceLoginExpired: 'Код авторизации истёк, попробуйте снова',
|
||||
spaceLoginCancel: 'Отмена',
|
||||
spaceLoginVisitLink: 'Перейти по ссылке',
|
||||
spaceLoginProcessing: 'Вход через Space',
|
||||
spaceLoginProcessing: 'Вход с аккаунтом LangBot',
|
||||
spaceLoginProcessingDescription:
|
||||
'Пожалуйста, подождите, пока мы завершим вход...',
|
||||
spaceLoginSuccessDescription: 'Перенаправление в LangBot...',
|
||||
@@ -105,7 +105,7 @@ const ruRU = {
|
||||
backToLogin: 'Вернуться к входу',
|
||||
backToHome: 'На главную',
|
||||
spaceAccountCannotChangePassword:
|
||||
'Для аккаунтов Space невозможно изменить пароль здесь',
|
||||
'Для аккаунтов LangBot невозможно изменить пароль здесь',
|
||||
theme: 'Тема',
|
||||
changePassword: 'Изменить пароль',
|
||||
currentPassword: 'Текущий пароль',
|
||||
@@ -217,6 +217,19 @@ const ruRU = {
|
||||
selectModelAbilities: 'Выберите возможности модели',
|
||||
visionAbility: 'Распознавание изображений',
|
||||
functionCallAbility: 'Вызов функций',
|
||||
reasoningAbility: 'Рассуждение',
|
||||
reasoningLevel: 'Уровень рассуждений',
|
||||
reasoningLevels: {
|
||||
providerDefault: 'По умолчанию провайдера',
|
||||
disabled: 'Выключено',
|
||||
enabled: 'Включено',
|
||||
minimal: 'Минимальный',
|
||||
low: 'Низкий',
|
||||
medium: 'Средний',
|
||||
high: 'Высокий',
|
||||
xhigh: 'Очень высокий',
|
||||
max: 'Максимальный',
|
||||
},
|
||||
contextLength: 'Контекстное окно',
|
||||
contextLengthPlaceholder: 'Неизвестно',
|
||||
contextLengthInvalid:
|
||||
@@ -246,9 +259,9 @@ const ruRU = {
|
||||
localProvider: 'Локальный',
|
||||
localProviderDescription: 'Модели, настроенные и управляемые локально',
|
||||
spaceProviderDescription:
|
||||
'Модели, синхронизированные из вашего аккаунта Space',
|
||||
'Модели, синхронизированные из вашего аккаунта LangBot',
|
||||
spaceDisabledForLocalAccount:
|
||||
'Войдите через Space, чтобы использовать облачные модели',
|
||||
'Войдите с аккаунтом LangBot, чтобы использовать облачные модели',
|
||||
syncModels: 'Синхронизировать',
|
||||
syncSuccess:
|
||||
'Синхронизация завершена: {{created}} создано, {{updated}} обновлено',
|
||||
@@ -287,11 +300,12 @@ const ruRU = {
|
||||
langbotModelsDescription: 'Облачные модели на базе LangBot Space',
|
||||
credits: 'Кредиты',
|
||||
loginWithSpace: 'Войти с аккаунтом LangBot',
|
||||
loginToUseModels: 'Войдите через Space, чтобы использовать облачные модели',
|
||||
loginToUseModels:
|
||||
'Войдите с аккаунтом LangBot, чтобы использовать облачные модели',
|
||||
noModels: 'Модели не настроены',
|
||||
langbotModels: 'Модели LangBot',
|
||||
spaceTrialTooltip:
|
||||
'Доступны бесплатные пробные кредиты! Войдите через Space, чтобы получить доступ к облачным моделям без настройки.',
|
||||
'Доступны бесплатные пробные кредиты! Войдите с аккаунтом LangBot, чтобы получить доступ к облачным моделям без настройки.',
|
||||
unlockModels: 'Войдите для использования',
|
||||
editProvider: 'Редактировать провайдера',
|
||||
addProvider: 'Добавить провайдера',
|
||||
@@ -327,9 +341,9 @@ const ruRU = {
|
||||
},
|
||||
|
||||
ownerMustBindSpace:
|
||||
'The Workspace owner must connect Space for LangBot Models.',
|
||||
'The Workspace owner must connect a LangBot Account for LangBot Models.',
|
||||
usesOwnerSpaceBilling:
|
||||
"Uses the Workspace owner's Space billing and credits.",
|
||||
"Uses the Workspace owner's LangBot Account billing and credits.",
|
||||
},
|
||||
bots: {
|
||||
title: 'Боты',
|
||||
@@ -589,9 +603,9 @@ const ruRU = {
|
||||
debugInfoTitle: 'Отладочная информация плагина',
|
||||
debugUrl: 'URL для отладки',
|
||||
debugKey: 'Ключ отладки',
|
||||
debugKeyExpires: 'Смена в {{time}}; у каждого Workspace свой ключ',
|
||||
noDebugKey: '(Не задан)',
|
||||
debugKeyDisabled:
|
||||
'Ключ отладки не задан, аутентификация при отладке плагина не требуется',
|
||||
debugKeyDisabled: 'Учетные данные отладки временно недоступны',
|
||||
boxStatusTitle: 'Box Runtime',
|
||||
boxStatus: 'Статус',
|
||||
boxConnected: 'Подключено',
|
||||
@@ -1273,13 +1287,13 @@ const ruRU = {
|
||||
adminAccountNote:
|
||||
'Указанная учётная запись будет настроена как администратор',
|
||||
register: 'Регистрация',
|
||||
initWithSpace: 'Инициализация через Space',
|
||||
initWithSpace: 'Инициализация с аккаунтом LangBot',
|
||||
spaceRecommended:
|
||||
'Рекомендуется: Используйте официальные стабильные API моделей и облачные сервисы',
|
||||
spaceInfoTip1:
|
||||
'Space предоставляет единую службу аутентификации без загрузки конфиденциальной информации.',
|
||||
spaceInfoTip2:
|
||||
'Вход через Space даёт доступ к моделям LangBot и облачным сервисам, включая бесплатные кредиты для быстрого старта.',
|
||||
'Вход с аккаунтом LangBot даёт доступ к моделям LangBot и облачным сервисам, включая бесплатные кредиты для быстрого старта.',
|
||||
spaceInfoTip3:
|
||||
'Способ входа не влияет на другие функции. Вы можете настроить модели из других источников в любое время.',
|
||||
registerLocal: 'Зарегистрировать локальную учётную запись',
|
||||
@@ -1335,34 +1349,34 @@ const ruRU = {
|
||||
passwordNotSet: 'Не установлен',
|
||||
passwordSetDescription:
|
||||
'Пароль установлен, вы можете входить с email и паролем',
|
||||
spaceStatus: 'Аккаунт Space',
|
||||
spaceStatus: 'Аккаунт LangBot',
|
||||
spaceBound: 'Привязан',
|
||||
spaceNotBound: 'Не привязан',
|
||||
spaceBoundDescription:
|
||||
'Аккаунт Space привязан, доступны официальные API моделей и облачные сервисы',
|
||||
bindSpace: 'Привязать аккаунт Space',
|
||||
'Аккаунт LangBot привязан, доступны официальные API моделей и облачные сервисы',
|
||||
bindSpace: 'Привязать аккаунт LangBot',
|
||||
bindSpaceDescription:
|
||||
'Привяжите для использования официальных API моделей и облачных сервисов',
|
||||
bindSpaceButton: 'Привязать',
|
||||
bindSpaceConfirmTitle: 'Подтверждение привязки',
|
||||
bindSpaceConfirmDescription:
|
||||
'Вы собираетесь привязать локальный экземпляр к аккаунту Space',
|
||||
'Вы собираетесь привязать локальный экземпляр к аккаунту LangBot',
|
||||
bindSpaceWarning:
|
||||
'После привязки ваш email для входа будет изменён с {{localEmail}} на email аккаунта Space.',
|
||||
bindSpaceSuccess: 'Аккаунт Space успешно привязан',
|
||||
bindSpaceFailed: 'Не удалось привязать аккаунт Space',
|
||||
'После привязки ваш email для входа будет изменён с {{localEmail}} на email аккаунта LangBot.',
|
||||
bindSpaceSuccess: 'Аккаунт LangBot успешно привязан',
|
||||
bindSpaceFailed: 'Не удалось привязать аккаунт LangBot',
|
||||
bindSpaceInvalidState:
|
||||
'Недействительный запрос привязки. Повторите попытку из настроек аккаунта.',
|
||||
setPasswordHint: 'Установите пароль для входа с email и паролем',
|
||||
spaceEmailMismatch:
|
||||
'Email входа через Space не совпадает с email локальной учётной записи',
|
||||
'Email входа с аккаунтом LangBot не совпадает с email локальной учётной записи',
|
||||
|
||||
space_account_not_registeredTitle: 'Account not registered',
|
||||
space_account_not_registered:
|
||||
'No local account is registered for this Space email. Ask the Workspace owner for an invitation.',
|
||||
space_account_binding_requiredTitle: 'Space connection required',
|
||||
'No local account is registered for this LangBot Account email. Ask the Workspace owner for an invitation.',
|
||||
space_account_binding_requiredTitle: 'LangBot Account connection required',
|
||||
space_account_binding_required:
|
||||
'This local account must connect Space from Account settings before using Space login.',
|
||||
'This local account must connect a LangBot Account from Account settings before using LangBot Account login.',
|
||||
},
|
||||
monitoring: {
|
||||
title: 'Мониторинг',
|
||||
@@ -1689,7 +1703,6 @@ const ruRU = {
|
||||
botCreateSuccess: 'Бот успешно создан!',
|
||||
botSaveSuccess: 'Конфигурация бота сохранена и включена!',
|
||||
createError: 'Не удалось создать ресурсы',
|
||||
spaceAuthError: 'Не удалось инициировать авторизацию через Space',
|
||||
skipSaveError: 'Не удалось сохранить статус пропуска. Повторите попытку.',
|
||||
completeSaveError:
|
||||
'Не удалось сохранить статус завершения. Повторите попытку.',
|
||||
@@ -1769,6 +1782,9 @@ const ruRU = {
|
||||
'Отсканируйте QR-код ниже в WeChat, чтобы авторизоваться и автоматически заполнить токен',
|
||||
loginSuccess: 'Вход выполнен успешно! Токен заполнен автоматически',
|
||||
loginFailed: 'Не удалось выполнить вход',
|
||||
connecting: 'Подключение к сервису WeChat...',
|
||||
waitingForScan: 'Ожидание сканирования',
|
||||
retry: 'Повторить',
|
||||
},
|
||||
dingtalk: {
|
||||
createApp: 'Создать приложение DingTalk в один клик',
|
||||
|
||||
@@ -85,18 +85,18 @@ const thTH = {
|
||||
'แนะนำ: ใช้ API โมเดลที่เสถียรอย่างเป็นทางการและบริการคลาวด์',
|
||||
loginLocal: 'เข้าสู่ระบบด้วยบัญชีท้องถิ่น',
|
||||
loginWithPassword: 'เข้าสู่ระบบด้วยรหัสผ่าน',
|
||||
spaceLoginTitle: 'เข้าสู่ระบบด้วย Space',
|
||||
spaceLoginTitle: 'เข้าสู่ระบบด้วยบัญชี LangBot',
|
||||
spaceLoginDescription:
|
||||
'สแกน QR code หรือเข้าชมลิงก์ด้านล่างเพื่อยืนยันสิทธิ์',
|
||||
spaceLoginUserCode: 'รหัสของคุณ',
|
||||
spaceLoginExpires: 'รหัสจะหมดอายุใน {{seconds}} วินาที',
|
||||
spaceLoginWaiting: 'กำลังรอการยืนยันสิทธิ์...',
|
||||
spaceLoginSuccess: 'ยืนยันสิทธิ์สำเร็จ',
|
||||
spaceLoginFailed: 'เข้าสู่ระบบ Space ล้มเหลว',
|
||||
spaceLoginFailed: 'เข้าสู่ระบบด้วยบัญชี LangBot ล้มเหลว',
|
||||
spaceLoginExpired: 'รหัสยืนยันหมดอายุแล้ว กรุณาลองใหม่',
|
||||
spaceLoginCancel: 'ยกเลิก',
|
||||
spaceLoginVisitLink: 'เข้าชมลิงก์',
|
||||
spaceLoginProcessing: 'กำลังเข้าสู่ระบบด้วย Space',
|
||||
spaceLoginProcessing: 'กำลังเข้าสู่ระบบด้วยบัญชี LangBot',
|
||||
spaceLoginProcessingDescription: 'กรุณารอสักครู่ขณะดำเนินการเข้าสู่ระบบ...',
|
||||
spaceLoginSuccessDescription: 'กำลังเปลี่ยนเส้นทางไปยัง LangBot...',
|
||||
spaceLoginError: 'เข้าสู่ระบบล้มเหลว',
|
||||
@@ -104,7 +104,7 @@ const thTH = {
|
||||
backToLogin: 'กลับไปหน้าเข้าสู่ระบบ',
|
||||
backToHome: 'กลับไปหน้าแรก',
|
||||
spaceAccountCannotChangePassword:
|
||||
'บัญชี Space ไม่สามารถเปลี่ยนรหัสผ่านได้ที่นี่',
|
||||
'บัญชี LangBot ไม่สามารถเปลี่ยนรหัสผ่านได้ที่นี่',
|
||||
theme: 'ธีม',
|
||||
changePassword: 'เปลี่ยนรหัสผ่าน',
|
||||
currentPassword: 'รหัสผ่านปัจจุบัน',
|
||||
@@ -213,6 +213,19 @@ const thTH = {
|
||||
selectModelAbilities: 'เลือกความสามารถของโมเดล',
|
||||
visionAbility: 'ความสามารถด้านภาพ',
|
||||
functionCallAbility: 'การเรียกฟังก์ชัน',
|
||||
reasoningAbility: 'ความสามารถในการให้เหตุผล',
|
||||
reasoningLevel: 'ระดับการให้เหตุผล',
|
||||
reasoningLevels: {
|
||||
providerDefault: 'ค่าเริ่มต้นของผู้ให้บริการ',
|
||||
disabled: 'ปิด',
|
||||
enabled: 'เปิด',
|
||||
minimal: 'ต่ำสุด',
|
||||
low: 'ต่ำ',
|
||||
medium: 'ปานกลาง',
|
||||
high: 'สูง',
|
||||
xhigh: 'สูงมาก',
|
||||
max: 'สูงสุด',
|
||||
},
|
||||
contextLength: 'หน้าต่างบริบท',
|
||||
contextLengthPlaceholder: 'ไม่ทราบ',
|
||||
contextLengthInvalid: 'หน้าต่างบริบทต้องเป็นจำนวนเต็มบวก',
|
||||
@@ -239,8 +252,9 @@ const thTH = {
|
||||
llmModels: 'โมเดล LLM',
|
||||
localProvider: 'ท้องถิ่น',
|
||||
localProviderDescription: 'โมเดลที่กำหนดค่าและจัดการในเครื่อง',
|
||||
spaceProviderDescription: 'โมเดลที่ซิงค์จากบัญชี Space ของคุณ',
|
||||
spaceDisabledForLocalAccount: 'เข้าสู่ระบบด้วย Space เพื่อใช้โมเดลคลาวด์',
|
||||
spaceProviderDescription: 'โมเดลที่ซิงค์จากบัญชี LangBot ของคุณ',
|
||||
spaceDisabledForLocalAccount:
|
||||
'เข้าสู่ระบบด้วยบัญชี LangBot เพื่อใช้โมเดลคลาวด์',
|
||||
syncModels: 'ซิงค์',
|
||||
syncSuccess:
|
||||
'ซิงค์เสร็จสมบูรณ์: สร้าง {{created}} รายการ, อัปเดต {{updated}} รายการ',
|
||||
@@ -276,11 +290,11 @@ const thTH = {
|
||||
langbotModelsDescription: 'โมเดลคลาวด์ขับเคลื่อนโดย LangBot Space',
|
||||
credits: 'เครดิต',
|
||||
loginWithSpace: 'เข้าสู่ระบบด้วยบัญชี LangBot',
|
||||
loginToUseModels: 'เข้าสู่ระบบด้วย Space เพื่อใช้โมเดลคลาวด์',
|
||||
loginToUseModels: 'เข้าสู่ระบบด้วยบัญชี LangBot เพื่อใช้โมเดลคลาวด์',
|
||||
noModels: 'ยังไม่มีโมเดลที่กำหนดค่า',
|
||||
langbotModels: 'โมเดล LangBot',
|
||||
spaceTrialTooltip:
|
||||
'มีเครดิตทดลองใช้งานฟรี! เข้าสู่ระบบด้วย Space เพื่อเข้าถึงโมเดลคลาวด์โดยไม่ต้องตั้งค่า',
|
||||
'มีเครดิตทดลองใช้งานฟรี! เข้าสู่ระบบด้วยบัญชี LangBot เพื่อเข้าถึงโมเดลคลาวด์โดยไม่ต้องตั้งค่า',
|
||||
unlockModels: 'เข้าสู่ระบบเพื่อใช้งาน',
|
||||
editProvider: 'แก้ไขผู้ให้บริการ',
|
||||
addProvider: 'เพิ่มผู้ให้บริการ',
|
||||
@@ -314,9 +328,9 @@ const thTH = {
|
||||
},
|
||||
|
||||
ownerMustBindSpace:
|
||||
'The Workspace owner must connect Space for LangBot Models.',
|
||||
'The Workspace owner must connect a LangBot Account for LangBot Models.',
|
||||
usesOwnerSpaceBilling:
|
||||
"Uses the Workspace owner's Space billing and credits.",
|
||||
"Uses the Workspace owner's LangBot Account billing and credits.",
|
||||
},
|
||||
bots: {
|
||||
title: 'บอท',
|
||||
@@ -573,9 +587,9 @@ const thTH = {
|
||||
debugInfoTitle: 'ข้อมูลดีบักปลั๊กอิน',
|
||||
debugUrl: 'URL ดีบัก',
|
||||
debugKey: 'คีย์ดีบัก',
|
||||
debugKeyExpires: 'หมุนเวียนเวลา {{time}}; แต่ละ Workspace ใช้คีย์ต่างกัน',
|
||||
noDebugKey: '(ไม่ได้ตั้งค่า)',
|
||||
debugKeyDisabled:
|
||||
'ไม่ได้ตั้งค่าคีย์ดีบัก การดีบักปลั๊กอินไม่ต้องยืนยันตัวตน',
|
||||
debugKeyDisabled: 'ข้อมูลรับรองการดีบักไม่พร้อมใช้งานชั่วคราว',
|
||||
boxStatusTitle: 'Box Runtime',
|
||||
boxStatus: 'สถานะ',
|
||||
boxConnected: 'เชื่อมต่อแล้ว',
|
||||
@@ -1246,13 +1260,13 @@ const thTH = {
|
||||
description: 'นี่เป็นครั้งแรกที่คุณเริ่มใช้งาน LangBot',
|
||||
adminAccountNote: 'บัญชีที่คุณใช้ที่นี่จะถูกตั้งเป็นบัญชีผู้ดูแลระบบ',
|
||||
register: 'ลงทะเบียน',
|
||||
initWithSpace: 'เริ่มต้นด้วย Space',
|
||||
initWithSpace: 'เริ่มต้นด้วยบัญชี LangBot',
|
||||
spaceRecommended:
|
||||
'แนะนำ: ใช้ API โมเดลที่เสถียรอย่างเป็นทางการและบริการคลาวด์',
|
||||
spaceInfoTip1:
|
||||
'Space ให้บริการยืนยันตัวตนแบบรวมโดยไม่อัปโหลดข้อมูลสำคัญใดๆ ของคุณ',
|
||||
spaceInfoTip2:
|
||||
'การเข้าสู่ระบบด้วยบัญชี Space ช่วยให้คุณเข้าถึงโมเดล LangBot และบริการคลาวด์อื่นๆ รวมถึงเครดิตเรียกใช้โมเดลฟรีเพื่อช่วยให้คุณเริ่มต้นได้อย่างรวดเร็ว',
|
||||
'การเข้าสู่ระบบด้วยบัญชี LangBot ช่วยให้คุณเข้าถึงโมเดล LangBot และบริการคลาวด์อื่นๆ รวมถึงเครดิตเรียกใช้โมเดลฟรีเพื่อช่วยให้คุณเริ่มต้นได้อย่างรวดเร็ว',
|
||||
spaceInfoTip3:
|
||||
'วิธีการเข้าสู่ระบบของคุณไม่มีผลต่อฟีเจอร์อื่นๆ คุณสามารถกำหนดค่าและใช้โมเดลจากแหล่งอื่นได้ตลอดเวลา',
|
||||
registerLocal: 'ลงทะเบียนบัญชีท้องถิ่น',
|
||||
@@ -1307,30 +1321,32 @@ const thTH = {
|
||||
passwordNotSet: 'ยังไม่ได้ตั้งค่า',
|
||||
passwordSetDescription:
|
||||
'ตั้งรหัสผ่านแล้ว คุณสามารถเข้าสู่ระบบด้วยอีเมลและรหัสผ่าน',
|
||||
spaceStatus: 'บัญชี Space',
|
||||
spaceStatus: 'บัญชี LangBot',
|
||||
spaceBound: 'ผูกแล้ว',
|
||||
spaceNotBound: 'ยังไม่ผูก',
|
||||
spaceBoundDescription:
|
||||
'ผูกบัญชี Space แล้ว สามารถใช้ API โมเดลอย่างเป็นทางการและบริการคลาวด์ได้',
|
||||
bindSpace: 'ผูกบัญชี Space',
|
||||
'ผูกบัญชี LangBot แล้ว สามารถใช้ API โมเดลอย่างเป็นทางการและบริการคลาวด์ได้',
|
||||
bindSpace: 'ผูกบัญชี LangBot',
|
||||
bindSpaceDescription: 'ผูกเพื่อใช้ API โมเดลอย่างเป็นทางการและบริการคลาวด์',
|
||||
bindSpaceButton: 'ผูก',
|
||||
bindSpaceConfirmTitle: 'ยืนยันการผูก',
|
||||
bindSpaceConfirmDescription: 'คุณกำลังจะผูกอินสแตนซ์ท้องถิ่นกับบัญชี Space',
|
||||
bindSpaceConfirmDescription:
|
||||
'คุณกำลังจะผูกอินสแตนซ์ท้องถิ่นกับบัญชี LangBot',
|
||||
bindSpaceWarning:
|
||||
'หลังจากผูกแล้ว อีเมลเข้าสู่ระบบของคุณจะเปลี่ยนจาก {{localEmail}} เป็นอีเมลบัญชี Space',
|
||||
bindSpaceSuccess: 'ผูกบัญชี Space สำเร็จ',
|
||||
bindSpaceFailed: 'ผูกบัญชี Space ล้มเหลว',
|
||||
'หลังจากผูกแล้ว อีเมลเข้าสู่ระบบของคุณจะเปลี่ยนจาก {{localEmail}} เป็นอีเมลบัญชี LangBot',
|
||||
bindSpaceSuccess: 'ผูกบัญชี LangBot สำเร็จ',
|
||||
bindSpaceFailed: 'ผูกบัญชี LangBot ล้มเหลว',
|
||||
bindSpaceInvalidState: 'คำขอผูกไม่ถูกต้อง กรุณาลองใหม่จากการตั้งค่าบัญชี',
|
||||
setPasswordHint: 'ตั้งรหัสผ่านเพื่อเข้าสู่ระบบด้วยอีเมลและรหัสผ่าน',
|
||||
spaceEmailMismatch: 'อีเมลเข้าสู่ระบบ Space ไม่ตรงกับอีเมลบัญชีท้องถิ่น',
|
||||
spaceEmailMismatch:
|
||||
'อีเมลเข้าสู่ระบบด้วยบัญชี LangBot ไม่ตรงกับอีเมลบัญชีท้องถิ่น',
|
||||
|
||||
space_account_not_registeredTitle: 'Account not registered',
|
||||
space_account_not_registered:
|
||||
'No local account is registered for this Space email. Ask the Workspace owner for an invitation.',
|
||||
space_account_binding_requiredTitle: 'Space connection required',
|
||||
'No local account is registered for this LangBot Account email. Ask the Workspace owner for an invitation.',
|
||||
space_account_binding_requiredTitle: 'LangBot Account connection required',
|
||||
space_account_binding_required:
|
||||
'This local account must connect Space from Account settings before using Space login.',
|
||||
'This local account must connect a LangBot Account from Account settings before using LangBot Account login.',
|
||||
},
|
||||
monitoring: {
|
||||
title: 'แดชบอร์ด',
|
||||
@@ -1656,7 +1672,6 @@ const thTH = {
|
||||
botCreateSuccess: 'สร้าง Bot สำเร็จ!',
|
||||
botSaveSuccess: 'บันทึกและเปิดใช้งาน Bot สำเร็จ!',
|
||||
createError: 'ไม่สามารถสร้างทรัพยากรได้',
|
||||
spaceAuthError: 'ไม่สามารถเริ่มต้นการยืนยันสิทธิ์ Space ได้',
|
||||
skipSaveError: 'ไม่สามารถบันทึกสถานะการข้ามได้ กรุณาลองใหม่',
|
||||
completeSaveError: 'ไม่สามารถบันทึกสถานะการเสร็จสิ้นได้ กรุณาลองใหม่',
|
||||
step: {
|
||||
@@ -1732,6 +1747,9 @@ const thTH = {
|
||||
'สแกนคิวอาร์โค้ดด้านล่างด้วย WeChat เพื่ออนุญาตและกรอกโทเคนอัตโนมัติ',
|
||||
loginSuccess: 'เข้าสู่ระบบสำเร็จ และกรอกโทเคนอัตโนมัติแล้ว',
|
||||
loginFailed: 'เข้าสู่ระบบไม่สำเร็จ',
|
||||
connecting: 'กำลังเชื่อมต่อบริการ WeChat...',
|
||||
waitingForScan: 'กำลังรอการสแกน',
|
||||
retry: 'ลองอีกครั้ง',
|
||||
},
|
||||
dingtalk: {
|
||||
createApp: 'สร้างแอป DingTalk ด้วยคลิกเดียว',
|
||||
|
||||
@@ -86,18 +86,18 @@ const viVN = {
|
||||
'Khuyến nghị: Sử dụng API mô hình ổn định chính thức và dịch vụ đám mây',
|
||||
loginLocal: 'Đăng nhập với tài khoản cục bộ',
|
||||
loginWithPassword: 'Đăng nhập bằng mật khẩu',
|
||||
spaceLoginTitle: 'Đăng nhập với Space',
|
||||
spaceLoginTitle: 'Đăng nhập bằng tài khoản LangBot',
|
||||
spaceLoginDescription:
|
||||
'Quét mã QR hoặc truy cập liên kết bên dưới để ủy quyền',
|
||||
spaceLoginUserCode: 'Mã của bạn',
|
||||
spaceLoginExpires: 'Mã hết hạn sau {{seconds}} giây',
|
||||
spaceLoginWaiting: 'Đang chờ ủy quyền...',
|
||||
spaceLoginSuccess: 'Ủy quyền thành công',
|
||||
spaceLoginFailed: 'Đăng nhập Space thất bại',
|
||||
spaceLoginFailed: 'Đăng nhập bằng tài khoản LangBot thất bại',
|
||||
spaceLoginExpired: 'Mã ủy quyền đã hết hạn, vui lòng thử lại',
|
||||
spaceLoginCancel: 'Hủy',
|
||||
spaceLoginVisitLink: 'Truy cập liên kết',
|
||||
spaceLoginProcessing: 'Đang đăng nhập với Space',
|
||||
spaceLoginProcessing: 'Đang đăng nhập bằng tài khoản LangBot',
|
||||
spaceLoginProcessingDescription:
|
||||
'Vui lòng chờ trong khi chúng tôi hoàn tất đăng nhập...',
|
||||
spaceLoginSuccessDescription: 'Đang chuyển hướng đến LangBot...',
|
||||
@@ -106,7 +106,7 @@ const viVN = {
|
||||
backToLogin: 'Quay lại đăng nhập',
|
||||
backToHome: 'Quay lại trang chủ',
|
||||
spaceAccountCannotChangePassword:
|
||||
'Tài khoản Space không thể đổi mật khẩu tại đây',
|
||||
'Tài khoản LangBot không thể đổi mật khẩu tại đây',
|
||||
theme: 'Giao diện',
|
||||
changePassword: 'Đổi mật khẩu',
|
||||
currentPassword: 'Mật khẩu hiện tại',
|
||||
@@ -217,6 +217,19 @@ const viVN = {
|
||||
selectModelAbilities: 'Chọn khả năng mô hình',
|
||||
visionAbility: 'Khả năng thị giác',
|
||||
functionCallAbility: 'Gọi hàm',
|
||||
reasoningAbility: 'Khả năng suy luận',
|
||||
reasoningLevel: 'Mức độ suy luận',
|
||||
reasoningLevels: {
|
||||
providerDefault: 'Mặc định của nhà cung cấp',
|
||||
disabled: 'Tắt',
|
||||
enabled: 'Bật',
|
||||
minimal: 'Tối thiểu',
|
||||
low: 'Thấp',
|
||||
medium: 'Trung bình',
|
||||
high: 'Cao',
|
||||
xhigh: 'Rất cao',
|
||||
max: 'Tối đa',
|
||||
},
|
||||
contextLength: 'Cửa sổ ngữ cảnh',
|
||||
contextLengthPlaceholder: 'Không rõ',
|
||||
contextLengthInvalid: 'Cửa sổ ngữ cảnh phải là số nguyên dương',
|
||||
@@ -245,9 +258,9 @@ const viVN = {
|
||||
localProvider: 'Cục bộ',
|
||||
localProviderDescription: 'Các mô hình được cấu hình và quản lý cục bộ',
|
||||
spaceProviderDescription:
|
||||
'Các mô hình được đồng bộ từ tài khoản Space của bạn',
|
||||
'Các mô hình được đồng bộ từ tài khoản LangBot của bạn',
|
||||
spaceDisabledForLocalAccount:
|
||||
'Đăng nhập với Space để sử dụng mô hình đám mây',
|
||||
'Đăng nhập bằng tài khoản LangBot để sử dụng mô hình đám mây',
|
||||
syncModels: 'Đồng bộ',
|
||||
syncSuccess:
|
||||
'Đồng bộ hoàn tất: {{created}} đã tạo, {{updated}} đã cập nhật',
|
||||
@@ -284,11 +297,12 @@ const viVN = {
|
||||
langbotModelsDescription: 'Mô hình đám mây được cung cấp bởi LangBot Space',
|
||||
credits: 'Tín dụng',
|
||||
loginWithSpace: 'Đăng nhập bằng tài khoản LangBot',
|
||||
loginToUseModels: 'Đăng nhập với Space để sử dụng mô hình đám mây',
|
||||
loginToUseModels:
|
||||
'Đăng nhập bằng tài khoản LangBot để sử dụng mô hình đám mây',
|
||||
noModels: 'Chưa cấu hình mô hình nào',
|
||||
langbotModels: 'Mô hình LangBot',
|
||||
spaceTrialTooltip:
|
||||
'Có tín dụng dùng thử miễn phí! Đăng nhập với Space để truy cập mô hình đám mây không cần cấu hình.',
|
||||
'Có tín dụng dùng thử miễn phí! Đăng nhập bằng tài khoản LangBot để truy cập mô hình đám mây không cần cấu hình.',
|
||||
unlockModels: 'Đăng nhập để sử dụng',
|
||||
editProvider: 'Chỉnh sửa nhà cung cấp',
|
||||
addProvider: 'Thêm nhà cung cấp',
|
||||
@@ -323,9 +337,9 @@ const viVN = {
|
||||
},
|
||||
|
||||
ownerMustBindSpace:
|
||||
'The Workspace owner must connect Space for LangBot Models.',
|
||||
'The Workspace owner must connect a LangBot Account for LangBot Models.',
|
||||
usesOwnerSpaceBilling:
|
||||
"Uses the Workspace owner's Space billing and credits.",
|
||||
"Uses the Workspace owner's LangBot Account billing and credits.",
|
||||
},
|
||||
bots: {
|
||||
title: 'Bot',
|
||||
@@ -584,9 +598,9 @@ const viVN = {
|
||||
debugInfoTitle: 'Thông tin gỡ lỗi Plugin',
|
||||
debugUrl: 'URL gỡ lỗi',
|
||||
debugKey: 'Khóa gỡ lỗi',
|
||||
debugKeyExpires: 'Xoay vòng lúc {{time}}; mỗi Workspace có khóa riêng',
|
||||
noDebugKey: '(Chưa đặt)',
|
||||
debugKeyDisabled:
|
||||
'Khóa gỡ lỗi chưa được đặt, gỡ lỗi plugin không yêu cầu xác thực',
|
||||
debugKeyDisabled: 'Thông tin xác thực gỡ lỗi tạm thời không khả dụng',
|
||||
boxStatusTitle: 'Box Runtime',
|
||||
boxStatus: 'Trạng thái',
|
||||
boxConnected: 'Đã kết nối',
|
||||
@@ -1266,13 +1280,13 @@ const viVN = {
|
||||
adminAccountNote:
|
||||
'Tài khoản bạn sử dụng ở đây sẽ được đặt làm tài khoản quản trị viên',
|
||||
register: 'Đăng ký',
|
||||
initWithSpace: 'Khởi tạo với Space',
|
||||
initWithSpace: 'Khởi tạo bằng tài khoản LangBot',
|
||||
spaceRecommended:
|
||||
'Khuyến nghị: Sử dụng API mô hình ổn định chính thức và dịch vụ đám mây',
|
||||
spaceInfoTip1:
|
||||
'Space cung cấp dịch vụ xác thực tài khoản thống nhất mà không tải lên bất kỳ thông tin nhạy cảm nào của bạn.',
|
||||
spaceInfoTip2:
|
||||
'Đăng nhập bằng tài khoản Space cho phép bạn truy cập Mô hình LangBot và các dịch vụ đám mây khác, bao gồm tín dụng gọi mô hình miễn phí để giúp bạn bắt đầu nhanh chóng.',
|
||||
'Đăng nhập bằng tài khoản LangBot cho phép bạn truy cập Mô hình LangBot và các dịch vụ đám mây khác, bao gồm tín dụng gọi mô hình miễn phí để giúp bạn bắt đầu nhanh chóng.',
|
||||
spaceInfoTip3:
|
||||
'Phương thức đăng nhập của bạn không ảnh hưởng đến các tính năng khác. Bạn có thể cấu hình và sử dụng mô hình từ các nguồn khác bất cứ lúc nào.',
|
||||
registerLocal: 'Đăng ký tài khoản cục bộ',
|
||||
@@ -1329,34 +1343,34 @@ const viVN = {
|
||||
passwordNotSet: 'Chưa đặt',
|
||||
passwordSetDescription:
|
||||
'Mật khẩu đã được đặt, bạn có thể đăng nhập bằng email và mật khẩu',
|
||||
spaceStatus: 'Tài khoản Space',
|
||||
spaceStatus: 'Tài khoản LangBot',
|
||||
spaceBound: 'Đã liên kết',
|
||||
spaceNotBound: 'Chưa liên kết',
|
||||
spaceBoundDescription:
|
||||
'Tài khoản Space đã liên kết, có thể sử dụng API mô hình chính thức và dịch vụ đám mây',
|
||||
bindSpace: 'Liên kết tài khoản Space',
|
||||
'Tài khoản LangBot đã liên kết, có thể sử dụng API mô hình chính thức và dịch vụ đám mây',
|
||||
bindSpace: 'Liên kết tài khoản LangBot',
|
||||
bindSpaceDescription:
|
||||
'Liên kết để sử dụng API mô hình chính thức và dịch vụ đám mây',
|
||||
bindSpaceButton: 'Liên kết',
|
||||
bindSpaceConfirmTitle: 'Xác nhận liên kết',
|
||||
bindSpaceConfirmDescription:
|
||||
'Bạn sắp liên kết phiên bản cục bộ với tài khoản Space',
|
||||
'Bạn sắp liên kết phiên bản cục bộ với tài khoản LangBot',
|
||||
bindSpaceWarning:
|
||||
'Sau khi liên kết, email đăng nhập của bạn sẽ được đổi từ {{localEmail}} sang email tài khoản Space.',
|
||||
bindSpaceSuccess: 'Liên kết tài khoản Space thành công',
|
||||
bindSpaceFailed: 'Liên kết tài khoản Space thất bại',
|
||||
'Sau khi liên kết, email đăng nhập của bạn sẽ được đổi từ {{localEmail}} sang email tài khoản LangBot.',
|
||||
bindSpaceSuccess: 'Liên kết tài khoản LangBot thành công',
|
||||
bindSpaceFailed: 'Liên kết tài khoản LangBot thất bại',
|
||||
bindSpaceInvalidState:
|
||||
'Yêu cầu liên kết không hợp lệ. Vui lòng thử lại từ cài đặt tài khoản.',
|
||||
setPasswordHint: 'Đặt mật khẩu để đăng nhập bằng email và mật khẩu',
|
||||
spaceEmailMismatch:
|
||||
'Email đăng nhập Space không khớp với email tài khoản cục bộ',
|
||||
'Email tài khoản LangBot không khớp với email tài khoản cục bộ',
|
||||
|
||||
space_account_not_registeredTitle: 'Account not registered',
|
||||
space_account_not_registered:
|
||||
'No local account is registered for this Space email. Ask the Workspace owner for an invitation.',
|
||||
space_account_binding_requiredTitle: 'Space connection required',
|
||||
'No local account is registered for this LangBot Account email. Ask the Workspace owner for an invitation.',
|
||||
space_account_binding_requiredTitle: 'LangBot Account connection required',
|
||||
space_account_binding_required:
|
||||
'This local account must connect Space from Account settings before using Space login.',
|
||||
'This local account must connect a LangBot Account from Account settings before using LangBot Account login.',
|
||||
},
|
||||
monitoring: {
|
||||
title: 'Bảng điều khiển',
|
||||
@@ -1682,7 +1696,6 @@ const viVN = {
|
||||
botCreateSuccess: 'Tạo Bot thành công!',
|
||||
botSaveSuccess: 'Cấu hình Bot đã lưu và bật!',
|
||||
createError: 'Tạo tài nguyên thất bại',
|
||||
spaceAuthError: 'Khởi tạo ủy quyền Space thất bại',
|
||||
skipSaveError: 'Lưu trạng thái bỏ qua thất bại. Vui lòng thử lại.',
|
||||
completeSaveError: 'Lưu trạng thái hoàn tất thất bại. Vui lòng thử lại.',
|
||||
step: {
|
||||
@@ -1760,6 +1773,9 @@ const viVN = {
|
||||
'Quét mã QR bên dưới bằng WeChat để ủy quyền và tự động điền token',
|
||||
loginSuccess: 'Đăng nhập thành công! Token đã được điền tự động',
|
||||
loginFailed: 'Đăng nhập thất bại',
|
||||
connecting: 'Đang kết nối tới dịch vụ WeChat...',
|
||||
waitingForScan: 'Đang chờ quét mã',
|
||||
retry: 'Thử lại',
|
||||
},
|
||||
dingtalk: {
|
||||
createApp: 'Tạo ứng dụng DingTalk chỉ với một lần nhấp',
|
||||
|
||||
@@ -85,24 +85,24 @@ const zhHans = {
|
||||
spaceLoginRecommended: '推荐:使用官方提供的稳定模型 API 和云服务',
|
||||
loginLocal: '使用本地账号登录',
|
||||
loginWithPassword: '通过密码登录',
|
||||
spaceLoginTitle: '通过 Space 登录',
|
||||
spaceLoginTitle: '通过 LangBot 账号登录',
|
||||
spaceLoginDescription: '扫描二维码或访问下方链接进行授权',
|
||||
spaceLoginUserCode: '您的验证码',
|
||||
spaceLoginExpires: '验证码将在 {{seconds}} 秒后过期',
|
||||
spaceLoginWaiting: '等待授权中...',
|
||||
spaceLoginSuccess: '授权成功',
|
||||
spaceLoginFailed: 'Space 登录失败',
|
||||
spaceLoginFailed: 'LangBot 账号登录失败',
|
||||
spaceLoginExpired: '验证码已过期,请重试',
|
||||
spaceLoginCancel: '取消',
|
||||
spaceLoginVisitLink: '访问链接',
|
||||
spaceLoginProcessing: '正在通过 Space 登录',
|
||||
spaceLoginProcessing: '正在通过 LangBot 账号登录',
|
||||
spaceLoginProcessingDescription: '请稍候,正在完成登录...',
|
||||
spaceLoginSuccessDescription: '正在跳转到 LangBot...',
|
||||
spaceLoginError: '登录失败',
|
||||
spaceLoginNoCode: '缺少授权码',
|
||||
backToLogin: '返回登录',
|
||||
backToHome: '返回首页',
|
||||
spaceAccountCannotChangePassword: 'Space 账户无法在此修改密码',
|
||||
spaceAccountCannotChangePassword: 'LangBot 账号无法在此修改密码',
|
||||
theme: '主题',
|
||||
changePassword: '修改密码',
|
||||
currentPassword: '当前密码',
|
||||
@@ -206,6 +206,19 @@ const zhHans = {
|
||||
selectModelAbilities: '选择模型能力',
|
||||
visionAbility: '视觉能力',
|
||||
functionCallAbility: '函数调用',
|
||||
reasoningAbility: '思考能力',
|
||||
reasoningLevel: '思考档位',
|
||||
reasoningLevels: {
|
||||
providerDefault: 'Provider 默认',
|
||||
disabled: '关闭',
|
||||
enabled: '开启',
|
||||
minimal: '最低',
|
||||
low: '低',
|
||||
medium: '中',
|
||||
high: '高',
|
||||
xhigh: '极高',
|
||||
max: '最大',
|
||||
},
|
||||
contextLength: '上下文窗口',
|
||||
contextLengthPlaceholder: '未知',
|
||||
contextLengthInvalid: '上下文窗口必须是正整数',
|
||||
@@ -232,8 +245,8 @@ const zhHans = {
|
||||
llmModels: '对话模型',
|
||||
localProvider: '本地',
|
||||
localProviderDescription: '在本地配置和管理的模型',
|
||||
spaceProviderDescription: '从您的 Space 账户同步的模型',
|
||||
spaceDisabledForLocalAccount: '使用 Space 登录以使用云端模型',
|
||||
spaceProviderDescription: '从您的 LangBot 账号同步的模型',
|
||||
spaceDisabledForLocalAccount: '使用 LangBot 账号登录以使用云端模型',
|
||||
syncModels: '同步',
|
||||
syncSuccess: '同步完成:创建 {{created}} 个,更新 {{updated}} 个',
|
||||
syncError: '同步失败:',
|
||||
@@ -268,13 +281,14 @@ const zhHans = {
|
||||
langbotModelsDescription: 'LangBot Space 提供的云端模型',
|
||||
credits: '积分',
|
||||
loginWithSpace: '使用 LangBot 账号登录',
|
||||
loginToUseModels: '通过 Space 登录以使用云端模型',
|
||||
ownerMustBindSpace: '工作区所有者需要绑定 Space 才能使用 LangBot 模型。',
|
||||
usesOwnerSpaceBilling: '使用工作区所有者的 Space 计费与积分。',
|
||||
loginToUseModels: '通过 LangBot 账号登录以使用云端模型',
|
||||
ownerMustBindSpace:
|
||||
'工作区所有者需要绑定 LangBot 账号才能使用 LangBot 模型。',
|
||||
usesOwnerSpaceBilling: '使用工作区所有者的 LangBot 账号计费与积分。',
|
||||
noModels: '暂无模型',
|
||||
langbotModels: 'LangBot 模型',
|
||||
spaceTrialTooltip:
|
||||
'免费试用积分已就绪!通过 Space 登录即可零配置使用云端模型。',
|
||||
'免费试用积分已就绪!通过 LangBot 账号登录即可零配置使用云端模型。',
|
||||
unlockModels: '登录以使用',
|
||||
editProvider: '编辑供应商',
|
||||
addProvider: '添加供应商',
|
||||
@@ -733,8 +747,9 @@ const zhHans = {
|
||||
debugInfoTitle: '插件调试信息',
|
||||
debugUrl: '调试地址',
|
||||
debugKey: '调试密钥',
|
||||
debugKeyExpires: '将于 {{time}} 轮换;每个工作区的密钥不同',
|
||||
noDebugKey: '(未设置)',
|
||||
debugKeyDisabled: '未设置调试密钥,插件调试无需认证',
|
||||
debugKeyDisabled: '调试凭据暂不可用',
|
||||
boxStatusTitle: 'Box 运行时',
|
||||
boxStatus: '状态',
|
||||
boxConnected: '已连接',
|
||||
@@ -1387,11 +1402,11 @@ const zhHans = {
|
||||
description: '这是您首次启动 LangBot',
|
||||
adminAccountNote: '您在此处初始化使用的账号将作为管理员账号',
|
||||
register: '注册',
|
||||
initWithSpace: '通过 Space 初始化',
|
||||
initWithSpace: '通过 LangBot 账号初始化',
|
||||
spaceRecommended: '推荐:使用官方提供的稳定模型 API 和云服务',
|
||||
spaceInfoTip1: 'Space 提供统一的账户鉴权服务,不会上传您的任何敏感信息。',
|
||||
spaceInfoTip2:
|
||||
'使用 Space 账户登录可使用 LangBot Models 等云服务,您将会获得一定的免费模型调用额度帮助您快速起步。',
|
||||
'使用 LangBot 账号登录可使用 LangBot Models 等云服务,您将会获得一定的免费模型调用额度帮助您快速起步。',
|
||||
spaceInfoTip3:
|
||||
'登录方式不会影响其他功能,您在任何情况下都可以配置使用其他来源的模型。',
|
||||
registerLocal: '注册本地账号',
|
||||
@@ -1445,28 +1460,28 @@ const zhHans = {
|
||||
passwordSet: '已设置',
|
||||
passwordNotSet: '未设置',
|
||||
passwordSetDescription: '您已设置本地密码,可使用邮箱密码登录',
|
||||
spaceStatus: 'Space 账户',
|
||||
spaceStatus: 'LangBot 账号',
|
||||
spaceBound: '已绑定',
|
||||
spaceNotBound: '未绑定',
|
||||
spaceBoundDescription: '已绑定 Space 账户,可使用官方模型 API 和云服务',
|
||||
bindSpace: '绑定 Space 账户',
|
||||
spaceBoundDescription: '已绑定 LangBot 账号,可使用官方模型 API 和云服务',
|
||||
bindSpace: '绑定 LangBot 账号',
|
||||
bindSpaceDescription: '绑定后可使用官方模型 API 和云服务',
|
||||
bindSpaceButton: '绑定',
|
||||
bindSpaceConfirmTitle: '确认绑定',
|
||||
bindSpaceConfirmDescription: '您即将把本地实例绑定到 Space 账户',
|
||||
bindSpaceConfirmDescription: '您即将把本地实例绑定到 LangBot 账号',
|
||||
bindSpaceWarning:
|
||||
'绑定后,您的登录邮箱将从 {{localEmail}} 更改为 Space 账户的邮箱。',
|
||||
bindSpaceSuccess: 'Space 账户绑定成功',
|
||||
bindSpaceFailed: '绑定 Space 账户失败',
|
||||
'绑定后,您的登录邮箱将从 {{localEmail}} 更改为 LangBot 账号的邮箱。',
|
||||
bindSpaceSuccess: 'LangBot 账号绑定成功',
|
||||
bindSpaceFailed: '绑定 LangBot 账号失败',
|
||||
bindSpaceInvalidState: '无效的绑定请求,请从账户设置重新发起',
|
||||
setPasswordHint: '设置密码后可使用邮箱密码登录',
|
||||
spaceEmailMismatch: 'Space登录账号邮箱与本实例账号邮箱不匹配',
|
||||
spaceEmailMismatch: 'LangBot 账号邮箱与本实例账号邮箱不匹配',
|
||||
space_account_not_registeredTitle: '账户尚未注册',
|
||||
space_account_not_registered:
|
||||
'此 Space 邮箱尚无本地账户,请联系工作区所有者获取邀请。',
|
||||
space_account_binding_requiredTitle: '需要绑定 Space',
|
||||
'此 LangBot 账号邮箱尚无本地账户,请联系工作区所有者获取邀请。',
|
||||
space_account_binding_requiredTitle: '需要绑定 LangBot 账号',
|
||||
space_account_binding_required:
|
||||
'此本地账户必须先在账户设置中绑定 Space,才能使用 Space 登录。',
|
||||
'此本地账户必须先在账户设置中绑定 LangBot 账号,才能使用 LangBot 账号登录。',
|
||||
},
|
||||
workspace: {
|
||||
title: '工作区',
|
||||
@@ -1956,7 +1971,6 @@ const zhHans = {
|
||||
botCreateSuccess: '机器人创建成功!',
|
||||
botSaveSuccess: '机器人配置已保存并启用!',
|
||||
createError: '创建资源失败',
|
||||
spaceAuthError: '无法发起 Space 授权',
|
||||
skipSaveError: '保存跳过状态失败,请重试。',
|
||||
completeSaveError: '保存完成状态失败,请重试。',
|
||||
step: {
|
||||
@@ -2096,6 +2110,9 @@ const zhHans = {
|
||||
scanQRCode: '请使用微信扫描以下二维码,授权后将自动登录并填写令牌',
|
||||
loginSuccess: '登录成功!令牌已自动填入',
|
||||
loginFailed: '登录失败',
|
||||
connecting: '正在连接微信服务...',
|
||||
waitingForScan: '等待扫码中',
|
||||
retry: '重试',
|
||||
},
|
||||
dingtalk: {
|
||||
createApp: '一键创建钉钉应用',
|
||||
|
||||
@@ -83,24 +83,24 @@ const zhHant = {
|
||||
spaceLoginRecommended: '推薦:使用官方提供的穩定模型 API 和雲服務',
|
||||
loginLocal: '使用本地帳號登入',
|
||||
loginWithPassword: '透過密碼登入',
|
||||
spaceLoginTitle: '透過 Space 登入',
|
||||
spaceLoginTitle: '透過 LangBot 帳號登入',
|
||||
spaceLoginDescription: '掃描二維碼或訪問下方連結進行授權',
|
||||
spaceLoginUserCode: '您的驗證碼',
|
||||
spaceLoginExpires: '驗證碼將在 {{seconds}} 秒後過期',
|
||||
spaceLoginWaiting: '等待授權中...',
|
||||
spaceLoginSuccess: '授權成功',
|
||||
spaceLoginFailed: 'Space 登入失敗',
|
||||
spaceLoginFailed: 'LangBot 帳號登入失敗',
|
||||
spaceLoginExpired: '驗證碼已過期,請重試',
|
||||
spaceLoginCancel: '取消',
|
||||
spaceLoginVisitLink: '訪問連結',
|
||||
spaceLoginProcessing: '正在透過 Space 登入',
|
||||
spaceLoginProcessing: '正在透過 LangBot 帳號登入',
|
||||
spaceLoginProcessingDescription: '請稍候,正在完成登入...',
|
||||
spaceLoginSuccessDescription: '正在跳轉到 LangBot...',
|
||||
spaceLoginError: '登入失敗',
|
||||
spaceLoginNoCode: '缺少授權碼',
|
||||
backToLogin: '返回登入',
|
||||
backToHome: '返回首頁',
|
||||
spaceAccountCannotChangePassword: 'Space 帳戶無法在此修改密碼',
|
||||
spaceAccountCannotChangePassword: 'LangBot 帳號無法在此修改密碼',
|
||||
theme: '主題',
|
||||
changePassword: '修改密碼',
|
||||
currentPassword: '當前密碼',
|
||||
@@ -205,6 +205,19 @@ const zhHant = {
|
||||
selectModelAbilities: '選擇模型能力',
|
||||
visionAbility: '視覺能力',
|
||||
functionCallAbility: '函數呼叫',
|
||||
reasoningAbility: '思考能力',
|
||||
reasoningLevel: '思考等級',
|
||||
reasoningLevels: {
|
||||
providerDefault: '供應商預設',
|
||||
disabled: '關閉',
|
||||
enabled: '開啟',
|
||||
minimal: '最低',
|
||||
low: '低',
|
||||
medium: '中',
|
||||
high: '高',
|
||||
xhigh: '極高',
|
||||
max: '最大',
|
||||
},
|
||||
contextLength: '上下文視窗',
|
||||
contextLengthPlaceholder: '未知',
|
||||
contextLengthInvalid: '上下文視窗必須是正整數',
|
||||
@@ -231,8 +244,8 @@ const zhHant = {
|
||||
llmModels: '對話模型',
|
||||
localProvider: '本地',
|
||||
localProviderDescription: '在本地設定和管理的模型',
|
||||
spaceProviderDescription: '從您的 Space 帳戶同步的模型',
|
||||
spaceDisabledForLocalAccount: '使用 Space 登入以使用雲端模型',
|
||||
spaceProviderDescription: '從您的 LangBot 帳號同步的模型',
|
||||
spaceDisabledForLocalAccount: '使用 LangBot 帳號登入以使用雲端模型',
|
||||
syncModels: '同步',
|
||||
syncSuccess: '同步完成:建立 {{created}} 個,更新 {{updated}} 個',
|
||||
syncError: '同步失敗:',
|
||||
@@ -266,11 +279,11 @@ const zhHant = {
|
||||
langbotModelsDescription: '由 LangBot Space 提供的雲端模型',
|
||||
credits: '積分',
|
||||
loginWithSpace: '使用 LangBot 帳號登入',
|
||||
loginToUseModels: '使用 Space 登入以使用雲端模型',
|
||||
loginToUseModels: '使用 LangBot 帳號登入以使用雲端模型',
|
||||
noModels: '暫無模型',
|
||||
langbotModels: 'LangBot 模型',
|
||||
spaceTrialTooltip:
|
||||
'免費試用積分已就緒!使用 Space 登入即可零設定使用雲端模型。',
|
||||
'免費試用積分已就緒!使用 LangBot 帳號登入即可零設定使用雲端模型。',
|
||||
unlockModels: '登入以使用',
|
||||
editProvider: '編輯供應商',
|
||||
addProvider: '新增供應商',
|
||||
@@ -304,9 +317,9 @@ const zhHant = {
|
||||
},
|
||||
|
||||
ownerMustBindSpace:
|
||||
'The Workspace owner must connect Space for LangBot Models.',
|
||||
'The Workspace owner must connect a LangBot Account for LangBot Models.',
|
||||
usesOwnerSpaceBilling:
|
||||
"Uses the Workspace owner's Space billing and credits.",
|
||||
"Uses the Workspace owner's LangBot Account billing and credits.",
|
||||
},
|
||||
bots: {
|
||||
title: '機器人',
|
||||
@@ -553,8 +566,9 @@ const zhHant = {
|
||||
debugInfoTitle: '外掛偵錯資訊',
|
||||
debugUrl: '偵錯位址',
|
||||
debugKey: '偵錯金鑰',
|
||||
debugKeyExpires: '將於 {{time}} 輪換;每個工作區的密鑰不同',
|
||||
noDebugKey: '(未設定)',
|
||||
debugKeyDisabled: '未設定偵錯金鑰,外掛偵錯無需認證',
|
||||
debugKeyDisabled: '偵錯憑據暫時無法使用',
|
||||
boxStatusTitle: 'Box 執行時',
|
||||
boxStatus: '狀態',
|
||||
boxConnected: '已連線',
|
||||
@@ -1203,11 +1217,11 @@ const zhHant = {
|
||||
description: '這是您首次啟動 LangBot',
|
||||
adminAccountNote: '您在此處初始化使用的帳號將作為管理員帳號',
|
||||
register: '註冊',
|
||||
initWithSpace: '透過 Space 初始化',
|
||||
initWithSpace: '透過 LangBot 帳號初始化',
|
||||
spaceRecommended: '推薦:使用官方提供的穩定模型 API 和雲服務',
|
||||
spaceInfoTip1: 'Space 提供統一的帳戶鑑權服務,不會上傳您的任何敏感資訊。',
|
||||
spaceInfoTip2:
|
||||
'使用 Space 帳戶登入可使用 LangBot Models 等雲服務,您將會獲得一定的免費模型調用額度幫助您快速起步。',
|
||||
'使用 LangBot 帳號登入可使用 LangBot Models 等雲服務,您將會獲得一定的免費模型調用額度幫助您快速起步。',
|
||||
spaceInfoTip3:
|
||||
'登入方式不會影響其他功能,您在任何情況下都可以配置使用其他來源的模型。',
|
||||
registerLocal: '註冊本地帳號',
|
||||
@@ -1261,29 +1275,29 @@ const zhHant = {
|
||||
passwordSet: '已設定',
|
||||
passwordNotSet: '未設定',
|
||||
passwordSetDescription: '您已設定本地密碼,可使用電子郵件密碼登入',
|
||||
spaceStatus: 'Space 帳戶',
|
||||
spaceStatus: 'LangBot 帳號',
|
||||
spaceBound: '已綁定',
|
||||
spaceNotBound: '未綁定',
|
||||
spaceBoundDescription: '已綁定 Space 帳戶,可使用官方模型 API 和雲服務',
|
||||
bindSpace: '綁定 Space 帳戶',
|
||||
spaceBoundDescription: '已綁定 LangBot 帳號,可使用官方模型 API 和雲服務',
|
||||
bindSpace: '綁定 LangBot 帳號',
|
||||
bindSpaceDescription: '綁定後可使用官方模型 API 和雲服務',
|
||||
bindSpaceButton: '綁定',
|
||||
bindSpaceConfirmTitle: '確認綁定',
|
||||
bindSpaceConfirmDescription: '您即將把本地實例綁定到 Space 帳戶',
|
||||
bindSpaceConfirmDescription: '您即將把本地實例綁定到 LangBot 帳號',
|
||||
bindSpaceWarning:
|
||||
'綁定後,您的登入電子郵件將從 {{localEmail}} 更改為 Space 帳戶的電子郵件。',
|
||||
bindSpaceSuccess: 'Space 帳戶綁定成功',
|
||||
bindSpaceFailed: '綁定 Space 帳戶失敗',
|
||||
'綁定後,您的登入電子郵件將從 {{localEmail}} 更改為 LangBot 帳號的電子郵件。',
|
||||
bindSpaceSuccess: 'LangBot 帳號綁定成功',
|
||||
bindSpaceFailed: '綁定 LangBot 帳號失敗',
|
||||
bindSpaceInvalidState: '無效的綁定請求,請從帳戶設定重新發起',
|
||||
setPasswordHint: '設定密碼後可使用電子郵件密碼登入',
|
||||
spaceEmailMismatch: 'Space登入帳號電子郵件與本實例帳號電子郵件不匹配',
|
||||
spaceEmailMismatch: 'LangBot 帳號電子郵件與本實例帳號電子郵件不匹配',
|
||||
|
||||
space_account_not_registeredTitle: 'Account not registered',
|
||||
space_account_not_registered:
|
||||
'No local account is registered for this Space email. Ask the Workspace owner for an invitation.',
|
||||
space_account_binding_requiredTitle: 'Space connection required',
|
||||
'No local account is registered for this LangBot Account email. Ask the Workspace owner for an invitation.',
|
||||
space_account_binding_requiredTitle: 'LangBot Account connection required',
|
||||
space_account_binding_required:
|
||||
'This local account must connect Space from Account settings before using Space login.',
|
||||
'This local account must connect a LangBot Account from Account settings before using LangBot Account login.',
|
||||
},
|
||||
monitoring: {
|
||||
title: '儀表盤',
|
||||
@@ -1606,7 +1620,6 @@ const zhHant = {
|
||||
botCreateSuccess: '機器人建立成功!',
|
||||
botSaveSuccess: '機器人配置已儲存並啟用!',
|
||||
createError: '建立資源失敗',
|
||||
spaceAuthError: '無法發起 Space 授權',
|
||||
skipSaveError: '儲存跳過狀態失敗,請重試。',
|
||||
completeSaveError: '儲存完成狀態失敗,請重試。',
|
||||
step: {
|
||||
@@ -1706,6 +1719,9 @@ const zhHant = {
|
||||
scanQRCode: '請使用微信掃描以下 QR Code,授權後將自動登入並填寫令牌',
|
||||
loginSuccess: '登入成功!令牌已自動填入',
|
||||
loginFailed: '登入失敗',
|
||||
connecting: '正在連接微信服務...',
|
||||
waitingForScan: '等待掃碼中',
|
||||
retry: '重試',
|
||||
},
|
||||
dingtalk: {
|
||||
createApp: '一鍵建立釘釘應用',
|
||||
|
||||
@@ -34,12 +34,26 @@ test('normalizes only single-line text fields in a dynamic form save snapshot',
|
||||
{ name: 'multiline', type: 'text', default: '' },
|
||||
{ name: 'string-list', type: 'array[string]', default: [] },
|
||||
{ name: 'count', type: 'integer', default: 0 },
|
||||
{
|
||||
name: 'model',
|
||||
type: 'model-fallback-selector',
|
||||
default: { primary: '', fallbacks: [], reasoning: {} },
|
||||
},
|
||||
];
|
||||
const values = {
|
||||
'single-line': '\t hello world \n',
|
||||
multiline: ' keep multiline whitespace \n',
|
||||
'string-list': [' first ', ' second '],
|
||||
count: 3,
|
||||
model: {
|
||||
primary: 'primary-model',
|
||||
fallbacks: ['fallback-model'],
|
||||
reasoning: {
|
||||
'primary-model': 'high',
|
||||
'fallback-model': 'provider_default',
|
||||
'removed-model': 'medium',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
assert.deepEqual(normalizeDynamicFormValuesForSave(specs, values), {
|
||||
@@ -47,5 +61,12 @@ test('normalizes only single-line text fields in a dynamic form save snapshot',
|
||||
multiline: ' keep multiline whitespace \n',
|
||||
'string-list': [' first ', ' second '],
|
||||
count: 3,
|
||||
model: {
|
||||
primary: 'primary-model',
|
||||
fallbacks: ['fallback-model'],
|
||||
reasoning: {
|
||||
'primary-model': 'high',
|
||||
},
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import { readdirSync, readFileSync } from 'node:fs';
|
||||
import test from 'node:test';
|
||||
|
||||
const localeDir = new URL('../../src/i18n/locales/', import.meta.url);
|
||||
const localeFiles = readdirSync(localeDir).filter((name) =>
|
||||
name.endsWith('.ts'),
|
||||
);
|
||||
|
||||
const deprecatedAccountCopy = [
|
||||
/Initialize with Space/i,
|
||||
/Login with Space/i,
|
||||
/Logging in with Space/i,
|
||||
/Space login/i,
|
||||
/Space accounts?/i,
|
||||
/Bind Space Account/i,
|
||||
/Authorize with Space/i,
|
||||
/通过 Space 登录/,
|
||||
/使用 Space 登录/,
|
||||
/Space 登录/,
|
||||
/Space 账户/,
|
||||
/Space 帳戶/,
|
||||
/绑定 Space/,
|
||||
/綁定 Space/,
|
||||
/Space アカウント/,
|
||||
/Space でログイン/,
|
||||
/cuenta de Space/i,
|
||||
/cuentas de Space/i,
|
||||
/cuenta Space/i,
|
||||
/tài khoản Space/i,
|
||||
/บัญชี Space/,
|
||||
/аккаунт(?:ов|а)? Space/i,
|
||||
/аккаунт Space/i,
|
||||
];
|
||||
|
||||
test('user-facing account authentication copy uses LangBot Account terminology', () => {
|
||||
const violations = [];
|
||||
|
||||
for (const file of localeFiles) {
|
||||
const source = readFileSync(new URL(file, localeDir), 'utf8');
|
||||
for (const pattern of deprecatedAccountCopy) {
|
||||
if (pattern.test(source)) violations.push(`${file}: ${pattern}`);
|
||||
}
|
||||
}
|
||||
|
||||
assert.deepEqual(violations, []);
|
||||
});
|
||||
@@ -0,0 +1,73 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import test from 'node:test';
|
||||
|
||||
const root = process.cwd();
|
||||
const dialogPath = path.join(
|
||||
root,
|
||||
'src/app/home/components/qrcode-login/QrCodeLoginDialog.tsx',
|
||||
);
|
||||
const localeDir = path.join(root, 'src/i18n/locales');
|
||||
|
||||
const dialogSource = fs.readFileSync(dialogPath, 'utf8');
|
||||
|
||||
test('QR credential exchanges preserve the active Workspace scope', () => {
|
||||
assert.match(dialogSource, /getActiveWorkspaceUuid/);
|
||||
assert.match(
|
||||
dialogSource,
|
||||
/sessionWorkspaceUuidRef\.current = workspaceUuid/,
|
||||
);
|
||||
assert.match(
|
||||
dialogSource,
|
||||
/const workspaceUuid = sessionWorkspaceUuidRef\.current/,
|
||||
);
|
||||
assert.match(dialogSource, /sessionApiBaseRef\.current = cfg\.apiBase/);
|
||||
assert.match(
|
||||
dialogSource,
|
||||
/`\$\{baseUrlRef\.current\}\$\{sessionApiBaseRef\.current\}\/\$\{sessionIdRef\.current\}`/,
|
||||
);
|
||||
assert.match(dialogSource, /'X-Workspace-Id': workspaceUuid/);
|
||||
|
||||
const workspaceHeaderUses = dialogSource.match(
|
||||
/'X-Workspace-Id': workspaceUuid/g,
|
||||
);
|
||||
assert.equal(
|
||||
workspaceHeaderUses?.length,
|
||||
4,
|
||||
'start, poll, expiry cleanup, and dialog cleanup must all retain Workspace scope',
|
||||
);
|
||||
});
|
||||
|
||||
test('WeChat QR login never reuses Feishu progress copy', () => {
|
||||
const weixinConfig = dialogSource.match(
|
||||
/weixin:\s*\{[\s\S]*?apiBase:\s*'\/api\/v1\/platform\/adapters\/weixin\/login'/,
|
||||
)?.[0];
|
||||
assert.ok(weixinConfig, 'WeChat platform config is missing');
|
||||
assert.match(weixinConfig, /connectingKey:\s*'weixin\.connecting'/);
|
||||
assert.match(weixinConfig, /waitingKey:\s*'weixin\.waitingForScan'/);
|
||||
assert.match(weixinConfig, /retryKey:\s*'weixin\.retry'/);
|
||||
assert.doesNotMatch(weixinConfig, /feishu\./);
|
||||
|
||||
for (const locale of [
|
||||
'en-US.ts',
|
||||
'es-ES.ts',
|
||||
'ja-JP.ts',
|
||||
'ru-RU.ts',
|
||||
'th-TH.ts',
|
||||
'vi-VN.ts',
|
||||
'zh-Hans.ts',
|
||||
'zh-Hant.ts',
|
||||
]) {
|
||||
const source = fs.readFileSync(path.join(localeDir, locale), 'utf8');
|
||||
const block = source.match(/weixin:\s*\{[\s\S]*?\n\s*\},/)?.[0];
|
||||
assert.ok(block, `${locale} is missing the WeChat locale block`);
|
||||
for (const key of ['connecting', 'waitingForScan', 'retry']) {
|
||||
assert.match(
|
||||
block,
|
||||
new RegExp(`\\b${key}:`),
|
||||
`${locale} is missing weixin.${key}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user