fix: prompts-library - preserve excel jsonl row numbers

This commit is contained in:
tukuaiai
2026-05-02 04:01:07 +08:00
parent 8aa2d115f6
commit 0ea19ed655
2 changed files with 3 additions and 2 deletions
+1
View File
@@ -9,3 +9,4 @@
- 更新 README、AGENTS、llms、metadata、CI 与目录级 AGENTS,统一新知识库路径口径。
- 增加 `scripts/check-local-links.py``make check-links``make test`,把本地链接检查纳入质量门禁和 CI。
- 清退 `tools/external/my-nvim/nvim-config/nvim` 二进制运行时,改为文档说明从官方渠道安装 Neovim。
- 修复 `tools/prompts-library/main.py` 中 Excel(JSONL) -> JSONL 转换的行号偏移,保持导出记录与 Excel 原始行号一致。
+2 -2
View File
@@ -336,7 +336,7 @@ def run_jsonl_excel_to_jsonl(excel_path: Path, project_root: Path) -> int:
sheet_lines.append(json.dumps({
"category_id": cat_id,
"category": cat_name,
"row": row_idx + 2,
"row": row_idx + 1,
"col": col_idx + 1,
"title": obj["title"][:80],
"content": obj["content"]
@@ -351,7 +351,7 @@ def run_jsonl_excel_to_jsonl(excel_path: Path, project_root: Path) -> int:
build_text_record(
cat_id=cat_id,
cat_name=cat_name,
row=row_idx + 2,
row=row_idx + 1,
col=col_idx + 1,
text=val_str,
)