Skip to content

codes v0.1.2

Choose a tag to compare

@github-actions github-actions released this 30 Mar 10:22

codes v0.1.2

0.1.2 主要提升了 codes 在 Codex / Claude Code 会话中的可用性,以及大结果集查询时的可控性。这个版本新增了 skill 直接安装能力,并为仓库级查询命令补齐了分页支持。

主要变更

  • 新增 codes skill install,可直接把内置 skill 安装到 Codex 或 Claude Code 的个人目录

    • 新命令为 codes skill install --target <codex|claude-code> [--force]。
    • --target codex 会写入 ~/.codex/skills/code-search-cli/SKILL.md。
    • --target claude-code 会写入 ~/.claude/skills/code-search-cli/SKILL.md。
    • 已存在时默认拒绝覆盖,只有显式传入 --force 才会覆盖,避免误改用户已有 skill。
    • codes skill print 仍然保留,兼容现有通过 shell 重定向安装的用法。
  • symbols / definition / references 现在支持分页

    • 三个命令都支持 --limit 和 --offset。
    • --offset 的语义是跳过前 N 条结果,再返回当前页,适合脚本和交互式翻页。
    • 这三类命令现在默认 --limit=100,避免在符号量很大的仓库里一次性输出过多结果。
    • text 输出在分页时会显示当前窗口和总数,例如 20 matches (showing 41-60 of 137)。
    • json 输出新增 total、offset、limit 字段,便于调用方做后续分页处理。
  • definition 的分页顺序现在显式稳定

    • 之前 definition 没有单独排序,理论上可能受索引内部顺序影响。
    • 现在会在分页前按 path -> line -> column -> kind 排序,使分页边界稳定。
    • 这个排序只作用于精确名字匹配后的结果集,不会影响缓存构建或并行解析路径的性能。

兼容性说明

  • 这是一次向前兼容的增强版本。
  • 未显式传入 --limit 的 symbols / definition / references 现在默认只返回前 100 条;如需旧行为的“大量结果”,请显式传入更大的 --limit。
  • codes skill print 和现有查询参数仍然可用。

English

0.1.2 improves codes usability inside Codex / Claude Code workflows and makes large result sets easier to handle. This release adds direct skill installation and introduces pagination for repository-level search commands.

Highlights

  • New codes skill install command for direct Codex / Claude Code skill installation

    • New command: codes skill install --target <codex|claude-code> [--force].
    • --target codex writes to ~/.codex/skills/code-search-cli/SKILL.md.
    • --target claude-code writes to ~/.claude/skills/code-search-cli/SKILL.md.
    • Existing files are preserved by default; overwrite requires an explicit --force.
    • codes skill print remains available, so shell-redirect based installation still works.
  • Pagination is now available for symbols, definition, and references

    • All three commands now support --limit and --offset.
    • --offset skips the first N results before returning the current page, which works well for both scripting and interactive paging.
    • These commands now default to --limit=100 to avoid dumping excessively large result sets in symbol-heavy repositories.
    • Text output now shows the current window and total count, for example: 20 matches (showing 41-60 of 137).
    • JSON output now includes total, offset, and limit fields for downstream pagination logic.
  • definition pagination order is now explicitly stable

    • Previously, definition had no explicit sort of its own and could theoretically inherit index-internal ordering.
    • Results are now sorted by path -> line -> column -> kind before pagination, making page boundaries stable.
    • This sort only runs on the exact-name result set, so it does not affect cache build or parallel parsing performance.

Compatibility

  • This is a forward-compatible enhancement release.
  • If you do not pass --limit, symbols / definition / references now return only the first 100 results by default. If you want larger result sets, pass a larger explicit --limit.
  • codes skill print and all existing query flags remain available.

Full Changelog: 0.1.1...0.1.2