Skip to content

Codineer v0.6.3

Choose a tag to compare

@andeya andeya released this 05 Apr 06:04
· 302 commits to main since this release

Bug Fixes

API / Provider

  • Strip provider prefix from model field in OpenAI-compat requests
    ollama/qwen3-coderqwen3-coder before sending to the upstream API,
    preventing model-not-found errors on strict endpoints.

  • Accept reasoning_content / array content in OpenAI-compat SSE
    DashScope and similar providers that return reasoning_content or array-typed
    content blocks are now parsed and surfaced correctly.

  • Harden OpenAI-compat response handling, model routing & Azure queries

    • Tolerate missing / null fields in streamed delta objects.
    • Azure: append api-version query param when apiVersion is set.
    • Model routing: prefer defaultModel from the provider config when no
      explicit model is given.

CLI

  • DashScope stream resilience — auto-retry with a non-streaming request
    when the assistant stream produces no content (common with some DashScope
    model variants).

  • Fix codineer config set ignoring CODINEER_CONFIG_HOME
    The command now writes to $CODINEER_CONFIG_HOME/settings.json instead of
    the hardcoded ~/.codineer/settings.json.

  • Fix nested Tokio runtime creation
    CliToolExecutor now shares the runtime Arc instead of spawning a new one
    per MCP tool call.

  • Fix pick_best_coding_model panic on empty candidate list.

Refactoring

  • Modularize oversized source files (net −2 800 lines):
    • runtime_client.rs (1 387 L) → runtime_client/ directory module
      (mod / model / stream / messages / permission / tool_executor / tests)
    • main.rs (1 697 L) → main.rs + bootstrap.rs + main_tests.rs
    • live_cli.rs (1 095 L) → live_cli.rs + lsp_detect.rs + turn_helpers.rs
    • openai_compat.rs (1 140 L) → openai_compat.rs + openai_compat_sse.rs
      • openai_compat_stream.rs

UX Improvements

  • @ / / suggestion navigation — Up / Down no longer resets the
    selected item on every keystroke.

  • "Thinking…" indicator position — fixed raw-mode line-ending (\r\n) so
    the spinner always starts at column 0 on a new line.

  • Trailing space after completion — pressing Enter on a @ or /
    suggestion appends a space so the next typed word is cleanly separated.

  • @path mention handling@path tokens are stripped from the text
    sent to the AI; file / directory content is injected as structured XML
    blocks (<attached_file>, <attached_directory>, <not_found>).

  • OS-appropriate config paths in --help — Windows shows
    %USERPROFILE%\.codineer\… with backslashes; Unix / macOS shows
    ~/.codineer/….

  • Claude-style REPL welcome banner — richer context panel on startup.

Documentation

  • Added Actual path column to the settings-files table in both README.md
    and README_CN.md to make clear that .codineer.json lives in the project
    root (not inside .codineer/).

  • Clarified that directory-based and flat config files per scope are not
    duplicates
    : directory form wins when both exist; codineer config set
    always writes the directory form.

  • Documented mcpServers merge semantics: same-name server from a later file
    replaces (does not deep-merge) the earlier definition.

  • Updated CODINEER_CONFIG_HOME description to note the flat config relocates
    to the parent of the custom dir.


缺陷修复

API / Provider

  • OpenAI 兼容请求中剥离 Provider 前缀
    发送给上游 API 时将 ollama/qwen3-coder 裁剪为 qwen3-coder
    避免严格端点返回"模型不存在"错误。

  • 支持 reasoning_content / 数组型 content 的 SSE 解析
    DashScope 等返回 reasoning_content 字段或数组 content 块的
    Provider 现可正确解析并展示。

  • 强化 OpenAI 兼容响应处理、模型路由及 Azure 请求

    • 兼容流式 delta 对象中缺失 / null 字段的情况。
    • Azure:若配置了 apiVersion,自动将 api-version 附加到请求 URL。
    • 模型路由:无显式模型时优先使用 Provider 配置中的 defaultModel

CLI

  • DashScope 流式容错 — 当助手流无内容输出时,自动补发一次
    非流式请求(适配部分 DashScope 模型变体)。

  • 修复 codineer config set 忽略 CODINEER_CONFIG_HOME
    现在写入 $CODINEER_CONFIG_HOME/settings.json,不再硬编码 ~/.codineer/settings.json

  • 修复嵌套 Tokio Runtime 创建
    CliToolExecutor 现在共享同一个 Arc<Runtime>,不再每次 MCP
    工具调用时都新建 Runtime。

  • 修复 pick_best_coding_model 在候选列表为空时 panic

重构

  • 拆分超大源文件(净减少约 2 800 行):
    • runtime_client.rs(1 387 行)→ runtime_client/ 目录模块
    • main.rs(1 697 行)→ main.rs + bootstrap.rs + main_tests.rs
    • live_cli.rs(1 095 行)→ live_cli.rs + lsp_detect.rs + turn_helpers.rs
    • openai_compat.rs(1 140 行)→ openai_compat.rs + openai_compat_sse.rs
      • openai_compat_stream.rs

交互体验

  • @ / / 建议项导航 — 按上下方向键不再每次重置选中项。

  • "Thinking…" 指示器位置 — 修复 raw 模式下换行符(\r\n),
    确保进度指示器始终从新行行首显示。

  • 补全后自动加空格 — 回车确认 @/ 补全项后,
    自动在末尾追加空格,方便继续输入后续内容。

  • @path 引用处理 — 发送给 AI 的文本中剥离原始 @path 标记,
    转而注入结构化 XML 块(<attached_file><attached_directory><not_found>)。

  • --help 中显示操作系统对应的配置路径 — Windows 显示
    %USERPROFILE%\.codineer\…(反斜杠),Unix / macOS 显示 ~/.codineer/…

  • Claude 风格的 REPL 欢迎横幅 — 启动时展示更丰富的上下文面板。

文档

  • README.mdREADME_CN.md 的配置文件表格中新增"路径示意"列,
    明确 .codineer.json 位于项目根目录(而非 .codineer/ 子目录)。

  • 说明目录形式与扁平形式配置文件并非重复:同时存在时目录形式优先;
    codineer config set 始终写入目录形式。

  • 补充 mcpServers 合并语义:同名服务器以后加载的文件完整替换(不深度合并)。

  • 更新 CODINEER_CONFIG_HOME 说明:该变量同时改变全局扁平配置文件的位置。

Full Changelog: v0.6.2...v0.6.3

Full Changelog: v0.6.2...v0.6.3