Uh oh!
There was an error while loading. Please reload this page.
feat: sync recent upstream semble changes (savings output, agents, clear) - #20
Conversation
…ear) - savings output redesign (semble #197): rewrote formatSavingsReport with ANSI color helpers (useColor/color/colorRatio, suppressed under NO_COLOR / dumb terminal / non-TTY) and a new layout — Total saved/calls/Efficiency headline + "By Period" table; "By Call Type" breakdown gated behind --verbose. Added padLeft helper. - 4 new agents (semble #196/#192/#183): added agent markdown files for antigravity, commandcode, pi, and reasonix; extended Agent enum, _coerceAgent, and help text in cli.ts; updated both READMEs. - clear command (semble #181): clearSavings() in stats.ts; _runClear + dispatch + CLI_DISPATCH_ARGS + help in cli.ts; clear sections in both READMEs. Note: JSON output flag (#147) was already present in the csp port prior to this batch.
There was a problem hiding this comment.
Code Review
본 풀 리퀘스트는 Antigravity, Command Code, Pi, Reasonix 등 새로운 서브 에이전트 지원을 추가하고, 캐시된 데이터를 비우는 clear 서브커맨드를 도입하며, savings 보고서의 레이아웃을 ANSI 색상이 적용된 디자인으로 개선합니다. 리뷰어는 clearSavings 함수가 PR 설명과 달리 파일을 삭제(rmSync)하고 있어 심볼릭 링크가 깨지거나 예외가 발생할 수 있음을 지적했습니다. 이에 따라 파일 삭제 대신 writeFileSync를 사용해 안전하게 파일을 비우고(Truncate) 예외 처리를 추가할 것과, 관련 테스트 코드(src/stats.test.ts)도 파일이 비워졌는지 검증하도록 수정할 것을 제안했습니다.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
amondnet
commented
Jun 17, 2026
/gemini review |
Warning Gemini encountered an error creating the review. You can try again by commenting |
Up to standards ✅🟢 Issues |
| Metric | Results |
|---|---|
| Complexity | 25 |
| Duplication | 4 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewerTIP This summary will be updated as you push new changes.
Adopt gemini-code-assist's defensive try-catch in clearSavings so a permission error or broken symlink reports cleared:false instead of crashing the CLI. Keep deletion (not truncation) for parity with semble's unlink and so `csp savings` still falls back to "No stats yet".
Summary
Pulls in three batches of upstream MinishLab/semble changes reviewed up to commit eacbe43 (2026-06-12) and adapts them to the csp port.
Changes
1. Savings output redesign (semble #197)
src/stats.ts— rewroteformatSavingsReportwith:useColor/color/colorRatio), automatically suppressed whenNO_COLORis set, terminal isdumb, or stdout is not a TTY.--verbose.padLeftutility for right-aligned numeric columns.Tests updated in
src/stats.test.ts(+12 assertions covering color suppression, period bucketing, efficiency formatting, and verbose gating).2. Four new agents (semble #196 / #192 / #183)
src/agents/antigravity.md,commandcode.md,pi.md,reasonix.md— agent-native frontmatter, body byte-equivalent to existing csp agents.Agentenum,_coerceAgentcoercion map, and--agenthelp text insrc/cli.ts.README.mdandREADME.ko.mdsub-agent lists (both kept in sync).3.
clearcommand (semble #181)Adapted the upstream
clearsubcommand to csp:clearSavings()helper insrc/stats.ts(deletes~/.csp/savings.jsonl, matching semble'sunlink)._runClearhandler + dispatch entry +CLI_DISPATCH_ARGSregistration insrc/cli.ts.clearsections added to both READMEs.Note: JSON output flag (#147) was already present in the csp port prior to this batch and was not re-ported here.
Verification
Test results (
bun test)makeStubModel/searchResultToDict/DEFAULT_CONTENT,ContentTypebarrel, and aformatResultsr.toDict()mock mismatch) — all unrelated to this batch.Lint / typecheck
eslintcould not run cleanly in the local environment (jitimissing for flat config loading).tsc --noEmithits pre-existing stub type errors forCspIndex.save/loadFromDisk— unrelated to this batch.Related
Summary by cubic
Sync recent upstream
MinishLab/semblechanges into the CSP port: redesigned savings report, four new agent templates, and aclearsubcommand. Improves reporting clarity, expands agent support, and adds a safe way to clear cached telemetry.New Features
--verboseadds By Call Type.Agentenum/coercion/CLI help; READMEs updated.csp clear <savings|index|all>; removes~/.csp/savings.jsonl; index clear is a no-op until persistence exists; tests added.Bug Fixes
clearSavingsto swallow I/O errors and reportcleared: falseinstead of crashing; keeps deletion (not truncation) for clean “No stats yet” behavior.Written for commit 9e47418. Summary will update on new commits.