Commit Graph
6051 Commits
Author SHA1 Message Date
feitianbubu 043720f9be fix: 任务差额结算后 quota 和阿里视频时长优化 (#5923)
* fix: apply default ali video duration when value is non-positive

* fix: persist task quota after async settlement
2026-07-06 11:49:24 +08:00
CaIon 2281c9e3d8 fix(web): refine mobile user cards 2026-07-05 15:02:08 +08:00
CaIon 4a64b87072 test(user): cover self-service password update guard
Pin down the checkUpdatePassword contract:

- changing a password requires the correct current password
- OAuth/passwordless accounts (empty password hash) cannot set a
  password through the self-service endpoint and must use the password
  reset flow instead
- setupLogin never writes back the password column

These guard against regressing the password-change path back into a
short-circuit that lets passwordless accounts set a password directly.
2026-07-05 13:53:25 +08:00
CaIon 56dbaab1d4 feat(session): support opt-in Secure session cookies
- add SESSION_COOKIE_SECURE / SESSION_COOKIE_TRUSTED_URL env vars with
  startup validation: enabling Secure requires at least one trusted
  HTTPS entry URL
- wire common.SessionCookieSecure into the session cookie store instead
  of a hardcoded Secure=false
- print a startup warning when Secure session cookies are disabled
- document the new settings in .env.example and docker-compose files

Secure stays off by default because many deployments front new-api with
plain-HTTP reverse proxies, where a hardcoded Secure default would break
logins entirely; enabling it safely depends on the deployment's TLS
setup, so it ships as an opt-in deployment-hardening flag.
2026-07-05 13:53:16 +08:00
CaIon 0d5995eb63 fix(auth): allow read-only access for non-disabled tokens 2026-07-05 13:35:10 +08:00
CaIon 5fc35e28a2 fix(user): harden account email and password handling
- normalize emails (trim + lowercase) and enforce uniqueness across
  registration, OAuth auto-registration, and email binding
- serialize concurrent writers on the same normalized email within a
  transaction to avoid duplicate accounts
- resolve password reset to a single matching account and reject
  ambiguous or absent matches
- require an existing password before self-service password change and
  reject login for accounts without a usable password
2026-07-05 13:15:41 +08:00
同語 1ae757475f fix: align dynamic pricing style with log details dialog sections
Merge pull request #5905 from feitianbubu/pr/e9fa595c7
2026-07-04 23:42:03 +08:00
feitianbubu f52b52b167 fix: align dynamic pricing style with log details dialog sections 2026-07-04 23:18:25 +08:00
Seefs 4ae341756e fix(channels): show field passthrough controls for Codex (#5902) 2026-07-04 19:50:15 +08:00
CaIon bed4a3f916 fix(user): trim whitespace from username and validate input 2026-07-04 16:56:37 +08:00
CaIon 12603a7765 fix(redemption): add status filtering and cleanup action 2026-07-04 16:15:47 +08:00
CaIon 86021d8ed2 Refine default web UI and backend sync handling 2026-07-04 14:57:53 +08:00
同語 722d0366b7 fix(classic): fix classic web build failures
Merge pull request #5892 from QuantumNous/fix/classic-web-build
2026-07-04 08:47:32 +08:00
QuentinHsu a130103948 chore(makefile): rename backend targets to api
- rename Makefile variables and targets from backend to api for naming consistency.
- update dev command messages and reset setup restart flow to use api terminology.
2026-07-04 08:32:43 +08:00
QuentinHsu 997926bbe1 fix(classic): fix classic web build failures
- replace the Slack OAuth icon with FaSlack from react-icons/fa to avoid the missing SiSlack export.
- add a classic Rsbuild alias for date-fns so Semi resolves its compatible date-fns v2 dependency.
2026-07-04 08:25:39 +08:00
同語 b6e8ff9dd5 perf(web): refine channel test dialog interactions
Merge pull request #5886 from QuantumNous/perf/channel-test-dialog-layout
2026-07-04 00:13:17 +08:00
同語 f5bba114c0 chore(web): update default web dependencies
Merge pull request #5884 from QuantumNous/chore/web-default-deps
2026-07-04 00:12:01 +08:00
QuentinHsu c5600f9b11 perf(channels): compact model test row actions
- replace per-model test text buttons with icon-only actions matching the channel list.
- let the action column shrink to its icon content to reduce table width.
2026-07-03 23:40:11 +08:00
QuentinHsu b35dfa32ef perf(channels): streamline channel test dialog layout
- split model test status from result details so failures and latency no longer crowd one column.
- move batch progress into toast updates to keep the dialog height stable during tests.
- consolidate the channel title and model actions to reduce vertical churn.
2026-07-03 23:13:37 +08:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 917a2cff64 chore(deps-dev): bump tmp from 0.2.5 to 0.2.7 in /electron (#5147)
Bumps [tmp](https://github.com/raszi/node-tmp) from 0.2.5 to 0.2.7.
- [Changelog](https://github.com/raszi/node-tmp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/raszi/node-tmp/compare/v0.2.5...v0.2.7)

---
updated-dependencies:
- dependency-name: tmp
  dependency-version: 0.2.7
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-03 16:57:51 +08:00
CaIon 55858f353c feat: add manual Docker image publishing workflow 2026-07-03 16:54:52 +08:00
QuentinHsu 70c0b37eec chore(deps): remove unused date-fns dependency 2026-07-03 16:53:37 +08:00
QuentinHsu aa334c0850 fix(ai-elements): read nested usage token details
- use ai v7 usage detail fields for reasoning and cache token counts.
- keep context usage cost rendering compatible with the updated SDK types.
2026-07-03 16:35:18 +08:00
QuentinHsu a6c0201257 chore(deps): update web default dependencies
- bump frontend runtime and tooling packages to latest available versions, including React, Rsbuild, TanStack, VisActor, and AI SDK.
- refresh workspace catalog versions and regenerate Bun lockfile to keep default package resolution aligned.
2026-07-03 16:20:22 +08:00
MimiandCaIon 0977965d93 fix: handle ollama non-stream tool calls (#5865)
* fix: handle ollama non-stream tool calls

* test: cover ollama non-stream tool call paths

---------

Co-authored-by: CaIon <i@caion.me>
2026-07-03 15:35:34 +08:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 1dcb389d00 chore(deps): bump golang.org/x/image from 0.38.0 to 0.41.0 (#5873)
Bumps [golang.org/x/image](https://github.com/golang/image) from 0.38.0 to 0.41.0.
- [Commits](https://github.com/golang/image/compare/v0.38.0...v0.41.0)

---
updated-dependencies:
- dependency-name: golang.org/x/image
  dependency-version: 0.41.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-03 15:26:15 +08:00
Calcium-Ion dfc0d6324b Merge commit from fork
* Harden user setting cache updates

* Fix user update test isolation
2026-07-03 15:25:33 +08:00
CaIon bfddc5fea0 fix: omit access_token from user queries 2026-07-03 15:15:16 +08:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 69c4d83df4 chore(deps): bump golang.org/x/net from 0.50.0 to 0.55.0 (#5862)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.50.0 to 0.55.0.
- [Commits](https://github.com/golang/net/compare/v0.50.0...v0.55.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-version: 0.55.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-03 15:14:30 +08:00
feitianbubu c1903607d5 fix: persist channel status filter across page navigation (#5863) 2026-07-03 14:43:27 +08:00
feitianbubu 0565e62679 fix: only treat 401 as session expiry in auth guard (#5872) 2026-07-03 14:43:12 +08:00
CaIon 8874d1929f Make quota logging synchronous and delay startup log 2026-07-02 21:58:41 +08:00
CaIon bff701b0cd docs: update AGENTS.md 2026-07-02 21:53:53 +08:00
feitianbubu 986d90ae04 支持服务优雅关闭,避免重启回复中断和面板缓存数据丢失 (#4258)
* feat: add graceful shutdown with configurable timeout

* fix: flush quota dashboard cache on graceful shutdown

Persist the in-memory CacheQuotaData aggregation to the quota_data table
before process exit, so a restart no longer drops up to one DataExportInterval
window of dashboard data (issue #5679).
2026-07-02 21:53:09 +08:00
feitianbubu 759ab6bbca fix: keep page state when switching tabs within the same route (#5796)
AnimatedOutlet keyed its motion container by the full pathname, so
navigating between params of the same route (e.g. the dashboard tabs
under /dashboard/$section) changed the key and remounted the route
component, discarding its in-memory state. The most visible symptom:
the dashboard time range resets to the default every time you switch
sub-tabs (Model Analytics / Flow / User Analytics).

Key the transition by the matched route id instead, so param-only
navigation re-renders in place while real page-to-page navigation
still plays the enter animation. This also preserves state across the
other $section tab pages (usage logs, models, system settings).
2026-07-02 21:36:23 +08:00
QuentinHsu 1f4d8d2b26 fix(web): inject app styles into isolated HTML (#5860)
- clone loaded application style nodes into the Shadow DOM for custom HTML rendering.
- keep HTML rendering isolated while restoring layout and typography that depend on app CSS.
2026-07-02 21:35:27 +08:00
QuentinHsu e1fd9cc282 chore(build): align make targets with web naming
- rename frontend make targets and variables to use the web terminology consistently.
- keep default and classic dev port overrides available under the updated names.
2026-07-02 20:44:06 +08:00
QuentinHsu f9165e7bfa fix(dev): run only default frontend in dev-web
- simplify make dev-web to install default dependencies and start web/default only.
- keep dev-web-classic as the standalone classic entry and scope its install to classic.
2026-07-02 20:44:06 +08:00
QuentinHsu 95e8c5eecf perf(web): optimize web Rsbuild and Tailwind build pipeline (#5786) 2026-07-02 20:43:48 +08:00
Scott 52858ad1e6 feat: support Wan2.7 i2v media mapping (#4984)
* feat: support Wan2.7 i2v media mapping

* fix: normalize wan2.7 i2v image inputs
2026-07-01 21:21:41 +08:00
olwaterandCaIon fda8177864 fix(web): 修复自定义 HTML 样式被过滤及排版间距异常的问题 (#5795)
* fix(web): 修复自定义 HTML 样式被过滤及排版间距异常的问题

* fix(web): isolate custom HTML rendering

---------

Co-authored-by: CaIon <i@caion.me>
2026-07-01 20:34:10 +08:00
t0ng7u 5bf3468362 chore: run bun format to automatically format the frontend code 2026-07-01 06:38:41 +08:00
feitianbubu e514db20f7 feat: support doubao seedance 2.0 safety_identifier/priority and 4k billing (#5824)
* feat: support safety_identifier and priority for doubao video

* feat: add 4k resolution billing tier for doubao video
2026-06-30 22:16:14 +08:00
feitianbubu c8491b41bc feat: bill doubao seedance-2.0 by output resolution and video input (#5300) 2026-06-30 21:09:09 +08:00
CaIon 12fc010060 Bump Electron lockfile dependencies 2026-06-30 14:06:48 +08:00
CaIon 43591fba77 feat: improve advanced custom route editor 2026-06-29 12:45:30 +08:00
CaIon 25f998595d feat: refine channel management UI 2026-06-28 16:36:32 +08:00
CaIon 1d166532fe fix: update section titles and improve layout in channel components 2026-06-28 15:21:45 +08:00
Calcium-Ion 2d5a041639 feat: support Responses to Chat (#5787)
* fix(openai): harden Chat-to-Responses compatibility

Add a shared Responses-to-Chat stream state machine and use it from the OpenAI relay path. Preserve assistant text alongside tool calls, bind tool argument deltas by output_index, map incomplete finish reasons, support reasoning/custom tool events, and buffer upstream SSE for non-stream Chat clients.

Add deterministic service tests and relay SSE tests for the conversion path.

Related to #5745.

* refactor: rename openaicompat to relayconvert for improved clarity

* feat(gemini): support responses request conversion

* feat: add responses to chat conversion support

* fix: harden responses chat conversion edge cases
2026-06-28 14:25:47 +08:00
Calcium-Ion 3a506f50f0 fix(openai): harden Chat-to-Responses compatibility (#5772)
Add a shared Responses-to-Chat stream state machine and use it from the OpenAI relay path. Preserve assistant text alongside tool calls, bind tool argument deltas by output_index, map incomplete finish reasons, support reasoning/custom tool events, and buffer upstream SSE for non-stream Chat clients.

Add deterministic service tests and relay SSE tests for the conversion path.

Related to #5745.
2026-06-27 19:16:56 +08:00