Skip to content

Releases

v0.1.14

Choose a tag to compare

@github-actions github-actions released this 19 Oct 05:32

cell 0.1.14

修复:cellui 窗口在 4–5 秒后消失

  • 窗口归宿主所有:页面不再能关闭原生窗口。with_webui_bridge() 在 webui.js 之前注入 window.close = no-op;应用退出仍由 webui_wait() / 进程退出结束窗口。
  • WebUI 服务器不再把「已连接过又断开」当作启动失败(移除 stop = true):刷新页面、渲染器挂起、慢恢复都不会再关掉窗口;服务器继续监听,桥接层可重连。
  • WEBUI_RELOAD_TIMEOUT 1500ms → 15000ms:原值短于繁忙桌面上 WebView2 渲染器的挂起/恢复时间。
  • _webui_wv_show() 的 WebView2 冷启动等待 500ms → 5000ms:500ms 会输掉竞态,show_wv() 返回 false 并回退浏览器。
  • webui_new_window_id() 清零窗口结构:_webui_malloc 不清零,transparent / frameless 曾是堆垃圾。
  • WebView2 控制器 put_Bounds 后显式 put_IsVisible(TRUE)。

测试

  • 实机:窗口存活 ≥20s(修复前 4.5s);几何仍持久化/恢复 (60,50,1160,880)。
  • tests/cellui_geometry.py 新增 6s 存活守卫:客户端断开后窗口必须仍在。
  • 全量 ctest 5/5。

已知

  • 本机 WebView2 156 的某些会话中,控制器创建成功、页面加载(窗口标题正确),但合成面不出像素(内容区白色)。这是该环境的 WebView2 渲染问题,与窗口生命周期 / 几何无关;窗口与几何修复不受影响。

提交

  • 6f216bd fix: keep the desktop window alive when the WebView2 client drops
  • db14051 test: guard the window lifetime in the real-machine geometry test

v0.1.13

Choose a tag to compare

@github-actions github-actions released this 19 Oct 04:34

cell 0.1.13

新功能:窗口位置 / 大小记忆(cellui)

  • DSHL 风格:window.json 记录 {x, y, width, height, maximized},启动时恢复;按当前显示器工作区钳制(保存在已断开显示器上的窗口仍会出现在可见区域);最小 640×480;严格校验、原子写入。
  • Windows 用 GetWindowPlacement 读 NORMAL 矩形(最大化时也能记住还原后的位置),MonitorFromRect 选择最近的工作区。
  • 窗口监督线程改为在 webui_show_wv 之前启动:show() 在 WebView2 桥断开时可能很晚返回,监督线程必须在 HWND 出现的第一时间持久化;首次扫描还会重放一次保存的矩形(WebUI 自身的摆放可能覆盖早期的 SetWindowPos)。
  • --size 仍优先于记忆尺寸;记忆位置保留。webui_set_minimum_size 防止窗口被缩到不可用。

测试

  • TDD:先写 selftest(越界钳制 / 负坐标显示器 / 过小 / 过大 / JSON 往返),实现前 6 项失败,实现后全绿。
  • 实机:tests/cellui_geometry.py(CELLUI_GEOMETRY_TEST=1)把窗口移到 (60,50,1160,880),校验 window.json,关闭重启后逐像素一致;两次运行的截图输出到 build/rel-assets/window-geometry/。

提交

  • 271127a feat: remember the desktop window's position and size
  • d4cb62c test: real-machine window geometry test with screenshots
  • 35e7ee1 docs: document the shell's window.json state

v0.1.12

Choose a tag to compare

@github-actions github-actions released this 18 Oct 17:04

cell 0.1.12

修正

  • 上下文窗口改为按模型:providers[].model_context_windows(模型名 → tokens)。同一 provider 下不同模型的窗口可能差别很大(4k gemma 与 128k qwen 并存),不再共用一个 provider 级值。/context N 只设置当前模型,/context auto 只清除当前模型。
  • 旧配置迁移:0.1.11 及更早的 provider 级 context_window 在加载时迁移到当时的 current_model,下次保存写成 model_context_windows;不会再套用到该 provider 的所有模型。
  • 压缩阈值透传:compact_threshold = 窗口 × 75% 现在经 do_chat 传入三个 client(openai-chat / responses / anthropic),空完成与截断判定不再用固定 3072。32k 窗口下 4k prompt 的空完成(含 finish_reason=length)不再自动压缩,而是明确报 prompt_tokens 并失败;没有 usage 时(Ollama)finish_reason=length 仍按上下文压力保守处理。

测试

  • selftest:per-model round-trip、未列模型无覆盖、32k 窗口 4k prompt 不触发、length + 小 prompt 视为 output limit、length + 无 usage 保守处理。
  • e2e:32k 窗口 + finish_reason=length + prompt_tokens=4000,必须只发 1 次请求、不压缩、明确失败。
  • 真 CLI:model-a=8k → 切到 model-b 未继承(unknown)→ model-b=2k → 切回 model-a=8k;旧 context_window 迁移正确。

文档

  • README.md / README_zh.md 的配置表补充 model_context_windows 与 /context 语义。

提交

  • 9a57cc7 fix: key context windows by model and pass the window's compact threshold to the clients
  • 903bd45 test: cover per-model windows and the large-window no-compact path
  • b510ea0 docs: document per-model context windows in the config tables

v0.1.11

Choose a tag to compare

@github-actions github-actions released this 18 Oct 15:50

cell 0.1.11

本次为 0.1.9 / 0.1.10 的复审修正。

修正

  • /context 支持 4096 / 8k / 1m(十进制 K/M,对齐设置面的容量写法);非法输入直接拒绝,不再让 stoll 把 8k 静默解析成 8。
  • /context auto 会清掉探测缓存重新询问;缓存 key 改为归一化 base,.../v1 与 .../v1/ 不再重复探测。
  • reasoning 流中 reasoning_content: "" 的占位不再挡住同一 delta 里后面的 reasoning 字段。
  • 纯空白文本不再算答案/内容:模型只吐一个换行时不会再把空回合当成功。
  • reasoning-only 的快速失败改用显式 no_retry 标志,错误不再谎报「5 attempts」;压缩后的重试恢复常规重试策略。
  • 状态栏在 usage 的 context_window 为 0(未知)时回退到 /v1/health 的已知窗口。
  • authHeaders 保留调用方传入的 Content-Type:上传的 application/octet-stream 不再被覆盖成 JSON。

文档

  • docs/RESTful.md:usage 增加 context_window / context_tokens / context_pct;/v1/health 增加 context_window;reasoning 事件标明三种字段名(reasoning_content / reasoning / thinking)。

测试

  • selftest 新增:parse_token_count(4096 / 8k / 1m / 大小写 / 空白 / 小数 / 垃圾 / 0 / 空串)、纯空白 answer/content 拒绝。
  • 全量 ctest 5/5、前端 228 pass / oxlint 0 error。

提交

  • 2aa04de fix: preserve a caller's Content-Type in the GUI's auth headers
  • 5bae2c8 fix: review corrections for the context-window and answer-guard paths
  • b1639f5 docs: document the context fields and the reasoning field names
  • caa7b03 test: drop the unused local in the context-overflow harness

v0.1.10

Choose a tag to compare

@github-actions github-actions released this 18 Oct 14:55

cell 0.1.10

修复:思考过程混入回答区 / 多数 UI 接口 failed to fetch

  • 思考过程显示在回答区:reason_cb 把思维链写入 stdout,serve 又把 stdout 捕获成 output;GUI 在首个正式 token 到达前回退到 output,于是思考文本先出现在回答区,等回答开始才「收纳」进思考块。现在 serve 模式下思维链只走 reasoning 事件(思考块),CLI 仍以暗色实时打印。
  • 多数 UI 接口 failed to fetch:前端用 PATCH /v1/config 保存设置,用 DELETE 删除会话 / provider / worker,但 CORS 预检只声明了 GET, POST, OPTIONS,浏览器直接拒绝真实请求。现在允许 PATCH, PUT, DELETE,并补上 Accept 与 Access-Control-Max-Age。
  • 误报内核未连接:状态栏在首次健康轮询前显示「内核离线」,且单次轮询失败就翻红。现在以「连接中」启动,连续 3 次失败(约 15 秒)后才判定离线,期间保留上一次健康状态。

测试

  • cell.e2e_context_overflow 新增回归:
    • OPTIONS /v1/config 预检必须声明 PATCH / DELETE 与 Authorization,否则设置保存与删除类接口会被浏览器拦成 failed to fetch;
    • reasoning-only 轮次的思维链只能出现在 reasoning 事件,不得进入捕获的 stdout(output);
    • 正常轮次的回答必须通过 token 事件送达。

提交

  • d314c0e fix: keep chain-of-thought out of the answer stream and let the UI's PATCH/DELETE preflights through
  • 4d42cb8 test: pin the CORS preflight methods and reasoning/output separation

v0.1.9

Choose a tag to compare

@github-actions github-actions released this 17 Oct 20:47

cell 0.1.9

修复:思考中断 / 空回复(真实 Ollama 4k 上下文)

  • 根因:Ollama 的 OpenAI 兼容流把思维链放在 delta.reasoning,内核只读 reasoning_content,思维 token 全被丢弃;4k 窗口耗尽后表现为「思考突然不说话」。
  • 三种字段全兼容(reasoning_content / reasoning / thinking);finish_reason 在 delta 守卫之前捕获,末帧没有 delta 也能识别截断。
  • finish_reason=length + 大 prompt → context-window 诊断 + 自动压缩重试;纯 reasoning 不算答案,会明确报错而不是静默成功。
  • Ollama 不报 usage 时用字符数兜底判断上下文压力;非 SSE 单 JSON body 回退会真正流式发出恢复的文本。

新功能:模型上下文窗口(手动 / 自动)+ 上下文占用显示

  • provider_entry.context_window(0 = auto),运行时 /context [auto|N] 查看/设置,显示来源与 75% 压缩阈值。
  • 自动探测本机 Ollama:/api/ps 的运行时窗口 → Modelfile num_ctx → 默认 4k;不使用 /api/show 的架构上限(gemma4 报 131072,实际运行 4096)。
  • usage SSE 帧新增 context_window / context_tokens / context_pct;/v1/health 暴露 context_window;桌面状态条显示 ctx N% (tokens/window)。
  • 自动压缩阈值改为解析窗口的 75%(未知时回退 3072)。

测试

  • 新增 tests/e2e_context_overflow.py:单轮 normal / reasoning-only(两种字段)/ content_filter / 单 JSON / 空完成 auto-compact 恢复 / 多轮「正常→失败→恢复」,并断言 usage 帧携带上下文字段。
  • selftest 覆盖 reply_carries_answer、诊断串命中 is_context_overflow、75% 阈值与百分比、context_window 配置 round-trip。

提交

  • 3d27cc6 fix: parse Ollama's reasoning stream, reject reasoning-only turns, and handle 4k context truncation
  • 7a59bd5 test: cover empty, reasoning-only, truncated, content-filter and multi-turn turns end to end
  • 66624e6 feat: model context window (manual + auto-detect) and context occupancy display
  • 0de3423 test: assert the usage frame carries context_window / context_tokens / context_pct
  • 49c85d9 fix: show the resolved context window in the strip even when the provider reports no usage
  • 3ab6562 fix: keep the frontend lint green (unused test helper parameter)

v0.1.8

Choose a tag to compare

@github-actions github-actions released this 17 Oct 05:41

cell 0.1.8

修复:空回复诊断 + 上下文溢出自动压缩

小本地模型(gemma4 / qwen 等,经 Ollama)在对话超出上下文窗口后,仍回 HTTP 200 + 空 choices + 完整 usage——旧版本把这种「成功外衣下的失败」吞成一句泛化的 empty reply,并丢失了 provider 的 finish_reason / prompt_tokens。

  • 三个流式客户端(openai-chat / Responses / Anthropic)现在都捕获 finish_reason / stop_reason;空完成时构造可读诊断,明确写出 finish_reason 与 prompt_tokens。
  • 当 finish_reason=length 或 prompt_tokens ≥ 3072(也认 Anthropic / Responses 的 input_tokens)时判为上下文压力:置 err 含 context window 且 ok=false,run_turn 据此自动压缩历史并重试,而不是以死路告终。
  • openai-chat 增加「单 JSON body」回退,兼容忽略 stream:true 的 Ollama / 代理(直接回一整个 JSON 而非 SSE 帧)。
  • run_turn 的空回复守卫改用 provider 诊断作 turn_error;前端失败气泡与 SSE error 事件现在携带完整 provider 信息(例如 provider returned an empty completion (finish_reason=stop); prompt_tokens=3969 — the conversation likely exceeded the model context window; auto-compacting and retrying)。

测试

  • 新增 6 个 empty_completion_diagnostic selftest:finish_reason=length(压力 + 命名 finish_reason + prompt_tokens)、大 prompt_tokens+stop(压力)、小 prompt_tokens(非压力但报告 token)、unknown(非压力 + 报告 unknown)、content_filter(非压力 + 命名 filtered)、input_tokens 代理(Anthropic / Responses 客户端)。

提交

  • 7c73e00 fix: surface the provider's real empty-completion diagnostic and auto-compact on context-window pressure
  • 3131c33 test: assert the empty-completion diagnostic names finish_reason and flags context pressure (incl. input_tokens for Anthropic/Responses)

v0.1.7

Choose a tag to compare

@github-actions github-actions released this 17 Oct 04:10

cell v0.1.7

Ships the desktop-shell fixes from the 0.1.7 cycle.

Highlights

  • Desktop layout: the conversation can no longer collapse into a zero-width panel when the sidebar is open; the chat/trace tabs now sit on their own row beneath the header.
  • Honest failures: a model that returns no text, reasoning, or tool calls fails the turn (instead of silently persisting an empty reply); transcript load errors surface with a retry button instead of a blank screen.
  • Native bridge symmetry: the shell reports its real backend (WebView2 or browser), exports default to ~/Downloads, and reveal/open return a proper {ok} / {ok:false,error} result so the front-end can react.

Fixes (since v0.1.6)

  • fix: correct desktop layout, error surfacing, empty-reply guard, and native bridge symmetry
  • test: pin the grid slotting, error surfacing, and empty-reply honesty
  • fix: a failed turn must not look like a finished one

Packages

  • cell-v0.1.7-windows-x64-msvc.zip — self-contained (vcpkg static) Windows x64
  • cell-v0.1.7-linux-x64-gcc14.tar.gz — Linux x64 (GCC 14, static)
  • cell-v0.1.7-macos-arm64-appleclang.tar.gz — macOS arm64

cell 0.1.6 — the shell rebuilds itself around semantic events

Choose a tag to compare

@github-actions github-actions released this 16 Oct 13:26

Highlights

  • The desktop shell is rebuilt around a three-column frame. Sessions on the left, the conversation in the middle, and a right-hand panel with 文件 / 改动 / 日志 — open a file in a highlighted viewer (capped, binary files announced rather than rendered), see what this session wrote or edited, and tail the runtime log. The trace view carries the approval audit and full sub-agent control.
  • The live turn is rendered from the kernel's own semantic events. token, reasoning, tool_call, tool_result, usage and interrupt are emitted through a process-wide sink that only the service layer installs, so the CLI still pays one null check per delta. Tool events are paired by id, and usage.decode_ms starts at the first token, so tok/s is measured rather than flattered.
  • Drive the sub-agents from the shell. A launcher where each line is one child's task (parallel or serial, the kernel names the children), run / stop / resume / staff a pending job, and read each child's report — with controls that appear only when the job's state allows them.
  • New REST surface, all gated: GET /v1/files + /v1/files/content, GET /v1/logs?tail=, the notice event and ?follow=1, per-worker teamwork reports, POST /v1/sessions/{id}/clear|archive|unarchive, GET /v1/sessions?archived=1, POST /v1/uploads + GET /v1/uploads, the approval audit, and exports as json | md | html — the last one being the same self-contained page the CLI writes, so a browser gets the full export too.
  • Providers are manageable from the shell now (list, add, probe the model list, rotate a key, switch, delete), and the settings panel says where your data lives and whether that place can be written.

Fixes

  • failed to fetch, for real. The server closed sockets with unread data still in the receive queue, which makes the kernel send RST instead of FIN — and an RST discards the response the client has not read yet. A browser reports that as a failed fetch. The socket is now drained (50 ms, bounded) before closing, and the three paths that used to close a connection without logging a word (the worker's catch (...), a failed recv, a failed send) now say why.
  • cellui no longer re-asks for your endpoint on every launch. The runtime root defaults to a directory beside the executable — read-only when cellui lives under Program Files — and the config write failed silently, answering 201 for a provider that only ever existed in memory. cellui now probes the root at startup and falls back to a per-user location, config routes answer 500 config_unwritable with the path, and /v1/health reports root + root_writable.
  • MSVC builds again. std::chrono::file_clock::to_sys() does not exist on MSVC (its file_time_type is measured on the filesystem's own clock), which broke every mtime the REST layer reports. unix_seconds() now calibrates against that clock's now(), and tests/msvc_check.sh compiles the helper straight out of cell.cpp with cl.exe — no vcpkg, no vcvars.
  • Failures in the shell speak the user's language: a sentence with a next step instead of TypeError: Failed to fetch, quiet retries for the background pollers, and a turn whose stream dropped asks the kernel whether it ran before reporting anything. classifyError now prefers the kernel's precise code over the coarse HTTP status.
  • Sessions can be deleted (armed twice, because deleting takes the transcript with it), and a second turn now waits its turn instead of returning 409, reporting waited_ms.

Docs

docs/RESTful.md is the contract for every route above, with the roadmap rewritten as Done (P1) plus three later items and the reasons they are later. docs/DESKTOP_UI.md records the redesign P1–P11. README.md and README_zh.md stay in sync.

Packages

File
cell-v0.1.6-windows-x64-msvc.zip cell.exe + cellui.exe (static, no runtime DLLs), README, LICENSE, brand
cell-v0.1.6-linux-x64-gcc14.tar.gz same layout, static
cell-v0.1.6-macos-arm64-appleclang.tar.gz same layout, static

cell 0.1.5 — the server stops leaking a handle per request

Choose a tag to compare

@github-actions github-actions released this 16 Oct 04:05

Highlights

  • The server no longer leaks a handle per request. cell --serve grew one
    Win32 handle for every HTTP request on the MinGW/winpthreads build — the one
    the desktop shell launches — because std::thread::detach() never closes the
    underlying thread handle there, and the accept loop ran every connection on a
    detached thread. Measured before the fix: 600 requests → +600 handles, a
    monotone climb for as long as the GUI keeps polling. Connection threads now
    stay joinable and finished ones are reaped, so 400 requests leave the count
    unchanged.
  • The same leak sat in the per-turn output capture. serve::capture
    detached its stdout/stderr reader once per agent turn (~+2 handles per turn,
    measured), and the class was not RAII: a turn that threw between begin() and
    end() left fd 1/2 pointing at the capture pipe for the rest of the process —
    three leaked descriptors, a blocked thread and stdout itself. The reader is
    now a joinable member that end() joins, so a destructor restores the
    streams, joins and closes: 30 turns and 6 cancelled turns now leave the handle
    count flat.

Fixes

  • http_server: connection threads stay joinable and finished ones are reaped
    (a finished flag plus reap_connections() before each accept); stop()
    waits a bounded 5 s for in-flight connections and only detaches what is still
    running; ~http_server() calls stop(), so a joinable member can never turn
    into std::terminate; the tracking vector is grown before the thread exists,
    because a throwing push_back would destroy a joinable std::thread.
  • serve_connection: a socket_guard owns the socket for the whole call, so
    the early returns and a throwing parse no longer skip the close.
  • serve::capture: RAII as described above, and the dup2 failure path no
    longer calls fd_dup2() with an already-closed descriptor.
  • tests/e2e_serve.py: a handle gate — 60 sequential requests must not grow the
    kernel's handle count by more than 15. Verified red against the pre-fix binary
    (197 → 257, on all three attempts) and green after it (160 → 160). It is
    Windows-only on purpose (POSIX reclaims a detached thread together with the
    thread itself) and says so instead of passing silently elsewhere.

Docs

  • README_zh.md: a full Chinese translation of the README, section for section,
    with the internal anchors recomputed for the Chinese headings.
  • Both READMEs now open with a language switch (English ⇄ 简体中文).

Packages

platform file
Windows x64 (MSVC, static) cell-v0.1.5-windows-x64-msvc.zip
Linux x64 (GCC 14) cell-v0.1.5-linux-x64-gcc14.tar.gz
macOS arm64 (AppleClang) cell-v0.1.5-macos-arm64-appleclang.tar.gz

Each package contains cell (CLI) and cellui (desktop shell), README.md,
LICENSE and the brand/ assets.