chore: remove status checking in chat page

This commit is contained in:
Soulter
2025-08-13 10:45:50 +08:00
parent 369eab18ab
commit cb749a38ab
4 changed files with 0 additions and 33 deletions
-6
View File
@@ -49,12 +49,6 @@ class ProviderManager:
"""默认的 Text To Speech Provider 实例"""
self.db_helper = db_helper
# kdb(experimental)
self.curr_kdb_name = ""
kdb_cfg = config.get("knowledge_db", {})
if kdb_cfg and len(kdb_cfg):
self.curr_kdb_name = list(kdb_cfg.keys())[0]
@property
def persona_configs(self) -> list:
"""动态获取最新的 persona 配置"""
-14
View File
@@ -30,7 +30,6 @@ class ChatRoute(Route):
"/chat/get_file": ("GET", self.get_file),
"/chat/post_image": ("POST", self.post_image),
"/chat/post_file": ("POST", self.post_file),
"/chat/status": ("GET", self.status),
}
self.core_lifecycle = core_lifecycle
self.register_routes()
@@ -41,19 +40,6 @@ class ChatRoute(Route):
self.conv_mgr = core_lifecycle.conversation_manager
self.platform_history_mgr = core_lifecycle.platform_message_history_manager
async def status(self):
has_llm_enabled = (
self.core_lifecycle.provider_manager.curr_provider_inst is not None
)
has_stt_enabled = (
self.core_lifecycle.provider_manager.curr_stt_provider_inst is not None
)
return (
Response()
.ok(data={"llm_enabled": has_llm_enabled, "stt_enabled": has_stt_enabled})
.__dict__
)
async def get_file(self):
filename = request.args.get("filename")
if not filename:
-12
View File
@@ -363,9 +363,6 @@ export default {
stagedAudioUrl: "",
mediaRecorder: null,
status: {},
statusText: '',
eventSource: null,
eventSourceReader: null,
@@ -621,15 +618,6 @@ export default {
});
},
checkStatus() {
axios.get('/api/chat/status').then(response => {
console.log(response.data);
this.status = response.data.data;
}).catch(err => {
console.error(err);
});
},
async startRecording() {
const stream = await navigator.mediaDevices.getUserMedia({ audio: true });
this.mediaRecorder = new MediaRecorder(stream);
-1
View File
@@ -13,7 +13,6 @@ from .engines import HEADERS, USER_AGENTS
class Main(star.Star):
"""使用 /websearch on 或者 off 开启或者关闭网页搜索功能"""
def __init__(self, context: star.Context) -> None:
self.context = context