mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-27 09:33:55 +08:00
update:增加版本号,解决html引用文件缓存问题
This commit is contained in:
@@ -1,10 +1,10 @@
|
|||||||
// 主应用入口
|
// 主应用入口
|
||||||
import { log } from './utils/logger.js';
|
import { checkOpusLoaded, initOpusEncoder } from './core/audio/opus-codec.js?v=0127';
|
||||||
import { checkOpusLoaded, initOpusEncoder } from './core/audio/opus-codec.js';
|
import { getAudioPlayer } from './core/audio/player.js?v=0127';
|
||||||
import { uiController } from './ui/controller.js';
|
import { checkMicrophoneAvailability, isHttpNonLocalhost } from './core/audio/recorder.js?v=0127';
|
||||||
import { getAudioPlayer } from './core/audio/player.js';
|
import { initMcpTools } from './core/mcp/tools.js?v=0127';
|
||||||
import { initMcpTools } from './core/mcp/tools.js';
|
import { uiController } from './ui/controller.js?v=0127';
|
||||||
import { checkMicrophoneAvailability, isHttpNonLocalhost } from './core/audio/recorder.js';
|
import { log } from './utils/logger.js?v=0127';
|
||||||
|
|
||||||
// 应用类
|
// 应用类
|
||||||
class App {
|
class App {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { log } from '../../utils/logger.js';
|
import { log } from '../../utils/logger.js?v=0127';
|
||||||
|
|
||||||
|
|
||||||
// 检查Opus库是否已加载
|
// 检查Opus库是否已加载
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// 音频播放模块
|
// 音频播放模块
|
||||||
import { log } from '../../utils/logger.js';
|
import BlockingQueue from '../../utils/blocking-queue.js?v=0127';
|
||||||
import BlockingQueue from '../../utils/blocking-queue.js';
|
import { log } from '../../utils/logger.js?v=0127';
|
||||||
import { createStreamingContext } from './stream-context.js';
|
import { createStreamingContext } from './stream-context.js?v=0127';
|
||||||
|
|
||||||
// 音频播放器类
|
// 音频播放器类
|
||||||
export class AudioPlayer {
|
export class AudioPlayer {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Audio recording module
|
// Audio recording module
|
||||||
import { log } from '../../utils/logger.js';
|
import { log } from '../../utils/logger.js?v=0127';
|
||||||
import { initOpusEncoder } from './opus-codec.js';
|
import { initOpusEncoder } from './opus-codec.js?v=0127';
|
||||||
import { getAudioPlayer } from './player.js';
|
import { getAudioPlayer } from './player.js?v=0127';
|
||||||
|
|
||||||
// Audio recorder class
|
// Audio recorder class
|
||||||
export class AudioRecorder {
|
export class AudioRecorder {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import BlockingQueue from '../../utils/blocking-queue.js';
|
import BlockingQueue from '../../utils/blocking-queue.js?v=0127';
|
||||||
import { log } from '../../utils/logger.js';
|
import { log } from '../../utils/logger.js?v=0127';
|
||||||
|
|
||||||
// 音频流播放上下文类
|
// 音频流播放上下文类
|
||||||
export class StreamingContext {
|
export class StreamingContext {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { log } from '../../utils/logger.js';
|
import { log } from '../../utils/logger.js?v=0127';
|
||||||
|
|
||||||
// ==========================================
|
// ==========================================
|
||||||
// MCP 工具管理逻辑
|
// MCP 工具管理逻辑
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { log } from '../../utils/logger.js';
|
import { log } from '../../utils/logger.js?v=0127';
|
||||||
|
|
||||||
// WebSocket 连接
|
// WebSocket 连接
|
||||||
export async function webSocketConnect(otaUrl, config) {
|
export async function webSocketConnect(otaUrl, config) {
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
// WebSocket消息处理模块
|
// WebSocket消息处理模块
|
||||||
import { getConfig, saveConnectionUrls } from '../../config/manager.js';
|
import { getConfig, saveConnectionUrls } from '../../config/manager.js?v=0127';
|
||||||
import { uiController } from '../../ui/controller.js';
|
import { uiController } from '../../ui/controller.js?v=0127';
|
||||||
import { log } from '../../utils/logger.js';
|
import { log } from '../../utils/logger.js?v=0127';
|
||||||
import { getAudioPlayer } from '../audio/player.js';
|
import { getAudioPlayer } from '../audio/player.js?v=0127';
|
||||||
import { getAudioRecorder } from '../audio/recorder.js';
|
import { getAudioRecorder } from '../audio/recorder.js?v=0127';
|
||||||
import { executeMcpTool, getMcpTools, setWebSocket as setMcpWebSocket } from '../mcp/tools.js';
|
import { executeMcpTool, getMcpTools, setWebSocket as setMcpWebSocket } from '../mcp/tools.js?v=0127';
|
||||||
import { webSocketConnect } from './ota-connector.js';
|
import { webSocketConnect } from './ota-connector.js?v=0127';
|
||||||
|
|
||||||
// WebSocket处理器类
|
// WebSocket处理器类
|
||||||
export class WebSocketHandler {
|
export class WebSocketHandler {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
// UI controller module
|
// UI controller module
|
||||||
import { loadConfig, saveConfig } from '../config/manager.js';
|
import { loadConfig, saveConfig } from '../config/manager.js?v=0127';
|
||||||
import { getAudioPlayer } from '../core/audio/player.js';
|
import { getAudioPlayer } from '../core/audio/player.js?v=0127';
|
||||||
import { getAudioRecorder } from '../core/audio/recorder.js';
|
import { getAudioRecorder } from '../core/audio/recorder.js?v=0127';
|
||||||
import { getWebSocketHandler } from '../core/network/websocket.js';
|
import { getWebSocketHandler } from '../core/network/websocket.js?v=0127';
|
||||||
|
|
||||||
// UI controller class
|
// UI controller class
|
||||||
class UIController {
|
class UIController {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>小智服务器测试页面</title>
|
<title>小智服务器测试页面</title>
|
||||||
<link rel="stylesheet" href="css/test_page.css">
|
<link rel="stylesheet" href="css/test_page.css?v=0127">
|
||||||
<script>
|
<script>
|
||||||
// 检测是否使用file://协议打开
|
// 检测是否使用file://协议打开
|
||||||
if (window.location.protocol === 'file:') {
|
if (window.location.protocol === 'file:') {
|
||||||
@@ -143,7 +143,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="config-item">
|
<div class="config-item">
|
||||||
<label for="deviceName">设备名称:</label>
|
<label for="deviceName">设备名称:</label>
|
||||||
<input type="text" id="deviceName" value="Web测试设备" maxlength="50" placeholder="deviceName">
|
<input type="text" id="deviceName" value="Web测试设备" maxlength="50"
|
||||||
|
placeholder="deviceName">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -237,23 +238,23 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 背景加载 -->
|
<!-- 背景加载 -->
|
||||||
<script src="js/ui/background-load.js"></script>
|
<script src="js/ui/background-load.js?v=0127"></script>
|
||||||
|
|
||||||
<!-- PIXI.js 2D渲染引擎 -->
|
<!-- PIXI.js 2D渲染引擎 -->
|
||||||
<script src="js/live2d/pixi.js"></script>
|
<script src="js/live2d/pixi.js?v=0127"></script>
|
||||||
|
|
||||||
<!-- Live2D Cubism 4.0 SDK -->
|
<!-- Live2D Cubism 4.0 SDK -->
|
||||||
<script src="js/live2d/live2dcubismcore.min.js"></script>
|
<script src="js/live2d/live2dcubismcore.min.js?v=0127"></script>
|
||||||
<script src="js/live2d/cubism4.min.js"></script>
|
<script src="js/live2d/cubism4.min.js?v=0127"></script>
|
||||||
|
|
||||||
<!-- Live2D 管理器 -->
|
<!-- Live2D 管理器 -->
|
||||||
<script src="js/live2d/live2d.js"></script>
|
<script src="js/live2d/live2d.js?v=0127"></script>
|
||||||
|
|
||||||
<!-- Opus解码库 -->
|
<!-- Opus解码库 -->
|
||||||
<script src="js/utils/libopus.js"></script>
|
<script src="js/utils/libopus.js?v=0127"></script>
|
||||||
|
|
||||||
<!-- 主应用入口 -->
|
<!-- 主应用入口 -->
|
||||||
<script type="module" src="js/app.js"></script>
|
<script type="module" src="js/app.js?v=0127"></script>
|
||||||
|
|
||||||
<!-- 全局错误处理 -->
|
<!-- 全局错误处理 -->
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
Reference in New Issue
Block a user