mirror of
https://github.com/Darkatse/TauriTavern.git
synced 2026-10-20 11:18:32 +00:00
Tavern Studio previews the TauriTavern frontend in a browser, where there is no Tauri. The frontend reaches its host only through tauri-bridge.js, so a browser host has one seam to provide. src/tauri/web-host provides that side for the startup path: from boot to an open character chat with its linked lorebook, including the settings save that startup triggers. Data goes to the embedder's backend with SillyTavern HTTP semantics, and TT settings live in an opaque document the embedder keeps. Other commands reject as Unsupported. The settings defaults come from the Rust DTO, and a test keeps that copy current. The browser test harness now starts every test through the Web Host instead of a hand-written __TAURI__, and a startup test covers the desktop and Android identities. The byte wire constants, the Persona projection and the avatar file name now each have one definition, shared by the frontend and the Web Host. The settings save contract now states that Personas are sent as a delta. The other docs stay host-neutral; docs/CurrentState/WebHost.md describes the Web Host and when it needs changes. Validation: pnpm run check.
2 KiB
2 KiB
模块文档
这里记录各模块的工作方式与源码入口。Agent 的整体说明集中在 Agent,后端分层见 后端结构。
| 模块 | 文档内容 |
|---|---|
| 第三方扩展 | 加载、发现与资源访问 |
| 移动端视口 | 原生内容视口、窗口背景与第一方移动端行为 |
| 消息内嵌运行时 | iframe 的生命周期与渲染 |
| 启动流程 | Shell、Core、Full 阶段 |
| Bootstrap | 启动输入与内存开销 |
| 聊天存储 | 完整历史、分页读取和保存 |
| 记忆扩展 | 聊天查询与扩展存储 |
| 媒体资源 | 浏览器资源与 Range 请求 |
| 系统 TTS | Android Web Speech 接入与当前边界 |
| 同步 | LAN Sync 与 TT-Sync |
| 文件传输 | 原生选取、交付与暂存 |
| 数据目录 | 桌面目录选择与迁移 |
| 原生模型 API | Responses、Claude、Gemini 等格式 |
| iOS 策略 | 平台能力与分发设置 |
| 角色身份 | 角色、聊天目录、重命名与世界书绑定 |
| 日志 | tracing、Dev API 与 LLM 请求日志 |
| 资源缓存 | 资源版本与条件请求 |
| 更新渠道 | Stable、Canary 与更新检测 |
| Linux 分发 | APT、RPM 与 Nix |
| Windows 分发 | WinGet 与安装包 |
| MCP | 服务器、工具目录与模型调用 |
| 向量 API | 索引、embedding 与查询 |
| 自有界面 | React、TypeScript 与构建流程 |
| Web Host | 浏览器嵌入方(Tavern Studio)使用的宿主实现 |