Commit Graph

7493 Commits

Author SHA1 Message Date
Gu JiaMing
c993719569 fix(page-side-panel): scope portal via usePortalContainer, drop the root marker (#16555)
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: gujiaming <52187003+AtomsH4@users.noreply.github.com>
2026-06-30 20:06:57 +08:00
亢奋猫
366ecf63da refactor(provider): remove tokenflux providers (#16518)
Signed-off-by: kangfenmao <kangfenmao@qq.com>
2026-06-30 19:52:35 +08:00
LiuVaayne
7a56306835 refactor(agent-skills): mirror skills centrally, pass SDK name whitelist (#15976)
Co-authored-by: SuYao <sy20010504@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Vaayne <liu.vaayne@gmail.com>
Signed-off-by: suyao <sy20010504@gmail.com>
2026-06-30 19:51:07 +08:00
Phantom
4ef2889fd3 refactor(file-ref): split persistent ref ownership (#16532)
Co-authored-by: fullex <106392080+0xfullex@users.noreply.github.com>
Signed-off-by: eurfelux <eurfelux@gmail.com>
2026-06-30 18:44:44 +08:00
jd
72e1efa955 feat(composer): add hover remove popover to skill and knowledge tokens (#16596)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: jd <59188306+zhangjiadi225@users.noreply.github.com>
2026-06-30 17:59:30 +08:00
SuYao
dd90997792 fix(migration): always publish mcpServerIdMapping for empty server list (#16602)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: suyao <sy20010504@gmail.com>
2026-06-30 17:57:26 +08:00
槑囿脑袋
c7d96462bc feat(knowledge): add agent tool surface for knowledge bases (kb_list/kb_search/kb_read/kb_manage) (#16345)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: fullex <106392080+0xfullex@users.noreply.github.com>
Signed-off-by: eeee0717 <chentao020717Work@outlook.com>
2026-06-30 15:27:54 +08:00
槑囿脑袋
f264138934 fix(knowledge): filter rag file processors by configured keys (#16564)
Signed-off-by: eeee0717_cherry_macmini <chentao020717Work@outlook.com>
2026-06-30 11:51:35 +08:00
Gu JiaMing
c73e2ca8de fix(composer): add tooltips and hover drag handle to queued follow-ups dock (#16558)
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: gujiaming <52187003+AtomsH4@users.noreply.github.com>
2026-06-30 11:27:30 +08:00
fullex
a77f6f5c9a docs(cache): require functional updaters to be side-effect-free
The setter updater contract previously said "must be pure" only in the sense of "don't mutate prev / return a new value" (the isEqual short-circuit footgun); it did not cover side effects inside the updater.

Document that updaters must also be side-effect-free: don't smuggle a derived value out (e.g. into an enclosing-scope variable) to drive post-write work, and don't rely on how often or when the updater runs. To react to what changed, derive it from the value transition in a useEffect that watches the value.

Deliberately does not promise single synchronous invocation, to keep the setter free to batch/retry/defer later. Updates the CacheSetStateAction type doc, the useCache @remarks (canonical reference for all three hooks), and cache-usage.md.
2026-06-29 07:57:25 -07:00
jd
090f9a43e9 fix(sortable): require primary pointer activation (#16574)
Signed-off-by: jd <59188306+zhangjiadi225@users.noreply.github.com>
2026-06-29 22:51:56 +08:00
Pleasurecruise
500f92d385 fix: move code CLI directory to tool level
Store the working directory on each CLI tool instead of per provider, and update the page, hook, and tests to use the shared tool directory. Also simplify the config editor to only show supported tools, refresh endpoint labeling, hide Cherry AI providers from metadata, and normalize Cherry provider keys to the lowercase prefix used by the generated config files.
2026-06-29 19:22:58 +08:00
SuYao
9b642d6953 fix(gateway): generate Gemini images via the language API (#16341)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: fullex <106392080+0xfullex@users.noreply.github.com>
Signed-off-by: suyao <sy20010504@gmail.com>
2026-06-29 18:26:14 +08:00
jd
21e0e04abc feat(resource-dialogs): stepped create wizard for assistants and agents (#16496)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: fullex <106392080+0xfullex@users.noreply.github.com>
Signed-off-by: jd <59188306+zhangjiadi225@users.noreply.github.com>
2026-06-29 18:25:15 +08:00
fullex
c8de372b7d refactor(cache): adopt functional setter updaters in renderer consumers
Now that the renderer cache hooks resolve functional updaters against the latest stored value, replace the hand-rolled ref + `typeof === 'function'` wrappers (TabsProvider, TranslatePage, GlobalSearchPanel) and the snapshot-based read-modify-write call sites (recent-items in AppShell/HomePage/AgentPage, emoji recents, message selection, recall-test history) with `setX(prev => ...)`. Each updater derives from `prev`, and the callbacks drop the cache value from their dependency arrays.

The mini-app keep-alive sites (hide / cleanup / sync) close the read-modify-write race where an app opened concurrently during a status mutation's await was clobbered by a stale snapshot. Fixes #16460.

Update the two local cache mocks (GlobalSearchPanel / RecallTestPanel tests) to resolve functional updaters like the real hook.
2026-06-29 02:15:40 -07:00
SuYao
f800a6f772 fix(selection): statically render built-in action icons (#16500)
Co-authored-by: fullex <106392080+0xfullex@users.noreply.github.com>
Signed-off-by: suyao <sy20010504@gmail.com>
2026-06-29 17:00:27 +08:00
Konv Suu
78d336e964 fix(quick-panel): smooth input popup exit animation (#16531)
Co-authored-by: SuYao <sy20010504@gmail.com>
Co-authored-by: fullex <106392080+0xfullex@users.noreply.github.com>
Signed-off-by: Konv Suu <hi@kovsu.com>
2026-06-29 17:00:20 +08:00
SuYao
6f112a23b8 feat(agent-runtime): guide agents to bundled bun/uv and block global installs (#16544)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: fullex <106392080+0xfullex@users.noreply.github.com>
Signed-off-by: suyao <sy20010504@gmail.com>
2026-06-29 16:56:17 +08:00
SuYao
8ab076cb63 fix(citations): defer article parser imports (#16547)
Co-authored-by: fullex <106392080+0xfullex@users.noreply.github.com>
Signed-off-by: suyao <sy20010504@gmail.com>
2026-06-29 16:55:49 +08:00
SuYao
f3279576d1 fix(codeblock): lazy load special previews (#16525)
Co-authored-by: fullex <106392080+0xfullex@users.noreply.github.com>
Signed-off-by: suyao <sy20010504@gmail.com>
2026-06-29 16:55:31 +08:00
robin
65c54e5ce5 chore(deps): bump @openrouter/ai-sdk-provider to ^2.10.0 (#16467)
Signed-off-by: Robinnnnn <12162433+Robinnnnn@users.noreply.github.com>
2026-06-29 16:51:14 +08:00
fullex
b424475573 feat(cache): add functional updater support to renderer cache hooks
useCache, useSharedCache and usePersistCache setters now accept a React-style functional updater `(prev) => next` in addition to a concrete value. The updater resolves `prev` from the latest stored value at write time rather than the render-time snapshot, making read-modify-write correct across an `await` — the root cause of the keep-alive overwrite race behind #16460.

`prev` is typed shallow-readonly (`ReadonlyValue<T>`), so mutating it in place and returning the same reference — which the CacheService `isEqual` short-circuit would otherwise swallow silently — is a compile error. Concrete-value calls are unchanged, so existing consumers keep compiling.

The renderer useCache mock mirrors the functional branch with the same default fallback; docs and hook tests updated. Consumer call-site adoption lands separately.
2026-06-29 01:34:05 -07:00
jd
99337fe585 fix(agent-session): align auto naming with topics (#16497)
Co-authored-by: fullex <106392080+0xfullex@users.noreply.github.com>
Signed-off-by: jd <59188306+zhangjiadi225@users.noreply.github.com>
2026-06-29 15:54:37 +08:00
SuYao
af69f8cc43 fix(paintings): use motion react import (#16545)
Signed-off-by: suyao <sy20010504@gmail.com>
2026-06-29 13:19:09 +08:00
SuYao
611944599f refactor(deps): replace lodash with es-toolkit/compat and drop it (#16528)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: suyao <sy20010504@gmail.com>
2026-06-29 12:28:57 +08:00
jd
fce8c6a9a6 fix(composer): keep focus after opening panel tools (#16551)
Signed-off-by: jd <59188306+zhangjiadi225@users.noreply.github.com>
2026-06-29 12:20:17 +08:00
SuYao
252ab91321 refactor(composer): split chat placement variants (#16549)
Signed-off-by: suyao <sy20010504@gmail.com>
2026-06-29 12:15:21 +08:00
SuYao
c5f152e151 fix(write-tool): make Write tool file path clickable only after write completes (#16519)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: suyao <sy20010504@gmail.com>
2026-06-29 12:15:03 +08:00
SuYao
cb3a448896 fix(image-utils): defer capture dependencies (#16526)
Signed-off-by: suyao <sy20010504@gmail.com>
2026-06-29 12:14:45 +08:00
槑囿脑袋
63d807b506 fix(file-processing): refresh API key list after edits (#16494)
Signed-off-by: eeee0717_cherry_macmini <chentao020717Work@outlook.com>
2026-06-29 12:14:10 +08:00
SuYao
5c848feafa fix(custom-fetch): apply provider custom User-Agent request header (#16527)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: suyao <sy20010504@gmail.com>
2026-06-29 12:13:35 +08:00
SuYao
35534e90a4 fix(clickable-file-path): open directories in the file manager, not the preview pane (#16529)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: suyao <sy20010504@gmail.com>
2026-06-29 12:12:34 +08:00
fullex
96529ce4c9 refactor(export): break MessagesService<->utils/export cycle via ExportService
`utils/export.ts` was misclassified: a 1215-line export workflow (toast,
popups, IPC, network, module state, preference reads) living in the pure
`utils/` bucket. It imported `getMessageTitle` from `MessagesService` while
`MessagesService` imported `getTitleFromString` back from it — a direct
circular dependency, and a failure of the renderer "util = pure / service =
runtime logic" type axis.

Split it along the type axis:
- `utils/export.ts` keeps only pure, zero-`@data` transforms
  (getTitleFromString, processCitations, messageToPlainText,
  messagesToPlainText) and is now a true leaf, so the cycle is broken.
- New `services/ExportService.ts` holds the runtime/behavior layer: markdown
  rendering that reads export preferences, the Notion/Yuque/Obsidian/Joplin/
  Siyuan/Notes exporters, and the export-in-progress mutex.
- `git mv utils/copy.ts -> services/CopyService.ts` (it depends on the moved
  topic exporters).
- Lift the Obsidian popup out of `exportNote` up into the notes menu hook
  (`useNotesMenu.handleObsidianExport`) so the service no longer imports a
  component.

Consumer imports and test mocks are repointed accordingly, and the export
test suite is split into pure (`utils/__tests__/export.test.ts`) and behavior
(`services/__tests__/ExportService.test.ts`) files. No behavior change.
2026-06-28 09:37:42 -07:00
fullex
a0bf51a1a0 refactor(renderer): migrate remaining TanStack Query usages to SWR
Drop @tanstack/react-query in favor of SWR (already the renderer's
data-fetching library via DataApi) and remove the dependency. Redesign
each fetch's semantics instead of mirroring the old behavior:

- Notes file content (useNotesQuery): event-driven via the chokidar
  watcher + save invalidation, re-reading on file switch. Drop the focus
  refetch (redundant with the watcher) and the contradictory 30s
  staleTime. Invalidate through the bound mutate; remove the dead
  refetchFileContent.
- Citation panel/tooltip: switch to useSWRImmutable and share an
  xOembedKey so the tooltip reuses the panel's cached oEmbed. Hide the
  preview snippet on fetch failure (fetchWebContent degrades to
  noContent) and drop the inert retry.
- Window roots (main/settings/subWindow): remove QueryClientProvider;
  SWR's global cache needs no provider.

Rewrite the citation tests on real SWR + mocked fetch utils and add
useNotesQuery tests.
2026-06-28 08:01:46 -07:00
Phantom
b06aa99399 refactor(file-manager): remove renderer FileManager (#16452)
Signed-off-by: icarus <eurfelux@gmail.com>
Signed-off-by: eurfelux <eurfelux@gmail.com>
2026-06-28 13:38:01 +08:00
beyondkmp
9394df41db fix(chat-settings): add missing divider (#16534)
Signed-off-by: beyondkmp <beyondkmp@gmail.com>
2026-06-28 12:03:29 +08:00
github-actions[bot]
b4e7e719d5 🤖 Daily Auto I18N Sync: Jun 28, 2026 (#16533)
Co-authored-by: fullex <106392080+0xfullex@users.noreply.github.com>
2026-06-28 12:02:53 +08:00
Asurada
1f3e9ebfbf fix(renderer): refresh recent topic and session titles on global search mount (#16466)
Co-authored-by: fullex <106392080+0xfullex@users.noreply.github.com>
Signed-off-by: ousugo <dkzyxh@gmail.com>
2026-06-28 12:02:25 +08:00
SuYao
19ff143e9f feat(composer): relax attachment limits to model media capability (#16516)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: fullex <106392080+0xfullex@users.noreply.github.com>
Signed-off-by: suyao <sy20010504@gmail.com>
2026-06-28 12:01:09 +08:00
Pleasurecruise
8fa1985705 wip: refactor code CLI provider configs
Switch code-CLI state from named configs to provider-keyed configs, and update the page, hooks, and edit panel to manage enabled providers instead of ad hoc config entries. Also align provider filtering/reordering, refresh i18n text, and make Codex prefer the responses endpoint when available.
2026-06-28 12:00:47 +08:00
Pleasurecruise
a729c18874 refactor: rename codeCLI enum to CodeCli
Standardizes CLI tool typing by renaming `codeCLI` to `CodeCli` and updating all usages across main, renderer, shared presets/types, and tests. This also aligns enum members to uppercase constant-style names, fixes related imports (`shell-env`, code providers, platform utils), and removes a couple of unused imports to keep references consistent after the rename.
2026-06-28 10:22:09 +08:00
Pleasurecruise
67b8e23ebf wip: refine code CLI config activation
Apply the native CLI config before marking it active, so save and enable flows only switch state after injection succeeds. Also moved the launch action to the page header, removed the redundant directory shortcut UI, and cleaned up the code-edit panel to use shared codeCLI constants.
2026-06-28 10:04:08 +08:00
Pleasurecruise
fdd55bdcc3 wip: update Codex/OpenCode config blob handling
Refactors Codex advanced settings from raw file editors to toggle pills (goal mode, remote compaction, common config) with new i18n labels. `injectCliConfig` now writes Codex API keys to `~/.codex/auth.json` (preserving existing auth fields), sets `requires_openai_auth` in `config.toml`, applies/clears goal mode and remote compaction flags correctly, and extends OpenCode generation to read reasoning and context/output limits from `configBlob.env`. Tests were expanded to cover the new Codex auth/config merge behavior and OpenCode option mapping.
2026-06-28 10:04:08 +08:00
Pleasurecruise
c5396e4d93 wip: move code CLI config injection to renderer
Shift native CLI config writing for Claude Code, Codex, and OpenCode into the renderer at enable-time, and remove the old main-process config writer path. Also updates the code CLI UI to match the new flow, fixes sequential config writes in `useCodeCli`, and adds coverage for the renderer-side injection behavior.
2026-06-28 10:04:08 +08:00
Pleasurecruise
8b395a6415 wip: refine code CLI config handling
Replace the old `advanced` payload with a tool-specific `config` blob, and apply provider credentials at launch time instead of persisting them in preferences. The code-CLI page now uses extracted config panels and hooks for per-tool metadata, terminal loading, and binary actions, while Claude/Codex/OpenCode/Hermes/OpenClaw each get dedicated config handling. Also updates the shared config schema and localized labels.
2026-06-28 10:04:08 +08:00
Pleasurecruise
b060234691 wip: refactor code CLI settings UI
Split the code page into focused modules, move the CLI tool catalog and version types into shared page files, and track install/upgrade state per tool so each card updates independently. Also reworked the config editor into smaller panel primitives with environment-backed advanced fields, added the Claude attribution toggle, and removed obsolete hero/gallery components and asset references.
2026-06-28 10:04:08 +08:00
Pleasurecruise
2166f59267 wip: cli version status refactor (snapshot before rebase)
Signed-off-by: Pleasurecruise <3196812536@qq.com>
2026-06-28 10:04:01 +08:00
Pleasurecruise
7a08230fc1 wip: revamp CLI config editor
Reworks the CLI config panel into a structured editor with tool parameters, raw JSON editing, and model-role overrides for Claude. Also improves model/provider lookup and updates localized strings for the new UX.
2026-06-28 10:04:01 +08:00
Pleasurecruise
c65367a173 refactor(code-cli): split renderer — rebuild Code CLI page, drop OpenClaw page
Renderer half of the code-cli refactor (stacked on the main-process PR).

- Rebuild Code CLI page with sidebar, config cards, provider cards, config edit panel, version status
- Multi-config per CLI tool UI (named configs)
- Drop the standalone OpenClaw page (OpenClaw is now managed under Code CLI); remove OpenClawPage, UpdateButton, route, sidebar entry
- Update useCodeCli hook + store + i18n for the new config model

Part 2 of 2. Depends on the main-process PR; base will move to main after it merges.

Note: 11 web typecheck errors remain from rebasing the code-cli renderer onto latest main's UI/preference types — to be resolved before flipping this PR out of draft.
Signed-off-by: Pleasurecruise <3196812536@qq.com>
2026-06-28 10:04:01 +08:00
Pleasurecruise
87278a77c9 wip: clean provider config handling & presets
Ensure provider switches leave no stale config entries and add Hermes support/tests. Claude: remove managed ANTHROPIC_* env keys and managed top-level keys when switching configs. Codex: drop stale 'Cherry-*' provider tables and strip managed top-level keys so previous named configs don't leave residue. Hermes: preserve non-managed fields on upsert, support contextLength/maxTokens, add unit tests, and merge/write YAML config atomically. OpenCode: minor cleanup. Shared presets: rename packageName -> miseTool and update tool specifiers (npm:/pipx:).
2026-06-28 10:03:52 +08:00