# 2026-09-15 开发源码更新 / Development source update ## 中文 ### 范围与版本 后续发行:本次源码更新已收入 `2.4.8-revised.9`(版本码 185),见[发行说明](release-notes-2.4.8-revised.9.md)。以下保留先前源码上传时的范围与验证记录。 本次以远端 `main` 与本地共同提交 `2c90d2de`(`2.4.8-revised.8` 发行准备)为基线, 上传之后已完成的源码与文档修改。未递增版本号、发布安装包、修改发行标签或替换既有 Release 资产。 下列内容不属于现有 `.8` 安装包的补充发行承诺。 ### 世界书与提示词 - 完善原生世界书、SillyTavern 及角色卡世界书导入,规范化关键词/条件表达式,保留可诊断的兼容字段。 - 补齐递归标记、消息分隔、扫描深度、延迟递归、跨轮预算、组排他与装饰器处理。 - 接入全局、Persona、助手及对话来源,传递生成触发类型;未绑定或停用世界书时保持普通聊天路径。 - 向量候选按需启用,并受绑定、预算、角色、概率与分组限制;提供超时与关键词回退。 - 重组条目编辑、导入预览、版本/草稿、来源配置、检查和测试入口,增加教程及扫描深度数值参考。 - SillyTavern 的 STscript、完整 Author's Note/Example Messages 锚点与无损 Tavern 导出仍未实现;详见兼容清单。 ### 模型工具协议 - `ask_user` 兼容明确的参数封装、双重编码及单问题形态,缺少必要问题或字段不合法时仍报错,不自动制造用户回答。 - Gemini 修复分片工具参数续接;混合内置工具与函数调用时补齐服务端调用配置。 - 服务端工具不进入本地执行/审批队列,保留结果、签名与顺序用于后续请求。 ### 语音服务 - 修正 ASR 最终结果等待、排序、重复事件、取消及失败重试,使用独立转写草稿保护手动输入。 - 修正朗读的对话隔离、暂停/停止状态、音频焦点、分段和预取上限;支持适用模型的 PCM 分片播放。 - 为 MiniMax TTS、MiMo TTS/ASR 增加共享能力约束与参数归一化,切换模型后不继续发送不支持的旧参数。 - 获取模型时按 TTS、文件识别与实时识别能力过滤,支持取消、分页和配置变更失效;没有官方目录的服务保留明确说明。 ### 日志、崩溃与外观 - 请求与参数日志写入应用私有文件,以原子替换更新;保留上限为 500 条/32 MiB,不依赖应用退出回调。 - 响应正文、JSON 长字符串和 Gemini 系统提示词支持分段、折叠及现有表面配色,复制/导出保留原文。 - 阻止内联只读 WebView/TextView 获取输入焦点后重入 Compose 列表测量;全屏 HTML 输入交互保持可用。 - 下拉菜单按可见视口测量和绘制背景,选项独立滚动,修复长列表 Constraints 溢出和背景图片异常放大。 - 语音参数、世界书导航、供应商卡片和播放组件统一接入现有透明度、玻璃效果与文字配色。 ### 文档与验证 新增语音、日志及世界书兼容文档,更新教程、工程结构、双语 README 和修改声明; 历史审查注明时点,生图工具方案标记为待实现。从版本控制中移除外部安装的开发技能副本,保留本地及来源记录。 具体文件清单见[文档索引](README.md)。 上传前检查通过:AI 模块 425 项、common 模块 13 项、speech 模块 57 项、app 定向测试 119 项,共 614 项 JVM 测试,失败/错误/跳过均为 0。语音测试复用 Gradle 校验有效的已有结果, 其余测试本轮执行。`:app:compileQaKotlin` 通过;仍有既有实验 API opt-in 与弃用 API 警告。 可复现入口(使用仓库 Gradle Wrapper;Windows 将 `./gradlew` 换为 `gradlew.bat`): ```bash ./gradlew :ai:testDebugUnitTest :common:testDebugUnitTest :speech:testDebugUnitTest ./gradlew :app:testDebugUnitTest --tests '*Lorebook*' --tests '*ExtensionAudit*' --tests '*LogBodyContent*' --tests '*MenuViewport*' --tests '*SwipeRevealActions*' --tests '*AskUser*' --tests '*BackgroundReadability*' --tests '*RequestContextAccounting*' ./gradlew :app:compileQaKotlin ``` 最新菜单修复另有此前 V2301A 独立 Debug 包两项设备回归通过,见日志指南。 本轮不重新安装设备、不发起真实供应商付费调用。全量设备组合、进程死亡与音频外设场景 不由 JVM/编译测试覆盖;历史设备报告也不代表本次全功能实机回归。 ## English ### Scope and version Subsequent release: this source update is included in `2.4.8-revised.9` (version code 185); see the [release notes](release-notes-2.4.8-revised.9.md). The original source-upload scope and validation record are retained below. The upload starts from `2c90d2de`, the shared local/remote `main` baseline for `2.4.8-revised.8`. It includes subsequent source and documentation changes. Version numbers, release tags, and existing binaries are unchanged; no APK or Release is published by this source update. ### World books and prompts - Improved native, SillyTavern, and character-card imports, keyword/expression normalization, and compatibility diagnostics. - Expanded recursion flags, message boundaries, scan depth, delayed recursion, budgets across passes, exclusive groups, and supported decorators. - Added Global, Persona, assistant, and conversation sources and generation trigger propagation while preserving the ordinary path when no book is active. - Integrated opt-in vector candidates with binding, budget, character, probability, and group restrictions, plus timeout and keyword fallback. - Reorganized entry editing, import preview, drafts/history, source settings, testing, and help with practical scan-depth examples. - STscript, exact Author's Note/Example Messages anchors, and lossless Tavern export remain outside the implemented compatibility scope. ### Tool protocols - Normalized explicit `ask_user` envelopes, encoded arguments, and single-question forms while continuing to reject invalid requests rather than invent answers. - Fixed Gemini argument continuation and mixed built-in/function-tool config. - Kept server-side invocations outside local execution/approval queues and preserved their results, signatures, and order for continuation requests. ### Speech - Improved ASR finalization, ordering, duplicate handling, cancellation, retries, and editable transcription drafts without overwriting manual input. - Improved conversation-scoped TTS, pause/stop state, audio focus, chunking, bounded prefetch, and PCM streaming where supported. - Added shared MiniMax TTS and MiMo TTS/ASR capability constraints and parameter normalization; unsupported previous-model parameters are not sent. - Added filtered speech-model discovery, pagination, cancellation, and stale result protection, with explicit fallbacks for services without a model API. ### Logging, crashes, and appearance - Persisted request/parameter logs with atomic replacement in private storage, bounded to 500 entries/32 MiB, without relying on shutdown callbacks. - Added styled, collapsible response bodies, long JSON values, and Gemini system instructions; copying/exporting retains the original data. - Prevented inline read-only WebView/TextView focus from reentering Compose list measurement while retaining form input in full-screen HTML previews. - Bounded dropdown measurement and kept backgrounds fixed to the visible viewport while options scroll, fixing Constraints overflow and enlarged images. - Applied existing surface, glass, opacity, and text-color settings to the new speech, world-book, provider, and playback controls. ### Documentation and validation Added speech/logging/compatibility guides and updated tutorials, project maps, READMEs, and modification records. Historical audits retain their dates and limits; the image-tool confirmation flow remains a proposal. Downloaded developer skill copies are no longer tracked; local copies and source records remain. See the [documentation index](README.md) for the file-level decisions. Pre-upload checks passed: 425 AI, 13 common, 57 speech, and 119 selected app JVM tests (614 total, zero failures/errors/skips). Gradle reused the valid speech test results; the other suites ran in this check. QA Kotlin compilation passed with existing experimental-API opt-in and deprecation warnings. The commands above reproduce the selected scope. The menu fix also has two earlier passing V2301A Debug-device regressions, documented in the logging guide. This upload does not repeat device installation or paid API calls. JVM and compilation checks do not cover all devices, process death, or audio peripherals; the earlier device reports are not a full-device regression of every feature in this upload.