feat(tests): add comprehensive tests for TokenRouter and related components

- Implement tests for TokenRouter downstream policy, covering allowedRouteIds and site weight multipliers.
- Add tests for TokenRouter patterns and model mapping, including regex pattern matching and model mapping precedence.
- Create tests for BrandIcon component to verify brand detection logic.
- Develop tests for Accounts page, focusing on rebind panel behavior and refresh action on error.
- Introduce fuzzy search utility tests to validate substring and subsequence matching.
- Implement navigation focus helpers tests for building and parsing focus paths.
- Add progressive render tests to ensure correct initial and next visible counts.
- Create route model candidates index tests to validate route candidate indexing and matching logic.
This commit is contained in:
cita
2026-03-02 13:33:35 +08:00
parent 99c9e145c3
commit f6389a999a
98 changed files with 11286 additions and 801 deletions
+51
View File
@@ -0,0 +1,51 @@
---
layout: home
hero:
name: "Metapi 文档中心"
text: "中转站的中转站"
tagline: "将分散的 AI 中转站聚合为一个统一网关"
image:
src: /logos/logo-full.png
alt: Metapi
actions:
- theme: brand
text: 10 分钟快速上手
link: /getting-started
- theme: alt
text: 常见问题 FAQ
link: /faq
- theme: alt
text: 贡献教程/FAQ
link: /community/faq-tutorial-guidelines
features:
- title: 快速上手
details: 从部署到第一条请求,按步骤完成最小可用环境搭建。
link: /getting-started
- title: 问题排查
details: 汇总高频报错、根因定位和标准修复路径,降低重复沟通成本。
link: /faq
- title: 运维与配置
details: 覆盖部署、配置、监控、备份、升级回滚等生产场景。
link: /operations
---
## 文档定位
- 面向新用户:快速搭建和接入
- 面向维护者:稳定运行、排障和升级
- 面向贡献者:持续沉淀教程、FAQ 与最佳实践
## 推荐阅读路径
1. [快速上手](/getting-started)
2. [部署指南](/deployment)
3. [配置说明](/configuration)
4. [客户端接入](/client-integration)
5. [常见问题 FAQ](/faq)
## 协作维护
如需新增文档内容,请优先使用统一模板与提交流程:
[FAQ/教程贡献规范](/community/faq-tutorial-guidelines)