Commit Graph

4993 Commits

Author SHA1 Message Date
lxfight
296fcfb54a fix: compensate partial knowledge base upload failures (#9007) (#9246)
* fix: roll back document rows when FAISS insert fails

Validate embedding shape/dimension before local writes. If DocumentStorage
commits but FAISS write fails, best-effort delete the partial FAISS ids and
document rows so the two stores do not diverge.

* fix: clean up partial KB upload state before metadata commit

Track metadata_committed right after commit succeeds. On failure before
metadata commit, roll back chunks/vectors first, then residual KB rows and
media files. After metadata is committed, keep the document even if stats
or refresh fails.

* test: cover knowledge base upload atomicity and rollback

Add unit tests for insert_batch FAISS failure rollback, dimension validation
before document writes, upload cleanup order, no-rollback after metadata
commit, and real DocumentStorage+FAISS no-orphan cases.

* fix: log media directory cleanup failures after upload rollback

Best-effort rmdir of the per-document media directory should still emit a
warning when removal fails so incomplete cleanup is diagnosable.
2026-07-15 16:11:02 +08:00
Kirain
148d8cc486 feat: add rerank provider for Text Embeddings Inference (TEI) (#9274)
* feat: add TEI rerank source

* feat: add TEI rerank source

* reformat tei_rerank_source.py

* fix capital letter argument in tei_rerank_truncation_direction
2026-07-15 16:10:07 +08:00
Haoran Xu
e7b9e32242 fix: add catch-all Exception handler for dashboard API (#9271) 2026-07-15 15:38:17 +08:00
Haoran Xu
efd08c8557 fix: skills download archive filename mismatch with versioned skill names (#9270) 2026-07-15 15:35:37 +08:00
Haoran Xu
f5c34bb321 fix: delete unsaved provider sources locally (#9264) 2026-07-15 15:33:38 +08:00
Haoran Xu
259ae3d2c8 fix: prioritize configured context limit (#9263) 2026-07-15 15:33:12 +08:00
Haoran Xu
8f6a8fad24 feat: stream agent stats after each LLM call (#9260) 2026-07-15 15:31:45 +08:00
Soulter
d98a296000 chore: bump version to 4.26.6 (#9273) v4.26.6 2026-07-14 09:36:01 +08:00
圣达生物多
a298c7bf49 feat: import and export personas (#4532)
* [Feature] 人格设定支持导出/导入。
Fixes #4409

- 导出的json

* 导入(dev

* 稍微进化

* 改为直接导出文件

* 删除未使用的i18n键值

* fix:仅白名单字段可以作为文件名

* PersonaForm.vue - savePersona 方法添加了白名单字段过滤

* update

* [Feature] 人格设定支持导出/导入。
Fixes #4409

* 再次完成

* 修复bug 405

* 移除导入和导出按钮的本地化文本(上一次修改的

* 移动到 persona 的 i18n JSON

* [Feature] 人格设定支持导出/导入。
Fixes #4409

找回需要的i18n

* 写错地方了,更正i18n

* 保证相同的i18n

* 在导出时说明不包含tools Skills

* 修改导出格式

* 新格式导入

* 重复检查

* [Bug]当 LLM 的回复本身包含类似 JSON 的格式的时候消息的 content 字段可能被错误地多次序列化
Fixes #4363

* [Bug]当 LLM 的回复本身包含类似 JSON 的格式的时候消息的 content 字段可能被错误地多次序列化
Fixes #4363

* [Bug]当 LLM 的回复本身包含类似 JSON 的格式的时候消息的 content 字段可能被错误地多次序列化
Fixes #4363

提取_parse_image_url_part 处理base64

* - 当原始数据是字符串时(`raw_data` 不为 None):返回 `{"type": "json", "data": {"content": "..."}}` 包装形式

- 当原始数据是字典时:直接返回 `{"type": "json", "data": {...原始字典...}}`,不使用 content 包装

* 像其他组件一样使用 self.type

* 在 Json.__init__ 中 传入 self.raw_data

* 在 Json.to_dict 中 使用 self.type.lower() 来推导

* [Bug]当 LLM 的回复本身包含类似 JSON 的格式的时候消息的 content 字段可能被错误地多次序列化
Fixes #4363

* [Bug]当 LLM 的回复本身包含类似 JSON 的格式的时候消息的 content 字段可能被错误地多次序列化
Fixes #4363

* [Bug]当 LLM 的回复本身包含类似 JSON 的格式的时候消息的 content 字段可能被错误地多次序列化
Fixes #4363

提取_parse_image_url_part 处理base64

* - 当原始数据是字符串时(`raw_data` 不为 None):返回 `{"type": "json", "data": {"content": "..."}}` 包装形式

- 当原始数据是字典时:直接返回 `{"type": "json", "data": {...原始字典...}}`,不使用 content 包装

* 像其他组件一样使用 self.type

* 在 Json.__init__ 中 传入 self.raw_data

* 在 Json.to_dict 中 使用 self.type.lower() 来推导

* [Feature] 人格设定支持导出/导入。
Fixes #4409

* 同步

* feat(persona): 添加导入和导出功能,增强用户体验
2026-07-13 23:52:05 +08:00
Soulter
6070da9ae2 fix: resume ChatUI streams after refresh (#9259)
* fix: resume ChatUI streams after refresh

* fix: hide chat run service errors

* fix: harden resumed chat streams
2026-07-13 23:05:03 +08:00
Haoran Xu
cc0ec5e5c5 fix: report current context usage in token indicator (#9255) 2026-07-13 21:21:17 +08:00
w33d
d0e5e68c55 fix: handle max_tokens for NVIDIA MiniMax M3 (#9209) 2026-07-12 16:20:48 +08:00
Wei Chengqian
ab4de04648 fix: exempt WebChat from friend wake prefix (#9215) 2026-07-12 16:04:50 +08:00
VectorPeak
a957b2e5dc fix: return HTTP errors for failed skill downloads (#9213)
* fix: return HTTP errors for failed skill downloads

Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>

* fix: harden skill archive error responses

Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>

* fix: use structured skill archive status codes

Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>

---------

Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
2026-07-12 16:04:12 +08:00
叹号大帝
6641041d1e fix: update i18n callback path to Settings General (#9201) 2026-07-11 23:15:14 +08:00
dependabot[bot]
c72a024eec chore(deps): bump the github-actions group with 4 updates (#9170)
Bumps the github-actions group with 4 updates: [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action), [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action), [docker/login-action](https://github.com/docker/login-action) and [docker/build-push-action](https://github.com/docker/build-push-action).


Updates `docker/setup-qemu-action` from 4.1.0 to 4.2.0
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](https://github.com/docker/setup-qemu-action/compare/v4.1.0...v4.2.0)

Updates `docker/setup-buildx-action` from 4.1.0 to 4.2.0
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v4.1.0...v4.2.0)

Updates `docker/login-action` from 4.2.0 to 4.4.0
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v4.2.0...v4.4.0)

Updates `docker/build-push-action` from 7.2.0 to 7.3.0
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v7.2.0...v7.3.0)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-version: 4.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: docker/setup-buildx-action
  dependency-version: 4.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: docker/login-action
  dependency-version: 4.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: docker/build-push-action
  dependency-version: 7.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-11 23:14:42 +08:00
Chiu Chun-Hsien
3bf6d683ae fix: use ephemeral cache control mode in anthropic provider to increase cache hit rate (#9197) 2026-07-11 22:51:58 +08:00
Wei Chengqian
d7bad22bbd fix: make ChatUI model selection theme-aware (#9200) 2026-07-11 22:47:25 +08:00
Fiber
4c6ef8a492 fix: resolve mobile chat input freeze and multiline attachment button alignment (#9202)
* fix: resolve mobile chat input freeze caused by autoResize oscillation

The autoResize() function in ChatInput.vue used minHeight + 8 as the
threshold to decide whether to switch from multi-line (textarea) back
to single-line (input). On mobile viewports (max-width: 768px), the
textarea's 2-line scrollHeight is below minHeight + 8 due to smaller
line-height and padding, causing an infinite oscillation loop between
<input> and <textarea> that freezes the browser.

Fix: compute the actual single-line content height from
getComputedStyle (line-height + vertical padding) and use that as the
wrapping threshold instead of the hardcoded minHeight + 8 offset.
Also temporarily set min-height to 0 during scrollHeight measurement
to avoid the CSS min-height: 52px inflating the value.

* fix: align mobile multiline attachment button to the left

The mobile multiline grid used a 2-column layout (1fr auto) with
'left right' areas, causing the left actions area to span the full
remaining width and centering the + button via justify-content: center.

Switch to the same 3-column layout (auto 1fr auto) with 'left . right'
areas used on desktop, so the + button sits at the left edge.

* fix: use !important to override min-height during scrollHeight measurement

el.style.minHeight = '0' cannot override the CSS min-height: 52px
!important rule, leaving scrollHeight inflated and preventing the
textarea from switching back to single-line for short text.

Use setProperty('min-height', '0', 'important') to force the override,
and removeProperty to restore. Also add a fontSize * 1.2 fallback when
getComputedStyle returns 'normal' for line-height, so the threshold is
always computable.
2026-07-11 22:46:55 +08:00
叹号大帝
7422fb075c fix(platform): correct tutorial links for satori and mattermost (#9205) 2026-07-11 22:46:16 +08:00
Cooper
12f2f5a09c fix: Added Try Except to Filter Handling (#9183)
* Added Try Except to Filter Handling

* Avoid Redundant Error Processing
2026-07-09 15:48:52 +08:00
SpencerFang0617
afb898e61f fix(line): remove unexpected force argument from get_json (#9187) 2026-07-09 15:47:57 +08:00
Soulter
0be821afc6 chore: update readme 2026-07-08 00:39:31 +08:00
VectorPeak
dcc40ede1d fix: validate dashboard account username updates (#9175)
Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
2026-07-08 00:27:52 +08:00
Soulter
adebd2958e chore: refine README
SengokuCola 必定女装
2026-07-07 22:00:19 +08:00
Soulter
331444b41f docs: update v4.26.5 changelog format 2026-07-07 10:12:25 +08:00
Weilong Liao
39090a74ba chore: bump version to 4.26.5 (#9174) v4.26.5 2026-07-07 09:54:43 +08:00
Weilong Liao
bf18fadbe6 style: polish snackbar appearance (#9173) 2026-07-07 09:43:59 +08:00
Soulter
1124dfe295 docs: broaden diagnostics guide 2026-07-07 00:26:03 +08:00
Soulter
510e833695 chore: log event loop watchdog startup at info 2026-07-07 00:21:01 +08:00
Soulter
0a5d6485a1 docs: add diagnostics guide 2026-07-07 00:19:40 +08:00
Weilong Liao
0dee40bd9d feat: add event loop diagnostics (#9168)
* feat: add event loop diagnostics

* fix: write event loop watchdog dumps to rotating log

* chore: use fixed event loop diagnostic defaults

* fix: keep event loop watchdog alive after dump failures
2026-07-07 00:14:03 +08:00
Weilong Liao
2a7c02af8e fix: remove qq official reply id on proactive fallback so oversized passive replies can succeed via proactive sending (#9169) 2026-07-06 23:48:30 +08:00
lingyun14
56f2533951 fix(mcp): attempt to fix epoll busy-wait caused by leaked SSE exit stack (#8307)
* fix(mcp): prevent epoll busy-wait caused by leaked SSE exit stack

* fix(mcp): address review feedback on owner task connection lifecycle

* Update mcp_client.py
2026-07-06 23:06:48 +08:00
killer-qert
afb0079116 fix: exit MCP anyio contexts in the lifecycle task on disable (#9132)
* fix: exit MCP anyio contexts in the lifecycle task on disable

#9070 moved MCP shutdown cleanup into the per-server lifecycle task so
that the anyio cancel scopes entered in connect_to_server() are exited
from the task that entered them. Running the cleanup through
asyncio.shield() defeats that: shield wraps the coroutine in a new
task, so disabling a server still fails with "Attempted to exit cancel
scope in a different task than it was entered in" and leaves the scope
state corrupted -- the failure mode behind the CPU spin reported in
#9068.

Await _terminate_mcp_client() directly instead. The graceful disable
path has no cancellation in flight, and on forced shutdown the
lifecycle task still runs its finally block in-task, so the shield only
served to break task affinity.

Closes #9068

* fix: absorb late cancellations during MCP shutdown cleanup

A cancellation delivered while the lifecycle task is already running its
finally-block cleanup would abort _terminate_mcp_client() halfway,
stranding the runtime entry and the MCP transport. Retry the cleanup in
the same task and uncancel() the absorbed request instead, so a forced
shutdown can no longer skip it.

* fix: guard Task.uncancel() for Python 3.10 runtimes

Task.uncancel() only exists on Python 3.11+. On 3.10 absorbing the
CancelledError is sufficient, so skip the call when unavailable.
2026-07-06 23:04:41 +08:00
Weilong Liao
4166d9ab58 fix: preserve qq official quoted message context (#9164)
* fix: preserve qq official quoted message context

* Update astrbot/core/platform/sources/qqofficial/qqofficial_platform_adapter.py

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* fix: standardize qq-botpy version specification in dependencies

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-07-06 22:55:21 +08:00
Glmg
ba7f8ebfb1 fix(webui): sync plugin activation status on enable (#9156)
* fix(webui): fix plugin activation status sync issue in turn_on_plugin #9149

* fix(webui): sync plugin activation status after enabling

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-07-06 21:16:14 +08:00
Weilong Liao
ab2502c174 feat: add chat token usage indicator
Show a neutral token usage ring in ChatUI when the current model has context-window metadata.
2026-07-06 21:14:35 +08:00
Fiber
56326c7551 fix: serialize webchat history timestamps as UTC-aware ISO strings (#9159)
ChatService serialized PlatformMessageHistory records via bare model_dump(),
causing created_at/updated_at to be emitted as naive ISO strings without a
timezone suffix. The frontend new Date() parses such strings as local time
per ES2015+, so UTC values were displayed as-is instead of converted.

Add serialize_history_entry helper and apply it to get_session, get_thread,
and update_message. This matches the SSE real-time path and session list
path, ensuring the frontend consistently receives ISO strings with the
+00:00 suffix across all code paths.
2026-07-06 21:12:29 +08:00
Weilong Liao
18e067fab1 fix: keep model metadata separate from providers (#9161) 2026-07-06 21:10:57 +08:00
Weilong Liao
6627fd53c2 feat: show model metadata in selectors
Surface cached model metadata in model/provider selectors, show neutral capability/context badges, and add provider test actions.
2026-07-06 20:38:30 +08:00
Weilong Liao
25cbd41e08 feat: add sanitation for malformed tool call names in ToolLoopAgentRunner (#9144)
* feat: add sanitation for malformed tool call names in ToolLoopAgentRunner

fixes: #8929
closes: #8911

* Update astrbot/core/agent/runners/tool_loop_agent_runner.py

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>

* fix: update docstring to clarify normalization of malformed tool call names

---------

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
2026-07-05 10:53:14 +08:00
sama233
3b8caf37e6 test: cover POSIX file URI root preservation (#8906)
* test: cover POSIX file URI root preservation

* Update tests/test_media_utils.py

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

---------

Co-authored-by: Weilong Liao <37870767+Soulter@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-07-05 10:12:59 +08:00
Soulter
85b653b6f0 feat: add note on cross-platform compatibility and Python version support 2026-07-05 10:06:16 +08:00
tangtaizong666
c9eed7b65e fix: adapt MiMo STT to V2.5 models and reject non-WAV audio payloads (#9118)
* fix: adapt MiMo STT to V2.5 models and reject non-WAV audio

The MiMo-V2 series went offline on 2026-06-30, so the default STT model
mimo-v2-omni fails for every default configuration. Switch the default
to mimo-v2.5-asr, the dedicated speech recognition model whose official
docs use exactly the bare input_audio payload this provider sends.

For non-ASR multimodal models such as mimo-v2.5, the audio understanding
docs require a text instruction alongside the audio, so restore the
system/user transcription prompts for that model family only.

Also validate that the resolved audio payload really is RIFF/WAVE before
calling the API: when a platform voice file (e.g. Tencent SILK from QQ)
slips through the WAV conversion chain unchanged, fail locally with an
actionable error instead of the opaque HTTP 400 from the API.

Fixes #9113

* fix: accept unpadded MiMo wav headers

---------

Co-authored-by: tangtaizong666 <212687958+tangtaizong666@users.noreply.github.com>
2026-07-05 09:59:48 +08:00
shuiping233
cc0b347508 fix: qq_official websocket适配器发送消息收到None时现在会重试了 (#8977) (#8979)
* fix: qq_official websocket适配器发送消息收到None时现在会重试了 (#8977)

* fix: qq_official websocket适配器重试发送消息的时候不会重复打印重试告警了

* fix: qq_official websocket适配器发送媒体/文件消息时遇到api返回None也会重试了
2026-07-05 09:50:42 +08:00
LIghtJUNction
30426c4f67 fix: secure project update temp staging (#9083)
* fix: secure project update temp staging

* Update astrbot/dashboard/services/update_service.py

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* fix: close update staging temp context

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-07-05 09:49:11 +08:00
VectorPeak
041fba4df4 fix: enforce ownership when reading ChatUI sessions (#9141) 2026-07-05 09:34:38 +08:00
Weilong Liao
b43cc6dee0 feat: improve ChatUI attachment display (#9134) 2026-07-04 17:56:33 +08:00
Soulter
20008f179c fix: preserve absolute custom workspace paths 2026-07-03 22:59:21 +08:00