mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-21 17:57:14 +00:00
Compare commits
22 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| bf5170ea52 | |||
| 1f1a3aff55 | |||
| de28b3160c | |||
| 79773b669a | |||
| 5084f2391d | |||
| b121c66f18 | |||
| 536534865e | |||
| ff528e8e0b | |||
| f7914a8900 | |||
| c18fc9dfe3 | |||
| bc40418bda | |||
| 45ed6efceb | |||
| c67a503532 | |||
| 8b14d2ab8e | |||
| 97428310b9 | |||
| 338ee733cb | |||
| c3299fd1a6 | |||
| be8478e940 | |||
| 96a535827f | |||
| 9b81a0b606 | |||
| bbc912d0ef | |||
| 20710df9cb |
@@ -1,59 +0,0 @@
|
|||||||
name: Build and deploy production
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [deploy/prod]
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: langbot-production
|
|
||||||
cancel-in-progress: false
|
|
||||||
|
|
||||||
env:
|
|
||||||
CORE_IMAGE: ${{ secrets.DOCKER_USERNAME }}/langbot
|
|
||||||
CLOUD_IMAGE: ${{ secrets.DOCKER_USERNAME }}/langbot-cloud-core
|
|
||||||
SPACE_REF: 58253c53933f95d81b035fbe2efedb55b6c1a82b
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-and-deploy:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
environment: production
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- uses: docker/setup-buildx-action@v3
|
|
||||||
- uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
||||||
- name: Build exact Core image
|
|
||||||
uses: docker/build-push-action@v6
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
push: true
|
|
||||||
tags: |
|
|
||||||
${{ env.CORE_IMAGE }}:prod-${{ github.sha }}
|
|
||||||
${{ env.CORE_IMAGE }}:deploy-prod
|
|
||||||
cache-from: type=gha,scope=core-prod
|
|
||||||
cache-to: type=gha,mode=max,scope=core-prod
|
|
||||||
- name: Checkout production Cloud adapter
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
repository: langbot-app/langbot-space
|
|
||||||
ref: ${{ env.SPACE_REF }}
|
|
||||||
token: ${{ secrets.CLA_PAT }}
|
|
||||||
path: .space
|
|
||||||
- name: Build exact Cloud Core image
|
|
||||||
uses: docker/build-push-action@v6
|
|
||||||
with:
|
|
||||||
context: .space
|
|
||||||
file: .space/Dockerfile.cloud
|
|
||||||
push: true
|
|
||||||
build-args: LANGBOT_CORE_IMAGE=${{ env.CORE_IMAGE }}:prod-${{ github.sha }}
|
|
||||||
tags: |
|
|
||||||
${{ env.CLOUD_IMAGE }}:prod-${{ github.sha }}
|
|
||||||
${{ env.CLOUD_IMAGE }}:deploy-prod
|
|
||||||
cache-from: type=gha,scope=cloud-core-prod
|
|
||||||
cache-to: type=gha,mode=max,scope=cloud-core-prod
|
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
FROM node:22-alpine AS node
|
FROM --platform=$BUILDPLATFORM node:22-alpine AS node
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
|||||||
@@ -83,6 +83,7 @@ cd LangBot/docker
|
|||||||
docker compose --profile all up -d
|
docker compose --profile all up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
### One-Click Cloud Deploy
|
### One-Click Cloud Deploy
|
||||||
|
|
||||||
[](https://zeabur.com/en-US/templates/ZKTBDH)
|
[](https://zeabur.com/en-US/templates/ZKTBDH)
|
||||||
|
|||||||
@@ -83,6 +83,7 @@ cd LangBot/docker
|
|||||||
docker compose --profile all up -d
|
docker compose --profile all up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
### 一键云部署
|
### 一键云部署
|
||||||
|
|
||||||
[](https://zeabur.com/zh-CN/templates/ZKTBDH)
|
[](https://zeabur.com/zh-CN/templates/ZKTBDH)
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ cd LangBot/docker
|
|||||||
docker compose --profile all up -d
|
docker compose --profile all up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
### Despliegue en la Nube con un Clic
|
### Despliegue en la Nube con un Clic
|
||||||
|
|
||||||
[](https://zeabur.com/en-US/templates/ZKTBDH)
|
[](https://zeabur.com/en-US/templates/ZKTBDH)
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ cd LangBot/docker
|
|||||||
docker compose --profile all up -d
|
docker compose --profile all up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
### Déploiement Cloud en un Clic
|
### Déploiement Cloud en un Clic
|
||||||
|
|
||||||
[](https://zeabur.com/en-US/templates/ZKTBDH)
|
[](https://zeabur.com/en-US/templates/ZKTBDH)
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ cd LangBot/docker
|
|||||||
docker compose --profile all up -d
|
docker compose --profile all up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
### ワンクリッククラウドデプロイ
|
### ワンクリッククラウドデプロイ
|
||||||
|
|
||||||
[](https://zeabur.com/en-US/templates/ZKTBDH)
|
[](https://zeabur.com/en-US/templates/ZKTBDH)
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ cd LangBot/docker
|
|||||||
docker compose --profile all up -d
|
docker compose --profile all up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
### 원클릭 클라우드 배포
|
### 원클릭 클라우드 배포
|
||||||
|
|
||||||
[](https://zeabur.com/en-US/templates/ZKTBDH)
|
[](https://zeabur.com/en-US/templates/ZKTBDH)
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ cd LangBot/docker
|
|||||||
docker compose --profile all up -d
|
docker compose --profile all up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
### Облачное развертывание одним кликом
|
### Облачное развертывание одним кликом
|
||||||
|
|
||||||
[](https://zeabur.com/en-US/templates/ZKTBDH)
|
[](https://zeabur.com/en-US/templates/ZKTBDH)
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ cd LangBot/docker
|
|||||||
docker compose --profile all up -d
|
docker compose --profile all up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
### 一鍵雲端部署
|
### 一鍵雲端部署
|
||||||
|
|
||||||
[](https://zeabur.com/zh-CN/templates/ZKTBDH)
|
[](https://zeabur.com/zh-CN/templates/ZKTBDH)
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ cd LangBot/docker
|
|||||||
docker compose --profile all up -d
|
docker compose --profile all up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
### Triển khai đám mây một cú nhấp
|
### Triển khai đám mây một cú nhấp
|
||||||
|
|
||||||
[](https://zeabur.com/en-US/templates/ZKTBDH)
|
[](https://zeabur.com/en-US/templates/ZKTBDH)
|
||||||
|
|||||||
@@ -1,97 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
set -Eeuo pipefail
|
|
||||||
|
|
||||||
cd /opt/langbot-cloud-prod
|
|
||||||
TAG=${1:?usage: deploy.sh prod-<40-char-sha>}
|
|
||||||
[[ "$TAG" =~ ^prod-[0-9a-f]{40}$ ]] || { echo 'invalid immutable image tag' >&2; exit 2; }
|
|
||||||
[[ -s .env ]] || { echo '/opt/langbot-cloud-prod/.env is missing' >&2; exit 3; }
|
|
||||||
|
|
||||||
rendered_compose=$(docker compose config)
|
|
||||||
grep -Fq 'LANGBOT_SPACE_CONTROL_PLANE_URL: https://space.langbot.app' <<<"$rendered_compose" || {
|
|
||||||
echo 'Cloud control-plane URL must be https://space.langbot.app' >&2
|
|
||||||
exit 4
|
|
||||||
}
|
|
||||||
grep -Fq 'SPACE__URL: https://space.langbot.app' <<<"$rendered_compose" || {
|
|
||||||
echo 'Cloud user-facing Space URL must be https://space.langbot.app' >&2
|
|
||||||
exit 5
|
|
||||||
}
|
|
||||||
grep -Eq 'LANGBOT_TELEMETRY_INGEST_TOKEN: .+' <<<"$rendered_compose" || {
|
|
||||||
echo 'Cloud telemetry ingest token must be configured' >&2
|
|
||||||
exit 6
|
|
||||||
}
|
|
||||||
|
|
||||||
update_env() {
|
|
||||||
local key=$1 value=$2
|
|
||||||
python3 - "$key" "$value" <<'PY'
|
|
||||||
from pathlib import Path
|
|
||||||
import os
|
|
||||||
import sys
|
|
||||||
|
|
||||||
path = Path('.env')
|
|
||||||
key, value = sys.argv[1:]
|
|
||||||
lines = path.read_text().splitlines()
|
|
||||||
updated = False
|
|
||||||
for index, line in enumerate(lines):
|
|
||||||
if line.startswith(f'{key}='):
|
|
||||||
lines[index] = f'{key}={value}'
|
|
||||||
updated = True
|
|
||||||
break
|
|
||||||
if not updated:
|
|
||||||
lines.append(f'{key}={value}')
|
|
||||||
temporary = Path('.env.tmp')
|
|
||||||
temporary.write_text('\n'.join(lines) + '\n')
|
|
||||||
os.chmod(temporary, 0o600)
|
|
||||||
temporary.replace(path)
|
|
||||||
PY
|
|
||||||
}
|
|
||||||
update_env LANGBOT_IMAGE_TAG "$TAG"
|
|
||||||
set -a
|
|
||||||
. ./.env
|
|
||||||
set +a
|
|
||||||
: "${CLOUD_V2_CONTROL_PLANE_TOKEN:?CLOUD_V2_CONTROL_PLANE_TOKEN is required}"
|
|
||||||
|
|
||||||
for attempt in 1 2 3 4 5; do
|
|
||||||
if docker compose pull postgres redis migrate plugin-runtime core; then
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if [ "$attempt" -eq 5 ]; then
|
|
||||||
echo "docker compose pull failed after $attempt attempts" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
delay=$((attempt * 10))
|
|
||||||
echo "docker compose pull failed (attempt $attempt/5); retrying in ${delay}s" >&2
|
|
||||||
sleep "$delay"
|
|
||||||
done
|
|
||||||
docker compose up -d postgres redis
|
|
||||||
for _ in $(seq 1 60); do
|
|
||||||
if docker compose exec -T postgres pg_isready -U langbot_operator -d langbot >/dev/null 2>&1; then break; fi
|
|
||||||
sleep 2
|
|
||||||
done
|
|
||||||
docker compose exec -T postgres pg_isready -U langbot_operator -d langbot >/dev/null
|
|
||||||
|
|
||||||
docker compose exec -T postgres psql -v ON_ERROR_STOP=1 -U langbot_operator -d langbot \
|
|
||||||
-v runtime_password="$POSTGRES_RUNTIME_PASSWORD" <<'SQL'
|
|
||||||
SELECT format('CREATE ROLE langbot_runtime LOGIN PASSWORD %L', :'runtime_password')
|
|
||||||
WHERE NOT EXISTS (SELECT 1 FROM pg_roles WHERE rolname = 'langbot_runtime')\gexec
|
|
||||||
ALTER ROLE langbot_runtime PASSWORD :'runtime_password';
|
|
||||||
GRANT CONNECT ON DATABASE langbot TO langbot_runtime;
|
|
||||||
REVOKE CREATE ON SCHEMA public FROM PUBLIC, langbot_runtime;
|
|
||||||
REVOKE ALL PRIVILEGES ON ALL TABLES IN SCHEMA public FROM langbot_runtime;
|
|
||||||
REVOKE ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public FROM langbot_runtime;
|
|
||||||
ALTER DEFAULT PRIVILEGES FOR ROLE langbot_operator IN SCHEMA public REVOKE ALL ON TABLES FROM langbot_runtime;
|
|
||||||
ALTER DEFAULT PRIVILEGES FOR ROLE langbot_operator IN SCHEMA public REVOKE ALL ON SEQUENCES FROM langbot_runtime;
|
|
||||||
GRANT USAGE ON SCHEMA public TO langbot_runtime;
|
|
||||||
SQL
|
|
||||||
|
|
||||||
docker compose --profile tools run --rm migrate
|
|
||||||
|
|
||||||
docker compose up -d --remove-orphans plugin-runtime core
|
|
||||||
for _ in $(seq 1 90); do
|
|
||||||
if docker compose exec -T core python -c 'import urllib.request; urllib.request.urlopen("http://127.0.0.1:5300/healthz", timeout=3)' >/dev/null 2>&1; then
|
|
||||||
docker compose ps
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
sleep 2
|
|
||||||
done
|
|
||||||
docker compose logs --tail=200 core plugin-runtime >&2
|
|
||||||
exit 1
|
|
||||||
@@ -1,162 +0,0 @@
|
|||||||
services:
|
|
||||||
postgres:
|
|
||||||
image: pgvector/pgvector:pg17
|
|
||||||
container_name: langbot-cloud-postgres
|
|
||||||
restart: unless-stopped
|
|
||||||
environment:
|
|
||||||
POSTGRES_DB: langbot
|
|
||||||
POSTGRES_USER: langbot_operator
|
|
||||||
POSTGRES_PASSWORD: ${POSTGRES_OPERATOR_PASSWORD}
|
|
||||||
volumes:
|
|
||||||
- postgres-data:/var/lib/postgresql/data
|
|
||||||
healthcheck:
|
|
||||||
test: [CMD-SHELL, "pg_isready -U langbot_operator -d langbot"]
|
|
||||||
interval: 5s
|
|
||||||
timeout: 5s
|
|
||||||
retries: 30
|
|
||||||
networks: [internal]
|
|
||||||
|
|
||||||
redis:
|
|
||||||
image: redis:7.4-alpine
|
|
||||||
container_name: langbot-cloud-redis
|
|
||||||
restart: unless-stopped
|
|
||||||
command: [redis-server, --appendonly, "yes", --requirepass, "${REDIS_PASSWORD}"]
|
|
||||||
volumes:
|
|
||||||
- redis-data:/data
|
|
||||||
healthcheck:
|
|
||||||
test: [CMD-SHELL, "redis-cli -a \"$${REDIS_PASSWORD}\" ping | grep PONG"]
|
|
||||||
interval: 5s
|
|
||||||
timeout: 5s
|
|
||||||
retries: 20
|
|
||||||
environment:
|
|
||||||
REDIS_PASSWORD: ${REDIS_PASSWORD}
|
|
||||||
networks: [internal]
|
|
||||||
|
|
||||||
migrate:
|
|
||||||
image: rockchin/langbot-cloud-core:${LANGBOT_IMAGE_TAG}
|
|
||||||
profiles: [tools]
|
|
||||||
command: [uv, run, langbot, migrate, --cloud]
|
|
||||||
environment: &core-env
|
|
||||||
TZ: Asia/Shanghai
|
|
||||||
SYSTEM__INSTANCE_ID: ${CLOUD_V2_INSTANCE_UUID}
|
|
||||||
SYSTEM__EDITION: cloud
|
|
||||||
SYSTEM__RECOVERY_KEY: ${SYSTEM_RECOVERY_KEY}
|
|
||||||
SYSTEM__JWT__SECRET: ${JWT_SECRET}
|
|
||||||
SYSTEM__LIMITATION__MAX_BOTS: "2"
|
|
||||||
SYSTEM__LIMITATION__MAX_PIPELINES: "3"
|
|
||||||
SYSTEM__LIMITATION__MAX_EXTENSIONS: "3"
|
|
||||||
SYSTEM__LIMITATION__MAX_KNOWLEDGE_BASES: "2"
|
|
||||||
API__WEBHOOK_PREFIX: https://cloud.langbot.app
|
|
||||||
API__WEBUI_URL: https://cloud.langbot.app
|
|
||||||
WORKSPACE__INVITATIONS__PUBLIC_WEB_URL: https://cloud.langbot.app
|
|
||||||
DATABASE__USE: postgresql
|
|
||||||
DATABASE__POSTGRESQL__URL: postgresql+asyncpg://langbot_runtime:${POSTGRES_RUNTIME_PASSWORD}@postgres:5432/langbot
|
|
||||||
DATABASE__CLOUD_MIGRATION__OPERATOR_DSN_ENV: LANGBOT_CLOUD_MIGRATION_DSN
|
|
||||||
LANGBOT_CLOUD_MIGRATION_DSN: postgresql://langbot_operator:${POSTGRES_OPERATOR_PASSWORD}@postgres:5432/langbot
|
|
||||||
VDB__USE: pgvector
|
|
||||||
VDB__PGVECTOR__USE_BUSINESS_DATABASE: "true"
|
|
||||||
VDB__PGVECTOR__ALLOWED_DIMENSIONS: "384,512,768,1024,1536"
|
|
||||||
PLUGIN__ENABLE: "true"
|
|
||||||
PLUGIN__RUNTIME_WS_URL: ws://plugin-runtime:5400/control/ws
|
|
||||||
PLUGIN__DISPLAY_PLUGIN_DEBUG_URL: wss://cloud.langbot.app/plugin/debug/ws
|
|
||||||
PLUGIN__WORKER__MAX_CPUS: "0.25"
|
|
||||||
PLUGIN__WORKER__MAX_MEMORY_MB: "256"
|
|
||||||
PLUGIN__WORKER__MAX_PIDS: "128"
|
|
||||||
PLUGIN__WORKER__MAX_WORKERS: "16"
|
|
||||||
PLUGIN__WORKER__MAX_TOTAL_CPUS: "4.0"
|
|
||||||
PLUGIN__WORKER__MAX_TOTAL_MEMORY_MB: "4096"
|
|
||||||
PLUGIN__WORKER__REQUIRE_HARD_LIMITS: "true"
|
|
||||||
LANGBOT_PLUGIN_RUNTIME_CONTROL_TOKEN: ${PLUGIN_RUNTIME_CONTROL_TOKEN}
|
|
||||||
# Cloud v2 currently grants no managed Box capability. Keep the shared
|
|
||||||
# runtime deployed but disable Core integration until a hard-quota-capable
|
|
||||||
# backend can satisfy the fail-closed Cloud readiness contract.
|
|
||||||
BOX__ENABLED: "false"
|
|
||||||
BOX__BACKEND: nsjail
|
|
||||||
BOX__RUNTIME__ENDPOINT: ws://box:5410
|
|
||||||
BOX__ADMISSION__REQUIRED: "true"
|
|
||||||
BOX__ADMISSION__LOGICAL_SESSION_ID: global
|
|
||||||
BOX__ADMISSION__REQUIRED_BACKEND: nsjail
|
|
||||||
BOX__ADMISSION__MAX_SESSIONS: "1"
|
|
||||||
BOX__ADMISSION__MAX_MANAGED_PROCESSES: "0"
|
|
||||||
BOX__ADMISSION__CPUS: "0.25"
|
|
||||||
BOX__ADMISSION__MEMORY_MB: "256"
|
|
||||||
BOX__ADMISSION__WORKSPACE_QUOTA_MB: "256"
|
|
||||||
BOX__LOCAL__HOST_ROOT: /app/data/box
|
|
||||||
BOX__LOCAL__DEFAULT_WORKSPACE: /app/data/box
|
|
||||||
BOX__LOCAL__ALLOWED_MOUNT_ROOTS: /app/data/box
|
|
||||||
LANGBOT_BOX_CONTROL_TOKEN: ${BOX_CONTROL_TOKEN}
|
|
||||||
MCP__STDIO__ENABLED: "false"
|
|
||||||
LANGBOT_SPACE_CONTROL_PLANE_URL: https://space.langbot.app
|
|
||||||
LANGBOT_SPACE_CONTROL_PLANE_TOKEN: ${CLOUD_V2_CONTROL_PLANE_TOKEN}
|
|
||||||
LANGBOT_TELEMETRY_INGEST_TOKEN: ${CLOUD_V2_CONTROL_PLANE_TOKEN}
|
|
||||||
LANGBOT_SPACE_CONTROL_PLANE_PUBLIC_KEY: ${CLOUD_V2_MANIFEST_PUBLIC_KEY}
|
|
||||||
LANGBOT_SPACE_CONTROL_PLANE_KEY_ID: ${CLOUD_V2_MANIFEST_KEY_ID}
|
|
||||||
SPACE__URL: https://space.langbot.app
|
|
||||||
depends_on:
|
|
||||||
postgres: {condition: service_healthy}
|
|
||||||
networks: [internal]
|
|
||||||
|
|
||||||
plugin-runtime:
|
|
||||||
image: rockchin/langbot:${LANGBOT_IMAGE_TAG}
|
|
||||||
container_name: langbot-cloud-plugin-runtime
|
|
||||||
restart: unless-stopped
|
|
||||||
command: [uv, run, python, -m, langbot_plugin.cli.__init__, rt]
|
|
||||||
environment:
|
|
||||||
LANGBOT_PLUGIN_RUNTIME_CONTROL_TOKEN: ${PLUGIN_RUNTIME_CONTROL_TOKEN}
|
|
||||||
volumes:
|
|
||||||
- plugin-data:/app/data
|
|
||||||
- /sys/fs/cgroup:/sys/fs/cgroup:rw
|
|
||||||
cgroup: host
|
|
||||||
privileged: true
|
|
||||||
expose: ["5400"]
|
|
||||||
networks: [internal]
|
|
||||||
|
|
||||||
box:
|
|
||||||
image: rockchin/langbot:${LANGBOT_IMAGE_TAG}
|
|
||||||
container_name: langbot-cloud-box
|
|
||||||
restart: unless-stopped
|
|
||||||
command: [uv, run, lbp, box, --host, 0.0.0.0, --ws-control-port, "5410"]
|
|
||||||
environment:
|
|
||||||
LANGBOT_BOX_CONTROL_TOKEN: ${BOX_CONTROL_TOKEN}
|
|
||||||
LANGBOT_BOX_ROOT: /app/data/box
|
|
||||||
volumes:
|
|
||||||
- box-data:/app/data/box
|
|
||||||
- /sys/fs/cgroup:/sys/fs/cgroup:rw
|
|
||||||
cgroup: host
|
|
||||||
privileged: true
|
|
||||||
expose: ["5410"]
|
|
||||||
networks: [internal]
|
|
||||||
|
|
||||||
core:
|
|
||||||
image: rockchin/langbot-cloud-core:${LANGBOT_IMAGE_TAG}
|
|
||||||
container_name: langbot-cloud-core
|
|
||||||
restart: unless-stopped
|
|
||||||
environment: *core-env
|
|
||||||
volumes:
|
|
||||||
- core-data:/app/data
|
|
||||||
- box-data:/app/data/box
|
|
||||||
depends_on:
|
|
||||||
postgres: {condition: service_healthy}
|
|
||||||
redis: {condition: service_healthy}
|
|
||||||
plugin-runtime: {condition: service_started}
|
|
||||||
box: {condition: service_started}
|
|
||||||
expose: ["5300"]
|
|
||||||
healthcheck:
|
|
||||||
test: [CMD-SHELL, "python -c 'import urllib.request; urllib.request.urlopen(\"http://127.0.0.1:5300/healthz\", timeout=3)'" ]
|
|
||||||
interval: 10s
|
|
||||||
timeout: 5s
|
|
||||||
retries: 30
|
|
||||||
start_period: 30s
|
|
||||||
networks: [internal, shared-network]
|
|
||||||
|
|
||||||
networks:
|
|
||||||
internal:
|
|
||||||
shared-network:
|
|
||||||
external: true
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
postgres-data:
|
|
||||||
redis-data:
|
|
||||||
plugin-data:
|
|
||||||
box-data:
|
|
||||||
core-data:
|
|
||||||
@@ -47,11 +47,10 @@ services:
|
|||||||
restart: on-failure
|
restart: on-failure
|
||||||
environment:
|
environment:
|
||||||
- TZ=Asia/Shanghai
|
- TZ=Asia/Shanghai
|
||||||
# Shared control-plane secret used to authenticate both the RPC socket
|
# Optional shared control-plane secret used to authenticate both the RPC
|
||||||
# and managed-process relay. Generate once (for example with
|
# socket and managed-process relay. Leave unset on both OSS services, or
|
||||||
# ``openssl rand -hex 32``) and export it before enabling this profile.
|
# generate one with ``openssl rand -hex 32`` and set the same value on
|
||||||
# An empty value is accepted by Compose so Box can remain optional, but
|
# both ends. Strongly recommended when the deployment is Internet-accessible.
|
||||||
# the Box runtime itself fails closed when the profile is started.
|
|
||||||
- LANGBOT_BOX_CONTROL_TOKEN=${LANGBOT_BOX_CONTROL_TOKEN:-}
|
- LANGBOT_BOX_CONTROL_TOKEN=${LANGBOT_BOX_CONTROL_TOKEN:-}
|
||||||
# Box has its own process-wide blocking-work budget.
|
# Box has its own process-wide blocking-work budget.
|
||||||
- LANGBOT_BLOCKING_EXECUTOR_MAX_WORKERS=${LANGBOT_BLOCKING_EXECUTOR_MAX_WORKERS:-8}
|
- LANGBOT_BLOCKING_EXECUTOR_MAX_WORKERS=${LANGBOT_BLOCKING_EXECUTOR_MAX_WORKERS:-8}
|
||||||
@@ -79,8 +78,9 @@ services:
|
|||||||
- TZ=Asia/Shanghai
|
- TZ=Asia/Shanghai
|
||||||
# Optional. Leave unset on both OSS services, or match plugin Runtime.
|
# Optional. Leave unset on both OSS services, or match plugin Runtime.
|
||||||
- LANGBOT_PLUGIN_RUNTIME_CONTROL_TOKEN=${LANGBOT_PLUGIN_RUNTIME_CONTROL_TOKEN:-}
|
- LANGBOT_PLUGIN_RUNTIME_CONTROL_TOKEN=${LANGBOT_PLUGIN_RUNTIME_CONTROL_TOKEN:-}
|
||||||
# Must match the value supplied to langbot_box. The token is sent only
|
# When set, this must match langbot_box. If both ends leave it unset,
|
||||||
# in WebSocket handshake headers, never in URLs or action payloads.
|
# OSS permits the connection without token authentication. The token is
|
||||||
|
# sent only in WebSocket handshake headers, never in URLs or payloads.
|
||||||
- LANGBOT_BOX_CONTROL_TOKEN=${LANGBOT_BOX_CONTROL_TOKEN:-}
|
- LANGBOT_BOX_CONTROL_TOKEN=${LANGBOT_BOX_CONTROL_TOKEN:-}
|
||||||
# Core process-wide blocking-work admission. These are native config
|
# Core process-wide blocking-work admission. These are native config
|
||||||
# overrides and are persisted with the effective data/config.yaml.
|
# overrides and are persisted with the effective data/config.yaml.
|
||||||
|
|||||||
@@ -103,11 +103,11 @@ This log records implementation choices made while delivering the Workspace arch
|
|||||||
- Decision: New Core JWTs require `iss=langbot-core`, an audience derived from the immutable instance UUID, and an expiry. Legacy community tokens are accepted only when they have the historical issuer, carry no audience, and the active policy is the OSS singleton policy.
|
- Decision: New Core JWTs require `iss=langbot-core`, an audience derived from the immutable instance UUID, and an expiry. Legacy community tokens are accepted only when they have the historical issuer, carry no audience, and the active policy is the OSS singleton policy.
|
||||||
- Reason: A token issued by one instance must not authenticate against another instance that happens to share a secret, and a compatibility decoder must not become an alternate path around the SaaS trust boundary.
|
- Reason: A token issued by one instance must not authenticate against another instance that happens to share a secret, and a compatibility decoder must not become an alternate path around the SaaS trust boundary.
|
||||||
|
|
||||||
### Runtime control transports authenticate before protocol dispatch
|
### Runtime control transports support opt-in shared-secret authentication
|
||||||
|
|
||||||
- Decision: External Plugin Runtime and Box WebSocket control channels require independent strong shared secrets in handshake headers. Locally managed child processes receive ephemeral secrets through their environment; secrets are not placed in URLs, process arguments, request payloads, or logs. Box additionally binds the first authenticated control channel to one trusted instance. Plugin Runtime debug and control credentials remain separate.
|
- Decision: OSS external Plugin Runtime and Box WebSocket control channels preserve tokenless standalone compatibility when the corresponding control token is unset. When a Runtime configures a token, it validates the independent shared secret in the handshake before protocol dispatch. Locally managed child processes still receive ephemeral secrets through their environment; secrets are not placed in URLs, process arguments, request payloads, or logs. Box additionally pins the first control channel to one declared instance identity. Plugin Runtime debug and control credentials remain separate.
|
||||||
- Reason: Workspace context inside an RPC payload is not trustworthy until the transport peer itself is authenticated. Separating control and debug credentials also limits accidental privilege reuse.
|
- Reason: Local OSS development must remain backward compatible, while exposed or shared Runtime endpoints can opt into transport authentication. Separating control and debug credentials also limits accidental privilege reuse.
|
||||||
- Deployment consequence: Docker Compose and Kubernetes wire one shared secret to each host/runtime pair. An empty external-runtime secret fails startup instead of silently exposing an unauthenticated socket.
|
- Deployment consequence: Docker Compose and Kubernetes should wire one strong shared secret to each host/runtime pair. Both sides must use the same value for protection to be effective; a Runtime configured with a token rejects clients that omit it or send a different value.
|
||||||
|
|
||||||
### Dashboard WebSocket sessions are tenant runtime objects
|
### Dashboard WebSocket sessions are tenant runtime objects
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -71,7 +71,7 @@ dependencies = [
|
|||||||
"chromadb>=1.0.0,<2.0.0",
|
"chromadb>=1.0.0,<2.0.0",
|
||||||
"qdrant-client (>=1.15.1,<2.0.0)",
|
"qdrant-client (>=1.15.1,<2.0.0)",
|
||||||
"pyseekdb==1.1.0.post3",
|
"pyseekdb==1.1.0.post3",
|
||||||
"langbot-plugin @ git+https://github.com/langbot-app/langbot-plugin-sdk.git@9d216208cdfb41f0cb7fcb64632e2a46816d6dc6",
|
"langbot-plugin==0.5.3",
|
||||||
"asyncpg>=0.30.0",
|
"asyncpg>=0.30.0",
|
||||||
"line-bot-sdk>=3.19.0",
|
"line-bot-sdk>=3.19.0",
|
||||||
"matrix-nio>=0.25.2",
|
"matrix-nio>=0.25.2",
|
||||||
|
|||||||
@@ -27,10 +27,11 @@ The `all` / `box` profile starts three services:
|
|||||||
- `langbot_box` — Box sandbox runtime (`:5410`). Uses the host Docker socket to
|
- `langbot_box` — Box sandbox runtime (`:5410`). Uses the host Docker socket to
|
||||||
spawn sandbox containers, so the **Box root host path and in-container path
|
spawn sandbox containers, so the **Box root host path and in-container path
|
||||||
must be identical** (`BOX__LOCAL__HOST_ROOT=${LANGBOT_BOX_ROOT:-${PWD}/data/box}`).
|
must be identical** (`BOX__LOCAL__HOST_ROOT=${LANGBOT_BOX_ROOT:-${PWD}/data/box}`).
|
||||||
Its RPC and managed-process relay require a shared
|
OSS allows its RPC and managed-process relay to run without a token when both
|
||||||
`LANGBOT_BOX_CONTROL_TOKEN` (at least 32 non-whitespace characters) in both
|
sides leave `LANGBOT_BOX_CONTROL_TOKEN` unset. For an exposed endpoint, set
|
||||||
the LangBot and Box containers. Generate it once with `openssl rand -hex 32`;
|
the same value of at least 32 non-whitespace characters in both the LangBot
|
||||||
never put it in `box.runtime.endpoint` or commit it to config.
|
and Box containers. Generate it once with `openssl rand -hex 32`; never put
|
||||||
|
it in `box.runtime.endpoint` or commit it to config.
|
||||||
|
|
||||||
A Compose deployment may optionally set
|
A Compose deployment may optionally set
|
||||||
`LANGBOT_PLUGIN_RUNTIME_CONTROL_TOKEN` on both `langbot` and
|
`LANGBOT_PLUGIN_RUNTIME_CONTROL_TOKEN` on both `langbot` and
|
||||||
|
|||||||
@@ -6,7 +6,8 @@ description: Browse and search the LangBot Space marketplaces (plugins, MCP serv
|
|||||||
# LangBot Space MCP Operations
|
# LangBot Space MCP Operations
|
||||||
|
|
||||||
LangBot Space (space.langbot.app) exposes an **MCP server** so user-facing AI
|
LangBot Space (space.langbot.app) exposes an **MCP server** so user-facing AI
|
||||||
agents can browse and search the marketplaces (plugins, MCP servers, skills).
|
agents can browse and search the marketplaces (plugins, MCP servers, skills) and
|
||||||
|
rank live models for automated setup.
|
||||||
|
|
||||||
## Endpoint
|
## Endpoint
|
||||||
|
|
||||||
@@ -46,10 +47,12 @@ Authorization: Bearer lbpat_...uests without a valid PAT get `401 Unauthorized`.
|
|||||||
| `list_plugins` / `search_plugins` / `get_plugin` | Plugin marketplace |
|
| `list_plugins` / `search_plugins` / `get_plugin` | Plugin marketplace |
|
||||||
| `list_mcp_servers` / `search_mcp_servers` / `get_mcp_server` | MCP-server marketplace |
|
| `list_mcp_servers` / `search_mcp_servers` / `get_mcp_server` | MCP-server marketplace |
|
||||||
| `list_skills` / `search_skills` / `get_skill` | Skill marketplace |
|
| `list_skills` / `search_skills` / `get_skill` | Skill marketplace |
|
||||||
|
| `select_models` | Live best-first model list for setup wizards; optional `category` filter |
|
||||||
|
|
||||||
`list_*` and `search_*` are paged (`page`, `page_size`). `get_*` takes
|
`list_*` and `search_*` are paged (`page`, `page_size`). `get_*` takes
|
||||||
`author` + `name`. The tool surface mirrors the REST endpoints under
|
`author` + `name`. The tool surface mirrors the REST endpoints under
|
||||||
`/api/v1/marketplace/*` and is read/browse only.
|
`/api/v1/marketplace/*`; `select_models` mirrors `/api/v1/models/selection`.
|
||||||
|
All tools are read-only.
|
||||||
|
|
||||||
## How to use
|
## How to use
|
||||||
|
|
||||||
@@ -58,12 +61,16 @@ Authorization: Bearer lbpat_...uests without a valid PAT get `401 Unauthorized`.
|
|||||||
3. Use `search_plugins` / `search_mcp_servers` / `search_skills` to find items,
|
3. Use `search_plugins` / `search_mcp_servers` / `search_skills` to find items,
|
||||||
then `get_*` for details (e.g. to obtain author/name for installation in
|
then `get_*` for details (e.g. to obtain author/name for installation in
|
||||||
LangBot itself).
|
LangBot itself).
|
||||||
|
4. For automatic local-agent setup, call `select_models` (optionally with
|
||||||
|
`category`) and choose the first compatible item. Ordering is latest probe
|
||||||
|
state (available, unprobed, unavailable), then Space recommendation. Each
|
||||||
|
item includes `availability.up`, `last_probed_at`, latency, and HTTP status.
|
||||||
|
|
||||||
## Implementation & maintenance (for Space developers)
|
## Implementation & maintenance (for Space developers)
|
||||||
|
|
||||||
- Server: `internal/controller/mcp/server.go` (official Go MCP SDK
|
- Server: `internal/controller/mcp/server.go` (official Go MCP SDK
|
||||||
`github.com/modelcontextprotocol/go-sdk`). Tools call the service layer
|
`github.com/modelcontextprotocol/go-sdk`). Tools call the service layer
|
||||||
(`PluginService`, `MCPService`, `SkillService`) directly.
|
(`PluginService`, `MCPService`, `SkillService`, `ModelStatusService`) directly.
|
||||||
- Mount: `internal/controller/api.go` at `/mcp` and `/mcp/*any`.
|
- Mount: `internal/controller/api.go` at `/mcp` and `/mcp/*any`.
|
||||||
- Auth: PAT via `AccountService.ValidatePersonalAccessToken`.
|
- Auth: PAT via `AccountService.ValidatePersonalAccessToken`.
|
||||||
- Docs: `docs/MCP_SERVER.md`.
|
- Docs: `docs/MCP_SERVER.md`.
|
||||||
|
|||||||
@@ -398,7 +398,16 @@ class PluginsRouterGroup(group.RouterGroup):
|
|||||||
|
|
||||||
# Get debug URL from config
|
# Get debug URL from config
|
||||||
plugin_config = self.ap.instance_config.data.get('plugin', {})
|
plugin_config = self.ap.instance_config.data.get('plugin', {})
|
||||||
debug_url = plugin_config.get('display_plugin_debug_url', 'http://localhost:5401')
|
debug_url = plugin_config.get(
|
||||||
|
'display_plugin_debug_url',
|
||||||
|
'ws://localhost:5401/plugin/debug/ws',
|
||||||
|
)
|
||||||
|
parsed_debug_url = urlparse(debug_url)
|
||||||
|
if parsed_debug_url.scheme in {'http', 'https'}:
|
||||||
|
debug_url = parsed_debug_url._replace(
|
||||||
|
scheme='wss' if parsed_debug_url.scheme == 'https' else 'ws',
|
||||||
|
path=parsed_debug_url.path or '/plugin/debug/ws',
|
||||||
|
).geturl()
|
||||||
|
|
||||||
return self.success(
|
return self.success(
|
||||||
data={
|
data={
|
||||||
|
|||||||
@@ -14,13 +14,6 @@ from ...service.user import ControlPlaneDirectoryRequiredError, PublicRegistrati
|
|||||||
|
|
||||||
@group.group_class('user', '/api/v1/user')
|
@group.group_class('user', '/api/v1/user')
|
||||||
class UserRouterGroup(group.RouterGroup):
|
class UserRouterGroup(group.RouterGroup):
|
||||||
@staticmethod
|
|
||||||
def _origin(value: str) -> tuple[str, str, int | None] | None:
|
|
||||||
parsed = urlsplit(value)
|
|
||||||
if parsed.scheme not in {'http', 'https'} or not parsed.hostname:
|
|
||||||
return None
|
|
||||||
return parsed.scheme, parsed.hostname.casefold(), parsed.port
|
|
||||||
|
|
||||||
def _validate_space_redirect_uri(self, redirect_uri: str, *, bind: bool) -> str:
|
def _validate_space_redirect_uri(self, redirect_uri: str, *, bind: bool) -> str:
|
||||||
parsed = urlsplit(redirect_uri)
|
parsed = urlsplit(redirect_uri)
|
||||||
if (
|
if (
|
||||||
@@ -38,17 +31,8 @@ class UserRouterGroup(group.RouterGroup):
|
|||||||
if query != {'mode': ['bind']}:
|
if query != {'mode': ['bind']}:
|
||||||
raise ValueError('Invalid Space binding redirect_uri')
|
raise ValueError('Invalid Space binding redirect_uri')
|
||||||
elif query:
|
elif query:
|
||||||
raise ValueError('Invalid Space login redirect_uri')
|
raise ValueError('Invalid LangBot Account login redirect_uri')
|
||||||
|
|
||||||
redirect_origin = self._origin(redirect_uri)
|
|
||||||
api_config = self.ap.instance_config.data.get('api', {})
|
|
||||||
trusted_origins = {
|
|
||||||
self._origin(str(api_config.get(config_key, '') or '').strip())
|
|
||||||
for config_key in ('webui_url', 'webhook_prefix')
|
|
||||||
}
|
|
||||||
trusted_origins.discard(None)
|
|
||||||
if redirect_origin not in trusted_origins:
|
|
||||||
raise ValueError('Untrusted redirect_uri origin')
|
|
||||||
return redirect_uri
|
return redirect_uri
|
||||||
|
|
||||||
async def initialize(self) -> None:
|
async def initialize(self) -> None:
|
||||||
@@ -416,7 +400,7 @@ class UserRouterGroup(group.RouterGroup):
|
|||||||
'Bind the LangBot Account with the same email as this local Account',
|
'Bind the LangBot Account with the same email as this local Account',
|
||||||
)
|
)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
return self.http_status(400, -1, 'Space account binding failed')
|
return self.http_status(400, -1, 'LangBot Account binding failed')
|
||||||
except Exception:
|
except Exception:
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ class UserService:
|
|||||||
if purpose == 'login' and account_uuid is not None:
|
if purpose == 'login' and account_uuid is not None:
|
||||||
raise ValueError('Login state cannot be bound to an Account')
|
raise ValueError('Login state cannot be bound to an Account')
|
||||||
if purpose != 'login' and launch_workspace_uuid is not None:
|
if purpose != 'login' and launch_workspace_uuid is not None:
|
||||||
raise ValueError('Launch Workspace state is only valid for Space login')
|
raise ValueError('Launch Workspace state is only valid for LangBot Account login')
|
||||||
if ttl_seconds <= 0:
|
if ttl_seconds <= 0:
|
||||||
raise ValueError('OAuth state lifetime must be positive')
|
raise ValueError('OAuth state lifetime must be positive')
|
||||||
|
|
||||||
@@ -327,7 +327,7 @@ class UserService:
|
|||||||
normalized_email = normalize_email(user_email)
|
normalized_email = normalize_email(user_email)
|
||||||
if self._uses_control_plane_directory():
|
if self._uses_control_plane_directory():
|
||||||
raise ControlPlaneDirectoryRequiredError(
|
raise ControlPlaneDirectoryRequiredError(
|
||||||
'Cloud invitation registration must use a Space account to preserve control-plane identity'
|
'Cloud invitation registration must use a LangBot Account to preserve control-plane identity'
|
||||||
)
|
)
|
||||||
invitation, _ = await self.ap.workspace_collaboration_service.inspect_invitation(invitation_token)
|
invitation, _ = await self.ap.workspace_collaboration_service.inspect_invitation(invitation_token)
|
||||||
if invitation.normalized_email != normalized_email:
|
if invitation.normalized_email != normalized_email:
|
||||||
@@ -394,7 +394,7 @@ class UserService:
|
|||||||
|
|
||||||
# Check if this user has a local password set
|
# Check if this user has a local password set
|
||||||
if not user_obj.password:
|
if not user_obj.password:
|
||||||
raise ValueError('请使用 Space 账户登录')
|
raise ValueError('请使用 LangBot 账号登录')
|
||||||
|
|
||||||
await self._verify_password(user_obj.password, password)
|
await self._verify_password(user_obj.password, password)
|
||||||
|
|
||||||
@@ -825,7 +825,7 @@ class UserService:
|
|||||||
# Check if this Space account is already bound to another user
|
# Check if this Space account is already bound to another user
|
||||||
existing_space_user = await self.get_user_by_space_account_uuid(space_account_uuid)
|
existing_space_user = await self.get_user_by_space_account_uuid(space_account_uuid)
|
||||||
if existing_space_user and existing_space_user.normalized_email != normalize_email(user_email):
|
if existing_space_user and existing_space_user.normalized_email != normalize_email(user_email):
|
||||||
raise ValueError('This Space account is already bound to another user')
|
raise ValueError('This LangBot Account is already bound to another user')
|
||||||
|
|
||||||
# Update local account to Space account
|
# Update local account to Space account
|
||||||
normalized_email = normalize_email(user_email)
|
normalized_email = normalize_email(user_email)
|
||||||
|
|||||||
@@ -367,6 +367,12 @@ class BoxRuntimeConnector(ManagedRuntimeConnector):
|
|||||||
def _ensure_control_token(self, *, allow_generate: bool) -> str:
|
def _ensure_control_token(self, *, allow_generate: bool) -> str:
|
||||||
if not self._control_token and allow_generate:
|
if not self._control_token and allow_generate:
|
||||||
self._control_token = secrets.token_urlsafe(48)
|
self._control_token = secrets.token_urlsafe(48)
|
||||||
|
if not self._control_token:
|
||||||
|
if getattr(getattr(self.ap, 'deployment', None), 'mode', 'oss') == 'cloud':
|
||||||
|
raise BoxRuntimeUnavailableError(
|
||||||
|
f'{BOX_CONTROL_TOKEN_ENV} must be configured with a strong shared secret for a Cloud Box runtime'
|
||||||
|
)
|
||||||
|
return ''
|
||||||
try:
|
try:
|
||||||
self._control_token = validate_control_token(self._control_token)
|
self._control_token = validate_control_token(self._control_token)
|
||||||
except ValueError as exc:
|
except ValueError as exc:
|
||||||
@@ -376,19 +382,19 @@ class BoxRuntimeConnector(ManagedRuntimeConnector):
|
|||||||
return self._control_token
|
return self._control_token
|
||||||
|
|
||||||
def get_control_headers(self) -> dict[str, str]:
|
def get_control_headers(self) -> dict[str, str]:
|
||||||
"""Headers for the instance-authenticated RPC control handshake."""
|
"""Return instance-scoped RPC headers and the optional shared secret."""
|
||||||
|
|
||||||
self._ensure_control_token(allow_generate=False)
|
self._ensure_control_token(allow_generate=False)
|
||||||
return {
|
headers = {BOX_INSTANCE_HEADER: self._trusted_instance_uuid}
|
||||||
BOX_CONTROL_TOKEN_HEADER: self._control_token,
|
if self._control_token:
|
||||||
BOX_INSTANCE_HEADER: self._trusted_instance_uuid,
|
headers[BOX_CONTROL_TOKEN_HEADER] = self._control_token
|
||||||
}
|
return headers
|
||||||
|
|
||||||
def get_relay_headers(
|
def get_relay_headers(
|
||||||
self,
|
self,
|
||||||
action_context: ActionContext,
|
action_context: ActionContext,
|
||||||
) -> dict[str, str]:
|
) -> dict[str, str]:
|
||||||
"""Return authenticated, placement-scoped relay handshake headers."""
|
"""Return instance- and placement-scoped relay handshake headers."""
|
||||||
|
|
||||||
context = ActionContext.model_validate(action_context).without_installation()
|
context = ActionContext.model_validate(action_context).without_installation()
|
||||||
if context.instance_uuid != self._trusted_instance_uuid:
|
if context.instance_uuid != self._trusted_instance_uuid:
|
||||||
|
|||||||
@@ -249,6 +249,10 @@ class Application:
|
|||||||
{},
|
{},
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
'plugin_runtime_connected': bool(
|
||||||
|
self.plugin_connector is not None
|
||||||
|
and getattr(self.plugin_connector, '_runtime_available', lambda: False)()
|
||||||
|
),
|
||||||
}
|
}
|
||||||
mcp_loader = getattr(self.tool_mgr, 'mcp_tool_loader', None)
|
mcp_loader = getattr(self.tool_mgr, 'mcp_tool_loader', None)
|
||||||
runtime_stats.update(
|
runtime_stats.update(
|
||||||
|
|||||||
@@ -17,4 +17,4 @@ class SpaceAccountBindingRequiredError(AccountEmailMismatchError):
|
|||||||
code = 'space_account_binding_required'
|
code = 'space_account_binding_required'
|
||||||
|
|
||||||
def __str__(self) -> str:
|
def __str__(self) -> str:
|
||||||
return 'This local Account must bind Space from Account settings before Space login'
|
return 'This local account must bind a LangBot Account from Account settings before LangBot Account login'
|
||||||
|
|||||||
@@ -264,6 +264,11 @@ class PluginRuntimeConnector(ManagedRuntimeConnector):
|
|||||||
if not self._control_token and allow_generate:
|
if not self._control_token and allow_generate:
|
||||||
self._control_token = secrets.token_urlsafe(48)
|
self._control_token = secrets.token_urlsafe(48)
|
||||||
if not self._control_token:
|
if not self._control_token:
|
||||||
|
if self.runtime_profile == 'shared':
|
||||||
|
raise PluginRuntimeNotConnectedError(
|
||||||
|
f'{PLUGIN_RUNTIME_CONTROL_TOKEN_ENV} must be configured with a strong shared secret '
|
||||||
|
'for a Cloud Plugin Runtime'
|
||||||
|
)
|
||||||
return {}
|
return {}
|
||||||
try:
|
try:
|
||||||
self._control_token = validate_runtime_secret(
|
self._control_token = validate_runtime_secret(
|
||||||
|
|||||||
@@ -1579,7 +1579,7 @@ class RuntimeConnectionHandler(handler.Handler):
|
|||||||
return await self.call_action(
|
return await self.call_action(
|
||||||
LangBotToRuntimeAction.RECONCILE_PLUGIN_INSTALLATIONS,
|
LangBotToRuntimeAction.RECONCILE_PLUGIN_INSTALLATIONS,
|
||||||
request.model_dump(),
|
request.model_dump(),
|
||||||
timeout=120,
|
timeout=300,
|
||||||
)
|
)
|
||||||
|
|
||||||
async def apply_plugin_installation(
|
async def apply_plugin_installation(
|
||||||
@@ -1962,11 +1962,16 @@ class RuntimeConnectionHandler(handler.Handler):
|
|||||||
|
|
||||||
async def get_debug_info(self, execution_context: ExecutionContext) -> dict[str, Any]:
|
async def get_debug_info(self, execution_context: ExecutionContext) -> dict[str, Any]:
|
||||||
"""Get debug information including debug key and WS URL"""
|
"""Get debug information including debug key and WS URL"""
|
||||||
|
action_context = ActionContext(
|
||||||
|
instance_uuid=execution_context.instance_uuid,
|
||||||
|
workspace_uuid=execution_context.workspace_uuid,
|
||||||
|
placement_generation=execution_context.placement_generation,
|
||||||
|
)
|
||||||
result = await self.call_action(
|
result = await self.call_action(
|
||||||
LangBotToRuntimeAction.GET_DEBUG_INFO,
|
LangBotToRuntimeAction.GET_DEBUG_INFO,
|
||||||
{},
|
{},
|
||||||
timeout=10,
|
timeout=10,
|
||||||
action_context=execution_context,
|
action_context=action_context,
|
||||||
)
|
)
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|||||||
@@ -328,8 +328,9 @@ box:
|
|||||||
enabled: true
|
enabled: true
|
||||||
backend: 'local' # 'local' (Docker/nsjail), 'docker', 'nsjail', or 'e2b'. Can be written via BOX__BACKEND.
|
backend: 'local' # 'local' (Docker/nsjail), 'docker', 'nsjail', or 'e2b'. Can be written via BOX__BACKEND.
|
||||||
runtime:
|
runtime:
|
||||||
# External WebSocket runtimes also require LANGBOT_BOX_CONTROL_TOKEN in
|
# LANGBOT_BOX_CONTROL_TOKEN is optional for OSS external WebSocket
|
||||||
# both LangBot and Box. Keep the shared secret out of this config file.
|
# runtimes. To protect an exposed endpoint, set the same strong secret
|
||||||
|
# in both LangBot and Box. Keep it out of this config file.
|
||||||
endpoint: '' # External Box Runtime base URL, e.g. 'ws://127.0.0.1:5410'. Leave empty for local auto-managed runtime.
|
endpoint: '' # External Box Runtime base URL, e.g. 'ws://127.0.0.1:5410'. Leave empty for local auto-managed runtime.
|
||||||
limits:
|
limits:
|
||||||
max_sessions: 64
|
max_sessions: 64
|
||||||
|
|||||||
@@ -235,13 +235,24 @@ async def test_debug_key_requires_resource_manage_permission(plugin_security_api
|
|||||||
assert operator_denied.status_code == 403
|
assert operator_denied.status_code == 403
|
||||||
assert allowed.status_code == 200
|
assert allowed.status_code == 200
|
||||||
assert (await allowed.get_json())['data'] == {
|
assert (await allowed.get_json())['data'] == {
|
||||||
'debug_url': 'http://localhost:5401',
|
'debug_url': 'ws://localhost:5401/plugin/debug/ws',
|
||||||
'plugin_debug_key': 'runtime-debug-secret',
|
'plugin_debug_key': 'runtime-debug-secret',
|
||||||
'expires_at': '2026-08-04T12:00:00Z',
|
'expires_at': '2026-08-04T12:00:00Z',
|
||||||
}
|
}
|
||||||
application.plugin_connector.get_debug_info.assert_awaited_once()
|
application.plugin_connector.get_debug_info.assert_awaited_once()
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.asyncio
|
||||||
|
async def test_debug_info_uses_websocket_endpoint_for_legacy_config(plugin_security_api):
|
||||||
|
application, client, _ = plugin_security_api
|
||||||
|
application.instance_config.data['plugin'].pop('display_plugin_debug_url')
|
||||||
|
|
||||||
|
response = await client.get('/api/v1/plugins/debug-info', headers=_headers('manager-token'))
|
||||||
|
|
||||||
|
assert response.status_code == 200
|
||||||
|
assert (await response.get_json())['data']['debug_url'] == 'ws://localhost:5401/plugin/debug/ws'
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
async def test_viewer_cannot_read_plugin_runtime_logs(plugin_security_api):
|
async def test_viewer_cannot_read_plugin_runtime_logs(plugin_security_api):
|
||||||
application, client, _ = plugin_security_api
|
application, client, _ = plugin_security_api
|
||||||
|
|||||||
@@ -165,34 +165,51 @@ async def test_bind_state_is_account_bound_and_requires_authentication(space_oau
|
|||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
async def test_redirect_origin_and_callback_path_are_restricted(space_oauth_api):
|
async def test_redirect_allows_any_http_or_https_origin(space_oauth_api):
|
||||||
_, client = space_oauth_api
|
_, client = space_oauth_api
|
||||||
|
|
||||||
wrong_origin = await client.get(
|
responses = [
|
||||||
'/api/v1/user/space/authorize-url',
|
await client.get(
|
||||||
query_string={'redirect_uri': 'https://evil.example/auth/space/callback'},
|
'/api/v1/user/space/authorize-url',
|
||||||
headers={'Origin': 'http://localhost'},
|
query_string={'redirect_uri': redirect_uri},
|
||||||
)
|
headers={'Origin': 'https://irrelevant.example'},
|
||||||
wrong_path = await client.get(
|
)
|
||||||
'/api/v1/user/space/authorize-url',
|
for redirect_uri in (
|
||||||
query_string={'redirect_uri': 'http://localhost/arbitrary'},
|
'https://langbot.example/auth/space/callback',
|
||||||
headers={'Origin': 'http://localhost'},
|
'https://gateway.example:8443/auth/space/callback',
|
||||||
)
|
'https://192.0.2.10/auth/space/callback',
|
||||||
forged_origin = await client.get(
|
'http://localhost:5300/auth/space/callback',
|
||||||
'/api/v1/user/space/authorize-url',
|
'http://127.0.0.1:5300/auth/space/callback',
|
||||||
query_string={'redirect_uri': 'https://evil.example/auth/space/callback'},
|
'http://[::1]:5300/auth/space/callback',
|
||||||
headers={'Origin': 'https://evil.example'},
|
'http://langbot.example/auth/space/callback',
|
||||||
)
|
'http://192.0.2.10:5300/auth/space/callback',
|
||||||
forged_host = await client.get(
|
)
|
||||||
'/api/v1/user/space/authorize-url',
|
]
|
||||||
query_string={'redirect_uri': 'https://evil.example/auth/space/callback'},
|
|
||||||
headers={'Host': 'evil.example'},
|
|
||||||
)
|
|
||||||
|
|
||||||
assert (await wrong_origin.get_json())['code'] == 1
|
assert all(response.status_code == 200 for response in responses)
|
||||||
assert (await wrong_path.get_json())['code'] == 1
|
payloads = [await response.get_json() for response in responses]
|
||||||
assert (await forged_origin.get_json())['code'] == 1
|
assert all(payload['code'] == 0 for payload in payloads)
|
||||||
assert (await forged_host.get_json())['code'] == 1
|
|
||||||
|
|
||||||
|
@pytest.mark.asyncio
|
||||||
|
async def test_redirect_rejects_invalid_callback_shape(space_oauth_api):
|
||||||
|
_, client = space_oauth_api
|
||||||
|
|
||||||
|
responses = [
|
||||||
|
await client.get(
|
||||||
|
'/api/v1/user/space/authorize-url',
|
||||||
|
query_string={'redirect_uri': redirect_uri},
|
||||||
|
)
|
||||||
|
for redirect_uri in (
|
||||||
|
'https://langbot.example/arbitrary',
|
||||||
|
'https://langbot.example/auth/space/callback?next=https://evil.example',
|
||||||
|
'https://user@langbot.example/auth/space/callback',
|
||||||
|
'https://langbot.example/auth/space/callback#fragment',
|
||||||
|
)
|
||||||
|
]
|
||||||
|
|
||||||
|
payloads = [await response.get_json() for response in responses]
|
||||||
|
assert all(payload['code'] == 1 for payload in payloads)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
|
|||||||
@@ -377,7 +377,7 @@ class TestUserServiceAuthenticate:
|
|||||||
service = UserService(ap)
|
service = UserService(ap)
|
||||||
|
|
||||||
# Execute & Verify
|
# Execute & Verify
|
||||||
with pytest.raises(ValueError, match='请使用 Space 账户登录'):
|
with pytest.raises(ValueError, match='请使用 LangBot 账号登录'):
|
||||||
await service.authenticate('space@example.com', 'password')
|
await service.authenticate('space@example.com', 'password')
|
||||||
|
|
||||||
|
|
||||||
@@ -726,7 +726,7 @@ class TestUserServiceCreateOrUpdateSpaceUser:
|
|||||||
)
|
)
|
||||||
service = UserService(ap)
|
service = UserService(ap)
|
||||||
|
|
||||||
with pytest.raises(ControlPlaneDirectoryRequiredError, match='Space account'):
|
with pytest.raises(ControlPlaneDirectoryRequiredError, match='LangBot Account'):
|
||||||
await service.register_invited_account('invite-token', 'member@example.com', 'password')
|
await service.register_invited_account('invite-token', 'member@example.com', 'password')
|
||||||
|
|
||||||
async def test_create_or_update_new_space_user_first_init(self):
|
async def test_create_or_update_new_space_user_first_init(self):
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ from langbot.pkg.box.connector import BoxRuntimeConnector
|
|||||||
_CONTROL_TOKEN = 'box-control-token-that-is-longer-than-32-bytes'
|
_CONTROL_TOKEN = 'box-control-token-that-is-longer-than-32-bytes'
|
||||||
|
|
||||||
|
|
||||||
def make_app(logger: Mock, runtime_endpoint: str = ''):
|
def make_app(logger: Mock, runtime_endpoint: str = '', *, cloud: bool = False):
|
||||||
return SimpleNamespace(
|
return SimpleNamespace(
|
||||||
logger=logger,
|
logger=logger,
|
||||||
workspace_service=SimpleNamespace(instance_uuid='instance-a'),
|
workspace_service=SimpleNamespace(instance_uuid='instance-a'),
|
||||||
@@ -42,6 +42,7 @@ def make_app(logger: Mock, runtime_endpoint: str = ''):
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
|
deployment=SimpleNamespace(mode='cloud' if cloud else 'oss'),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -306,10 +307,27 @@ def test_box_runtime_connector_rejects_relay_context_from_other_instance(
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def test_external_box_runtime_fails_closed_without_control_token(monkeypatch: pytest.MonkeyPatch):
|
def test_external_box_runtime_control_headers_are_tokenless_when_secret_is_unset(
|
||||||
|
monkeypatch: pytest.MonkeyPatch,
|
||||||
|
):
|
||||||
monkeypatch.delenv(BOX_CONTROL_TOKEN_ENV, raising=False)
|
monkeypatch.delenv(BOX_CONTROL_TOKEN_ENV, raising=False)
|
||||||
connector = BoxRuntimeConnector(make_app(Mock(), runtime_endpoint='http://box-runtime:5410'))
|
connector = BoxRuntimeConnector(make_app(Mock(), runtime_endpoint='http://box-runtime:5410'))
|
||||||
|
|
||||||
|
assert connector.get_control_headers() == {BOX_INSTANCE_HEADER: 'instance-a'}
|
||||||
|
|
||||||
|
|
||||||
|
def test_cloud_box_runtime_rejects_missing_control_secret(monkeypatch: pytest.MonkeyPatch):
|
||||||
|
monkeypatch.delenv(BOX_CONTROL_TOKEN_ENV, raising=False)
|
||||||
|
connector = BoxRuntimeConnector(make_app(Mock(), runtime_endpoint='http://box-runtime:5410', cloud=True))
|
||||||
|
|
||||||
|
with pytest.raises(BoxRuntimeUnavailableError, match=BOX_CONTROL_TOKEN_ENV):
|
||||||
|
connector.get_control_headers()
|
||||||
|
|
||||||
|
|
||||||
|
def test_external_box_runtime_rejects_invalid_configured_control_token(monkeypatch: pytest.MonkeyPatch):
|
||||||
|
monkeypatch.setenv(BOX_CONTROL_TOKEN_ENV, 'too-short')
|
||||||
|
connector = BoxRuntimeConnector(make_app(Mock(), runtime_endpoint='http://box-runtime:5410'))
|
||||||
|
|
||||||
with pytest.raises(BoxRuntimeUnavailableError, match=BOX_CONTROL_TOKEN_ENV):
|
with pytest.raises(BoxRuntimeUnavailableError, match=BOX_CONTROL_TOKEN_ENV):
|
||||||
connector.get_control_headers()
|
connector.get_control_headers()
|
||||||
|
|
||||||
|
|||||||
@@ -87,7 +87,10 @@ async def test_runtime_resource_stats_are_aggregate_and_constant_time() -> None:
|
|||||||
app.platform_mgr = SimpleNamespace(_bots_by_key={})
|
app.platform_mgr = SimpleNamespace(_bots_by_key={})
|
||||||
app.pipeline_mgr = SimpleNamespace(_pipelines_by_key={})
|
app.pipeline_mgr = SimpleNamespace(_pipelines_by_key={})
|
||||||
app.rag_mgr = SimpleNamespace(knowledge_bases={})
|
app.rag_mgr = SimpleNamespace(knowledge_bases={})
|
||||||
app.plugin_connector = SimpleNamespace(_known_desired_states={'installation': object()})
|
app.plugin_connector = SimpleNamespace(
|
||||||
|
_known_desired_states={'installation': object()},
|
||||||
|
_runtime_available=lambda: True,
|
||||||
|
)
|
||||||
app.persistence_mgr = SimpleNamespace(
|
app.persistence_mgr = SimpleNamespace(
|
||||||
get_resource_stats=lambda: {
|
get_resource_stats=lambda: {
|
||||||
'configured_capacity': 20,
|
'configured_capacity': 20,
|
||||||
@@ -140,3 +143,4 @@ async def test_runtime_resource_stats_are_aggregate_and_constant_time() -> None:
|
|||||||
}
|
}
|
||||||
assert stats['models']['providers'] == 1
|
assert stats['models']['providers'] == 1
|
||||||
assert stats['runtimes']['plugin_installations'] == 1
|
assert stats['runtimes']['plugin_installations'] == 1
|
||||||
|
assert stats['runtimes']['plugin_runtime_connected'] is True
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ from langbot_plugin.runtime.security import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def make_connector() -> PluginRuntimeConnector:
|
def make_connector(*, cloud: bool = False) -> PluginRuntimeConnector:
|
||||||
app = SimpleNamespace(
|
app = SimpleNamespace(
|
||||||
logger=Mock(),
|
logger=Mock(),
|
||||||
instance_config=SimpleNamespace(
|
instance_config=SimpleNamespace(
|
||||||
@@ -34,6 +34,7 @@ def make_connector() -> PluginRuntimeConnector:
|
|||||||
'space': {'url': ''},
|
'space': {'url': ''},
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
|
deployment=SimpleNamespace(mode='cloud' if cloud else 'oss'),
|
||||||
)
|
)
|
||||||
return PluginRuntimeConnector(app, AsyncMock())
|
return PluginRuntimeConnector(app, AsyncMock())
|
||||||
|
|
||||||
@@ -332,6 +333,14 @@ def test_external_runtime_control_headers_are_empty_when_secret_is_unset(monkeyp
|
|||||||
assert connector._control_headers(allow_generate=False) == {}
|
assert connector._control_headers(allow_generate=False) == {}
|
||||||
|
|
||||||
|
|
||||||
|
def test_cloud_runtime_rejects_missing_control_secret(monkeypatch):
|
||||||
|
monkeypatch.delenv(PLUGIN_RUNTIME_CONTROL_TOKEN_ENV, raising=False)
|
||||||
|
connector = make_connector(cloud=True)
|
||||||
|
|
||||||
|
with pytest.raises(PluginRuntimeNotConnectedError, match=PLUGIN_RUNTIME_CONTROL_TOKEN_ENV):
|
||||||
|
connector._control_headers(allow_generate=False)
|
||||||
|
|
||||||
|
|
||||||
def test_local_runtime_control_headers_generate_ephemeral_secret(monkeypatch):
|
def test_local_runtime_control_headers_generate_ephemeral_secret(monkeypatch):
|
||||||
monkeypatch.delenv(PLUGIN_RUNTIME_CONTROL_TOKEN_ENV, raising=False)
|
monkeypatch.delenv(PLUGIN_RUNTIME_CONTROL_TOKEN_ENV, raising=False)
|
||||||
connector = make_connector()
|
connector = make_connector()
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ from types import SimpleNamespace
|
|||||||
from unittest.mock import AsyncMock, MagicMock, Mock
|
from unittest.mock import AsyncMock, MagicMock, Mock
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from langbot_plugin.entities.io.actions.enums import PluginToRuntimeAction
|
from langbot_plugin.entities.io.actions.enums import LangBotToRuntimeAction, PluginToRuntimeAction
|
||||||
from langbot_plugin.entities.io.context import ActionContext, InstallationBinding
|
from langbot_plugin.entities.io.context import ActionContext, InstallationBinding, PluginInstallationDesiredState
|
||||||
|
|
||||||
|
|
||||||
def make_handler(app):
|
def make_handler(app):
|
||||||
@@ -67,6 +67,20 @@ def make_handler(app):
|
|||||||
return runtime_handler
|
return runtime_handler
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.asyncio
|
||||||
|
async def test_reconcile_plugin_installations_allows_cloud_cold_start_to_finish():
|
||||||
|
app = SimpleNamespace()
|
||||||
|
runtime_handler = make_handler(app)
|
||||||
|
runtime_handler.call_action = AsyncMock(return_value={})
|
||||||
|
binding = next(iter(runtime_handler._installation_bindings.values()))[0]
|
||||||
|
desired = PluginInstallationDesiredState(binding=binding, enabled=True)
|
||||||
|
|
||||||
|
await runtime_handler.reconcile_plugin_installations((desired,))
|
||||||
|
|
||||||
|
assert runtime_handler.call_action.await_args.args[0] == LangBotToRuntimeAction.RECONCILE_PLUGIN_INSTALLATIONS
|
||||||
|
assert runtime_handler.call_action.await_args.kwargs['timeout'] == 300
|
||||||
|
|
||||||
|
|
||||||
class TestHandlerQueryVariables:
|
class TestHandlerQueryVariables:
|
||||||
"""Tests for handler query variable logic."""
|
"""Tests for handler query variable logic."""
|
||||||
|
|
||||||
|
|||||||
@@ -444,3 +444,23 @@ async def test_host_to_runtime_action_carries_trusted_connector_context():
|
|||||||
'runtime_id': 'runtime-a',
|
'runtime_id': 'runtime-a',
|
||||||
}
|
}
|
||||||
assert request.get('context') is None
|
assert request.get('context') is None
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.asyncio
|
||||||
|
async def test_get_debug_info_converts_execution_context_to_sdk_action_context():
|
||||||
|
runtime_handler, _app, _installation_context = make_handler()
|
||||||
|
runtime_handler.call_action = AsyncMock(return_value={'plugin_debug_key': 'debug-key'})
|
||||||
|
execution_context = ExecutionContext(
|
||||||
|
instance_uuid='instance-a',
|
||||||
|
workspace_uuid='workspace-a',
|
||||||
|
placement_generation=7,
|
||||||
|
)
|
||||||
|
|
||||||
|
result = await runtime_handler.get_debug_info(execution_context)
|
||||||
|
|
||||||
|
assert result == {'plugin_debug_key': 'debug-key'}
|
||||||
|
assert runtime_handler.call_action.await_args.kwargs['action_context'] == ActionContext(
|
||||||
|
instance_uuid='instance-a',
|
||||||
|
workspace_uuid='workspace-a',
|
||||||
|
placement_generation=7,
|
||||||
|
)
|
||||||
|
|||||||
@@ -2125,7 +2125,7 @@ requires-dist = [
|
|||||||
{ name = "ebooklib", specifier = ">=0.18" },
|
{ name = "ebooklib", specifier = ">=0.18" },
|
||||||
{ name = "gewechat-client", specifier = ">=0.1.5" },
|
{ name = "gewechat-client", specifier = ">=0.1.5" },
|
||||||
{ name = "html2text", specifier = ">=2024.2.26" },
|
{ name = "html2text", specifier = ">=2024.2.26" },
|
||||||
{ name = "langbot-plugin", git = "https://github.com/langbot-app/langbot-plugin-sdk.git?rev=9d216208cdfb41f0cb7fcb64632e2a46816d6dc6" },
|
{ name = "langbot-plugin", specifier = "==0.5.3" },
|
||||||
{ name = "langchain", specifier = ">=1.3.9" },
|
{ name = "langchain", specifier = ">=1.3.9" },
|
||||||
{ name = "langchain-core", specifier = ">=1.3.3" },
|
{ name = "langchain-core", specifier = ">=1.3.3" },
|
||||||
{ name = "langchain-text-splitters", specifier = ">=1.1.2" },
|
{ name = "langchain-text-splitters", specifier = ">=1.1.2" },
|
||||||
@@ -2191,8 +2191,8 @@ dev = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "langbot-plugin"
|
name = "langbot-plugin"
|
||||||
version = "0.5.0"
|
version = "0.5.3"
|
||||||
source = { git = "https://github.com/langbot-app/langbot-plugin-sdk.git?rev=9d216208cdfb41f0cb7fcb64632e2a46816d6dc6#9d216208cdfb41f0cb7fcb64632e2a46816d6dc6" }
|
source = { registry = "https://pypi.org/simple" }
|
||||||
dependencies = [
|
dependencies = [
|
||||||
{ name = "aiofiles" },
|
{ name = "aiofiles" },
|
||||||
{ name = "aiohttp" },
|
{ name = "aiohttp" },
|
||||||
@@ -2212,6 +2212,10 @@ dependencies = [
|
|||||||
{ name = "watchdog" },
|
{ name = "watchdog" },
|
||||||
{ name = "websockets" },
|
{ name = "websockets" },
|
||||||
]
|
]
|
||||||
|
sdist = { url = "https://files.pythonhosted.org/packages/55/1d/a54daa3bc699f5186b9970946c2ecf0e9cf219f77738934e04aaf5a0c20a/langbot_plugin-0.5.3.tar.gz", hash = "sha256:2324b1f7e1f55e3692e75c8b1e427ea497474b0150ec6ca83b49b5d77ec224c6", size = 472149, upload-time = "2026-08-13T10:17:45.529Z" }
|
||||||
|
wheels = [
|
||||||
|
{ url = "https://files.pythonhosted.org/packages/0c/5f/ae6ed59773cc9d941fbb28b4ac07ce2a29e689d693e29ad71c40c5b39aa5/langbot_plugin-0.5.3-py3-none-any.whl", hash = "sha256:75dea1b6fb79ec6087ec3284f6698fb701d5feebf5f0318a7ae51fbd17a2f41f", size = 304559, upload-time = "2026-08-13T10:17:44.385Z" },
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "langchain"
|
name = "langchain"
|
||||||
|
|||||||
@@ -31,27 +31,14 @@ const getFormSchema = (t: (key: string) => string) =>
|
|||||||
api_key: z.string().optional(),
|
api_key: z.string().optional(),
|
||||||
});
|
});
|
||||||
|
|
||||||
export interface ProviderFormInitialValues {
|
|
||||||
name?: string;
|
|
||||||
requester?: string;
|
|
||||||
base_url?: string;
|
|
||||||
api_key?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface ProviderFormProps {
|
interface ProviderFormProps {
|
||||||
providerId?: string;
|
providerId?: string;
|
||||||
initialValues?: ProviderFormInitialValues;
|
onFormSubmit: () => void;
|
||||||
onValuesChange?: (values: ProviderFormInitialValues) => void;
|
|
||||||
submitButtonText?: string;
|
|
||||||
onFormSubmit: (providerUuid?: string) => void;
|
|
||||||
onFormCancel: () => void;
|
onFormCancel: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function ProviderForm({
|
export default function ProviderForm({
|
||||||
providerId,
|
providerId,
|
||||||
initialValues,
|
|
||||||
onValuesChange,
|
|
||||||
submitButtonText,
|
|
||||||
onFormSubmit,
|
onFormSubmit,
|
||||||
onFormCancel,
|
onFormCancel,
|
||||||
}: ProviderFormProps) {
|
}: ProviderFormProps) {
|
||||||
@@ -61,22 +48,13 @@ export default function ProviderForm({
|
|||||||
const form = useForm<z.infer<typeof formSchema>>({
|
const form = useForm<z.infer<typeof formSchema>>({
|
||||||
resolver: zodResolver(formSchema),
|
resolver: zodResolver(formSchema),
|
||||||
defaultValues: {
|
defaultValues: {
|
||||||
name: initialValues?.name ?? '',
|
name: '',
|
||||||
requester: initialValues?.requester ?? '',
|
requester: '',
|
||||||
base_url: initialValues?.base_url ?? '',
|
base_url: '',
|
||||||
api_key: initialValues?.api_key ?? '',
|
api_key: '',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const { setValue, watch } = form;
|
const { setValue } = form;
|
||||||
|
|
||||||
// Report form values changes to parent
|
|
||||||
useEffect(() => {
|
|
||||||
if (!onValuesChange) return;
|
|
||||||
const subscription = watch((values) => {
|
|
||||||
onValuesChange(values as ProviderFormInitialValues);
|
|
||||||
});
|
|
||||||
return () => subscription.unsubscribe();
|
|
||||||
}, [watch, onValuesChange]);
|
|
||||||
|
|
||||||
const [requesterList, setRequesterList] = useState<
|
const [requesterList, setRequesterList] = useState<
|
||||||
{
|
{
|
||||||
@@ -196,12 +174,11 @@ export default function ProviderForm({
|
|||||||
if (providerId) {
|
if (providerId) {
|
||||||
await httpClient.updateModelProvider(providerId, data);
|
await httpClient.updateModelProvider(providerId, data);
|
||||||
toast.success(t('models.providerSaved'));
|
toast.success(t('models.providerSaved'));
|
||||||
onFormSubmit();
|
|
||||||
} else {
|
} else {
|
||||||
const resp = await httpClient.createModelProvider(data);
|
await httpClient.createModelProvider(data);
|
||||||
toast.success(t('models.providerCreated'));
|
toast.success(t('models.providerCreated'));
|
||||||
onFormSubmit(resp.uuid);
|
|
||||||
}
|
}
|
||||||
|
onFormSubmit();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
toast.error(t('models.providerSaveError') + (err as CustomApiError).msg);
|
toast.error(t('models.providerSaveError') + (err as CustomApiError).msg);
|
||||||
}
|
}
|
||||||
@@ -401,7 +378,7 @@ export default function ProviderForm({
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<DialogFooter>
|
<DialogFooter>
|
||||||
<Button type="submit">{submitButtonText || t('common.save')}</Button>
|
<Button type="submit">{t('common.save')}</Button>
|
||||||
<Button type="button" variant="outline" onClick={onFormCancel}>
|
<Button type="button" variant="outline" onClick={onFormCancel}>
|
||||||
{t('common.cancel')}
|
{t('common.cancel')}
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import {
|
|||||||
XCircle,
|
XCircle,
|
||||||
} from 'lucide-react';
|
} from 'lucide-react';
|
||||||
import QRCode from 'qrcode';
|
import QRCode from 'qrcode';
|
||||||
|
import { getActiveWorkspaceUuid } from '@/app/infra/http/workspaceContext';
|
||||||
|
|
||||||
export type QrLoginPlatform =
|
export type QrLoginPlatform =
|
||||||
| 'feishu'
|
| 'feishu'
|
||||||
@@ -55,12 +56,12 @@ const PLATFORM_CONFIGS: Record<QrLoginPlatform, PlatformConfig> = {
|
|||||||
},
|
},
|
||||||
weixin: {
|
weixin: {
|
||||||
titleKey: 'weixin.scanLogin',
|
titleKey: 'weixin.scanLogin',
|
||||||
connectingKey: 'feishu.connecting',
|
connectingKey: 'weixin.connecting',
|
||||||
scanQRCodeKey: 'weixin.scanQRCode',
|
scanQRCodeKey: 'weixin.scanQRCode',
|
||||||
waitingKey: 'feishu.waitingForScan',
|
waitingKey: 'weixin.waitingForScan',
|
||||||
successKey: 'weixin.loginSuccess',
|
successKey: 'weixin.loginSuccess',
|
||||||
failedKey: 'weixin.loginFailed',
|
failedKey: 'weixin.loginFailed',
|
||||||
retryKey: 'feishu.retry',
|
retryKey: 'weixin.retry',
|
||||||
apiBase: '/api/v1/platform/adapters/weixin/login',
|
apiBase: '/api/v1/platform/adapters/weixin/login',
|
||||||
extractSuccess: (data) => ({
|
extractSuccess: (data) => ({
|
||||||
token: data.token,
|
token: data.token,
|
||||||
@@ -146,6 +147,8 @@ export default function QrCodeLoginDialog({
|
|||||||
const checkExpiredRef = useRef<ReturnType<typeof setInterval> | null>(null);
|
const checkExpiredRef = useRef<ReturnType<typeof setInterval> | null>(null);
|
||||||
const abortRef = useRef<AbortController | null>(null);
|
const abortRef = useRef<AbortController | null>(null);
|
||||||
const sessionIdRef = useRef<string | null>(null);
|
const sessionIdRef = useRef<string | null>(null);
|
||||||
|
const sessionWorkspaceUuidRef = useRef<string | null>(null);
|
||||||
|
const sessionApiBaseRef = useRef('');
|
||||||
const baseUrlRef = useRef('');
|
const baseUrlRef = useRef('');
|
||||||
const cleanedRef = useRef(false);
|
const cleanedRef = useRef(false);
|
||||||
|
|
||||||
@@ -180,18 +183,23 @@ export default function QrCodeLoginDialog({
|
|||||||
}
|
}
|
||||||
if (sessionIdRef.current) {
|
if (sessionIdRef.current) {
|
||||||
const token = localStorage.getItem('token');
|
const token = localStorage.getItem('token');
|
||||||
const baseUrl =
|
const workspaceUuid = sessionWorkspaceUuidRef.current;
|
||||||
import.meta.env.VITE_API_BASE_URL || window.location.origin;
|
|
||||||
fetch(
|
fetch(
|
||||||
`${baseUrl}${platformConfigRef.current.apiBase}/${sessionIdRef.current}`,
|
`${baseUrlRef.current}${sessionApiBaseRef.current}/${sessionIdRef.current}`,
|
||||||
{
|
{
|
||||||
method: 'DELETE',
|
method: 'DELETE',
|
||||||
headers: { Authorization: `Bearer ${token}` },
|
headers: {
|
||||||
|
Authorization: `Bearer ${token}`,
|
||||||
|
...(workspaceUuid ? { 'X-Workspace-Id': workspaceUuid } : {}),
|
||||||
|
},
|
||||||
keepalive: true,
|
keepalive: true,
|
||||||
},
|
},
|
||||||
).catch(() => {});
|
).catch(() => {});
|
||||||
sessionIdRef.current = null;
|
sessionIdRef.current = null;
|
||||||
}
|
}
|
||||||
|
sessionWorkspaceUuidRef.current = null;
|
||||||
|
sessionApiBaseRef.current = '';
|
||||||
|
baseUrlRef.current = '';
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const startLogin = useCallback(async () => {
|
const startLogin = useCallback(async () => {
|
||||||
@@ -204,6 +212,7 @@ export default function QrCodeLoginDialog({
|
|||||||
setSuccessMeta('');
|
setSuccessMeta('');
|
||||||
|
|
||||||
const token = localStorage.getItem('token');
|
const token = localStorage.getItem('token');
|
||||||
|
const workspaceUuid = getActiveWorkspaceUuid();
|
||||||
const baseUrl = import.meta.env.VITE_API_BASE_URL || window.location.origin;
|
const baseUrl = import.meta.env.VITE_API_BASE_URL || window.location.origin;
|
||||||
baseUrlRef.current = baseUrl;
|
baseUrlRef.current = baseUrl;
|
||||||
const cfg = platformConfigRef.current;
|
const cfg = platformConfigRef.current;
|
||||||
@@ -214,7 +223,10 @@ export default function QrCodeLoginDialog({
|
|||||||
|
|
||||||
const res = await fetch(`${baseUrl}${cfg.apiBase}`, {
|
const res = await fetch(`${baseUrl}${cfg.apiBase}`, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: { Authorization: `Bearer ${token}` },
|
headers: {
|
||||||
|
Authorization: `Bearer ${token}`,
|
||||||
|
...(workspaceUuid ? { 'X-Workspace-Id': workspaceUuid } : {}),
|
||||||
|
},
|
||||||
signal: controller.signal,
|
signal: controller.signal,
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -225,6 +237,8 @@ export default function QrCodeLoginDialog({
|
|||||||
|
|
||||||
const { session_id, qr_data_url, qr_url, expire_at } = json.data;
|
const { session_id, qr_data_url, qr_url, expire_at } = json.data;
|
||||||
sessionIdRef.current = session_id;
|
sessionIdRef.current = session_id;
|
||||||
|
sessionWorkspaceUuidRef.current = workspaceUuid;
|
||||||
|
sessionApiBaseRef.current = cfg.apiBase;
|
||||||
|
|
||||||
if (qr_data_url) {
|
if (qr_data_url) {
|
||||||
setQrDataUrl(qr_data_url);
|
setQrDataUrl(qr_data_url);
|
||||||
@@ -270,11 +284,19 @@ export default function QrCodeLoginDialog({
|
|||||||
`${baseUrlRef.current}${cfg.apiBase}/${sessionIdRef.current}`,
|
`${baseUrlRef.current}${cfg.apiBase}/${sessionIdRef.current}`,
|
||||||
{
|
{
|
||||||
method: 'DELETE',
|
method: 'DELETE',
|
||||||
headers: { Authorization: `Bearer ${token}` },
|
headers: {
|
||||||
|
Authorization: `Bearer ${token}`,
|
||||||
|
...(workspaceUuid
|
||||||
|
? { 'X-Workspace-Id': workspaceUuid }
|
||||||
|
: {}),
|
||||||
|
},
|
||||||
keepalive: true,
|
keepalive: true,
|
||||||
},
|
},
|
||||||
).catch(() => {});
|
).catch(() => {});
|
||||||
sessionIdRef.current = null;
|
sessionIdRef.current = null;
|
||||||
|
sessionWorkspaceUuidRef.current = null;
|
||||||
|
sessionApiBaseRef.current = '';
|
||||||
|
baseUrlRef.current = '';
|
||||||
}
|
}
|
||||||
setState('expired');
|
setState('expired');
|
||||||
}
|
}
|
||||||
@@ -286,7 +308,12 @@ export default function QrCodeLoginDialog({
|
|||||||
try {
|
try {
|
||||||
const pollRes = await fetch(
|
const pollRes = await fetch(
|
||||||
`${baseUrl}${cfg.apiBase}/status/${session_id}`,
|
`${baseUrl}${cfg.apiBase}/status/${session_id}`,
|
||||||
{ headers: { Authorization: `Bearer ${token}` } },
|
{
|
||||||
|
headers: {
|
||||||
|
Authorization: `Bearer ${token}`,
|
||||||
|
...(workspaceUuid ? { 'X-Workspace-Id': workspaceUuid } : {}),
|
||||||
|
},
|
||||||
|
},
|
||||||
);
|
);
|
||||||
if (!pollRes.ok) return;
|
if (!pollRes.ok) return;
|
||||||
|
|
||||||
|
|||||||
@@ -710,11 +710,32 @@ export class BackendClient extends BaseHttpClient {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async getAuthenticatedObjectURL(path: string): Promise<string> {
|
private async getAuthenticatedObjectURL(
|
||||||
|
path: string,
|
||||||
|
rewritePluginPageSdk = false,
|
||||||
|
): Promise<string> {
|
||||||
const response = await this.instance.get<Blob>(path, {
|
const response = await this.instance.get<Blob>(path, {
|
||||||
responseType: 'blob',
|
responseType: 'blob',
|
||||||
});
|
});
|
||||||
return URL.createObjectURL(response.data);
|
let blob = response.data;
|
||||||
|
if (rewritePluginPageSdk && blob.type.startsWith('text/html')) {
|
||||||
|
const apiBase =
|
||||||
|
this.instance.defaults.baseURL === '/'
|
||||||
|
? window.location.origin
|
||||||
|
: this.instance.defaults.baseURL?.replace(/\/$/, '');
|
||||||
|
const pageSdkUrl = `${apiBase}/api/v1/plugins/_sdk/page-sdk.js`;
|
||||||
|
const html = await blob.text();
|
||||||
|
blob = new Blob(
|
||||||
|
[
|
||||||
|
html.replace(
|
||||||
|
/(<script\b[^>]*\bsrc\s*=\s*)(["'])\/api\/v1\/plugins\/_sdk\/page-sdk\.js\2/gi,
|
||||||
|
`$1$2${pageSdkUrl}$2`,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
{ type: blob.type },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return URL.createObjectURL(blob);
|
||||||
}
|
}
|
||||||
|
|
||||||
public getAuthenticatedPluginAssetURL(
|
public getAuthenticatedPluginAssetURL(
|
||||||
@@ -724,6 +745,7 @@ export class BackendClient extends BaseHttpClient {
|
|||||||
): Promise<string> {
|
): Promise<string> {
|
||||||
return this.getAuthenticatedObjectURL(
|
return this.getAuthenticatedObjectURL(
|
||||||
`/api/v1/plugins/${author}/${name}/authenticated-assets/${filepath}`,
|
`/api/v1/plugins/${author}/${name}/authenticated-assets/${filepath}`,
|
||||||
|
true,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+66
-725
@@ -12,13 +12,10 @@ import {
|
|||||||
Loader2,
|
Loader2,
|
||||||
X,
|
X,
|
||||||
ExternalLink,
|
ExternalLink,
|
||||||
Rocket,
|
|
||||||
Wrench,
|
|
||||||
} from 'lucide-react';
|
} from 'lucide-react';
|
||||||
|
|
||||||
import { httpClient } from '@/app/infra/http/HttpClient';
|
import { httpClient } from '@/app/infra/http/HttpClient';
|
||||||
import {
|
import {
|
||||||
userInfo,
|
|
||||||
systemInfo,
|
systemInfo,
|
||||||
bootstrapWorkspaceSession,
|
bootstrapWorkspaceSession,
|
||||||
initializeSystemInfo,
|
initializeSystemInfo,
|
||||||
@@ -40,7 +37,6 @@ import {
|
|||||||
parseDynamicFormItemType,
|
parseDynamicFormItemType,
|
||||||
} from '@/app/home/components/dynamic-form/DynamicFormItemConfig';
|
} from '@/app/home/components/dynamic-form/DynamicFormItemConfig';
|
||||||
import DynamicFormComponent from '@/app/home/components/dynamic-form/DynamicFormComponent';
|
import DynamicFormComponent from '@/app/home/components/dynamic-form/DynamicFormComponent';
|
||||||
import ProviderForm from '@/app/home/components/models-dialog/component/provider-form/ProviderForm';
|
|
||||||
import { BotLogListComponent } from '@/app/home/bots/components/bot-log/view/BotLogListComponent';
|
import { BotLogListComponent } from '@/app/home/bots/components/bot-log/view/BotLogListComponent';
|
||||||
import { extractI18nObject } from '@/i18n/I18nProvider';
|
import { extractI18nObject } from '@/i18n/I18nProvider';
|
||||||
import {
|
import {
|
||||||
@@ -51,7 +47,6 @@ import { getAdapterDocUrl } from '@/app/infra/entities/adapter-docs';
|
|||||||
import i18n from 'i18next';
|
import i18n from 'i18next';
|
||||||
|
|
||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import { Input } from '@/components/ui/input';
|
|
||||||
import {
|
import {
|
||||||
Card,
|
Card,
|
||||||
CardContent,
|
CardContent,
|
||||||
@@ -71,7 +66,6 @@ import {
|
|||||||
DialogTitle,
|
DialogTitle,
|
||||||
} from '@/components/ui/dialog';
|
} from '@/components/ui/dialog';
|
||||||
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// Types
|
// Types
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
@@ -97,40 +91,6 @@ export default function WizardPage() {
|
|||||||
{},
|
{},
|
||||||
);
|
);
|
||||||
const [runnerConfig, setRunnerConfig] = useState<Record<string, unknown>>({});
|
const [runnerConfig, setRunnerConfig] = useState<Record<string, unknown>>({});
|
||||||
const [aiEngineMode, setAiEngineMode] = useState<
|
|
||||||
'orchestrated' | 'llm' | null
|
|
||||||
>(null);
|
|
||||||
const [modelSource, setModelSource] = useState<'space' | 'custom' | null>(
|
|
||||||
null,
|
|
||||||
);
|
|
||||||
const [providerCreated, setProviderCreated] = useState(false);
|
|
||||||
const [createdProviderUuid, setCreatedProviderUuid] = useState<string | null>(
|
|
||||||
null,
|
|
||||||
);
|
|
||||||
const [modelsAdded, setModelsAdded] = useState(false);
|
|
||||||
// Sub-layer within Step 2: 0=main, 1=sub-choice, 2=provider, 3=scan, 4=config
|
|
||||||
const [step2Layer, setStep2Layer] = useState(0);
|
|
||||||
const [maxReachedLayer, setMaxReachedLayer] = useState(0);
|
|
||||||
|
|
||||||
const goToStep2Layer = useCallback(
|
|
||||||
(layer: number) => {
|
|
||||||
setStep2Layer(layer);
|
|
||||||
setMaxReachedLayer((prev) => Math.max(prev, layer));
|
|
||||||
},
|
|
||||||
[],
|
|
||||||
);
|
|
||||||
|
|
||||||
// Saved provider form data for back navigation
|
|
||||||
const [savedProviderForm, setSavedProviderForm] = useState<{
|
|
||||||
name?: string;
|
|
||||||
requester?: string;
|
|
||||||
base_url?: string;
|
|
||||||
api_key?: string;
|
|
||||||
}>({});
|
|
||||||
// Saved selected scanned models for back navigation
|
|
||||||
const [savedSelectedModels, setSavedSelectedModels] = useState<Set<string>>(
|
|
||||||
new Set(),
|
|
||||||
);
|
|
||||||
const [createdBotUuid, setCreatedBotUuid] = useState<string | null>(null);
|
const [createdBotUuid, setCreatedBotUuid] = useState<string | null>(null);
|
||||||
const [webhookUrl, setWebhookUrl] = useState<string>('');
|
const [webhookUrl, setWebhookUrl] = useState<string>('');
|
||||||
const [extraWebhookUrl, setExtraWebhookUrl] = useState<string>('');
|
const [extraWebhookUrl, setExtraWebhookUrl] = useState<string>('');
|
||||||
@@ -312,28 +272,11 @@ export default function WizardPage() {
|
|||||||
const handleSelectRunner = useCallback(
|
const handleSelectRunner = useCallback(
|
||||||
(runner: string) => {
|
(runner: string) => {
|
||||||
setSelectedRunner(runner);
|
setSelectedRunner(runner);
|
||||||
goToStep2Layer(4);
|
|
||||||
saveProgress({ step: 2, selected_runner: runner });
|
saveProgress({ step: 2, selected_runner: runner });
|
||||||
},
|
},
|
||||||
[saveProgress],
|
[saveProgress],
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleAiEngineModeSelect = useCallback(
|
|
||||||
(mode: 'orchestrated' | 'llm') => {
|
|
||||||
setAiEngineMode(mode);
|
|
||||||
setSelectedRunner(null);
|
|
||||||
setModelSource(null);
|
|
||||||
setProviderCreated(false);
|
|
||||||
setCreatedProviderUuid(null);
|
|
||||||
setModelsAdded(false);
|
|
||||||
setSavedProviderForm({});
|
|
||||||
setSavedSelectedModels(new Set());
|
|
||||||
setMaxReachedLayer(0);
|
|
||||||
goToStep2Layer(1);
|
|
||||||
},
|
|
||||||
[goToStep2Layer],
|
|
||||||
);
|
|
||||||
|
|
||||||
// ---- Navigation helpers ----
|
// ---- Navigation helpers ----
|
||||||
|
|
||||||
const canProceed = useCallback((): boolean => {
|
const canProceed = useCallback((): boolean => {
|
||||||
@@ -343,53 +286,27 @@ export default function WizardPage() {
|
|||||||
case 1:
|
case 1:
|
||||||
return createdBotUuid !== null && botSaved;
|
return createdBotUuid !== null && botSaved;
|
||||||
case 2:
|
case 2:
|
||||||
if (aiEngineMode === 'orchestrated') {
|
return selectedRunner !== null;
|
||||||
return selectedRunner !== null;
|
|
||||||
}
|
|
||||||
if (aiEngineMode === 'llm') {
|
|
||||||
return (
|
|
||||||
modelSource === 'space' ||
|
|
||||||
(modelSource === 'custom' && modelsAdded)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}, [
|
}, [currentStep, selectedAdapter, createdBotUuid, botSaved, selectedRunner]);
|
||||||
currentStep,
|
|
||||||
selectedAdapter,
|
|
||||||
createdBotUuid,
|
|
||||||
botSaved,
|
|
||||||
aiEngineMode,
|
|
||||||
selectedRunner,
|
|
||||||
modelSource,
|
|
||||||
modelsAdded,
|
|
||||||
]);
|
|
||||||
|
|
||||||
const goNext = useCallback(() => {
|
const goNext = useCallback(() => {
|
||||||
if (currentStep === 2 && step2Layer < maxReachedLayer) {
|
|
||||||
setStep2Layer(maxReachedLayer);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (currentStep < TOTAL_STEPS - 1 && canProceed()) {
|
if (currentStep < TOTAL_STEPS - 1 && canProceed()) {
|
||||||
const nextStep = currentStep + 1;
|
const nextStep = currentStep + 1;
|
||||||
setCurrentStep(nextStep);
|
setCurrentStep(nextStep);
|
||||||
saveProgress({ step: nextStep });
|
saveProgress({ step: nextStep });
|
||||||
}
|
}
|
||||||
}, [currentStep, step2Layer, maxReachedLayer, canProceed, saveProgress]);
|
}, [currentStep, canProceed, saveProgress]);
|
||||||
|
|
||||||
const goPrev = useCallback(() => {
|
const goPrev = useCallback(() => {
|
||||||
if (currentStep === 2 && step2Layer > 0) {
|
|
||||||
setStep2Layer(step2Layer - 1);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (currentStep > 0) {
|
if (currentStep > 0) {
|
||||||
const prevStep = currentStep - 1;
|
const prevStep = currentStep - 1;
|
||||||
setCurrentStep(prevStep);
|
setCurrentStep(prevStep);
|
||||||
saveProgress({ step: prevStep });
|
saveProgress({ step: prevStep });
|
||||||
}
|
}
|
||||||
}, [currentStep, step2Layer, saveProgress]);
|
}, [currentStep, saveProgress]);
|
||||||
|
|
||||||
// ---- Create Bot (Step 0) ----
|
// ---- Create Bot (Step 0) ----
|
||||||
// Creates a disabled bot using the adapter label as name.
|
// Creates a disabled bot using the adapter label as name.
|
||||||
@@ -572,40 +489,6 @@ export default function WizardPage() {
|
|||||||
t,
|
t,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// ---- Space auth redirect ----
|
|
||||||
|
|
||||||
const handleSpaceAuth = useCallback(async () => {
|
|
||||||
try {
|
|
||||||
const callbackUrl = `${window.location.origin}/auth/space/callback`;
|
|
||||||
const resp = await httpClient.getSpaceAuthorizeUrl(callbackUrl);
|
|
||||||
window.location.href = resp.authorize_url;
|
|
||||||
} catch (err) {
|
|
||||||
console.error('Failed to get space authorize URL', err);
|
|
||||||
toast.error(t('wizard.spaceAuthError'));
|
|
||||||
}
|
|
||||||
}, [t]);
|
|
||||||
|
|
||||||
const handleModelSourceSelect = useCallback(
|
|
||||||
(source: 'space' | 'custom') => {
|
|
||||||
setModelSource(source);
|
|
||||||
if (source === 'space') {
|
|
||||||
handleSpaceAuth();
|
|
||||||
} else if (providerCreated && modelsAdded) {
|
|
||||||
goToStep2Layer(4);
|
|
||||||
} else if (providerCreated) {
|
|
||||||
goToStep2Layer(3);
|
|
||||||
} else {
|
|
||||||
goToStep2Layer(2);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
[handleSpaceAuth, providerCreated, modelsAdded],
|
|
||||||
);
|
|
||||||
|
|
||||||
// ---- Check if local account ----
|
|
||||||
// Re-evaluated after remote data fetch (when userInfo is populated)
|
|
||||||
const isLocalAccount =
|
|
||||||
!isLoading && (!userInfo || userInfo.account_type === 'local');
|
|
||||||
|
|
||||||
// ---- Skip handler ----
|
// ---- Skip handler ----
|
||||||
const [showSkipConfirm, setShowSkipConfirm] = useState(false);
|
const [showSkipConfirm, setShowSkipConfirm] = useState(false);
|
||||||
const [isSkipping, setIsSkipping] = useState(false);
|
const [isSkipping, setIsSkipping] = useState(false);
|
||||||
@@ -758,41 +641,8 @@ export default function WizardPage() {
|
|||||||
{currentStep === 2 && (
|
{currentStep === 2 && (
|
||||||
<StepAIEngine
|
<StepAIEngine
|
||||||
runnerOptions={runnerOptions}
|
runnerOptions={runnerOptions}
|
||||||
step2Layer={step2Layer}
|
selected={selectedRunner}
|
||||||
aiEngineMode={aiEngineMode}
|
onSelect={handleSelectRunner}
|
||||||
onAiEngineModeSelect={handleAiEngineModeSelect}
|
|
||||||
selectedRunner={selectedRunner}
|
|
||||||
onSelectRunner={handleSelectRunner}
|
|
||||||
isLocalAccount={isLocalAccount}
|
|
||||||
onSpaceAuth={handleSpaceAuth}
|
|
||||||
modelSource={modelSource}
|
|
||||||
onModelSourceSelect={handleModelSourceSelect}
|
|
||||||
providerCreated={providerCreated}
|
|
||||||
createdProviderUuid={createdProviderUuid}
|
|
||||||
modelsAdded={modelsAdded}
|
|
||||||
onProviderCreated={(uuid) => {
|
|
||||||
setProviderCreated(true);
|
|
||||||
setCreatedProviderUuid(uuid ?? null);
|
|
||||||
goToStep2Layer(3);
|
|
||||||
}}
|
|
||||||
onModelsAdded={() => {
|
|
||||||
setModelsAdded(true);
|
|
||||||
setSelectedRunner('local-agent');
|
|
||||||
goToStep2Layer(4);
|
|
||||||
saveProgress({ step: 2, selected_runner: 'local-agent' });
|
|
||||||
}}
|
|
||||||
onResetModelSource={() => setModelSource(null)}
|
|
||||||
savedProviderForm={savedProviderForm}
|
|
||||||
onSavedProviderFormChange={setSavedProviderForm}
|
|
||||||
savedSelectedModels={savedSelectedModels}
|
|
||||||
onSavedSelectedModelsChange={setSavedSelectedModels}
|
|
||||||
onGoToNextLayer={() => {
|
|
||||||
if (modelsAdded) {
|
|
||||||
goToStep2Layer(4);
|
|
||||||
} else {
|
|
||||||
goToStep2Layer(3);
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
runnerConfigItems={selectedRunnerConfigItems}
|
runnerConfigItems={selectedRunnerConfigItems}
|
||||||
runnerConfigValues={runnerConfig}
|
runnerConfigValues={runnerConfig}
|
||||||
onRunnerConfigChange={setRunnerConfig}
|
onRunnerConfigChange={setRunnerConfig}
|
||||||
@@ -1127,354 +977,21 @@ function StepBotConfig({
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
// Model scan sub-component (used within Step 2)
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
function WizardModelScan({
|
|
||||||
providerUuid,
|
|
||||||
initialSelectedModels,
|
|
||||||
onSelectedModelsChange,
|
|
||||||
onModelsAdded,
|
|
||||||
}: {
|
|
||||||
providerUuid: string | null;
|
|
||||||
initialSelectedModels: Set<string>;
|
|
||||||
onSelectedModelsChange: (v: Set<string>) => void;
|
|
||||||
onModelsAdded: () => void;
|
|
||||||
}) {
|
|
||||||
const { t } = useTranslation();
|
|
||||||
const [scanning, setScanning] = useState(false);
|
|
||||||
const [scannedModels, setScannedModels] = useState<
|
|
||||||
{ name: string; context_length?: number | null }[]
|
|
||||||
>([]);
|
|
||||||
const [selectedModels, setSelectedModels] = useState<Set<string>>(
|
|
||||||
initialSelectedModels,
|
|
||||||
);
|
|
||||||
const [adding, setAdding] = useState(false);
|
|
||||||
const [scanDone, setScanDone] = useState(false);
|
|
||||||
const [searchQuery, setSearchQuery] = useState('');
|
|
||||||
const [manualModelName, setManualModelName] = useState('');
|
|
||||||
const [manualAdding, setManualAdding] = useState(false);
|
|
||||||
const [addedModelNames, setAddedModelNames] = useState<Set<string>>(
|
|
||||||
new Set(initialSelectedModels),
|
|
||||||
);
|
|
||||||
|
|
||||||
// Auto-scan on mount
|
|
||||||
useEffect(() => {
|
|
||||||
if (!providerUuid) return;
|
|
||||||
let cancelled = false;
|
|
||||||
(async () => {
|
|
||||||
setScanning(true);
|
|
||||||
try {
|
|
||||||
const resp = await httpClient.scanProviderModels(
|
|
||||||
providerUuid,
|
|
||||||
'llm',
|
|
||||||
);
|
|
||||||
if (!cancelled) {
|
|
||||||
setScannedModels(resp.models ?? []);
|
|
||||||
setScanDone(true);
|
|
||||||
}
|
|
||||||
} catch {
|
|
||||||
if (!cancelled) setScanDone(true);
|
|
||||||
} finally {
|
|
||||||
if (!cancelled) setScanning(false);
|
|
||||||
}
|
|
||||||
})();
|
|
||||||
return () => {
|
|
||||||
cancelled = true;
|
|
||||||
};
|
|
||||||
}, [providerUuid]);
|
|
||||||
|
|
||||||
const filteredModels = searchQuery
|
|
||||||
? scannedModels.filter((m) =>
|
|
||||||
m.name.toLowerCase().includes(searchQuery.toLowerCase()),
|
|
||||||
)
|
|
||||||
: scannedModels;
|
|
||||||
|
|
||||||
const toggleModel = (name: string) => {
|
|
||||||
setSelectedModels((prev) => {
|
|
||||||
const next = new Set(prev);
|
|
||||||
if (next.has(name)) next.delete(name);
|
|
||||||
else next.add(name);
|
|
||||||
onSelectedModelsChange(next);
|
|
||||||
return next;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
const getExistingModelNames = async (): Promise<Set<string>> => {
|
|
||||||
if (!providerUuid) return new Set();
|
|
||||||
try {
|
|
||||||
const resp = await httpClient.getProviderLLMModels(providerUuid);
|
|
||||||
return new Set((resp.models ?? []).map((m: { name: string }) => m.name));
|
|
||||||
} catch {
|
|
||||||
return new Set();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleAddSelected = async () => {
|
|
||||||
if (!providerUuid || selectedModels.size === 0) return;
|
|
||||||
setAdding(true);
|
|
||||||
try {
|
|
||||||
const existing = await getExistingModelNames();
|
|
||||||
let added = 0;
|
|
||||||
for (const name of selectedModels) {
|
|
||||||
if (existing.has(name)) continue;
|
|
||||||
const model = scannedModels.find((m) => m.name === name);
|
|
||||||
await httpClient.createProviderLLMModel({
|
|
||||||
name,
|
|
||||||
provider_uuid: providerUuid,
|
|
||||||
abilities: (model as { abilities?: string[] })?.abilities || ['llm'],
|
|
||||||
reasoning_config: { level: 'provider_default' },
|
|
||||||
context_length: model?.context_length ?? null,
|
|
||||||
extra_args: {},
|
|
||||||
} as never);
|
|
||||||
existing.add(name);
|
|
||||||
added++;
|
|
||||||
}
|
|
||||||
if (added > 0) {
|
|
||||||
toast.success(t('wizard.provider.modelsAdded', { count: added }));
|
|
||||||
}
|
|
||||||
setAddedModelNames((prev) => {
|
|
||||||
const next = new Set(prev);
|
|
||||||
for (const name of selectedModels) next.add(name);
|
|
||||||
return next;
|
|
||||||
});
|
|
||||||
setSelectedModels(new Set());
|
|
||||||
onSelectedModelsChange(new Set());
|
|
||||||
} catch {
|
|
||||||
toast.error(t('wizard.provider.modelsAddError'));
|
|
||||||
} finally {
|
|
||||||
setAdding(false);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleManualAdd = async () => {
|
|
||||||
const name = manualModelName.trim();
|
|
||||||
if (!providerUuid || !name) return;
|
|
||||||
setManualAdding(true);
|
|
||||||
try {
|
|
||||||
const existing = await getExistingModelNames();
|
|
||||||
if (existing.has(name)) {
|
|
||||||
toast.error(t('wizard.provider.modelAlreadyExists', { name }));
|
|
||||||
setManualAdding(false);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
await httpClient.createProviderLLMModel({
|
|
||||||
name,
|
|
||||||
provider_uuid: providerUuid,
|
|
||||||
abilities: ['llm'],
|
|
||||||
reasoning_config: { level: 'provider_default' },
|
|
||||||
context_length: null,
|
|
||||||
extra_args: {},
|
|
||||||
} as never);
|
|
||||||
toast.success(t('wizard.provider.modelsAdded', { count: 1 }));
|
|
||||||
setAddedModelNames((prev) => new Set(prev).add(name));
|
|
||||||
setManualModelName('');
|
|
||||||
} catch {
|
|
||||||
toast.error(t('wizard.provider.modelsAddError'));
|
|
||||||
} finally {
|
|
||||||
setManualAdding(false);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className="max-w-2xl mx-auto w-full animate-in fade-in slide-in-from-bottom-2 duration-300">
|
|
||||||
<div className="text-center mb-6">
|
|
||||||
<h2 className="text-xl font-semibold">
|
|
||||||
{t('wizard.provider.scanTitle')}
|
|
||||||
</h2>
|
|
||||||
<p className="text-sm text-muted-foreground mt-1">
|
|
||||||
{t('wizard.provider.scanDescription')}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="border rounded-lg p-6 bg-card space-y-4">
|
|
||||||
{scanning && (
|
|
||||||
<div className="flex items-center justify-center gap-2 py-8 text-muted-foreground">
|
|
||||||
<Loader2 className="w-5 h-5 animate-spin" />
|
|
||||||
<span>{t('wizard.provider.scanning')}</span>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{!scanning && scanDone && (
|
|
||||||
<>
|
|
||||||
{/* Search input for scanned models */}
|
|
||||||
{scannedModels.length > 0 && (
|
|
||||||
<Input
|
|
||||||
placeholder={t('wizard.provider.searchModels')}
|
|
||||||
value={searchQuery}
|
|
||||||
onChange={(e) => setSearchQuery(e.target.value)}
|
|
||||||
className="mb-2"
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{/* Scanned models list */}
|
|
||||||
{scannedModels.length > 0 ? (
|
|
||||||
<>
|
|
||||||
<div className="max-h-48 overflow-y-auto space-y-2">
|
|
||||||
{filteredModels.map((model) => {
|
|
||||||
const isAdded = addedModelNames.has(model.name);
|
|
||||||
return (
|
|
||||||
<label
|
|
||||||
key={model.name}
|
|
||||||
className={cn(
|
|
||||||
'flex items-center gap-3 p-3 rounded-lg border transition-colors',
|
|
||||||
isAdded
|
|
||||||
? 'opacity-50 cursor-not-allowed bg-muted/50'
|
|
||||||
: 'cursor-pointer hover:bg-accent',
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
<input
|
|
||||||
type="checkbox"
|
|
||||||
checked={selectedModels.has(model.name) || isAdded}
|
|
||||||
disabled={isAdded}
|
|
||||||
onChange={() => toggleModel(model.name)}
|
|
||||||
className="w-4 h-4 rounded"
|
|
||||||
/>
|
|
||||||
<div className="flex-1 min-w-0">
|
|
||||||
<span className="text-sm font-medium truncate block">
|
|
||||||
{model.name}
|
|
||||||
</span>
|
|
||||||
{model.context_length && (
|
|
||||||
<span className="text-xs text-muted-foreground">
|
|
||||||
ctx: {model.context_length.toLocaleString()}
|
|
||||||
</span>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
{isAdded && (
|
|
||||||
<span className="text-xs text-green-600 font-medium shrink-0">
|
|
||||||
{t('wizard.provider.alreadyAdded')}
|
|
||||||
</span>
|
|
||||||
)}
|
|
||||||
</label>
|
|
||||||
);
|
|
||||||
})}
|
|
||||||
{filteredModels.length === 0 && (
|
|
||||||
<p className="text-sm text-muted-foreground text-center py-4">
|
|
||||||
{t('wizard.provider.noMatch')}
|
|
||||||
</p>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="flex gap-3 pt-2">
|
|
||||||
<Button
|
|
||||||
onClick={handleAddSelected}
|
|
||||||
disabled={selectedModels.size === 0 || adding}
|
|
||||||
className="flex-1"
|
|
||||||
>
|
|
||||||
{adding && (
|
|
||||||
<Loader2 className="w-4 h-4 mr-1.5 animate-spin" />
|
|
||||||
)}
|
|
||||||
{t('wizard.provider.addSelected', {
|
|
||||||
count: selectedModels.size,
|
|
||||||
})}
|
|
||||||
</Button>
|
|
||||||
<Button variant="outline" onClick={onModelsAdded}>
|
|
||||||
{t('wizard.provider.skipModelAdd')}
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</>
|
|
||||||
) : (
|
|
||||||
<div className="text-center py-4 text-muted-foreground">
|
|
||||||
<p>{t('wizard.provider.noModelsFound')}</p>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{/* Divider */}
|
|
||||||
<div className="flex items-center gap-3 py-2">
|
|
||||||
<div className="flex-1 h-px bg-border" />
|
|
||||||
<span className="text-xs text-muted-foreground">
|
|
||||||
{t('wizard.provider.orDivider')}
|
|
||||||
</span>
|
|
||||||
<div className="flex-1 h-px bg-border" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Manual add */}
|
|
||||||
<div className="flex gap-2">
|
|
||||||
<Input
|
|
||||||
placeholder={t('wizard.provider.manualModelPlaceholder')}
|
|
||||||
value={manualModelName}
|
|
||||||
onChange={(e) => setManualModelName(e.target.value)}
|
|
||||||
onKeyDown={(e) => e.key === 'Enter' && handleManualAdd()}
|
|
||||||
/>
|
|
||||||
<Button
|
|
||||||
onClick={handleManualAdd}
|
|
||||||
disabled={!manualModelName.trim() || manualAdding}
|
|
||||||
>
|
|
||||||
{manualAdding && (
|
|
||||||
<Loader2 className="w-4 h-4 mr-1.5 animate-spin" />
|
|
||||||
)}
|
|
||||||
{t('wizard.provider.addManual')}
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{/* Next button when models have been added */}
|
|
||||||
{addedModelNames.size > 0 && (
|
|
||||||
<div className="flex justify-end pt-2 border-t">
|
|
||||||
<Button onClick={onModelsAdded}>
|
|
||||||
{t('wizard.next')}
|
|
||||||
<ArrowRight className="w-4 h-4 ml-1.5" />
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// Step 2: Select & Configure AI Engine
|
// Step 2: Select & Configure AI Engine
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
function StepAIEngine({
|
function StepAIEngine({
|
||||||
runnerOptions,
|
runnerOptions,
|
||||||
step2Layer,
|
selected,
|
||||||
aiEngineMode,
|
onSelect,
|
||||||
onAiEngineModeSelect,
|
|
||||||
selectedRunner,
|
|
||||||
onSelectRunner,
|
|
||||||
isLocalAccount,
|
|
||||||
onSpaceAuth,
|
|
||||||
modelSource,
|
|
||||||
onModelSourceSelect,
|
|
||||||
providerCreated,
|
|
||||||
createdProviderUuid,
|
|
||||||
modelsAdded,
|
|
||||||
onProviderCreated,
|
|
||||||
onModelsAdded,
|
|
||||||
onResetModelSource,
|
|
||||||
savedProviderForm,
|
|
||||||
onSavedProviderFormChange,
|
|
||||||
savedSelectedModels,
|
|
||||||
onSavedSelectedModelsChange,
|
|
||||||
onGoToNextLayer,
|
|
||||||
runnerConfigItems,
|
runnerConfigItems,
|
||||||
runnerConfigValues,
|
runnerConfigValues,
|
||||||
onRunnerConfigChange,
|
onRunnerConfigChange,
|
||||||
}: {
|
}: {
|
||||||
runnerOptions: { name: string; label: { en_US: string; zh_Hans: string } }[];
|
runnerOptions: { name: string; label: { en_US: string; zh_Hans: string } }[];
|
||||||
step2Layer: number;
|
selected: string | null;
|
||||||
aiEngineMode: 'orchestrated' | 'llm' | null;
|
onSelect: (name: string) => void;
|
||||||
onAiEngineModeSelect: (mode: 'orchestrated' | 'llm') => void;
|
|
||||||
selectedRunner: string | null;
|
|
||||||
onSelectRunner: (name: string) => void;
|
|
||||||
isLocalAccount: boolean;
|
|
||||||
onSpaceAuth: () => void;
|
|
||||||
modelSource: 'space' | 'custom' | null;
|
|
||||||
onModelSourceSelect: (source: 'space' | 'custom') => void;
|
|
||||||
providerCreated: boolean;
|
|
||||||
createdProviderUuid: string | null;
|
|
||||||
modelsAdded: boolean;
|
|
||||||
onProviderCreated: (uuid?: string) => void;
|
|
||||||
onModelsAdded: () => void;
|
|
||||||
onResetModelSource: () => void;
|
|
||||||
savedProviderForm: { name?: string; requester?: string; base_url?: string; api_key?: string };
|
|
||||||
onSavedProviderFormChange: (v: { name?: string; requester?: string; base_url?: string; api_key?: string }) => void;
|
|
||||||
savedSelectedModels: Set<string>;
|
|
||||||
onSavedSelectedModelsChange: (v: Set<string>) => void;
|
|
||||||
onGoToNextLayer: () => void;
|
|
||||||
runnerConfigItems: IDynamicFormItemSchema[];
|
runnerConfigItems: IDynamicFormItemSchema[];
|
||||||
runnerConfigValues: Record<string, unknown>;
|
runnerConfigValues: Record<string, unknown>;
|
||||||
onRunnerConfigChange: (v: Record<string, unknown>) => void;
|
onRunnerConfigChange: (v: Record<string, unknown>) => void;
|
||||||
@@ -1490,19 +1007,14 @@ function StepAIEngine({
|
|||||||
);
|
);
|
||||||
|
|
||||||
const runnerLabel = useMemo(() => {
|
const runnerLabel = useMemo(() => {
|
||||||
const r = runnerOptions.find((o) => o.name === selectedRunner);
|
const r = runnerOptions.find((o) => o.name === selected);
|
||||||
return r ? extractI18nObject(r.label) : (selectedRunner ?? '');
|
return r ? extractI18nObject(r.label) : (selected ?? '');
|
||||||
}, [runnerOptions, selectedRunner]);
|
}, [runnerOptions, selected]);
|
||||||
|
|
||||||
// Orchestrated runners: everything except local-agent
|
// Before any runner is selected: centered grid layout
|
||||||
const orchestratedRunners = runnerOptions.filter(
|
if (!selected) {
|
||||||
(o) => o.name !== 'local-agent',
|
|
||||||
);
|
|
||||||
|
|
||||||
// ---- Layer 0: Main choice ----
|
|
||||||
if (step2Layer === 0) {
|
|
||||||
return (
|
return (
|
||||||
<div className="space-y-6 max-w-3xl mx-auto">
|
<div className="space-y-6 max-w-4xl mx-auto">
|
||||||
<div className="text-center">
|
<div className="text-center">
|
||||||
<h2 className="text-xl font-semibold">
|
<h2 className="text-xl font-semibold">
|
||||||
{t('wizard.aiEngine.title')}
|
{t('wizard.aiEngine.title')}
|
||||||
@@ -1511,75 +1023,12 @@ function StepAIEngine({
|
|||||||
{t('wizard.aiEngine.description')}
|
{t('wizard.aiEngine.description')}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="grid grid-cols-1 sm:grid-cols-2 gap-5">
|
|
||||||
{/* Orchestrated Agent Apps */}
|
|
||||||
<div
|
|
||||||
className="relative rounded-xl border-2 border-border cursor-pointer transition-all hover:shadow-lg hover:border-primary/50 hover:scale-[1.02]"
|
|
||||||
onClick={() => onAiEngineModeSelect('orchestrated')}
|
|
||||||
>
|
|
||||||
<div className="p-6 flex flex-col items-center gap-4 text-center h-full">
|
|
||||||
<div className="w-14 h-14 rounded-full bg-muted flex items-center justify-center">
|
|
||||||
<Wrench className="w-7 h-7 text-muted-foreground" />
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<h3 className="text-lg font-semibold">
|
|
||||||
{t('wizard.aiEngine.orchestrated.title')}
|
|
||||||
</h3>
|
|
||||||
<p className="text-sm text-muted-foreground mt-1">
|
|
||||||
{t('wizard.aiEngine.orchestrated.description')}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<Button variant="outline" size="lg" className="w-full">
|
|
||||||
{t('wizard.aiEngine.orchestrated.action')}
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Direct LLM */}
|
|
||||||
<div
|
|
||||||
className="relative rounded-xl border-2 border-border cursor-pointer transition-all hover:shadow-lg hover:border-primary/50 hover:scale-[1.02]"
|
|
||||||
onClick={() => onAiEngineModeSelect('llm')}
|
|
||||||
>
|
|
||||||
<div className="p-6 flex flex-col items-center gap-4 text-center h-full">
|
|
||||||
<div className="w-14 h-14 rounded-full bg-muted flex items-center justify-center">
|
|
||||||
<Rocket className="w-7 h-7 text-muted-foreground" />
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<h3 className="text-lg font-semibold">
|
|
||||||
{t('wizard.aiEngine.llm.title')}
|
|
||||||
</h3>
|
|
||||||
<p className="text-sm text-muted-foreground mt-1">
|
|
||||||
{t('wizard.aiEngine.llm.description')}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<Button variant="outline" size="lg" className="w-full">
|
|
||||||
{t('wizard.aiEngine.llm.action')}
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// ---- Layer 1a: Orchestrated runners ----
|
|
||||||
if (step2Layer === 1 && aiEngineMode === 'orchestrated') {
|
|
||||||
return (
|
|
||||||
<div className="space-y-6 max-w-4xl mx-auto">
|
|
||||||
<div className="text-center">
|
|
||||||
<h2 className="text-xl font-semibold">
|
|
||||||
{t('wizard.aiEngine.orchestrated.selectTitle')}
|
|
||||||
</h2>
|
|
||||||
<p className="text-sm text-muted-foreground mt-1">
|
|
||||||
{t('wizard.aiEngine.orchestrated.selectDescription')}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4">
|
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4">
|
||||||
{orchestratedRunners.map((opt) => (
|
{runnerOptions.map((opt) => (
|
||||||
<Card
|
<Card
|
||||||
key={opt.name}
|
key={opt.name}
|
||||||
className="cursor-pointer transition-all hover:shadow-md hover:border-primary/50"
|
className="cursor-pointer transition-all hover:shadow-md hover:border-primary/50"
|
||||||
onClick={() => onSelectRunner(opt.name)}
|
onClick={() => onSelect(opt.name)}
|
||||||
>
|
>
|
||||||
<CardHeader className="flex flex-row items-center gap-3">
|
<CardHeader className="flex flex-row items-center gap-3">
|
||||||
<div className="min-w-0 flex-1">
|
<div className="min-w-0 flex-1">
|
||||||
@@ -1598,109 +1047,9 @@ function StepAIEngine({
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---- Layer 1b: LLM model source selection ----
|
// After a runner is selected: left-right split layout
|
||||||
if (step2Layer === 1 && aiEngineMode === 'llm') {
|
// On mobile (< lg): single column, normal scroll from parent
|
||||||
return (
|
// On desktop (>= lg): side-by-side with independent scroll per column
|
||||||
<div className="space-y-6 max-w-3xl mx-auto">
|
|
||||||
<div className="text-center">
|
|
||||||
<h2 className="text-xl font-semibold">
|
|
||||||
{t('wizard.modelSource.title')}
|
|
||||||
</h2>
|
|
||||||
<p className="text-sm text-muted-foreground mt-1">
|
|
||||||
{t('wizard.modelSource.description')}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div className="grid grid-cols-1 sm:grid-cols-2 gap-5">
|
|
||||||
{/* LangBot Service */}
|
|
||||||
<div
|
|
||||||
className="relative rounded-xl border-2 border-border cursor-pointer transition-all hover:shadow-lg hover:border-primary/50 hover:scale-[1.02]"
|
|
||||||
onClick={() => onModelSourceSelect('space')}
|
|
||||||
>
|
|
||||||
<div className="p-6 flex flex-col items-center gap-4 text-center h-full">
|
|
||||||
<div className="w-14 h-14 rounded-full bg-muted flex items-center justify-center">
|
|
||||||
<Rocket className="w-7 h-7 text-muted-foreground" />
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<h3 className="text-lg font-semibold">
|
|
||||||
{t('wizard.modelSource.space.title')}
|
|
||||||
</h3>
|
|
||||||
<p className="text-sm text-muted-foreground mt-1">
|
|
||||||
{t('wizard.modelSource.space.description')}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<Button variant="outline" size="lg" className="w-full">
|
|
||||||
{t('wizard.modelSource.space.action')}
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Custom provider */}
|
|
||||||
<div
|
|
||||||
className="relative rounded-xl border-2 border-border cursor-pointer transition-all hover:shadow-lg hover:border-primary/50 hover:scale-[1.02]"
|
|
||||||
onClick={() => onModelSourceSelect('custom')}
|
|
||||||
>
|
|
||||||
<div className="p-6 flex flex-col items-center gap-4 text-center h-full">
|
|
||||||
<div className="w-14 h-14 rounded-full bg-muted flex items-center justify-center">
|
|
||||||
<Wrench className="w-7 h-7 text-muted-foreground" />
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<h3 className="text-lg font-semibold">
|
|
||||||
{t('wizard.modelSource.custom.title')}
|
|
||||||
</h3>
|
|
||||||
<p className="text-sm text-muted-foreground mt-1">
|
|
||||||
{t('wizard.modelSource.custom.description')}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<Button variant="outline" size="lg" className="w-full">
|
|
||||||
{t('wizard.modelSource.custom.action')}
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// ---- Layer 2: Custom provider creation form ----
|
|
||||||
if (step2Layer === 2) {
|
|
||||||
return (
|
|
||||||
<div className="max-w-2xl mx-auto w-full animate-in fade-in slide-in-from-bottom-2 duration-300">
|
|
||||||
<div className="text-center mb-6">
|
|
||||||
<h2 className="text-xl font-semibold">
|
|
||||||
{t('wizard.provider.title')}
|
|
||||||
</h2>
|
|
||||||
<p className="text-sm text-muted-foreground mt-1">
|
|
||||||
{t('wizard.provider.description')}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div className="border rounded-lg p-6 bg-card">
|
|
||||||
<ProviderForm
|
|
||||||
initialValues={savedProviderForm}
|
|
||||||
onValuesChange={onSavedProviderFormChange}
|
|
||||||
submitButtonText={t('wizard.provider.saveAndNext')}
|
|
||||||
onFormSubmit={(uuid) => {
|
|
||||||
onProviderCreated(uuid);
|
|
||||||
}}
|
|
||||||
onFormCancel={onResetModelSource}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// ---- Layer 2.5: Model scan & add after provider creation ----
|
|
||||||
if (step2Layer === 3) {
|
|
||||||
return (
|
|
||||||
<WizardModelScan
|
|
||||||
providerUuid={createdProviderUuid}
|
|
||||||
initialSelectedModels={savedSelectedModels}
|
|
||||||
onSelectedModelsChange={onSavedSelectedModelsChange}
|
|
||||||
onModelsAdded={onModelsAdded}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// ---- Layer 3: Runner configuration form ----
|
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col lg:flex-1 lg:min-h-0 max-w-6xl mx-auto w-full">
|
<div className="flex flex-col lg:flex-1 lg:min-h-0 max-w-6xl mx-auto w-full">
|
||||||
<div className="text-center shrink-0 mb-4">
|
<div className="text-center shrink-0 mb-4">
|
||||||
@@ -1711,61 +1060,53 @@ function StepAIEngine({
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex flex-col lg:flex-row lg:justify-center gap-6 lg:flex-1 lg:min-h-0 animate-in fade-in slide-in-from-bottom-2 duration-300">
|
<div className="flex flex-col lg:flex-row lg:justify-center gap-6 lg:flex-1 lg:min-h-0 animate-in fade-in slide-in-from-bottom-2 duration-300">
|
||||||
{/* Left: runner list (only for orchestrated mode) */}
|
{/* Left: runner list */}
|
||||||
{aiEngineMode === 'orchestrated' && (
|
<div className="w-full lg:w-[280px] shrink-0 lg:overflow-y-auto lg:pr-3">
|
||||||
<div className="w-full lg:w-[280px] shrink-0 lg:overflow-y-auto lg:pr-3">
|
{/* p-1 provides space for ring-2 (4px) to render without clipping */}
|
||||||
<div className="space-y-3 p-1">
|
<div className="space-y-3 p-1">
|
||||||
{orchestratedRunners.map((opt) => {
|
{runnerOptions.map((opt) => {
|
||||||
const isSelected = selectedRunner === opt.name;
|
const isSelected = selected === opt.name;
|
||||||
return (
|
return (
|
||||||
<Card
|
<Card
|
||||||
key={opt.name}
|
key={opt.name}
|
||||||
className={cn(
|
className={cn(
|
||||||
'cursor-pointer transition-all',
|
'cursor-pointer transition-all',
|
||||||
isSelected
|
isSelected
|
||||||
? 'ring-2 ring-primary shadow-md'
|
? 'ring-2 ring-primary shadow-md'
|
||||||
: 'opacity-50 hover:opacity-80 hover:border-primary/50',
|
: 'opacity-50 hover:opacity-80 hover:border-primary/50',
|
||||||
)}
|
)}
|
||||||
onClick={() => onSelectRunner(opt.name)}
|
onClick={() => onSelect(opt.name)}
|
||||||
>
|
>
|
||||||
<CardHeader className="flex flex-row items-center gap-3 py-3 px-4">
|
<CardHeader className="flex flex-row items-center gap-3 py-3 px-4">
|
||||||
<div className="min-w-0 flex-1">
|
<div className="min-w-0 flex-1">
|
||||||
<CardTitle
|
<CardTitle
|
||||||
className={cn(
|
className={cn(
|
||||||
'text-sm',
|
'text-sm',
|
||||||
!isSelected && 'text-muted-foreground',
|
!isSelected && 'text-muted-foreground',
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{extractI18nObject(opt.label)}
|
{extractI18nObject(opt.label)}
|
||||||
</CardTitle>
|
</CardTitle>
|
||||||
<CardDescription className="text-xs font-mono text-muted-foreground">
|
<CardDescription className="text-xs font-mono text-muted-foreground">
|
||||||
{opt.name}
|
{opt.name}
|
||||||
</CardDescription>
|
</CardDescription>
|
||||||
</div>
|
</div>
|
||||||
{isSelected && (
|
{isSelected && (
|
||||||
<div className="shrink-0">
|
<div className="shrink-0">
|
||||||
<div className="w-5 h-5 rounded-full bg-primary flex items-center justify-center">
|
<div className="w-5 h-5 rounded-full bg-primary flex items-center justify-center">
|
||||||
<Check className="w-3 h-3 text-primary-foreground" />
|
<Check className="w-3 h-3 text-primary-foreground" />
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
</div>
|
||||||
</CardHeader>
|
)}
|
||||||
</Card>
|
</CardHeader>
|
||||||
);
|
</Card>
|
||||||
})}
|
);
|
||||||
</div>
|
})}
|
||||||
</div>
|
</div>
|
||||||
)}
|
</div>
|
||||||
|
|
||||||
{/* Right: runner configuration */}
|
{/* Right: runner configuration — fixed width on desktop */}
|
||||||
<div
|
<div className="w-full lg:w-[560px] shrink-0 lg:overflow-y-auto lg:pr-3 animate-in fade-in slide-in-from-right-2 duration-300">
|
||||||
className={cn(
|
|
||||||
'shrink-0 lg:overflow-y-auto lg:pr-3 animate-in fade-in slide-in-from-right-2 duration-300',
|
|
||||||
aiEngineMode === 'orchestrated'
|
|
||||||
? 'w-full lg:w-[560px]'
|
|
||||||
: 'w-full max-w-2xl mx-auto',
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
<div className="p-1">
|
<div className="p-1">
|
||||||
{runnerConfigItems.length > 0 && (
|
{runnerConfigItems.length > 0 && (
|
||||||
<Card>
|
<Card>
|
||||||
@@ -1776,7 +1117,7 @@ function StepAIEngine({
|
|||||||
</CardHeader>
|
</CardHeader>
|
||||||
<CardContent>
|
<CardContent>
|
||||||
<DynamicFormComponent
|
<DynamicFormComponent
|
||||||
key={selectedRunner ?? 'llm'}
|
key={selected}
|
||||||
itemConfigList={runnerConfigItems}
|
itemConfigList={runnerConfigItems}
|
||||||
initialValues={runnerConfigValues as Record<string, object>}
|
initialValues={runnerConfigValues as Record<string, object>}
|
||||||
onSubmit={stableRunnerConfigCb}
|
onSubmit={stableRunnerConfigCb}
|
||||||
|
|||||||
@@ -85,18 +85,18 @@ const enUS = {
|
|||||||
'Recommended: Use official stable model APIs and cloud services',
|
'Recommended: Use official stable model APIs and cloud services',
|
||||||
loginLocal: 'Login with local account',
|
loginLocal: 'Login with local account',
|
||||||
loginWithPassword: 'Login with password',
|
loginWithPassword: 'Login with password',
|
||||||
spaceLoginTitle: 'Login with Space',
|
spaceLoginTitle: 'Login with LangBot Account',
|
||||||
spaceLoginDescription:
|
spaceLoginDescription:
|
||||||
'Scan the QR code or visit the link below to authorize',
|
'Scan the QR code or visit the link below to authorize',
|
||||||
spaceLoginUserCode: 'Your code',
|
spaceLoginUserCode: 'Your code',
|
||||||
spaceLoginExpires: 'Code expires in {{seconds}} seconds',
|
spaceLoginExpires: 'Code expires in {{seconds}} seconds',
|
||||||
spaceLoginWaiting: 'Waiting for authorization...',
|
spaceLoginWaiting: 'Waiting for authorization...',
|
||||||
spaceLoginSuccess: 'Authorization successful',
|
spaceLoginSuccess: 'Authorization successful',
|
||||||
spaceLoginFailed: 'Space login failed',
|
spaceLoginFailed: 'LangBot Account login failed',
|
||||||
spaceLoginExpired: 'Authorization code expired, please try again',
|
spaceLoginExpired: 'Authorization code expired, please try again',
|
||||||
spaceLoginCancel: 'Cancel',
|
spaceLoginCancel: 'Cancel',
|
||||||
spaceLoginVisitLink: 'Visit link',
|
spaceLoginVisitLink: 'Visit link',
|
||||||
spaceLoginProcessing: 'Logging in with Space',
|
spaceLoginProcessing: 'Logging in with LangBot Account',
|
||||||
spaceLoginProcessingDescription:
|
spaceLoginProcessingDescription:
|
||||||
'Please wait while we complete your login...',
|
'Please wait while we complete your login...',
|
||||||
spaceLoginSuccessDescription: 'Redirecting to LangBot...',
|
spaceLoginSuccessDescription: 'Redirecting to LangBot...',
|
||||||
@@ -105,7 +105,7 @@ const enUS = {
|
|||||||
backToLogin: 'Back to Login',
|
backToLogin: 'Back to Login',
|
||||||
backToHome: 'Back to Home',
|
backToHome: 'Back to Home',
|
||||||
spaceAccountCannotChangePassword:
|
spaceAccountCannotChangePassword:
|
||||||
'Space accounts cannot change password here',
|
'LangBot Accounts cannot change password here',
|
||||||
theme: 'Theme',
|
theme: 'Theme',
|
||||||
changePassword: 'Change Password',
|
changePassword: 'Change Password',
|
||||||
currentPassword: 'Current Password',
|
currentPassword: 'Current Password',
|
||||||
@@ -254,8 +254,9 @@ const enUS = {
|
|||||||
llmModels: 'LLM Models',
|
llmModels: 'LLM Models',
|
||||||
localProvider: 'Local',
|
localProvider: 'Local',
|
||||||
localProviderDescription: 'Models configured and managed locally',
|
localProviderDescription: 'Models configured and managed locally',
|
||||||
spaceProviderDescription: 'Models synced from your Space account',
|
spaceProviderDescription: 'Models synced from your LangBot Account',
|
||||||
spaceDisabledForLocalAccount: 'Login with Space to use cloud models',
|
spaceDisabledForLocalAccount:
|
||||||
|
'Login with LangBot Account to use cloud models',
|
||||||
syncModels: 'Sync',
|
syncModels: 'Sync',
|
||||||
syncSuccess: 'Sync complete: {{created}} created, {{updated}} updated',
|
syncSuccess: 'Sync complete: {{created}} created, {{updated}} updated',
|
||||||
syncError: 'Sync failed: ',
|
syncError: 'Sync failed: ',
|
||||||
@@ -291,15 +292,15 @@ const enUS = {
|
|||||||
langbotModelsDescription: 'Cloud models powered by LangBot Space',
|
langbotModelsDescription: 'Cloud models powered by LangBot Space',
|
||||||
credits: 'Credits',
|
credits: 'Credits',
|
||||||
loginWithSpace: 'Login with LangBot Account',
|
loginWithSpace: 'Login with LangBot Account',
|
||||||
loginToUseModels: 'Login with Space to use cloud models',
|
loginToUseModels: 'Login with LangBot Account to use cloud models',
|
||||||
ownerMustBindSpace:
|
ownerMustBindSpace:
|
||||||
'The Workspace owner must connect Space for LangBot Models.',
|
'The Workspace owner must connect a LangBot Account for LangBot Models.',
|
||||||
usesOwnerSpaceBilling:
|
usesOwnerSpaceBilling:
|
||||||
"Uses the Workspace owner's Space billing and credits.",
|
"Uses the Workspace owner's LangBot Account billing and credits.",
|
||||||
noModels: 'No models configured',
|
noModels: 'No models configured',
|
||||||
langbotModels: 'LangBot Models',
|
langbotModels: 'LangBot Models',
|
||||||
spaceTrialTooltip:
|
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',
|
unlockModels: 'Login to use',
|
||||||
editProvider: 'Edit Provider',
|
editProvider: 'Edit Provider',
|
||||||
addProvider: 'Add Provider',
|
addProvider: 'Add Provider',
|
||||||
@@ -1218,13 +1219,13 @@ const enUS = {
|
|||||||
adminAccountNote:
|
adminAccountNote:
|
||||||
'The account you use here will be set as the administrator account',
|
'The account you use here will be set as the administrator account',
|
||||||
register: 'Register',
|
register: 'Register',
|
||||||
initWithSpace: 'Initialize with Space',
|
initWithSpace: 'Initialize with LangBot Account',
|
||||||
spaceRecommended:
|
spaceRecommended:
|
||||||
'Recommended: Use official stable model APIs and cloud services',
|
'Recommended: Use official stable model APIs and cloud services',
|
||||||
spaceInfoTip1:
|
spaceInfoTip1:
|
||||||
'Space provides unified account authentication services without uploading any of your sensitive information.',
|
'Space provides unified account authentication services without uploading any of your sensitive information.',
|
||||||
spaceInfoTip2:
|
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:
|
spaceInfoTip3:
|
||||||
'Your login method does not affect other features. You can configure and use models from other sources at any time.',
|
'Your login method does not affect other features. You can configure and use models from other sources at any time.',
|
||||||
registerLocal: 'Register local account',
|
registerLocal: 'Register local account',
|
||||||
@@ -1281,32 +1282,32 @@ const enUS = {
|
|||||||
passwordNotSet: 'Not Set',
|
passwordNotSet: 'Not Set',
|
||||||
passwordSetDescription:
|
passwordSetDescription:
|
||||||
'Password is set, you can login with email and password',
|
'Password is set, you can login with email and password',
|
||||||
spaceStatus: 'Space Account',
|
spaceStatus: 'LangBot Account',
|
||||||
spaceBound: 'Bound',
|
spaceBound: 'Bound',
|
||||||
spaceNotBound: 'Not Bound',
|
spaceNotBound: 'Not Bound',
|
||||||
spaceBoundDescription:
|
spaceBoundDescription:
|
||||||
'Space account bound, official model APIs and cloud services available',
|
'LangBot Account bound, official model APIs and cloud services available',
|
||||||
bindSpace: 'Bind Space Account',
|
bindSpace: 'Bind LangBot Account',
|
||||||
bindSpaceDescription: 'Bind to use official model APIs and cloud services',
|
bindSpaceDescription: 'Bind to use official model APIs and cloud services',
|
||||||
bindSpaceButton: 'Bind',
|
bindSpaceButton: 'Bind',
|
||||||
bindSpaceConfirmTitle: 'Confirm Binding',
|
bindSpaceConfirmTitle: 'Confirm Binding',
|
||||||
bindSpaceConfirmDescription:
|
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:
|
bindSpaceWarning:
|
||||||
'After binding, your login email will be changed from {{localEmail}} to the Space account email.',
|
'After binding, your login email will be changed from {{localEmail}} to the LangBot Account email.',
|
||||||
bindSpaceSuccess: 'Space account bound successfully',
|
bindSpaceSuccess: 'LangBot Account bound successfully',
|
||||||
bindSpaceFailed: 'Failed to bind Space account',
|
bindSpaceFailed: 'Failed to bind LangBot Account',
|
||||||
bindSpaceInvalidState:
|
bindSpaceInvalidState:
|
||||||
'Invalid bind request. Please try again from account settings.',
|
'Invalid bind request. Please try again from account settings.',
|
||||||
setPasswordHint: 'Set a password to login with email and password',
|
setPasswordHint: 'Set a password to login with email and password',
|
||||||
spaceEmailMismatch:
|
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_registeredTitle: 'Account not registered',
|
||||||
space_account_not_registered:
|
space_account_not_registered:
|
||||||
'No local account is registered for this Space email. Ask the Workspace owner for an invitation.',
|
'No local account is registered for this LangBot Account email. Ask the Workspace owner for an invitation.',
|
||||||
space_account_binding_requiredTitle: 'Space connection required',
|
space_account_binding_requiredTitle: 'LangBot Account connection required',
|
||||||
space_account_binding_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: {
|
workspace: {
|
||||||
title: 'Workspace',
|
title: 'Workspace',
|
||||||
@@ -1807,7 +1808,6 @@ const enUS = {
|
|||||||
botCreateSuccess: 'Bot created successfully!',
|
botCreateSuccess: 'Bot created successfully!',
|
||||||
botSaveSuccess: 'Bot configuration saved and enabled!',
|
botSaveSuccess: 'Bot configuration saved and enabled!',
|
||||||
createError: 'Failed to create resources',
|
createError: 'Failed to create resources',
|
||||||
spaceAuthError: 'Failed to initiate Space authorization',
|
|
||||||
skipSaveError: 'Failed to save skip status. Please try again.',
|
skipSaveError: 'Failed to save skip status. Please try again.',
|
||||||
completeSaveError: 'Failed to save completion status. Please try again.',
|
completeSaveError: 'Failed to save completion status. Please try again.',
|
||||||
step: {
|
step: {
|
||||||
@@ -1835,62 +1835,6 @@ const enUS = {
|
|||||||
title: 'Select an AI Engine',
|
title: 'Select an AI Engine',
|
||||||
description:
|
description:
|
||||||
"Choose the AI engine that will power your bot's intelligence.",
|
"Choose the AI engine that will power your bot's intelligence.",
|
||||||
orchestrated: {
|
|
||||||
title: 'Use Orchestrated Agent Apps',
|
|
||||||
description:
|
|
||||||
'Use pre-built Agent apps from Dify, n8n, Coze, and more.',
|
|
||||||
action: 'Select Agent App',
|
|
||||||
selectTitle: 'Select Agent App',
|
|
||||||
selectDescription: 'Choose the Agent app platform you want to use.',
|
|
||||||
},
|
|
||||||
llm: {
|
|
||||||
title: 'Use LLM Directly',
|
|
||||||
description:
|
|
||||||
'Configure a model provider and use LLM to drive your bot directly.',
|
|
||||||
action: 'Configure LLM',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
spaceBanner: {
|
|
||||||
message:
|
|
||||||
'Connect to LangBot Space for free trial model credits and zero-config instant setup!',
|
|
||||||
action: 'Authorize with Space',
|
|
||||||
},
|
|
||||||
provider: {
|
|
||||||
title: 'Add Model Provider',
|
|
||||||
description:
|
|
||||||
'Add your own model provider. Configure the API key to get started.',
|
|
||||||
scanTitle: 'Scan Available Models',
|
|
||||||
scanDescription: 'Scanning your provider for available LLM models.',
|
|
||||||
scanning: 'Scanning models...',
|
|
||||||
noModelsFound: 'No models found. Please check your provider config.',
|
|
||||||
addSelected: 'Add {{count}} selected model(s)',
|
|
||||||
modelsAdded: 'Added {{count}} model(s)',
|
|
||||||
modelsAddError: 'Failed to add models',
|
|
||||||
skipModelAdd: 'Skip, add later',
|
|
||||||
searchModels: 'Search models...',
|
|
||||||
noMatch: 'No matching models',
|
|
||||||
orDivider: 'or',
|
|
||||||
manualModelPlaceholder: 'Enter model name to add manually',
|
|
||||||
addManual: 'Add',
|
|
||||||
saveAndNext: 'Save & Next',
|
|
||||||
alreadyAdded: 'Added',
|
|
||||||
modelAlreadyExists: 'Model "{{name}}" already exists',
|
|
||||||
},
|
|
||||||
modelSource: {
|
|
||||||
title: 'Choose Model Source',
|
|
||||||
description: 'Select how to provide model capabilities for your AI engine.',
|
|
||||||
space: {
|
|
||||||
title: 'LangBot Service',
|
|
||||||
description:
|
|
||||||
'Zero-config ready with free trial model credits. No API key needed — just plug and play.',
|
|
||||||
action: 'Use LangBot Service',
|
|
||||||
},
|
|
||||||
custom: {
|
|
||||||
title: 'Custom Model',
|
|
||||||
description:
|
|
||||||
'Bring your own model API key. Supports OpenAI, Claude, Gemini, and more.',
|
|
||||||
action: 'Add My Own Model',
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
config: {
|
config: {
|
||||||
botInfo: 'Bot Information',
|
botInfo: 'Bot Information',
|
||||||
@@ -1972,6 +1916,9 @@ const enUS = {
|
|||||||
'Scan the QR code below with WeChat to authorize and automatically fill in the token',
|
'Scan the QR code below with WeChat to authorize and automatically fill in the token',
|
||||||
loginSuccess: 'Login successful! Token has been filled in',
|
loginSuccess: 'Login successful! Token has been filled in',
|
||||||
loginFailed: 'Login failed',
|
loginFailed: 'Login failed',
|
||||||
|
connecting: 'Connecting to WeChat service...',
|
||||||
|
waitingForScan: 'Waiting for scan',
|
||||||
|
retry: 'Retry',
|
||||||
},
|
},
|
||||||
dingtalk: {
|
dingtalk: {
|
||||||
createApp: 'One-Click Create DingTalk App',
|
createApp: 'One-Click Create DingTalk App',
|
||||||
|
|||||||
@@ -88,19 +88,19 @@ const esES = {
|
|||||||
'Recomendado: Usa API de modelos oficiales estables y servicios en la nube',
|
'Recomendado: Usa API de modelos oficiales estables y servicios en la nube',
|
||||||
loginLocal: 'Iniciar sesión con cuenta local',
|
loginLocal: 'Iniciar sesión con cuenta local',
|
||||||
loginWithPassword: 'Iniciar sesión con contraseña',
|
loginWithPassword: 'Iniciar sesión con contraseña',
|
||||||
spaceLoginTitle: 'Iniciar sesión con Space',
|
spaceLoginTitle: 'Iniciar sesión con una cuenta de LangBot',
|
||||||
spaceLoginDescription:
|
spaceLoginDescription:
|
||||||
'Escanea el código QR o visita el enlace para autorizar',
|
'Escanea el código QR o visita el enlace para autorizar',
|
||||||
spaceLoginUserCode: 'Tu código',
|
spaceLoginUserCode: 'Tu código',
|
||||||
spaceLoginExpires: 'El código expira en {{seconds}} segundos',
|
spaceLoginExpires: 'El código expira en {{seconds}} segundos',
|
||||||
spaceLoginWaiting: 'Esperando autorización...',
|
spaceLoginWaiting: 'Esperando autorización...',
|
||||||
spaceLoginSuccess: 'Autorización exitosa',
|
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:
|
spaceLoginExpired:
|
||||||
'El código de autorización ha expirado, por favor inténtalo de nuevo',
|
'El código de autorización ha expirado, por favor inténtalo de nuevo',
|
||||||
spaceLoginCancel: 'Cancelar',
|
spaceLoginCancel: 'Cancelar',
|
||||||
spaceLoginVisitLink: 'Visitar enlace',
|
spaceLoginVisitLink: 'Visitar enlace',
|
||||||
spaceLoginProcessing: 'Iniciando sesión con Space',
|
spaceLoginProcessing: 'Iniciando sesión con una cuenta de LangBot',
|
||||||
spaceLoginProcessingDescription:
|
spaceLoginProcessingDescription:
|
||||||
'Por favor espera mientras completamos tu inicio de sesión...',
|
'Por favor espera mientras completamos tu inicio de sesión...',
|
||||||
spaceLoginSuccessDescription: 'Redirigiendo a LangBot...',
|
spaceLoginSuccessDescription: 'Redirigiendo a LangBot...',
|
||||||
@@ -109,7 +109,7 @@ const esES = {
|
|||||||
backToLogin: 'Volver al inicio de sesión',
|
backToLogin: 'Volver al inicio de sesión',
|
||||||
backToHome: 'Volver al inicio',
|
backToHome: 'Volver al inicio',
|
||||||
spaceAccountCannotChangePassword:
|
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',
|
theme: 'Tema',
|
||||||
changePassword: 'Cambiar contraseña',
|
changePassword: 'Cambiar contraseña',
|
||||||
currentPassword: 'Contraseña actual',
|
currentPassword: 'Contraseña actual',
|
||||||
@@ -220,6 +220,19 @@ const esES = {
|
|||||||
selectModelAbilities: 'Seleccionar capacidades del modelo',
|
selectModelAbilities: 'Seleccionar capacidades del modelo',
|
||||||
visionAbility: 'Capacidad de visión',
|
visionAbility: 'Capacidad de visión',
|
||||||
functionCallAbility: 'Llamada a funciones',
|
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',
|
contextLength: 'Ventana de contexto',
|
||||||
contextLengthPlaceholder: 'Desconocido',
|
contextLengthPlaceholder: 'Desconocido',
|
||||||
contextLengthInvalid: 'La ventana de contexto debe ser un entero positivo',
|
contextLengthInvalid: 'La ventana de contexto debe ser un entero positivo',
|
||||||
@@ -248,9 +261,10 @@ const esES = {
|
|||||||
llmModels: 'Modelos LLM',
|
llmModels: 'Modelos LLM',
|
||||||
localProvider: 'Local',
|
localProvider: 'Local',
|
||||||
localProviderDescription: 'Modelos configurados y gestionados localmente',
|
localProviderDescription: 'Modelos configurados y gestionados localmente',
|
||||||
spaceProviderDescription: 'Modelos sincronizados desde tu cuenta de Space',
|
spaceProviderDescription:
|
||||||
|
'Modelos sincronizados desde tu cuenta de LangBot',
|
||||||
spaceDisabledForLocalAccount:
|
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',
|
syncModels: 'Sincronizar',
|
||||||
syncSuccess:
|
syncSuccess:
|
||||||
'Sincronización completa: {{created}} creados, {{updated}} actualizados',
|
'Sincronización completa: {{created}} creados, {{updated}} actualizados',
|
||||||
@@ -289,11 +303,12 @@ const esES = {
|
|||||||
langbotModelsDescription: 'Modelos en la nube impulsados por LangBot Space',
|
langbotModelsDescription: 'Modelos en la nube impulsados por LangBot Space',
|
||||||
credits: 'Créditos',
|
credits: 'Créditos',
|
||||||
loginWithSpace: 'Iniciar sesión con una cuenta de LangBot',
|
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',
|
noModels: 'No hay modelos configurados',
|
||||||
langbotModels: 'Modelos LangBot',
|
langbotModels: 'Modelos LangBot',
|
||||||
spaceTrialTooltip:
|
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',
|
unlockModels: 'Inicia sesión para usar',
|
||||||
editProvider: 'Editar proveedor',
|
editProvider: 'Editar proveedor',
|
||||||
addProvider: 'Añadir proveedor',
|
addProvider: 'Añadir proveedor',
|
||||||
@@ -328,9 +343,9 @@ const esES = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
ownerMustBindSpace:
|
ownerMustBindSpace:
|
||||||
'The Workspace owner must connect Space for LangBot Models.',
|
'The Workspace owner must connect a LangBot Account for LangBot Models.',
|
||||||
usesOwnerSpaceBilling:
|
usesOwnerSpaceBilling:
|
||||||
"Uses the Workspace owner's Space billing and credits.",
|
"Uses the Workspace owner's LangBot Account billing and credits.",
|
||||||
},
|
},
|
||||||
bots: {
|
bots: {
|
||||||
title: 'Bots',
|
title: 'Bots',
|
||||||
@@ -1238,13 +1253,13 @@ const esES = {
|
|||||||
adminAccountNote:
|
adminAccountNote:
|
||||||
'La cuenta que uses aquí se establecerá como cuenta de administrador',
|
'La cuenta que uses aquí se establecerá como cuenta de administrador',
|
||||||
register: 'Registrarse',
|
register: 'Registrarse',
|
||||||
initWithSpace: 'Inicializar con Space',
|
initWithSpace: 'Inicializar con una cuenta de LangBot',
|
||||||
spaceRecommended:
|
spaceRecommended:
|
||||||
'Recomendado: Usa API de modelos oficiales estables y servicios en la nube',
|
'Recomendado: Usa API de modelos oficiales estables y servicios en la nube',
|
||||||
spaceInfoTip1:
|
spaceInfoTip1:
|
||||||
'Space proporciona servicios de autenticación unificada de cuentas sin subir ninguna de tu información sensible.',
|
'Space proporciona servicios de autenticación unificada de cuentas sin subir ninguna de tu información sensible.',
|
||||||
spaceInfoTip2:
|
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:
|
spaceInfoTip3:
|
||||||
'Tu método de inicio de sesión no afecta otras funciones. Puedes configurar y usar modelos de otras fuentes en cualquier momento.',
|
'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',
|
registerLocal: 'Registrar cuenta local',
|
||||||
@@ -1302,35 +1317,35 @@ const esES = {
|
|||||||
passwordNotSet: 'No establecida',
|
passwordNotSet: 'No establecida',
|
||||||
passwordSetDescription:
|
passwordSetDescription:
|
||||||
'La contraseña está establecida, puedes iniciar sesión con correo y contraseña',
|
'La contraseña está establecida, puedes iniciar sesión con correo y contraseña',
|
||||||
spaceStatus: 'Cuenta de Space',
|
spaceStatus: 'Cuenta de LangBot',
|
||||||
spaceBound: 'Vinculada',
|
spaceBound: 'Vinculada',
|
||||||
spaceNotBound: 'No vinculada',
|
spaceNotBound: 'No vinculada',
|
||||||
spaceBoundDescription:
|
spaceBoundDescription:
|
||||||
'Cuenta de Space vinculada, API de modelos oficiales y servicios en la nube disponibles',
|
'Cuenta de LangBot vinculada, API de modelos oficiales y servicios en la nube disponibles',
|
||||||
bindSpace: 'Vincular cuenta de Space',
|
bindSpace: 'Vincular cuenta de LangBot',
|
||||||
bindSpaceDescription:
|
bindSpaceDescription:
|
||||||
'Vincular para usar API de modelos oficiales y servicios en la nube',
|
'Vincular para usar API de modelos oficiales y servicios en la nube',
|
||||||
bindSpaceButton: 'Vincular',
|
bindSpaceButton: 'Vincular',
|
||||||
bindSpaceConfirmTitle: 'Confirmar vinculación',
|
bindSpaceConfirmTitle: 'Confirmar vinculación',
|
||||||
bindSpaceConfirmDescription:
|
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:
|
bindSpaceWarning:
|
||||||
'Después de vincular, tu correo de inicio de sesión se cambiará de {{localEmail}} al correo de 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 Space vinculada correctamente',
|
bindSpaceSuccess: 'Cuenta de LangBot vinculada correctamente',
|
||||||
bindSpaceFailed: 'Error al vincular la cuenta de Space',
|
bindSpaceFailed: 'Error al vincular la cuenta de LangBot',
|
||||||
bindSpaceInvalidState:
|
bindSpaceInvalidState:
|
||||||
'Solicitud de vinculación no válida. Por favor, inténtalo de nuevo desde la configuración de la cuenta.',
|
'Solicitud de vinculación no válida. Por favor, inténtalo de nuevo desde la configuración de la cuenta.',
|
||||||
setPasswordHint:
|
setPasswordHint:
|
||||||
'Establece una contraseña para iniciar sesión con correo y contraseña',
|
'Establece una contraseña para iniciar sesión con correo y contraseña',
|
||||||
spaceEmailMismatch:
|
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_registeredTitle: 'Account not registered',
|
||||||
space_account_not_registered:
|
space_account_not_registered:
|
||||||
'No local account is registered for this Space email. Ask the Workspace owner for an invitation.',
|
'No local account is registered for this LangBot Account email. Ask the Workspace owner for an invitation.',
|
||||||
space_account_binding_requiredTitle: 'Space connection required',
|
space_account_binding_requiredTitle: 'LangBot Account connection required',
|
||||||
space_account_binding_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: {
|
monitoring: {
|
||||||
title: 'Panel de control',
|
title: 'Panel de control',
|
||||||
@@ -1659,7 +1674,6 @@ const esES = {
|
|||||||
botCreateSuccess: '¡Bot creado correctamente!',
|
botCreateSuccess: '¡Bot creado correctamente!',
|
||||||
botSaveSuccess: '¡Configuración del Bot guardada y activada!',
|
botSaveSuccess: '¡Configuración del Bot guardada y activada!',
|
||||||
createError: 'Error al crear los recursos',
|
createError: 'Error al crear los recursos',
|
||||||
spaceAuthError: 'Error al iniciar la autorización de Space',
|
|
||||||
skipSaveError:
|
skipSaveError:
|
||||||
'Error al guardar el estado de omisión. Por favor, inténtalo de nuevo.',
|
'Error al guardar el estado de omisión. Por favor, inténtalo de nuevo.',
|
||||||
completeSaveError:
|
completeSaveError:
|
||||||
@@ -1691,65 +1705,6 @@ const esES = {
|
|||||||
title: 'Selecciona un motor de IA',
|
title: 'Selecciona un motor de IA',
|
||||||
description:
|
description:
|
||||||
'Elige el motor de IA que impulsará la inteligencia de tu Bot.',
|
'Elige el motor de IA que impulsará la inteligencia de tu Bot.',
|
||||||
orchestrated: {
|
|
||||||
title: 'Usar aplicaciones Agent orquestadas',
|
|
||||||
description:
|
|
||||||
'Usar aplicaciones Agent predefinidas de Dify, n8n, Coze y más.',
|
|
||||||
action: 'Seleccionar aplicación Agent',
|
|
||||||
selectTitle: 'Seleccionar aplicación Agent',
|
|
||||||
selectDescription:
|
|
||||||
'Elige la plataforma de aplicación Agent que deseas usar.',
|
|
||||||
},
|
|
||||||
llm: {
|
|
||||||
title: 'Usar modelo directamente',
|
|
||||||
description:
|
|
||||||
'Configurar un proveedor de modelos y usar el modelo para impulsar tu Bot.',
|
|
||||||
action: 'Configurar modelo',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
spaceBanner: {
|
|
||||||
message:
|
|
||||||
'¡Conéctate a LangBot Space para obtener créditos de prueba gratuitos y configuración instantánea sin esfuerzo!',
|
|
||||||
action: 'Autorizar con Space',
|
|
||||||
},
|
|
||||||
provider: {
|
|
||||||
title: 'Agregar proveedor de modelos',
|
|
||||||
description:
|
|
||||||
'Agrega tu propio proveedor de modelos. Configura la API key para comenzar.',
|
|
||||||
scanTitle: 'Escanear modelos disponibles',
|
|
||||||
scanDescription: 'Escaneando modelos LLM de tu proveedor.',
|
|
||||||
scanning: 'Escaneando modelos...',
|
|
||||||
noModelsFound:
|
|
||||||
'No se encontraron modelos. Verifica la configuración del proveedor.',
|
|
||||||
addSelected: 'Agregar {{count}} modelo(s) seleccionado(s)',
|
|
||||||
modelsAdded: '{{count}} modelo(s) agregado(s)',
|
|
||||||
modelsAddError: 'Error al agregar modelos',
|
|
||||||
skipModelAdd: 'Omitir, agregar después',
|
|
||||||
searchModels: 'Buscar modelos...',
|
|
||||||
noMatch: 'No hay modelos coincidentes',
|
|
||||||
orDivider: 'o',
|
|
||||||
manualModelPlaceholder: 'Ingresa el nombre del modelo para agregar manualmente',
|
|
||||||
addManual: 'Agregar',
|
|
||||||
saveAndNext: 'Guardar y siguiente',
|
|
||||||
alreadyAdded: 'Agregado',
|
|
||||||
modelAlreadyExists: 'El modelo "{{name}}" ya existe',
|
|
||||||
},
|
|
||||||
modelSource: {
|
|
||||||
title: 'Elegir fuente del modelo',
|
|
||||||
description:
|
|
||||||
'Selecciona cómo proporcionar capacidades de modelo para tu motor de IA.',
|
|
||||||
space: {
|
|
||||||
title: 'Servicio LangBot',
|
|
||||||
description:
|
|
||||||
'Listo para usar sin configuración, con créditos de prueba gratuitos. No se necesita API key.',
|
|
||||||
action: 'Usar servicio LangBot',
|
|
||||||
},
|
|
||||||
custom: {
|
|
||||||
title: 'Modelo personalizado',
|
|
||||||
description:
|
|
||||||
'Usa tu propia API key. Compatible con OpenAI, Claude, Gemini y más.',
|
|
||||||
action: 'Agregar mi propio modelo',
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
config: {
|
config: {
|
||||||
botInfo: 'Información del Bot',
|
botInfo: 'Información del Bot',
|
||||||
@@ -1801,6 +1756,9 @@ const esES = {
|
|||||||
loginSuccess:
|
loginSuccess:
|
||||||
'¡Inicio de sesión correcto! El token se ha rellenado automáticamente',
|
'¡Inicio de sesión correcto! El token se ha rellenado automáticamente',
|
||||||
loginFailed: 'Error al iniciar sesión',
|
loginFailed: 'Error al iniciar sesión',
|
||||||
|
connecting: 'Conectando con el servicio de WeChat...',
|
||||||
|
waitingForScan: 'Esperando escaneo',
|
||||||
|
retry: 'Reintentar',
|
||||||
},
|
},
|
||||||
dingtalk: {
|
dingtalk: {
|
||||||
createApp: 'Crear aplicación de DingTalk con un clic',
|
createApp: 'Crear aplicación de DingTalk con un clic',
|
||||||
|
|||||||
@@ -86,19 +86,19 @@ const jaJP = {
|
|||||||
'おすすめ:公式の安定したモデル API とクラウドサービスを利用',
|
'おすすめ:公式の安定したモデル API とクラウドサービスを利用',
|
||||||
loginLocal: 'ローカルアカウントでログイン',
|
loginLocal: 'ローカルアカウントでログイン',
|
||||||
loginWithPassword: 'パスワードでログイン',
|
loginWithPassword: 'パスワードでログイン',
|
||||||
spaceLoginTitle: 'Space でログイン',
|
spaceLoginTitle: 'LangBot アカウントでログイン',
|
||||||
spaceLoginDescription:
|
spaceLoginDescription:
|
||||||
'QRコードをスキャンするか、下のリンクにアクセスして認証してください',
|
'QRコードをスキャンするか、下のリンクにアクセスして認証してください',
|
||||||
spaceLoginUserCode: '認証コード',
|
spaceLoginUserCode: '認証コード',
|
||||||
spaceLoginExpires: 'コードは {{seconds}} 秒後に期限切れになります',
|
spaceLoginExpires: 'コードは {{seconds}} 秒後に期限切れになります',
|
||||||
spaceLoginWaiting: '認証を待っています...',
|
spaceLoginWaiting: '認証を待っています...',
|
||||||
spaceLoginSuccess: '認証に成功しました',
|
spaceLoginSuccess: '認証に成功しました',
|
||||||
spaceLoginFailed: 'Space ログインに失敗しました',
|
spaceLoginFailed: 'LangBot アカウントログインに失敗しました',
|
||||||
spaceLoginExpired:
|
spaceLoginExpired:
|
||||||
'認証コードの有効期限が切れました。もう一度お試しください',
|
'認証コードの有効期限が切れました。もう一度お試しください',
|
||||||
spaceLoginCancel: 'キャンセル',
|
spaceLoginCancel: 'キャンセル',
|
||||||
spaceLoginVisitLink: 'リンクにアクセス',
|
spaceLoginVisitLink: 'リンクにアクセス',
|
||||||
spaceLoginProcessing: 'Space でログイン中',
|
spaceLoginProcessing: 'LangBot アカウントでログイン中',
|
||||||
spaceLoginProcessingDescription:
|
spaceLoginProcessingDescription:
|
||||||
'ログインを完了しています。しばらくお待ちください...',
|
'ログインを完了しています。しばらくお待ちください...',
|
||||||
spaceLoginSuccessDescription: 'LangBot にリダイレクト中...',
|
spaceLoginSuccessDescription: 'LangBot にリダイレクト中...',
|
||||||
@@ -107,7 +107,7 @@ const jaJP = {
|
|||||||
backToLogin: 'ログインに戻る',
|
backToLogin: 'ログインに戻る',
|
||||||
backToHome: 'ホームに戻る',
|
backToHome: 'ホームに戻る',
|
||||||
spaceAccountCannotChangePassword:
|
spaceAccountCannotChangePassword:
|
||||||
'Space アカウントはここでパスワードを変更できません',
|
'LangBot アカウントはここでパスワードを変更できません',
|
||||||
theme: 'テーマ',
|
theme: 'テーマ',
|
||||||
changePassword: 'パスワードを変更',
|
changePassword: 'パスワードを変更',
|
||||||
currentPassword: '現在のパスワード',
|
currentPassword: '現在のパスワード',
|
||||||
@@ -257,8 +257,9 @@ const jaJP = {
|
|||||||
llmModels: 'LLM モデル',
|
llmModels: 'LLM モデル',
|
||||||
localProvider: 'ローカル',
|
localProvider: 'ローカル',
|
||||||
localProviderDescription: 'ローカルで設定・管理されているモデル',
|
localProviderDescription: 'ローカルで設定・管理されているモデル',
|
||||||
spaceProviderDescription: 'Space アカウントから同期されたモデル',
|
spaceProviderDescription: 'LangBot アカウントから同期されたモデル',
|
||||||
spaceDisabledForLocalAccount: 'Space でログインしてクラウドモデルを使用',
|
spaceDisabledForLocalAccount:
|
||||||
|
'LangBot アカウントでログインしてクラウドモデルを使用',
|
||||||
syncModels: '同期',
|
syncModels: '同期',
|
||||||
syncSuccess: '同期完了:{{created}} 件作成、{{updated}} 件更新',
|
syncSuccess: '同期完了:{{created}} 件作成、{{updated}} 件更新',
|
||||||
syncError: '同期に失敗しました:',
|
syncError: '同期に失敗しました:',
|
||||||
@@ -296,15 +297,15 @@ const jaJP = {
|
|||||||
langbotModelsDescription: 'LangBot Space が提供するクラウドモデル',
|
langbotModelsDescription: 'LangBot Space が提供するクラウドモデル',
|
||||||
credits: 'クレジット',
|
credits: 'クレジット',
|
||||||
loginWithSpace: 'LangBot アカウントでログイン',
|
loginWithSpace: 'LangBot アカウントでログイン',
|
||||||
loginToUseModels: 'Space でログインしてクラウドモデルを使用',
|
loginToUseModels: 'LangBot アカウントでログインしてクラウドモデルを使用',
|
||||||
ownerMustBindSpace:
|
ownerMustBindSpace:
|
||||||
'LangBot モデルを使うにはワークスペース所有者が Space を連携する必要があります。',
|
'LangBot モデルを使うにはワークスペース所有者が LangBot アカウントを連携する必要があります。',
|
||||||
usesOwnerSpaceBilling:
|
usesOwnerSpaceBilling:
|
||||||
'ワークスペース所有者の Space 課金とクレジットを使用します。',
|
'ワークスペース所有者の LangBot アカウント課金とクレジットを使用します。',
|
||||||
noModels: 'モデルがありません',
|
noModels: 'モデルがありません',
|
||||||
langbotModels: 'LangBot モデル',
|
langbotModels: 'LangBot モデル',
|
||||||
spaceTrialTooltip:
|
spaceTrialTooltip:
|
||||||
'無料トライアルクレジットが利用可能!Space でログインして、設定不要でクラウドモデルを使用できます。',
|
'無料トライアルクレジットが利用可能!LangBot アカウントでログインして、設定不要でクラウドモデルを使用できます。',
|
||||||
unlockModels: 'ログインして使用',
|
unlockModels: 'ログインして使用',
|
||||||
editProvider: 'プロバイダーを編集',
|
editProvider: 'プロバイダーを編集',
|
||||||
addProvider: 'プロバイダーを追加',
|
addProvider: 'プロバイダーを追加',
|
||||||
@@ -1223,13 +1224,13 @@ const jaJP = {
|
|||||||
adminAccountNote:
|
adminAccountNote:
|
||||||
'ここで初期化されたアカウントは管理者アカウントとして使用されます',
|
'ここで初期化されたアカウントは管理者アカウントとして使用されます',
|
||||||
register: '登録',
|
register: '登録',
|
||||||
initWithSpace: 'Space で初期化',
|
initWithSpace: 'LangBot アカウントで初期化',
|
||||||
spaceRecommended:
|
spaceRecommended:
|
||||||
'おすすめ:公式の安定したモデル API とクラウドサービスを利用',
|
'おすすめ:公式の安定したモデル API とクラウドサービスを利用',
|
||||||
spaceInfoTip1:
|
spaceInfoTip1:
|
||||||
'Space は統一されたアカウント認証サービスを提供し、機密情報をアップロードすることはありません。',
|
'Space は統一されたアカウント認証サービスを提供し、機密情報をアップロードすることはありません。',
|
||||||
spaceInfoTip2:
|
spaceInfoTip2:
|
||||||
'Space アカウントでログインすると、LangBot Models などのクラウドサービスを利用でき、無料のモデル呼び出しクレジットで迅速に開始できます。',
|
'LangBot アカウントでログインすると、LangBot Models などのクラウドサービスを利用でき、無料のモデル呼び出しクレジットで迅速に開始できます。',
|
||||||
spaceInfoTip3:
|
spaceInfoTip3:
|
||||||
'ログイン方法は他の機能に影響しません。いつでも他のソースからモデルを設定して使用できます。',
|
'ログイン方法は他の機能に影響しません。いつでも他のソースからモデルを設定して使用できます。',
|
||||||
registerLocal: 'ローカルアカウントを登録',
|
registerLocal: 'ローカルアカウントを登録',
|
||||||
@@ -1286,33 +1287,33 @@ const jaJP = {
|
|||||||
passwordNotSet: '未設定',
|
passwordNotSet: '未設定',
|
||||||
passwordSetDescription:
|
passwordSetDescription:
|
||||||
'パスワードが設定されています。メールとパスワードでログインできます',
|
'パスワードが設定されています。メールとパスワードでログインできます',
|
||||||
spaceStatus: 'Space アカウント',
|
spaceStatus: 'LangBot アカウント',
|
||||||
spaceBound: '連携済み',
|
spaceBound: '連携済み',
|
||||||
spaceNotBound: '未連携',
|
spaceNotBound: '未連携',
|
||||||
spaceBoundDescription:
|
spaceBoundDescription:
|
||||||
'Space アカウントと連携済み、公式モデル API とクラウドサービスが利用可能',
|
'LangBot アカウントと連携済み、公式モデル API とクラウドサービスが利用可能',
|
||||||
bindSpace: 'Space アカウントを連携',
|
bindSpace: 'LangBot アカウントを連携',
|
||||||
bindSpaceDescription: '連携して公式モデル API とクラウドサービスを利用',
|
bindSpaceDescription: '連携して公式モデル API とクラウドサービスを利用',
|
||||||
bindSpaceButton: '連携',
|
bindSpaceButton: '連携',
|
||||||
bindSpaceConfirmTitle: '連携を確認',
|
bindSpaceConfirmTitle: '連携を確認',
|
||||||
bindSpaceConfirmDescription:
|
bindSpaceConfirmDescription:
|
||||||
'ローカルインスタンスを Space アカウントに連携しようとしています',
|
'ローカルインスタンスを LangBot アカウントに連携しようとしています',
|
||||||
bindSpaceWarning:
|
bindSpaceWarning:
|
||||||
'連携後、ログインメールアドレスは {{localEmail}} から Space アカウントのメールアドレスに変更されます。',
|
'連携後、ログインメールアドレスは {{localEmail}} から LangBot アカウントのメールアドレスに変更されます。',
|
||||||
bindSpaceSuccess: 'Space アカウントの連携に成功しました',
|
bindSpaceSuccess: 'LangBot アカウントの連携に成功しました',
|
||||||
bindSpaceFailed: 'Space アカウントの連携に失敗しました',
|
bindSpaceFailed: 'LangBot アカウントの連携に失敗しました',
|
||||||
bindSpaceInvalidState:
|
bindSpaceInvalidState:
|
||||||
'無効な連携リクエストです。アカウント設定から再度お試しください。',
|
'無効な連携リクエストです。アカウント設定から再度お試しください。',
|
||||||
setPasswordHint:
|
setPasswordHint:
|
||||||
'パスワードを設定するとメールとパスワードでログインできます',
|
'パスワードを設定するとメールとパスワードでログインできます',
|
||||||
spaceEmailMismatch:
|
spaceEmailMismatch:
|
||||||
'Spaceログインのメールアドレスがローカルアカウントのメールアドレスと一致しません',
|
'LangBot アカウントのメールアドレスがローカルアカウントのメールアドレスと一致しません',
|
||||||
space_account_not_registeredTitle: 'アカウントが登録されていません',
|
space_account_not_registeredTitle: 'アカウントが登録されていません',
|
||||||
space_account_not_registered:
|
space_account_not_registered:
|
||||||
'この Space メールアドレスのローカルアカウントはありません。ワークスペース所有者に招待を依頼してください。',
|
'この LangBot アカウントのメールアドレスのローカルアカウントはありません。ワークスペース所有者に招待を依頼してください。',
|
||||||
space_account_binding_requiredTitle: 'Space の連携が必要です',
|
space_account_binding_requiredTitle: 'LangBot アカウントの連携が必要です',
|
||||||
space_account_binding_required:
|
space_account_binding_required:
|
||||||
'Space ログインを使用する前に、アカウント設定でこのローカルアカウントを Space に連携してください。',
|
'LangBot アカウントログインを使用する前に、アカウント設定でこのローカルアカウントを LangBot アカウントに連携してください。',
|
||||||
},
|
},
|
||||||
workspace: {
|
workspace: {
|
||||||
title: 'ワークスペース',
|
title: 'ワークスペース',
|
||||||
@@ -1722,7 +1723,6 @@ const jaJP = {
|
|||||||
botCreateSuccess: 'ボットが正常に作成されました!',
|
botCreateSuccess: 'ボットが正常に作成されました!',
|
||||||
botSaveSuccess: 'ボット設定が保存され、有効になりました!',
|
botSaveSuccess: 'ボット設定が保存され、有効になりました!',
|
||||||
createError: 'リソースの作成に失敗しました',
|
createError: 'リソースの作成に失敗しました',
|
||||||
spaceAuthError: 'Space 認証の開始に失敗しました',
|
|
||||||
skipSaveError: 'スキップ状態の保存に失敗しました。もう一度お試しください。',
|
skipSaveError: 'スキップ状態の保存に失敗しました。もう一度お試しください。',
|
||||||
completeSaveError: '完了状態の保存に失敗しました。もう一度お試しください。',
|
completeSaveError: '完了状態の保存に失敗しました。もう一度お試しください。',
|
||||||
step: {
|
step: {
|
||||||
@@ -1752,64 +1752,6 @@ const jaJP = {
|
|||||||
title: 'AIエンジンを選択',
|
title: 'AIエンジンを選択',
|
||||||
description:
|
description:
|
||||||
'ボットのインテリジェンスを駆動するAIエンジンを選択してください。',
|
'ボットのインテリジェンスを駆動するAIエンジンを選択してください。',
|
||||||
orchestrated: {
|
|
||||||
title: 'オーケストレーション済みAgentアプリを使用',
|
|
||||||
description:
|
|
||||||
'Dify、n8n、Cozeなどのプラットフォームで構築済みのAgentアプリを使用。',
|
|
||||||
action: 'Agentアプリを選択',
|
|
||||||
selectTitle: 'Agentアプリを選択',
|
|
||||||
selectDescription:
|
|
||||||
'使用するAgentアプリプラットフォームを選択してください。',
|
|
||||||
},
|
|
||||||
llm: {
|
|
||||||
title: '大規模モデルを直接使用',
|
|
||||||
description:
|
|
||||||
'モデルプロバイダーを設定し、大規模モデルでボットを直接駆動。',
|
|
||||||
action: '大規模モデルを設定',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
spaceBanner: {
|
|
||||||
message:
|
|
||||||
'LangBot Spaceに接続して、無料トライアルモデルクレジットとゼロ設定の即時セットアップを入手!',
|
|
||||||
action: 'Spaceで認証',
|
|
||||||
},
|
|
||||||
provider: {
|
|
||||||
title: 'モデルプロバイダーを追加',
|
|
||||||
description:
|
|
||||||
'独自のモデルプロバイダーを追加します。APIキーを設定すると使用可能になります。',
|
|
||||||
scanTitle: '利用可能なモデルをスキャン',
|
|
||||||
scanDescription: 'プロバイダーから利用可能なLLMモデルをスキャン中です。',
|
|
||||||
scanning: 'モデルをスキャン中...',
|
|
||||||
noModelsFound:
|
|
||||||
'モデルが見つかりません。プロバイダー設定を確認してください。',
|
|
||||||
addSelected: '選択した{{count}}個のモデルを追加',
|
|
||||||
modelsAdded: '{{count}}個のモデルを追加しました',
|
|
||||||
modelsAddError: 'モデルの追加に失敗しました',
|
|
||||||
skipModelAdd: 'スキップ(後で追加)',
|
|
||||||
searchModels: 'モデルを検索...',
|
|
||||||
noMatch: '一致するモデルがありません',
|
|
||||||
orDivider: 'または',
|
|
||||||
manualModelPlaceholder: 'モデル名を入力して手動追加',
|
|
||||||
addManual: '追加',
|
|
||||||
saveAndNext: '保存して次へ',
|
|
||||||
alreadyAdded: '追加済み',
|
|
||||||
modelAlreadyExists: 'モデル「{{name}}」は既に存在します',
|
|
||||||
},
|
|
||||||
modelSource: {
|
|
||||||
title: 'モデルソースを選択',
|
|
||||||
description: 'AIエンジンにモデル機能を提供する方法を選択してください。',
|
|
||||||
space: {
|
|
||||||
title: 'LangBot サービス',
|
|
||||||
description:
|
|
||||||
'設定不要で利用可能。無料トライアルモデルクレジット付き。APIキー不要ですぐに使えます。',
|
|
||||||
action: 'LangBot サービスを使用',
|
|
||||||
},
|
|
||||||
custom: {
|
|
||||||
title: 'カスタムモデル',
|
|
||||||
description:
|
|
||||||
'お手持ちのモデルAPIキーを使用。OpenAI、Claude、Geminiなど主要モデルに対応。',
|
|
||||||
action: '独自のモデルを追加',
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
config: {
|
config: {
|
||||||
botInfo: 'ボット情報',
|
botInfo: 'ボット情報',
|
||||||
@@ -1890,6 +1832,9 @@ const jaJP = {
|
|||||||
scanQRCode: '以下のQRコードをWeChatでスキャンし、トークンを自動入力',
|
scanQRCode: '以下のQRコードをWeChatでスキャンし、トークンを自動入力',
|
||||||
loginSuccess: 'ログイン成功!トークンが自動入力されました',
|
loginSuccess: 'ログイン成功!トークンが自動入力されました',
|
||||||
loginFailed: 'ログイン失敗',
|
loginFailed: 'ログイン失敗',
|
||||||
|
connecting: 'WeChatサービスに接続中...',
|
||||||
|
waitingForScan: 'スキャン待ち',
|
||||||
|
retry: '再試行',
|
||||||
},
|
},
|
||||||
dingtalk: {
|
dingtalk: {
|
||||||
createApp: 'ワンクリックでDingTalkアプリ作成',
|
createApp: 'ワンクリックでDingTalkアプリ作成',
|
||||||
|
|||||||
@@ -85,18 +85,18 @@ const ruRU = {
|
|||||||
'Рекомендуется: Используйте официальные стабильные API моделей и облачные сервисы',
|
'Рекомендуется: Используйте официальные стабильные API моделей и облачные сервисы',
|
||||||
loginLocal: 'Войти с локальной учётной записью',
|
loginLocal: 'Войти с локальной учётной записью',
|
||||||
loginWithPassword: 'Войти с паролем',
|
loginWithPassword: 'Войти с паролем',
|
||||||
spaceLoginTitle: 'Войти через Space',
|
spaceLoginTitle: 'Войти с аккаунтом LangBot',
|
||||||
spaceLoginDescription:
|
spaceLoginDescription:
|
||||||
'Отсканируйте QR-код или перейдите по ссылке ниже для авторизации',
|
'Отсканируйте QR-код или перейдите по ссылке ниже для авторизации',
|
||||||
spaceLoginUserCode: 'Ваш код',
|
spaceLoginUserCode: 'Ваш код',
|
||||||
spaceLoginExpires: 'Код истекает через {{seconds}} секунд',
|
spaceLoginExpires: 'Код истекает через {{seconds}} секунд',
|
||||||
spaceLoginWaiting: 'Ожидание авторизации...',
|
spaceLoginWaiting: 'Ожидание авторизации...',
|
||||||
spaceLoginSuccess: 'Авторизация успешна',
|
spaceLoginSuccess: 'Авторизация успешна',
|
||||||
spaceLoginFailed: 'Ошибка входа через Space',
|
spaceLoginFailed: 'Ошибка входа с аккаунтом LangBot',
|
||||||
spaceLoginExpired: 'Код авторизации истёк, попробуйте снова',
|
spaceLoginExpired: 'Код авторизации истёк, попробуйте снова',
|
||||||
spaceLoginCancel: 'Отмена',
|
spaceLoginCancel: 'Отмена',
|
||||||
spaceLoginVisitLink: 'Перейти по ссылке',
|
spaceLoginVisitLink: 'Перейти по ссылке',
|
||||||
spaceLoginProcessing: 'Вход через Space',
|
spaceLoginProcessing: 'Вход с аккаунтом LangBot',
|
||||||
spaceLoginProcessingDescription:
|
spaceLoginProcessingDescription:
|
||||||
'Пожалуйста, подождите, пока мы завершим вход...',
|
'Пожалуйста, подождите, пока мы завершим вход...',
|
||||||
spaceLoginSuccessDescription: 'Перенаправление в LangBot...',
|
spaceLoginSuccessDescription: 'Перенаправление в LangBot...',
|
||||||
@@ -105,7 +105,7 @@ const ruRU = {
|
|||||||
backToLogin: 'Вернуться к входу',
|
backToLogin: 'Вернуться к входу',
|
||||||
backToHome: 'На главную',
|
backToHome: 'На главную',
|
||||||
spaceAccountCannotChangePassword:
|
spaceAccountCannotChangePassword:
|
||||||
'Для аккаунтов Space невозможно изменить пароль здесь',
|
'Для аккаунтов LangBot невозможно изменить пароль здесь',
|
||||||
theme: 'Тема',
|
theme: 'Тема',
|
||||||
changePassword: 'Изменить пароль',
|
changePassword: 'Изменить пароль',
|
||||||
currentPassword: 'Текущий пароль',
|
currentPassword: 'Текущий пароль',
|
||||||
@@ -217,6 +217,19 @@ const ruRU = {
|
|||||||
selectModelAbilities: 'Выберите возможности модели',
|
selectModelAbilities: 'Выберите возможности модели',
|
||||||
visionAbility: 'Распознавание изображений',
|
visionAbility: 'Распознавание изображений',
|
||||||
functionCallAbility: 'Вызов функций',
|
functionCallAbility: 'Вызов функций',
|
||||||
|
reasoningAbility: 'Рассуждение',
|
||||||
|
reasoningLevel: 'Уровень рассуждений',
|
||||||
|
reasoningLevels: {
|
||||||
|
providerDefault: 'По умолчанию провайдера',
|
||||||
|
disabled: 'Выключено',
|
||||||
|
enabled: 'Включено',
|
||||||
|
minimal: 'Минимальный',
|
||||||
|
low: 'Низкий',
|
||||||
|
medium: 'Средний',
|
||||||
|
high: 'Высокий',
|
||||||
|
xhigh: 'Очень высокий',
|
||||||
|
max: 'Максимальный',
|
||||||
|
},
|
||||||
contextLength: 'Контекстное окно',
|
contextLength: 'Контекстное окно',
|
||||||
contextLengthPlaceholder: 'Неизвестно',
|
contextLengthPlaceholder: 'Неизвестно',
|
||||||
contextLengthInvalid:
|
contextLengthInvalid:
|
||||||
@@ -246,9 +259,9 @@ const ruRU = {
|
|||||||
localProvider: 'Локальный',
|
localProvider: 'Локальный',
|
||||||
localProviderDescription: 'Модели, настроенные и управляемые локально',
|
localProviderDescription: 'Модели, настроенные и управляемые локально',
|
||||||
spaceProviderDescription:
|
spaceProviderDescription:
|
||||||
'Модели, синхронизированные из вашего аккаунта Space',
|
'Модели, синхронизированные из вашего аккаунта LangBot',
|
||||||
spaceDisabledForLocalAccount:
|
spaceDisabledForLocalAccount:
|
||||||
'Войдите через Space, чтобы использовать облачные модели',
|
'Войдите с аккаунтом LangBot, чтобы использовать облачные модели',
|
||||||
syncModels: 'Синхронизировать',
|
syncModels: 'Синхронизировать',
|
||||||
syncSuccess:
|
syncSuccess:
|
||||||
'Синхронизация завершена: {{created}} создано, {{updated}} обновлено',
|
'Синхронизация завершена: {{created}} создано, {{updated}} обновлено',
|
||||||
@@ -287,11 +300,12 @@ const ruRU = {
|
|||||||
langbotModelsDescription: 'Облачные модели на базе LangBot Space',
|
langbotModelsDescription: 'Облачные модели на базе LangBot Space',
|
||||||
credits: 'Кредиты',
|
credits: 'Кредиты',
|
||||||
loginWithSpace: 'Войти с аккаунтом LangBot',
|
loginWithSpace: 'Войти с аккаунтом LangBot',
|
||||||
loginToUseModels: 'Войдите через Space, чтобы использовать облачные модели',
|
loginToUseModels:
|
||||||
|
'Войдите с аккаунтом LangBot, чтобы использовать облачные модели',
|
||||||
noModels: 'Модели не настроены',
|
noModels: 'Модели не настроены',
|
||||||
langbotModels: 'Модели LangBot',
|
langbotModels: 'Модели LangBot',
|
||||||
spaceTrialTooltip:
|
spaceTrialTooltip:
|
||||||
'Доступны бесплатные пробные кредиты! Войдите через Space, чтобы получить доступ к облачным моделям без настройки.',
|
'Доступны бесплатные пробные кредиты! Войдите с аккаунтом LangBot, чтобы получить доступ к облачным моделям без настройки.',
|
||||||
unlockModels: 'Войдите для использования',
|
unlockModels: 'Войдите для использования',
|
||||||
editProvider: 'Редактировать провайдера',
|
editProvider: 'Редактировать провайдера',
|
||||||
addProvider: 'Добавить провайдера',
|
addProvider: 'Добавить провайдера',
|
||||||
@@ -327,9 +341,9 @@ const ruRU = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
ownerMustBindSpace:
|
ownerMustBindSpace:
|
||||||
'The Workspace owner must connect Space for LangBot Models.',
|
'The Workspace owner must connect a LangBot Account for LangBot Models.',
|
||||||
usesOwnerSpaceBilling:
|
usesOwnerSpaceBilling:
|
||||||
"Uses the Workspace owner's Space billing and credits.",
|
"Uses the Workspace owner's LangBot Account billing and credits.",
|
||||||
},
|
},
|
||||||
bots: {
|
bots: {
|
||||||
title: 'Боты',
|
title: 'Боты',
|
||||||
@@ -1216,13 +1230,13 @@ const ruRU = {
|
|||||||
adminAccountNote:
|
adminAccountNote:
|
||||||
'Указанная учётная запись будет настроена как администратор',
|
'Указанная учётная запись будет настроена как администратор',
|
||||||
register: 'Регистрация',
|
register: 'Регистрация',
|
||||||
initWithSpace: 'Инициализация через Space',
|
initWithSpace: 'Инициализация с аккаунтом LangBot',
|
||||||
spaceRecommended:
|
spaceRecommended:
|
||||||
'Рекомендуется: Используйте официальные стабильные API моделей и облачные сервисы',
|
'Рекомендуется: Используйте официальные стабильные API моделей и облачные сервисы',
|
||||||
spaceInfoTip1:
|
spaceInfoTip1:
|
||||||
'Space предоставляет единую службу аутентификации без загрузки конфиденциальной информации.',
|
'Space предоставляет единую службу аутентификации без загрузки конфиденциальной информации.',
|
||||||
spaceInfoTip2:
|
spaceInfoTip2:
|
||||||
'Вход через Space даёт доступ к моделям LangBot и облачным сервисам, включая бесплатные кредиты для быстрого старта.',
|
'Вход с аккаунтом LangBot даёт доступ к моделям LangBot и облачным сервисам, включая бесплатные кредиты для быстрого старта.',
|
||||||
spaceInfoTip3:
|
spaceInfoTip3:
|
||||||
'Способ входа не влияет на другие функции. Вы можете настроить модели из других источников в любое время.',
|
'Способ входа не влияет на другие функции. Вы можете настроить модели из других источников в любое время.',
|
||||||
registerLocal: 'Зарегистрировать локальную учётную запись',
|
registerLocal: 'Зарегистрировать локальную учётную запись',
|
||||||
@@ -1278,34 +1292,34 @@ const ruRU = {
|
|||||||
passwordNotSet: 'Не установлен',
|
passwordNotSet: 'Не установлен',
|
||||||
passwordSetDescription:
|
passwordSetDescription:
|
||||||
'Пароль установлен, вы можете входить с email и паролем',
|
'Пароль установлен, вы можете входить с email и паролем',
|
||||||
spaceStatus: 'Аккаунт Space',
|
spaceStatus: 'Аккаунт LangBot',
|
||||||
spaceBound: 'Привязан',
|
spaceBound: 'Привязан',
|
||||||
spaceNotBound: 'Не привязан',
|
spaceNotBound: 'Не привязан',
|
||||||
spaceBoundDescription:
|
spaceBoundDescription:
|
||||||
'Аккаунт Space привязан, доступны официальные API моделей и облачные сервисы',
|
'Аккаунт LangBot привязан, доступны официальные API моделей и облачные сервисы',
|
||||||
bindSpace: 'Привязать аккаунт Space',
|
bindSpace: 'Привязать аккаунт LangBot',
|
||||||
bindSpaceDescription:
|
bindSpaceDescription:
|
||||||
'Привяжите для использования официальных API моделей и облачных сервисов',
|
'Привяжите для использования официальных API моделей и облачных сервисов',
|
||||||
bindSpaceButton: 'Привязать',
|
bindSpaceButton: 'Привязать',
|
||||||
bindSpaceConfirmTitle: 'Подтверждение привязки',
|
bindSpaceConfirmTitle: 'Подтверждение привязки',
|
||||||
bindSpaceConfirmDescription:
|
bindSpaceConfirmDescription:
|
||||||
'Вы собираетесь привязать локальный экземпляр к аккаунту Space',
|
'Вы собираетесь привязать локальный экземпляр к аккаунту LangBot',
|
||||||
bindSpaceWarning:
|
bindSpaceWarning:
|
||||||
'После привязки ваш email для входа будет изменён с {{localEmail}} на email аккаунта Space.',
|
'После привязки ваш email для входа будет изменён с {{localEmail}} на email аккаунта LangBot.',
|
||||||
bindSpaceSuccess: 'Аккаунт Space успешно привязан',
|
bindSpaceSuccess: 'Аккаунт LangBot успешно привязан',
|
||||||
bindSpaceFailed: 'Не удалось привязать аккаунт Space',
|
bindSpaceFailed: 'Не удалось привязать аккаунт LangBot',
|
||||||
bindSpaceInvalidState:
|
bindSpaceInvalidState:
|
||||||
'Недействительный запрос привязки. Повторите попытку из настроек аккаунта.',
|
'Недействительный запрос привязки. Повторите попытку из настроек аккаунта.',
|
||||||
setPasswordHint: 'Установите пароль для входа с email и паролем',
|
setPasswordHint: 'Установите пароль для входа с email и паролем',
|
||||||
spaceEmailMismatch:
|
spaceEmailMismatch:
|
||||||
'Email входа через Space не совпадает с email локальной учётной записи',
|
'Email входа с аккаунтом LangBot не совпадает с email локальной учётной записи',
|
||||||
|
|
||||||
space_account_not_registeredTitle: 'Account not registered',
|
space_account_not_registeredTitle: 'Account not registered',
|
||||||
space_account_not_registered:
|
space_account_not_registered:
|
||||||
'No local account is registered for this Space email. Ask the Workspace owner for an invitation.',
|
'No local account is registered for this LangBot Account email. Ask the Workspace owner for an invitation.',
|
||||||
space_account_binding_requiredTitle: 'Space connection required',
|
space_account_binding_requiredTitle: 'LangBot Account connection required',
|
||||||
space_account_binding_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: {
|
monitoring: {
|
||||||
title: 'Мониторинг',
|
title: 'Мониторинг',
|
||||||
@@ -1632,7 +1646,6 @@ const ruRU = {
|
|||||||
botCreateSuccess: 'Бот успешно создан!',
|
botCreateSuccess: 'Бот успешно создан!',
|
||||||
botSaveSuccess: 'Конфигурация бота сохранена и включена!',
|
botSaveSuccess: 'Конфигурация бота сохранена и включена!',
|
||||||
createError: 'Не удалось создать ресурсы',
|
createError: 'Не удалось создать ресурсы',
|
||||||
spaceAuthError: 'Не удалось инициировать авторизацию через Space',
|
|
||||||
skipSaveError: 'Не удалось сохранить статус пропуска. Повторите попытку.',
|
skipSaveError: 'Не удалось сохранить статус пропуска. Повторите попытку.',
|
||||||
completeSaveError:
|
completeSaveError:
|
||||||
'Не удалось сохранить статус завершения. Повторите попытку.',
|
'Не удалось сохранить статус завершения. Повторите попытку.',
|
||||||
@@ -1661,65 +1674,6 @@ const ruRU = {
|
|||||||
title: 'Выберите ИИ-движок',
|
title: 'Выберите ИИ-движок',
|
||||||
description:
|
description:
|
||||||
'Выберите ИИ-движок, который будет управлять интеллектом вашего бота.',
|
'Выберите ИИ-движок, который будет управлять интеллектом вашего бота.',
|
||||||
orchestrated: {
|
|
||||||
title: 'Использовать оркестрированные Agent-приложения',
|
|
||||||
description:
|
|
||||||
'Использовать готовые Agent-приложения из Dify, n8n, Coze и других.',
|
|
||||||
action: 'Выбрать Agent-приложение',
|
|
||||||
selectTitle: 'Выбрать Agent-приложение',
|
|
||||||
selectDescription:
|
|
||||||
'Выберите платформу Agent-приложения для использования.',
|
|
||||||
},
|
|
||||||
llm: {
|
|
||||||
title: 'Использовать LLM напрямую',
|
|
||||||
description:
|
|
||||||
'Настроить провайдера моделей и использовать LLM для управления ботом.',
|
|
||||||
action: 'Настроить LLM',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
spaceBanner: {
|
|
||||||
message:
|
|
||||||
'Подключитесь к LangBot Space для бесплатных пробных кредитов и мгновенной настройки!',
|
|
||||||
action: 'Авторизация через Space',
|
|
||||||
},
|
|
||||||
provider: {
|
|
||||||
title: 'Добавить провайдера моделей',
|
|
||||||
description:
|
|
||||||
'Добавьте своего провайдера моделей. Настройте API-ключ для начала работы.',
|
|
||||||
scanTitle: 'Сканирование доступных моделей',
|
|
||||||
scanDescription: 'Сканирование LLM-моделей у вашего провайдера.',
|
|
||||||
scanning: 'Сканирование моделей...',
|
|
||||||
noModelsFound:
|
|
||||||
'Модели не найдены. Проверьте настройки провайдера.',
|
|
||||||
addSelected: 'Добавить {{count}} выбранную(ых)',
|
|
||||||
modelsAdded: 'Добавлено {{count}} модель(ей)',
|
|
||||||
modelsAddError: 'Ошибка добавления моделей',
|
|
||||||
skipModelAdd: 'Пропустить, добавить позже',
|
|
||||||
searchModels: 'Поиск моделей...',
|
|
||||||
noMatch: 'Нет подходящих моделей',
|
|
||||||
orDivider: 'или',
|
|
||||||
manualModelPlaceholder: 'Введите имя модели для ручного добавления',
|
|
||||||
addManual: 'Добавить',
|
|
||||||
saveAndNext: 'Сохранить и далее',
|
|
||||||
alreadyAdded: 'Добавлено',
|
|
||||||
modelAlreadyExists: 'Модель "{{name}}" уже существует',
|
|
||||||
},
|
|
||||||
modelSource: {
|
|
||||||
title: 'Выберите источник модели',
|
|
||||||
description:
|
|
||||||
'Выберите способ предоставления возможностей модели для вашего AI-движка.',
|
|
||||||
space: {
|
|
||||||
title: 'Сервис LangBot',
|
|
||||||
description:
|
|
||||||
'Готов к использованию без настройки, с бесплатными пробными кредитами. API-ключ не требуется.',
|
|
||||||
action: 'Использовать сервис LangBot',
|
|
||||||
},
|
|
||||||
custom: {
|
|
||||||
title: 'Пользовательская модель',
|
|
||||||
description:
|
|
||||||
'Используйте свой собственный API-ключ. Поддержка OpenAI, Claude, Gemini и других.',
|
|
||||||
action: 'Добавить свою модель',
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
config: {
|
config: {
|
||||||
botInfo: 'Информация о боте',
|
botInfo: 'Информация о боте',
|
||||||
@@ -1771,6 +1725,9 @@ const ruRU = {
|
|||||||
'Отсканируйте QR-код ниже в WeChat, чтобы авторизоваться и автоматически заполнить токен',
|
'Отсканируйте QR-код ниже в WeChat, чтобы авторизоваться и автоматически заполнить токен',
|
||||||
loginSuccess: 'Вход выполнен успешно! Токен заполнен автоматически',
|
loginSuccess: 'Вход выполнен успешно! Токен заполнен автоматически',
|
||||||
loginFailed: 'Не удалось выполнить вход',
|
loginFailed: 'Не удалось выполнить вход',
|
||||||
|
connecting: 'Подключение к сервису WeChat...',
|
||||||
|
waitingForScan: 'Ожидание сканирования',
|
||||||
|
retry: 'Повторить',
|
||||||
},
|
},
|
||||||
dingtalk: {
|
dingtalk: {
|
||||||
createApp: 'Создать приложение DingTalk в один клик',
|
createApp: 'Создать приложение DingTalk в один клик',
|
||||||
|
|||||||
@@ -85,18 +85,18 @@ const thTH = {
|
|||||||
'แนะนำ: ใช้ API โมเดลที่เสถียรอย่างเป็นทางการและบริการคลาวด์',
|
'แนะนำ: ใช้ API โมเดลที่เสถียรอย่างเป็นทางการและบริการคลาวด์',
|
||||||
loginLocal: 'เข้าสู่ระบบด้วยบัญชีท้องถิ่น',
|
loginLocal: 'เข้าสู่ระบบด้วยบัญชีท้องถิ่น',
|
||||||
loginWithPassword: 'เข้าสู่ระบบด้วยรหัสผ่าน',
|
loginWithPassword: 'เข้าสู่ระบบด้วยรหัสผ่าน',
|
||||||
spaceLoginTitle: 'เข้าสู่ระบบด้วย Space',
|
spaceLoginTitle: 'เข้าสู่ระบบด้วยบัญชี LangBot',
|
||||||
spaceLoginDescription:
|
spaceLoginDescription:
|
||||||
'สแกน QR code หรือเข้าชมลิงก์ด้านล่างเพื่อยืนยันสิทธิ์',
|
'สแกน QR code หรือเข้าชมลิงก์ด้านล่างเพื่อยืนยันสิทธิ์',
|
||||||
spaceLoginUserCode: 'รหัสของคุณ',
|
spaceLoginUserCode: 'รหัสของคุณ',
|
||||||
spaceLoginExpires: 'รหัสจะหมดอายุใน {{seconds}} วินาที',
|
spaceLoginExpires: 'รหัสจะหมดอายุใน {{seconds}} วินาที',
|
||||||
spaceLoginWaiting: 'กำลังรอการยืนยันสิทธิ์...',
|
spaceLoginWaiting: 'กำลังรอการยืนยันสิทธิ์...',
|
||||||
spaceLoginSuccess: 'ยืนยันสิทธิ์สำเร็จ',
|
spaceLoginSuccess: 'ยืนยันสิทธิ์สำเร็จ',
|
||||||
spaceLoginFailed: 'เข้าสู่ระบบ Space ล้มเหลว',
|
spaceLoginFailed: 'เข้าสู่ระบบด้วยบัญชี LangBot ล้มเหลว',
|
||||||
spaceLoginExpired: 'รหัสยืนยันหมดอายุแล้ว กรุณาลองใหม่',
|
spaceLoginExpired: 'รหัสยืนยันหมดอายุแล้ว กรุณาลองใหม่',
|
||||||
spaceLoginCancel: 'ยกเลิก',
|
spaceLoginCancel: 'ยกเลิก',
|
||||||
spaceLoginVisitLink: 'เข้าชมลิงก์',
|
spaceLoginVisitLink: 'เข้าชมลิงก์',
|
||||||
spaceLoginProcessing: 'กำลังเข้าสู่ระบบด้วย Space',
|
spaceLoginProcessing: 'กำลังเข้าสู่ระบบด้วยบัญชี LangBot',
|
||||||
spaceLoginProcessingDescription: 'กรุณารอสักครู่ขณะดำเนินการเข้าสู่ระบบ...',
|
spaceLoginProcessingDescription: 'กรุณารอสักครู่ขณะดำเนินการเข้าสู่ระบบ...',
|
||||||
spaceLoginSuccessDescription: 'กำลังเปลี่ยนเส้นทางไปยัง LangBot...',
|
spaceLoginSuccessDescription: 'กำลังเปลี่ยนเส้นทางไปยัง LangBot...',
|
||||||
spaceLoginError: 'เข้าสู่ระบบล้มเหลว',
|
spaceLoginError: 'เข้าสู่ระบบล้มเหลว',
|
||||||
@@ -104,7 +104,7 @@ const thTH = {
|
|||||||
backToLogin: 'กลับไปหน้าเข้าสู่ระบบ',
|
backToLogin: 'กลับไปหน้าเข้าสู่ระบบ',
|
||||||
backToHome: 'กลับไปหน้าแรก',
|
backToHome: 'กลับไปหน้าแรก',
|
||||||
spaceAccountCannotChangePassword:
|
spaceAccountCannotChangePassword:
|
||||||
'บัญชี Space ไม่สามารถเปลี่ยนรหัสผ่านได้ที่นี่',
|
'บัญชี LangBot ไม่สามารถเปลี่ยนรหัสผ่านได้ที่นี่',
|
||||||
theme: 'ธีม',
|
theme: 'ธีม',
|
||||||
changePassword: 'เปลี่ยนรหัสผ่าน',
|
changePassword: 'เปลี่ยนรหัสผ่าน',
|
||||||
currentPassword: 'รหัสผ่านปัจจุบัน',
|
currentPassword: 'รหัสผ่านปัจจุบัน',
|
||||||
@@ -213,6 +213,19 @@ const thTH = {
|
|||||||
selectModelAbilities: 'เลือกความสามารถของโมเดล',
|
selectModelAbilities: 'เลือกความสามารถของโมเดล',
|
||||||
visionAbility: 'ความสามารถด้านภาพ',
|
visionAbility: 'ความสามารถด้านภาพ',
|
||||||
functionCallAbility: 'การเรียกฟังก์ชัน',
|
functionCallAbility: 'การเรียกฟังก์ชัน',
|
||||||
|
reasoningAbility: 'ความสามารถในการให้เหตุผล',
|
||||||
|
reasoningLevel: 'ระดับการให้เหตุผล',
|
||||||
|
reasoningLevels: {
|
||||||
|
providerDefault: 'ค่าเริ่มต้นของผู้ให้บริการ',
|
||||||
|
disabled: 'ปิด',
|
||||||
|
enabled: 'เปิด',
|
||||||
|
minimal: 'ต่ำสุด',
|
||||||
|
low: 'ต่ำ',
|
||||||
|
medium: 'ปานกลาง',
|
||||||
|
high: 'สูง',
|
||||||
|
xhigh: 'สูงมาก',
|
||||||
|
max: 'สูงสุด',
|
||||||
|
},
|
||||||
contextLength: 'หน้าต่างบริบท',
|
contextLength: 'หน้าต่างบริบท',
|
||||||
contextLengthPlaceholder: 'ไม่ทราบ',
|
contextLengthPlaceholder: 'ไม่ทราบ',
|
||||||
contextLengthInvalid: 'หน้าต่างบริบทต้องเป็นจำนวนเต็มบวก',
|
contextLengthInvalid: 'หน้าต่างบริบทต้องเป็นจำนวนเต็มบวก',
|
||||||
@@ -239,8 +252,9 @@ const thTH = {
|
|||||||
llmModels: 'โมเดล LLM',
|
llmModels: 'โมเดล LLM',
|
||||||
localProvider: 'ท้องถิ่น',
|
localProvider: 'ท้องถิ่น',
|
||||||
localProviderDescription: 'โมเดลที่กำหนดค่าและจัดการในเครื่อง',
|
localProviderDescription: 'โมเดลที่กำหนดค่าและจัดการในเครื่อง',
|
||||||
spaceProviderDescription: 'โมเดลที่ซิงค์จากบัญชี Space ของคุณ',
|
spaceProviderDescription: 'โมเดลที่ซิงค์จากบัญชี LangBot ของคุณ',
|
||||||
spaceDisabledForLocalAccount: 'เข้าสู่ระบบด้วย Space เพื่อใช้โมเดลคลาวด์',
|
spaceDisabledForLocalAccount:
|
||||||
|
'เข้าสู่ระบบด้วยบัญชี LangBot เพื่อใช้โมเดลคลาวด์',
|
||||||
syncModels: 'ซิงค์',
|
syncModels: 'ซิงค์',
|
||||||
syncSuccess:
|
syncSuccess:
|
||||||
'ซิงค์เสร็จสมบูรณ์: สร้าง {{created}} รายการ, อัปเดต {{updated}} รายการ',
|
'ซิงค์เสร็จสมบูรณ์: สร้าง {{created}} รายการ, อัปเดต {{updated}} รายการ',
|
||||||
@@ -276,11 +290,11 @@ const thTH = {
|
|||||||
langbotModelsDescription: 'โมเดลคลาวด์ขับเคลื่อนโดย LangBot Space',
|
langbotModelsDescription: 'โมเดลคลาวด์ขับเคลื่อนโดย LangBot Space',
|
||||||
credits: 'เครดิต',
|
credits: 'เครดิต',
|
||||||
loginWithSpace: 'เข้าสู่ระบบด้วยบัญชี LangBot',
|
loginWithSpace: 'เข้าสู่ระบบด้วยบัญชี LangBot',
|
||||||
loginToUseModels: 'เข้าสู่ระบบด้วย Space เพื่อใช้โมเดลคลาวด์',
|
loginToUseModels: 'เข้าสู่ระบบด้วยบัญชี LangBot เพื่อใช้โมเดลคลาวด์',
|
||||||
noModels: 'ยังไม่มีโมเดลที่กำหนดค่า',
|
noModels: 'ยังไม่มีโมเดลที่กำหนดค่า',
|
||||||
langbotModels: 'โมเดล LangBot',
|
langbotModels: 'โมเดล LangBot',
|
||||||
spaceTrialTooltip:
|
spaceTrialTooltip:
|
||||||
'มีเครดิตทดลองใช้งานฟรี! เข้าสู่ระบบด้วย Space เพื่อเข้าถึงโมเดลคลาวด์โดยไม่ต้องตั้งค่า',
|
'มีเครดิตทดลองใช้งานฟรี! เข้าสู่ระบบด้วยบัญชี LangBot เพื่อเข้าถึงโมเดลคลาวด์โดยไม่ต้องตั้งค่า',
|
||||||
unlockModels: 'เข้าสู่ระบบเพื่อใช้งาน',
|
unlockModels: 'เข้าสู่ระบบเพื่อใช้งาน',
|
||||||
editProvider: 'แก้ไขผู้ให้บริการ',
|
editProvider: 'แก้ไขผู้ให้บริการ',
|
||||||
addProvider: 'เพิ่มผู้ให้บริการ',
|
addProvider: 'เพิ่มผู้ให้บริการ',
|
||||||
@@ -314,9 +328,9 @@ const thTH = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
ownerMustBindSpace:
|
ownerMustBindSpace:
|
||||||
'The Workspace owner must connect Space for LangBot Models.',
|
'The Workspace owner must connect a LangBot Account for LangBot Models.',
|
||||||
usesOwnerSpaceBilling:
|
usesOwnerSpaceBilling:
|
||||||
"Uses the Workspace owner's Space billing and credits.",
|
"Uses the Workspace owner's LangBot Account billing and credits.",
|
||||||
},
|
},
|
||||||
bots: {
|
bots: {
|
||||||
title: 'บอท',
|
title: 'บอท',
|
||||||
@@ -1189,13 +1203,13 @@ const thTH = {
|
|||||||
description: 'นี่เป็นครั้งแรกที่คุณเริ่มใช้งาน LangBot',
|
description: 'นี่เป็นครั้งแรกที่คุณเริ่มใช้งาน LangBot',
|
||||||
adminAccountNote: 'บัญชีที่คุณใช้ที่นี่จะถูกตั้งเป็นบัญชีผู้ดูแลระบบ',
|
adminAccountNote: 'บัญชีที่คุณใช้ที่นี่จะถูกตั้งเป็นบัญชีผู้ดูแลระบบ',
|
||||||
register: 'ลงทะเบียน',
|
register: 'ลงทะเบียน',
|
||||||
initWithSpace: 'เริ่มต้นด้วย Space',
|
initWithSpace: 'เริ่มต้นด้วยบัญชี LangBot',
|
||||||
spaceRecommended:
|
spaceRecommended:
|
||||||
'แนะนำ: ใช้ API โมเดลที่เสถียรอย่างเป็นทางการและบริการคลาวด์',
|
'แนะนำ: ใช้ API โมเดลที่เสถียรอย่างเป็นทางการและบริการคลาวด์',
|
||||||
spaceInfoTip1:
|
spaceInfoTip1:
|
||||||
'Space ให้บริการยืนยันตัวตนแบบรวมโดยไม่อัปโหลดข้อมูลสำคัญใดๆ ของคุณ',
|
'Space ให้บริการยืนยันตัวตนแบบรวมโดยไม่อัปโหลดข้อมูลสำคัญใดๆ ของคุณ',
|
||||||
spaceInfoTip2:
|
spaceInfoTip2:
|
||||||
'การเข้าสู่ระบบด้วยบัญชี Space ช่วยให้คุณเข้าถึงโมเดล LangBot และบริการคลาวด์อื่นๆ รวมถึงเครดิตเรียกใช้โมเดลฟรีเพื่อช่วยให้คุณเริ่มต้นได้อย่างรวดเร็ว',
|
'การเข้าสู่ระบบด้วยบัญชี LangBot ช่วยให้คุณเข้าถึงโมเดล LangBot และบริการคลาวด์อื่นๆ รวมถึงเครดิตเรียกใช้โมเดลฟรีเพื่อช่วยให้คุณเริ่มต้นได้อย่างรวดเร็ว',
|
||||||
spaceInfoTip3:
|
spaceInfoTip3:
|
||||||
'วิธีการเข้าสู่ระบบของคุณไม่มีผลต่อฟีเจอร์อื่นๆ คุณสามารถกำหนดค่าและใช้โมเดลจากแหล่งอื่นได้ตลอดเวลา',
|
'วิธีการเข้าสู่ระบบของคุณไม่มีผลต่อฟีเจอร์อื่นๆ คุณสามารถกำหนดค่าและใช้โมเดลจากแหล่งอื่นได้ตลอดเวลา',
|
||||||
registerLocal: 'ลงทะเบียนบัญชีท้องถิ่น',
|
registerLocal: 'ลงทะเบียนบัญชีท้องถิ่น',
|
||||||
@@ -1250,30 +1264,32 @@ const thTH = {
|
|||||||
passwordNotSet: 'ยังไม่ได้ตั้งค่า',
|
passwordNotSet: 'ยังไม่ได้ตั้งค่า',
|
||||||
passwordSetDescription:
|
passwordSetDescription:
|
||||||
'ตั้งรหัสผ่านแล้ว คุณสามารถเข้าสู่ระบบด้วยอีเมลและรหัสผ่าน',
|
'ตั้งรหัสผ่านแล้ว คุณสามารถเข้าสู่ระบบด้วยอีเมลและรหัสผ่าน',
|
||||||
spaceStatus: 'บัญชี Space',
|
spaceStatus: 'บัญชี LangBot',
|
||||||
spaceBound: 'ผูกแล้ว',
|
spaceBound: 'ผูกแล้ว',
|
||||||
spaceNotBound: 'ยังไม่ผูก',
|
spaceNotBound: 'ยังไม่ผูก',
|
||||||
spaceBoundDescription:
|
spaceBoundDescription:
|
||||||
'ผูกบัญชี Space แล้ว สามารถใช้ API โมเดลอย่างเป็นทางการและบริการคลาวด์ได้',
|
'ผูกบัญชี LangBot แล้ว สามารถใช้ API โมเดลอย่างเป็นทางการและบริการคลาวด์ได้',
|
||||||
bindSpace: 'ผูกบัญชี Space',
|
bindSpace: 'ผูกบัญชี LangBot',
|
||||||
bindSpaceDescription: 'ผูกเพื่อใช้ API โมเดลอย่างเป็นทางการและบริการคลาวด์',
|
bindSpaceDescription: 'ผูกเพื่อใช้ API โมเดลอย่างเป็นทางการและบริการคลาวด์',
|
||||||
bindSpaceButton: 'ผูก',
|
bindSpaceButton: 'ผูก',
|
||||||
bindSpaceConfirmTitle: 'ยืนยันการผูก',
|
bindSpaceConfirmTitle: 'ยืนยันการผูก',
|
||||||
bindSpaceConfirmDescription: 'คุณกำลังจะผูกอินสแตนซ์ท้องถิ่นกับบัญชี Space',
|
bindSpaceConfirmDescription:
|
||||||
|
'คุณกำลังจะผูกอินสแตนซ์ท้องถิ่นกับบัญชี LangBot',
|
||||||
bindSpaceWarning:
|
bindSpaceWarning:
|
||||||
'หลังจากผูกแล้ว อีเมลเข้าสู่ระบบของคุณจะเปลี่ยนจาก {{localEmail}} เป็นอีเมลบัญชี Space',
|
'หลังจากผูกแล้ว อีเมลเข้าสู่ระบบของคุณจะเปลี่ยนจาก {{localEmail}} เป็นอีเมลบัญชี LangBot',
|
||||||
bindSpaceSuccess: 'ผูกบัญชี Space สำเร็จ',
|
bindSpaceSuccess: 'ผูกบัญชี LangBot สำเร็จ',
|
||||||
bindSpaceFailed: 'ผูกบัญชี Space ล้มเหลว',
|
bindSpaceFailed: 'ผูกบัญชี LangBot ล้มเหลว',
|
||||||
bindSpaceInvalidState: 'คำขอผูกไม่ถูกต้อง กรุณาลองใหม่จากการตั้งค่าบัญชี',
|
bindSpaceInvalidState: 'คำขอผูกไม่ถูกต้อง กรุณาลองใหม่จากการตั้งค่าบัญชี',
|
||||||
setPasswordHint: 'ตั้งรหัสผ่านเพื่อเข้าสู่ระบบด้วยอีเมลและรหัสผ่าน',
|
setPasswordHint: 'ตั้งรหัสผ่านเพื่อเข้าสู่ระบบด้วยอีเมลและรหัสผ่าน',
|
||||||
spaceEmailMismatch: 'อีเมลเข้าสู่ระบบ Space ไม่ตรงกับอีเมลบัญชีท้องถิ่น',
|
spaceEmailMismatch:
|
||||||
|
'อีเมลเข้าสู่ระบบด้วยบัญชี LangBot ไม่ตรงกับอีเมลบัญชีท้องถิ่น',
|
||||||
|
|
||||||
space_account_not_registeredTitle: 'Account not registered',
|
space_account_not_registeredTitle: 'Account not registered',
|
||||||
space_account_not_registered:
|
space_account_not_registered:
|
||||||
'No local account is registered for this Space email. Ask the Workspace owner for an invitation.',
|
'No local account is registered for this LangBot Account email. Ask the Workspace owner for an invitation.',
|
||||||
space_account_binding_requiredTitle: 'Space connection required',
|
space_account_binding_requiredTitle: 'LangBot Account connection required',
|
||||||
space_account_binding_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: {
|
monitoring: {
|
||||||
title: 'แดชบอร์ด',
|
title: 'แดชบอร์ด',
|
||||||
@@ -1599,7 +1615,6 @@ const thTH = {
|
|||||||
botCreateSuccess: 'สร้าง Bot สำเร็จ!',
|
botCreateSuccess: 'สร้าง Bot สำเร็จ!',
|
||||||
botSaveSuccess: 'บันทึกและเปิดใช้งาน Bot สำเร็จ!',
|
botSaveSuccess: 'บันทึกและเปิดใช้งาน Bot สำเร็จ!',
|
||||||
createError: 'ไม่สามารถสร้างทรัพยากรได้',
|
createError: 'ไม่สามารถสร้างทรัพยากรได้',
|
||||||
spaceAuthError: 'ไม่สามารถเริ่มต้นการยืนยันสิทธิ์ Space ได้',
|
|
||||||
skipSaveError: 'ไม่สามารถบันทึกสถานะการข้ามได้ กรุณาลองใหม่',
|
skipSaveError: 'ไม่สามารถบันทึกสถานะการข้ามได้ กรุณาลองใหม่',
|
||||||
completeSaveError: 'ไม่สามารถบันทึกสถานะการเสร็จสิ้นได้ กรุณาลองใหม่',
|
completeSaveError: 'ไม่สามารถบันทึกสถานะการเสร็จสิ้นได้ กรุณาลองใหม่',
|
||||||
step: {
|
step: {
|
||||||
@@ -1626,63 +1641,6 @@ const thTH = {
|
|||||||
aiEngine: {
|
aiEngine: {
|
||||||
title: 'เลือกเครื่องมือ AI',
|
title: 'เลือกเครื่องมือ AI',
|
||||||
description: 'เลือกเครื่องมือ AI ที่จะขับเคลื่อนความฉลาดของ Bot',
|
description: 'เลือกเครื่องมือ AI ที่จะขับเคลื่อนความฉลาดของ Bot',
|
||||||
orchestrated: {
|
|
||||||
title: 'ใช้แอป Agent ที่จัดเตรียมไว้',
|
|
||||||
description:
|
|
||||||
'ใช้แอป Agent ที่สร้างไว้จาก Dify, n8n, Coze และอื่นๆ',
|
|
||||||
action: 'เลือกแอป Agent',
|
|
||||||
selectTitle: 'เลือกแอป Agent',
|
|
||||||
selectDescription: 'เลือกแพลตฟอร์มแอป Agent ที่ต้องการใช้',
|
|
||||||
},
|
|
||||||
llm: {
|
|
||||||
title: 'ใช้โมเดลโดยตรง',
|
|
||||||
description:
|
|
||||||
'กำหนดค่าผู้ให้บริการโมเดลและใช้โมเดลขับเคลื่อน Bot โดยตรง',
|
|
||||||
action: 'กำหนดค่าโมเดล',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
spaceBanner: {
|
|
||||||
message:
|
|
||||||
'เชื่อมต่อกับ LangBot Space เพื่อรับเครดิตทดลองใช้โมเดลฟรีและตั้งค่าทันทีโดยไม่ต้องกำหนดค่า!',
|
|
||||||
action: 'ยืนยันสิทธิ์กับ Space',
|
|
||||||
},
|
|
||||||
provider: {
|
|
||||||
title: 'เพิ่มผู้ให้บริการโมเดล',
|
|
||||||
description:
|
|
||||||
'เพิ่มผู้ให้บริการโมเดลของคุณเอง กำหนดค่า API key เพื่อเริ่มต้น',
|
|
||||||
scanTitle: 'สแกนโมเดลที่ใช้ได้',
|
|
||||||
scanDescription: 'กำลังสแกนโมเดล LLM จากผู้ให้บริการของคุณ',
|
|
||||||
scanning: 'กำลังสแกนโมเดล...',
|
|
||||||
noModelsFound:
|
|
||||||
'ไม่พบโมเดล กรุณาตรวจสอบการตั้งค่าผู้ให้บริการ',
|
|
||||||
addSelected: 'เพิ่ม {{count}} โมเดลที่เลือก',
|
|
||||||
modelsAdded: 'เพิ่ม {{count}} โมเดลแล้ว',
|
|
||||||
modelsAddError: 'เพิ่มโมเดลไม่สำเร็จ',
|
|
||||||
skipModelAdd: 'ข้าม เพิ่มทีหลัง',
|
|
||||||
searchModels: 'ค้นหาโมเดล...',
|
|
||||||
noMatch: 'ไม่พบโมเดลที่ตรงกัน',
|
|
||||||
orDivider: 'หรือ',
|
|
||||||
manualModelPlaceholder: 'กรอกชื่อโมเดลเพื่อเพิ่มด้วยตนเอง',
|
|
||||||
addManual: 'เพิ่ม',
|
|
||||||
saveAndNext: 'บันทึกและถัดไป',
|
|
||||||
alreadyAdded: 'เพิ่มแล้ว',
|
|
||||||
modelAlreadyExists: 'โมเดล "{{name}}" มีอยู่แล้ว',
|
|
||||||
},
|
|
||||||
modelSource: {
|
|
||||||
title: 'เลือกแหล่งโมเดล',
|
|
||||||
description: 'เลือกวิธีการให้ความสามารถของโมเดลสำหรับ AI engine ของคุณ',
|
|
||||||
space: {
|
|
||||||
title: 'บริการ LangBot',
|
|
||||||
description:
|
|
||||||
'พร้อมใช้งานทันทีไม่ต้องตั้งค่า พร้อมเครดิตทดลองใช้โมเดลฟรี ไม่ต้องใช้ API key',
|
|
||||||
action: 'ใช้บริการ LangBot',
|
|
||||||
},
|
|
||||||
custom: {
|
|
||||||
title: 'โมเดลกำหนดเอง',
|
|
||||||
description:
|
|
||||||
'ใช้ API key โมเดลของคุณเอง รองรับ OpenAI, Claude, Gemini และอื่นๆ',
|
|
||||||
action: 'เพิ่มโมเดลของฉัน',
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
config: {
|
config: {
|
||||||
botInfo: 'ข้อมูล Bot',
|
botInfo: 'ข้อมูล Bot',
|
||||||
@@ -1732,6 +1690,9 @@ const thTH = {
|
|||||||
'สแกนคิวอาร์โค้ดด้านล่างด้วย WeChat เพื่ออนุญาตและกรอกโทเคนอัตโนมัติ',
|
'สแกนคิวอาร์โค้ดด้านล่างด้วย WeChat เพื่ออนุญาตและกรอกโทเคนอัตโนมัติ',
|
||||||
loginSuccess: 'เข้าสู่ระบบสำเร็จ และกรอกโทเคนอัตโนมัติแล้ว',
|
loginSuccess: 'เข้าสู่ระบบสำเร็จ และกรอกโทเคนอัตโนมัติแล้ว',
|
||||||
loginFailed: 'เข้าสู่ระบบไม่สำเร็จ',
|
loginFailed: 'เข้าสู่ระบบไม่สำเร็จ',
|
||||||
|
connecting: 'กำลังเชื่อมต่อบริการ WeChat...',
|
||||||
|
waitingForScan: 'กำลังรอการสแกน',
|
||||||
|
retry: 'ลองอีกครั้ง',
|
||||||
},
|
},
|
||||||
dingtalk: {
|
dingtalk: {
|
||||||
createApp: 'สร้างแอป 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',
|
'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ộ',
|
loginLocal: 'Đăng nhập với tài khoản cục bộ',
|
||||||
loginWithPassword: 'Đăng nhập bằng mật khẩu',
|
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:
|
spaceLoginDescription:
|
||||||
'Quét mã QR hoặc truy cập liên kết bên dưới để ủy quyền',
|
'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',
|
spaceLoginUserCode: 'Mã của bạn',
|
||||||
spaceLoginExpires: 'Mã hết hạn sau {{seconds}} giây',
|
spaceLoginExpires: 'Mã hết hạn sau {{seconds}} giây',
|
||||||
spaceLoginWaiting: 'Đang chờ ủy quyền...',
|
spaceLoginWaiting: 'Đang chờ ủy quyền...',
|
||||||
spaceLoginSuccess: 'Ủy quyền thành công',
|
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',
|
spaceLoginExpired: 'Mã ủy quyền đã hết hạn, vui lòng thử lại',
|
||||||
spaceLoginCancel: 'Hủy',
|
spaceLoginCancel: 'Hủy',
|
||||||
spaceLoginVisitLink: 'Truy cập liên kết',
|
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:
|
spaceLoginProcessingDescription:
|
||||||
'Vui lòng chờ trong khi chúng tôi hoàn tất đăng nhập...',
|
'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...',
|
spaceLoginSuccessDescription: 'Đang chuyển hướng đến LangBot...',
|
||||||
@@ -106,7 +106,7 @@ const viVN = {
|
|||||||
backToLogin: 'Quay lại đăng nhập',
|
backToLogin: 'Quay lại đăng nhập',
|
||||||
backToHome: 'Quay lại trang chủ',
|
backToHome: 'Quay lại trang chủ',
|
||||||
spaceAccountCannotChangePassword:
|
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',
|
theme: 'Giao diện',
|
||||||
changePassword: 'Đổi mật khẩu',
|
changePassword: 'Đổi mật khẩu',
|
||||||
currentPassword: 'Mật khẩu hiện tại',
|
currentPassword: 'Mật khẩu hiện tại',
|
||||||
@@ -217,6 +217,19 @@ const viVN = {
|
|||||||
selectModelAbilities: 'Chọn khả năng mô hình',
|
selectModelAbilities: 'Chọn khả năng mô hình',
|
||||||
visionAbility: 'Khả năng thị giác',
|
visionAbility: 'Khả năng thị giác',
|
||||||
functionCallAbility: 'Gọi hàm',
|
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',
|
contextLength: 'Cửa sổ ngữ cảnh',
|
||||||
contextLengthPlaceholder: 'Không rõ',
|
contextLengthPlaceholder: 'Không rõ',
|
||||||
contextLengthInvalid: 'Cửa sổ ngữ cảnh phải là số nguyên dương',
|
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ộ',
|
localProvider: 'Cục bộ',
|
||||||
localProviderDescription: 'Các mô hình được cấu hình và quản lý cục bộ',
|
localProviderDescription: 'Các mô hình được cấu hình và quản lý cục bộ',
|
||||||
spaceProviderDescription:
|
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:
|
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ộ',
|
syncModels: 'Đồng bộ',
|
||||||
syncSuccess:
|
syncSuccess:
|
||||||
'Đồng bộ hoàn tất: {{created}} đã tạo, {{updated}} đã cập nhật',
|
'Đồ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',
|
langbotModelsDescription: 'Mô hình đám mây được cung cấp bởi LangBot Space',
|
||||||
credits: 'Tín dụng',
|
credits: 'Tín dụng',
|
||||||
loginWithSpace: 'Đăng nhập bằng tài khoản LangBot',
|
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',
|
noModels: 'Chưa cấu hình mô hình nào',
|
||||||
langbotModels: 'Mô hình LangBot',
|
langbotModels: 'Mô hình LangBot',
|
||||||
spaceTrialTooltip:
|
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',
|
unlockModels: 'Đăng nhập để sử dụng',
|
||||||
editProvider: 'Chỉnh sửa nhà cung cấp',
|
editProvider: 'Chỉnh sửa nhà cung cấp',
|
||||||
addProvider: 'Thêm nhà cung cấp',
|
addProvider: 'Thêm nhà cung cấp',
|
||||||
@@ -323,9 +337,9 @@ const viVN = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
ownerMustBindSpace:
|
ownerMustBindSpace:
|
||||||
'The Workspace owner must connect Space for LangBot Models.',
|
'The Workspace owner must connect a LangBot Account for LangBot Models.',
|
||||||
usesOwnerSpaceBilling:
|
usesOwnerSpaceBilling:
|
||||||
"Uses the Workspace owner's Space billing and credits.",
|
"Uses the Workspace owner's LangBot Account billing and credits.",
|
||||||
},
|
},
|
||||||
bots: {
|
bots: {
|
||||||
title: 'Bot',
|
title: 'Bot',
|
||||||
@@ -1209,13 +1223,13 @@ const viVN = {
|
|||||||
adminAccountNote:
|
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',
|
'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ý',
|
register: 'Đăng ký',
|
||||||
initWithSpace: 'Khởi tạo với Space',
|
initWithSpace: 'Khởi tạo bằng tài khoản LangBot',
|
||||||
spaceRecommended:
|
spaceRecommended:
|
||||||
'Khuyến nghị: Sử dụng API mô hình ổn định chính thức và dịch vụ đám mây',
|
'Khuyến nghị: Sử dụng API mô hình ổn định chính thức và dịch vụ đám mây',
|
||||||
spaceInfoTip1:
|
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.',
|
'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:
|
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:
|
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.',
|
'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ộ',
|
registerLocal: 'Đăng ký tài khoản cục bộ',
|
||||||
@@ -1272,34 +1286,34 @@ const viVN = {
|
|||||||
passwordNotSet: 'Chưa đặt',
|
passwordNotSet: 'Chưa đặt',
|
||||||
passwordSetDescription:
|
passwordSetDescription:
|
||||||
'Mật khẩu đã được đặt, bạn có thể đăng nhập bằng email và mật khẩu',
|
'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',
|
spaceBound: 'Đã liên kết',
|
||||||
spaceNotBound: 'Chưa liên kết',
|
spaceNotBound: 'Chưa liên kết',
|
||||||
spaceBoundDescription:
|
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',
|
'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 Space',
|
bindSpace: 'Liên kết tài khoản LangBot',
|
||||||
bindSpaceDescription:
|
bindSpaceDescription:
|
||||||
'Liên kết để sử dụng API mô hình chính thức và dịch vụ đám mây',
|
'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',
|
bindSpaceButton: 'Liên kết',
|
||||||
bindSpaceConfirmTitle: 'Xác nhận liên kết',
|
bindSpaceConfirmTitle: 'Xác nhận liên kết',
|
||||||
bindSpaceConfirmDescription:
|
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:
|
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.',
|
'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 Space thành công',
|
bindSpaceSuccess: 'Liên kết tài khoản LangBot thành công',
|
||||||
bindSpaceFailed: 'Liên kết tài khoản Space thất bại',
|
bindSpaceFailed: 'Liên kết tài khoản LangBot thất bại',
|
||||||
bindSpaceInvalidState:
|
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.',
|
'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',
|
setPasswordHint: 'Đặt mật khẩu để đăng nhập bằng email và mật khẩu',
|
||||||
spaceEmailMismatch:
|
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_registeredTitle: 'Account not registered',
|
||||||
space_account_not_registered:
|
space_account_not_registered:
|
||||||
'No local account is registered for this Space email. Ask the Workspace owner for an invitation.',
|
'No local account is registered for this LangBot Account email. Ask the Workspace owner for an invitation.',
|
||||||
space_account_binding_requiredTitle: 'Space connection required',
|
space_account_binding_requiredTitle: 'LangBot Account connection required',
|
||||||
space_account_binding_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: {
|
monitoring: {
|
||||||
title: 'Bảng điều khiển',
|
title: 'Bảng điều khiển',
|
||||||
@@ -1625,7 +1639,6 @@ const viVN = {
|
|||||||
botCreateSuccess: 'Tạo Bot thành công!',
|
botCreateSuccess: 'Tạo Bot thành công!',
|
||||||
botSaveSuccess: 'Cấu hình Bot đã lưu và bật!',
|
botSaveSuccess: 'Cấu hình Bot đã lưu và bật!',
|
||||||
createError: 'Tạo tài nguyên thất bại',
|
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.',
|
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.',
|
completeSaveError: 'Lưu trạng thái hoàn tất thất bại. Vui lòng thử lại.',
|
||||||
step: {
|
step: {
|
||||||
@@ -1652,63 +1665,6 @@ const viVN = {
|
|||||||
aiEngine: {
|
aiEngine: {
|
||||||
title: 'Chọn công cụ AI',
|
title: 'Chọn công cụ AI',
|
||||||
description: 'Chọn công cụ AI sẽ cung cấp trí tuệ cho Bot của bạn.',
|
description: 'Chọn công cụ AI sẽ cung cấp trí tuệ cho Bot của bạn.',
|
||||||
orchestrated: {
|
|
||||||
title: 'Sử dụng ứng dụng Agent đã được phối hợp',
|
|
||||||
description:
|
|
||||||
'Sử dụng các ứng dụng Agent đã được xây dựng từ Dify, n8n, Coze.',
|
|
||||||
action: 'Chọn ứng dụng Agent',
|
|
||||||
selectTitle: 'Chọn ứng dụng Agent',
|
|
||||||
selectDescription: 'Chọn nền tảng ứng dụng Agent bạn muốn sử dụng.',
|
|
||||||
},
|
|
||||||
llm: {
|
|
||||||
title: 'Sử dụng mô hình trực tiếp',
|
|
||||||
description:
|
|
||||||
'Cấu hình nhà cung cấp mô hình và sử dụng mô hình lớn để điều khiển Bot.',
|
|
||||||
action: 'Cấu hình mô hình',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
spaceBanner: {
|
|
||||||
message:
|
|
||||||
'Kết nối với LangBot Space để nhận tín dụng dùng thử mô hình miễn phí và thiết lập tức thì không cần cấu hình!',
|
|
||||||
action: 'Ủy quyền với Space',
|
|
||||||
},
|
|
||||||
provider: {
|
|
||||||
title: 'Thêm nhà cung cấp mô hình',
|
|
||||||
description:
|
|
||||||
'Thêm nhà cung cấp mô hình của bạn. Cấu hình API key để bắt đầu.',
|
|
||||||
scanTitle: 'Quét mô hình khả dụng',
|
|
||||||
scanDescription: 'Đang quét mô hình LLM từ nhà cung cấp của bạn.',
|
|
||||||
scanning: 'Đang quét mô hình...',
|
|
||||||
noModelsFound:
|
|
||||||
'Không tìm thấy mô hình. Vui lòng kiểm tra cấu hình nhà cung cấp.',
|
|
||||||
addSelected: 'Thêm {{count}} mô hình đã chọn',
|
|
||||||
modelsAdded: 'Đã thêm {{count}} mô hình',
|
|
||||||
modelsAddError: 'Thêm mô hình thất bại',
|
|
||||||
skipModelAdd: 'Bỏ qua, thêm sau',
|
|
||||||
searchModels: 'Tìm kiếm mô hình...',
|
|
||||||
noMatch: 'Không tìm thấy mô hình phù hợp',
|
|
||||||
orDivider: 'hoặc',
|
|
||||||
manualModelPlaceholder: 'Nhập tên mô hình để thêm thủ công',
|
|
||||||
addManual: 'Thêm',
|
|
||||||
saveAndNext: 'Lưu & Tiếp theo',
|
|
||||||
alreadyAdded: 'Đã thêm',
|
|
||||||
modelAlreadyExists: 'Mô hình "{{name}}" đã tồn tại',
|
|
||||||
},
|
|
||||||
modelSource: {
|
|
||||||
title: 'Chọn nguồn mô hình',
|
|
||||||
description: 'Chọn cách cung cấp khả năng mô hình cho AI engine của bạn.',
|
|
||||||
space: {
|
|
||||||
title: 'Dịch vụ LangBot',
|
|
||||||
description:
|
|
||||||
'Sẵn sàng sử dụng không cần cấu hình, tặng tín dụng mô hình thử nghiệm miễn phí. Không cần API key.',
|
|
||||||
action: 'Sử dụng dịch vụ LangBot',
|
|
||||||
},
|
|
||||||
custom: {
|
|
||||||
title: 'Mô hình tùy chỉnh',
|
|
||||||
description:
|
|
||||||
'Sử dụng API key mô hình của riêng bạn. Hỗ trợ OpenAI, Claude, Gemini và nhiều hơn nữa.',
|
|
||||||
action: 'Thêm mô hình của tôi',
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
config: {
|
config: {
|
||||||
botInfo: 'Thông tin Bot',
|
botInfo: 'Thông tin Bot',
|
||||||
@@ -1760,6 +1716,9 @@ const viVN = {
|
|||||||
'Quét mã QR bên dưới bằng WeChat để ủy quyền và tự động điền token',
|
'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',
|
loginSuccess: 'Đăng nhập thành công! Token đã được điền tự động',
|
||||||
loginFailed: 'Đăng nhập thất bại',
|
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: {
|
dingtalk: {
|
||||||
createApp: 'Tạo ứng dụng DingTalk chỉ với một lần nhấp',
|
createApp: 'Tạo ứng dụng DingTalk chỉ với một lần nhấp',
|
||||||
|
|||||||
@@ -83,24 +83,24 @@ const zhHans = {
|
|||||||
spaceLoginRecommended: '推荐:使用官方提供的稳定模型 API 和云服务',
|
spaceLoginRecommended: '推荐:使用官方提供的稳定模型 API 和云服务',
|
||||||
loginLocal: '使用本地账号登录',
|
loginLocal: '使用本地账号登录',
|
||||||
loginWithPassword: '通过密码登录',
|
loginWithPassword: '通过密码登录',
|
||||||
spaceLoginTitle: '通过 Space 登录',
|
spaceLoginTitle: '通过 LangBot 账号登录',
|
||||||
spaceLoginDescription: '扫描二维码或访问下方链接进行授权',
|
spaceLoginDescription: '扫描二维码或访问下方链接进行授权',
|
||||||
spaceLoginUserCode: '您的验证码',
|
spaceLoginUserCode: '您的验证码',
|
||||||
spaceLoginExpires: '验证码将在 {{seconds}} 秒后过期',
|
spaceLoginExpires: '验证码将在 {{seconds}} 秒后过期',
|
||||||
spaceLoginWaiting: '等待授权中...',
|
spaceLoginWaiting: '等待授权中...',
|
||||||
spaceLoginSuccess: '授权成功',
|
spaceLoginSuccess: '授权成功',
|
||||||
spaceLoginFailed: 'Space 登录失败',
|
spaceLoginFailed: 'LangBot 账号登录失败',
|
||||||
spaceLoginExpired: '验证码已过期,请重试',
|
spaceLoginExpired: '验证码已过期,请重试',
|
||||||
spaceLoginCancel: '取消',
|
spaceLoginCancel: '取消',
|
||||||
spaceLoginVisitLink: '访问链接',
|
spaceLoginVisitLink: '访问链接',
|
||||||
spaceLoginProcessing: '正在通过 Space 登录',
|
spaceLoginProcessing: '正在通过 LangBot 账号登录',
|
||||||
spaceLoginProcessingDescription: '请稍候,正在完成登录...',
|
spaceLoginProcessingDescription: '请稍候,正在完成登录...',
|
||||||
spaceLoginSuccessDescription: '正在跳转到 LangBot...',
|
spaceLoginSuccessDescription: '正在跳转到 LangBot...',
|
||||||
spaceLoginError: '登录失败',
|
spaceLoginError: '登录失败',
|
||||||
spaceLoginNoCode: '缺少授权码',
|
spaceLoginNoCode: '缺少授权码',
|
||||||
backToLogin: '返回登录',
|
backToLogin: '返回登录',
|
||||||
backToHome: '返回首页',
|
backToHome: '返回首页',
|
||||||
spaceAccountCannotChangePassword: 'Space 账户无法在此修改密码',
|
spaceAccountCannotChangePassword: 'LangBot 账号无法在此修改密码',
|
||||||
theme: '主题',
|
theme: '主题',
|
||||||
changePassword: '修改密码',
|
changePassword: '修改密码',
|
||||||
currentPassword: '当前密码',
|
currentPassword: '当前密码',
|
||||||
@@ -243,8 +243,8 @@ const zhHans = {
|
|||||||
llmModels: '对话模型',
|
llmModels: '对话模型',
|
||||||
localProvider: '本地',
|
localProvider: '本地',
|
||||||
localProviderDescription: '在本地配置和管理的模型',
|
localProviderDescription: '在本地配置和管理的模型',
|
||||||
spaceProviderDescription: '从您的 Space 账户同步的模型',
|
spaceProviderDescription: '从您的 LangBot 账号同步的模型',
|
||||||
spaceDisabledForLocalAccount: '使用 Space 登录以使用云端模型',
|
spaceDisabledForLocalAccount: '使用 LangBot 账号登录以使用云端模型',
|
||||||
syncModels: '同步',
|
syncModels: '同步',
|
||||||
syncSuccess: '同步完成:创建 {{created}} 个,更新 {{updated}} 个',
|
syncSuccess: '同步完成:创建 {{created}} 个,更新 {{updated}} 个',
|
||||||
syncError: '同步失败:',
|
syncError: '同步失败:',
|
||||||
@@ -279,13 +279,14 @@ const zhHans = {
|
|||||||
langbotModelsDescription: 'LangBot Space 提供的云端模型',
|
langbotModelsDescription: 'LangBot Space 提供的云端模型',
|
||||||
credits: '积分',
|
credits: '积分',
|
||||||
loginWithSpace: '使用 LangBot 账号登录',
|
loginWithSpace: '使用 LangBot 账号登录',
|
||||||
loginToUseModels: '通过 Space 登录以使用云端模型',
|
loginToUseModels: '通过 LangBot 账号登录以使用云端模型',
|
||||||
ownerMustBindSpace: '工作区所有者需要绑定 Space 才能使用 LangBot 模型。',
|
ownerMustBindSpace:
|
||||||
usesOwnerSpaceBilling: '使用工作区所有者的 Space 计费与积分。',
|
'工作区所有者需要绑定 LangBot 账号才能使用 LangBot 模型。',
|
||||||
|
usesOwnerSpaceBilling: '使用工作区所有者的 LangBot 账号计费与积分。',
|
||||||
noModels: '暂无模型',
|
noModels: '暂无模型',
|
||||||
langbotModels: 'LangBot 模型',
|
langbotModels: 'LangBot 模型',
|
||||||
spaceTrialTooltip:
|
spaceTrialTooltip:
|
||||||
'免费试用积分已就绪!通过 Space 登录即可零配置使用云端模型。',
|
'免费试用积分已就绪!通过 LangBot 账号登录即可零配置使用云端模型。',
|
||||||
unlockModels: '登录以使用',
|
unlockModels: '登录以使用',
|
||||||
editProvider: '编辑供应商',
|
editProvider: '编辑供应商',
|
||||||
addProvider: '添加供应商',
|
addProvider: '添加供应商',
|
||||||
@@ -1161,11 +1162,11 @@ const zhHans = {
|
|||||||
description: '这是您首次启动 LangBot',
|
description: '这是您首次启动 LangBot',
|
||||||
adminAccountNote: '您在此处初始化使用的账号将作为管理员账号',
|
adminAccountNote: '您在此处初始化使用的账号将作为管理员账号',
|
||||||
register: '注册',
|
register: '注册',
|
||||||
initWithSpace: '通过 Space 初始化',
|
initWithSpace: '通过 LangBot 账号初始化',
|
||||||
spaceRecommended: '推荐:使用官方提供的稳定模型 API 和云服务',
|
spaceRecommended: '推荐:使用官方提供的稳定模型 API 和云服务',
|
||||||
spaceInfoTip1: 'Space 提供统一的账户鉴权服务,不会上传您的任何敏感信息。',
|
spaceInfoTip1: 'Space 提供统一的账户鉴权服务,不会上传您的任何敏感信息。',
|
||||||
spaceInfoTip2:
|
spaceInfoTip2:
|
||||||
'使用 Space 账户登录可使用 LangBot Models 等云服务,您将会获得一定的免费模型调用额度帮助您快速起步。',
|
'使用 LangBot 账号登录可使用 LangBot Models 等云服务,您将会获得一定的免费模型调用额度帮助您快速起步。',
|
||||||
spaceInfoTip3:
|
spaceInfoTip3:
|
||||||
'登录方式不会影响其他功能,您在任何情况下都可以配置使用其他来源的模型。',
|
'登录方式不会影响其他功能,您在任何情况下都可以配置使用其他来源的模型。',
|
||||||
registerLocal: '注册本地账号',
|
registerLocal: '注册本地账号',
|
||||||
@@ -1219,28 +1220,28 @@ const zhHans = {
|
|||||||
passwordSet: '已设置',
|
passwordSet: '已设置',
|
||||||
passwordNotSet: '未设置',
|
passwordNotSet: '未设置',
|
||||||
passwordSetDescription: '您已设置本地密码,可使用邮箱密码登录',
|
passwordSetDescription: '您已设置本地密码,可使用邮箱密码登录',
|
||||||
spaceStatus: 'Space 账户',
|
spaceStatus: 'LangBot 账号',
|
||||||
spaceBound: '已绑定',
|
spaceBound: '已绑定',
|
||||||
spaceNotBound: '未绑定',
|
spaceNotBound: '未绑定',
|
||||||
spaceBoundDescription: '已绑定 Space 账户,可使用官方模型 API 和云服务',
|
spaceBoundDescription: '已绑定 LangBot 账号,可使用官方模型 API 和云服务',
|
||||||
bindSpace: '绑定 Space 账户',
|
bindSpace: '绑定 LangBot 账号',
|
||||||
bindSpaceDescription: '绑定后可使用官方模型 API 和云服务',
|
bindSpaceDescription: '绑定后可使用官方模型 API 和云服务',
|
||||||
bindSpaceButton: '绑定',
|
bindSpaceButton: '绑定',
|
||||||
bindSpaceConfirmTitle: '确认绑定',
|
bindSpaceConfirmTitle: '确认绑定',
|
||||||
bindSpaceConfirmDescription: '您即将把本地实例绑定到 Space 账户',
|
bindSpaceConfirmDescription: '您即将把本地实例绑定到 LangBot 账号',
|
||||||
bindSpaceWarning:
|
bindSpaceWarning:
|
||||||
'绑定后,您的登录邮箱将从 {{localEmail}} 更改为 Space 账户的邮箱。',
|
'绑定后,您的登录邮箱将从 {{localEmail}} 更改为 LangBot 账号的邮箱。',
|
||||||
bindSpaceSuccess: 'Space 账户绑定成功',
|
bindSpaceSuccess: 'LangBot 账号绑定成功',
|
||||||
bindSpaceFailed: '绑定 Space 账户失败',
|
bindSpaceFailed: '绑定 LangBot 账号失败',
|
||||||
bindSpaceInvalidState: '无效的绑定请求,请从账户设置重新发起',
|
bindSpaceInvalidState: '无效的绑定请求,请从账户设置重新发起',
|
||||||
setPasswordHint: '设置密码后可使用邮箱密码登录',
|
setPasswordHint: '设置密码后可使用邮箱密码登录',
|
||||||
spaceEmailMismatch: 'Space登录账号邮箱与本实例账号邮箱不匹配',
|
spaceEmailMismatch: 'LangBot 账号邮箱与本实例账号邮箱不匹配',
|
||||||
space_account_not_registeredTitle: '账户尚未注册',
|
space_account_not_registeredTitle: '账户尚未注册',
|
||||||
space_account_not_registered:
|
space_account_not_registered:
|
||||||
'此 Space 邮箱尚无本地账户,请联系工作区所有者获取邀请。',
|
'此 LangBot 账号邮箱尚无本地账户,请联系工作区所有者获取邀请。',
|
||||||
space_account_binding_requiredTitle: '需要绑定 Space',
|
space_account_binding_requiredTitle: '需要绑定 LangBot 账号',
|
||||||
space_account_binding_required:
|
space_account_binding_required:
|
||||||
'此本地账户必须先在账户设置中绑定 Space,才能使用 Space 登录。',
|
'此本地账户必须先在账户设置中绑定 LangBot 账号,才能使用 LangBot 账号登录。',
|
||||||
},
|
},
|
||||||
workspace: {
|
workspace: {
|
||||||
title: '工作区',
|
title: '工作区',
|
||||||
@@ -1730,7 +1731,6 @@ const zhHans = {
|
|||||||
botCreateSuccess: '机器人创建成功!',
|
botCreateSuccess: '机器人创建成功!',
|
||||||
botSaveSuccess: '机器人配置已保存并启用!',
|
botSaveSuccess: '机器人配置已保存并启用!',
|
||||||
createError: '创建资源失败',
|
createError: '创建资源失败',
|
||||||
spaceAuthError: '无法发起 Space 授权',
|
|
||||||
skipSaveError: '保存跳过状态失败,请重试。',
|
skipSaveError: '保存跳过状态失败,请重试。',
|
||||||
completeSaveError: '保存完成状态失败,请重试。',
|
completeSaveError: '保存完成状态失败,请重试。',
|
||||||
step: {
|
step: {
|
||||||
@@ -1755,58 +1755,6 @@ const zhHans = {
|
|||||||
aiEngine: {
|
aiEngine: {
|
||||||
title: '选择 AI 引擎',
|
title: '选择 AI 引擎',
|
||||||
description: '选择驱动机器人智能的 AI 引擎。',
|
description: '选择驱动机器人智能的 AI 引擎。',
|
||||||
orchestrated: {
|
|
||||||
title: '使用编排好的 Agent 应用',
|
|
||||||
description: '使用 Dify、n8n、Coze 等平台编排好的 Agent 应用。',
|
|
||||||
action: '选择 Agent 应用',
|
|
||||||
selectTitle: '选择 Agent 应用',
|
|
||||||
selectDescription: '选择你要使用的 Agent 应用平台。',
|
|
||||||
},
|
|
||||||
llm: {
|
|
||||||
title: '直接使用大模型',
|
|
||||||
description: '配置大模型供应商,直接使用大模型驱动机器人。',
|
|
||||||
action: '配置大模型',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
spaceBanner: {
|
|
||||||
message: '接入 LangBot Space,获取免费试用模型额度,零配置极速开箱!',
|
|
||||||
action: '前往授权登录',
|
|
||||||
},
|
|
||||||
provider: {
|
|
||||||
title: '添加模型供应商',
|
|
||||||
description: '添加你自己的模型供应商,配置 API Key 后即可使用。',
|
|
||||||
scanTitle: '扫描可用模型',
|
|
||||||
scanDescription: '正在从你的供应商中扫描可用的 LLM 模型。',
|
|
||||||
scanning: '正在扫描模型...',
|
|
||||||
noModelsFound: '未发现可用模型,请检查供应商配置。',
|
|
||||||
addSelected: '添加选中的 {{count}} 个模型',
|
|
||||||
modelsAdded: '已添加 {{count}} 个模型',
|
|
||||||
modelsAddError: '添加模型失败',
|
|
||||||
skipModelAdd: '跳过,稍后添加',
|
|
||||||
searchModels: '搜索模型...',
|
|
||||||
noMatch: '没有匹配的模型',
|
|
||||||
orDivider: '或',
|
|
||||||
manualModelPlaceholder: '输入模型名称手动添加',
|
|
||||||
addManual: '添加',
|
|
||||||
saveAndNext: '保存并下一步',
|
|
||||||
alreadyAdded: '已添加',
|
|
||||||
modelAlreadyExists: '模型 "{{name}}" 已存在',
|
|
||||||
},
|
|
||||||
modelSource: {
|
|
||||||
title: '选择模型来源',
|
|
||||||
description: '选择如何为你的 AI 引擎提供模型能力。',
|
|
||||||
space: {
|
|
||||||
title: 'LangBot 服务',
|
|
||||||
description:
|
|
||||||
'零配置即可使用,提供免费试用模型额度,开箱即用,无需自备 API Key。',
|
|
||||||
action: '使用 LangBot 服务',
|
|
||||||
},
|
|
||||||
custom: {
|
|
||||||
title: '自定义模型',
|
|
||||||
description:
|
|
||||||
'使用你自己的模型 API Key,支持 OpenAI、Claude、Gemini 等主流模型。',
|
|
||||||
action: '添加我自己的模型',
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
config: {
|
config: {
|
||||||
botInfo: '机器人信息',
|
botInfo: '机器人信息',
|
||||||
@@ -1882,6 +1830,9 @@ const zhHans = {
|
|||||||
scanQRCode: '请使用微信扫描以下二维码,授权后将自动登录并填写令牌',
|
scanQRCode: '请使用微信扫描以下二维码,授权后将自动登录并填写令牌',
|
||||||
loginSuccess: '登录成功!令牌已自动填入',
|
loginSuccess: '登录成功!令牌已自动填入',
|
||||||
loginFailed: '登录失败',
|
loginFailed: '登录失败',
|
||||||
|
connecting: '正在连接微信服务...',
|
||||||
|
waitingForScan: '等待扫码中',
|
||||||
|
retry: '重试',
|
||||||
},
|
},
|
||||||
dingtalk: {
|
dingtalk: {
|
||||||
createApp: '一键创建钉钉应用',
|
createApp: '一键创建钉钉应用',
|
||||||
|
|||||||
@@ -83,24 +83,24 @@ const zhHant = {
|
|||||||
spaceLoginRecommended: '推薦:使用官方提供的穩定模型 API 和雲服務',
|
spaceLoginRecommended: '推薦:使用官方提供的穩定模型 API 和雲服務',
|
||||||
loginLocal: '使用本地帳號登入',
|
loginLocal: '使用本地帳號登入',
|
||||||
loginWithPassword: '透過密碼登入',
|
loginWithPassword: '透過密碼登入',
|
||||||
spaceLoginTitle: '透過 Space 登入',
|
spaceLoginTitle: '透過 LangBot 帳號登入',
|
||||||
spaceLoginDescription: '掃描二維碼或訪問下方連結進行授權',
|
spaceLoginDescription: '掃描二維碼或訪問下方連結進行授權',
|
||||||
spaceLoginUserCode: '您的驗證碼',
|
spaceLoginUserCode: '您的驗證碼',
|
||||||
spaceLoginExpires: '驗證碼將在 {{seconds}} 秒後過期',
|
spaceLoginExpires: '驗證碼將在 {{seconds}} 秒後過期',
|
||||||
spaceLoginWaiting: '等待授權中...',
|
spaceLoginWaiting: '等待授權中...',
|
||||||
spaceLoginSuccess: '授權成功',
|
spaceLoginSuccess: '授權成功',
|
||||||
spaceLoginFailed: 'Space 登入失敗',
|
spaceLoginFailed: 'LangBot 帳號登入失敗',
|
||||||
spaceLoginExpired: '驗證碼已過期,請重試',
|
spaceLoginExpired: '驗證碼已過期,請重試',
|
||||||
spaceLoginCancel: '取消',
|
spaceLoginCancel: '取消',
|
||||||
spaceLoginVisitLink: '訪問連結',
|
spaceLoginVisitLink: '訪問連結',
|
||||||
spaceLoginProcessing: '正在透過 Space 登入',
|
spaceLoginProcessing: '正在透過 LangBot 帳號登入',
|
||||||
spaceLoginProcessingDescription: '請稍候,正在完成登入...',
|
spaceLoginProcessingDescription: '請稍候,正在完成登入...',
|
||||||
spaceLoginSuccessDescription: '正在跳轉到 LangBot...',
|
spaceLoginSuccessDescription: '正在跳轉到 LangBot...',
|
||||||
spaceLoginError: '登入失敗',
|
spaceLoginError: '登入失敗',
|
||||||
spaceLoginNoCode: '缺少授權碼',
|
spaceLoginNoCode: '缺少授權碼',
|
||||||
backToLogin: '返回登入',
|
backToLogin: '返回登入',
|
||||||
backToHome: '返回首頁',
|
backToHome: '返回首頁',
|
||||||
spaceAccountCannotChangePassword: 'Space 帳戶無法在此修改密碼',
|
spaceAccountCannotChangePassword: 'LangBot 帳號無法在此修改密碼',
|
||||||
theme: '主題',
|
theme: '主題',
|
||||||
changePassword: '修改密碼',
|
changePassword: '修改密碼',
|
||||||
currentPassword: '當前密碼',
|
currentPassword: '當前密碼',
|
||||||
@@ -205,6 +205,19 @@ const zhHant = {
|
|||||||
selectModelAbilities: '選擇模型能力',
|
selectModelAbilities: '選擇模型能力',
|
||||||
visionAbility: '視覺能力',
|
visionAbility: '視覺能力',
|
||||||
functionCallAbility: '函數呼叫',
|
functionCallAbility: '函數呼叫',
|
||||||
|
reasoningAbility: '思考能力',
|
||||||
|
reasoningLevel: '思考等級',
|
||||||
|
reasoningLevels: {
|
||||||
|
providerDefault: '供應商預設',
|
||||||
|
disabled: '關閉',
|
||||||
|
enabled: '開啟',
|
||||||
|
minimal: '最低',
|
||||||
|
low: '低',
|
||||||
|
medium: '中',
|
||||||
|
high: '高',
|
||||||
|
xhigh: '極高',
|
||||||
|
max: '最大',
|
||||||
|
},
|
||||||
contextLength: '上下文視窗',
|
contextLength: '上下文視窗',
|
||||||
contextLengthPlaceholder: '未知',
|
contextLengthPlaceholder: '未知',
|
||||||
contextLengthInvalid: '上下文視窗必須是正整數',
|
contextLengthInvalid: '上下文視窗必須是正整數',
|
||||||
@@ -231,8 +244,8 @@ const zhHant = {
|
|||||||
llmModels: '對話模型',
|
llmModels: '對話模型',
|
||||||
localProvider: '本地',
|
localProvider: '本地',
|
||||||
localProviderDescription: '在本地設定和管理的模型',
|
localProviderDescription: '在本地設定和管理的模型',
|
||||||
spaceProviderDescription: '從您的 Space 帳戶同步的模型',
|
spaceProviderDescription: '從您的 LangBot 帳號同步的模型',
|
||||||
spaceDisabledForLocalAccount: '使用 Space 登入以使用雲端模型',
|
spaceDisabledForLocalAccount: '使用 LangBot 帳號登入以使用雲端模型',
|
||||||
syncModels: '同步',
|
syncModels: '同步',
|
||||||
syncSuccess: '同步完成:建立 {{created}} 個,更新 {{updated}} 個',
|
syncSuccess: '同步完成:建立 {{created}} 個,更新 {{updated}} 個',
|
||||||
syncError: '同步失敗:',
|
syncError: '同步失敗:',
|
||||||
@@ -266,11 +279,11 @@ const zhHant = {
|
|||||||
langbotModelsDescription: '由 LangBot Space 提供的雲端模型',
|
langbotModelsDescription: '由 LangBot Space 提供的雲端模型',
|
||||||
credits: '積分',
|
credits: '積分',
|
||||||
loginWithSpace: '使用 LangBot 帳號登入',
|
loginWithSpace: '使用 LangBot 帳號登入',
|
||||||
loginToUseModels: '使用 Space 登入以使用雲端模型',
|
loginToUseModels: '使用 LangBot 帳號登入以使用雲端模型',
|
||||||
noModels: '暫無模型',
|
noModels: '暫無模型',
|
||||||
langbotModels: 'LangBot 模型',
|
langbotModels: 'LangBot 模型',
|
||||||
spaceTrialTooltip:
|
spaceTrialTooltip:
|
||||||
'免費試用積分已就緒!使用 Space 登入即可零設定使用雲端模型。',
|
'免費試用積分已就緒!使用 LangBot 帳號登入即可零設定使用雲端模型。',
|
||||||
unlockModels: '登入以使用',
|
unlockModels: '登入以使用',
|
||||||
editProvider: '編輯供應商',
|
editProvider: '編輯供應商',
|
||||||
addProvider: '新增供應商',
|
addProvider: '新增供應商',
|
||||||
@@ -304,9 +317,9 @@ const zhHant = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
ownerMustBindSpace:
|
ownerMustBindSpace:
|
||||||
'The Workspace owner must connect Space for LangBot Models.',
|
'The Workspace owner must connect a LangBot Account for LangBot Models.',
|
||||||
usesOwnerSpaceBilling:
|
usesOwnerSpaceBilling:
|
||||||
"Uses the Workspace owner's Space billing and credits.",
|
"Uses the Workspace owner's LangBot Account billing and credits.",
|
||||||
},
|
},
|
||||||
bots: {
|
bots: {
|
||||||
title: '機器人',
|
title: '機器人',
|
||||||
@@ -1150,11 +1163,11 @@ const zhHant = {
|
|||||||
description: '這是您首次啟動 LangBot',
|
description: '這是您首次啟動 LangBot',
|
||||||
adminAccountNote: '您在此處初始化使用的帳號將作為管理員帳號',
|
adminAccountNote: '您在此處初始化使用的帳號將作為管理員帳號',
|
||||||
register: '註冊',
|
register: '註冊',
|
||||||
initWithSpace: '透過 Space 初始化',
|
initWithSpace: '透過 LangBot 帳號初始化',
|
||||||
spaceRecommended: '推薦:使用官方提供的穩定模型 API 和雲服務',
|
spaceRecommended: '推薦:使用官方提供的穩定模型 API 和雲服務',
|
||||||
spaceInfoTip1: 'Space 提供統一的帳戶鑑權服務,不會上傳您的任何敏感資訊。',
|
spaceInfoTip1: 'Space 提供統一的帳戶鑑權服務,不會上傳您的任何敏感資訊。',
|
||||||
spaceInfoTip2:
|
spaceInfoTip2:
|
||||||
'使用 Space 帳戶登入可使用 LangBot Models 等雲服務,您將會獲得一定的免費模型調用額度幫助您快速起步。',
|
'使用 LangBot 帳號登入可使用 LangBot Models 等雲服務,您將會獲得一定的免費模型調用額度幫助您快速起步。',
|
||||||
spaceInfoTip3:
|
spaceInfoTip3:
|
||||||
'登入方式不會影響其他功能,您在任何情況下都可以配置使用其他來源的模型。',
|
'登入方式不會影響其他功能,您在任何情況下都可以配置使用其他來源的模型。',
|
||||||
registerLocal: '註冊本地帳號',
|
registerLocal: '註冊本地帳號',
|
||||||
@@ -1208,29 +1221,29 @@ const zhHant = {
|
|||||||
passwordSet: '已設定',
|
passwordSet: '已設定',
|
||||||
passwordNotSet: '未設定',
|
passwordNotSet: '未設定',
|
||||||
passwordSetDescription: '您已設定本地密碼,可使用電子郵件密碼登入',
|
passwordSetDescription: '您已設定本地密碼,可使用電子郵件密碼登入',
|
||||||
spaceStatus: 'Space 帳戶',
|
spaceStatus: 'LangBot 帳號',
|
||||||
spaceBound: '已綁定',
|
spaceBound: '已綁定',
|
||||||
spaceNotBound: '未綁定',
|
spaceNotBound: '未綁定',
|
||||||
spaceBoundDescription: '已綁定 Space 帳戶,可使用官方模型 API 和雲服務',
|
spaceBoundDescription: '已綁定 LangBot 帳號,可使用官方模型 API 和雲服務',
|
||||||
bindSpace: '綁定 Space 帳戶',
|
bindSpace: '綁定 LangBot 帳號',
|
||||||
bindSpaceDescription: '綁定後可使用官方模型 API 和雲服務',
|
bindSpaceDescription: '綁定後可使用官方模型 API 和雲服務',
|
||||||
bindSpaceButton: '綁定',
|
bindSpaceButton: '綁定',
|
||||||
bindSpaceConfirmTitle: '確認綁定',
|
bindSpaceConfirmTitle: '確認綁定',
|
||||||
bindSpaceConfirmDescription: '您即將把本地實例綁定到 Space 帳戶',
|
bindSpaceConfirmDescription: '您即將把本地實例綁定到 LangBot 帳號',
|
||||||
bindSpaceWarning:
|
bindSpaceWarning:
|
||||||
'綁定後,您的登入電子郵件將從 {{localEmail}} 更改為 Space 帳戶的電子郵件。',
|
'綁定後,您的登入電子郵件將從 {{localEmail}} 更改為 LangBot 帳號的電子郵件。',
|
||||||
bindSpaceSuccess: 'Space 帳戶綁定成功',
|
bindSpaceSuccess: 'LangBot 帳號綁定成功',
|
||||||
bindSpaceFailed: '綁定 Space 帳戶失敗',
|
bindSpaceFailed: '綁定 LangBot 帳號失敗',
|
||||||
bindSpaceInvalidState: '無效的綁定請求,請從帳戶設定重新發起',
|
bindSpaceInvalidState: '無效的綁定請求,請從帳戶設定重新發起',
|
||||||
setPasswordHint: '設定密碼後可使用電子郵件密碼登入',
|
setPasswordHint: '設定密碼後可使用電子郵件密碼登入',
|
||||||
spaceEmailMismatch: 'Space登入帳號電子郵件與本實例帳號電子郵件不匹配',
|
spaceEmailMismatch: 'LangBot 帳號電子郵件與本實例帳號電子郵件不匹配',
|
||||||
|
|
||||||
space_account_not_registeredTitle: 'Account not registered',
|
space_account_not_registeredTitle: 'Account not registered',
|
||||||
space_account_not_registered:
|
space_account_not_registered:
|
||||||
'No local account is registered for this Space email. Ask the Workspace owner for an invitation.',
|
'No local account is registered for this LangBot Account email. Ask the Workspace owner for an invitation.',
|
||||||
space_account_binding_requiredTitle: 'Space connection required',
|
space_account_binding_requiredTitle: 'LangBot Account connection required',
|
||||||
space_account_binding_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: {
|
monitoring: {
|
||||||
title: '儀表盤',
|
title: '儀表盤',
|
||||||
@@ -1553,7 +1566,6 @@ const zhHant = {
|
|||||||
botCreateSuccess: '機器人建立成功!',
|
botCreateSuccess: '機器人建立成功!',
|
||||||
botSaveSuccess: '機器人配置已儲存並啟用!',
|
botSaveSuccess: '機器人配置已儲存並啟用!',
|
||||||
createError: '建立資源失敗',
|
createError: '建立資源失敗',
|
||||||
spaceAuthError: '無法發起 Space 授權',
|
|
||||||
skipSaveError: '儲存跳過狀態失敗,請重試。',
|
skipSaveError: '儲存跳過狀態失敗,請重試。',
|
||||||
completeSaveError: '儲存完成狀態失敗,請重試。',
|
completeSaveError: '儲存完成狀態失敗,請重試。',
|
||||||
step: {
|
step: {
|
||||||
@@ -1578,58 +1590,6 @@ const zhHant = {
|
|||||||
aiEngine: {
|
aiEngine: {
|
||||||
title: '選擇 AI 引擎',
|
title: '選擇 AI 引擎',
|
||||||
description: '選擇驅動機器人智慧的 AI 引擎。',
|
description: '選擇驅動機器人智慧的 AI 引擎。',
|
||||||
orchestrated: {
|
|
||||||
title: '使用編排好的 Agent 應用',
|
|
||||||
description: '使用 Dify、n8n、Coze 等平台編排好的 Agent 應用。',
|
|
||||||
action: '選擇 Agent 應用',
|
|
||||||
selectTitle: '選擇 Agent 應用',
|
|
||||||
selectDescription: '選擇你要使用的 Agent 應用平台。',
|
|
||||||
},
|
|
||||||
llm: {
|
|
||||||
title: '直接使用大模型',
|
|
||||||
description: '配置大模型供應商,直接使用大模型驅動機器人。',
|
|
||||||
action: '配置大模型',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
spaceBanner: {
|
|
||||||
message: '接入 LangBot Space,取得免費試用模型額度,零配置極速開箱!',
|
|
||||||
action: '前往授權登入',
|
|
||||||
},
|
|
||||||
provider: {
|
|
||||||
title: '新增模型供應商',
|
|
||||||
description: '新增你自己的模型供應商,配置 API Key 後即可使用。',
|
|
||||||
scanTitle: '掃描可用模型',
|
|
||||||
scanDescription: '正在從你的供應商中掃描可用的 LLM 模型。',
|
|
||||||
scanning: '正在掃描模型...',
|
|
||||||
noModelsFound: '未發現可用模型,請檢查供應商配置。',
|
|
||||||
addSelected: '新增選取的 {{count}} 個模型',
|
|
||||||
modelsAdded: '已新增 {{count}} 個模型',
|
|
||||||
modelsAddError: '新增模型失敗',
|
|
||||||
skipModelAdd: '跳過,稍後新增',
|
|
||||||
searchModels: '搜尋模型...',
|
|
||||||
noMatch: '沒有符合的模型',
|
|
||||||
orDivider: '或',
|
|
||||||
manualModelPlaceholder: '輸入模型名稱手動新增',
|
|
||||||
addManual: '新增',
|
|
||||||
saveAndNext: '儲存並下一步',
|
|
||||||
alreadyAdded: '已新增',
|
|
||||||
modelAlreadyExists: '模型「{{name}}」已存在',
|
|
||||||
},
|
|
||||||
modelSource: {
|
|
||||||
title: '選擇模型來源',
|
|
||||||
description: '選擇如何為你的 AI 引擎提供模型能力。',
|
|
||||||
space: {
|
|
||||||
title: 'LangBot 服務',
|
|
||||||
description:
|
|
||||||
'零配置即可使用,提供免費試用模型額度,開箱即用,無需自備 API Key。',
|
|
||||||
action: '使用 LangBot 服務',
|
|
||||||
},
|
|
||||||
custom: {
|
|
||||||
title: '自訂模型',
|
|
||||||
description:
|
|
||||||
'使用你自己的模型 API Key,支援 OpenAI、Claude、Gemini 等主流模型。',
|
|
||||||
action: '新增我自己的模型',
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
config: {
|
config: {
|
||||||
botInfo: '機器人資訊',
|
botInfo: '機器人資訊',
|
||||||
@@ -1705,6 +1665,9 @@ const zhHant = {
|
|||||||
scanQRCode: '請使用微信掃描以下 QR Code,授權後將自動登入並填寫令牌',
|
scanQRCode: '請使用微信掃描以下 QR Code,授權後將自動登入並填寫令牌',
|
||||||
loginSuccess: '登入成功!令牌已自動填入',
|
loginSuccess: '登入成功!令牌已自動填入',
|
||||||
loginFailed: '登入失敗',
|
loginFailed: '登入失敗',
|
||||||
|
connecting: '正在連接微信服務...',
|
||||||
|
waitingForScan: '等待掃碼中',
|
||||||
|
retry: '重試',
|
||||||
},
|
},
|
||||||
dingtalk: {
|
dingtalk: {
|
||||||
createApp: '一鍵建立釘釘應用',
|
createApp: '一鍵建立釘釘應用',
|
||||||
|
|||||||
@@ -69,7 +69,55 @@ test('loads a Cloud plugin page through the authenticated asset route', async ({
|
|||||||
await route.fulfill({
|
await route.fulfill({
|
||||||
status: 200,
|
status: 200,
|
||||||
contentType: 'text/html',
|
contentType: 'text/html',
|
||||||
body: '<!doctype html><html><body><h1>LangRAG Observability</h1></body></html>',
|
body: `<!doctype html>
|
||||||
|
<html>
|
||||||
|
<body>
|
||||||
|
<h1>LangRAG Observability</h1>
|
||||||
|
<button id="save">Save</button>
|
||||||
|
<script src="/api/v1/plugins/_sdk/page-sdk.js"></script>
|
||||||
|
<script>
|
||||||
|
document.querySelector('#save').addEventListener('click', async () => {
|
||||||
|
await window.langbot.api('/settings', { enabled: true }, 'POST');
|
||||||
|
document.body.dataset.saved = 'true';
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>`,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
);
|
||||||
|
let pageSdkRequests = 0;
|
||||||
|
await page.route('**/api/v1/plugins/_sdk/page-sdk.js', async (route) => {
|
||||||
|
pageSdkRequests += 1;
|
||||||
|
await route.fulfill({
|
||||||
|
status: 200,
|
||||||
|
contentType: 'application/javascript',
|
||||||
|
body: `window.langbot = {
|
||||||
|
api(endpoint, body, method) {
|
||||||
|
return new Promise((resolve) => {
|
||||||
|
const requestId = 'request-' + Date.now();
|
||||||
|
const handler = (event) => {
|
||||||
|
if (event.data?.type === 'langbot:api:response' && event.data.requestId === requestId) {
|
||||||
|
window.removeEventListener('message', handler);
|
||||||
|
resolve(event.data.data);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
window.addEventListener('message', handler);
|
||||||
|
window.parent.postMessage({ type: 'langbot:api', requestId, endpoint, body, method }, '*');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
};`,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
let pageApiRequests = 0;
|
||||||
|
await page.route(
|
||||||
|
'**/api/v1/plugins/langbot-team/LangRAG/page-api',
|
||||||
|
async (route) => {
|
||||||
|
pageApiRequests += 1;
|
||||||
|
await route.fulfill({
|
||||||
|
status: 200,
|
||||||
|
contentType: 'application/json',
|
||||||
|
body: wrapped({ saved: true }),
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
@@ -78,11 +126,17 @@ test('loads a Cloud plugin page through the authenticated asset route', async ({
|
|||||||
'/home/plugin-pages?id=langbot-team%2FLangRAG%2Fobservability',
|
'/home/plugin-pages?id=langbot-team%2FLangRAG%2Fobservability',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const pluginFrame = page.frameLocator('iframe');
|
||||||
await expect(
|
await expect(
|
||||||
page
|
pluginFrame.getByRole('heading', { name: 'LangRAG Observability' }),
|
||||||
.frameLocator('iframe')
|
|
||||||
.getByRole('heading', { name: 'LangRAG Observability' }),
|
|
||||||
).toBeVisible();
|
).toBeVisible();
|
||||||
|
await pluginFrame.getByRole('button', { name: 'Save' }).click();
|
||||||
|
await expect(pluginFrame.locator('body')).toHaveAttribute(
|
||||||
|
'data-saved',
|
||||||
|
'true',
|
||||||
|
);
|
||||||
expect(authenticatedAssetRequests).toBeGreaterThan(0);
|
expect(authenticatedAssetRequests).toBeGreaterThan(0);
|
||||||
|
expect(pageSdkRequests).toBe(1);
|
||||||
|
expect(pageApiRequests).toBe(1);
|
||||||
await expect(page.getByText('Loading...')).toHaveCount(0);
|
await expect(page.getByText('Loading...')).toHaveCount(0);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -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}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
@@ -11,12 +11,6 @@ export default defineConfig({
|
|||||||
},
|
},
|
||||||
server: {
|
server: {
|
||||||
port: 3000,
|
port: 3000,
|
||||||
proxy: {
|
|
||||||
'/api': {
|
|
||||||
target: 'http://127.0.0.1:5300',
|
|
||||||
changeOrigin: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
build: {
|
build: {
|
||||||
outDir: 'dist',
|
outDir: 'dist',
|
||||||
|
|||||||
Reference in New Issue
Block a user