feat(tsl-api-reference): update API catalog and data dictionary

This commit is contained in:
csh
2026-08-11 18:10:24 +08:00
parent 34a3a5dec1
commit 7bd965de89
1231 changed files with 64187 additions and 18822 deletions
+29 -1
View File
@@ -1,6 +1,6 @@
---
name: tsl-api-reference
description: "当编写、修改或审查 TSL 代码时需要确认 builtin、dotnet、third 或模块 API 是否存在及其精确签名、参数、返回值和示例时使用;也用于只记得函数用途而想不起函数名,或不确定记忆中的 TSL API 名称与参数是否准确时。"
description: "当编写、修改或审查 TSL 代码时需要确认 builtin、dotnet、third 或模块 API 是否存在及其精确签名、参数、返回值和示例时使用;也用于按自然语言查找天软数据字典中的表、数据源与字段。"
---
# TSL API 参考
@@ -9,6 +9,34 @@ description: "当编写、修改或审查 TSL 代码时需要确认 builtin、do
若需查询 TSL 语法、控制流、变量、对象模型或运行时语言规则,请改用
`tsl-syntax-reference` skill。
天软数据字典中的表、数据源和字段不是可调用 API,不进入 `function_index.tsv`
函数问题使用 `lookup.py`,表或字段问题使用 `dictionary_lookup.py`
## 数据字典查询
用户按中文业务含义描述表或字段时,运行独立的字典查询脚本
```bash
python <this-skill-dir>/scripts/dictionary_lookup.py --query "股票现金流指标销售现金比率"
```
已知业务范围、表名、数据源名或字段名时使用过滤参数
```bash
python <this-skill-dir>/scripts/dictionary_lookup.py --query "市值" --scope fund
python <this-skill-dir>/scripts/dictionary_lookup.py --query "买一量" --table TradeTable
python <this-skill-dir>/scripts/dictionary_lookup.py --query "9900700" --field 销售现金比率
```
查询结果包含表或数据源名称、表 ID、字段名称、字段 ID、类型、单位、提取方式、
访问代码、对应 API 和字典页面
- 标识符匹配不删除下划线
- 同义词只从 `dictionary_lexicon.json` 中取受控映射
- `status: ambiguous` 时必须向用户列出候选并要求补充表或数据源范围,不能默认选择第一项
- `MarketTable``TradeTable` 是 TS-SQL 数据源,不是函数
- `status: no_match` 表示字典无匹配,不能改述为 API 的 `not found`
不要凭记忆或参照相似语言推断 API 签名。TSL 名称大小写不敏感,但下划线是有意义的:
查询或报告 API 时不要删除下划线,也不要把名称改写成驼峰式。