diff --git a/.cursor/skills/publish/SKILL.md b/.cursor/skills/publish/SKILL.md
index ab79f9511f..0bd6c53d0e 100644
--- a/.cursor/skills/publish/SKILL.md
+++ b/.cursor/skills/publish/SKILL.md
@@ -199,18 +199,7 @@ git checkout -B {RELEASE_BRANCH_PREFIX}{version} {REMOTE}/{INTEGRATION_BRANCH}
grep -n '__version__' src/octop/__init__.py
# `__version__ = "X.Y.Z"` → `"A.B.C"`
```
-4. 飞牛 FnOS 两个 manifest 的 `version=`(仓库源文件与 pyproject 保持同一 PEP 440 字符串。`scripts/build-fpk.sh` 打包时会改写成商店可比版本,例如 `1.0.2b8` → `1.0.208`,不要把源文件改成这个编码):
- ```bash
- grep -n '^version=' fnos/docker/manifest fnos/native/manifest
- # `version=X.Y.Z` → `version=A.B.C`(两个文件都要改,仍是 PEP 440)
- ```
-5. 飞牛 Docker compose 镜像标签(与本包版本相同,供 FPK 拉取 GHCR):
- ```bash
- grep -n 'ghcr.io/tencentcloud/octop:' fnos/docker/app/docker/docker-compose.yaml
- # `ghcr.io/tencentcloud/octop:X.Y.Z` → `:A.B.C`
- # 不得改成 `:latest`(测试禁止 latest)
- ```
-6. `uv.lock` 里可编辑包 `octop` 的版本(漏改会导致 lock 与 pyproject 不一致):
+4. `uv.lock` 里可编辑包 `octop` 的版本(漏改会导致 lock 与 pyproject 不一致):
```bash
grep -n -A2 'name = "octop"' uv.lock | head -5
# 将该包的 `version = "X.Y.Z"` 改为 `"A.B.C"`
@@ -232,6 +221,8 @@ git grep -n --fixed-strings "X.Y.Z"
| `CHANGELOG.md` 已发布章节(`## [X.Y.Z]` 及正文) | **保留**,不要改历史 |
| 测试夹具里拿旧号做比较(如 `1.0.2b4` vs `1.0.2b5`、解析示例) | **保留** |
| workflow / 注释里的示例旧号(如 `0.9.28`) | **保留**(不是当前钉死) |
+| `fnos/README.md` 版本号映射里的示例 | **保留** |
+| `fnos/docker/manifest`、`fnos/native/manifest` 的 `version`,以及 `fnos/docker/app/docker/docker-compose.yaml` 的 `image` | **保留**占位 `0.0.0`。`scripts/build-fpk.sh` 从 `pyproject.toml` 写入商店版本和镜像标签 |
提交前再扫必改清单,必须已经没有旧号:
@@ -239,8 +230,6 @@ git grep -n --fixed-strings "X.Y.Z"
git grep -n --fixed-strings "X.Y.Z" -- \
pyproject.toml src/octop/__init__.py \
README.md README_CN.md \
- fnos/docker/manifest fnos/native/manifest \
- fnos/docker/app/docker/docker-compose.yaml \
uv.lock
```
@@ -366,6 +355,6 @@ git checkout {original_branch}
- 发版后删除 `release/*`;`main → develop` 由 `sync-main-to-develop.yml` 自动同步(失败时再手动补)
- 中止前展示完整错误输出
- 插入新版本条目后保持 `[Unreleased]` 为空
-- 把旧版本号 `X.Y.Z` 换成 `A.B.C`:`pyproject.toml`、`__version__`、多语言 README 徽标、`fnos/*/manifest`、`fnos/docker/app/docker/docker-compose.yaml` 镜像标签、`uv.lock` 的 octop 包版本;提交前 `git grep` 必改清单确认无旧号
+- 把旧版本号 `X.Y.Z` 换成 `A.B.C`:`pyproject.toml`、`__version__`、多语言 README 徽标、`uv.lock` 的 octop 包版本;提交前 `git grep` 必改清单确认无旧号。`fnos/docker/manifest`、`fnos/native/manifest` 的 `version` 和 `fnos/docker/app/docker/docker-compose.yaml` 的 `image` 保持占位 `0.0.0`,不要改
- 勿改 CHANGELOG 历史章节、测试夹具里的旧版本比较、workflow 示例号
- 推送 tag 后提示用户关注 GitHub Actions 的发布结果
diff --git a/.dockerignore b/.dockerignore
index 6b6bdd5d21..348b5ae9f8 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -40,6 +40,9 @@ node_modules
.env.*
!.env.example
+# Marketplace catalog is not part of the runtime image.
+marketplace
+
# Misc
.DS_Store
*.log
diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml
index 755c89f6b6..f2637eb152 100644
--- a/.github/workflows/docker-publish.yml
+++ b/.github/workflows/docker-publish.yml
@@ -6,7 +6,8 @@ name: Docker Publish
#
# 架构:ubuntu-latest 打 linux/amd64,ubuntu-24.04-arm 打 linux/arm64。
# 每个架构先在本机启动镜像并跑 live 启动测试,通过后才推送该架构 tag,
-# 再合并为 :{version} / :latest 多架构清单。飞牛 Docker 版 FPK 共用一份,
+# 再合并为 :{version} / :latest 多架构清单。精简版同样打 :{version}-lite / :lite,
+# 不含桌面、本地向量和 OCR。飞牛 Docker 版 FPK 各用一个标签,
# NAS 按本机架构拉取对应镜像层。某一架构启动失败(例如 ARM 上 Illegal
# instruction / 退出码 132)只丢掉该架构,不挡住另一架构和后续 FPK。
#
@@ -25,6 +26,7 @@ name: Docker Publish
# 拉取示例:
# docker pull ghcr.io/tencentcloud/octop:latest
# docker pull ghcr.io/tencentcloud/octop:0.9.28
+# docker pull ghcr.io/tencentcloud/octop:0.9.28-lite
on:
push:
tags:
@@ -81,7 +83,7 @@ jobs:
echo "ghcr=ghcr.io/$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_OUTPUT"
build:
- name: Build ${{ matrix.arch }}
+ name: Build ${{ matrix.arch }} ${{ matrix.variant }}
needs: prepare
runs-on: ${{ matrix.runner }}
env:
@@ -93,9 +95,19 @@ jobs:
- runner: ubuntu-latest
platform: linux/amd64
arch: amd64
+ variant: full
+ - runner: ubuntu-latest
+ platform: linux/amd64
+ arch: amd64
+ variant: lite
+ - runner: ubuntu-24.04-arm
+ platform: linux/arm64
+ arch: arm64
+ variant: full
- runner: ubuntu-24.04-arm
platform: linux/arm64
arch: arm64
+ variant: lite
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -127,9 +139,9 @@ jobs:
images: |
${{ env.DOCKERHUB_USER != '' && format('{0}/octop', env.DOCKERHUB_USER) || '' }}
${{ needs.prepare.outputs.ghcr }}
- # 单架构中间 tag;:{version} / :latest 由 merge 合成多架构清单
+ # 单架构中间 tag。full → :{version}-{arch};lite → :{version}-lite-{arch}。
tags: |
- type=raw,value=${{ needs.prepare.outputs.version }}-${{ matrix.arch }}
+ type=raw,value=${{ needs.prepare.outputs.version }}${{ matrix.variant == 'lite' && '-lite' || '' }}-${{ matrix.arch }}
# load 与 registry 导出不能同时开。先载入本机做启动测试,通过后再 docker push。
# docker 导出不支持 provenance,这里关掉,避免 --load 失败。
@@ -143,20 +155,28 @@ jobs:
provenance: false
sbom: false
platforms: ${{ matrix.platform }}
+ build-args: |
+ OCTOP_IMAGE_VARIANT=${{ matrix.variant }}
tags: |
- octop:ci
+ octop:ci-${{ matrix.variant }}
${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- cache-from: type=gha,scope=docker-${{ matrix.arch }}
- cache-to: type=gha,mode=max,scope=docker-${{ matrix.arch }}
+ cache-from: type=gha,scope=docker-${{ matrix.variant }}-${{ matrix.arch }}
+ cache-to: type=gha,mode=max,scope=docker-${{ matrix.variant }}-${{ matrix.arch }}
- uses: astral-sh/setup-uv@v4
with:
python-version: "3.12"
+ - name: Report image size
+ run: |
+ docker image inspect "octop:ci-${{ matrix.variant }}" \
+ --format '::notice::${{ matrix.variant }} ${{ matrix.arch }} {{.Size}} bytes'
+
- name: Boot-test image before publish
env:
- OCTOP_TEST_IMAGE: octop:ci
+ OCTOP_TEST_IMAGE: octop:ci-${{ matrix.variant }}
+ OCTOP_IMAGE_VARIANT: ${{ matrix.variant }}
run: |
set -euo pipefail
uv venv /tmp/octop-docker-test
@@ -210,31 +230,43 @@ jobs:
HUB: ${{ env.DOCKERHUB_USER != '' && format('{0}/octop', env.DOCKERHUB_USER) || '' }}
run: |
set -euo pipefail
- any_multi=0
- for REG in "$GHCR" "$HUB"; do
- [ -n "$REG" ] || continue
- sources=()
- for arch in amd64 arm64; do
- if docker buildx imagetools inspect "${REG}:${VER}-${arch}" >/dev/null 2>&1; then
- sources+=("${REG}:${VER}-${arch}")
- else
- echo "::warning::missing ${REG}:${VER}-${arch}"
+ publish_variant() {
+ local mid="$1" tag_a="$2" tag_b="$3" required="$4"
+ local reg arch ref
+ for reg in "$GHCR" "$HUB"; do
+ [ -n "$reg" ] || continue
+ local -a sources=()
+ for arch in amd64 arm64; do
+ ref="${reg}:${VER}${mid}-${arch}"
+ if docker buildx imagetools inspect "$ref" >/dev/null 2>&1; then
+ sources+=("$ref")
+ else
+ echo "::warning::missing ${ref}"
+ fi
+ done
+ if [ "${#sources[@]}" -eq 0 ]; then
+ if [ "$required" = "yes" ]; then
+ echo "::error::No platform images published for ${reg}:${tag_a}"
+ exit 1
+ fi
+ echo "::warning::skip ${reg}:${tag_a} (no platform images)"
+ continue
+ fi
+ if [ "${#sources[@]}" -lt 2 ]; then
+ echo "::warning:::${tag_a} is not multi-arch. A package on the missing CPU will not run."
+ # 精简版对外是一份 x86/ARM 通用标签。缺任一架构就不要发,避免装上后拉取失败。
+ if [ "$required" != "yes" ]; then
+ echo "::warning::skip ${reg}:${tag_a} until both amd64 and arm64 exist"
+ continue
+ fi
fi
+ docker buildx imagetools create \
+ -t "${reg}:${tag_a}" \
+ -t "${reg}:${tag_b}" \
+ "${sources[@]}"
+ echo "=== ${reg}:${tag_a} ==="
+ docker buildx imagetools inspect "${reg}:${tag_a}"
done
- if [ "${#sources[@]}" -eq 0 ]; then
- echo "::error::No platform images published for ${REG}:${VER}"
- exit 1
- fi
- if [ "${#sources[@]}" -ge 2 ]; then
- any_multi=1
- fi
- docker buildx imagetools create \
- -t "${REG}:${VER}" \
- -t "${REG}:latest" \
- "${sources[@]}"
- echo "=== ${REG}:${VER} ==="
- docker buildx imagetools inspect "${REG}:${VER}"
- done
- if [ "$any_multi" -eq 0 ]; then
- echo "::warning:::${VER} is not multi-arch (ARM image missing). Docker FPK on ARM NAS will not run."
- fi
+ }
+ publish_variant "" "$VER" latest yes
+ publish_variant "-lite" "${VER}-lite" lite no
diff --git a/.github/workflows/fnos-build-fpk.yml b/.github/workflows/fnos-build-fpk.yml
index da2495e320..5e0dc241fc 100644
--- a/.github/workflows/fnos-build-fpk.yml
+++ b/.github/workflows/fnos-build-fpk.yml
@@ -12,11 +12,11 @@ name: Build Octop FPK
# - Native wheel:优先从同版本 GitHub Release(v*)下载;
# 缺失时再回退到本仓源码构建
# - fnpack:fpk / native 用 Actions cache 复用 .verify/fnpack(key 含 FNPACK_VERSION)
-# - 产物挂到同一个 v* GitHub Release(与 wheel / 桌面包并列),不再单独打 fnos-* tag
+# - 产物挂到同一个 v* GitHub Release(与 wheel / 桌面包并列),再上传到 COS
#
# Jobs:
# version → ensure-image → fpk(Docker 版 .fpk,仅打包 compose;镜像已是 amd64+arm64)
-# ↘ native(x86_64 本地版 .fpk)
+# ↘ native(amd64 本地版 Octop-fnos-native-amd64-*.fpk)
# ↘ native-arm64(ubuntu-24.04-arm 装 aarch64 site-packages)
# → native-arm64-pack(amd64 上用 fnpack 打 Octop-fnos-native-arm64-*.fpk)
# → release(把 .fpk 挂到已有的 v* GitHub Release)
@@ -77,6 +77,8 @@ jobs:
ensure-image:
needs: version
runs-on: ubuntu-latest
+ outputs:
+ lite: ${{ steps.wait.outputs.lite }}
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
@@ -89,24 +91,46 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
- name: Wait for GHCR image from docker-publish
+ id: wait
env:
IMAGE: ${{ needs.version.outputs.image }}
VER: ${{ needs.version.outputs.version }}
run: |
set -euo pipefail
- TAG="${IMAGE}:${VER}"
- echo "Waiting for ${TAG} (published by docker-publish)..."
- # 多架构清单要等 amd64 + arm64 都推完再 merge,比单架构更久。
+ full="${IMAGE}:${VER}"
+ lite="${IMAGE}:${VER}-lite"
+ echo "Waiting for ${full}. ${lite} is optional and must already be multi-arch."
+ # 完整版清单要等两个架构 merge。精简版在完整版出现后再等几轮;缺了就只打完整包。
+ lite_wait=0
for i in $(seq 1 120); do
- if docker buildx imagetools inspect "$TAG" >/dev/null 2>&1; then
- echo "Image ready: $TAG"
- docker buildx imagetools inspect "$TAG" | head -40
+ full_ok=0
+ lite_ok=0
+ if docker buildx imagetools inspect "$full" >/dev/null 2>&1; then
+ full_ok=1
+ fi
+ if docker buildx imagetools inspect "$lite" >/dev/null 2>&1; then
+ lite_ok=1
+ fi
+ if [ "$full_ok" -eq 1 ] && [ "$lite_ok" -eq 1 ]; then
+ echo "lite=true" >> "$GITHUB_OUTPUT"
+ echo "Images ready: ${full} and ${lite}"
+ docker buildx imagetools inspect "$full" | head -20
+ docker buildx imagetools inspect "$lite" | head -20
exit 0
fi
- echo "[$i/120] not ready yet..."
+ if [ "$full_ok" -eq 1 ]; then
+ lite_wait=$((lite_wait + 1))
+ if [ "$lite_wait" -ge 6 ]; then
+ echo "lite=false" >> "$GITHUB_OUTPUT"
+ echo "::warning::${lite} was not published. The full FnOS package will still be built."
+ docker buildx imagetools inspect "$full" | head -20
+ exit 0
+ fi
+ fi
+ echo "[$i/120] full=${full_ok} lite=${lite_ok}"
sleep 20
done
- echo "::error::Timed out waiting for ${TAG}. Ensure Docker Publish finished for v${VER}."
+ echo "::error::Timed out waiting for ${full}. Ensure Docker Publish finished for v${VER}."
exit 1
fpk:
@@ -124,10 +148,17 @@ jobs:
path: .verify/fnpack
key: fnpack-${{ env.FNPACK_VERSION }}-linux-amd64
- - name: Build Docker FPK
+ - name: Build Docker FPKs
env:
FPK_NAME_PREFIX: Octop-fnos
- run: bash scripts/build-fpk.sh docker
+ LITE: ${{ needs.ensure-image.outputs.lite }}
+ run: |
+ bash scripts/build-fpk.sh docker
+ if [ "$LITE" = "true" ]; then
+ bash scripts/build-fpk.sh docker-lite
+ else
+ echo "::warning::Skipping the lite FnOS package because its image tag was not published."
+ fi
- name: Upload docker fpk artifact
uses: actions/upload-artifact@v4
@@ -241,17 +272,18 @@ jobs:
id: build_native
env:
FPK_NAME_PREFIX: Octop-fnos
+ FPK_ARCH: amd64
run: bash scripts/build-fpk.sh native
- name: Show native fpk size
- run: ls -lh dist/Octop-fnos-native-[0-9]*.fpk
+ run: ls -lh dist/Octop-fnos-native-amd64-*.fpk
- name: Upload native fpk artifact
id: upload_native
uses: actions/upload-artifact@v4
with:
name: native-fpk
- path: dist/Octop-fnos-native-[0-9]*.fpk
+ path: dist/Octop-fnos-native-amd64-*.fpk
if-no-files-found: error
- name: Upload native install log (for debugging)
@@ -420,7 +452,7 @@ jobs:
if-no-files-found: error
release:
- # native / native-arm64 失败时仍运行,把已经打好的 .fpk 挂到 Release。
+ # 任一架构没打出来时仍运行,把已经打好的 .fpk 挂到 Release。
if: always()
needs: [fpk, native, native-arm64-pack, version]
runs-on: ubuntu-latest
@@ -430,12 +462,12 @@ jobs:
fetch-depth: 0
fetch-tags: true
- - name: Download docker fpk artifact (required)
+ - name: Download docker fpk artifact (best-effort)
+ continue-on-error: true
uses: actions/download-artifact@v4
with:
name: docker-fpk
path: artifacts/docker-fpk
- if-no-files-found: error
- name: Download native fpk artifact (best-effort)
continue-on-error: true
@@ -486,6 +518,17 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ - name: Drop download links for packages that were not published
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ TAG: ${{ needs.version.outputs.tag }}
+ VER: ${{ needs.version.outputs.version }}
+ run: |
+ set -euo pipefail
+ gh release view "$TAG" --repo "${{ github.repository }}" --json body,assets > /tmp/rel.json
+ python3 scripts/release_download_links.py "$VER" --sync-notes /tmp/rel.json > /tmp/notes.md
+ gh release edit "$TAG" --repo "${{ github.repository }}" --notes-file /tmp/notes.md
+
upload-cos:
name: Upload FPK to COS
needs: [release, version]
diff --git a/.gitignore b/.gitignore
index ad02e54c62..9918065cd4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -77,8 +77,8 @@ src/octop/dashboard/assets/*
!src/octop/dashboard/.gitkeep
# Ship Meituan pt-passport runtime; override global node_modules/ ignore.
-!src/octop/infra/agents/experts/library/meituan-living-assistant/skills/meituan-deals/scripts/node_modules/
-!src/octop/infra/agents/experts/library/meituan-living-assistant/skills/meituan-deals/scripts/node_modules/**
+!marketplace/experts/meituan-living-assistant/skills/meituan-deals/scripts/node_modules/
+!marketplace/experts/meituan-living-assistant/skills/meituan-deals/scripts/node_modules/**
# Local databases
*.sqlite
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b9def97ffe..39332b7edd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,24 @@
## [Unreleased]
+## [1.0.3b3] - 2026-11-04
+
+### 新增
+- PostgreSQL 可存放技能包和知识库。多实例共用定时任务、频道、头像、插件和已发布专家
+- Docker 与飞牛增加精简版。存储后端增加火山引擎 TOS
+- 可预建 LDAP 账号,聊天列表可隐藏任意专家
+
+### 修复
+- 专家工作区落到允许的存储根下。共享连接器只有创建者能改
+- 聊天历史不再错序,未答完的提问不会被别的会话接走
+- 超长图片先缩小再发送。失效的默认模型会自动换掉
+- 升级记忆库:长会话分批提炼,重启后不重跑
+- 安装清理不再删掉运行环境。PostgreSQL 上的知识库检索和关怀去重恢复正常
+
+### 变更
+- 升级 octop-harness 至 1.0.7
+- 内置专家并入专家市场,安装包不再自带市场目录
+
## [1.0.3b2] - 2026-11-01
### 新增
@@ -17,6 +35,7 @@
- 极简模式里,专家会话超过 10 条可以继续展开。长代码在气泡里换行,已结束的一轮不会在历史加载后再出现一次
- 停用的会话模型回到 Auto。钉钉和微信切换时,草稿与二维码不再串台,登录回调会保留转发端口
- 更早回合生成的文件不会再次发出。对话轨迹记下模型实际收到的系统提示
+- PostgreSQL 控制面下,`ProactiveCareService` 写推送去重记录不再报 `'Connection' object has no attribute 'executemany'`:`_PgConnectionProxy` 补上 SQLite 风格的 `executemany`(经 psycopg 游标执行并转换 `?` 占位符),`care_push_records` 恢复为空 → 正常写入,30 天去重生效
### 变更
- 通行密钥登录默认关闭,要在应用设置里打开。修改密码放在「账户安全」里
@@ -160,6 +179,8 @@
- octop-harness 升到 1.0.1;飞牛安装改为建账号向导
### 修复
+- 修复远程 Embedding 服务返回乱序结果时向量与文本错位的问题
+- httpx 0.28 将 ``NO_PROXY`` 中的 CIDR(如 ``192.168.0.0/16``)当成精确 IP,内网地址误走代理;同时兼容 Windows 分号分隔、IPv6 CIDR,以及 macOS/Windows 系统代理下的 loopback 直连(Fixes #1347)。
- 会话「放通所有 / 放通这些工具」后后续 execute 仍弹审批
- 误报流式失败、提问卡不弹出、TLS 下内部 MCP、过长工具名
- 远程存储卡住堵住启动;S3 / Postgres 浏览;桌面 beta 覆盖安装;飞牛 8089 残留
diff --git a/README.md b/README.md
index 6084349ff7..6c35a4c43f 100644
--- a/README.md
+++ b/README.md
@@ -15,7 +15,7 @@
-
+
@@ -189,19 +189,19 @@ This roadmap may shift as the community grows; treat it as indicative only.
**macOS / Linux** — one-line installer (recommended):
```bash
-curl -fsSL https://finnie-1258344699.cos.ap-guangzhou.myqcloud.com/octop/install.sh | bash
+curl -fsSL https://download.octop.cloud/octop/scripts/install.sh | bash
```
**Windows (PowerShell)**:
```powershell
-irm https://finnie-1258344699.cos.ap-guangzhou.myqcloud.com/octop/install.ps1 | iex
+irm https://download.octop.cloud/octop/scripts/install.ps1 | iex
```
**Windows (cmd)** — download and run, or from a cloned repo:
```bat
-curl -fsSL https://finnie-1258344699.cos.ap-guangzhou.myqcloud.com/octop/install.bat -o install.bat
+curl -fsSL https://download.octop.cloud/octop/scripts/install.bat -o install.bat
install.bat
```
@@ -217,7 +217,7 @@ The installer places `octop` on your PATH via `~/.octop/bin`. Optional extras:
```bash
# Download Playwright Chromium for browser automation (skipped if a system Chrome/Chromium is already present)
-curl -fsSL https://finnie-1258344699.cos.ap-guangzhou.myqcloud.com/octop/install.sh | bash -s -- --extras browser
+curl -fsSL https://download.octop.cloud/octop/scripts/install.sh | bash -s -- --extras browser
```
See [scripts/README.md](scripts/README.md) for all install options (`--version`, `--from-source`, `--mirror`, Windows flags).
@@ -229,7 +229,7 @@ See [scripts/README.md](scripts/README.md) for all install options (`--version`,
| Windows | `Octop-desktop-windows-amd64-.exe` (64-bit) / `Octop-desktop-windows-arm64-.exe` (ARM64) — NSIS installer |
| macOS | `Octop-desktop-darwin-arm64-.dmg` (Apple Silicon) / `Octop-desktop-darwin-amd64-.dmg` (Intel) |
| Linux | `Octop-desktop-linux-amd64-.tar.gz` / `Octop-desktop-linux-arm64-.tar.gz` |
-| FnOS NAS | `Octop-fnos-docker-.fpk` (recommended on ARM; amd64/arm64 image) / `Octop-fnos-native-.fpk` (x86_64, no Docker) / `Octop-fnos-native-arm64-.fpk` (ARM64 fallback if no Docker) — install via App Center |
+| FnOS NAS | `Octop-fnos-docker-lite-.fpk` (smaller image) / `Octop-fnos-docker-.fpk` (full: desktop, OCR, local models) / `Octop-fnos-native-amd64-.fpk` (x86_64, no Docker) / `Octop-fnos-native-arm64-.fpk` (ARM64 fallback if no Docker) — install via App Center |
See [desktop/README.md](desktop/README.md) for the desktop shell and [fnos/README.md](fnos/README.md) for the FnOS packaging guide.
@@ -480,7 +480,7 @@ Interactive API docs: **http://127.0.0.1:8088/api/docs** (disabled by default
The control plane can also use PostgreSQL — set `database` in `config.json`, or `OCTOP_DATABASE_*` / the first-run wizard. With PostgreSQL, agent memory reuses the same DSN by default (per-agent schema); to keep file-based memory, set `"memory": { "backend": { "type": "sqlite" } }` in the agent config. See [docs/configuration.md](docs/configuration.md) and [docs/adr/002-database-backends.md](docs/adr/002-database-backends.md).
-See [docs/configuration.md](docs/configuration.md) for env vars and `config.json`.
+See [docs/configuration.md](docs/configuration.md) for env vars and `config.json`. Hosts that cannot reach the public catalog can run a private plugin and expert market; the HTTP contract is in [docs/private-market.md](docs/private-market.md). A private SkillHub-compatible skill market is [docs/skill-market.md](docs/skill-market.md) (`SKILL_MARKET_ORIGIN`).
## 🏗️ Architecture
@@ -576,6 +576,14 @@ See [CHANGELOG.md](CHANGELOG.md) for release history.
- **Discord** — join the English-speaking community: [discord.gg/QnWdhJxq9h](https://discord.gg/QnWdhJxq9h)
+### WeChat
+
+Search for **腾讯Octop** in WeChat, or scan:
+
+
+
+
+
### WeCom Customer Group (CN)
For the customer WeCom support group, scan:
diff --git a/README_CN.md b/README_CN.md
index 2efab17b53..fb613b8e40 100644
--- a/README_CN.md
+++ b/README_CN.md
@@ -15,7 +15,7 @@
-
+
@@ -191,19 +191,19 @@ Octop 支持两个方向的 ACP 集成:
**macOS / Linux** — 一键安装(推荐):
```bash
-curl -fsSL https://finnie-1258344699.cos.ap-guangzhou.myqcloud.com/octop/install.sh | bash
+curl -fsSL https://download.octop.cloud/octop/scripts/install.sh | bash
```
**Windows(PowerShell)**:
```powershell
-irm https://finnie-1258344699.cos.ap-guangzhou.myqcloud.com/octop/install.ps1 | iex
+irm https://download.octop.cloud/octop/scripts/install.ps1 | iex
```
**Windows(cmd)** — 下载后运行,或从已克隆的仓库执行:
```bat
-curl -fsSL https://finnie-1258344699.cos.ap-guangzhou.myqcloud.com/octop/install.bat -o install.bat
+curl -fsSL https://download.octop.cloud/octop/scripts/install.bat -o install.bat
install.bat
```
@@ -219,7 +219,7 @@ source ~/.bashrc # Bash
```bash
# 下载 Playwright Chromium 用于浏览器自动化(若系统已有 Chrome / Chromium 则会跳过)
-curl -fsSL https://finnie-1258344699.cos.ap-guangzhou.myqcloud.com/octop/install.sh | bash -s -- --extras browser
+curl -fsSL https://download.octop.cloud/octop/scripts/install.sh | bash -s -- --extras browser
```
完整安装选项见 [scripts/README.md](scripts/README.md)(`--version`、`--from-source`、`--mirror` 及 Windows 参数)。
@@ -231,7 +231,7 @@ curl -fsSL https://finnie-1258344699.cos.ap-guangzhou.myqcloud.com/octop/install
| Windows | `Octop-desktop-windows-amd64-.exe`(64 位)/ `Octop-desktop-windows-arm64-.exe`(ARM64)— NSIS 安装程序 |
| macOS | `Octop-desktop-darwin-arm64-.dmg`(Apple 芯片)/ `Octop-desktop-darwin-amd64-.dmg`(Intel) |
| Linux | `Octop-desktop-linux-amd64-.tar.gz` / `Octop-desktop-linux-arm64-.tar.gz` |
-| 飞牛 NAS(FnOS) | `Octop-fnos-docker-.fpk`(推荐,尤其是 ARM;amd64/arm64 镜像)/ `Octop-fnos-native-.fpk`(x86_64,无需 Docker)/ `Octop-fnos-native-arm64-.fpk`(ARM64,无 Docker 时再用)— 通过应用中心安装 |
+| 飞牛 NAS(FnOS) | `Octop-fnos-docker-lite-.fpk`(精简镜像)/ `Octop-fnos-docker-.fpk`(完整版:桌面、OCR、本地向量)/ `Octop-fnos-native-amd64-.fpk`(x86_64,无需 Docker)/ `Octop-fnos-native-arm64-.fpk`(ARM64,无 Docker 时再用)— 通过应用中心安装 |
桌面客户端说明见 [desktop/README.md](desktop/README.md),飞牛打包指南见 [fnos/README.md](fnos/README.md)。
@@ -336,7 +336,7 @@ docker run -d \
- [参与贡献](#-参与贡献)
- [更新日志](#-更新日志)
- [相关项目](#-相关项目)
- - [客户企业微信群](#-客户企业微信群)
+ - [社区](#-社区)
- [许可证](#-许可证)
## 📦 安装方式
@@ -477,7 +477,7 @@ OpenAI 兼容 API、DashScope(千问)、Ollama 等预设 — 在控制台或
控制面也可改用 PostgreSQL(`config.json` → `database`,或 `OCTOP_DATABASE_*` / 首次设置向导)。控制面为 PostgreSQL 时,Agent 记忆**默认复用同一 DSN**(per-agent schema);若需继续用文件记忆,在 agent 配置里设 `"memory": { "backend": { "type": "sqlite" } }`。详见 [docs/configuration.md](docs/configuration.md) 与 [docs/adr/002-database-backends.md](docs/adr/002-database-backends.md)。
-环境变量与 `config.json` 详见 [docs/configuration.md](docs/configuration.md)。
+环境变量与 `config.json` 详见 [docs/configuration.md](docs/configuration.md)。访问不了公网时,可按 [docs/private-market.md](docs/private-market.md) 在内网自建插件市场和专家市场,按 [docs/skill-market.md](docs/skill-market.md) 自建技能市场(`SKILL_MARKET_ORIGIN`)。
## 🏗️ 架构
@@ -569,7 +569,17 @@ cd dashboard && npx tsc -b
| [Octop Memory](https://github.com/TencentCloud/octop-memory) | 层级召回与全文搜索 |
| [Octop Browser](https://github.com/TencentCloud/octop-browser) | CDP 浏览器自动化,支持 profile 持久登录 |
-## 💬 客户企业微信群
+## 💬 社区
+
+### 微信
+
+微信搜一搜「腾讯Octop」,或扫码:
+
+
+
+
+
+### 客户企业微信群
如需加入客户企业微信服务群,请扫码:
diff --git a/dashboard/package-lock.json b/dashboard/package-lock.json
index 062289c82c..5e9b3167ee 100644
--- a/dashboard/package-lock.json
+++ b/dashboard/package-lock.json
@@ -18,11 +18,14 @@
"antd": "^5.29.1",
"antd-style": "^3.7.1",
"build": "^0.1.4",
+ "classnames": "^2.5.1",
"docx-preview": "^0.3.2",
"i18next": "^25.8.4",
"jszip": "^3.10.1",
"lucide-react": "^0.562.0",
"mermaid": "^11.13.0",
+ "monaco-editor": "0.57.0",
+ "motion": "^14.9.0",
"qrcode.react": "^4.2.0",
"react": "^18",
"react-dom": "^18",
@@ -6724,9 +6727,9 @@
"peer": true
},
"node_modules/dompurify": {
- "version": "3.4.7",
- "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.7.tgz",
- "integrity": "sha512-2jBxDJY4RR06tQNy4w5FlFH7kfxsQZlufd0sbv+chfHCxeJwrFw2baUDsSwvBISD4K4RDbd0PTfy3uNXsR6siA==",
+ "version": "3.4.15",
+ "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.15.tgz",
+ "integrity": "sha512-EUBjM+B+lkDE41iE82DDSCfkoPGfXx8IxFxPMjNzm/Uk4xDet77rTN9wqlxlVg71kK7XGuUMv6wUxJUwwv+Xyw==",
"license": "(MPL-2.0 OR Apache-2.0)",
"optionalDependencies": {
"@types/trusted-types": "^2.0.7"
@@ -7499,6 +7502,33 @@
"node": ">=0.8"
}
},
+ "node_modules/framer-motion": {
+ "version": "14.9.0",
+ "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-14.9.0.tgz",
+ "integrity": "sha512-g1hZu8WoTwgsoVAaqEEcefhvR03cKGtkmrKaRrWpXhnM3LGR8jl1u2qyJ1PMVlO7LKQHE8TTRQYUlMmnrY4L+g==",
+ "license": "MIT",
+ "dependencies": {
+ "motion-dom": "14.9.0",
+ "motion-utils": "14.7.0",
+ "tslib": "^2.4.0"
+ },
+ "peerDependencies": {
+ "react": "^18.0.0 || ^19.0.0",
+ "react-dom": "^18.0.0 || ^19.0.0",
+ "remix": "^3.1.0"
+ },
+ "peerDependenciesMeta": {
+ "react": {
+ "optional": true
+ },
+ "react-dom": {
+ "optional": true
+ },
+ "remix": {
+ "optional": true
+ }
+ }
+ },
"node_modules/fs-extra": {
"version": "9.1.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz",
@@ -10569,31 +10599,19 @@
}
},
"node_modules/monaco-editor": {
- "version": "0.55.1",
- "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.55.1.tgz",
- "integrity": "sha512-jz4x+TJNFHwHtwuV9vA9rMujcZRb0CEilTEwG2rRSpe/A7Jdkuj8xPKttCgOh+v/lkHy7HsZ64oj+q3xoAFl9A==",
+ "version": "0.57.0",
+ "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.57.0.tgz",
+ "integrity": "sha512-5BkI9KGoqrNvBGUe15/QlZq3OooZ8WLg1AxTpaqHRCP3HNpzPPZKE2EDz8M7c+VRmCeUw1Brp4cx/PWm3kI/5A==",
"license": "MIT",
- "peer": true,
"dependencies": {
- "dompurify": "3.2.7",
+ "dompurify": "3.4.15",
"marked": "14.0.0"
}
},
- "node_modules/monaco-editor/node_modules/dompurify": {
- "version": "3.2.7",
- "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.2.7.tgz",
- "integrity": "sha512-WhL/YuveyGXJaerVlMYGWhvQswa7myDG17P7Vu65EWC05o8vfeNbvNf4d/BOvH99+ZW+LlQsc1GDKMa1vNK6dw==",
- "license": "(MPL-2.0 OR Apache-2.0)",
- "peer": true,
- "optionalDependencies": {
- "@types/trusted-types": "^2.0.7"
- }
- },
"node_modules/monaco-editor/node_modules/marked": {
"version": "14.0.0",
"resolved": "https://registry.npmjs.org/marked/-/marked-14.0.0.tgz",
"integrity": "sha512-uIj4+faQ+MgHgwUW1l2PsPglZLOLOT1uErt06dAPtx2kjteLAkbsd/0FiYg/MGS+i7ZKLb7w2WClxHkzOOuryQ==",
- "peer": true,
"bin": {
"marked": "bin/marked.js"
},
@@ -10609,6 +10627,47 @@
"node": ">v0.4.10"
}
},
+ "node_modules/motion": {
+ "version": "14.9.0",
+ "resolved": "https://registry.npmjs.org/motion/-/motion-14.9.0.tgz",
+ "integrity": "sha512-Oc+jjq/AyhwsnEUaAq2xEu/SsfKTphgsXqoxddTSLzgTdXZc6FwHcp9RLGSECccTykN1/p3gWUN4kMJAamm+1g==",
+ "license": "MIT",
+ "dependencies": {
+ "framer-motion": "14.9.0",
+ "tslib": "^2.4.0"
+ },
+ "peerDependencies": {
+ "react": "^18.0.0 || ^19.0.0",
+ "react-dom": "^18.0.0 || ^19.0.0",
+ "remix": "^3.1.0"
+ },
+ "peerDependenciesMeta": {
+ "react": {
+ "optional": true
+ },
+ "react-dom": {
+ "optional": true
+ },
+ "remix": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/motion-dom": {
+ "version": "14.9.0",
+ "resolved": "https://registry.npmjs.org/motion-dom/-/motion-dom-14.9.0.tgz",
+ "integrity": "sha512-wGjKbNDMHd75aLStkxLCKZ+T8/wusZHklmNLK1Ak68UrdBt2X8I4yweYR/0WonxGnBsw6oloDTIV8pN+UTvzzA==",
+ "license": "MIT",
+ "dependencies": {
+ "motion-utils": "14.7.0"
+ }
+ },
+ "node_modules/motion-utils": {
+ "version": "14.7.0",
+ "resolved": "https://registry.npmjs.org/motion-utils/-/motion-utils-14.7.0.tgz",
+ "integrity": "sha512-woO0/Nb7ys75f94fjvQi/6leiHGvZUYkeHUPEZ3vxsV+9OpEVhkxp01x8MlRwX0zt31EqgXsKDAoBoJLC148Tw==",
+ "license": "MIT"
+ },
"node_modules/ms": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
diff --git a/dashboard/package.json b/dashboard/package.json
index 32a02a8202..d1d3e6340c 100644
--- a/dashboard/package.json
+++ b/dashboard/package.json
@@ -30,11 +30,14 @@
"antd": "^5.29.1",
"antd-style": "^3.7.1",
"build": "^0.1.4",
+ "classnames": "^2.5.1",
"docx-preview": "^0.3.2",
"i18next": "^25.8.4",
"jszip": "^3.10.1",
"lucide-react": "^0.562.0",
"mermaid": "^11.13.0",
+ "monaco-editor": "0.57.0",
+ "motion": "^14.9.0",
"qrcode.react": "^4.2.0",
"react": "^18",
"react-dom": "^18",
diff --git a/dashboard/public/experts/avatars/ops-engineer.svg b/dashboard/public/experts/avatars/ops-engineer.svg
deleted file mode 100644
index fc30ace1e9..0000000000
--- a/dashboard/public/experts/avatars/ops-engineer.svg
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/dashboard/public/experts/avatars/scene-academic.svg b/dashboard/public/experts/avatars/scene-academic.svg
deleted file mode 100644
index 2f6b04ce57..0000000000
--- a/dashboard/public/experts/avatars/scene-academic.svg
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/dashboard/public/experts/avatars/scene-lifestyle.svg b/dashboard/public/experts/avatars/scene-lifestyle.svg
deleted file mode 100644
index ad83044757..0000000000
--- a/dashboard/public/experts/avatars/scene-lifestyle.svg
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/dashboard/public/experts/avatars/scene-mysticism.svg b/dashboard/public/experts/avatars/scene-mysticism.svg
deleted file mode 100644
index b4ff78bdd9..0000000000
--- a/dashboard/public/experts/avatars/scene-mysticism.svg
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/dashboard/src/api/modules/knowledgeBases.ts b/dashboard/src/api/modules/knowledgeBases.ts
index 9bc3f8e6a9..fb75821574 100644
--- a/dashboard/src/api/modules/knowledgeBases.ts
+++ b/dashboard/src/api/modules/knowledgeBases.ts
@@ -320,6 +320,13 @@ export const knowledgeBasesApi = {
`/knowledge-bases/${id}/documents/${documentId}/preview`,
),
+ listDocumentChunks: (id: string, documentId: string) =>
+ request<{
+ id: string;
+ filename: string;
+ chunks: { ordinal: number; text: string }[];
+ }>(`/knowledge-bases/${id}/documents/${documentId}/chunks`),
+
/** Authenticated original-file bytes (download or preview). */
fetchDocumentFile: (
id: string,
diff --git a/dashboard/src/api/modules/plugins.ts b/dashboard/src/api/modules/plugins.ts
index 3d9950479a..d935065910 100644
--- a/dashboard/src/api/modules/plugins.ts
+++ b/dashboard/src/api/modules/plugins.ts
@@ -100,11 +100,15 @@ export const pluginsApi = {
installFromMarket(
pluginId: string,
- force = false,
+ version?: string,
): Promise<{ id: string; version: string; name: string; kind: string }> {
- const qs = force ? "?force=true" : "";
+ const params = new URLSearchParams();
+ if (version) params.set("version", version);
+ const qs = params.toString();
return request(
- `/plugins/market/${encodeURIComponent(pluginId)}/install${qs}`,
+ `/plugins/market/${encodeURIComponent(pluginId)}/install${
+ qs ? `?${qs}` : ""
+ }`,
{
method: "POST",
},
diff --git a/dashboard/src/api/modules/publishedExperts.ts b/dashboard/src/api/modules/publishedExperts.ts
index 3f97fb971e..f4f4afee09 100644
--- a/dashboard/src/api/modules/publishedExperts.ts
+++ b/dashboard/src/api/modules/publishedExperts.ts
@@ -11,6 +11,7 @@ export interface PublishedExpert {
icon_name: string | null;
icon_url?: string | null;
color: string | null;
+ skill_count?: number;
created_at: string;
updated_at: string;
welcome_message?: { zh?: string; en?: string };
diff --git a/dashboard/src/assets/storage/index.ts b/dashboard/src/assets/storage/index.ts
index 234fcbea8f..5bae53f5b2 100644
--- a/dashboard/src/assets/storage/index.ts
+++ b/dashboard/src/assets/storage/index.ts
@@ -2,6 +2,7 @@ import cos from "./cos.png";
import s3 from "./s3.svg";
import oss from "./oss.svg";
import obs from "./obs.svg";
+import tos from "./tos.svg";
import filesystem from "./filesystem.svg";
import shell from "./shell.svg";
import docker from "./docker.svg";
@@ -14,6 +15,7 @@ export const STORAGE_LOGOS: Record = {
s3,
oss,
obs,
+ tos,
filesystem,
shell,
docker,
diff --git a/dashboard/src/assets/storage/tos.svg b/dashboard/src/assets/storage/tos.svg
new file mode 100644
index 0000000000..f93aa75665
--- /dev/null
+++ b/dashboard/src/assets/storage/tos.svg
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/dashboard/src/components/AccountSecurityDrawer.module.less b/dashboard/src/components/AccountSecurityDrawer.module.less
index 99046ef6d0..2ed02983c3 100644
--- a/dashboard/src/components/AccountSecurityDrawer.module.less
+++ b/dashboard/src/components/AccountSecurityDrawer.module.less
@@ -69,7 +69,7 @@
.cardTop {
display: flex;
flex-direction: column;
- gap: 4px;
+ gap: 12px;
}
.cardLead {
@@ -93,9 +93,8 @@
display: flex;
flex-direction: column;
align-items: stretch;
- gap: 6px;
+ gap: 12px;
min-width: 0;
- padding-left: 48px;
}
.iconWrap {
@@ -283,7 +282,6 @@
flex-direction: column;
align-items: stretch;
gap: 12px;
- margin-left: 48px;
padding: 12px;
border-radius: 10px;
background: var(--fn-bg-secondary, #f7f8fa);
@@ -344,12 +342,6 @@
}
@media (max-width: 640px) {
- .cardSide,
- .enrollBox {
- margin-left: 0;
- padding-left: 0;
- }
-
.recoveryList {
grid-template-columns: 1fr;
}
diff --git a/dashboard/src/components/AccountSecurityDrawer.tsx b/dashboard/src/components/AccountSecurityDrawer.tsx
index cf976cdd37..513b7c4694 100644
--- a/dashboard/src/components/AccountSecurityDrawer.tsx
+++ b/dashboard/src/components/AccountSecurityDrawer.tsx
@@ -10,6 +10,7 @@ import {
import { QRCodeSVG } from "qrcode.react";
import { Link } from "react-router-dom";
import { useTranslation } from "react-i18next";
+import cx from "classnames";
import { message } from "@/utils/antdMessage";
import {
authApi,
@@ -451,9 +452,10 @@ export default function AccountSecurityDrawer({
@@ -463,9 +465,10 @@ export default function AccountSecurityDrawer({
{t("account.securityTotp")}
{status?.totp_verified
? t("account.securityTotpEnabled")
@@ -563,9 +566,10 @@ export default function AccountSecurityDrawer({
0 ? styles.iconWrapOn : ""
- }`}
+ className={cx(
+ styles.iconWrap,
+ passkeyCount > 0 && styles.iconWrapOn,
+ )}
aria-hidden
>
@@ -576,7 +580,10 @@ export default function AccountSecurityDrawer({
{passkeyCount > 0 ? (
{t("account.securityPasskeyCount", {
count: passkeyCount,
@@ -696,9 +703,10 @@ export default function AccountSecurityDrawer({
diff --git a/dashboard/src/components/AgentProfileDrawer.tsx b/dashboard/src/components/AgentProfileDrawer.tsx
index 8ac6ed793c..6146382c4c 100644
--- a/dashboard/src/components/AgentProfileDrawer.tsx
+++ b/dashboard/src/components/AgentProfileDrawer.tsx
@@ -8,6 +8,7 @@ import {
import { useTranslation } from "react-i18next";
import { Collapse, Drawer, Spin, Tag } from "antd";
import { ChevronLeft } from "lucide-react";
+import cx from "classnames";
import { request } from "../api/request";
import { withFromWorkspace } from "../utils/fromWorkspace";
import type { OctopAgent } from "../context/AgentContext";
@@ -85,9 +86,7 @@ function ProfileEntityCard({
{icon}
-
+
{title}
{trailing}
diff --git a/dashboard/src/components/AgentSelector.tsx b/dashboard/src/components/AgentSelector.tsx
index 78e808247e..e40f226582 100644
--- a/dashboard/src/components/AgentSelector.tsx
+++ b/dashboard/src/components/AgentSelector.tsx
@@ -4,6 +4,7 @@ import type { MenuProps } from "antd";
import { useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
import { useTranslation } from "react-i18next";
import { ChevronDown } from "lucide-react";
+import cx from "classnames";
import { useAgent, type OctopAgent } from "../context/AgentContext";
import { ownedSoloExperts, ownedTeamAgents } from "../utils/sharedExpert";
import {
@@ -110,9 +111,10 @@ function AgentChip({
tabIndex={measure ? -1 : undefined}
data-chip-id={measure ? agent.agent_id : undefined}
data-group-key={measure ? groupKey : undefined}
- className={`${active ? styles.chipActive : styles.chip}${
- disconnected ? ` ${styles.chipDisconnected}` : ""
- }`}
+ className={cx(
+ active ? styles.chipActive : styles.chip,
+ disconnected && styles.chipDisconnected,
+ )}
style={{ "--chip-accent": accent } as React.CSSProperties}
onClick={() => onSelect(agent.agent_id)}
title={title}
@@ -251,7 +253,7 @@ export default function AgentSelector({
if (loading) {
return (
-
+
);
@@ -345,7 +347,7 @@ export default function AgentSelector({
};
return (
-
+
{showLabel && !showGroupLabels ? (
{heading}
diff --git a/dashboard/src/components/AppVersionBadge/index.tsx b/dashboard/src/components/AppVersionBadge/index.tsx
index d9e6b82101..4f2db395fd 100644
--- a/dashboard/src/components/AppVersionBadge/index.tsx
+++ b/dashboard/src/components/AppVersionBadge/index.tsx
@@ -2,6 +2,7 @@ import { useTranslation } from "react-i18next";
import { useNavigate } from "react-router-dom";
import { Tooltip } from "antd";
import { ArrowUpCircle } from "lucide-react";
+import cx from "classnames";
import { useUpdateStatus } from "../../hooks/useUpdateStatus";
import { useCurrentUser } from "../../hooks/useCurrentUser";
import { userCan } from "../../utils/permissions";
@@ -34,9 +35,11 @@ export default function AppVersionBadge({ isMobile }: AppVersionBadgeProps) {
diff --git a/dashboard/src/components/AuthImage.tsx b/dashboard/src/components/AuthImage.tsx
index 20a0cd964f..9d49ca386b 100644
--- a/dashboard/src/components/AuthImage.tsx
+++ b/dashboard/src/components/AuthImage.tsx
@@ -1,4 +1,5 @@
import { useTranslation } from "react-i18next";
+import cx from "classnames";
import { useAuthImageSrc } from "../hooks/useAuthImageSrc";
import styles from "./AuthImage.module.less";
@@ -18,15 +19,13 @@ export default function AuthImage({
const { src, loadState } = useAuthImageSrc(url, alt);
if (loadState === "loading") {
- return (
-
- );
+ return
;
}
if (loadState === "error" || !src) {
return (
diff --git a/dashboard/src/components/AvatarDropdown.tsx b/dashboard/src/components/AvatarDropdown.tsx
index 3f621c07c1..1aa5dec28e 100644
--- a/dashboard/src/components/AvatarDropdown.tsx
+++ b/dashboard/src/components/AvatarDropdown.tsx
@@ -27,6 +27,7 @@ import {
} from "lucide-react";
import { useNavigate } from "react-router-dom";
import { useTranslation } from "react-i18next";
+import cx from "classnames";
import { authApi } from "../api/modules/auth";
import { preferencesApi } from "../api/modules/preferences";
import { clearAuthToken } from "../api/request";
@@ -378,7 +379,7 @@ export default function AvatarDropdown({
void handleLogout()}
>
diff --git a/dashboard/src/components/AvatarPicker/ResourceAvatar.tsx b/dashboard/src/components/AvatarPicker/ResourceAvatar.tsx
index d11d9c1cad..85936ecf07 100644
--- a/dashboard/src/components/AvatarPicker/ResourceAvatar.tsx
+++ b/dashboard/src/components/AvatarPicker/ResourceAvatar.tsx
@@ -1,4 +1,5 @@
import type { CSSProperties } from "react";
+import cx from "classnames";
import { useAuthImageSrc } from "../../hooks/useAuthImageSrc";
import styles from "./AvatarPicker.module.less";
@@ -42,14 +43,12 @@ export function ResourceAvatar({
const PresetIcon = preset.Icon;
return (
{photo ? (
diff --git a/dashboard/src/components/AvatarPicker/ResourceAvatarPicker.tsx b/dashboard/src/components/AvatarPicker/ResourceAvatarPicker.tsx
index be39b0e1ba..2d8c4ad01d 100644
--- a/dashboard/src/components/AvatarPicker/ResourceAvatarPicker.tsx
+++ b/dashboard/src/components/AvatarPicker/ResourceAvatarPicker.tsx
@@ -2,6 +2,7 @@ import { useEffect, useRef, useState, type ReactNode } from "react";
import { Button } from "antd";
import { ImagePlus } from "lucide-react";
import { useTranslation } from "react-i18next";
+import cx from "classnames";
import { message } from "@/utils/antdMessage";
import styles from "./AvatarPicker.module.less";
@@ -148,14 +149,12 @@ export function ResourceAvatarPicker({
{t("header.betaBadge")}
diff --git a/dashboard/src/components/BrowserAiPanel.tsx b/dashboard/src/components/BrowserAiPanel.tsx
index f9f3c75f2c..231035075b 100644
--- a/dashboard/src/components/BrowserAiPanel.tsx
+++ b/dashboard/src/components/BrowserAiPanel.tsx
@@ -10,6 +10,7 @@ import { message as antMessage } from "@/utils/antdMessage";
import { Bot, X, Square, Play, Loader2, Send } from "lucide-react";
import { useTranslation } from "react-i18next";
+import cx from "classnames";
import type { OctopAgent } from "../context/AgentContext";
import AgentSelector from "../components/AgentSelector";
import { useAgentThreadChat } from "../hooks/useAgentThreadChat";
@@ -82,9 +83,10 @@ export default function BrowserAiPanel({
onSkillNameSet,
}: BrowserAiPanelProps) {
const { t } = useTranslation();
- const panelClassName = `${styles.panel}${
- layout === "bottom" ? ` ${styles.panelBottom}` : ""
- }`;
+ const panelClassName = cx(
+ styles.panel,
+ layout === "bottom" && styles.panelBottom,
+ );
const [inputValue, setInputValue] = useState("");
const [browserReplayBusy, setBrowserReplayBusy] = useState(false);
const [pendingSkillContent, setPendingSkillContent] = useState(
@@ -661,7 +663,7 @@ export default function BrowserAiPanel({
-
+
{booting ? (
@@ -683,7 +685,7 @@ export default function BrowserAiPanel({
diff --git a/dashboard/src/components/BrowserViewer/index.tsx b/dashboard/src/components/BrowserViewer/index.tsx
index 7c97b86ec6..549ba0cae7 100644
--- a/dashboard/src/components/BrowserViewer/index.tsx
+++ b/dashboard/src/components/BrowserViewer/index.tsx
@@ -17,6 +17,7 @@ import {
AlertTriangle,
} from "lucide-react";
import { useTranslation } from "react-i18next";
+import cx from "classnames";
import type {
BrowserStreamState,
@@ -253,9 +254,10 @@ export const BrowserViewer = forwardRef<
>
{isError ? (
@@ -317,9 +320,11 @@ export const BrowserViewer = forwardRef<
= ({
= ({
return (
<>
= ({
{hasSession ? (
<>
-
+
{controlOwner === "agent"
? t("browserWorkspace.agentControl")
@@ -394,9 +396,11 @@ const BrowserWorkspace: React.FC = ({
)}
{streamStatusLabel}
diff --git a/dashboard/src/components/ChatPicker/SearchablePickerPanel.tsx b/dashboard/src/components/ChatPicker/SearchablePickerPanel.tsx
index bbbe62d7ea..caff3115fa 100644
--- a/dashboard/src/components/ChatPicker/SearchablePickerPanel.tsx
+++ b/dashboard/src/components/ChatPicker/SearchablePickerPanel.tsx
@@ -1,5 +1,6 @@
import type { ReactNode } from "react";
import { Search } from "lucide-react";
+import cx from "classnames";
import { useFilteredList } from "../../hooks/useFilteredList";
import styles from "./picker.module.less";
@@ -84,7 +85,7 @@ export default function SearchablePickerPanel({
diff --git a/dashboard/src/components/ChromeTabBar/index.tsx b/dashboard/src/components/ChromeTabBar/index.tsx
index 2d7e542ea4..0a54ed11e1 100644
--- a/dashboard/src/components/ChromeTabBar/index.tsx
+++ b/dashboard/src/components/ChromeTabBar/index.tsx
@@ -1,6 +1,7 @@
import type { MouseEvent, ReactNode } from "react";
import { Tooltip } from "antd";
import { Plus, X } from "lucide-react";
+import cx from "classnames";
import styles from "./index.module.less";
export type ChromeTabItem = {
@@ -41,7 +42,7 @@ export function ChromeTabBar({
className,
}: ChromeTabBarProps) {
return (
-
+
{tabs.map((tab) => {
const selected = tab.key === activeKey;
@@ -49,9 +50,7 @@ export function ChromeTabBar({
onChange(tab.key)}
>
{tab.leading}
diff --git a/dashboard/src/components/CopyableResourceId.tsx b/dashboard/src/components/CopyableResourceId.tsx
index fda4a53952..842d57b351 100644
--- a/dashboard/src/components/CopyableResourceId.tsx
+++ b/dashboard/src/components/CopyableResourceId.tsx
@@ -2,6 +2,7 @@ import { useCallback } from "react";
import { Tooltip } from "antd";
import { Copy } from "lucide-react";
import { useTranslation } from "react-i18next";
+import cx from "classnames";
import { message } from "@/utils/antdMessage";
import { copyText } from "@/utils/copyText";
@@ -38,9 +39,7 @@ export function CopyableResourceId({
void copy()}
>
diff --git a/dashboard/src/components/CurrentVersionBadge/index.tsx b/dashboard/src/components/CurrentVersionBadge/index.tsx
index e6f8e59a9d..08839ed9d5 100644
--- a/dashboard/src/components/CurrentVersionBadge/index.tsx
+++ b/dashboard/src/components/CurrentVersionBadge/index.tsx
@@ -1,6 +1,7 @@
import { useTranslation } from "react-i18next";
import { useNavigate } from "react-router-dom";
import { Tooltip } from "antd";
+import cx from "classnames";
import { useUpdateStatus } from "../../hooks/useUpdateStatus";
import { useCurrentUser } from "../../hooks/useCurrentUser";
import { userCan } from "../../utils/permissions";
@@ -32,9 +33,11 @@ export default function CurrentVersionBadge({
navigate("/admin/advanced?tab=updates")}
aria-label={tooltip}
>
@@ -47,9 +50,10 @@ export default function CurrentVersionBadge({
return (
{label}
diff --git a/dashboard/src/components/DesktopWindowControls/DesktopWindowControls.tsx b/dashboard/src/components/DesktopWindowControls/DesktopWindowControls.tsx
index bca65d3dce..2c3eb6cf96 100644
--- a/dashboard/src/components/DesktopWindowControls/DesktopWindowControls.tsx
+++ b/dashboard/src/components/DesktopWindowControls/DesktopWindowControls.tsx
@@ -2,6 +2,7 @@ import type { DesktopChromeStyle } from "../../utils/desktopChrome";
import { emitDesktopWindowAction } from "../../utils/desktopChrome";
import { Minus, Square, X } from "lucide-react";
import { useTranslation } from "react-i18next";
+import cx from "classnames";
import styles from "./DesktopWindowControls.module.less";
interface DesktopWindowControlsProps {
@@ -25,7 +26,7 @@ export default function DesktopWindowControls({
>
emitDesktopWindowAction("toggle-maximise")}
>
@@ -35,7 +36,7 @@ export default function DesktopWindowControls({
emitDesktopWindowAction("minimise")}
>
@@ -45,7 +46,7 @@ export default function DesktopWindowControls({
emitDesktopWindowAction("close")}
>
@@ -81,7 +82,7 @@ export default function DesktopWindowControls({
emitDesktopWindowAction("close")}
>
diff --git a/dashboard/src/components/DocumentPreviewCore.tsx b/dashboard/src/components/DocumentPreviewCore.tsx
index 3a7821824b..30359ef903 100644
--- a/dashboard/src/components/DocumentPreviewCore.tsx
+++ b/dashboard/src/components/DocumentPreviewCore.tsx
@@ -13,6 +13,7 @@ import { useCallback, useEffect, useMemo, useRef, useState } from "react";
import { Button, Image, Tabs } from "antd";
import { ArrowDownToLine } from "lucide-react";
import { useTranslation } from "react-i18next";
+import cx from "classnames";
import { isNotFoundApiError } from "../utils/apiError";
import type { DocKind } from "../utils/docKind";
import styles from "./DocumentPreviewCore.module.less";
@@ -728,9 +729,10 @@ export default function DocumentPreviewCore({
) : null}
{
onChange?.(emoji);
setOpen(false);
diff --git a/dashboard/src/components/EmptyState/OctopEmptyMascot.tsx b/dashboard/src/components/EmptyState/OctopEmptyMascot.tsx
index 22f90785f7..ab6355bb3c 100644
--- a/dashboard/src/components/EmptyState/OctopEmptyMascot.tsx
+++ b/dashboard/src/components/EmptyState/OctopEmptyMascot.tsx
@@ -1,3 +1,5 @@
+import cx from "classnames";
+
import { OCTOP_EMPTY_MASCOT_SRC } from "../../assets/mascot";
import styles from "./EmptyState.module.less";
@@ -21,7 +23,7 @@ export function OctopEmptyMascot({
src={OCTOP_EMPTY_MASCOT_SRC}
alt=""
draggable={false}
- className={className ? `${styles.mascot} ${className}` : styles.mascot}
+ className={cx(styles.mascot, className)}
style={size === 160 ? undefined : { width: size, height: size }}
/>
);
diff --git a/dashboard/src/components/ExpertColorPicker.tsx b/dashboard/src/components/ExpertColorPicker.tsx
index ee4586564a..46425285a2 100644
--- a/dashboard/src/components/ExpertColorPicker.tsx
+++ b/dashboard/src/components/ExpertColorPicker.tsx
@@ -1,6 +1,7 @@
import { ColorPicker, Tooltip } from "antd";
import { useTranslation } from "react-i18next";
import type { AggregationColor } from "antd/es/color-picker/color";
+import cx from "classnames";
import {
DEFAULT_CUSTOM_COLOR,
DEFAULT_PALETTE,
@@ -42,7 +43,7 @@ export default function ExpertColorPicker({
onChange?.(key)}
@@ -58,7 +59,7 @@ export default function ExpertColorPicker({
})}
diff --git a/dashboard/src/components/FadeInImg.module.less b/dashboard/src/components/FadeInImg.module.less
new file mode 100644
index 0000000000..6da9976019
--- /dev/null
+++ b/dashboard/src/components/FadeInImg.module.less
@@ -0,0 +1,13 @@
+.img {
+ opacity: 0;
+ transition: opacity 0.32s ease;
+
+ @media (prefers-reduced-motion: reduce) {
+ opacity: 1;
+ transition: none;
+ }
+}
+
+.ready {
+ opacity: 1;
+}
diff --git a/dashboard/src/components/FadeInImg.tsx b/dashboard/src/components/FadeInImg.tsx
new file mode 100644
index 0000000000..ddb9ff129b
--- /dev/null
+++ b/dashboard/src/components/FadeInImg.tsx
@@ -0,0 +1,38 @@
+import { useCallback, useState } from "react";
+import type { ImgHTMLAttributes } from "react";
+import cx from "classnames";
+import styles from "./FadeInImg.module.less";
+
+type FadeInImgProps = ImgHTMLAttributes;
+
+/** Image that stays transparent until decode finishes, then fades in. */
+export function FadeInImg({ className, src, onLoad, ...rest }: FadeInImgProps) {
+ const [shownSrc, setShownSrc] = useState(undefined);
+ const shown = shownSrc != null && shownSrc === src;
+
+ const reveal = useCallback((node: HTMLImageElement) => {
+ if (node.naturalWidth <= 0) return;
+ const current = node.getAttribute("src") ?? undefined;
+ requestAnimationFrame(() => setShownSrc(current));
+ }, []);
+
+ const ref = useCallback(
+ (node: HTMLImageElement | null) => {
+ if (node?.complete) reveal(node);
+ },
+ [reveal],
+ );
+
+ return (
+ {
+ reveal(event.currentTarget);
+ onLoad?.(event);
+ }}
+ />
+ );
+}
diff --git a/dashboard/src/components/Markdown/index.tsx b/dashboard/src/components/Markdown/index.tsx
index 0b85202c46..1a35aba7e6 100644
--- a/dashboard/src/components/Markdown/index.tsx
+++ b/dashboard/src/components/Markdown/index.tsx
@@ -14,6 +14,7 @@ import {
import ReactMarkdown from "react-markdown";
import remarkGfm from "remark-gfm";
import { useTranslation } from "react-i18next";
+import cx from "classnames";
import {
AuthFileDownloadLink,
isAuthDownloadHref,
@@ -288,9 +289,11 @@ const Markdown = memo(function Markdown({
return (
(null);
const imeComposingRef = useRef(false);
@@ -171,7 +173,7 @@ export default function MobileAiPanel({
-
+
{booting ? (
diff --git a/dashboard/src/components/OctopSpinner/index.tsx b/dashboard/src/components/OctopSpinner/index.tsx
index fcf5dd09c6..9fc9095180 100644
--- a/dashboard/src/components/OctopSpinner/index.tsx
+++ b/dashboard/src/components/OctopSpinner/index.tsx
@@ -1,3 +1,5 @@
+import cx from "classnames";
+
import styles from "./OctopSpinner.module.less";
interface OctopSpinnerProps {
@@ -12,7 +14,7 @@ interface OctopSpinnerProps {
*/
export default function OctopSpinner({ className }: OctopSpinnerProps) {
return (
-
+
);
diff --git a/dashboard/src/components/PaletteSwitcher.tsx b/dashboard/src/components/PaletteSwitcher.tsx
index beb63a8ee2..af0edf95e7 100644
--- a/dashboard/src/components/PaletteSwitcher.tsx
+++ b/dashboard/src/components/PaletteSwitcher.tsx
@@ -1,6 +1,7 @@
import { ColorPicker, Tooltip } from "antd";
import { useTranslation } from "react-i18next";
import type { AggregationColor } from "antd/es/color-picker/color";
+import cx from "classnames";
import { useTheme } from "../context/ThemeContext";
import { PALETTE_SWATCH, VALID_PALETTES } from "../styles/themePalettes";
import styles from "./PaletteSwitcher.module.less";
@@ -29,7 +30,7 @@ export default function PaletteSwitcher() {
setPalette(key)}
@@ -45,7 +46,7 @@ export default function PaletteSwitcher() {
})}
diff --git a/dashboard/src/components/PdfDocumentPreview.tsx b/dashboard/src/components/PdfDocumentPreview.tsx
index b724d6338e..0baf3d94f5 100644
--- a/dashboard/src/components/PdfDocumentPreview.tsx
+++ b/dashboard/src/components/PdfDocumentPreview.tsx
@@ -33,6 +33,7 @@ import type { PDFDocumentProxy } from "pdfjs-dist";
import "react-pdf/dist/Page/AnnotationLayer.css";
import "react-pdf/dist/Page/TextLayer.css";
+import cx from "classnames";
import { useIsMobile } from "../hooks/useIsMobile";
import styles from "./PdfDocumentPreview.module.less";
@@ -891,11 +892,10 @@ export default function PdfDocumentPreview({
{bootOverlayMounted ? (
void;
+}) {
+ return (
+
+ {show ? (
+ event.stopPropagation()}
+ onClick={onClick}
+ >
+
+ {side === "prev" ? (
+
+ ) : (
+
+ )}
+
+
+ ) : null}
+
+ );
+}
+
+/** One-row pills that scroll with the trackpad, a drag, or the end arrows. */
+export default function PillScroller({
+ options,
+ active,
+ onSelect,
+ prevLabel,
+ nextLabel,
+ className,
+}: {
+ options: PillOption[];
+ active: string;
+ onSelect: (value: string) => void;
+ prevLabel: string;
+ nextLabel: string;
+ className?: string;
+}) {
+ const scrollerRef = useRef(null);
+ const dragRef = useRef({
+ pointerId: -1,
+ startX: 0,
+ startScroll: 0,
+ moved: false,
+ });
+ const [edges, setEdges] = useState({ left: false, right: false });
+
+ const updateEdges = useCallback(() => {
+ const el = scrollerRef.current;
+ if (!el) return;
+ const max = el.scrollWidth - el.clientWidth;
+ const left = el.scrollLeft > 2;
+ const right = max - el.scrollLeft > 2;
+ setEdges((prev) =>
+ prev.left === left && prev.right === right ? prev : { left, right },
+ );
+ }, []);
+
+ useEffect(() => {
+ const el = scrollerRef.current;
+ if (!el) return;
+ updateEdges();
+ el.addEventListener("scroll", updateEdges, { passive: true });
+ const observer = new ResizeObserver(updateEdges);
+ observer.observe(el);
+ return () => {
+ el.removeEventListener("scroll", updateEdges);
+ observer.disconnect();
+ };
+ }, [options, updateEdges]);
+
+ const scrollByDir = (dir: -1 | 1) => {
+ const el = scrollerRef.current;
+ if (!el) return;
+ el.scrollBy({
+ left: dir * Math.max(160, Math.round(el.clientWidth * 0.7)),
+ behavior: "smooth",
+ });
+ };
+
+ return (
+
+
scrollByDir(-1)}
+ />
+ {
+ if (event.button !== 0) return;
+ const el = scrollerRef.current;
+ if (!el || el.scrollWidth <= el.clientWidth + 1) return;
+ // Capture only after the pointer actually drags. Capturing on
+ // pointerdown retargets the click away from the pill.
+ dragRef.current = {
+ pointerId: event.pointerId,
+ startX: event.clientX,
+ startScroll: el.scrollLeft,
+ moved: false,
+ };
+ }}
+ onPointerMove={(event) => {
+ const drag = dragRef.current;
+ if (drag.pointerId !== event.pointerId) return;
+ const el = scrollerRef.current;
+ if (!el) return;
+ const dx = event.clientX - drag.startX;
+ if (!drag.moved) {
+ if (Math.abs(dx) <= 6) return;
+ drag.moved = true;
+ el.setPointerCapture(event.pointerId);
+ }
+ el.scrollLeft = drag.startScroll - dx;
+ }}
+ onPointerUp={(event) => {
+ if (dragRef.current.pointerId !== event.pointerId) return;
+ dragRef.current.pointerId = -1;
+ }}
+ onPointerCancel={() => {
+ dragRef.current.pointerId = -1;
+ dragRef.current.moved = false;
+ }}
+ onClickCapture={(event) => {
+ if (!dragRef.current.moved) return;
+ dragRef.current.moved = false;
+ event.preventDefault();
+ event.stopPropagation();
+ }}
+ >
+ {options.map((opt) => {
+ const selected = active === opt.value;
+ return (
+ onSelect(opt.value)}
+ >
+ {opt.label}
+
+ );
+ })}
+
+ scrollByDir(1)}
+ />
+
+ );
+}
diff --git a/dashboard/src/components/PwaInstallPrompt/index.tsx b/dashboard/src/components/PwaInstallPrompt/index.tsx
index 65e18b3c42..e54c1d9928 100644
--- a/dashboard/src/components/PwaInstallPrompt/index.tsx
+++ b/dashboard/src/components/PwaInstallPrompt/index.tsx
@@ -3,6 +3,7 @@ import { createPortal } from "react-dom";
import { Tooltip } from "antd";
import { useTranslation } from "react-i18next";
import { Download, MonitorDown, Share, X } from "lucide-react";
+import cx from "classnames";
import {
subscribePwaPrompt,
getPwaInstallSnapshot,
@@ -233,9 +234,11 @@ export default function PwaInstallPrompt({
? t("pwa.addToHomeScreen", "添加到主屏幕")
: t("pwa.installDesktopApp", "安装为桌面应用");
- const btnClass = chatFloat
- ? styles.installBtnChatFloat
- : `${styles.installBtn} ${compact ? styles.installBtnCompact : ""}`;
+ const btnClass = cx(
+ chatFloat && styles.installBtnChatFloat,
+ !chatFloat && styles.installBtn,
+ !chatFloat && compact && styles.installBtnCompact,
+ );
const button = (
{showLine ?
: null}
diff --git a/dashboard/src/components/ResourceVisibilityFields/index.tsx b/dashboard/src/components/ResourceVisibilityFields/index.tsx
index 876a0a433d..491f9aba74 100644
--- a/dashboard/src/components/ResourceVisibilityFields/index.tsx
+++ b/dashboard/src/components/ResourceVisibilityFields/index.tsx
@@ -2,6 +2,7 @@ import { useEffect, useMemo, useState, type ReactNode } from "react";
import { Button, Form, Radio, Select, Tag } from "antd";
import { ChevronDown, ChevronUp } from "lucide-react";
import { useTranslation } from "react-i18next";
+import cx from "classnames";
import {
userGroupsApi,
type ResourceVisibilityMode,
@@ -176,7 +177,7 @@ export function ResourceVisibilityFields({
}));
return (
-
+
+
@@ -71,7 +70,7 @@ export function SharedAvatarMark({
defaultValue: "来自 {{name}}",
});
return (
-
+
{children}
{incoming ? (
diff --git a/dashboard/src/components/StreamConnectingIndicator/index.tsx b/dashboard/src/components/StreamConnectingIndicator/index.tsx
index bfe94d0669..6f976ece8d 100644
--- a/dashboard/src/components/StreamConnectingIndicator/index.tsx
+++ b/dashboard/src/components/StreamConnectingIndicator/index.tsx
@@ -1,4 +1,5 @@
import type { ReactNode } from "react";
+import cx from "classnames";
import styles from "./StreamConnectingIndicator.module.less";
const MASCOT_TYPE = `${import.meta.env.BASE_URL}octop-mascot-type.webp`;
@@ -24,13 +25,11 @@ export default function StreamConnectingIndicator({
tone = "default",
size = "md",
}: StreamConnectingIndicatorProps) {
- const rootClass = [
+ const rootClass = cx(
styles.root,
- tone === "onDark" ? styles.onDark : "",
- size === "sm" ? styles.sizeSm : "",
- ]
- .filter(Boolean)
- .join(" ");
+ tone === "onDark" && styles.onDark,
+ size === "sm" && styles.sizeSm,
+ );
return (
diff --git a/dashboard/src/components/StreamEdgeControls/StreamEdgeControls.tsx b/dashboard/src/components/StreamEdgeControls/StreamEdgeControls.tsx
index bfdc00e13f..ff9fea16af 100644
--- a/dashboard/src/components/StreamEdgeControls/StreamEdgeControls.tsx
+++ b/dashboard/src/components/StreamEdgeControls/StreamEdgeControls.tsx
@@ -1,5 +1,6 @@
import { Maximize2, SlidersHorizontal } from "lucide-react";
import { Tooltip } from "antd";
+import cx from "classnames";
import styles from "./StreamEdgeControls.module.less";
@@ -30,9 +31,7 @@ export default function StreamEdgeControls({
return (
@@ -59,7 +58,7 @@ export default function StreamEdgeControls({
) : null}
-
+
diff --git a/dashboard/src/components/TabLabel/TabBar.tsx b/dashboard/src/components/TabLabel/TabBar.tsx
index f7f323fec6..cb92f54871 100644
--- a/dashboard/src/components/TabLabel/TabBar.tsx
+++ b/dashboard/src/components/TabLabel/TabBar.tsx
@@ -1,4 +1,5 @@
import { useTranslation } from "react-i18next";
+import cx from "classnames";
import TabLabel, { type TabIcon } from "./index";
import styles from "./index.module.less";
@@ -32,7 +33,7 @@ export default function TabBar({
type="button"
role="tab"
aria-selected={selected}
- className={`${styles.tab} ${selected ? styles.active : ""}`}
+ className={cx(styles.tab, selected && styles.active)}
onClick={() => onChange(tab.key)}
>
{t(tab.labelKey)}
diff --git a/dashboard/src/components/TextAssistBar/index.tsx b/dashboard/src/components/TextAssistBar/index.tsx
index 4070d9291b..7172ff1f0e 100644
--- a/dashboard/src/components/TextAssistBar/index.tsx
+++ b/dashboard/src/components/TextAssistBar/index.tsx
@@ -2,6 +2,7 @@ import { useCallback, useState } from "react";
import { Button } from "antd";
import { Wand2 } from "lucide-react";
import { useTranslation } from "react-i18next";
+import cx from "classnames";
import {
textAssistApi,
@@ -63,7 +64,7 @@ export function TextAssistBar({
}, [disabled, getName, getText, i18n.language, kind, loading, onApply, t]);
return (
-
+
{t("textAssist.hint")}
@@ -73,13 +72,14 @@ export function TodoListView({
{statusIcon(item.status, isStreaming)}
{item.content}
diff --git a/dashboard/src/components/TokenCountInput.tsx b/dashboard/src/components/TokenCountInput.tsx
index a238ca3e05..f32a5ae806 100644
--- a/dashboard/src/components/TokenCountInput.tsx
+++ b/dashboard/src/components/TokenCountInput.tsx
@@ -4,6 +4,7 @@
*/
import { InputNumber } from "antd";
import { useTranslation } from "react-i18next";
+import cx from "classnames";
import styles from "./TokenCountInput.module.less";
export function formatTokenScaleLabel(tokens: number): string {
@@ -82,9 +83,7 @@ export function TokenCountInput({
key={preset}
type="button"
disabled={disabled}
- className={`${styles.preset} ${
- selected ? styles.presetActive : ""
- }`}
+ className={cx(styles.preset, selected && styles.presetActive)}
onClick={() => onChange?.(preset)}
>
{formatTokenScaleLabel(preset)}
diff --git a/dashboard/src/components/monaco.ts b/dashboard/src/components/monaco.ts
new file mode 100644
index 0000000000..547cb44698
--- /dev/null
+++ b/dashboard/src/components/monaco.ts
@@ -0,0 +1,12 @@
+import { loader } from "@monaco-editor/react";
+
+// Full AMD build, same origin as the page. Vite serves node_modules'
+// monaco-editor/min/vs here in dev and copies it to dist/monaco/vs on build.
+// Workers are loaded relative to this prefix, so they stay on this host.
+loader.config({
+ paths: {
+ vs: "/monaco/vs",
+ },
+});
+
+export { default } from "@monaco-editor/react";
diff --git a/dashboard/src/layouts/Sidebar.tsx b/dashboard/src/layouts/Sidebar.tsx
index e11f753446..622ffc8363 100644
--- a/dashboard/src/layouts/Sidebar.tsx
+++ b/dashboard/src/layouts/Sidebar.tsx
@@ -6,6 +6,7 @@ import AvatarDropdown from "../components/AvatarDropdown";
import AppVersionBadge from "../components/AppVersionBadge";
import CurrentVersionBadge from "../components/CurrentVersionBadge";
import { ArrowRightLeft, ChevronDown, X } from "lucide-react";
+import cx from "classnames";
import { useTheme } from "../context/ThemeContext";
import { useLayoutMode } from "../context/LayoutModeContext";
import { useUserRole } from "../hooks/useUserRole";
@@ -353,9 +354,10 @@ function NavList({
@@ -804,7 +806,7 @@ export default function Sidebar({
}}
>
{t("nav.newVersionBadgeShort", "新")}
diff --git a/dashboard/src/locales/en.json b/dashboard/src/locales/en.json
index 890420579c..dd0e77426f 100644
--- a/dashboard/src/locales/en.json
+++ b/dashboard/src/locales/en.json
@@ -107,7 +107,7 @@
"AUTH_FAILED": "Authentication failed.",
"TOKEN_EXPIRED": "Session expired. Please sign in again.",
"SETUP_REQUIRED": "Initial setup is required.",
- "DATABASE_NOT_EMPTY": "The target database already has users. Use an empty database, or log in with the existing admin.",
+ "DATABASE_NOT_EMPTY": "The target database already has users. On PostgreSQL, confirm to keep the existing accounts. On SQLite, choose an empty database.",
"BACKUP_DRIVER_MISMATCH": "This backup was made with a different database engine (SQLite vs PostgreSQL). Switch the runtime to match the backup, or create a new backup on the current engine. Cross-engine restore is not supported.",
"BACKUP_SCHEMA_INCOMPATIBLE": "This backup uses database schema version {{archive_schema_version}}, which cannot be restored by this Octop version (maximum supported: {{runtime_schema_version}}).",
"BACKUP_IN_PROGRESS": "A backup or restore is already in progress. Try again shortly.",
@@ -171,6 +171,7 @@
"BRIDGE_SELF_CONNECT": "Cannot add this Octop instance as a peer of itself.",
"BRIDGE_INBOUND_PASSIVE": "This link was opened by the peer. This side cannot change the address or dial out. After disconnect, the peer must reopen it.",
"CRON_TRIGGER_INVALID": "Invalid cron trigger.",
+ "CRON_ALREADY_RUNNING": "This task is already running on another instance.",
"SLASH_UNKNOWN": "Unknown slash command.",
"SLASH_BAD_ARGS": "Invalid arguments.",
"ATTACHMENT_UNSUPPORTED_TYPE": "This file type is not supported.",
@@ -201,13 +202,16 @@
"LDAP_UNAVAILABLE": "The LDAP directory is unavailable. Check the server address and bind credentials.",
"LDAP_USER_NOT_PROVISIONED": "This directory account has no Octop account yet. Ask an administrator to create one or enable automatic provisioning.",
"LDAP_GROUP_NOT_ALLOWED": "This directory account is not in a group allowed to sign in. Ask an administrator to add you to an allowed group.",
+ "LDAP_NOT_CONFIGURED": "Save LDAP settings before creating a directory account.",
"EXPERT_MARKET_FAILED": "Expert market is temporarily unavailable. Please try again later.",
+ "NETWORK_ERROR": "Network error. Check your connection and try again.",
"SKILLHUB_SSL_FAILED": "SkillHub request failed: Python SSL error detected — on macOS try `brew reinstall openssl@3`, or check your system CA certificates.",
"DESKTOP_SESSION_LIMIT": "Too many concurrent remote desktop streams (max {{limit}}). Close other connections and try again.",
"DESKTOP_CAPTURE_FAILED": "Screen capture failed repeatedly. On Linux servers restart the virtual desktop; on macOS grant Screen Recording and Accessibility, then reconnect.",
"BROWSER_NOT_ENABLED": "The browser is installed but not enabled. Confirm it on the Remote Browser page.",
"PLUGIN_INVALID_ARCHIVE": "The download is not a valid plugin ZIP. Use a direct .zip download URL (on GitHub use raw.githubusercontent.com or the “Download” / “raw” link, not the /blob/ page).",
"PLUGIN_INSTALL_FAILED": "Failed to download or install the plugin: {{reason}}",
+ "PLUGIN_MARKET_FAILED": "Plugin market is temporarily unavailable. Please try again later.",
"PLUGIN_ALREADY_EXISTS": "Plugin {{id}} is already installed.",
"KNOWLEDGE_FEATURE_DISABLED": "Knowledge bases are disabled by the administrator.",
"KNOWLEDGE_PREREQUISITES_RESTART_REQUIRED": "The knowledge-base embedding components were installed but cannot be loaded by this process yet. Restart the server for them to take effect.",
@@ -543,6 +547,10 @@
"renameFolder": "Rename folder",
"renameFolderSuccess": "Folder renamed",
"renameFolderFailed": "Failed to rename folder",
+ "renameFile": "Rename file",
+ "renameFileSuccess": "File renamed",
+ "renameFileFailed": "Failed to rename file",
+ "filenamePlaceholder": "File name",
"pathBreadcrumb": "Path",
"deleteFolderConfirm": "Delete this folder and everything inside it?",
"uploaded": "Documents uploaded",
@@ -554,6 +562,11 @@
"filename": "File name",
"status": "Status",
"chunks": "Chunks",
+ "previewFile": "Original",
+ "previewChunks": "Chunks",
+ "chunksEmpty": "No chunks yet. They appear after the document is indexed.",
+ "chunksFailed": "Couldn't load chunks",
+ "chunkLabel": "Chunk {{n}}",
"chunkCount": "{{count}} chunks",
"statuses": {
"pending": "Pending",
@@ -813,12 +826,12 @@
"badge": "Published",
"cardPublish": "Publish template",
"publishConfirmTitle": "Publish as template?",
- "publishConfirm": "This creates a snapshot template. Other users can install a private copy under Built-in Experts → Published by users. Your chat history is not shared.",
+ "publishConfirm": "This creates a snapshot template. Other users can install a private copy from the Expert Market. Your chat history is not shared.",
"statusPublished": "This agent is published as a community template.",
"statusNotPublished": "Publish this agent so other users can install a private copy.",
"publish": "Publish",
"publishSuccess": "Template published",
- "publishSuccessHint": "Template published. Others can install it under Built-in Experts → Published by users.",
+ "publishSuccessHint": "Template published. Others can install it from the Expert Market.",
"publishFailed": "Failed to publish template",
"update": "Update published template",
"updateSuccess": "Published template updated",
@@ -827,7 +840,8 @@
"unpublishConfirm": "Unpublish this template? Existing private installs are not affected.",
"unpublishSuccess": "Template unpublished",
"unpublishFailed": "Failed to unpublish template",
- "listTitle": "Published by users ({{count}})",
+ "scene": "Shared",
+ "listTitle": "User-published experts ({{count}})",
"listHint": "Templates published by users on this instance. Click Install to create your own private expert.",
"emptyHint": "No user-published templates yet. On My Experts, click the upload icon on a card to publish one.",
"by": "by {{name}}",
@@ -869,8 +883,7 @@
"proactive": "Proactive Push"
},
"myExperts": "My Experts",
- "expertLibrary": "Built-in Expert Templates",
- "expertMarket": "Expert Market",
+ "expertMarket": "Discover Experts",
"viewCard": "Cards",
"viewTable": "Table",
"mbtiUnset": "Not set",
@@ -894,22 +907,21 @@
"searchPlaceholder": "Search experts",
"searchEmpty": "No matching experts",
"filterEmpty": "Nothing matches the current filters",
- "totalLibrary": "{{count}} built-in expert(s)",
- "totalMarket": "{{count}} market expert(s)",
- "addFromLibrary": "+ New from Built-in Template",
+ "totalMarket": "{{count}} total",
+ "addFromMarket": "New from Expert Market",
"newExpert": "New expert",
"addCloudExpert": "Add cloud expert",
"addCloudExpertHint": "Open Cloud Collab to add experts from another Octop",
"emptyMyExperts": "No experts yet",
- "emptyMyExpertsHint": "Create a new expert, or pick a template from Built-in Experts or the Expert Market.",
+ "emptyMyExpertsHint": "Create a new expert, or pick a template from the Expert Market.",
"emptyGuideTitle": "No experts yet",
- "emptyGuideDesc": "An expert is an AI assistant with its own identity and skills. Create one, or start from a Built-in or Market template.",
+ "emptyGuideDesc": "An expert is an AI assistant with its own identity and skills. Create one, or start from an Expert Market template.",
"emptyGuideStepWhat": "What is an expert?",
"emptyGuideStepWhatDetail": "Each expert has its own workspace, prompts, and skills, and can be reused in chat, channels, and scheduled tasks.",
"emptyGuideStepHow": "How to create one",
"emptyGuideStepHowDetail": "Click New expert for a blank expert, then configure model, skills, and persona as needed.",
"emptyGuideStepTemplate": "Faster with a template",
- "emptyGuideStepTemplateDetail": "Or create from Built-in Experts or the Expert Market for a ready-made starting point.",
+ "emptyGuideStepTemplateDetail": "Or create from the Expert Market for a ready-made starting point.",
"myTeams": "My Teams",
"teams": {
"betaBadge": "Beta",
@@ -947,12 +959,13 @@
"emptyGuideStepChatDetail": "Open the team from the sidebar. The host schedules; members speak in the same room.",
"total": "{{count}} team(s)"
},
- "goToLibrary": "Go to Built-in Experts",
- "emptyLibrary": "No built-in experts available",
- "emptyLibraryHint": "Please ask your administrator to configure built-in experts.",
+ "goToMarket": "Go to Expert Market",
"marketLoadFailed": "Failed to load the expert market",
- "marketBackendMissing": "The backend has not loaded the Expert Market API yet. Restart Octop or confirm it is running this updated code.",
- "marketSearchPlaceholder": "Search expert market",
+ "marketUnavailable": "The expert market is temporarily unavailable. Please try again later.",
+ "marketSearchPlaceholder": "Search",
+ "marketSourceRemote": "Expert Market",
+ "marketScenePrev": "Scroll left",
+ "marketSceneNext": "Scroll right",
"sceneAll": "All",
"scenes": {
"academic": "Academic",
@@ -974,8 +987,8 @@
"emptyMarketHint": "Try another keyword or check again later.",
"noMarketDescription": "This market expert has no description yet.",
"marketSkillCount": "{{count}} skill(s)",
- "createFromMarket": "Create from Market",
- "createAgainFromMarket": "Create another",
+ "createFromMarket": "Create",
+ "createAgainFromMarket": "Create again",
"marketCreateSuccess": "Created from Expert Market: {{name}}",
"marketCreateSuccessEnriching": "Created {{name}}. Welcome cards are being refined in the background and will update when you open the chat.",
"marketDetailLoadFailed": "Failed to load expert details",
@@ -1586,7 +1599,7 @@
"expertPickerManage": "Manage experts",
"expertPin": "Pin expert",
"expertUnpin": "Unpin expert",
- "expertHide": "Hide shared expert",
+ "expertHide": "Hide expert",
"expertUnhide": "Show expert again",
"expertPickerHidden": "Hidden experts ({{count}})",
"expertPickerShowVisible": "Back to experts",
@@ -1595,7 +1608,7 @@
"expertListHidden": "Hidden experts ({{count}})",
"expertListHiddenCollapse": "Collapse hidden experts",
"expertListShowVisible": "Back to expert list",
- "expertListHiddenEmpty": "No hidden shared experts",
+ "expertListHiddenEmpty": "No hidden experts",
"subagentPicker": "Subagents",
"subagentPickerSearch": "Search subagents",
"subagentPickerEmpty": "No installed subagents",
@@ -4307,7 +4320,7 @@
"securityPasskeyRemoved": "Passkey removed.",
"securityRecoveryRegenSuccess": "New recovery codes generated.",
"securityUnavailable": "Account security is not available yet (server MFA routes missing).",
- "securityTotpDesc": "TOTP is just a phone authenticator. It shows a new 6-digit code about every 30 seconds. Enter that code with your password.",
+ "securityTotpDesc": "After your password, enter the 6-digit code your authenticator refreshes every 30 seconds.",
"securityTotpTip1": "Install Microsoft Authenticator, Google Authenticator, or a similar app, then scan the QR code during setup. You do not need to copy a long secret by hand.",
"securityTotpTip2": "Each password sign-in then asks for the current 6-digit code. Save the recovery codes below before you change phones.",
"securityTotpDownload": "Authenticator app download (Microsoft Authenticator, for iPhone and Android):",
@@ -5558,6 +5571,11 @@
"password": "Password",
"test": "Test connection",
"testOk": "Connection successful.",
+ "testOkExisting": "Connected. This database already has {{count}} user(s). Continuing will sign in with those accounts.",
+ "adoptTitle": "Use existing accounts",
+ "adoptBody": "This PostgreSQL database already has users. Confirm to keep those accounts, skip creating an administrator, and go to the login page.",
+ "adoptOk": "Use existing accounts",
+ "adoptCancel": "Back",
"testFailed": "Database connection test failed.",
"applyFailed": "Could not save database settings.",
"alreadyBound": "Control-plane database is already bound ({{driver}}). Continue, or expand advanced options to switch engine before creating the admin.",
@@ -5701,6 +5719,7 @@
"kindS3": "Amazon S3",
"kindOss": "Alibaba OSS",
"kindObs": "Huawei OBS",
+ "kindTos": "Volcengine TOS",
"kindFilesystem": "Local Filesystem",
"kindShell": "Local Shell",
"kindPostgres": "PostgreSQL",
@@ -5711,6 +5730,8 @@
"descS3": "Amazon S3, the industry standard; its protocol is supported by most clouds and self-hosted stores.",
"descOss": "Alibaba Cloud OSS — best inside the Alibaba Cloud ecosystem; free intranet traffic and tiering.",
"descObs": "Huawei Cloud OBS — best inside the Huawei Cloud ecosystem; S3-compatible with tiered storage.",
+ "descTos": "Volcengine TOS object storage via the official SDK. Bucket, region, and endpoint are required.",
+ "tos_probe_ok": "TOS write/read probe succeeded",
"descFilesystem": "Mount a host directory as the workspace — fastest reads and writes, no network dependency.",
"descShell": "Run commands in a local shell with timeouts and env isolation; experts use the host toolchain.",
"descPostgres": "Use PostgreSQL tables as a structured backend with schema isolation; experts can share one instance.",
@@ -6092,7 +6113,10 @@
"statusEnabled": "Enabled",
"statusDisabled": "Disabled",
"ssoBadge": "SSO",
+ "directoryBadge": "Directory",
"passwordBadge": "Password",
+ "formDirectory": "Directory account",
+ "formDirectoryHint": "No local password. The username must match the directory login name; sign-in uses the directory password. Save LDAP settings first.",
"tabLocal": "User management",
"tabRoles": "Roles",
"tabGroups": "User groups",
@@ -6390,7 +6414,7 @@
"sectionServerHint": "Where Octop connects to authenticate users.",
"serverUrl": "Server URL",
"serverUrlPlaceholder": "ldap://ldap.example.com:389",
- "serverUrlHint": "Use ldaps:// for TLS on port 636, or ldap:// together with StartTLS.",
+ "serverUrlHint": "Use ldaps:// for TLS on port 636, or ldap:// together with StartTLS. A literal private or loopback address may stay unencrypted.",
"serverUrlRequired": "Enter the directory server URL",
"serverUrlInvalid": "Enter a valid ldap:// or ldaps:// URL",
"startTls": "StartTLS",
@@ -6430,7 +6454,7 @@
"adminGroupsHint": "Members of these groups get the admin role — only when an account is first created. Changing a directory group later never re-templates an existing account. Prefer full DNs: a bare CN also matches a same-named group in any other OU.",
"adminGroupsPlaceholder": "octop-admins, cn=it,ou=groups,dc=example,dc=com",
"autoProvision": "Create accounts on first sign-in",
- "autoProvisionHint": "When off, only existing Octop users can sign in through the directory.",
+ "autoProvisionHint": "When off, Octop does not create accounts. Accounts already linked to the directory can still sign in. For anyone else, pre-create a directory account in user management: the username must match the directory login name and it has no local password.",
"timeout": "Connection timeout (seconds)",
"timeoutHint": "How long to wait for the directory before failing a request.",
"timeoutRequired": "Enter a timeout in seconds",
@@ -6469,7 +6493,8 @@
"tls_verification_disabled": "TLS certificate verification is off. Only acceptable for a test server with a self-signed certificate.",
"no_admin_groups": "No admin group is configured, so no directory user can become an Octop admin at first sign-in.",
"auto_provision_open": "Automatic account creation is on with no sign-in allow-list: every account the filter matches gets an Octop account.",
- "identity_key_is_dn": "No identity key attribute is set while automatic account creation is on, so new accounts are keyed on their entry DN — renaming or moving a user in the directory creates a second Octop account."
+ "identity_key_is_dn": "No identity key attribute is set while automatic account creation is on, so new accounts are keyed on their entry DN — renaming or moving a user in the directory creates a second Octop account.",
+ "cleartext_ldap": "This connection is plain ldap://. That is only allowed for a literal private or loopback address, and passwords travel in clear text."
},
"subjectAttributeDetected": "Detected {{name}} on this directory — set it as the identity key so renames keep the same account."
}
@@ -6941,6 +6966,7 @@
"marketTitle": "Plugin marketplace",
"marketHint": "Browse curated plugins and install them to this server.",
"marketLoadError": "Failed to load marketplace",
+ "marketUnavailable": "The plugin marketplace is temporarily unavailable. Please try again later.",
"marketEmpty": "No plugins in the marketplace catalog",
"marketSearchPlaceholder": "Search plugin marketplace",
"marketSearchEmpty": "No plugins match your search",
diff --git a/dashboard/src/locales/zh.json b/dashboard/src/locales/zh.json
index 8831f3ecf8..10a8ac1fb7 100644
--- a/dashboard/src/locales/zh.json
+++ b/dashboard/src/locales/zh.json
@@ -107,7 +107,7 @@
"AUTH_FAILED": "认证失败。",
"TOKEN_EXPIRED": "登录已过期,请重新登录。",
"SETUP_REQUIRED": "需要完成初始设置。",
- "DATABASE_NOT_EMPTY": "目标数据库已有用户。请改用空库,或直接登录现有管理员账户。",
+ "DATABASE_NOT_EMPTY": "目标数据库已有用户。PostgreSQL 可确认后沿用现有账户;SQLite 请改用空库。",
"BACKUP_DRIVER_MISMATCH": "该备份与当前数据库引擎不一致(SQLite 与 PostgreSQL 不能互恢)。请将运行时切回备份所用引擎后再恢复,或在当前引擎上重新备份。暂不支持跨引擎恢复。",
"BACKUP_SCHEMA_INCOMPATIBLE": "该备份使用数据库结构版本 {{archive_schema_version}},当前 Octop 版本无法恢复(最高支持版本:{{runtime_schema_version}})。",
"BACKUP_IN_PROGRESS": "已有备份或恢复任务正在进行,请稍后再试。",
@@ -171,6 +171,7 @@
"BRIDGE_SELF_CONNECT": "不能把本机 Octop 添加为自己的对端。",
"BRIDGE_INBOUND_PASSIVE": "这是对端主动接入的连接,本侧无法改地址或主动拨号。断开后需对端重新打开。",
"CRON_TRIGGER_INVALID": "无效的定时触发器。",
+ "CRON_ALREADY_RUNNING": "该任务已在其他实例上运行。",
"SLASH_UNKNOWN": "未知的斜杠指令。",
"SLASH_BAD_ARGS": "参数无效。",
"ATTACHMENT_UNSUPPORTED_TYPE": "不支持此文件类型。",
@@ -201,13 +202,16 @@
"LDAP_UNAVAILABLE": "LDAP 目录服务不可用。请检查服务器地址与绑定凭证。",
"LDAP_USER_NOT_PROVISIONED": "该目录账号尚未创建 Octop 账号。请联系管理员创建,或开启自动创建账号。",
"LDAP_GROUP_NOT_ALLOWED": "该目录账号不属于允许登录的用户组。请联系管理员将你加入允许登录的组。",
+ "LDAP_NOT_CONFIGURED": "请先保存 LDAP 配置,再创建目录账号。",
"EXPERT_MARKET_FAILED": "专家市场暂时不可用,请稍后重试。",
+ "NETWORK_ERROR": "网络异常,请检查网络连接后重试。",
"SKILLHUB_SSL_FAILED": "SkillHub 请求失败:检测到 Python SSL 错误。macOS 可尝试 `brew reinstall openssl@3`,或检查系统 CA 证书。",
"DESKTOP_SESSION_LIMIT": "远程桌面并发连接已达上限(最多 {{limit}} 路),请关闭其他连接后重试。",
"DESKTOP_CAPTURE_FAILED": "连续抓屏失败。Linux 服务器请重启虚拟桌面;macOS 请在系统设置中授予屏幕录制与辅助功能权限后重连。",
"BROWSER_NOT_ENABLED": "浏览器已安装,但尚未启用。请在远程浏览器页面确认启用。",
"PLUGIN_INVALID_ARCHIVE": "下载内容不是有效的插件 ZIP。请使用直接的 .zip 下载地址(GitHub 请用 raw.githubusercontent.com 或 “Download/raw” 链接,不要用 /blob/ 页面地址)。",
"PLUGIN_INSTALL_FAILED": "下载或安装插件失败:{{reason}}",
+ "PLUGIN_MARKET_FAILED": "插件市场暂时不可用,请稍后重试。",
"PLUGIN_ALREADY_EXISTS": "插件 {{id}} 已安装。",
"KNOWLEDGE_FEATURE_DISABLED": "管理员尚未启用知识库功能。",
"KNOWLEDGE_PREREQUISITES_RESTART_REQUIRED": "知识库的向量模型或依赖已安装,但当前进程还加载不到,需要重启服务后生效。",
@@ -543,6 +547,10 @@
"renameFolder": "重命名文件夹",
"renameFolderSuccess": "文件夹已重命名",
"renameFolderFailed": "重命名文件夹失败",
+ "renameFile": "重命名文件",
+ "renameFileSuccess": "文件已重命名",
+ "renameFileFailed": "重命名文件失败",
+ "filenamePlaceholder": "文件名",
"pathBreadcrumb": "路径导航",
"deleteFolderConfirm": "删除此文件夹及其内部文档?",
"uploaded": "文档已上传",
@@ -554,6 +562,11 @@
"filename": "文件名",
"status": "状态",
"chunks": "分块数",
+ "previewFile": "原文",
+ "previewChunks": "切片",
+ "chunksEmpty": "还没有切片。文档索引完成后会显示在这里。",
+ "chunksFailed": "无法加载切片",
+ "chunkLabel": "切片 {{n}}",
"chunkCount": "{{count}} 个分块",
"statuses": {
"pending": "待处理",
@@ -813,12 +826,12 @@
"badge": "已发布",
"cardPublish": "发布模板",
"publishConfirmTitle": "发布为模板?",
- "publishConfirm": "将把当前专家打成快照模板。其他用户可在「专家库 → 用户发布」中安装为自己的私有副本;不会共享你的对话记录。",
+ "publishConfirm": "将把当前专家打成快照模板。其他用户可在「专家市场」中安装为自己的私有副本;不会共享你的对话记录。",
"statusPublished": "此专家已发布为社区模板。",
"statusNotPublished": "发布此专家,让其他用户可以安装私有副本。",
"publish": "发布",
"publishSuccess": "模板已发布",
- "publishSuccessHint": "模板已发布。其他用户可在「专家库 → 用户发布」中安装。",
+ "publishSuccessHint": "模板已发布。其他用户可在「专家市场」中安装。",
"publishFailed": "发布模板失败",
"update": "更新已发布模板",
"updateSuccess": "已更新发布模板",
@@ -827,7 +840,8 @@
"unpublishConfirm": "确定取消发布此模板?已安装的私有副本不会受影响。",
"unpublishSuccess": "模板已取消发布",
"unpublishFailed": "取消发布模板失败",
- "listTitle": "用户发布({{count}})",
+ "scene": "用户分享",
+ "listTitle": "用户发布专家({{count}})",
"listHint": "由本实例用户发布的模板。点击「安装」可为自己创建一份私有专家。",
"emptyHint": "还没有用户发布的模板。在「我的专家」卡片上点击上传图标即可发布。",
"by": "来自 {{name}}",
@@ -869,8 +883,7 @@
"proactive": "主动推送"
},
"myExperts": "我的专家",
- "expertLibrary": "内置专家模板",
- "expertMarket": "专家市场",
+ "expertMarket": "发现专家",
"viewCard": "卡片",
"viewTable": "表格",
"mbtiUnset": "未设置",
@@ -894,22 +907,21 @@
"searchPlaceholder": "搜索专家",
"searchEmpty": "没有匹配的专家",
"filterEmpty": "没有符合当前筛选的结果",
- "totalLibrary": "共 {{count}} 个内置专家",
- "totalMarket": "共 {{count}} 个市场专家",
- "addFromLibrary": "+ 从内置专家模板新建",
+ "totalMarket": "共 {{count}} 个",
+ "addFromMarket": "从专家市场新建",
"newExpert": "新建专家",
"addCloudExpert": "添加云端专家",
"addCloudExpertHint": "打开云端协同,添加对端 Octop 上的专家",
"emptyMyExperts": "你还没有专家",
- "emptyMyExpertsHint": "点击新建专家,或从内置专家、专家市场选择模板。",
+ "emptyMyExpertsHint": "点击新建专家,或从专家市场选择模板。",
"emptyGuideTitle": "还没有专家",
- "emptyGuideDesc": "专家是带身份与技能的 AI 助手。可新建,或从内置/市场选用模板。",
+ "emptyGuideDesc": "专家是带身份与技能的 AI 助手。可新建,或从专家市场选用模板。",
"emptyGuideStepWhat": "专家是什么",
"emptyGuideStepWhatDetail": "每个专家有独立工作区、提示词与技能,可在对话、渠道和定时任务中复用。",
"emptyGuideStepHow": "怎么创建",
"emptyGuideStepHowDetail": "点击「新建专家」快速开一个空白专家,再按需配置模型、技能与人格。",
"emptyGuideStepTemplate": "用模板更快上手",
- "emptyGuideStepTemplateDetail": "也可从「内置专家」或「专家市场」选模板创建,开箱即用。",
+ "emptyGuideStepTemplateDetail": "也可从「专家市场」选模板创建,开箱即用。",
"myTeams": "我的团队",
"teams": {
"betaBadge": "Beta",
@@ -947,12 +959,13 @@
"emptyGuideStepChatDetail": "从侧栏进入团队聊天。主持人负责调度,成员气泡会出现在同一房间。",
"total": "共 {{count}} 个团队"
},
- "goToLibrary": "去内置专家",
- "emptyLibrary": "暂无可用的内置专家",
- "emptyLibraryHint": "请联系管理员配置内置专家。",
+ "goToMarket": "去专家市场",
"marketLoadFailed": "加载专家市场失败",
- "marketBackendMissing": "后端还没有加载专家市场接口,请重启 Octop 后端或确认当前运行的是这份新代码。",
- "marketSearchPlaceholder": "搜索专家市场",
+ "marketUnavailable": "专家市场暂时不可用,请稍后重试。",
+ "marketSearchPlaceholder": "搜索",
+ "marketSourceRemote": "专家市场",
+ "marketScenePrev": "向左滚动",
+ "marketSceneNext": "向右滚动",
"sceneAll": "全部",
"scenes": {
"academic": "学术",
@@ -974,8 +987,8 @@
"emptyMarketHint": "可以换个关键词,或稍后再试。",
"noMarketDescription": "该市场专家暂未提供简介。",
"marketSkillCount": "{{count}} 个技能",
- "createFromMarket": "从市场创建",
- "createAgainFromMarket": "再创建一个",
+ "createFromMarket": "创建",
+ "createAgainFromMarket": "再次创建",
"marketCreateSuccess": "已从专家市场创建:{{name}}",
"marketCreateSuccessEnriching": "已创建 {{name}}。欢迎卡片正在后台优化,稍后进入对话即可看到更新。",
"marketDetailLoadFailed": "加载专家详情失败",
@@ -1586,7 +1599,7 @@
"expertPickerManage": "管理专家",
"expertPin": "置顶专家",
"expertUnpin": "取消置顶专家",
- "expertHide": "隐藏共享专家",
+ "expertHide": "隐藏专家",
"expertUnhide": "重新显示专家",
"expertPickerHidden": "已隐藏专家({{count}})",
"expertPickerShowVisible": "返回专家列表",
@@ -1595,7 +1608,7 @@
"expertListHidden": "已隐藏专家({{count}})",
"expertListHiddenCollapse": "收起已隐藏专家",
"expertListShowVisible": "返回专家列表",
- "expertListHiddenEmpty": "暂无已隐藏的共享专家",
+ "expertListHiddenEmpty": "暂无已隐藏专家",
"subagentPicker": "子智能体",
"subagentPickerSearch": "搜索子智能体",
"subagentPickerEmpty": "暂无已安装的子智能体",
@@ -4307,7 +4320,7 @@
"securityPasskeyRemoved": "已移除通行密钥。",
"securityRecoveryRegenSuccess": "已生成新的恢复码。",
"securityUnavailable": "账户安全暂不可用(服务器 MFA 接口尚未就绪)。",
- "securityTotpDesc": "TOTP 就是手机上的验证器。它大约每 30 秒换一个 6 位数字,用密码登录时再填一次。",
+ "securityTotpDesc": "密码登录时再填一次验证器每 30 秒更新的 6 位数字。",
"securityTotpTip1": "在手机安装 Microsoft Authenticator、Google Authenticator 或同类应用,设置时扫描二维码即可,不用手抄一长串密钥。",
"securityTotpTip2": "之后每次用密码登录,都要再填应用里当前的 6 位数字。换手机前先备好下面的恢复码。",
"securityTotpDownload": "验证器应用下载(Microsoft Authenticator,iPhone 和 Android 都能装):",
@@ -5558,6 +5571,11 @@
"password": "密码",
"test": "测试连接",
"testOk": "连接成功。",
+ "testOkExisting": "连接成功。该库已有 {{count}} 个用户,继续后将使用现有账户登录。",
+ "adoptTitle": "使用已有账户",
+ "adoptBody": "该 PostgreSQL 数据库已有用户。确认后将沿用这些账户,不再创建新管理员,并进入登录页。",
+ "adoptOk": "使用现有账户",
+ "adoptCancel": "返回",
"testFailed": "数据库连接测试失败。",
"applyFailed": "无法保存数据库配置。",
"alreadyBound": "控制面数据库已绑定({{driver}})。可直接继续;若要在创建管理员前更换引擎,请展开高级选项。",
@@ -5701,6 +5719,7 @@
"kindS3": "Amazon S3",
"kindOss": "阿里云 OSS",
"kindObs": "华为云 OBS",
+ "kindTos": "火山引擎 TOS",
"kindFilesystem": "本地文件系统",
"kindShell": "本地 Shell",
"kindPostgres": "PostgreSQL",
@@ -5711,6 +5730,8 @@
"descS3": "Amazon S3,业界标准对象存储;协议兼容绝大多数云厂商与自建服务,适合跨区域部署。",
"descOss": "阿里云对象存储 OSS,适合阿里云生态;内网访问免流量费,支持生命周期与冷热分层。",
"descObs": "华为云对象存储 OBS,适合华为云生态;兼容 S3 接口,支持多级存储与并行文件语义。",
+ "descTos": "火山引擎 TOS,使用官方 SDK。需要填写 Bucket、Region 和 Endpoint。",
+ "tos_probe_ok": "TOS 写入/读取探测成功",
"descFilesystem": "挂载宿主机本地目录作为工作区,读写最快、无网络依赖;适合开发调试与单机部署。",
"descShell": "在宿主机本地 Shell 中执行命令,支持超时与环境变量隔离;专家可直接使用宿主工具链。",
"descPostgres": "将 PostgreSQL 表用作结构化存储后端,支持 Schema 隔离;多个专家可共享同一实例。",
@@ -6092,7 +6113,10 @@
"statusEnabled": "已启用",
"statusDisabled": "已禁用",
"ssoBadge": "单点登录",
+ "directoryBadge": "目录",
"passwordBadge": "密码",
+ "formDirectory": "目录账号",
+ "formDirectoryHint": "不设置本地密码。用户名须与目录登录名一致,登录时使用目录密码。请先保存 LDAP 配置。",
"tabLocal": "用户管理",
"tabRoles": "角色管理",
"tabGroups": "用户分组",
@@ -6390,7 +6414,7 @@
"sectionServerHint": "Octop 连接此服务器完成用户认证。",
"serverUrl": "服务器地址",
"serverUrlPlaceholder": "ldap://ldap.example.com:389",
- "serverUrlHint": "ldaps:// 表示 636 端口的 TLS;ldap:// 可配合 StartTLS 升级为加密连接。",
+ "serverUrlHint": "ldaps:// 表示 636 端口的 TLS;ldap:// 可配合 StartTLS 升级为加密连接。字面量内网或回环地址可以不加密。",
"serverUrlRequired": "请输入目录服务器地址",
"serverUrlInvalid": "请输入有效的 ldap:// 或 ldaps:// 地址",
"startTls": "StartTLS",
@@ -6430,7 +6454,7 @@
"adminGroupsHint": "这些组的成员在 Octop 中获得管理员角色 —— 仅首次创建账号时判定,之后改目录组不会重新套用到已有账号。建议填完整 DN;只填 CN 会匹配到任意 OU 下的同名组。",
"adminGroupsPlaceholder": "octop-admins, cn=it,ou=groups,dc=example,dc=com",
"autoProvision": "首次登录时自动创建账号",
- "autoProvisionHint": "关闭后,仅已存在的 Octop 用户可通过目录登录。",
+ "autoProvisionHint": "关闭后不会自动建号。已绑定的目录账号仍可登录;新用户请在用户管理里预先创建目录账号(用户名与目录登录名一致,不设本地密码)。",
"timeout": "连接超时(秒)",
"timeoutHint": "等待目录响应的最长时间,超时即视为失败。",
"timeoutRequired": "请输入超时秒数",
@@ -6469,7 +6493,8 @@
"tls_verification_disabled": "已关闭 TLS 证书校验。仅适用于使用自签名证书的测试服务器。",
"no_admin_groups": "未配置管理员组,首次登录时不会有目录用户成为 Octop 管理员。",
"auto_provision_open": "已开启自动创建账号且未设置允许登录组:过滤条件命中的任何账号都会在 Octop 建号。",
- "identity_key_is_dn": "开启了自动创建账号但未设置身份主键:新账号会绑定到条目 DN,目录里改名或换 OU 会产生第二个 Octop 账号。"
+ "identity_key_is_dn": "开启了自动创建账号但未设置身份主键:新账号会绑定到条目 DN,目录里改名或换 OU 会产生第二个 Octop 账号。",
+ "cleartext_ldap": "当前连接是未加密的 ldap://。仅适用于字面量内网或回环地址;口令会以明文在网上传输。"
},
"subjectAttributeDetected": "检测到该目录提供 {{name}},建议设为身份主键,这样用户改名后仍对应同一账号。"
}
@@ -6941,6 +6966,7 @@
"marketTitle": "插件市场",
"marketHint": "浏览精选插件,一键安装到本机。",
"marketLoadError": "加载插件市场失败",
+ "marketUnavailable": "插件市场暂时不可用,请稍后重试。",
"marketEmpty": "市场目录暂无插件",
"marketSearchPlaceholder": "搜索插件市场",
"marketSearchEmpty": "没有匹配的插件",
diff --git a/dashboard/src/pages/Admin/Plugins/InstalledPluginsPanel.tsx b/dashboard/src/pages/Admin/Plugins/InstalledPluginsPanel.tsx
index ec230efe0c..0fd108ad1d 100644
--- a/dashboard/src/pages/Admin/Plugins/InstalledPluginsPanel.tsx
+++ b/dashboard/src/pages/Admin/Plugins/InstalledPluginsPanel.tsx
@@ -35,6 +35,7 @@ import {
} from "lucide-react";
import { useTranslation } from "react-i18next";
import { useSearchParams } from "react-router-dom";
+import cx from "classnames";
import { pluginsApi, type InstalledPlugin } from "../../../api/modules/plugins";
import type { ResourceVisibilityMode } from "../../../api/modules/userGroups";
import { ResourceVisibilityCollapse } from "../../../components/ResourceVisibilityFields";
@@ -413,7 +414,9 @@ export function InstalledPluginsPanel() {
{showCardView ? (
loading ? (
-
+
+
+
) : plugins.length === 0 ? (
@@ -663,9 +664,7 @@ export function InstalledPluginsPanel() {
{t("plugins.colPath")}
-
+
{detail.path || "—"}
@@ -673,9 +672,7 @@ export function InstalledPluginsPanel() {
{t("plugins.colUi")}
-
+
{detail.ui?.entry || "—"}
diff --git a/dashboard/src/pages/Admin/Plugins/PluginIconView.tsx b/dashboard/src/pages/Admin/Plugins/PluginIconView.tsx
index c6c021d58f..229897bf23 100644
--- a/dashboard/src/pages/Admin/Plugins/PluginIconView.tsx
+++ b/dashboard/src/pages/Admin/Plugins/PluginIconView.tsx
@@ -1,5 +1,6 @@
import { Package, Wrench } from "lucide-react";
import type { CSSProperties } from "react";
+import { FadeInImg } from "../../../components/FadeInImg";
import { useAuthImageSrc } from "../../../hooks/useAuthImageSrc";
import { needsAuthBlobFetch } from "../../../utils/toolMediaBlocks";
@@ -18,6 +19,9 @@ export interface PluginIconViewProps {
className?: string;
style?: CSSProperties;
fallback?: "package" | "wrench";
+ crossOrigin?: "anonymous" | "use-credentials";
+ /** Fade the bitmap in after it finishes loading. */
+ fadeIn?: boolean;
}
function PluginIconImage({
@@ -26,12 +30,16 @@ function PluginIconImage({
className,
style,
shell,
+ crossOrigin,
+ fadeIn = false,
}: {
url: string;
size: number;
className?: string;
style?: CSSProperties;
shell: CSSProperties;
+ crossOrigin?: "anonymous" | "use-credentials";
+ fadeIn?: boolean;
}) {
const authNeeded = needsAuthBlobFetch(url);
const { src, loadState } = useAuthImageSrc(url);
@@ -48,12 +56,23 @@ function PluginIconImage({
}}
>
{ready ? (
-
+ fadeIn ? (
+
+ ) : (
+
+ )
) : (
)}
@@ -68,6 +87,8 @@ export function PluginIconView({
className,
style,
fallback = "package",
+ crossOrigin,
+ fadeIn = false,
}: PluginIconViewProps) {
const trimmed = (icon || "").trim();
const radius = Math.max(10, Math.round(size * 0.28));
@@ -92,6 +113,8 @@ export function PluginIconView({
className={className}
style={style}
shell={shell}
+ crossOrigin={crossOrigin}
+ fadeIn={fadeIn}
/>
);
}
diff --git a/dashboard/src/pages/Admin/Plugins/PluginMarketPanel.tsx b/dashboard/src/pages/Admin/Plugins/PluginMarketPanel.tsx
index 3fea906a94..dae19548ee 100644
--- a/dashboard/src/pages/Admin/Plugins/PluginMarketPanel.tsx
+++ b/dashboard/src/pages/Admin/Plugins/PluginMarketPanel.tsx
@@ -1,5 +1,5 @@
-import { useCallback, useEffect, useMemo, useState } from "react";
-import { Button, Empty, Input, Segmented, Tag } from "antd";
+import { useCallback, useEffect, useMemo, useRef, useState } from "react";
+import { Button, Empty, Input, Result, Tag } from "antd";
import { message } from "@/utils/antdMessage";
import {
ArrowUpCircle,
@@ -9,9 +9,13 @@ import {
Search,
} from "lucide-react";
import { useTranslation } from "react-i18next";
+import cx from "classnames";
import { pluginsApi, type MarketPlugin } from "../../../api/modules/plugins";
+import { OctopEmptyMascot } from "../../../components/EmptyState";
+import PillScroller from "../../../components/PillScroller";
import { CardSkeleton } from "../../../components/Skeleton";
import { apiErrorMessage } from "../../../utils/apiError";
+import { isCatalogNetworkError } from "../../../utils/networkError";
import styles from "./index.module.less";
import { PluginIconView } from "./PluginIconView";
import { PluginCardMeta } from "./PluginCardMeta";
@@ -37,15 +41,18 @@ function matchesMarketQuery(row: MarketPlugin, query: string): boolean {
return haystack.includes(q);
}
-/** Marketplace catalog — install copies in-tree packages to ~/.octop/plugins. */
export function PluginMarketPanel() {
const { t } = useTranslation();
const [items, setItems] = useState([]);
const [loading, setLoading] = useState(true);
const [refreshing, setRefreshing] = useState(false);
+ const [loadFailed, setLoadFailed] = useState(false);
+ const [networkFailure, setNetworkFailure] = useState(false);
+ const itemsRef = useRef(items);
const [installingId, setInstallingId] = useState(null);
const [activeGroup, setActiveGroup] = useState(GROUP_ALL);
const [keyword, setKeyword] = useState("");
+ itemsRef.current = items;
const fetchMarket = useCallback(
async (force = false) => {
@@ -54,8 +61,19 @@ export function PluginMarketPanel() {
try {
const rows = await pluginsApi.listMarket();
setItems(rows);
+ setLoadFailed(false);
+ setNetworkFailure(false);
} catch (err) {
- message.error(apiErrorMessage(err, t("plugins.marketLoadError"), t));
+ const network = isCatalogNetworkError(err, "NETWORK_ERROR");
+ setNetworkFailure(network);
+ setLoadFailed(true);
+ if (itemsRef.current.length > 0) {
+ message.error(
+ network
+ ? t("apiErrors.NETWORK_ERROR")
+ : t("plugins.marketUnavailable"),
+ );
+ }
} finally {
setLoading(false);
setRefreshing(false);
@@ -68,12 +86,14 @@ export function PluginMarketPanel() {
void fetchMarket();
}, [fetchMarket]);
- const handleInstall = async (row: MarketPlugin, force: boolean) => {
+ const handleInstall = async (row: MarketPlugin) => {
setInstallingId(row.id);
try {
- await pluginsApi.installFromMarket(row.id, force);
+ await pluginsApi.installFromMarket(row.id, row.version);
message.success(
- force ? t("plugins.marketUpdateSuccess") : t("plugins.installSuccess"),
+ row.update_available
+ ? t("plugins.marketUpdateSuccess")
+ : t("plugins.installSuccess"),
);
notifyPluginsChanged();
await fetchMarket(true);
@@ -127,48 +147,84 @@ export function PluginMarketPanel() {
}
}, [activeGroup, groupOptions]);
+ const catalogFailed = loadFailed && items.length === 0;
+
return (
-
-
-
- {t("plugins.totalMarket", { count: filtered.length })}
-
-
-
-
}
- allowClear
- value={keyword}
- placeholder={t("plugins.marketSearchPlaceholder")}
- onChange={(e) => setKeyword(e.target.value)}
- />
-
}
- loading={refreshing}
- onClick={() => void fetchMarket(true)}
- >
- {t("plugins.marketRefresh")}
-
+ {!catalogFailed && (
+
+
+ {loading ? null : (
+
+ {t("plugins.totalMarket", { count: filtered.length })}
+
+ )}
+
+
+ }
+ allowClear
+ value={keyword}
+ placeholder={t("plugins.marketSearchPlaceholder")}
+ onChange={(e) => setKeyword(e.target.value)}
+ />
+ }
+ loading={refreshing}
+ onClick={() => void fetchMarket(true)}
+ />
+
-
+ )}
- {!keyword.trim() && groupOptions.length > 1 ? (
-
- setActiveGroup(String(v))}
- options={groupOptions}
- className={styles.groupTabs}
- />
-
+ {!catalogFailed && !keyword.trim() && groupOptions.length > 1 ? (
+
) : null}
{loading ? (
-
+
+
+
+ ) : catalogFailed ? (
+
+ }
+ title={t("plugins.marketLoadError")}
+ subTitle={
+ networkFailure
+ ? t("apiErrors.NETWORK_ERROR")
+ : t("plugins.marketUnavailable")
+ }
+ extra={
+ void fetchMarket(true)}
+ >
+ {t("common.retry")}
+
+ }
+ />
+
) : filtered.length === 0 ? (
@@ -198,6 +252,8 @@ export function PluginMarketPanel() {
icon={row.icon}
size={32}
className={styles.cardIcon}
+ crossOrigin="anonymous"
+ fadeIn
/>
{row.name || row.id}
@@ -232,7 +288,7 @@ export function PluginMarketPanel() {
size="small"
icon={
}
loading={installingId === row.id}
- onClick={() => void handleInstall(row, true)}
+ onClick={() => void handleInstall(row)}
>
{t("plugins.marketUpdate")}
@@ -246,7 +302,7 @@ export function PluginMarketPanel() {
size="small"
icon={
}
loading={installingId === row.id}
- onClick={() => void handleInstall(row, false)}
+ onClick={() => void handleInstall(row)}
>
{t("plugins.marketInstall")}
diff --git a/dashboard/src/pages/Admin/Plugins/index.module.less b/dashboard/src/pages/Admin/Plugins/index.module.less
index ab9d0ad73c..e64707d0d0 100644
--- a/dashboard/src/pages/Admin/Plugins/index.module.less
+++ b/dashboard/src/pages/Admin/Plugins/index.module.less
@@ -1,6 +1,60 @@
.panel {
width: 100%;
min-width: 0;
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+}
+
+.marketStage {
+ flex: 1;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ width: 100%;
+ min-height: 240px;
+}
+
+/* antd Card's dark token (#161822) tints these placeholders blue. */
+:global(html[data-theme="dark"]) .loadingSkeleton {
+ :global(.octop-card) {
+ background: var(--fn-bg-primary) !important;
+ border-color: var(--fn-card-border-normal) !important;
+ }
+
+ :global(.octop-skeleton-title),
+ :global(.octop-skeleton-paragraph > li),
+ :global(.octop-skeleton-avatar) {
+ /* Image only. The `background` shorthand would pin background-position and stop antd's shimmer. */
+ background-image: linear-gradient(
+ 90deg,
+ var(--fn-bg-tertiary) 25%,
+ color-mix(in srgb, var(--fn-bg-tertiary) 78%, #fff) 37%,
+ var(--fn-bg-tertiary) 63%
+ ) !important;
+ background-size: 400% 100% !important;
+ }
+}
+
+.marketLoadResult {
+ padding: 16px;
+
+ :global(.ant-result-icon) {
+ display: flex;
+ justify-content: center;
+ margin-bottom: 0;
+ }
+
+ :global(.ant-result-title) {
+ font-size: 16px;
+ line-height: 1.4;
+ }
+
+ :global(.ant-result-subtitle) {
+ max-width: 360px;
+ margin-inline: auto;
+ color: var(--fn-text-tertiary);
+ }
}
.emptyWithAction {
@@ -74,24 +128,16 @@
}
.groupTabsWrap {
+ display: flex;
+ flex-wrap: wrap;
+ align-items: center;
+ gap: 8px;
margin-bottom: 14px;
- overflow-x: auto;
- -webkit-overflow-scrolling: touch;
- padding-bottom: 2px;
}
-.groupTabs {
- width: 100%;
- min-width: max-content;
-
- :global(.ant-segmented-item) {
- min-width: 4.5em;
- }
-
- :global(.ant-segmented-item-label) {
- font-weight: 500;
- white-space: nowrap;
- }
+.marketGroupScroller {
+ margin-top: 0;
+ margin-bottom: 14px;
}
.toolbarLeft {
diff --git a/dashboard/src/pages/Admin/Storage/StorageBackendCard.tsx b/dashboard/src/pages/Admin/Storage/StorageBackendCard.tsx
index b1bd3b5d49..ae58d35c81 100644
--- a/dashboard/src/pages/Admin/Storage/StorageBackendCard.tsx
+++ b/dashboard/src/pages/Admin/Storage/StorageBackendCard.tsx
@@ -16,6 +16,7 @@ import {
FolderOpen,
} from "lucide-react";
import { useTranslation } from "react-i18next";
+import cx from "classnames";
import { request } from "../../../api/request";
import { apiErrorMessage, parseApiError } from "../../../utils/apiError";
import {
@@ -176,9 +177,7 @@ export function StorageBackendCard({
return (
<>
(
{tag.label}
@@ -528,12 +528,10 @@ export default function GroupsPanel() {
{filtered.map((row) => (
diff --git a/dashboard/src/pages/Admin/Users/LdapPanel.test.tsx b/dashboard/src/pages/Admin/Users/LdapPanel.test.tsx
new file mode 100644
index 0000000000..583de8e163
--- /dev/null
+++ b/dashboard/src/pages/Admin/Users/LdapPanel.test.tsx
@@ -0,0 +1,115 @@
+import { beforeEach, describe, expect, it, vi } from "vitest";
+import { fireEvent, render, screen, waitFor } from "@testing-library/react";
+import userEvent from "@testing-library/user-event";
+import type { LdapConfig } from "../../../api/modules/sso";
+
+const { getLdapConfig, putLdapConfig, t } = vi.hoisted(() => ({
+ getLdapConfig: vi.fn(),
+ putLdapConfig: vi.fn(),
+ t: (key: string) => key,
+}));
+
+vi.mock("react-i18next", () => ({
+ useTranslation: () => ({
+ t,
+ i18n: { language: "zh", changeLanguage: () => Promise.resolve() },
+ }),
+}));
+
+vi.mock("../../../api/modules/sso", () => ({
+ ssoApi: {
+ getLdapConfig,
+ putLdapConfig,
+ testLdapConfig: vi.fn(),
+ },
+}));
+
+vi.mock("@/utils/antdMessage", () => ({
+ message: { error: vi.fn(), success: vi.fn(), warning: vi.fn() },
+}));
+
+import LdapPanel from "./LdapPanel";
+
+const config: LdapConfig = {
+ enabled: false,
+ display_name: "Directory",
+ server_url: "ldaps://directory.example.com",
+ start_tls: false,
+ verify_tls: true,
+ bind_dn: "",
+ has_bind_password: true,
+ user_base_dn: "ou=people,dc=example,dc=com",
+ user_filter: "(uid={username})",
+ username_attribute: "uid",
+ email_attribute: "mail",
+ display_name_attribute: "cn",
+ subject_attribute: "",
+ group_attribute: "memberOf",
+ group_search: false,
+ group_search_base: "ou=groups,dc=example,dc=com",
+ group_member_attribute: "uniqueMember",
+ admin_groups: "",
+ allowed_groups: "",
+ auto_provision: false,
+ timeout_seconds: 27,
+ warnings: [],
+};
+
+describe(" saving", () => {
+ beforeEach(() => {
+ vi.clearAllMocks();
+ getLdapConfig.mockResolvedValue(config);
+ putLdapConfig.mockResolvedValue(config);
+ });
+
+ it("saves hidden group settings when group search is off", async () => {
+ const user = userEvent.setup();
+ render( );
+ await screen.findByDisplayValue(config.server_url);
+
+ fireEvent.change(screen.getByLabelText("adminSso.ldap.displayName"), {
+ target: { value: "Updated" },
+ });
+ await user.click(
+ screen.getByRole("button", { name: "adminSso.ldap.save" }),
+ );
+
+ await waitFor(() => expect(putLdapConfig).toHaveBeenCalledOnce());
+ expect(putLdapConfig.mock.calls[0][0]).toMatchObject({
+ display_name: "Updated",
+ group_search: false,
+ group_search_base: config.group_search_base,
+ group_member_attribute: config.group_member_attribute,
+ timeout_seconds: 27,
+ admin_groups: "",
+ allowed_groups: "",
+ });
+ expect(putLdapConfig.mock.calls[0][0]).not.toHaveProperty("bind_password");
+ });
+
+ it("keeps an edited group base after group search is turned off", async () => {
+ const user = userEvent.setup();
+ getLdapConfig.mockResolvedValue({ ...config, group_search: true });
+ render( );
+ await screen.findByDisplayValue(config.server_url);
+
+ fireEvent.change(screen.getByLabelText("adminSso.ldap.groupSearchBase"), {
+ target: { value: "ou=new,dc=example,dc=com" },
+ });
+ await user.click(document.getElementById("group_search") as HTMLElement);
+ expect(
+ screen.queryByLabelText("adminSso.ldap.groupSearchBase"),
+ ).not.toBeInTheDocument();
+ await user.click(
+ screen.getByRole("button", { name: "adminSso.ldap.save" }),
+ );
+
+ await waitFor(() => expect(putLdapConfig).toHaveBeenCalledOnce());
+ expect(putLdapConfig.mock.calls[0][0]).toMatchObject({
+ group_search: false,
+ group_search_base: "ou=new,dc=example,dc=com",
+ group_member_attribute: "uniqueMember",
+ timeout_seconds: 27,
+ });
+ });
+});
diff --git a/dashboard/src/pages/Admin/Users/LdapPanel.tsx b/dashboard/src/pages/Admin/Users/LdapPanel.tsx
index 875ad11f7c..f7a16096cc 100644
--- a/dashboard/src/pages/Admin/Users/LdapPanel.tsx
+++ b/dashboard/src/pages/Admin/Users/LdapPanel.tsx
@@ -19,6 +19,7 @@ import {
XCircle,
} from "lucide-react";
import { useTranslation } from "react-i18next";
+import cx from "classnames";
import { message } from "@/utils/antdMessage";
import {
ssoApi,
@@ -73,6 +74,10 @@ const DEFAULT_GROUP_ATTRIBUTE = "memberOf";
const DEFAULT_GROUP_MEMBER_ATTRIBUTE = "member";
const DEFAULT_TIMEOUT_SECONDS = 10;
+function textField(value: unknown): string {
+ return typeof value === "string" ? value.trim() : "";
+}
+
function configToFormValues(config: LdapConfig): LdapFormValues {
return {
enabled: config.enabled,
@@ -159,33 +164,42 @@ export default function LdapPanel() {
void loadConfig();
}, [loadConfig]);
- const saveConfig = async (values: LdapFormValues) => {
+ const saveConfig = async (submitted: LdapFormValues) => {
+ // onFinish only includes mounted fields. Group-search inputs and the
+ // collapsed timeout live in the store, and an unmounted value is
+ // undefined — calling trim on it throws before the request is sent.
+ const stored = form.getFieldsValue(true) as Partial;
+ const values = { ...stored, ...submitted };
setSaving(true);
try {
const body: LdapConfigPut = {
- enabled: values.enabled,
- display_name: values.display_name.trim(),
- server_url: values.server_url.trim(),
- start_tls: values.start_tls,
- verify_tls: values.verify_tls,
- bind_dn: values.bind_dn.trim(),
- user_base_dn: values.user_base_dn.trim(),
- user_filter: values.user_filter.trim(),
- username_attribute: values.username_attribute.trim(),
- email_attribute: values.email_attribute.trim(),
- display_name_attribute: values.display_name_attribute.trim(),
- subject_attribute: values.subject_attribute.trim(),
- group_attribute: values.group_attribute.trim(),
- group_search: values.group_search,
- group_search_base: values.group_search_base.trim(),
- group_member_attribute: values.group_member_attribute.trim(),
- admin_groups: values.admin_groups.trim(),
- allowed_groups: values.allowed_groups.trim(),
- auto_provision: values.auto_provision,
- timeout_seconds: values.timeout_seconds,
+ enabled: Boolean(values.enabled),
+ display_name: textField(values.display_name),
+ server_url: textField(values.server_url),
+ start_tls: Boolean(values.start_tls),
+ verify_tls: values.verify_tls !== false,
+ bind_dn: textField(values.bind_dn),
+ user_base_dn: textField(values.user_base_dn),
+ user_filter: textField(values.user_filter),
+ username_attribute: textField(values.username_attribute),
+ email_attribute: textField(values.email_attribute),
+ display_name_attribute: textField(values.display_name_attribute),
+ subject_attribute: textField(values.subject_attribute),
+ group_attribute: textField(values.group_attribute),
+ group_search: Boolean(values.group_search),
+ group_search_base: textField(values.group_search_base),
+ group_member_attribute: textField(values.group_member_attribute),
+ admin_groups: textField(values.admin_groups),
+ allowed_groups: textField(values.allowed_groups),
+ auto_provision: Boolean(values.auto_provision),
+ timeout_seconds:
+ typeof values.timeout_seconds === "number"
+ ? values.timeout_seconds
+ : DEFAULT_TIMEOUT_SECONDS,
};
// Write-only: an untouched field must never clobber the stored secret.
- const bindPassword = values.bind_password?.trim();
+ // Read it from the submit payload only, not the preserved store.
+ const bindPassword = textField(submitted.bind_password);
if (bindPassword) body.bind_password = bindPassword;
applyConfig(await ssoApi.putLdapConfig(body));
message.success(t("adminSso.ldap.saved"));
@@ -336,13 +350,11 @@ export default function LdapPanel() {
return (
{done ? : index + 1}
@@ -359,12 +371,10 @@ export default function LdapPanel() {
{t("adminSso.loginPreview")}
{t("login.ldapHint", { name: previewName })}
diff --git a/dashboard/src/pages/Admin/Users/RolesPanel.tsx b/dashboard/src/pages/Admin/Users/RolesPanel.tsx
index ac469dfc28..085443c94b 100644
--- a/dashboard/src/pages/Admin/Users/RolesPanel.tsx
+++ b/dashboard/src/pages/Admin/Users/RolesPanel.tsx
@@ -30,6 +30,7 @@ import {
Trash2,
} from "lucide-react";
import { useTranslation } from "react-i18next";
+import cx from "classnames";
import { ResizableTable } from "@/components/ResizableTable";
import { TextAssistBar } from "@/components/TextAssistBar";
import { message } from "@/utils/antdMessage";
@@ -594,7 +595,10 @@ export default function RolesPanel() {
>
@@ -794,9 +798,7 @@ export default function RolesPanel() {
) : (
<>
-
+
{t("adminUsers.roleCustomHint")}
{done ? : index + 1}
@@ -102,12 +101,10 @@ export default function SsoAppProviderShell({
{t("adminSso.loginPreview")}
{t("login.oidcWith", { name: previewLabel })}
diff --git a/dashboard/src/pages/Admin/Users/SsoPanel.tsx b/dashboard/src/pages/Admin/Users/SsoPanel.tsx
index ff325acb4c..f4d0d68443 100644
--- a/dashboard/src/pages/Admin/Users/SsoPanel.tsx
+++ b/dashboard/src/pages/Admin/Users/SsoPanel.tsx
@@ -29,6 +29,7 @@ import {
XCircle,
} from "lucide-react";
import { useTranslation } from "react-i18next";
+import cx from "classnames";
import { message } from "@/utils/antdMessage";
import {
ssoApi,
@@ -369,13 +370,11 @@ export default function SsoPanel() {
return (
{done ? : index + 1}
@@ -392,12 +391,10 @@ export default function SsoPanel() {
{t("adminSso.loginPreview")}
{t("login.oidcWith", {
name: displayName.trim() || t("adminSso.statusUnnamed"),
@@ -490,14 +487,11 @@ export default function SsoPanel() {
applyPreset(preset)}
>
{t(preset.labelKey)}
diff --git a/dashboard/src/pages/Admin/Users/UsersListPanel.tsx b/dashboard/src/pages/Admin/Users/UsersListPanel.tsx
index 946796ece8..0ecabff5e3 100644
--- a/dashboard/src/pages/Admin/Users/UsersListPanel.tsx
+++ b/dashboard/src/pages/Admin/Users/UsersListPanel.tsx
@@ -66,6 +66,7 @@ import {
X,
} from "lucide-react";
import { useTranslation } from "react-i18next";
+import cx from "classnames";
import { request } from "../../../api/request";
import { authApi } from "../../../api/modules/auth";
import {
@@ -113,6 +114,7 @@ interface UserRow {
email?: string | null;
has_password?: boolean;
sso_linked?: boolean;
+ directory?: boolean;
disabled: boolean;
login_failed_count?: number;
login_locked?: boolean;
@@ -162,18 +164,6 @@ interface ExpertTemplateOption {
icon_name?: string | null;
}
-function expertTemplateChoices(
- templates: ExpertTemplateOption[],
-): ExpertTemplateOption[] {
- if (templates.some((item) => item.id === DEFAULT_EXPERT_TEMPLATE_ID)) {
- return templates;
- }
- return [
- { id: DEFAULT_EXPERT_TEMPLATE_ID, label: DEFAULT_EXPERT_TEMPLATE_ID },
- ...templates,
- ];
-}
-
function ExpertTemplatePicker({
value,
onChange,
@@ -238,9 +228,10 @@ function ExpertTemplatePicker({
type="button"
role="option"
aria-selected={selected}
- className={`${styles.expertTemplateRow} ${
- selected ? styles.expertTemplateRowSelected : ""
- }`}
+ className={cx(
+ styles.expertTemplateRow,
+ selected && styles.expertTemplateRowSelected,
+ )}
onClick={() => onChange?.(item.id)}
>
@@ -281,8 +272,9 @@ interface CreateValues extends PolicyFormValues {
username: string;
display_name?: string;
email?: string;
- password: string;
- confirm: string;
+ directory?: boolean;
+ password?: string;
+ confirm?: string;
role: string;
permissions?: string[];
role_name?: string | null;
@@ -485,7 +477,7 @@ function RoleNameMark({
return — ;
}
return (
-
+
{matched ? (
onChange?.(preset)}
>
{t("adminUsers.policyTokenQuotaPreset", {
@@ -735,9 +728,10 @@ function MaxAgentsInput({ value, onChange }: MaxAgentsInputProps) {
onChange?.(preset)}
>
{preset}
@@ -758,7 +752,7 @@ export function ResourcePolicyFields({
}) {
const { t } = useTranslation();
return (
-
+
{t("adminUsers.createSectionPolicy")}
@@ -1008,9 +1002,7 @@ export function PermissionCheckboxPicker({
return (
{groups.map((group) => {
const keys = group.blocks.flatMap((block) =>
@@ -1035,7 +1027,7 @@ export function PermissionCheckboxPicker({
return (
{chip.label}
@@ -1053,9 +1045,10 @@ export function PermissionCheckboxPicker({
type="button"
disabled={disabled}
aria-pressed={checked}
- className={`${styles.permChip} ${
- checked ? styles.permChipSelected : ""
- }`}
+ className={cx(
+ styles.permChip,
+ checked && styles.permChipSelected,
+ )}
onClick={() => toggle(item.key, !checked)}
>
@@ -1106,9 +1099,10 @@ export function PermissionCheckboxPicker({
return (
+
{t("adminUsers.permAll")}
);
@@ -1285,14 +1279,12 @@ function UserCardGrid({
return (
@@ -1312,11 +1304,10 @@ function UserCardGrid({
className={styles.userCardAvatar}
/>
@@ -1343,7 +1334,9 @@ function UserCardGrid({
- {row.sso_linked ? (
+ {row.directory ? (
+
{t("adminUsers.directoryBadge")}
+ ) : row.sso_linked ? (
{t("adminUsers.ssoBadge")}
) : null}
{row.has_password ? (
@@ -1451,7 +1444,10 @@ function UserCardGrid({
>
@@ -1545,6 +1541,7 @@ export default function UsersListPanel() {
const [inviteOpen, setInviteOpen] = useState(false);
const [submitting, setSubmitting] = useState(false);
const [form] = Form.useForm();
+ const directoryAccount = Form.useWatch("directory", form) === true;
const [editTarget, setEditTarget] = useState(null);
const [editSubmitting, setEditSubmitting] = useState(false);
const [editForm] = Form.useForm();
@@ -1938,27 +1935,36 @@ export default function UsersListPanel() {
if (!createOpen) return;
let cancelled = false;
const lang = i18n.language.startsWith("zh") ? "zh" : "en";
- void request<
- Array<{
- id: string;
+ void request<{
+ items: Array<{
+ slug: string;
label: { zh: string; en: string };
description?: { zh?: string; en?: string };
icon_url?: string | null;
icon_name?: string | null;
- }>
- >("/experts")
- .then((rows) => {
+ }>;
+ }>("/experts/hub")
+ .then((body) => {
if (cancelled) return;
+ const rows = Array.isArray(body.items) ? body.items : [];
setExpertTemplates(
rows.map((row) => ({
- id: row.id,
- label: row.label?.[lang] || row.label?.en || row.id,
+ id: row.slug,
+ label: row.label?.[lang] || row.label?.en || row.slug,
description:
row.description?.[lang] || row.description?.en || undefined,
icon_url: row.icon_url,
icon_name: row.icon_name,
})),
);
+ const ids = new Set(rows.map((row) => row.slug));
+ const current = form.getFieldValue("expert_template_id");
+ if (typeof current !== "string" || !ids.has(current)) {
+ const next = ids.has(DEFAULT_EXPERT_TEMPLATE_ID)
+ ? DEFAULT_EXPERT_TEMPLATE_ID
+ : rows[0]?.slug;
+ form.setFieldValue("expert_template_id", next);
+ }
})
.catch(() => {
if (!cancelled) setExpertTemplates([]);
@@ -1966,7 +1972,7 @@ export default function UsersListPanel() {
return () => {
cancelled = true;
};
- }, [createOpen, i18n.language]);
+ }, [createOpen, form, i18n.language]);
const onCreate = async (values: CreateValues) => {
setSubmitting(true);
@@ -1977,7 +1983,9 @@ export default function UsersListPanel() {
username: values.username,
display_name: values.display_name?.trim() || null,
email: values.email?.trim() || null,
- password: values.password,
+ ...(values.directory
+ ? { directory: true }
+ : { password: values.password }),
role: values.role,
permissions: values.role === "admin" ? [] : values.permissions ?? [],
role_name: values.role_name?.trim() || null,
@@ -2036,6 +2044,7 @@ export default function UsersListPanel() {
username: undefined,
display_name: undefined,
email: undefined,
+ directory: false,
password: undefined,
confirm: undefined,
limit_workspace_root: false,
@@ -2366,12 +2375,10 @@ export default function UsersListPanel() {
preserveSelectedRowKeys: true,
}}
rowClassName={(row) =>
- [
- row.disabled ? styles.userTableRowDisabled : "",
- row.login_locked ? styles.userTableRowLocked : "",
- ]
- .filter(Boolean)
- .join(" ")
+ cx(
+ row.disabled && styles.userTableRowDisabled,
+ row.login_locked && styles.userTableRowLocked,
+ )
}
columns={[
{
@@ -2420,7 +2427,11 @@ export default function UsersListPanel() {
width: 120,
render: (_, row) => {
const parts = [
- row.sso_linked ? t("adminUsers.ssoBadge") : null,
+ row.directory
+ ? t("adminUsers.directoryBadge")
+ : row.sso_linked
+ ? t("adminUsers.ssoBadge")
+ : null,
row.has_password ? t("adminUsers.passwordBadge") : null,
row.mfa_active ? t("adminUsers.mfaBadge") : null,
].filter(Boolean);
@@ -2561,7 +2572,10 @@ export default function UsersListPanel() {
>
@@ -2734,52 +2748,62 @@ export default function UsersListPanel() {
/>
- }
- autoComplete="new-password"
- />
-
- ({
- validator(_, value) {
- if (!value || getFieldValue("password") === value) {
- return Promise.resolve();
- }
- return Promise.reject(
- new Error(t("wizard.admin.passwordMismatch")),
- );
- },
- }),
- ]}
+ name="directory"
+ label={t("adminUsers.formDirectory")}
+ extra={t("adminUsers.formDirectoryHint")}
+ valuePropName="checked"
>
- }
- autoComplete="new-password"
- />
+
+ {!directoryAccount && (
+ <>
+
+ }
+ autoComplete="new-password"
+ />
+
+ ({
+ validator(_, value) {
+ if (!value || getFieldValue("password") === value) {
+ return Promise.resolve();
+ }
+ return Promise.reject(
+ new Error(t("wizard.admin.passwordMismatch")),
+ );
+ },
+ }),
+ ]}
+ >
+ }
+ autoComplete="new-password"
+ />
+
+ >
+ )}
{t("adminUsers.createSectionAccess")}
-
+
{t("adminUsers.permEditHint")}
@@ -2830,16 +2854,18 @@ export default function UsersListPanel() {
0
+ ? [
+ {
+ required: true,
+ message: t("adminUsers.expertTemplateRequired"),
+ },
+ ]
+ : []
+ }
>
-
+
) : null
}
@@ -2994,9 +3020,7 @@ export default function UsersListPanel() {
{t("adminUsers.createSectionAccess")}
-
+
{t("adminUsers.permEditHint")}
diff --git a/dashboard/src/pages/Agent/ACP/components/ACPCard.tsx b/dashboard/src/pages/Agent/ACP/components/ACPCard.tsx
index 4645c270a9..5fe2edddab 100644
--- a/dashboard/src/pages/Agent/ACP/components/ACPCard.tsx
+++ b/dashboard/src/pages/Agent/ACP/components/ACPCard.tsx
@@ -1,6 +1,7 @@
import { Switch, Tooltip } from "antd";
import { CheckCircle, Plug } from "lucide-react";
import { useTranslation } from "react-i18next";
+import cx from "classnames";
import type { ACPRunnerConfig } from "../../../../api/types/acp";
import { runnerIcon, runnerIntroKey, runnerLabelKey } from "../constants";
import styles from "../../Channels/index.module.less";
@@ -51,19 +52,17 @@ export function ACPCard({
(interactionDisabled && !config.enabled) ||
(!configured && !config.enabled);
- const cardClass = [
+ const cardClass = cx(
styles.channelCard,
config.enabled ? styles.enabled : styles.normal,
- isHover && !interactionDisabled ? styles.hover : "",
- interactionDisabled ? acpStyles.runnerCardDisabled : "",
- ]
- .filter(Boolean)
- .join(" ");
+ isHover && !interactionDisabled && styles.hover,
+ interactionDisabled && acpStyles.runnerCardDisabled,
+ );
const renderStatusBadge = () => {
if (interactionDisabled && !config.enabled) {
return (
-
+
{t("acp.runnerUnavailable")}
@@ -71,14 +70,14 @@ export function ACPCard({
}
if (config.enabled) {
return (
-
+
{configured ? t("common.enabled") : t("acp.runnerNeedsConfig")}
);
}
return (
-
+
{t("common.disabled")}
@@ -96,12 +95,10 @@ export function ACPCard({
{label}
e.stopPropagation()}>
diff --git a/dashboard/src/pages/Agent/Channels/components/ChannelCard.tsx b/dashboard/src/pages/Agent/Channels/components/ChannelCard.tsx
index f8318c062e..ed45a5fae7 100644
--- a/dashboard/src/pages/Agent/Channels/components/ChannelCard.tsx
+++ b/dashboard/src/pages/Agent/Channels/components/ChannelCard.tsx
@@ -1,6 +1,7 @@
import { Switch, Tooltip } from "antd";
import { CheckCircle, Loader2, Plug } from "lucide-react";
import { useTranslation } from "react-i18next";
+import cx from "classnames";
import {
CHANNEL_LABEL_KEYS,
CHANNEL_LABELS,
@@ -51,7 +52,7 @@ export function ChannelCard({
const renderStatusBadge = () => {
if (testLoading) {
return (
-
+
{t("channels.checking")}
@@ -60,7 +61,7 @@ export function ChannelCard({
if (testResult) {
if (testResult.ok) {
return (
-
+
{t("channels.connected")}
@@ -68,9 +69,7 @@ export function ChannelCard({
}
return (
-
+
{t("channels.disconnected")}
@@ -80,9 +79,7 @@ export function ChannelCard({
if (enabled && runtime && !runtime.connected) {
return (
-
+
{t("channels.disconnected")}
@@ -91,7 +88,7 @@ export function ChannelCard({
}
if (enabled && runtime?.connected) {
return (
-
+
{t("channels.connected")}
@@ -99,27 +96,25 @@ export function ChannelCard({
}
if (enabled) {
return (
-
+
{t("channels.channelEnabled")}
);
}
return (
-
+
{t("common.disabled")}
);
};
- const cardClass = [
+ const cardClass = cx(
styles.channelCard,
enabled ? styles.enabled : styles.normal,
- isHover ? styles.hover : "",
- ]
- .filter(Boolean)
- .join(" ");
+ isHover && styles.hover,
+ );
return (
({
return (
+
{dingtalk
? t("connectors.dingtalkAuthTitle", "钉钉账号授权")
diff --git a/dashboard/src/pages/Agent/Connectors/ConnectorCard.tsx b/dashboard/src/pages/Agent/Connectors/ConnectorCard.tsx
index 785abb15cb..cd34f4ee7c 100644
--- a/dashboard/src/pages/Agent/Connectors/ConnectorCard.tsx
+++ b/dashboard/src/pages/Agent/Connectors/ConnectorCard.tsx
@@ -1,6 +1,7 @@
import { memo } from "react";
import { Typography } from "antd";
import { useTranslation } from "react-i18next";
+import cx from "classnames";
import type { ConnectorCatalogEntry } from "../../../api/modules/connectors";
import { ConnectorLogo, connectorAccent } from "./connectorDefs";
@@ -21,9 +22,7 @@ export const ConnectorCard = memo(function ConnectorCard({
return (
!disabled && onConfigure(entry, null)}
role="button"
diff --git a/dashboard/src/pages/Agent/Connectors/CustomMcpServerCard.tsx b/dashboard/src/pages/Agent/Connectors/CustomMcpServerCard.tsx
index 36828cd597..d130d77761 100644
--- a/dashboard/src/pages/Agent/Connectors/CustomMcpServerCard.tsx
+++ b/dashboard/src/pages/Agent/Connectors/CustomMcpServerCard.tsx
@@ -9,6 +9,7 @@ import {
Trash2,
} from "lucide-react";
import { useTranslation } from "react-i18next";
+import cx from "classnames";
import type { CustomMcpTransport } from "../../../api/modules/connectors";
import { SharedResourceBadge } from "../../../components/SharedResourceBadge";
@@ -98,13 +99,11 @@ export function CustomMcpServerCard({
return (
{isHttp
? t("connectors.customMcp.transportHttp", "HTTP")
diff --git a/dashboard/src/pages/Agent/Connectors/CustomMcpTab.tsx b/dashboard/src/pages/Agent/Connectors/CustomMcpTab.tsx
index b98f143ecc..3e9af705cc 100644
--- a/dashboard/src/pages/Agent/Connectors/CustomMcpTab.tsx
+++ b/dashboard/src/pages/Agent/Connectors/CustomMcpTab.tsx
@@ -4,6 +4,7 @@ import { message } from "@/utils/antdMessage";
import { Globe, Plus, Terminal } from "lucide-react";
import { useTranslation } from "react-i18next";
+import cx from "classnames";
import {
connectorsApi,
@@ -607,9 +608,10 @@ export function CustomMcpTab({ focusServerName }: CustomMcpTabProps) {
const saveFooter = (
{showProbeSection ? (
diff --git a/dashboard/src/pages/Agent/Memory/ConversationRecords.tsx b/dashboard/src/pages/Agent/Memory/ConversationRecords.tsx
index fc09c9ca0b..1aa821969b 100644
--- a/dashboard/src/pages/Agent/Memory/ConversationRecords.tsx
+++ b/dashboard/src/pages/Agent/Memory/ConversationRecords.tsx
@@ -24,6 +24,7 @@ import { message } from "@/utils/antdMessage";
import type { ColumnsType } from "antd/es/table";
import { Eye, RefreshCw, Trash2 } from "lucide-react";
import { useTranslation } from "react-i18next";
+import cx from "classnames";
import Markdown from "../../../components/Markdown/LazyMarkdown";
import {
CHAT_HISTORY_PAGE_SIZE,
@@ -97,9 +98,10 @@ function ConversationThreadCard({
return (
{title}
@@ -599,9 +601,10 @@ export default function ConversationRecords({
return (
diff --git a/dashboard/src/pages/Agent/Memory/MemorySettings.tsx b/dashboard/src/pages/Agent/Memory/MemorySettings.tsx
index ddb4d56c31..cf44fa2752 100644
--- a/dashboard/src/pages/Agent/Memory/MemorySettings.tsx
+++ b/dashboard/src/pages/Agent/Memory/MemorySettings.tsx
@@ -23,6 +23,7 @@ import {
Sparkles,
} from "lucide-react";
import { useTranslation } from "react-i18next";
+import cx from "classnames";
import {
memoryDashboardApi,
@@ -284,9 +285,10 @@ export default function MemorySettings({ agentId }: Props) {
@@ -393,9 +395,10 @@ export default function MemorySettings({ agentId }: Props) {
diff --git a/dashboard/src/pages/Agent/Memory/Overview.tsx b/dashboard/src/pages/Agent/Memory/Overview.tsx
index 5908d5c35c..7b091e9d5b 100644
--- a/dashboard/src/pages/Agent/Memory/Overview.tsx
+++ b/dashboard/src/pages/Agent/Memory/Overview.tsx
@@ -27,6 +27,7 @@ import {
} from "recharts";
import { useTranslation } from "react-i18next";
import type { TFunction } from "i18next";
+import cx from "classnames";
import MigrateMemory from "./MigrateMemory";
import LastExtractionStatus from "./LastExtractionStatus";
@@ -215,7 +216,7 @@ export default function Overview({
/>
{state.firstLoading && !state.growth ? (
@@ -388,7 +389,7 @@ function SummaryCard({
warn?: boolean;
}) {
return (
-
+
{icon}
{label}
@@ -496,9 +497,11 @@ function PipelineStage({
return (
diff --git a/dashboard/src/pages/Agent/Memory/ProfileOverview.tsx b/dashboard/src/pages/Agent/Memory/ProfileOverview.tsx
index cc45cfb224..ded9e8473f 100644
--- a/dashboard/src/pages/Agent/Memory/ProfileOverview.tsx
+++ b/dashboard/src/pages/Agent/Memory/ProfileOverview.tsx
@@ -22,6 +22,7 @@ import {
formatServerYmd,
} from "../../../utils/formatMessageTime";
import type { TFunction } from "i18next";
+import cx from "classnames";
import {
memoryDashboardApi,
@@ -242,9 +243,7 @@ function Stat({
}) {
return (
-
+
{value}
{label}
@@ -331,7 +330,7 @@ function ProfileGroup({
{onViewAll ? (
setHoveredId(it.id)}
onMouseLeave={() => setHoveredId(null)}
onClick={() => onViewAll(it.entityId)}
@@ -340,11 +339,10 @@ function ProfileGroup({
{it.meta}
{t("memory.overview.rowGoLibrary", "去记忆库 →")}
diff --git a/dashboard/src/pages/Agent/Memory/VectorSearchConfig.tsx b/dashboard/src/pages/Agent/Memory/VectorSearchConfig.tsx
index 31437d61c1..a0e28c2318 100644
--- a/dashboard/src/pages/Agent/Memory/VectorSearchConfig.tsx
+++ b/dashboard/src/pages/Agent/Memory/VectorSearchConfig.tsx
@@ -3,6 +3,7 @@ import { useTranslation } from "react-i18next";
import { App, Select, Input, Button, Spin, Progress, Alert } from "antd";
import { Download, CheckCircle, AlertCircle } from "lucide-react";
+import cx from "classnames";
import api from "../../../api";
import type { EmbeddingConfig } from "../../../api/types/embedding";
import { useEmbeddingDownloadWS } from "../../../hooks/useEmbeddingDownloadWS";
@@ -262,7 +263,7 @@ export default function VectorSearchConfig() {
{t("memory.vs.currentApplied")}
-
+
{appliedStatus === "loading"
? t("memory.vs.loading")
: appliedStatus === "downloading"
@@ -307,9 +308,10 @@ export default function VectorSearchConfig() {
{/* Disabled */}
{t("memory.vs.downloadStatus")}
-
+
{t("memory.vs.loading")}
@@ -436,7 +440,7 @@ export default function VectorSearchConfig() {
{t("memory.vs.downloadStatus")}
{t("memory.vs.downloading")}
@@ -479,7 +483,7 @@ export default function VectorSearchConfig() {
{t("memory.vs.downloadStatus")}
-
+
{t("memory.vs.failed")}
@@ -505,7 +509,7 @@ export default function VectorSearchConfig() {
{t("memory.vs.downloadStatus")}
-
+
{t("memory.vs.done")}
@@ -523,7 +527,7 @@ export default function VectorSearchConfig() {
{t("memory.vs.downloadStatus")}
-
+
{t("memory.vs.idle")}
diff --git a/dashboard/src/pages/Agent/Personalization/components/AgentPluginsPanel.tsx b/dashboard/src/pages/Agent/Personalization/components/AgentPluginsPanel.tsx
index 625db4f8d5..98bd9dea71 100644
--- a/dashboard/src/pages/Agent/Personalization/components/AgentPluginsPanel.tsx
+++ b/dashboard/src/pages/Agent/Personalization/components/AgentPluginsPanel.tsx
@@ -14,6 +14,7 @@ import {
} from "antd";
import { Info, Settings2, Wrench } from "lucide-react";
import { useTranslation } from "react-i18next";
+import cx from "classnames";
import {
pluginsApi,
type AgentPlugin,
@@ -271,9 +272,10 @@ export default function AgentPluginsPanel({ agentId }: AgentPluginsPanelProps) {
{filteredPlugins.map((plugin) => (
diff --git a/dashboard/src/pages/Agent/Personalization/components/MBTISelector.tsx b/dashboard/src/pages/Agent/Personalization/components/MBTISelector.tsx
index 50a29b818e..d74d2129e8 100644
--- a/dashboard/src/pages/Agent/Personalization/components/MBTISelector.tsx
+++ b/dashboard/src/pages/Agent/Personalization/components/MBTISelector.tsx
@@ -5,6 +5,7 @@ import { message } from "@/utils/antdMessage";
import { useTranslation } from "react-i18next";
import { useNavigate } from "react-router-dom";
import { FlaskConical, Sparkles, Check } from "lucide-react";
+import cx from "classnames";
import api from "../../../../api";
import type { MBTIType } from "../../../../api/types";
import { useAgent } from "../../../../context/AgentContext";
@@ -33,7 +34,7 @@ function DimensionBar({
return (
-
+
{leftLabel}
@@ -50,7 +51,7 @@ function DimensionBar({
style={{ left: `${position}%`, background: color }}
/>
-
+
{rightLabel}
{pct}%
@@ -494,9 +495,11 @@ export default function MBTISelector({
return (
setCurrentIdx(idx)}
title={`${idx + 1}`}
>
@@ -301,18 +304,20 @@ export default function MBTITest({
handleAnswer("A")}
>
A
{optionA}
handleAnswer("B")}
>
B
diff --git a/dashboard/src/pages/Agent/Skills/components/SkillCard.tsx b/dashboard/src/pages/Agent/Skills/components/SkillCard.tsx
index 88c5ef8d87..ec67b1b860 100644
--- a/dashboard/src/pages/Agent/Skills/components/SkillCard.tsx
+++ b/dashboard/src/pages/Agent/Skills/components/SkillCard.tsx
@@ -11,6 +11,7 @@ import {
Trash2,
} from "lucide-react";
import { useTranslation } from "react-i18next";
+import cx from "classnames";
import {
resolveBuiltinSkillIcon,
resolveFigurativeSkillIcon,
@@ -315,9 +316,10 @@ export function SkillCard({
{showEnableToggle ? (
{
e.stopPropagation();
onToggleEnabled(e);
diff --git a/dashboard/src/pages/Agent/Skills/components/SkillDrawer.tsx b/dashboard/src/pages/Agent/Skills/components/SkillDrawer.tsx
index 15477e6179..fc7f813f66 100644
--- a/dashboard/src/pages/Agent/Skills/components/SkillDrawer.tsx
+++ b/dashboard/src/pages/Agent/Skills/components/SkillDrawer.tsx
@@ -5,6 +5,7 @@ import { message } from "@/utils/antdMessage";
import { MinusCircle, PanelLeftOpen, Plus, Upload } from "lucide-react";
import { useTranslation } from "react-i18next";
import type { FormInstance } from "antd";
+import cx from "classnames";
import EmojiPicker from "../../../../components/EmojiPicker";
import Markdown from "../../../../components/Markdown/LazyMarkdown";
import { TextAssistBar } from "../../../../components/TextAssistBar";
@@ -1031,11 +1032,10 @@ export function SkillDrawer({
/>
) : null}
{showFileTree && fileTreeCollapsed ? (
diff --git a/dashboard/src/pages/Agent/Skills/components/SkillImportModal.tsx b/dashboard/src/pages/Agent/Skills/components/SkillImportModal.tsx
index 2eac0b7801..3e053cffce 100644
--- a/dashboard/src/pages/Agent/Skills/components/SkillImportModal.tsx
+++ b/dashboard/src/pages/Agent/Skills/components/SkillImportModal.tsx
@@ -2,6 +2,7 @@ import { useEffect, useRef, useState } from "react";
import { Button, Checkbox, Modal, Segmented } from "antd";
import { Upload as UploadIcon } from "lucide-react";
import { useTranslation } from "react-i18next";
+import cx from "classnames";
import styles from "../index.module.less";
import { parseSkillZip, type ParsedZipSkill } from "./parseSkillZip";
@@ -261,9 +262,11 @@ export function SkillImportModal({
e.stopPropagation()}
>
diff --git a/dashboard/src/pages/Agent/Tools/ToolsPanel.tsx b/dashboard/src/pages/Agent/Tools/ToolsPanel.tsx
index 8db08dd5f6..e8965ecf45 100644
--- a/dashboard/src/pages/Agent/Tools/ToolsPanel.tsx
+++ b/dashboard/src/pages/Agent/Tools/ToolsPanel.tsx
@@ -7,6 +7,7 @@ import {
} from "react";
import { Empty, Segmented, Spin, Switch, Tooltip } from "antd";
import { useTranslation } from "react-i18next";
+import cx from "classnames";
import { message } from "@/utils/antdMessage";
import {
agentToolsApi,
@@ -377,9 +378,10 @@ export default function ToolsPanel({
return (
@@ -415,11 +417,11 @@ export default function ToolsPanel({
return (
@@ -484,11 +486,10 @@ export default function ToolsPanel({
return (
{resolvedTab === "builtin" ? (
diff --git a/dashboard/src/pages/Agent/Workspace/components/CodeEditor.tsx b/dashboard/src/pages/Agent/Workspace/components/CodeEditor.tsx
index 5cef1a730b..2251397d4c 100644
--- a/dashboard/src/pages/Agent/Workspace/components/CodeEditor.tsx
+++ b/dashboard/src/pages/Agent/Workspace/components/CodeEditor.tsx
@@ -1,9 +1,9 @@
/**
* CodeEditor — Monaco-based IDE editor for workspace text/code files.
*
- * Lazy-loads ``@monaco-editor/react`` so the heavy editor bundle only
- * ships when a user actually edits a file. Language is derived from the
- * file extension via ``getEditorLanguage``.
+ * Lazy-loads the editor so Monaco is fetched only when a user edits a
+ * file. The full ``min/vs`` tree, including workers, is served from this
+ * origin at ``/monaco/vs``. Language comes from ``getEditorLanguage``.
*
* While an ancestor dock panel has ``data-dock-resizing``, automaticLayout
* is paused so popup/right-panel resize stays smooth; layout() runs once
@@ -11,13 +11,14 @@
*/
import { lazy, Suspense, useEffect, useRef } from "react";
+import { useTranslation } from "react-i18next";
import { Spin } from "antd";
import type { OnMount } from "@monaco-editor/react";
import { useTheme } from "../../../../context/ThemeContext";
import { getEditorLanguage } from "../utils/editorLanguage";
import styles from "../index.module.less";
-const MonacoEditor = lazy(() => import("@monaco-editor/react"));
+const MonacoEditor = lazy(() => import("@/components/monaco"));
interface CodeEditorProps {
path: string;
@@ -35,6 +36,7 @@ export default function CodeEditor({
readOnly = false,
language,
}: CodeEditorProps) {
+ const { t } = useTranslation();
const resolvedLanguage = language ?? getEditorLanguage(path);
const { isDark } = useTheme();
const wrapRef = useRef
(null);
@@ -85,6 +87,7 @@ export default function CodeEditor({
(
{!treeCollapsed && (
) : (
{((!isMobile && !treeCollapsed) ||
@@ -1255,9 +1257,10 @@ export default function WorkspaceDrawer({
{(!isMobile || mobilePane === "viewer") && (
{!selected ? (
diff --git a/dashboard/src/pages/Chat/chatAgentCard.partial.less b/dashboard/src/pages/Chat/chatAgentCard.partial.less
index 5549d0182f..305124db2b 100644
--- a/dashboard/src/pages/Chat/chatAgentCard.partial.less
+++ b/dashboard/src/pages/Chat/chatAgentCard.partial.less
@@ -355,6 +355,55 @@
}
}
+/* Equal side columns keep the label centered when the wording changes. */
+.hiddenExpertsToggle {
+ display: flex;
+ align-items: center;
+ width: 100%;
+ margin: 0;
+ padding: 7px 8px;
+ border: none;
+ border-radius: 10px;
+ background: transparent;
+ font-size: 12px;
+ font-weight: 400;
+ line-height: 1.3;
+ color: var(--fn-text-quaternary);
+ cursor: pointer;
+ transition:
+ background 0.15s,
+ color 0.15s;
+
+ &:hover {
+ background: color-mix(in srgb, var(--fn-text-primary) 4%, transparent);
+ color: var(--fn-text-secondary);
+ }
+}
+
+.hiddenExpertsToggleSide {
+ flex: 1 1 0;
+ display: flex;
+ align-items: center;
+ min-width: 16px;
+}
+
+.hiddenExpertsToggleLabel {
+ flex: 0 1 auto;
+ min-width: 0;
+ text-align: center;
+ white-space: nowrap;
+}
+
+.hiddenExpertsToggleChevron {
+ display: block;
+ margin-left: 2px;
+ transition: transform 0.15s ease;
+}
+
+.hiddenExpertsToggleChevronOpen {
+ transform: rotate(180deg);
+}
+
.sessionRowMore {
display: inline-flex;
align-items: center;
diff --git a/dashboard/src/pages/Chat/components/AskQuestionCard.tsx b/dashboard/src/pages/Chat/components/AskQuestionCard.tsx
index 1ec63f6bc0..ae9fc68390 100644
--- a/dashboard/src/pages/Chat/components/AskQuestionCard.tsx
+++ b/dashboard/src/pages/Chat/components/AskQuestionCard.tsx
@@ -2,6 +2,7 @@ import { useState } from "react";
import { Input } from "antd";
import { X } from "lucide-react";
import { useTranslation } from "react-i18next";
+import cx from "classnames";
import type { AskQuestion } from "../../../api/types/hitl";
import styles from "./AskQuestionCard.module.less";
@@ -85,9 +86,7 @@ function QuestionCard({
{done && confirmed !== null ? (
{confirmed}
) : (
-
+
{options.map((option, optionIndex) => {
const key = OPTION_KEYS[optionIndex] ?? String(optionIndex + 1);
const selected = answer.picked.includes(option.label);
@@ -95,9 +94,7 @@ function QuestionCard({
toggle(option.label)}
>
@@ -116,7 +113,7 @@ function QuestionCard({
{!openEnded ? (
toggle(OTHER)}
>
@@ -172,7 +169,7 @@ function AskQuestionCard({
if (!interactive) {
return (
-
+
{status === "approved"
@@ -288,14 +285,14 @@ function AskQuestionCard({
<>
{t("chat.ask.submit")}
setReviewing(false)}
>
{t("chat.ask.back")}
@@ -305,7 +302,7 @@ function AskQuestionCard({
<>
@@ -314,7 +311,7 @@ function AskQuestionCard({
{current > 0 ? (
setCurrent((value) => value - 1)}
>
{t("chat.ask.back")}
@@ -322,7 +319,7 @@ function AskQuestionCard({
) : null}
{t("chat.ask.skip")}
diff --git a/dashboard/src/pages/Chat/components/AssistantProcessSummary.tsx b/dashboard/src/pages/Chat/components/AssistantProcessSummary.tsx
index 496d5f693e..2613e2dc08 100644
--- a/dashboard/src/pages/Chat/components/AssistantProcessSummary.tsx
+++ b/dashboard/src/pages/Chat/components/AssistantProcessSummary.tsx
@@ -2,6 +2,7 @@ import { memo, useEffect, useMemo, useRef, useState } from "react";
import { ChevronRight, Scale } from "lucide-react";
import type { TFunction } from "i18next";
import { useTranslation } from "react-i18next";
+import cx from "classnames";
import Markdown from "../../../components/Markdown/LazyMarkdown";
import type { DecisionNotice } from "../hooks/useChat";
import type { AssistantTurnSplit } from "../utils/messageContent";
@@ -115,9 +116,10 @@ export function DecisionToolRow({ notice }: { notice: DecisionNotice }) {
{expanded ? (
@@ -288,9 +290,10 @@ function AssistantProcessSummary({
setExpanded((v) => !v)}
aria-expanded={expanded}
aria-busy={liveHint ? true : undefined}
@@ -309,9 +312,10 @@ function AssistantProcessSummary({
{expanded && (
diff --git a/dashboard/src/pages/Chat/components/AssistantTurnView.tsx b/dashboard/src/pages/Chat/components/AssistantTurnView.tsx
index 6caa8c32e8..a36234e947 100644
--- a/dashboard/src/pages/Chat/components/AssistantTurnView.tsx
+++ b/dashboard/src/pages/Chat/components/AssistantTurnView.tsx
@@ -1,6 +1,7 @@
import { useMemo } from "react";
import { ChevronRight, FilePen, Globe } from "lucide-react";
import { useTranslation } from "react-i18next";
+import cx from "classnames";
import type { HitlDecisionHandler } from "../../../api/types/hitl";
import type { ChatMessage } from "../hooks/useChat";
import {
@@ -348,9 +349,10 @@ export default function AssistantTurnView({
@@ -373,9 +375,10 @@ export default function AssistantTurnView({
= ({
return (
diff --git a/dashboard/src/pages/Chat/components/ChatDockPanels.tsx b/dashboard/src/pages/Chat/components/ChatDockPanels.tsx
index 48cf56a85f..9c27e5197b 100644
--- a/dashboard/src/pages/Chat/components/ChatDockPanels.tsx
+++ b/dashboard/src/pages/Chat/components/ChatDockPanels.tsx
@@ -1,3 +1,5 @@
+import cx from "classnames";
+
import type { PanelMode } from "../../../components/BrowserWorkspace";
import type { DisplayEnvironment } from "../../../api/types/browser";
import type { DockTab, DockTabId } from "../hooks/useChatDockPanel";
@@ -110,9 +112,11 @@ export default function ChatDockPanels({
<>
{showBottomResizer && (
onResizeStart(e, "vertical")}
>
@@ -121,9 +125,11 @@ export default function ChatDockPanels({
{showSideResizer && (
onResizeStart(e, "horizontal")}
>
diff --git a/dashboard/src/pages/Chat/components/ChatInput.tsx b/dashboard/src/pages/Chat/components/ChatInput.tsx
index e87174a20c..d3a1d7d522 100644
--- a/dashboard/src/pages/Chat/components/ChatInput.tsx
+++ b/dashboard/src/pages/Chat/components/ChatInput.tsx
@@ -9,6 +9,7 @@ import {
} from "react";
import { useTranslation } from "react-i18next";
import { App } from "antd";
+import cx from "classnames";
import { useIsMobile } from "../../../hooks/useIsMobile";
import {
@@ -858,7 +859,7 @@ const ChatInput = forwardRef
(
id="octop-chat-file-drop"
data-file-drop-target=""
data-octop-chat-drop="1"
- className={`${styles.chatInput} ${showDrop ? styles.dropActive : ""}`}
+ className={cx(styles.chatInput, showDrop && styles.dropActive)}
onDragEnter={handleDragEnter}
onDragLeave={handleDragLeave}
onDragOver={handleDragOver}
diff --git a/dashboard/src/pages/Chat/components/ChatInputActionsRow.tsx b/dashboard/src/pages/Chat/components/ChatInputActionsRow.tsx
index c161209582..85d878d34d 100644
--- a/dashboard/src/pages/Chat/components/ChatInputActionsRow.tsx
+++ b/dashboard/src/pages/Chat/components/ChatInputActionsRow.tsx
@@ -30,6 +30,7 @@ import {
Search,
} from "lucide-react";
import { Tooltip, Popover } from "antd";
+import cx from "classnames";
import { message } from "@/utils/antdMessage";
import type { ResolvedModel } from "../../../api/types";
import type { KnowledgeBase } from "../../../api/modules/knowledgeBases";
@@ -110,11 +111,7 @@ function PlusMenuCount({
}) {
if (count <= 0) return null;
return (
-
+
{count}
);
@@ -524,9 +521,10 @@ export default function ChatInputActionsRow({
onReasoningChange?.(mode, reasoningEffort)}
>
{reasoningModeLabel(mode)}
@@ -543,11 +541,11 @@ export default function ChatInputActionsRow({
onReasoningChange?.(
reasoningMode === "disabled" ? "enabled" : reasoningMode,
@@ -588,9 +586,10 @@ export default function ChatInputActionsRow({
{showAutoModel ? (
{
onModelChange?.(null);
closePlusMenu();
@@ -611,9 +610,10 @@ export default function ChatInputActionsRow({
return (
{
if (remoteManaged) {
message.info(t("chat.remoteExpert.manageToast"));
@@ -713,9 +714,10 @@ export default function ChatInputActionsRow({
nameClassName={styles.skillPickerName}
cmdClassName={styles.skillPickerDesc}
iconWrapClassName={(tone) =>
- `${styles.shortcutPickerIcon} ${
- SHORTCUT_ICON_TONE_CLASS[tone] ?? styles.shortcutPickerIconBlue
- }`
+ cx(
+ styles.shortcutPickerIcon,
+ SHORTCUT_ICON_TONE_CLASS[tone] ?? styles.shortcutPickerIconBlue,
+ )
}
onSelect={(command) => {
setShortcutOpen(false);
@@ -734,9 +736,10 @@ export default function ChatInputActionsRow({
{showModePicker && (
openCompactPicker("mode")}
>
@@ -754,9 +757,10 @@ export default function ChatInputActionsRow({
{showModelPicker && (
openCompactPicker("model")}
>
@@ -776,9 +780,10 @@ export default function ChatInputActionsRow({
{showConnectorPicker && (
openCompactPicker("connector")}
>
@@ -794,9 +799,10 @@ export default function ChatInputActionsRow({
{showKnowledgePicker && (
openCompactPicker("knowledge")}
>
@@ -812,9 +818,10 @@ export default function ChatInputActionsRow({
{showSkillPicker && (
openCompactPicker("skill")}
>
@@ -830,9 +837,10 @@ export default function ChatInputActionsRow({
{showExpertPicker && (
openCompactPicker("expert")}
>
@@ -851,9 +859,10 @@ export default function ChatInputActionsRow({
{showSubagentPicker && (
openCompactPicker("subagent")}
>
@@ -946,9 +955,10 @@ export default function ChatInputActionsRow({
const renderSecondaryActions = () => {
const plusButton = (
0 ? styles.secondaryBtnActive : ""
- }`}
+ className={cx(
+ styles.secondaryBtn,
+ overflowBadgeCount > 0 && styles.secondaryBtnActive,
+ )}
type="button"
aria-label={t("chat.composerMore", "更多工具")}
data-testid="composer-plus"
@@ -979,15 +989,13 @@ export default function ChatInputActionsRow({
{compactPicker ? (
{renderSecondaryActions()}
{conversationMode !== "craft" ? (
@@ -1193,9 +1199,10 @@ export default function ChatInputActionsRow({
mouseEnterDelay={0.4}
>
onChange(scope)}
>
{t(meta.key, meta.fallback)}
diff --git a/dashboard/src/pages/Chat/components/ChatSidebarPanel.tsx b/dashboard/src/pages/Chat/components/ChatSidebarPanel.tsx
index a36ebafa25..25fd4a629f 100644
--- a/dashboard/src/pages/Chat/components/ChatSidebarPanel.tsx
+++ b/dashboard/src/pages/Chat/components/ChatSidebarPanel.tsx
@@ -1,6 +1,7 @@
import { useCallback } from "react";
import { useTranslation } from "react-i18next";
import type { RefObject } from "react";
+import cx from "classnames";
import SessionList from "./SessionList";
import MinimalAgentSessionNav from "./MinimalAgentSessionNav";
import type { Session } from "../hooks/useSessions";
@@ -137,9 +138,11 @@ export default function ChatSidebarPanel({
return (
{isMobile && sidebarOpen && (
+
diff --git a/dashboard/src/pages/Chat/components/ConnectorPickerPopover.tsx b/dashboard/src/pages/Chat/components/ConnectorPickerPopover.tsx
index eb433dc8e3..93529d1399 100644
--- a/dashboard/src/pages/Chat/components/ConnectorPickerPopover.tsx
+++ b/dashboard/src/pages/Chat/components/ConnectorPickerPopover.tsx
@@ -3,6 +3,7 @@ import { useTranslation } from "react-i18next";
import { useNavigate } from "react-router-dom";
import { Switch } from "antd";
import { Settings2 } from "lucide-react";
+import cx from "classnames";
import SearchablePickerPanel, {
pickerStyles,
} from "../../../components/ChatPicker/SearchablePickerPanel";
@@ -58,9 +59,10 @@ export default function ConnectorPickerPopover({
return (
diff --git a/dashboard/src/pages/Chat/components/ContextChip.tsx b/dashboard/src/pages/Chat/components/ContextChip.tsx
index b815f4e8ba..bebb30455c 100644
--- a/dashboard/src/pages/Chat/components/ContextChip.tsx
+++ b/dashboard/src/pages/Chat/components/ContextChip.tsx
@@ -1,5 +1,6 @@
import type { ReactNode } from "react";
import { X } from "lucide-react";
+import cx from "classnames";
import styles from "../index.module.less";
export type ContextChipVariant =
@@ -35,9 +36,11 @@ export default function ContextChip({
}: ContextChipProps) {
return (
{icon}
{label}
diff --git a/dashboard/src/pages/Chat/components/ConversationModePicker.tsx b/dashboard/src/pages/Chat/components/ConversationModePicker.tsx
index ba33f90251..2700718d4d 100644
--- a/dashboard/src/pages/Chat/components/ConversationModePicker.tsx
+++ b/dashboard/src/pages/Chat/components/ConversationModePicker.tsx
@@ -7,6 +7,7 @@ import {
type LucideIcon,
} from "lucide-react";
import { Popover, Tooltip } from "antd";
+import cx from "classnames";
import type { ConversationMode } from "../utils/conversationMode";
import styles from "../index.module.less";
@@ -55,9 +56,10 @@ export function ConversationModeMenu({
onChange(mode)}
>
@@ -103,9 +105,10 @@ export default function ConversationModePicker({
>
{
expect(screen.getByText("我的专家")).toBeInTheDocument();
const hideButtons = screen.getAllByRole("button", {
- name: /chat\.expertHide|Hide shared expert|隐藏共享专家/,
+ name: /chat\.expertHide|Hide expert|隐藏专家/,
});
- expect(hideButtons.length).toBe(2);
- await user.click(hideButtons[0]);
+ expect(hideButtons.length).toBe(3);
+ await user.click(hideButtons[1]);
expect(screen.queryByText("共享专家甲")).not.toBeInTheDocument();
expect(screen.getByText("共享专家乙")).toBeInTheDocument();
@@ -88,4 +88,25 @@ describe("ExpertPickerPopover hide shared experts", () => {
}),
).not.toBeInTheDocument();
});
+
+ it("hides an owned expert from the picker", async () => {
+ const user = userEvent.setup();
+ render(
+
+ undefined}
+ />
+ ,
+ );
+
+ const hideButtons = screen.getAllByRole("button", {
+ name: /chat\.expertHide|Hide expert|隐藏专家/,
+ });
+ await user.click(hideButtons[0]);
+
+ expect(screen.queryByText("我的专家")).not.toBeInTheDocument();
+ expect(screen.getByText("共享专家甲")).toBeInTheDocument();
+ });
});
diff --git a/dashboard/src/pages/Chat/components/ExpertPickerPopover.tsx b/dashboard/src/pages/Chat/components/ExpertPickerPopover.tsx
index 32d4bc9d77..111352647c 100644
--- a/dashboard/src/pages/Chat/components/ExpertPickerPopover.tsx
+++ b/dashboard/src/pages/Chat/components/ExpertPickerPopover.tsx
@@ -2,6 +2,7 @@ import { useCallback, useMemo, useState } from "react";
import { useTranslation } from "react-i18next";
import { useNavigate } from "react-router-dom";
import { Eye, EyeOff, GraduationCap, Info } from "lucide-react";
+import cx from "classnames";
import SearchablePickerPanel, {
pickerStyles,
} from "../../../components/ChatPicker/SearchablePickerPanel";
@@ -145,9 +146,11 @@ export default function ExpertPickerPopover({
return (
setPreviewMode((v) => !v)}
aria-label={
previewMode
@@ -272,7 +274,10 @@ export default function FilePanelContent({
void save()}
disabled={saving}
aria-label={t("common.save")}
@@ -332,9 +337,10 @@ export default function FilePanelContent({
return (
{fileMissing ? (
diff --git a/dashboard/src/pages/Chat/components/HiddenExpertsToggle.tsx b/dashboard/src/pages/Chat/components/HiddenExpertsToggle.tsx
new file mode 100644
index 0000000000..79adbf9cb9
--- /dev/null
+++ b/dashboard/src/pages/Chat/components/HiddenExpertsToggle.tsx
@@ -0,0 +1,43 @@
+import { useTranslation } from "react-i18next";
+import { ChevronDown } from "lucide-react";
+import cx from "classnames";
+import styles from "../index.module.less";
+
+/** Centered disclosure for the hidden-expert group in the chat nav. */
+export default function HiddenExpertsToggle({
+ expanded,
+ count,
+ onToggle,
+}: {
+ expanded: boolean;
+ count: number;
+ onToggle: () => void;
+}) {
+ const { t } = useTranslation();
+ return (
+