| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
fix(tui): 强制退出改 _exit——修复强退 Segmentation fault 实测(用户报 segfault + 复现):两级 Ctrl+C 强退用 libc exit(0) 会运行 仓颉 runtime 的 atexit 清理,而 agent 线程仍在阻塞(mock 延迟/TLS read), 清理访问跨线程资源 → SIGSEGV(静态版 exit code -11)。 修复:强制退出改用 _exit(0)(POSIX,直接内核级终止,跳过 atexit/runtime 清理)——进程退出即终止一切线程,无清理竞态。 真实场景回归(scripts/real_stall_test.py,本地坏代理复现用户卡死场景): - A. 坏代理停滞(发内容后不关连接、无 [DONE]/finish_reason)中 Ctrl+C → 中断 0.1s 生效(parser 轮询真实链路验证) - B. 停滞中 Ctrl+C ×2 强退 → exit 0(不再 segfault) - C. 停滞 15s(CJH_IDLE_TIMEOUT_SECS)→ parser 空闲预算触发, 回合自动结束(不会无限卡 Streaming) 注:用户 254s 无限卡 + segfault 均为旧构建(无 parser 轮询/预算、 强退用 exit());最新代码下停滞会自动恢复、中断 ≤5s、强退不崩溃。 | 14 天前 | |
test(tui): keep-alive 空帧停滞场景回归测试——看门狗兜底链路验证 坏代理发内容帧后持续发 keep-alive 空帧(精确模拟 taotoken.net: 不发 [DONE]/finish_reason、不关连接、空帧维持 read 活动)→ parser 空闲预算被绕过 → 看门狗(agentLastActivity 仅真实内容帧)10s 触发 → 中断 → 回合结束(总结条)。实测:看门狗 11s 触发、回合 11s 结束。 | 14 天前 | |
feat(tui): input box soft-wrap display + restore [Paste #N] collapse + fix paste cursor misplacement (v1.3.20) Paste handling is now two-path: - >3 content lines (trailing newline not counted): collapsed to an atomic "[Paste #N, +X lines]" marker (raw text kept in pasteStore, never in the input box); Enter submits expanded text, Backspace deletes the whole token; markers embedded in prefixed text expand in place on submit. - <=3 lines: kept verbatim, normalized CRLF->LF, inserted at the cursor and rendered with display-width soft-wrap (first-line budget = cols - prompt width, continuation budget = cols - 2 indent, CJK = 2 cols), viewport clamped to 5 lines following the cursor. Fix paste cursor misplacement: wrappedLines truncated its (start,end) row segments to the first 5 rows, so a scrolled viewport rendered the correct row numbers but took stale first-row segments — cursor landed on the wrong line/column instead of the paste end. Rows are now clamped to the viewport for height only; segments are returned in full and indexed by absolute row number in render and cursor-column computation. Also fixes marker prefix comparison using a byte-range slice whose end can land mid multi-byte UTF-8 char (Invalid utf8 on every Backspace in CJK input) — now compares the 8 ASCII prefix bytes one by one. Layout: TuiApp input area height is now dynamic (displayHeight(), 1..5 rows) instead of a hardcoded 1 row; welcome centering block and picker top bound follow the dynamic height. Bump version 1.3.19 -> 1.3.20 (cjpm.toml + Logo.VERSION); update docs (进度记录 round 33, 踩坑记录 §3.24) and PTY scenario 12 (dual-path collapse + soft-wrap assertions); +11 unit tests covering newline retention, CRLF normalization, collapse over/at 3-line boundary, CRLF+prefix collapse, collapse submit + atomic backspace, collapse cursor-at-end, CJK soft-wrap cursor regression; refresh v1.3.20 dist artifacts (linux-x64, windows-x64.exe, windows zip) + SHA256SUMS. Co-Authored-By: AtomCode (qwen3.8-27b) <noreply@atomgit.com> | 5 天前 | |
feat(knowledge): add the Cangjie built-in knowledge layer (phases 1 + 2) Phase 1 exposes the six in-repo skills as short entries (frontmatter description + absolute path to the full text) instead of inlining every body into the system prompt; the full text lives under ~/.cjh/cangjie-ref/skills/<name>/SKILL.md and is read on demand. Resident entry bytes drop from 21,988 to 7,624 (-65%). The installer also ingests the CangjieSkills package in tiers (two zero-dependency Markdown skills plus cangjie-coding, which needs Python 3.11+ and is skipped otherwise), is idempotent, and migrates legacy full-text entries after backing them up. Phase 2 adds the read-only cangjie_ref tool, which searches the local corpus fully offline (CJK 2-gram plus ASCII tokenization, line scoring, hits carrying path:line and the nearest section heading). It is not registered when the corpus directory is absent, so users without the knowledge layer pay nothing; the tool description costs 334 resident bytes. Skills and corpus stay runtime data - no resource/embed in any cjpm.toml, the binary grows by 56,416 B of code only. Gate: 397/397 tests green. Co-Authored-By: AtomCode (deepseek-v4-flash-vision-exp) <noreply@atomgit.com> | 2 天前 | |
test(tui): keep-alive 空帧停滞场景回归测试——看门狗兜底链路验证 坏代理发内容帧后持续发 keep-alive 空帧(精确模拟 taotoken.net: 不发 [DONE]/finish_reason、不关连接、空帧维持 read 活动)→ parser 空闲预算被绕过 → 看门狗(agentLastActivity 仅真实内容帧)10s 触发 → 中断 → 回合结束(总结条)。实测:看门狗 11s 触发、回合 11s 结束。 | 14 天前 | |
fix(tui): 强制退出改 _exit——修复强退 Segmentation fault 实测(用户报 segfault + 复现):两级 Ctrl+C 强退用 libc exit(0) 会运行 仓颉 runtime 的 atexit 清理,而 agent 线程仍在阻塞(mock 延迟/TLS read), 清理访问跨线程资源 → SIGSEGV(静态版 exit code -11)。 修复:强制退出改用 _exit(0)(POSIX,直接内核级终止,跳过 atexit/runtime 清理)——进程退出即终止一切线程,无清理竞态。 真实场景回归(scripts/real_stall_test.py,本地坏代理复现用户卡死场景): - A. 坏代理停滞(发内容后不关连接、无 [DONE]/finish_reason)中 Ctrl+C → 中断 0.1s 生效(parser 轮询真实链路验证) - B. 停滞中 Ctrl+C ×2 强退 → exit 0(不再 segfault) - C. 停滞 15s(CJH_IDLE_TIMEOUT_SECS)→ parser 空闲预算触发, 回合自动结束(不会无限卡 Streaming) 注:用户 254s 无限卡 + segfault 均为旧构建(无 parser 轮询/预算、 强退用 exit());最新代码下停滞会自动恢复、中断 ≤5s、强退不崩溃。 | 14 天前 | |
chore(release): v1.3.28 Cuts v1.3.28: version sync, the blank-line gap between thinking blocks and replies (landed in a6e5870), and a build-config incident fix. - cjpm.toml: restore the static baseline ( --static --static-std --static-libs + static/stdx) that the v1.3.27 release commit had replaced with the dynamic test config (dragging version back to 1.3.4), and bump version to 1.3.28. Rebuilt binary: ldd shows only the 6 system libraries, v1.3.28 present. - scripts/test.sh: the restore trap now also fires on INT/TERM/HUP and warns when the repo config is already dynamic on entry. A killed run used to leave the dynamic config behind in git — that is exactly how the above happened. - cjpm.toml.dynamic.bak: version synced so a future accidental overwrite cannot downgrade the version again. - Docs: CHANGELOG [v1.3.28], README.md / README.en.md version history, docs/进度记录.md round-45 record. Gates: 379 root tests (FAILED 0 / ERROR 0), 93 cjterm tests, 61 PTY scenarios, --mock exit 0, cjpm build success. Co-Authored-By: AtomCode (deepseek-v4-flash-vision-exp) <noreply@atomgit.com> | 2 天前 | |
feat(ref): add TUI /ref panel and align only .md when refreshing same-named skills TUI panel (src/slash_command.cj): - /ref [status|verify|rebuild|search <词>|update] delegates to cjh.tools.refCliMain, so the panel and the CLI share one implementation instead of growing a second search/verify path - update is the only network path and is gated: without --yes it prints the plan (corpus dir, repo, branch, flow, how to confirm) and returns without touching disk; --source is treated as an offline source and is not gated - parsing/gating lives in pure functions (refPanelSub/Strip/NeedsConfirm/OptionOf/ConfirmText) covered by unit tests; /help and tab completion list /ref cjh ref search <words>: new subcommand that runs the existing CangjieRefTool once (offline) ref update on same-named skills: replace "delete the whole skill dir, then copy source .md" with "align .md only" - stale .md files are removed so the md set mirrors the source, non-.md assets (shipped tooling / knowledge bases) are kept, and skill dirs absent from the source are left untouched. Found on the live corpus: the old behaviour wiped cangjie-coding's doc_search scripts (23 files) and knowledge.sqlite3 (8.9 MB) while ref verify still reported success, because the manifest only covers .md. refApplyStaging now returns RefApplyStats and update reports "同名技能: 覆盖 N 个(清理旧 md M 个,保留非 md K 个)". Tests: repro first (testRefUpdateKeepsNonMdAssetsOfSameNamedSkill failed before the fix), plus testRefUpdateLeavesUnrelatedSkillsUntouched; 5 pure-function cases for the panel and a PTY scenario [16] that exercises the confirm gate without ever running git clone. Verified: ./scripts/test.sh 441/441 green; cjpm build + --mock e2e pass; tui_pty_test.py 67/0; real network run on the live corpus (dry-run -> update -> verify -> --restore) leaves 38 files / 9.0 MB (13 md + 25 non-md) intact. Co-Authored-By: AtomCode (deepseek-v4-flash-vision-exp) <noreply@atomgit.com> | 2 天前 | |
release(v1.3.7): 双平台发布包 + 构建配置回归修复(静态链接) 发布产物(dist/,随仓库分发): - dist/linux/cjh-v1.3.7-linux-x64:16.2MB 静态单文件,ldd 仅 6 个系统库, env -i(无 LD_LIBRARY_PATH)直接运行 - dist/cjh-v1.3.7-windows-x64.zip:7.6MB,cjh-v1.3.7-windows-x64.exe + libcangjie-runtime.dll + libboundscheck.dll + libcrypto/libssl-3-x64.dll (同 v1.3.4 布局;exe 导入回落 7 个系统/runtime DLL) - dist/SHA256SUMS-v1.3.7.txt:三产物 sha256 构建配置回归修复(v1.3.5~v1.3.7 首次构建均受影响): - cjpm.toml:f7b5945 提交时处于动态测试态被连带提交(切动态配置后未恢复), 此后 HEAD 产出 40+ 动态库依赖的二进制,与 README"默认静态"脱节。 恢复 --static --static-std --static-libs + static/stdx 路径(以 66f1095 为基准) - scripts/winbuild.sh:WINDOWS_STDX 从 dynamic/stdx 改指 static/stdx (动态目录缺全套导入库,致 exe 动态挂 12 个 libstdx.*.dll); 加注释"勿改回 dynamic" - .gitignore:补本地运行产物 .cjh/、cjh_tui.log 验收落点(教训,详见踩坑记录 §3.13): - Linux ldd 仅系统 libc 系;Windows objdump -p 导入表核对 DLL Name - 配置漂移保护不了"人手动切配置忘恢复"窗口期,验收必须落到产物本身 门禁(静态配置下复跑): - build 通过 + test.sh 272/0(含切动态跑测试后自动恢复静态)+ cjllm 31/0 + --mock(静态二进制 env -i 端到端)全过 文档: - 踩坑记录新增 §3.13(配置漂移根因链 + 三坑表 + 教训) - 进度记录更新第十九轮 - README 版本历史补 v1.3.7 行 Co-Authored-By: AtomCode (qwen3.8-27b) <noreply@atomgit.com> | 12 天前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 14 天前 | ||
| 14 天前 | ||
| 5 天前 | ||
| 2 天前 | ||
| 14 天前 | ||
| 14 天前 | ||
| 2 天前 | ||
| 2 天前 | ||
| 12 天前 |