Commit Graph

1389 Commits

Author SHA1 Message Date
程序员阿江(Relakkes) 6bab6fbe97 feat(desktop): preview documents in the workspace and images in chat
Documents the agent writes open in the workspace panel instead of another
application, and local images the agent mentions show up in the conversation.

Workspace preview
- PDF (pdf.js with its own layout and text layer), Word (docx-preview inside a
  scripts-disabled sandboxed iframe) and Excel (SheetJS; .xlsx, .xlsm, .xls) open
  in the side panel with zoom and fit, per-file scroll/zoom/sheet memory, and a
  refresh when the agent rewrites the file. The engines load lazily.
- Bytes come from a new GET /api/sessions/:id/workspace/raw route, with an
  extension allowlist, size caps, the workspace boundary and canonical-path
  checks. The file endpoint returns metadata and a version for documents. The
  client fetches with the bearer credential, so it works in Electron, LAN H5 and
  remote access alike.
- Chat links, output cards and the change card open pdf/docx/xlsx in the
  workspace; documents outside the workdir still go to the system application.
- Image viewer with fit, zoom and pan, and "open in system app".

Chat images
- Markdown images outside the workdir, at ~/, C:\ and file:// paths render, open
  in the viewer, and offer "open original" (pictures only).
- Images returned by tools such as Read appear as thumbnails under the call.

Hardening found in review
- previewFsUrl escapes each path segment; a double-escaped %2e%2e used to leave
  /preview-fs/<session>/.
- The CORS, API timing and remote-access header decorators set headers in place.
  Rebuilding the response buffered whole files in memory and dropped
  Content-Length.
- The engine owns the pdf.js worker, so closing one document no longer fails the
  next open.
- Office archives are inflated in steps to check their real sizes, not the sizes
  they declare.
- A viewer that fails to load stays in its panel instead of taking the window down.

Adds pdfjs-dist, docx-preview, xlsx (SheetJS 0.20.3 tarball) and fflate as
renderer dev dependencies; Vite bundles them.

Refs #1397
2026-09-30 01:53:47 +08:00
程序员阿江(Relakkes) 2ec845d084 fix(desktop): include configured Fable models in model selector 2026-09-28 02:29:56 +08:00
程序员阿江(Relakkes) 92561bcb28 release: v0.6.7 2026-09-28 01:33:38 +08:00
程序员阿江(Relakkes) ade9474096 fix(desktop): restore workspace side chat scrolling 2026-09-28 00:10:37 +08:00
程序员阿江(Relakkes) 417ca5f283 fix(agent-teams): dismiss approved configuration and preserve runtime controls 2026-09-27 23:47:38 +08:00
程序员阿江(Relakkes) fadaa775ac fix(desktop): resolve output files against declared project roots
Keep explicit file identities across output cards and prose links, preserve
shell outputs without checkpoint evidence, and retain a file card when
video preview fails. Add cross-project path and opening regressions.
2026-09-27 23:22:40 +08:00
程序员阿江(Relakkes) e47e234987 fix(desktop): preserve local Markdown file link targets 2026-09-27 20:59:42 +08:00
程序员阿江(Relakkes) d4e53a9fab fix(desktop): wrap activity profile names 2026-09-27 19:24:52 +08:00
程序员阿江(Relakkes) 26d3a3d558 fix: restore session model selections and normalize runtime effort 2026-09-27 19:24:52 +08:00
gugugaga 9ce414ae4c fix(provider): honor configured output budget for direct Anthropic providers (#1392)
* fix(provider): honor configured output budget for direct Anthropic providers

Anthropic-format providers connecting directly to an upstream could not set a
reply output budget: the field was hidden in the UI, stripped before
persistence, and dropped by a local-proxy-only gate at request build time, so
low-cap relay upstreams returned 400/truncation with no user recourse.

Surface the budget for Anthropic, persist it as a budget-only object so stale
OpenAI-compatibility options cannot leak, and remove only the numeric gate in
getConfiguredProviderOutputBudget. getOutputBudgetHeaders keeps its local-proxy
guard so the internal provenance header never reaches an external provider.

Adds kernel/desktop unit tests for the direct-budget path and the provenance
non-leak.

* fix(provider): disable optional manual thinking below its token minimum

---------

Co-authored-by: gugugaga <267102352+omazili-guga@users.noreply.github.com>
Co-authored-by: 程序员阿江(Relakkes) <relakkes@gmail.com>
2026-09-27 19:11:04 +08:00
程序员阿江(Relakkes) 1ee148e643 merge: integrate remote main with local development 2026-09-26 11:23:08 +08:00
yuehua-meng 66159ae948 test(desktop): deterministically advance rAF frames in virtual unmount test 2026-09-26 02:00:27 +08:00
程序员阿江(Relakkes) 3817dd74f8 fix(desktop): clear rewound turn review state 2026-09-25 19:39:57 +08:00
程序员阿江(Relakkes) f49e6ffae8 fix: keep scheduled task history readable after concurrent runs 2026-09-25 19:39:50 +08:00
程序员阿江(Relakkes) 98b67dda4d fix: preserve streamed reply when generation stops 2026-09-25 19:39:45 +08:00
程序员阿江(Relakkes) f84a456977 fix: repair team review results and shutdown visibility 2026-09-25 19:39:40 +08:00
程序员阿江(Relakkes) ddef7950ff merge: update OAuth model support 2026-09-25 17:59:01 +08:00
程序员阿江(Relakkes) 9438743665 feat: update OAuth models and add configurable mappings 2026-09-25 17:58:47 +08:00
程序员阿江(Relakkes) 2cac7c471b feat(agent-teams): add human review and per-member runtime selection 2026-09-25 17:47:39 +08:00
程序员阿江(Relakkes) 8e8e92c82b feat(connectors): add Remotion skill plugin 2026-09-25 17:43:20 +08:00
程序员阿江(Relakkes) 089ba2063d merge: integrate workspace side chats with local main 2026-09-25 15:56:54 +08:00
程序员阿江(Relakkes) c5892b5353 feat: add contextual side chats in desktop workspace 2026-09-25 15:55:13 +08:00
Relakkes Yang 068b3ebdbd feat(desktop): add chat appearance preferences (#1374)
Add independent chat font, text size and reading width settings with preview, migration and cross-window sync. Preserve virtualized reading positions when appearance changes.

Validation: 499 focused tests, lint/typecheck, build, persistence upgrades, chat contracts and 8 offline agent scenarios passed. Full desktop/server/coverage gates remain affected by documented Windows baseline failures; macOS native rendering was not tested.
2026-09-25 14:52:27 +08:00
程序员阿江(Relakkes) 8dcaa942e7 Merge workspace tree and preview fixes for #1361 2026-09-25 14:51:03 +08:00
程序员阿江(Relakkes) 58c787f9d5 fix(desktop): restore workspace tree actions and independent preview controls 2026-09-25 14:50:52 +08:00
程序员阿江(Relakkes) f26c1770ea fix(desktop): prevent duplicate prompt replay after guiding a conversation 2026-09-25 14:26:50 +08:00
程序员阿江(Relakkes) 7e7d455249 fix: align Claude OAuth with 2.1.281 and harden CLI compatibility 2026-09-25 02:34:18 +08:00
程序员阿江(Relakkes) 5d6f5d6609 feat(desktop): auto-answer pending questions after timeout 2026-09-24 18:57:37 +08:00
程序员阿江-Relakkes 2d748a9369 Merge pull request #1372 from yuehua-meng/fix/memory-save-race
fix(desktop): advance memory save revision to avoid self-block during…
2026-09-24 18:03:06 +08:00
程序员阿江(Relakkes) 589da89f6e fix(desktop): keep memory edits visible after an in-flight save 2026-09-24 17:56:05 +08:00
yuehua-meng 45435921b3 原测试用 5000 行短文本验证内容完整性,渲染大量 DOM 节点,容易超过 CI 的 5 秒限制。现在改成 130 行长文本:
- 总内容仍超过 64 KiB,保留大文本测试。
- 检查开头、结尾、中间全部内容及修改后的文本,确保没有截断。
- 减少渲染节点,实测约 0.43 秒完成。
2026-09-24 04:18:43 +08:00
yuehua-meng fbe56488cb fix(desktop): advance memory save revision to avoid self-block during in-flight edits 2026-09-24 02:13:47 +08:00
程序员阿江(Relakkes) 4615f9d435 fix(desktop): preserve stopped chat across incomplete history reloads 2026-09-24 01:18:51 +08:00
程序员阿江(Relakkes) e37ad30922 fix(desktop): restore searchable clear slash command 2026-09-24 01:05:23 +08:00
Relakkes Yang cd2a63c2f3 fix(desktop): hide checkpoint preview budget from chat 2026-09-24 01:04:17 +08:00
Relakkes Yang 7e55957835 Merge commit '2bdbbcc9' 2026-09-23 22:13:53 +08:00
Relakkes Yang 2bdbbcc99d fix(desktop): preserve chat view across tab switches 2026-09-23 22:11:20 +08:00
Relakkes Yang 64ca3ba781 fix(desktop): confine scrolling tab drag exclusions to the viewport 2026-09-23 22:04:27 +08:00
王珺祺 1c4fd1ac59 feat(agent-teams): 显示成员模型信息 + 修复 CORS 预检 + 补 Fable 槽位
1. Agent Teams UI 模型显示
   - 成员卡片显示模型短名 (opus/sonnet/haiku/fable)
   - Inspector 详情面板显示完整模型 ID
   - 继承主代理时显示「Inherit from lead · claude-opus-4-8」
   - 历史帧不再丢失模型信息
   - 剥离 [1m] 标记避免标签过长

2. 修复 CORS 预检导致 Failed to fetch
   - Loopback 源的 OPTIONS 预检提前应答,不经过 H5 门禁
   - 远程源仍保持严格的 403 拒绝

3. 修复 store 丢弃 model 字段
   - toTeamMember 现在保留 model

4. 补 Fable 模型槽位
   - MODEL_SLOTS 从 4 个扩展到 5 个
   - Model1mSupport schema 增加 fable
   - cc-switch 导入和运行时环境写入 ANTHROPIC_DEFAULT_FABLE_MODEL
   - Fable 槽位使用独立占位文案(不回落到主模型)

5. 测试
   - 新增 12 个回归测试
   - 桌面套件: 6006 passed
   - 服务端套件: 5488 passed
2026-09-23 14:51:55 +08:00
程序员阿江(Relakkes) 2f8d819d50 release: v0.6.6 2026-09-22 09:30:59 +08:00
程序员阿江(Relakkes) 1be51c9298 fix(sessions): surface collaboration titles immediately 2026-09-22 08:41:02 +08:00
程序员阿江(Relakkes) bc9451dbe6 fix(desktop): make provider promo copy open the signup link
The compact API key row rendered promo text as plain copy, so the offer under a preset could no longer be clicked.
2026-09-22 07:43:53 +08:00
程序员阿江(Relakkes) 0258ff7f96 fix(desktop): diagnose and reduce session loading stalls 2026-09-22 07:29:50 +08:00
程序员阿江(Relakkes) 31e6f7f600 fix(desktop): fill the context meter by used share
The bar painted CLI theme-key names as CSS colors, so it stayed an empty track. Size one brand-colored fill from used tokens over the window.
2026-09-22 05:28:54 +08:00
程序员阿江(Relakkes) 577201a9ee fix(desktop): show the group QR in a dialog
Expanding it inline pushed the code below the fold, so it opens in a
dialog that stays on screen.
2026-09-22 05:05:54 +08:00
程序员阿江(Relakkes) 4ed18f090e fix(sessions): stop referenced reads from stalling the session list
A referenced ReadSession walked backward through the whole transcript and scanned it from the start, which starved the sidebar poll into a flashing load-failure banner. Bound that read and keep a failed list refresh off the sidebar.
2026-09-22 04:46:21 +08:00
程序员阿江(Relakkes) 03f0c61946 fix(desktop): restore the typecheck after the trace and provider edits
The provider editor dropped the session model from a value whose inferred type had no index signature, and the trace detail stopped reading the session revision it still stored.
2026-09-22 03:59:08 +08:00
程序员阿江(Relakkes) ee2a8326ac feat(desktop): add the WeCom group QR to the About panel
The README already shows the group QR, but the desktop app had no way
to reach it. Reveal it from an entry below the feedback link.
2026-09-22 03:25:35 +08:00
程序员阿江(Relakkes) 467c15780a fix(desktop): drop the redundant context-usage caption
The new-token, API-time, and subagent-scope lines restated the speed and cost rows without answering how much window is left.
2026-09-22 03:08:22 +08:00
程序员阿江(Relakkes) 9c88a5cc47 fix(sessions): keep a servable index snapshot stable while it reconciles
The sidebar's "using standard history" notice flickered because a busy
passive checkpoint marked the index degraded, and the next reconciliation
cleared it again, bouncing the session list between the index and a full
JSONL scan. Incremental reconciliation now keeps serving a snapshot that
already has committed rows, and a transient SQLITE_BUSY no longer changes
the public state.
2026-09-22 03:05:19 +08:00