Commit Graph

1841 Commits

Author SHA1 Message Date
程序员阿江(Relakkes) ba859a28ae fix(imagegen): accept user-attached images as edit inputs
ImageEdit trusted only two per-session directories: the bridge upload dir
and its own generated-images dir. Neither is where a user's image actually
lands. An @-mentioned file keeps its original path anywhere on disk, and a
pasted or dropped image goes to ~/.claude/image-cache/<sessionId>/, so every
image a user supplied was refused.

The tool description made it worse by pointing the model at
[Image source: ...] paths, which are exactly the image-cache paths the check
then rejected. The model followed the description, got refused, and asked
users to re-attach a file they had just attached.

Record images the user names explicitly in a session-scoped registry, and
trust the paste directory by location. Paths the model found on its own — a
Glob hit, a path read out of a file — stay refused, which is what the
original root-dir check was protecting against.

Claude-Session: https://claude.ai/code/session_01ArehnJt4QLb83xkEukqNFX
2026-08-23 02:20:23 +08:00
程序员阿江(Relakkes) ba8a5cb832 fix(desktop): show generated files once per turn 2026-08-23 02:18:50 +08:00
程序员阿江(Relakkes) 4575887630 fix(desktop): make the open-with menu a short, named list
The menu poured out everything LaunchServices returns. Measured on the dev
machine: 26 applications for a `.csv`, 24 for `.md`, 16 for `.pdf` — 34, 32 and
24 menu rows once the system default, six IDEs, the copy entries and Finder were
added. Most of it was not installed software but browser cores staged in caches:
three copies of Chrome for Testing (playwright, agent-browser), two of
BitBrowser, Warp's autoupdate directory, a LibreOffice shipped inside a runtime.

`discoverNativeApplications` deduped by `appPath` while the target id came from
`bundleId || appPath`, so the two disagreed. Copies of one bundle each survived
the filter and then collapsed onto a single id: duplicate React keys, and
`openTarget`'s `find` always returning the first record — clicking the second
copy launched the first. The keys are one function now, so they cannot drift
again.

What replaces the dump is a ranking, not a whitelist. A whitelist of install
directories was the obvious fix and it is wrong: Safari really lives in
`/System/Volumes/Preboot/Cryptexes/App/System/Applications`, so it would have
silently dropped the default browser for HTML. Location became one sort key
among five — `isDefault`, an extension-to-bundle-id table (`pdf` → Preview,
`docx` → Word/Pages), location tier, Spotlight's `kMDItemUseCount`, name — and
the list is cut to five. Cache copies never accumulate a launch count, because
nothing execs them through LaunchServices; every tier still ships, so a
misjudged location sorts lower instead of disappearing.

Icons never rendered, and not only the discovered ones. `TargetIcon` pointed an
`<img src>` at `/api/open-targets/icons/…`, which is a cross-origin no-cors
subresource: no Authorization header, so the server's fetch-metadata policy
answers 401 and Chrome drops it as ERR_BLOCKED_BY_ORB. The same URL returns 200
from a terminal, which is what hid this. Icons now come through the credential
path as blob URLs, with hits and misses both cached — a miss costs a `sips` run
per row otherwise. Same failure and same fix as d14866f6d, which never reached
this branch.

The rest of the menu:

  - The system-default row is named after the application it will actually open,
    but still launches through the system-default target. Only that path carries
    the guard that refuses to hand an executable to the shell.
  - A file type nothing can edit no longer offers an editor. Reusing the
    workspace preview gate rather than writing a third extension table.
  - One editor is guaranteed a slot and the rest fill what the applications
    leave. On Windows and Linux there is no application list, so a hard cap of
    one would have dropped installed editors for nothing.
  - The file manager is named per platform instead of interpolating the server's
    label, which produced "在 Explorer 中显示" — an English name inside a Chinese
    sentence, and not what Windows calls it. Same shape as #1236.
  - `max-height` and a scrollbar. That needed `useDismissable` to stop treating a
    scroll inside the overlay as a viewport change: the listener is on capture,
    so the menu closed the instant the user reached for its own scrollbar.

Deliverables written by a shell command reach the transcript again. The
checkpoint records only the file-editing tools, so `Write plan.md` plus
`python make_report.py` lost the report: the mention did not match a changed
file and was dropped. Document formats now survive that lookup — not Markdown or
images, which this product reads as much as it writes. A bare filename is
anchored to the directory the turn wrote into, since the prose gives the
directory once and then lists basenames; without that the card rendered and
could not be opened.

And when a path really is gone, the click says so. Those failures landed in
floating promises, so a stale reference did nothing at all and read as a broken
button.

Claude-Session: https://claude.ai/code/session_019nFuRvsozQcErtGjVkzZCN
2026-08-22 21:08:33 +08:00
Relakkes Yang fef789f5a8 fix(quality-gate): stabilize Windows validation 2026-08-22 16:06:17 +08:00
程序员阿江(Relakkes) 6fb8105439 fix: resolve reported provider and composer issues 2026-08-21 17:51:27 +08:00
程序员阿江(Relakkes) 9a602e0e17 fix(api): stop truncated tool calls from hanging sessions #1237 2026-08-18 19:04:22 +08:00
程序员阿江(Relakkes) b09e252fcc fix(desktop): stabilize chat image rendering
- preserve readable single-image previews while keeping multi-image layouts compact
- give assistant output images one sandboxed rendering owner
- reject unsafe Markdown images before the browser can request them
2026-08-18 17:52:01 +08:00
程序员阿江(Relakkes) a0e63ccae7 fix(desktop): adapt file manager labels by platform #1236 2026-08-18 17:21:49 +08:00
程序员阿江(Relakkes) 3b5e63e42b fix(agents): degrade worktree isolation outside a git repo
Requesting worktree isolation in a workspace with no git repository and
no WorktreeCreate hook failed every subagent it was asked for, so a
whole workflow run came back with nothing. Isolation is best-effort, not
a precondition for running: the agent now runs in the workspace
directory instead, and the skip is reported rather than hidden — once
per run in the workflow log, and in the Agent tool's result.

Explicit entry points that ask for a worktree (EnterWorktree, --worktree,
bridge worktree mode) still fail loudly. Deliberate divergence from
upstream, which hard-fails this path in both the Agent tool and the
workflow harness.
2026-08-18 00:37:50 +08:00
程序员阿江(Relakkes) 783f539b84 feat(desktop): add model-aware default reasoning effort 2026-08-16 16:35:20 +08:00
程序员阿江(Relakkes) 1d221f9f8d fix(desktop): open generated files with native apps #1233 2026-08-16 15:33:33 +08:00
程序员阿江(Relakkes) 2792406815 fix(provider): make Tool Search opt-in #1229 2026-08-16 15:32:27 +08:00
程序员阿江(Relakkes) b5d60a77ae fix(desktop): stabilize virtual row measurement #1223 2026-08-16 01:42:46 +08:00
程序员阿江(Relakkes) e2e302e1b3 fix(desktop): reconcile stale H5 task state #1214 2026-08-16 01:40:56 +08:00
程序员阿江(Relakkes) 7eb406243e fix(desktop): warn on proxy-only settings takeover #1219 2026-08-16 00:33:34 +08:00
程序员阿江(Relakkes) 5d7e1dcada fix(local-index): coalesce pending reconciliation work 2026-08-16 00:25:04 +08:00
程序员阿江(Relakkes) 5001502882 fix(desktop): recover safely from sidecar crashes #1227 2026-08-16 00:18:09 +08:00
程序员阿江(Relakkes) e72c55264f fix(rewind): prevent long-session checkpoint stalls 2026-08-15 23:59:18 +08:00
程序员阿江(Relakkes) d52bbec707 chore(release): prepare v0.5.4 v0.5.4 2026-08-14 18:11:23 +08:00
程序员阿江(Relakkes) 9f5c1951a2 fix(desktop): reuse model picker for agent settings 2026-08-14 16:43:44 +08:00
程序员阿江(Relakkes) 49cfd179fa docs: add Agent Teams and dynamic Workflow to READMEs 2026-08-14 16:01:04 +08:00
程序员阿江(Relakkes) a8c900b591 fix(auth): align Claude OAuth model and recovery 2026-08-14 14:59:44 +08:00
程序员阿江(Relakkes) 8703165e01 fix(h5): show AskUserQuestion before tool stream completes #1220
Materialize the question card directly from a permission request when the
streamed tool block has not arrived yet. Upsert by tool-use id so either event
order produces one visible, answerable card without requiring a refresh.
2026-08-13 23:12:08 +08:00
程序员阿江(Relakkes) 6307af0736 fix(provider): strip protected thinking after model switch #1215
Remove model-bound thinking and redacted thinking blocks from the in-memory
request history when a resumed session changes models. Preserve the persisted
transcript and leave same-model histories untouched.
2026-08-13 23:04:45 +08:00
程序员阿江(Relakkes) bb74c9246d fix(desktop): protect unloaded sessions from tab cleanup #1217 2026-08-13 22:54:05 +08:00
程序员阿江(Relakkes) 8673f2092a chore(sponsor): remove TeamoRouter sponsor and provider preset 2026-08-13 08:36:50 +08:00
程序员阿江(Relakkes) 456300749c fix(effort): stop clamping Grok xhigh effort to high
Two stacked issues kept grok-4.6 requests at high effort even when the
UI selected xhigh: the effort capability table had no Grok entries, so
resolveAppliedEffort clamped xhigh to high; and an explicit --effort
flag never overrode CLAUDE_CODE_EFFORT_LEVEL env for main-loop queries.
Resolve Grok capabilities from the bundled Grok catalog and wire
effortValueOverridesEnv through the REPL for explicit CLI effort.
2026-08-13 04:44:17 +08:00
程序员阿江(Relakkes) 59408abaae fix(provider): keep Grok effort editable for live-catalog models
normalizeRuntimeSelection dropped the effort level whenever the selected
Grok model was missing from the bundled desktop catalog (e.g. grok-4.6),
so the reasoning effort slider snapped back to the default on every drag.
Preserve effort for live-catalog models and let the server validate it,
and sync the bundled desktop catalog with grok-4.6 as the new default.
2026-08-13 04:18:06 +08:00
程序员阿江(Relakkes) c59ed0bd1d feat(provider): default Grok Official to grok-4.6 with xhigh effort
Add grok-4.6 to the bundled fallback catalog with specs from the live
/v1/models endpoint (500k context, high default effort, xhigh..low
effort levels) and make it the default main model for the Grok Official
provider.
2026-08-13 04:03:22 +08:00
程序员阿江(Relakkes) 963c09bf6e feat(teams): rebuild the collaborative workbench 2026-08-12 14:36:16 +08:00
程序员阿江(Relakkes) c0f4ba5f84 fix(teams): report real member and task state in the workbench
The workbench described a team run in ways the underlying data did not
support, so a member marked "已完成" led to an agent that was still
streaming, and the feed reported no communication for a team that had
just handed out all of its work.

A teammate rewrites its entire transcript every turn, leaving a chain of
`agent-<id>.jsonl` fragments where each repeats its predecessor. The
reader concatenated all of them, and `fragmentScopedId` gave the same
entry a different id per fragment, so id-based deduplication downstream
could not collapse them: one member replayed its work up to eight times
and kept growing. Drop a fragment whose entries are a strict prefix of
another's, ignoring only the four fields a rewrite restamps (agentId,
slug, cwd, promptId). Independent resumes reuse entry ids for different
work, so identity comes from content and those fragments all survive.
The activity path scoped tool ids per fragment before deduplicating,
which split a call from its result across two scopes; it now folds
first.

Member activity came from owning an `in_progress` task. A teammate marks
a task started and can then end its turn, and an umbrella task stays open
across every turn beneath it, so every member read as permanently
working. Report the runner's own turn markers as a `TeamMemberActivity`
separate from `status`, falling back to a transcript-write probe only for
backends that record no markers, and let the workbench say `unknown`
rather than guess.

The remaining corrections follow from the same principle -- show what the
data says:

- A member is drawn once, on the task it most recently started, instead
  of on every task it owns; other cards carry an owner chip.
- Opening a task card describes the task; reaching its owner is now a
  deliberate second click.
- Cards lead with dependency depth. A task id records the order the lead
  wrote tasks down, so review work planned first showed "#1" while
  hanging off the bottom of the graph.
- Task handovers are communication, not lifecycle noise, and self-claims
  read differently from assignments. Repeated idle notices fold into a
  count.
- A blocker missing from the task list counts as resolved, matching
  `claimTask`, instead of stranding its dependents in `blocked`.
- Batch-completed tasks record their owner. Automatic ownership only
  triggered on `in_progress`, so work closed without ever starting had
  none; announcing an already-finished task is skipped so an idle
  teammate is not woken for it.
- Transcript pages expose the `TaskUpdate` calls that bound each task,
  so a member conversation can be read as the tasks it worked through.
2026-08-11 20:17:07 +08:00
程序员阿江(Relakkes) 3a6b376ac4 feat(provider): surface Atlas Cloud referral link in the picker
Atlas Cloud now sponsors the project, so give it the same treatment as
the other sponsors: mark the preset featured to move it into the sponsor
row, and add the cc-haha campaign link behind the "get API key" button.
Reorder the preset to sit last in that row, matching the README.
2026-08-11 17:38:27 +08:00
程序员阿江(Relakkes) ab0d89e16e fix(agents): stream child runs in shared UI 2026-08-11 14:46:28 +08:00
程序员阿江(Relakkes) 3cb9e24faa docs: add Atlas Cloud sponsor to READMEs
Add Atlas Cloud to the sponsor tables in both README.md and
README.zh-CN.md, using a cc-haha-specific campaign link. Ship
light/dark logo variants so the wordmark stays visible in both
GitHub themes.
2026-08-11 07:58:53 +08:00
程序员阿江(Relakkes) b5a4d23af1 fix(teams): stabilize activity, history, and lifecycle 2026-08-11 05:57:15 +08:00
程序员阿江(Relakkes) bf695f21d7 fix(desktop): isolate Agent Teams activity and share session UI 2026-08-11 02:42:10 +08:00
程序员阿江(Relakkes) a0afcc7efa feat(desktop): add custom project display names 2026-08-11 02:38:55 +08:00
程序员阿江(Relakkes) c23632d2c4 fix(teams): synchronize member tasks and activity 2026-08-10 19:43:04 +08:00
程序员阿江(Relakkes) 795120fbca fix(teams): reconcile Activity with workbench state 2026-08-10 19:13:29 +08:00
程序员阿江(Relakkes) b8cf7167e8 test(adapters): isolate project boundary fixture 2026-08-10 18:35:24 +08:00
程序员阿江(Relakkes) 2799715079 test(workflows): await published terminal notifications 2026-08-10 18:27:44 +08:00
程序员阿江(Relakkes) 3a9ba776bb fix(workflows): save desktop runs and surface cached activity 2026-08-10 18:19:06 +08:00
程序员阿江(Relakkes) 9c9a0885b9 fix(teams): align task status and slash entry 2026-08-10 17:41:49 +08:00
程序员阿江(Relakkes) eee09fe3f4 fix(desktop): add Ultracode keyword controls 2026-08-10 17:31:45 +08:00
程序员阿江(Relakkes) 38de706963 fix(desktop): retain newly created branch for session launch 2026-08-10 17:02:01 +08:00
程序员阿江(Relakkes) c2f097318b fix(adapters): resolve project names after /projects picker 2026-08-10 16:55:56 +08:00
程序员阿江(Relakkes) 3719cd76f5 fix(agents): reload built-in overrides in active sessions 2026-08-10 16:52:31 +08:00
程序员阿江(Relakkes) fdead6b27a fix(desktop): show undo for unverified-only turns 2026-08-10 16:48:47 +08:00
程序员阿江(Relakkes) e64fc58b4d fix(activity): scope agent activity to its owning run 2026-08-10 16:36:45 +08:00
程序员阿江(Relakkes) 0b13dc6f71 fix(sessions): keep worktree paths authoritative 2026-08-10 16:23:44 +08:00